403Webshell
Server IP : _  /  Your IP : 169.254.129.1
Web Server : nginx/1.28.0
System : Linux 25520b0e8825 6.6.139.1-1.azl3 #1 SMP PREEMPT_DYNAMIC Sun May 17 06:19:38 UTC 2026 x86_64
User : nginx ( 103)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wordpress/flip-books/Annual-Report-2019-2020/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/wordpress/flip-books/Annual-Report-2019-2020//flipbookPc.js
(function($hx_exports,$global){"use strict";var $hx_script=function(exports,global){(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 i(){}i.prototype=e;var s=new i;for(var a in t)s[a]=t[a];if(t.toString!==Object.prototype.toString)s.toString=t.toString;return s}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,i){return false}}if(!CanvasRenderingContext2D.prototype.isPointInPath){CanvasRenderingContext2D.prototype.isPointInPath=function(e,t,i){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 i=0;i<e.length&&!window.requestAnimationFrame;++i){window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame)window.requestAnimationFrame=function(e,t){var i=(new Date).getTime();var s=Math.max(0,16-(i-r));var a=window.setTimeout(function(){e(i+s)},s);r=i+s;return a};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=function(e){clearTimeout(e)};window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=(new Date).getTime();this.handleApplicationEvent();return 0},exit:function(){},handleApplicationEvent:function(e){var t=0;var i=this.parent.__windows;while(t<i.length){var s=i[t];++t;s.__backend.updateSize()}this.updateGameDevices();this.currentUpdate=(new Date).getTime();if(this.currentUpdate>=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;var a=0;var r=this.parent.__windows;while(a<r.length){var n=r[a];++a;this.parent.onUpdate.dispatch(this.deltaTime|0);if(n.context!=null){n.onRender.dispatch(n.context)}}if(this.framePeriod<0){this.nextUpdate=this.currentUpdate}else{this.nextUpdate=this.currentUpdate-this.currentUpdate%this.framePeriod+this.framePeriod}this.lastUpdate=this.currentUpdate}window.requestAnimationFrame($bind(this,this.handleApplicationEvent))},handleKeyEvent:function(e){if(this.parent.__window!=null){var t=this.convertKeyCode(e.keyCode!=null?e.keyCode:e.which);var i=(e.shiftKey?3:0)|(e.ctrlKey?192:0)|(e.altKey?768:0)|(e.metaKey?3072:0);if(e.type=="keydown"){this.parent.__window.onKeyDown.dispatch(t,i);if(this.parent.__window.onKeyDown.canceled&&e.cancelable){e.preventDefault()}}else{this.parent.__window.onKeyUp.dispatch(t,i);if(this.parent.__window.onKeyUp.canceled&&e.cancelable){e.preventDefault()}}}},handleSensorEvent:function(e){this.accelerometer.onUpdate.dispatch(e.accelerationIncludingGravity.x,e.accelerationIncludingGravity.y,e.accelerationIncludingGravity.z)},handleWindowEvent:function(e){if(this.parent.__window!=null){var t=e.type;switch(t){case"beforeunload":break;case"blur":this.parent.__window.onFocusOut.dispatch();this.parent.__window.onDeactivate.dispatch();break;case"focus":this.parent.__window.onFocusIn.dispatch();this.parent.__window.onActivate.dispatch();break;case"resize":this.parent.__window.__backend.handleResizeEvent(e);break}}},updateGameDevices:function(){var e=lime_ui_Joystick.__getDeviceData();if(e==null){return}var t;var i;var s;var a;var r;var n=0;var _=e.length;while(n<_){var o=n++;t=o;a=e[t];if(a==null){continue}if(!this.gameDeviceCache.h.hasOwnProperty(t)){r=new lime__$internal_backend_html5_GameDeviceData;r.id=t;r.connected=a.connected;var l=0;var h=a.buttons.length;while(l<h){var c=l++;r.buttons.push(a.buttons[c].value)}var u=0;var f=a.axes.length;while(u<f){var p=u++;r.axes.push(a.axes[p])}if(a.mapping=="standard"){r.isGamepad=true}this.gameDeviceCache.h[t]=r;if(a.connected){lime_ui_Joystick.__connect(t);if(r.isGamepad){lime_ui_Gamepad.__connect(t)}}}r=this.gameDeviceCache.h[t];s=lime_ui_Joystick.devices.h[t];i=lime_ui_Gamepad.devices.h[t];if(a.connected){var d;var g;var m=0;var v=a.buttons.length;while(m<v){var b=m++;g=a.buttons[b].value;if(g!=r.buttons[b]){if(b==6){s.onAxisMove.dispatch(a.axes.length,g);if(i!=null){i.onAxisMove.dispatch(4,g)}}else if(b==7){s.onAxisMove.dispatch(a.axes.length+1,g);if(i!=null){i.onAxisMove.dispatch(5,g)}}else{if(g>0){s.onButtonDown.dispatch(b)}else{s.onButtonUp.dispatch(b)}if(i!=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){i.onButtonDown.dispatch(d)}else{i.onButtonUp.dispatch(d)}}}r.buttons[b]=g}}var y=0;var x=a.axes.length;while(y<x){var w=y++;if(a.axes[w]!=r.axes[w]){s.onAxisMove.dispatch(w,a.axes[w]);if(i!=null){i.onAxisMove.dispatch(w,a.axes[w])}r.axes[w]=a.axes[w]}}}else if(r.connected){r.connected=false;lime_ui_Joystick.__disconnect(t);lime_ui_Gamepad.__disconnect(t)}}},__class__:lime__$internal_backend_html5_HTML5Application};var lime_app_Application=function(){this.onCreateWindow=new lime_app__$Event_$lime_$ui_$Window_$Void;this.onUpdate=new lime_app__$Event_$Int_$Void;lime_app_Module.call(this);if(lime_app_Application.current==null){lime_app_Application.current=this}this.meta=new haxe_ds_StringMap;this.modules=[];this.__windowByID=new haxe_ds_IntMap;this.__windows=[];this.__backend=new lime__$internal_backend_html5_HTML5Application(this);this.__registerLimeModule(this);this.__preloader=new lime_utils_Preloader;this.__preloader.onProgress.add($bind(this,this.onPreloadProgress));this.__preloader.onComplete.add($bind(this,this.onPreloadComplete))};$hxClasses["lime.app.Application"]=lime_app_Application;lime_app_Application.__name__=["lime","app","Application"];lime_app_Application.__super__=lime_app_Module;lime_app_Application.prototype=$extend(lime_app_Module.prototype,{meta:null,modules:null,onUpdate:null,onCreateWindow:null,__backend:null,__preloader:null,__window:null,__windowByID:null,__windows:null,addModule:function(e){e.__registerLimeModule(this);this.modules.push(e)},exec:function(){lime_app_Application.current=this;return this.__backend.exec()},onGamepadAxisMove:function(e,t,i){},onGamepadButtonDown:function(e,t){},onGamepadButtonUp:function(e,t){},onGamepadConnect:function(e){},onGamepadDisconnect:function(e){},onJoystickAxisMove:function(e,t,i){},onJoystickButtonDown:function(e,t){},onJoystickButtonUp:function(e,t){},onJoystickConnect:function(e){},onJoystickDisconnect:function(e){},onJoystickHatMove:function(e,t,i){},onJoystickTrackballMove:function(e,t,i,s){},onKeyDown:function(e,t){},onKeyUp:function(e,t){},onModuleExit:function(e){},onMouseDown:function(e,t,i){},onMouseMove:function(e,t){},onMouseMoveRelative:function(e,t){},onMouseUp:function(e,t,i){},onMouseWheel:function(e,t,i){},onPreloadComplete:function(){},onPreloadProgress:function(e,t){},onRenderContextLost:function(){},onRenderContextRestored:function(e){},onTextEdit:function(e,t,i){},onTextInput:function(e){},onTouchCancel:function(e){},onTouchEnd:function(e){},onTouchMove:function(e){},onTouchStart:function(e){},onWindowActivate:function(){},onWindowClose:function(){},onWindowCreate:function(){},onWindowDeactivate:function(){},onWindowDropFile:function(e){},onWindowEnter:function(){},onWindowExpose:function(){},onWindowFocusIn:function(){},onWindowFocusOut:function(){},onWindowFullscreen:function(){},onWindowLeave:function(){},onWindowMove:function(e,t){},onWindowMinimize:function(){},onWindowResize:function(e,t){},onWindowRestore:function(){},render:function(e){},update:function(e){},__registerLimeModule:function(e){e.onUpdate.add($bind(this,this.update));e.onExit.add($bind(this,this.onModuleExit),false,0);e.onExit.add($bind(this,this.__onModuleExit),false,0);var t=lime_ui_Gamepad.devices.iterator();while(t.hasNext()){var i=t.next();this.__onGamepadConnect(i)}lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));var s=lime_ui_Joystick.devices.iterator();while(s.hasNext()){var a=s.next();this.__onJoystickConnect(a)}lime_ui_Joystick.onConnect.add($bind(this,this.__onJoystickConnect));lime_ui_Touch.onCancel.add($bind(this,this.onTouchCancel));lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd))},__removeWindow:function(e){if(e!=null&&this.__windowByID.h.hasOwnProperty(e.id)){if(this.__window==e){this.__window=null}HxOverrides.remove(this.__windows,e);this.__windowByID.remove(e.id);e.close();if(this.__windows.length==0){lime_system_System.exit(0)}}},__onGamepadConnect:function(e){this.onGamepadConnect(e);var i=$bind(this,this.onGamepadAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onGamepadButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.onGamepadButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__onJoystickConnect:function(e){this.onJoystickConnect(e);var i=$bind(this,this.onJoystickAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.onJoystickButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.onJoystickButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.onJoystickDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u);var f=$bind(this,this.onJoystickHatMove);var p=e;var d=function(e,t){f(p,e,t)};e.onHatMove.add(d);var g=$bind(this,this.onJoystickTrackballMove);var m=e;var v=function(e,t,i){g(m,e,t,i)};e.onTrackballMove.add(v)},__onModuleExit:function(e){this.__backend.exit()},__onWindowClose:function(e){if(this.__window==e){this.onWindowClose()}this.__removeWindow(e)},__class__:lime_app_Application});var ApplicationMain=function(){};$hxClasses["ApplicationMain"]=ApplicationMain;ApplicationMain.__name__=["ApplicationMain"];ApplicationMain.main=function(){lime_system_System.__registerEntryPoint("flipbookMobile",ApplicationMain.create)};ApplicationMain.create=function(e){var t=new openfl_display_Application;ManifestResources.init(e);var i=t.meta;if(__map_reserved["build"]!=null){i.setReserved("build","266")}else{i.h["build"]="266"}var s=t.meta;if(__map_reserved["company"]!=null){s.setReserved("company","")}else{s.h["company"]=""}var a=t.meta;if(__map_reserved["file"]!=null){a.setReserved("file","flipbookMobile")}else{a.h["file"]="flipbookMobile"}var r=t.meta;if(__map_reserved["name"]!=null){r.setReserved("name","flipbookMobile")}else{r.h["name"]="flipbookMobile"}var n=t.meta;if(__map_reserved["packageName"]!=null){n.setReserved("packageName","flipbookMobile")}else{n.h["packageName"]="flipbookMobile"}var _=t.meta;if(__map_reserved["version"]!=null){_.setReserved("version","1.0.0")}else{_.h["version"]="1.0.0"}var o={allowHighDPI:true,alwaysOnTop:false,borderless:false,element:null,frameRate:60,height:0,hidden:false,maximized:false,minimized:false,parameters:{},resizable:true,title:"flipbookMobile",width:0,x:null,y:null};o.context={antialiasing:0,background:null,colorDepth:32,depth:true,hardware:true,stencil:true,type:null,vsync:false};if(t.__window==null){if(e!=null){var l=0;var h=Reflect.fields(e);while(l<h.length){var c=h[l];++l;if(Object.prototype.hasOwnProperty.call(o,c)){o[c]=Reflect.field(e,c)}else if(Object.prototype.hasOwnProperty.call(o.context,c)){o.context[c]=Reflect.field(e,c)}}}}t.createWindow(o);var u=new openfl_display_Preloader(new openfl_display_DefaultPreloader);t.__preloader.onProgress.add(function(e,t){u.update(e,t)});t.__preloader.onComplete.add(function(){u.start()});var f=js_Boot.__cast(t.__window,openfl_display_Window).stage;var p=function(){ApplicationMain.start(f)};u.onComplete.add(p);var d=0;var g=ManifestResources.preloadLibraries;while(d<g.length){var m=g[d];++d;t.__preloader.addLibrary(m)}var v=0;var b=ManifestResources.preloadLibraryNames;while(v<b.length){var y=b[v];++v;t.__preloader.addLibraryName(y)}t.__preloader.load();var x=t.exec()};ApplicationMain.start=function(t){try{var e=t.getChildAt(0);if(e==null||!js_Boot.__instanceof(e,openfl_display_DisplayObjectContainer)){e=new openfl_display_MovieClip;t.addChild(e)}new DocumentClass(e);t.dispatchEvent(new openfl_events_Event("resize",false,false));if(t.window.__fullscreen){t.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true))}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;t.__handleError(e)}};var openfl_events_IEventDispatcher=function(){};$hxClasses["openfl.events.IEventDispatcher"]=openfl_events_IEventDispatcher;openfl_events_IEventDispatcher.__name__=["openfl","events","IEventDispatcher"];var openfl_events_EventDispatcher=function(e){if(e!=null){this.__targetDispatcher=e}};$hxClasses["openfl.events.EventDispatcher"]=openfl_events_EventDispatcher;openfl_events_EventDispatcher.__name__=["openfl","events","EventDispatcher"];openfl_events_EventDispatcher.__interfaces__=[openfl_events_IEventDispatcher];openfl_events_EventDispatcher.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=0}if(i==null){i=false}if(t==null){return}if(this.__eventMap==null){this.__eventMap=new haxe_ds_StringMap;this.__iterators=new haxe_ds_StringMap}var r=this.__eventMap;if(!(__map_reserved[e]!=null?r.existsReserved(e):r.h.hasOwnProperty(e))){var n=[];n.push(new openfl_events__$EventDispatcher_Listener(t,i,s));var _=new openfl_events__$EventDispatcher_DispatchIterator(n);var o=this.__eventMap;if(__map_reserved[e]!=null){o.setReserved(e,n)}else{o.h[e]=n}var l=this.__iterators;var h=[_];if(__map_reserved[e]!=null){l.setReserved(e,h)}else{l.h[e]=h}}else{var c=this.__eventMap;var u=__map_reserved[e]!=null?c.getReserved(e):c.h[e];var f=0;var p=u.length;while(f<p){var d=f++;if(u[d].match(t,i)){return}}var g=this.__iterators;var m=__map_reserved[e]!=null?g.getReserved(e):g.h[e];var v=0;while(v<m.length){var b=m[v];++v;if(b.active){b.copy()}}this.__addListenerByPriority(u,new openfl_events__$EventDispatcher_Listener(t,i,s))}},dispatchEvent:function(e){if(this.__targetDispatcher!=null){e.target=this.__targetDispatcher}else{e.target=this}return this.__dispatchEvent(e)},hasEventListener:function(e){if(this.__eventMap==null){return false}var t=this.__eventMap;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},removeEventListener:function(e,t,i){if(i==null){i=false}if(this.__eventMap==null||t==null){return}var s=this.__eventMap;var a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];if(a==null){return}var r=this.__iterators;var n=__map_reserved[e]!=null?r.getReserved(e):r.h[e];var _=0;var o=a.length;while(_<o){var l=_++;if(a[l].match(t,i)){var h=0;while(h<n.length){var c=n[h];++h;c.remove(a[l],l)}a.splice(l,1);break}}if(a.length==0){this.__eventMap.remove(e);this.__iterators.remove(e)}var u=this.__eventMap;if(!new haxe_ds__$StringMap_StringMapIterator(u,u.arrayKeys()).hasNext()){this.__eventMap=null;this.__iterators=null}},__dispatchEvent:function(e){if(this.__eventMap==null||e==null){return true}var t=e.type;var i=this.__eventMap;var s=__map_reserved[t]!=null?i.getReserved(t):i.h[t];if(s==null){return true}if(e.target==null){if(this.__targetDispatcher!=null){e.target=this.__targetDispatcher}else{e.target=this}}e.currentTarget=this;var a=e.eventPhase==1;var r=this.__iterators;var n=__map_reserved[t]!=null?r.getReserved(t):r.h[t];var _=n[0];if(_.active){_=new openfl_events__$EventDispatcher_DispatchIterator(s);n.push(_)}_.start();var o=_;while(o.hasNext()){var l=o.next();if(l==null){continue}if(l.useCapture==a){l.callback(e);if(e.__isCanceledNow){break}}}_.stop();if(_!=n[0]){HxOverrides.remove(n,_)}else{_.reset(s)}return!e.isDefaultPrevented()},__addListenerByPriority:function(e,t){var i=e.length;var s=i;var a=0;var r=i;while(a<r){var n=a++;if(e[n].priority<t.priority){s=n;break}}e.splice(s,0,t)},__class__:openfl_events_EventDispatcher};var openfl_display_IBitmapDrawable=function(){};$hxClasses["openfl.display.IBitmapDrawable"]=openfl_display_IBitmapDrawable;openfl_display_IBitmapDrawable.__name__=["openfl","display","IBitmapDrawable"];openfl_display_IBitmapDrawable.prototype={__renderTransform:null,__worldAlpha:null,__worldColorTransform:null,__getBounds:null,__renderCanvas:null,__renderDOM:null,__renderGL:null,__update:null,__mask:null,__scrollRect:null,__class__:openfl_display_IBitmapDrawable};var openfl__$Vector_Vector_$Impl_$={};$hxClasses["openfl._Vector.Vector_Impl_"]=openfl__$Vector_Vector_$Impl_$;openfl__$Vector_Vector_$Impl_$.__name__=["openfl","_Vector","Vector_Impl_"];openfl__$Vector_Vector_$Impl_$.toIntVector=function(e,t,i,s){return new openfl__$Vector_IntVector(t,i,s)};openfl__$Vector_Vector_$Impl_$.toFloatVector=function(e,t,i,s){return new openfl__$Vector_FloatVector(t,i,s,true)};openfl__$Vector_Vector_$Impl_$.toObjectVector=function(e,t,i,s){return new openfl__$Vector_ObjectVector(t,i,s,true)};var lime_utils_ObjectPool=function(e,t,i){this.__pool=new haxe_ds_ObjectMap;this.activeObjects=0;this.inactiveObjects=0;this.__inactiveObject0=null;this.__inactiveObject1=null;this.__inactiveObjectList=new List;if(e!=null){this.create=e}if(t!=null){this.clean=t}if(i!=null){this.set_size(i)}};$hxClasses["lime.utils.ObjectPool"]=lime_utils_ObjectPool;lime_utils_ObjectPool.__name__=["lime","utils","ObjectPool"];lime_utils_ObjectPool.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,__inactiveObjectList:null,__pool:null,__size:null,clean:function(e){},create:function(){return null},get:function(){var e=null;if(this.inactiveObjects>0){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.activeObjects<this.__size){e=this.create();if(e!=null){this.__pool.set(e,true);this.activeObjects++}}return e},release:function(e){this.activeObjects--;if(this.__size==null||this.activeObjects+this.inactiveObjects<this.__size){this.clean(e);if(this.__inactiveObject0==null){this.__inactiveObject0=e}else if(this.__inactiveObject1==null){this.__inactiveObject1=e}else{this.__inactiveObjectList.add(e)}this.inactiveObjects++}else{this.__pool.remove(e)}},__removeInactive:function(e){if(e<=0||this.inactiveObjects==0){return}if(this.__inactiveObject0!=null){this.__pool.remove(this.__inactiveObject0);this.__inactiveObject0=null;this.inactiveObjects--;--e}if(e==0||this.inactiveObjects==0){return}if(this.__inactiveObject1!=null){this.__pool.remove(this.__inactiveObject1);this.__inactiveObject1=null;this.inactiveObjects--;--e}if(e==0||this.inactiveObjects==0){return}var t=this.__inactiveObjectList.h;while(t!=null){var i=t.item;t=t.next;var s=i;this.__pool.remove(s);this.__inactiveObjectList.remove(s);this.inactiveObjects--;--e;if(e==0||this.inactiveObjects==0){return}}},set_size:function(e){if(e==null){this.__size=null}else{var t=this.inactiveObjects+this.activeObjects;this.__size=e;if(t>e){this.__removeInactive(t-e)}else if(e>t){var i;var s=0;var a=e-t;while(s<a){var r=s++;i=this.create();if(i!=null){this.__pool.set(i,false);this.__inactiveObjectList.add(i);this.inactiveObjects++}else{break}}}}return e},__class__:lime_utils_ObjectPool,__properties__:{set_size:"set_size"}};var haxe_IMap=function(){};$hxClasses["haxe.IMap"]=haxe_IMap;haxe_IMap.__name__=["haxe","IMap"];haxe_IMap.prototype={get:null,set:null,exists:null,remove:null,__class__:haxe_IMap};var haxe_ds_ObjectMap=function(){this.h={__keys__:{}}};$hxClasses["haxe.ds.ObjectMap"]=haxe_ds_ObjectMap;haxe_ds_ObjectMap.__name__=["haxe","ds","ObjectMap"];haxe_ds_ObjectMap.__interfaces__=[haxe_IMap];haxe_ds_ObjectMap.assignId=function(e){return e.__id__=++haxe_ds_ObjectMap.count};haxe_ds_ObjectMap.getId=function(e){return e.__id__};haxe_ds_ObjectMap.prototype={h:null,set:function(e,t){var i=e.__id__||(e.__id__=++haxe_ds_ObjectMap.count);this.h[i]=t;this.h.__keys__[i]=e},get:function(e){return this.h[e.__id__]},exists:function(e){return this.h.__keys__[e.__id__]!=null},remove:function(e){var t=e.__id__;if(this.h.__keys__[t]==null){return false}delete this.h[t];delete this.h.__keys__[t];return true},keys:function(){var e=[];for(var t in this.h.__keys__){if(this.h.hasOwnProperty(t)){e.push(this.h.__keys__[t])}}return HxOverrides.iter(e)},__class__:haxe_ds_ObjectMap};var List=function(){this.length=0};$hxClasses["List"]=List;List.__name__=["List"];List.prototype={h:null,q:null,length:null,add:function(e){var t=new _$List_ListNode(e,null);if(this.h==null){this.h=t}else{this.q.next=t}this.q=t;this.length++},push:function(e){var t=new _$List_ListNode(e,this.h);this.h=t;if(this.q==null){this.q=t}this.length++},pop:function(){if(this.h==null){return null}var e=this.h.item;this.h=this.h.next;if(this.h==null){this.q=null}this.length--;return e},clear:function(){this.h=null;this.q=null;this.length=0},remove:function(e){var t=null;var i=this.h;while(i!=null){if(i.item==e){if(t==null){this.h=i.next}else{t.next=i.next}if(this.q==i){this.q=t}this.length--;return true}t=i;i=i.next}return false},iterator:function(){return new _$List_ListIterator(this.h)},__class__:List};var openfl_display_DisplayObject=function(){openfl_events_EventDispatcher.call(this);this.__alpha=1;this.__blendMode=10;this.__cacheAsBitmap=false;this.__transform=new openfl_geom_Matrix;this.__visible=true;this.__rotation=0;this.__rotationSine=0;this.__rotationCosine=1;this.__scaleX=1;this.__scaleY=1;this.__worldAlpha=1;this.__worldBlendMode=10;this.__worldTransform=new openfl_geom_Matrix;this.__worldColorTransform=new openfl_geom_ColorTransform;this.__renderTransform=new openfl_geom_Matrix;this.__worldVisible=true;this.set_name("instance"+ ++openfl_display_DisplayObject.__instanceCount);if(openfl_display_DisplayObject.__initStage!=null){this.stage=openfl_display_DisplayObject.__initStage;openfl_display_DisplayObject.__initStage=null;this.stage.addChild(this)}};$hxClasses["openfl.display.DisplayObject"]=openfl_display_DisplayObject;openfl_display_DisplayObject.__name__=["openfl","display","DisplayObject"];openfl_display_DisplayObject.__interfaces__=[openfl_display_IBitmapDrawable];openfl_display_DisplayObject.__calculateAbsoluteTransform=function(e,t,i){i.a=e.a*t.a+e.b*t.c;i.b=e.a*t.b+e.b*t.d;i.c=e.c*t.a+e.d*t.c;i.d=e.c*t.b+e.d*t.d;i.tx=e.tx*t.a+e.ty*t.c+t.tx;i.ty=e.tx*t.b+e.ty*t.d+t.ty};openfl_display_DisplayObject.__super__=openfl_events_EventDispatcher;openfl_display_DisplayObject.prototype=$extend(openfl_events_EventDispatcher.prototype,{opaqueBackground:null,parent:null,stage:null,__alpha:null,__blendMode:null,__cacheAsBitmap:null,__cacheAsBitmapMatrix:null,__cacheBitmap:null,__cacheBitmapBackground:null,__cacheBitmapColorTransform:null,__cacheBitmapData:null,__cacheBitmapData2:null,__cacheBitmapData3:null,__cacheBitmapMatrix:null,__cacheBitmapRenderer:null,__cairo:null,__children:null,__customRenderClear:null,__customRenderEvent:null,__filters:null,__graphics:null,__isCacheBitmapRender:null,__isMask:null,__loaderInfo:null,__mask:null,__maskTarget:null,__name:null,__objectTransform:null,__renderable:null,__renderDirty:null,__renderParent:null,__renderTransform:null,__renderTransformCache:null,__renderTransformChanged:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scale9Grid:null,__scaleX:null,__scaleY:null,__scrollRect:null,__shader:null,__tempPoint:null,__transform:null,__transformDirty:null,__visible:null,__worldAlpha:null,__worldAlphaChanged:null,__worldBlendMode:null,__worldClip:null,__worldClipChanged:null,__worldColorTransform:null,__worldShader:null,__worldScale9Grid:null,__worldTransform:null,__worldVisible:null,__worldVisibleChanged:null,__worldTransformInvalid:null,__worldZ:null,__canvas:null,__context:null,__style:null,addEventListener:function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=0}if(i==null){i=false}switch(e){case"activate":case"deactivate":case"enterFrame":case"exitFrame":case"frameConstructed":case"render":if(!openfl_display_DisplayObject.__broadcastEvents.exists(e)){openfl_display_DisplayObject.__broadcastEvents.set(e,[])}var r=openfl_display_DisplayObject.__broadcastEvents.get(e);if(r.indexOf(this)==-1){r.push(this)}break;case"clearDOM":case"renderCairo":case"renderCanvas":case"renderDOM":case"renderOpenGL":if(this.__customRenderEvent==null){this.__customRenderEvent=new openfl_events_RenderEvent(null);this.__customRenderEvent.objectColorTransform=new openfl_geom_ColorTransform;this.__customRenderEvent.objectMatrix=new openfl_geom_Matrix;this.__customRenderClear=true}break;default:}openfl_events_EventDispatcher.prototype.addEventListener.call(this,e,t,i,s,a)},dispatchEvent:function(e){if(js_Boot.__instanceof(e,openfl_events_MouseEvent)){var t=e;var i=this.__getRenderTransform();t.stageX=t.localX*i.a+t.localY*i.c+i.tx;var s=this.__getRenderTransform();t.stageY=t.localX*s.b+t.localY*s.d+s.ty}else if(js_Boot.__instanceof(e,openfl_events_TouchEvent)){var a=e;var r=this.__getRenderTransform();a.stageX=a.localX*r.a+a.localY*r.c+r.tx;var n=this.__getRenderTransform();a.stageY=a.localX*n.b+a.localY*n.d+n.ty}e.target=this;return this.__dispatchWithCapture(e)},getBounds:function(e){var t=openfl_geom_Matrix.__pool.get();if(e!=null&&e!=this){t.copyFrom(this.__getWorldTransform());var i=openfl_geom_Matrix.__pool.get();i.copyFrom(e.__getWorldTransform());i.invert();t.concat(i);openfl_geom_Matrix.__pool.release(i)}else{t.identity()}var s=new openfl_geom_Rectangle;this.__getBounds(s,t);openfl_geom_Matrix.__pool.release(t);return s},globalToLocal:function(e){return this.__globalToLocal(e,new openfl_geom_Point)},hitTestPoint:function(e,t,i){if(i==null){i=false}if(this.stage!=null){return this.__hitTest(e,t,i,null,false,this)}else{return false}},localToGlobal:function(e){return this.__getRenderTransform().transformPoint(e)},removeEventListener:function(e,t,i){if(i==null){i=false}openfl_events_EventDispatcher.prototype.removeEventListener.call(this,e,t,i);switch(e){case"activate":case"deactivate":case"enterFrame":case"exitFrame":case"frameConstructed":case"render":if(!this.hasEventListener(e)){if(openfl_display_DisplayObject.__broadcastEvents.exists(e)){HxOverrides.remove(openfl_display_DisplayObject.__broadcastEvents.get(e),this)}}break;case"clearDOM":case"renderCairo":case"renderCanvas":case"renderDOM":case"renderOpenGL":if(!this.hasEventListener("clearDOM")&&!this.hasEventListener("renderCairo")&&!this.hasEventListener("renderCanvas")&&!this.hasEventListener("renderDOM")&&!this.hasEventListener("renderOpenGL")){this.__customRenderEvent=null}break;default:}},__cleanup:function(){this.__cairo=null;this.__canvas=null;this.__context=null;if(this.__graphics!=null){this.__graphics.__cleanup()}if(this.__cacheBitmap!=null){this.__cacheBitmap.__cleanup();this.__cacheBitmap=null}if(this.__cacheBitmapData!=null){this.__cacheBitmapData.dispose();this.__cacheBitmapData=null}},__dispatch:function(e){if(this.__eventMap!=null&&this.hasEventListener(e.type)){var t=openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,e);if(e.__isCanceled){return true}return t}return true},__dispatchChildren:function(e){},__dispatchEvent:function(e){var t=e.bubbles?this.parent:null;var i=openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,e);if(e.__isCanceled){return true}if(t!=null&&t!=this){e.eventPhase=3;if(e.target==null){e.target=this}t.__dispatchEvent(e)}return i},__dispatchWithCapture:function(e){if(e.target==null){e.target=this}if(this.parent!=null){e.eventPhase=1;if(this.parent==this.stage){this.parent.__dispatch(e)}else{var t=openfl_display_DisplayObject.__tempStack.get();var i=this.parent;var s=0;while(i!=null){t.set(s,i);i=i.parent;++s}var a=0;var r=s;while(a<r){var n=a++;t.get(s-n-1).__dispatch(e)}openfl_display_DisplayObject.__tempStack.release(t)}}e.eventPhase=2;return this.__dispatchEvent(e)},__enterFrame:function(e){},__getBounds:function(e,t){if(this.__graphics!=null){this.__graphics.__getBounds(e,t)}},__getCursor:function(){return null},__getFilterBounds:function(e,t){this.__getRenderBounds(e,t);if(this.__filters!=null){var i=openfl_geom_Rectangle.__pool.get();var s=0;var a=this.__filters;while(s<a.length){var r=a[s];++s;i.__expand(-r.__leftExtension,-r.__topExtension,r.__leftExtension+r.__rightExtension,r.__topExtension+r.__bottomExtension)}e.width+=i.width;e.height+=i.height;e.x+=i.x;e.y+=i.y;openfl_geom_Rectangle.__pool.release(i)}},__getInteractive:function(e){return false},__getLocalBounds:function(e){this.__getBounds(e,this.__transform);e.x-=this.__transform.tx;e.y-=this.__transform.ty},__getRenderBounds:function(e,t){if(this.__scrollRect==null){this.__getBounds(e,t)}else{var i=openfl_geom_Rectangle.__pool.get();i.copyFrom(this.__scrollRect);i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)}},__getRenderTransform:function(){this.__getWorldTransform();return this.__renderTransform},__getWorldTransform:function(){var e=this.__transformDirty||this.__worldTransformInvalid;if(e){var t=[];var i=this;if(this.parent==null){this.__update(true,false)}else{while(i!=this.stage){t.push(i);i=i.parent;if(i==null){break}}}var s=t.length;while(--s>=0){i=t[s];i.__update(true,false)}}return this.__worldTransform},__globalToLocal:function(e,t){this.__getRenderTransform();if(e==t){var i=this.__renderTransform;var s=i.a*i.d-i.b*i.c;if(s==0){e.x=-i.tx;e.y=-i.ty}else{var a=1/s*(i.c*(i.ty-e.y)+i.d*(e.x-i.tx));e.y=1/s*(i.a*(e.y-i.ty)+i.b*(i.tx-e.x));e.x=a}}else{var r=this.__renderTransform;var n=r.a*r.d-r.b*r.c;t.x=n==0?-r.tx:1/n*(r.c*(r.ty-e.y)+r.d*(e.x-r.tx));var _=this.__renderTransform;var o=_.a*_.d-_.b*_.c;t.y=o==0?-_.ty:1/o*(_.a*(e.y-_.ty)+_.b*(_.tx-e.x))}return t},__hitTest:function(e,t,i,s,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,i,this.__getRenderTransform())){if(s!=null&&!a){s.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 i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.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 n=e.context;e.setTransform(this.__renderTransform,n);var _=this.opaqueBackground;n.fillStyle="rgb("+(_>>>16&255)+","+(_>>>8&255)+","+(_&255)+")";n.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.__width;var c=l.__height;var u=l.__canvas;if(u!=null&&l.__visible&&h>=1&&c>=1){var f=l.__worldTransform;var p=e.context;var d=this.__scrollRect;var g=this.__worldScale9Grid;if(d==null||d.width>0&&d.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);p.globalAlpha=o;if(g!=null&&f.b==0&&f.c==0){p.setTransform(1,0,0,1,f.tx,f.ty);var m=l.__bounds;var v=l.__renderTransform.a;var b=l.__renderTransform.d;var y=f.a;var x=f.d;var w=Math.round(g.x*v);var k=Math.round(g.y*b);var P=Math.round((m.get_right()-g.get_right())*v);var C=Math.round((m.get_bottom()-g.get_bottom())*b);var T=Math.round(g.width*v);var M=Math.round(g.height*b);var S=Math.round(g.x*y);var $=Math.round(g.y*x);var E=Math.round((m.get_right()-g.get_right())*y);var B=Math.round((m.get_bottom()-g.get_bottom())*x);var L=Math.round(h*y)-S-E;var R=Math.round(c*x)-$-B;e.applySmoothing(p,false);if(T!=0&&M!=0){p.drawImage(u,0,0,w,k,0,0,S,$);p.drawImage(u,w,0,T,k,S,0,L,$);p.drawImage(u,w+T,0,P,k,S+L,0,E,$);p.drawImage(u,0,k,w,M,0,$,S,R);p.drawImage(u,w,k,T,M,S,$,L,R);p.drawImage(u,w+T,k,P,M,S+L,$,E,R);p.drawImage(u,0,k+M,w,C,0,$+R,S,B);p.drawImage(u,w,k+M,T,C,S,$+R,L,B);p.drawImage(u,w+T,k+M,P,C,S+L,$+R,E,B)}else if(T==0&&M!=0){var A=S+L+E;p.drawImage(u,0,0,h,k,0,0,A,$);p.drawImage(u,0,k,h,M,0,$,A,R);p.drawImage(u,0,k+M,h,C,0,$+R,A,B)}else if(M==0&&T!=0){var I=$+R+B;p.drawImage(u,0,0,w,c,0,0,S,I);p.drawImage(u,w,0,T,c,S,0,L,I);p.drawImage(u,w+T,0,P,c,S+L,0,E,I)}}else{e.setTransform(f,p);if(e.__isDOM){var D=1/e.pixelRatio;p.scale(D,D)}p.drawImage(u,0,0,h,c)}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 i=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var s=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&s!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(s,e.__canvasRenderer);if(s.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=s.__canvas){if(s.__canvas!=null){if(this.__canvas!=s.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=s.__canvas;this.__context=s.__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=s.__worldTransform;if(s.__transformDirty){s.__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 i=e;i.setShader(this.__worldShader);i.__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 s=e;s.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 i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}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 i=this.__renderParent!=null?this.__renderParent:this.parent;if(this.__isMask&&i==null){i=this.__maskTarget}this.__renderable=this.__visible&&this.__scaleX!=0&&this.__scaleY!=0&&!this.__isMask&&(i==null||!i.__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(i!=null){if(openfl_display_DisplayObject.__supportDOM){var s=i.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=s;this.__worldVisible=s;var a=this.get_alpha()*i.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=a;this.__worldAlpha=a}else{this.__worldAlpha=this.get_alpha()*i.__worldAlpha}if(this.__objectTransform!=null){this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform());this.__worldColorTransform.__combine(i.__worldColorTransform)}else{this.__worldColorTransform.__copyFrom(i.__worldColorTransform)}if(this.__blendMode==null||this.__blendMode==10){this.__worldBlendMode=i.__worldBlendMode}else{this.__worldBlendMode=this.__blendMode}if(this.__shader==null){this.__worldShader=i.__shader}else{this.__worldShader=this.__shader}if(this.__scale9Grid==null){this.__worldScale9Grid=i.__scale9Grid}else{this.__worldScale9Grid=this.__scale9Grid}}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()}this.__worldBlendMode=this.__blendMode;this.__worldShader=this.__shader;this.__worldScale9Grid=this.__scale9Grid}}if(t&&this.get_mask()!=null){this.get_mask().__update(e,true)}},__updateCacheBitmap:function(e,t){if(this.__isCacheBitmapRender){return false}var i=openfl_geom_ColorTransform.__pool.get();i.__copyFrom(this.__worldColorTransform);if(e.__worldColorTransform!=null){i.__combine(e.__worldColorTransform)}var s=false;if(this.get_cacheAsBitmap()||e.__type!="opengl"&&!i.__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 n=r||this.__graphics!=null&&this.__graphics.__softwareDirty||!this.__cacheBitmapColorTransform.__equals(i,true);var _=r||this.__graphics!=null&&this.__graphics.__hardwareDirty;var o=e.__type;if(n||_){if(o=="opengl"){if(this.__shouldCacheHardware(null)==false){o="canvas"}}if(n&&(o=="canvas"||o=="cairo")){r=true}if(_&&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(c<u.length){var f=u[c];++c;if(f.__renderDirty){r=true;break}}}if(this.__cacheBitmapMatrix==null){this.__cacheBitmapMatrix=new openfl_geom_Matrix}var p=this.__cacheAsBitmapMatrix!=null?this.__cacheAsBitmapMatrix:this.__renderTransform;if(!r&&(p.a!=this.__cacheBitmapMatrix.a||p.b!=this.__cacheBitmapMatrix.b||p.c!=this.__cacheBitmapMatrix.c||p.d!=this.__cacheBitmapMatrix.d)){r=true}if(!r&&e.__type!="opengl"&&this.__cacheBitmapData!=null&&this.__cacheBitmapData.image!=null&&this.__cacheBitmapData.image.version<this.__cacheBitmapData.__textureVersion){r=true}this.__cacheBitmapMatrix.copyFrom(p);this.__cacheBitmapMatrix.tx=0;this.__cacheBitmapMatrix.ty=0;var d=0;var g=0;var m=0;var v=0;var b=0;var y=0;if(l||r){a=openfl_geom_Rectangle.__pool.get();this.__getFilterBounds(a,this.__cacheBitmapMatrix);m=Math.ceil(a.width);v=Math.ceil(a.height);if(a.x>0){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 w=this.opaqueBackground!=null?-16777216|this.opaqueBackground:0;var k=x?0:w;var P=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,P)}if(x){a.setTo(0,0,m,v);this.__cacheBitmapData.__fillRect(a,w,P)}}else{openfl_geom_ColorTransform.__pool.release(i);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.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(i);this.__cacheBitmapRenderer.__worldColorTransform.__invert();this.__isCacheBitmapRender=true;if(this.__cacheBitmapRenderer.__type=="opengl"){var T=e;var M=this.__cacheBitmapRenderer;var S=M.__context3D;var $=S.__state.renderToTexture;var E=S.__state.renderToTextureDepthStencil;var B=S.__state.renderToTextureAntiAlias;var L=S.__state.renderToTextureSurfaceSelector;var R=T.__blendMode;T.__suspendClipAndMask();M.__copyShader(T);this.__cacheBitmapData.__setUVRect(S,0,0,m,v);M.__setRenderTarget(this.__cacheBitmapData);if(this.__cacheBitmapData.image!=null){this.__cacheBitmapData.__textureVersion=this.__cacheBitmapData.image.version+1}this.__cacheBitmapData.__drawGL(this,M);if(h){var A=true;var I=false;var D=0;var F=this.__filters;while(D<F.length){var O=F[D];++D;if(O.__preserveObject){I=true}}var j=this.__cacheBitmapData;var G=null;var H=null;if(this.__cacheBitmapData2==null||d>this.__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(S,0,0,m,v);G=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(S,0,0,m,v);H=this.__cacheBitmapData3}M.__setBlendMode(10);M.__worldAlpha=1;M.__worldTransform.identity();M.__worldColorTransform.__identity();var U;var N;var W=0;var V=this.__filters;while(W<V.length){var z=V[W];++W;if(z.__preserveObject){M.__setRenderTarget(H);M.__renderFilterPass(j,M.__defaultDisplayShader,z.__smooth)}var X=0;var Y=z.__numShaderPasses;while(X<Y){var J=X++;U=z.__initShader(M,J);M.__setBlendMode(z.__shaderBlendMode);M.__setRenderTarget(G);M.__renderFilterPass(j,U,z.__smooth);N=j;j=G;G=N}if(z.__preserveObject){M.__setBlendMode(10);M.__setRenderTarget(j);M.__renderFilterPass(H,M.__defaultDisplayShader,z.__smooth,false)}z.__renderDirty=false}this.__cacheBitmap.__bitmapData=j}T.__blendMode=10;T.__setBlendMode(R);T.__copyShader(M);if($!=null){S.setRenderToTexture($,E,B,L)}else{S.setRenderToBackBuffer()}T.__resumeClipAndMask(M);T.setViewport();this.__cacheBitmapColorTransform.__copyFrom(i)}else{this.__cacheBitmapData.__drawCanvas(this,this.__cacheBitmapRenderer);if(h){var K=false;var q=false;var Z=0;var Q=this.__filters;while(Z<Q.length){var ee=Q[Z];++Z;if(ee.__needSecondBitmapData){K=true}if(ee.__preserveObject){q=true}}var te=this.__cacheBitmapData;var ie=null;var se=null;if(K){if(this.__cacheBitmapData2==null||this.__cacheBitmapData2.image==null||d>this.__cacheBitmapData2.width||g>this.__cacheBitmapData2.height){this.__cacheBitmapData2=new openfl_display_BitmapData(d,g,true,0)}else{this.__cacheBitmapData2.fillRect(this.__cacheBitmapData2.rect,0)}ie=this.__cacheBitmapData2}else{ie=te}if(q){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)}se=this.__cacheBitmapData3}if(this.__tempPoint==null){this.__tempPoint=new openfl_geom_Point}var ae=this.__tempPoint;var re;var ne;var _e=0;var oe=this.__filters;while(_e<oe.length){var le=oe[_e];++_e;if(le.__preserveObject){se.copyPixels(te,te.rect,ae)}ne=le.__applyFilter(ie,te,te.rect,ae);if(le.__preserveObject){ne.draw(se,null,this.__objectTransform!=null?this.__objectTransform.get_colorTransform():null)}le.__renderDirty=false;if(K&&ne==ie){re=te;te=ie;ie=re}}if(this.__cacheBitmapData!=te){re=this.__cacheBitmapData;this.__cacheBitmapData=te;this.__cacheBitmapData2=re;this.__cacheBitmap.__bitmapData=this.__cacheBitmapData;this.__cacheBitmapRenderer=null}this.__cacheBitmap.__imageVersion=this.__cacheBitmapData.__textureVersion}this.__cacheBitmapColorTransform.__copyFrom(i);if(!this.__cacheBitmapColorTransform.__isDefault(true)){this.__cacheBitmapColorTransform.alphaMultiplier=1;this.__cacheBitmapData.colorTransform(this.__cacheBitmapData.rect,this.__cacheBitmapColorTransform)}}this.__isCacheBitmapRender=false}if(l||r){openfl_geom_Rectangle.__pool.release(a)}s=l}else if(this.__cacheBitmap!=null){if(e.__type=="dom"){this.__cacheBitmap.__renderDOMClear(e)}this.__cacheBitmap=null;this.__cacheBitmapData=null;this.__cacheBitmapData2=null;this.__cacheBitmapData3=null;this.__cacheBitmapColorTransform=null;this.__cacheBitmapRenderer=null;s=true}openfl_geom_ColorTransform.__pool.release(i);return s},__updateTransforms:function(e){var t=e!=null;var i=t?e:this.__transform;if(this.__worldTransform==null){this.__worldTransform=new openfl_geom_Matrix}if(this.__renderTransform==null){this.__renderTransform=new openfl_geom_Matrix}var s=this.__renderParent!=null?this.__renderParent:this.parent;if(!t&&this.parent!=null){var a=this.parent.__worldTransform;var r=this.__worldTransform;r.a=i.a*a.a+i.b*a.c;r.b=i.a*a.b+i.b*a.d;r.c=i.c*a.a+i.d*a.c;r.d=i.c*a.b+i.d*a.d;r.tx=i.tx*a.a+i.ty*a.c+a.tx;r.ty=i.tx*a.b+i.ty*a.d+a.ty}else{this.__worldTransform.copyFrom(i)}if(!t&&s!=null){var n=s.__renderTransform;var _=this.__renderTransform;_.a=i.a*n.a+i.b*n.c;_.b=i.a*n.b+i.b*n.d;_.c=i.c*n.a+i.d*n.c;_.d=i.c*n.b+i.d*n.d;_.tx=i.tx*n.a+i.ty*n.c+n.tx;_.ty=i.tx*n.b+i.ty*n.d+n.ty}else{this.__renderTransform.copyFrom(i)}if(this.__scrollRect!=null){var o=this.__renderTransform;var l=-this.__scrollRect.x;var h=-this.__scrollRect.y;o.tx=l*o.a+h*o.c+o.tx;o.ty=l*o.b+h*o.d+o.ty}},get_alpha:function(){return this.__alpha},set_alpha:function(e){if(e>1){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 i=openfl_geom_Matrix.__pool.get();i.identity();this.__getBounds(t,i);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(i);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 i=this.__getRenderTransform();var s=i.a*i.d-i.b*i.c;if(s==0){return-i.tx}else{return 1/s*(i.c*(i.ty-t)+i.d*(e-i.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 i=this.__getRenderTransform();var s=i.a*i.d-i.b*i.c;if(s==0){return-i.ty}else{return 1/s*(i.a*(t-i.ty)+i.b*(i.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},set_scale9Grid:function(e){if(e==null&&this.__scale9Grid==null){return e}if(e!=null&&this.__scale9Grid!=null&&this.__scale9Grid.equals(e)){return e}if(e!=null){if(this.__scale9Grid==null){this.__scale9Grid=new openfl_geom_Rectangle}this.__scale9Grid.copyFrom(e)}else{this.__scale9Grid=null}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}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 i=this.__rotationSine*e;if(this.__transform.a!=t||this.__transform.b!=i){this.__setTransformDirty()}this.__transform.a=t;this.__transform.b=i}}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 i=this.__rotationCosine*e;if(this.__transform.d!=i||this.__transform.c!=t){this.__setTransformDirty()}this.__transform.c=t;this.__transform.d=i}}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 i=openfl_geom_Matrix.__pool.get();i.identity();this.__getBounds(t,i);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(i);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_scale9Grid:"set_scale9Grid",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,i,s,a,r){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled){return false}return openfl_display_DisplayObject.prototype.__hitTest.call(this,e,t,i,s,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 i=new openfl_errors_TypeError("Error #2007: Parameter child must be non-null.");i.errorID=2007;throw new js__$Boot_HaxeError(i)}else if(e.stage==e){var s=new openfl_errors_ArgumentError("Error #3783: A Stage object cannot be added as the child of another object.");s.errorID=3783;throw new js__$Boot_HaxeError(s)}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=null;r=new openfl_events_Event("added",true);r.target=e;e.__dispatchWithCapture(r);if(a){r=new openfl_events_Event("addedToStage",false,false);e.__dispatchWithCapture(r);e.__dispatchChildren(r)}}return e},getChildAt:function(e){if(e>=0&&e<this.__children.length){return this.__children[e]}return null},removeChild:function(e){if(e!=null&&e.parent==this){e.__setTransformDirty();if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}var t=new openfl_events_Event("removed",true);e.__dispatchWithCapture(t);if(this.stage!=null){if(e.stage!=null&&this.stage.get_focus()==e){this.stage.set_focus(null)}var i=new openfl_events_Event("removedFromStage",false,false);e.__dispatchWithCapture(i);e.__dispatchChildren(i);e.__setStageReference(null)}e.parent=null;HxOverrides.remove(this.__children,e);this.__removedChildren.push(e);e.__setTransformDirty()}return e},removeChildAt:function(e){if(e>=0&&e<this.__children.length){return this.removeChild(this.__children[e])}return null},removeChildren:function(e,t){if(t==null){t=2147483647}if(e==null){e=0}if(t==2147483647){t=this.__children.length-1;if(t<0){return}}if(e>this.__children.length-1){return}else if(t<e||e<0||t>this.__children.length){throw new js__$Boot_HaxeError(new openfl_errors_RangeError("The supplied index is out of bounds."))}var i=t-e;while(i>=0){this.removeChildAt(e);--i}},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<t.length){var i=t[e];++e;i.__cleanup()}var s=0;var a=this.__removedChildren;while(s<a.get_length()){var r=a.get(s);++s;if(r.stage==null){r.__cleanup()}}this.__removedChildren.set_length(0)},__dispatchChildren:function(e){if(this.__children!=null){var t=0;var i=this.__children;while(t<i.length){var s=i[t];++t;e.target=s;if(!s.__dispatchWithCapture(e)){break}s.__dispatchChildren(e)}}},__enterFrame:function(e){var t=0;var i=this.__children;while(t<i.length){var s=i[t];++t;s.__enterFrame(e)}},__getBounds:function(e,t){openfl_display_InteractiveObject.prototype.__getBounds.call(this,e,t);if(this.__children.length==0){return}var i=openfl_geom_Matrix.__pool.get();var s=0;var a=this.__children;while(s<a.length){var r=a[s];++s;if(r.__scaleX==0||r.__scaleY==0){continue}var n=r.__transform;i.a=n.a*t.a+n.b*t.c;i.b=n.a*t.b+n.b*t.d;i.c=n.c*t.a+n.d*t.c;i.d=n.c*t.b+n.d*t.d;i.tx=n.tx*t.a+n.ty*t.c+t.tx;i.ty=n.tx*t.b+n.ty*t.d+t.ty;r.__getBounds(e,i)}openfl_geom_Matrix.__pool.release(i)},__getFilterBounds:function(e,t){openfl_display_InteractiveObject.prototype.__getFilterBounds.call(this,e,t);if(this.__scrollRect!=null){return}if(this.__children.length==0){return}var i=openfl_geom_Matrix.__pool.get();var s=0;var a=this.__children;while(s<a.length){var r=a[s];++s;if(r.__scaleX==0||r.__scaleY==0||r.__isMask){continue}var n=r.__transform;i.a=n.a*t.a+n.b*t.c;i.b=n.a*t.b+n.b*t.d;i.c=n.c*t.a+n.d*t.c;i.d=n.c*t.b+n.d*t.d;i.tx=n.tx*t.a+n.ty*t.c+t.tx;i.ty=n.tx*t.b+n.ty*t.d+t.ty;r.__getFilterBounds(e,i)}openfl_geom_Matrix.__pool.release(i)},__getRenderBounds:function(e,t){if(this.__scrollRect!=null){openfl_display_InteractiveObject.prototype.__getRenderBounds.call(this,e,t);return}else{openfl_display_InteractiveObject.prototype.__getBounds.call(this,e,t)}if(this.__children.length==0){return}var i=openfl_geom_Matrix.__pool.get();var s=0;var a=this.__children;while(s<a.length){var r=a[s];++s;if(r.__scaleX==0||r.__scaleY==0||r.__isMask){continue}var n=r.__transform;i.a=n.a*t.a+n.b*t.c;i.b=n.a*t.b+n.b*t.d;i.c=n.c*t.a+n.d*t.c;i.d=n.c*t.b+n.d*t.d;i.tx=n.tx*t.a+n.ty*t.c+t.tx;i.ty=n.tx*t.b+n.ty*t.d+t.ty;r.__getRenderBounds(e,i)}openfl_geom_Matrix.__pool.release(i)},__hitTest:function(e,t,i,s,a,r){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled&&!this.mouseChildren){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}if(this.__scrollRect!=null){var n=openfl_geom_Point.__pool.get();n.setTo(e,t);var _=this.__getRenderTransform();var o=_.a*_.d-_.b*_.c;if(o==0){n.x=-_.tx;n.y=-_.ty}else{var l=1/o*(_.c*(_.ty-n.y)+_.d*(n.x-_.tx));n.y=1/o*(_.a*(n.y-_.ty)+_.b*(_.tx-n.x));n.x=l}if(!this.__scrollRect.containsPoint(n)){openfl_geom_Point.__pool.release(n);return false}openfl_geom_Point.__pool.release(n)}var h=this.__children.length;if(a){if(s==null||!this.mouseChildren){while(--h>=0)if(this.__children[h].__hitTest(e,t,i,null,true,this.__children[h])){if(s!=null){s.push(r)}return true}}else if(s!=null){var c=s.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,i,s,true,this.__children[h])){f=true;if(u&&s.length>c){break}}}}if(f){s.splice(c,0,r);return true}}}else{var p=false;while(--h>=0)if(this.__children[h].__hitTest(e,t,i,s,false,this.__children[h])){p=true;if(s==null){break}}return p}return false},__hitTestMask:function(e,t){var i=this.__children.length;while(--i>=0)if(this.__children[i].__hitTestMask(e,t)){return true}return false},__renderCanvas:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__cleanup()}}this.__removedChildren.set_length(0);if(!this.__renderable||this.__worldAlpha<=0||this.get_mask()!=null&&(this.get_mask().get_width()<=0||this.get_mask().get_height()<=0)){return}openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,e);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){return}e.__pushMaskObject(this);if(e.__stage!=null){var a=0;var r=this.__children;while(a<r.length){var n=r[a];++a;n.__renderCanvas(e);n.__renderDirty=false}this.__renderDirty=false}else{var _=0;var o=this.__children;while(_<o.length){var l=o[_];++_;l.__renderCanvas(e)}}e.__popMaskObject(this)},__renderCanvasMask:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__cleanup()}}this.__removedChildren.set_length(0);if(this.__graphics!=null){openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,e)}var a=0;var r=this.__children;while(a<r.length){var n=r[a];++a;n.__renderCanvasMask(e)}},__renderDOM:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__renderDOM(e)}}var a=0;var r=this.__removedChildren;while(a<r.get_length()){var n=r.get(a);++a;if(n.stage==null){n.__cleanup()}}this.__removedChildren.set_length(0);openfl_display_InteractiveObject.prototype.__renderDOM.call(this,e);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){return}e.__pushMaskObject(this);if(e.__stage!=null){var _=0;var o=this.__children;while(_<o.length){var l=o[_];++_;l.__renderDOM(e);l.__renderDirty=false}this.__renderDirty=false}else{var h=0;var c=this.__children;while(h<c.length){var u=c[h];++h;u.__renderDOM(e)}}e.__popMaskObject(this)},__renderDOMClear:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__renderDOMClear(e)}}var a=0;var r=this.__removedChildren;while(a<r.get_length()){var n=r.get(a);++a;if(n.stage==null){n.__cleanup()}}this.__removedChildren.set_length(0);var _=0;var o=this.__children;while(_<o.length){var l=o[_];++_;l.__renderDOMClear(e)}},__renderGL:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__cleanup()}}this.__removedChildren.set_length(0);if(!this.__renderable||this.__worldAlpha<=0){return}openfl_display_InteractiveObject.prototype.__renderGL.call(this,e);if(this.__cacheBitmap!=null&&!this.__isCacheBitmapRender){return}if(this.__children.length>0){e.__pushMaskObject(this);if(e.__stage!=null){var a=0;var r=this.__children;while(a<r.length){var n=r[a];++a;n.__renderGL(e);n.__renderDirty=false}this.__renderDirty=false}else{var _=0;var o=this.__children;while(_<o.length){var l=o[_];++_;l.__renderGL(e)}}}if(this.__children.length>0){e.__popMaskObject(this)}},__renderGLMask:function(e){var t=0;var i=this.__removedChildren;while(t<i.get_length()){var s=i.get(t);++t;if(s.stage==null){s.__cleanup()}}this.__removedChildren.set_length(0);if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.renderMask(this,e)}var a=0;var r=this.__children;while(a<r.length){var n=r[a];++a;n.__renderGLMask(e)}},__setStageReference:function(e){openfl_display_InteractiveObject.prototype.__setStageReference.call(this,e);if(this.__children!=null){var t=0;var i=this.__children;while(t<i.length){var s=i[t];++t;s.__setStageReference(e)}}},__setWorldTransformInvalid:function(){if(!this.__worldTransformInvalid){this.__worldTransformInvalid=true;if(this.__children!=null){var e=0;var t=this.__children;while(e<t.length){var i=t[e];++e;i.__setWorldTransformInvalid()}}}},__shouldCacheHardware:function(e){if(e==true){return true}e=openfl_display_InteractiveObject.prototype.__shouldCacheHardware.call(this,e);if(e==true){return true}if(this.__children!=null){var t=0;var i=this.__children;while(t<i.length){var s=i[t];++t;e=s.__shouldCacheHardware(e);if(e==true){return true}}}return e},__tabTest:function(e){openfl_display_InteractiveObject.prototype.__tabTest.call(this,e);if(!this.get_tabChildren()){return}var t=false;var i=null;var s=0;var a=this.__children;while(s<a.length){var r=a[s];++s;t=r.__getInteractive(null);if(t){i=r;i.__tabTest(e)}}},__update:function(e,t){openfl_display_InteractiveObject.prototype.__update.call(this,e,t);if(t){var i=0;var s=this.__children;while(i<s.length){var a=s[i];++i;a.__update(e,true)}}},get_numChildren:function(){return this.__children.length},get_tabChildren:function(){return this.__tabChildren},__class__:openfl_display_DisplayObjectContainer,__properties__:$extend(openfl_display_InteractiveObject.prototype.__properties__,{get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var openfl_display_Sprite=function(){openfl_display_DisplayObjectContainer.call(this);this.__buttonMode=false;this.useHandCursor=true};$hxClasses["openfl.display.Sprite"]=openfl_display_Sprite;openfl_display_Sprite.__name__=["openfl","display","Sprite"];openfl_display_Sprite.__super__=openfl_display_DisplayObjectContainer;openfl_display_Sprite.prototype=$extend(openfl_display_DisplayObjectContainer.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,startDrag:function(e,t){if(e==null){e=false}if(this.stage!=null){this.stage.__startDrag(this,e,t)}},stopDrag:function(){if(this.stage!=null){this.stage.__stopDrag(this)}},__getCursor:function(){if(this.__buttonMode&&this.useHandCursor){return"button"}else{return null}},__hitTest:function(e,t,i,s,a,r){if(a&&!this.mouseEnabled&&!this.mouseChildren){return false}if(!r.get_visible()||this.__isMask){return this.__hitTestHitArea(e,t,i,s,a,r)}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return this.__hitTestHitArea(e,t,i,s,a,r)}if(this.__scrollRect!=null){var n=openfl_geom_Point.__pool.get();n.setTo(e,t);var _=this.__getRenderTransform();var o=_.a*_.d-_.b*_.c;if(o==0){n.x=-_.tx;n.y=-_.ty}else{var l=1/o*(_.c*(_.ty-n.y)+_.d*(n.x-_.tx));n.y=1/o*(_.a*(n.y-_.ty)+_.b*(_.tx-n.x));n.x=l}if(!this.__scrollRect.containsPoint(n)){openfl_geom_Point.__pool.release(n);return this.__hitTestHitArea(e,t,i,s,true,r)}openfl_geom_Point.__pool.release(n)}if(openfl_display_DisplayObjectContainer.prototype.__hitTest.call(this,e,t,i,s,a,r)){if(s!=null){return a}else{return true}}else if(this.hitArea==null&&this.__graphics!=null&&this.__graphics.__hitTest(e,t,i,this.__getRenderTransform())){if(s!=null&&(!a||this.mouseEnabled)){s.push(r)}return true}return this.__hitTestHitArea(e,t,i,s,a,r)},__hitTestHitArea:function(e,t,i,s,a,r){if(this.hitArea!=null){if(!this.hitArea.mouseEnabled){this.hitArea.mouseEnabled=true;var n=this.hitArea.__hitTest(e,t,i,null,true,r);this.hitArea.mouseEnabled=false;if(s!=null&&n){s[s.length]=r}return n}}return false},__hitTestMask:function(e,t){if(openfl_display_DisplayObjectContainer.prototype.__hitTestMask.call(this,e,t)){return true}else if(this.__graphics!=null&&this.__graphics.__hitTest(e,t,true,this.__getRenderTransform())){return true}return false},get_graphics:function(){if(this.__graphics==null){this.__graphics=new openfl_display_Graphics(this)}return this.__graphics},get_tabEnabled:function(){if(this.__tabEnabled==null){return this.__buttonMode}else{return this.__tabEnabled}},set_buttonMode:function(e){return this.__buttonMode=e},__class__:openfl_display_Sprite,__properties__:$extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode"})});var Main=function(){openfl_display_Sprite.call(this);this.appStart();this.stage.addEventListener("resize",$bind(this,this.onResize))};$hxClasses["Main"]=Main;Main.__name__=["Main"];Main.__super__=openfl_display_Sprite;Main.prototype=$extend(openfl_display_Sprite.prototype,{app:null,appStart:function(){var e=flipbookMM_global_GetDivJs.getInstance();e.openfl.style.setProperty("-webkit-user-select","none");e.openfl.style.setProperty("-moz-user-select","none");e.openfl.style.setProperty("-ms-user-select","none");e.openfl.style.setProperty("user-select","none");this.app=flipbookMM_AppMain.getInstance(openfl_Lib.get_current().stage.stageWidth,openfl_Lib.get_current().stage.stageHeight);this.addChild(this.app)},onResize:function(e){if(this.app!=null){this.app.resize(openfl_Lib.get_current().stage.stageWidth,openfl_Lib.get_current().stage.stageHeight)}},__class__:Main});var DocumentClass=function(e){e.addChild(this);Main.call(this);this.dispatchEvent(new openfl_events_Event("addedToStage",false,false))};$hxClasses["DocumentClass"]=DocumentClass;DocumentClass.__name__=["DocumentClass"];DocumentClass.__super__=Main;DocumentClass.prototype=$extend(Main.prototype,{__class__:DocumentClass});var EReg=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};$hxClasses["EReg"]=EReg;EReg.__name__=["EReg"];EReg.prototype={r:null,match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},matched:function(e){if(this.r.m!=null&&e>=0&&e<this.r.m.length){return this.r.m[e]}else{throw new js__$Boot_HaxeError("EReg::matched")}},matchedRight:function(){if(this.r.m==null){throw new js__$Boot_HaxeError("No string matched")}var e=this.r.m.index+this.r.m[0].length;return HxOverrides.substr(this.r.s,e,this.r.s.length-e)},matchedPos:function(){if(this.r.m==null){throw new js__$Boot_HaxeError("No string matched")}return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(e,t,i){if(i==null){i=-1}if(this.r.global){this.r.lastIndex=t;var s=this.r;var a=i<0?e:HxOverrides.substr(e,0,t+i);this.r.m=s.exec(a);var r=this.r.m!=null;if(r){this.r.s=e}return r}else{var n=this.match(i<0?HxOverrides.substr(e,t,null):HxOverrides.substr(e,t,i));if(n){this.r.s=e;this.r.m.index+=t}return n}},split:function(e){var t="#__delim__#";return e.replace(this.r,t).split(t)},__class__:EReg};var HxOverrides=function(){};$hxClasses["HxOverrides"]=HxOverrides;HxOverrides.__name__=["HxOverrides"];HxOverrides.dateStr=function(e){var t=e.getMonth()+1;var i=e.getDate();var s=e.getHours();var a=e.getMinutes();var r=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(i<10?"0"+i:""+i)+" "+(s<10?"0"+s:""+s)+":"+(a<10?"0"+a:""+a)+":"+(r<10?"0"+r:""+r)};HxOverrides.strDate=function(e){var t=e.length;switch(t){case 8:var i=e.split(":");var s=new Date;s["setTime"](0);s["setUTCHours"](i[0]);s["setUTCMinutes"](i[1]);s["setUTCSeconds"](i[2]);return s;case 10:var a=e.split("-");return new Date(a[0],a[1]-1,a[2],0,0,0);case 19:var r=e.split(" ");var n=r[0].split("-");var _=r[1].split(":");return new Date(n[0],n[1]-1,n[2],_[0],_[1],_[2]);default:throw new js__$Boot_HaxeError("Invalid date format : "+e)}};HxOverrides.cca=function(e,t){var i=e.charCodeAt(t);if(i!=i){return undefined}return i};HxOverrides.substr=function(e,t,i){if(i==null){i=e.length}else if(i<0){if(t==0){i=e.length+i}else{return""}}return e.substr(t,i)};HxOverrides.remove=function(e,t){var i=e.indexOf(t);if(i==-1){return false}e.splice(i,1);return true};HxOverrides.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var Lambda=function(){};$hxClasses["Lambda"]=Lambda;Lambda.__name__=["Lambda"];Lambda.array=function(e){var t=[];var i=$iterator(e)();while(i.hasNext()){var s=i.next();t.push(s)}return t};var _$List_ListNode=function(e,t){this.item=e;this.next=t};$hxClasses["_List.ListNode"]=_$List_ListNode;_$List_ListNode.__name__=["_List","ListNode"];_$List_ListNode.prototype={item:null,next:null,__class__:_$List_ListNode};var _$List_ListIterator=function(e){this.head=e};$hxClasses["_List.ListIterator"]=_$List_ListIterator;_$List_ListIterator.__name__=["_List","ListIterator"];_$List_ListIterator.prototype={head:null,hasNext:function(){return this.head!=null},next:function(){var e=this.head.item;this.head=this.head.next;return e},__class__:_$List_ListIterator};var ManifestResources=function(){};$hxClasses["ManifestResources"]=ManifestResources;ManifestResources.__name__=["ManifestResources"];ManifestResources.init=function(e){ManifestResources.preloadLibraries=[];ManifestResources.preloadLibraryNames=[];ManifestResources.rootPath=null;if(e!=null&&Object.prototype.hasOwnProperty.call(e,"rootPath")){ManifestResources.rootPath=Reflect.field(e,"rootPath")}if(ManifestResources.rootPath==null){ManifestResources.rootPath=""}lime_utils_Assets.defaultRootPath=ManifestResources.rootPath;var t;var i;var s;t='{"name":null,"assets":"aoy4:pathy57:img%2Fvideoplayer1%2Fic_play_circle_fill_grey600_24dp.pngy4:sizei574y4:typey5:IMAGEy2:idR1y7:preloadtgoR0y55:img%2Fvideoplayer1%2Fic_play_circle_fill_white_24dp.pngR2i559R3R4R5R7R6tgoR0y20:img%2Fimgdefault.pngR2i3311R3R4R5R8R6tgoR0y31:img%2Faudioplayer1%2Fopenfl.svgR2i62864R3y4:TEXTR5R9R6tgoR0y31:img%2Faudioplayer1%2Fvolume.svgR2i490R3R10R5R11R6tgoR0y30:img%2Faudioplayer1%2Ffirst.svgR2i666R3R10R5R12R6tgoR0y29:img%2Faudioplayer1%2Fplay.svgR2i534R3R10R5R13R6tgoR0y37:img%2Faudioplayer1%2Fvolume_shade.svgR2i490R3R10R5R14R6tgoR0y32:img%2Faudioplayer1%2Fspinner.svgR2i1682R3R10R5R15R6tgoR0y29:img%2Faudioplayer1%2Flast.svgR2i671R3R10R5R16R6tgoR0y30:img%2Faudioplayer1%2Fpause.svgR2i639R3R10R5R17R6tgh","rootPath":null,"version":2,"libraryArgs":[],"libraryType":null}';i=lime_utils_AssetManifest.parse(t,ManifestResources.rootPath);s=lime_utils_AssetLibrary.fromManifest(i);lime_utils_Assets.registerLibrary("default",s);s=lime_utils_Assets.getLibrary("default");if(s!=null){ManifestResources.preloadLibraries.push(s)}else{ManifestResources.preloadLibraryNames.push("default")}};Math.__name__=["Math"];var Reflect=function(){};$hxClasses["Reflect"]=Reflect;Reflect.__name__=["Reflect"];Reflect.field=function(e,t){try{return e[t]}catch(e){haxe_CallStack.lastException=e;return null}};Reflect.getProperty=function(e,t){var i;if(e==null){return null}else{var s;if(e.__properties__){i=e.__properties__["get_"+t];s=i}else{s=false}if(s){return e[i]()}else{return e[t]}}};Reflect.setProperty=function(e,t,i){var s;var a;if(e.__properties__){s=e.__properties__["set_"+t];a=s}else{a=false}if(a){e[s](i)}else{e[t]=i}};Reflect.fields=function(e){var t=[];if(e!=null){var i=Object.prototype.hasOwnProperty;for(var s in e){if(s!="__id__"&&s!="hx__closures__"&&i.call(e,s)){t.push(s)}}}return t};Reflect.isFunction=function(e){if(typeof e=="function"){return!(e.__name__||e.__ename__)}else{return false}};Reflect.compare=function(e,t){if(e==t){return 0}else if(e>t){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 i=0;var s=Reflect.fields(e);while(i<s.length){var a=s[i];++i;t[a]=Reflect.field(e,a)}return t};var Std=function(){};$hxClasses["Std"]=Std;Std.__name__=["Std"];Std.string=function(e){return js_Boot.__string_rec(e,"")};Std.parseInt=function(e){var t=parseInt(e,10);if(t==0&&(HxOverrides.cca(e,1)==120||HxOverrides.cca(e,1)==88)){t=parseInt(e)}if(isNaN(t)){return null}return t};var StringBuf=function(){this.b=""};$hxClasses["StringBuf"]=StringBuf;StringBuf.__name__=["StringBuf"];StringBuf.prototype={b:null,__class__:StringBuf};var StringTools=function(){};$hxClasses["StringTools"]=StringTools;StringTools.__name__=["StringTools"];StringTools.htmlEscape=function(e,t){e=e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");if(t){return e.split('"').join("&quot;").split("'").join("&#039;")}else{return e}};StringTools.htmlUnescape=function(e){return e.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").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 i=t.length;var s=e.length;if(s>=i){return HxOverrides.substr(e,s-i,i)==t}else{return false}};StringTools.isSpace=function(e,t){var i=HxOverrides.cca(e,t);if(!(i>8&&i<14)){return i==32}else{return true}};StringTools.ltrim=function(e){var t=e.length;var i=0;while(i<t&&StringTools.isSpace(e,i))++i;if(i>0){return HxOverrides.substr(e,i,t-i)}else{return e}};StringTools.rtrim=function(e){var t=e.length;var i=0;while(i<t&&StringTools.isSpace(e,t-i-1))++i;if(i>0){return HxOverrides.substr(e,0,t-i)}else{return e}};StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))};StringTools.replace=function(e,t,i){return e.split(t).join(i)};StringTools.hex=function(e,t){var i="";var s="0123456789ABCDEF";while(true){i=s.charAt(e&15)+i;e>>>=4;if(!(e>0)){break}}if(t!=null){while(i.length<t)i="0"+i}return i};var ValueType=$hxClasses["ValueType"]={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};ValueType.TNull=["TNull",0];ValueType.TNull.toString=$estr;ValueType.TNull.__enum__=ValueType;ValueType.TInt=["TInt",1];ValueType.TInt.toString=$estr;ValueType.TInt.__enum__=ValueType;ValueType.TFloat=["TFloat",2];ValueType.TFloat.toString=$estr;ValueType.TFloat.__enum__=ValueType;ValueType.TBool=["TBool",3];ValueType.TBool.toString=$estr;ValueType.TBool.__enum__=ValueType;ValueType.TObject=["TObject",4];ValueType.TObject.toString=$estr;ValueType.TObject.__enum__=ValueType;ValueType.TFunction=["TFunction",5];ValueType.TFunction.toString=$estr;ValueType.TFunction.__enum__=ValueType;ValueType.TClass=function(e){var t=["TClass",6,e];t.__enum__=ValueType;t.toString=$estr;return t};ValueType.TEnum=function(e){var t=["TEnum",7,e];t.__enum__=ValueType;t.toString=$estr;return t};ValueType.TUnknown=["TUnknown",8];ValueType.TUnknown.toString=$estr;ValueType.TUnknown.__enum__=ValueType;var Type=function(){};$hxClasses["Type"]=Type;Type.__name__=["Type"];Type.getClassName=function(e){var t=e.__name__;if(t==null){return null}return t.join(".")};Type.getEnumName=function(e){var t=e.__ename__;return t.join(".")};Type.resolveClass=function(e){var t=$hxClasses[e];if(t==null||!t.__name__){return null}return t};Type.resolveEnum=function(e){var t=$hxClasses[e];if(t==null||!t.__ename__){return null}return t};Type.createInstance=function(e,t){var i=t.length;switch(i){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);case 8:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]);case 9:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]);case 10:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9]);case 11:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10]);case 12:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11]);case 13:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12]);case 14:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13]);default:throw new js__$Boot_HaxeError("Too many arguments")}};Type.createEmptyInstance=function(e){function t(){}t.prototype=e.prototype;return new t};Type.createEnum=function(e,t,i){var s=Reflect.field(e,t);if(s==null){throw new js__$Boot_HaxeError("No such constructor "+t)}if(Reflect.isFunction(s)){if(i==null){throw new js__$Boot_HaxeError("Constructor "+t+" need parameters")}return s.apply(e,i)}if(i!=null&&i.length!=0){throw new js__$Boot_HaxeError("Constructor "+t+" does not need parameters")}return s};Type.getInstanceFields=function(e){var t=[];for(var i in e.prototype)t.push(i);HxOverrides.remove(t,"__class__");HxOverrides.remove(t,"__properties__");return t};Type["typeof"]=function(e){var t=typeof e;switch(t){case"boolean":return ValueType.TBool;case"function":if(e.__name__||e.__ename__){return ValueType.TObject}return ValueType.TFunction;case"number":if(Math.ceil(e)==e%2147483648){return ValueType.TInt}return ValueType.TFloat;case"object":if(e==null){return ValueType.TNull}var i=e.__enum__;if(i!=null){return ValueType.TEnum(i)}var s=js_Boot.getClass(e);if(s!=null){return ValueType.TClass(s)}return ValueType.TObject;case"string":return ValueType.TClass(String);case"undefined":return ValueType.TNull;default:return ValueType.TUnknown}};var _$UInt_UInt_$Impl_$={};$hxClasses["_UInt.UInt_Impl_"]=_$UInt_UInt_$Impl_$;_$UInt_UInt_$Impl_$.__name__=["_UInt","UInt_Impl_"];_$UInt_UInt_$Impl_$.gt=function(e,t){var i=e<0;var s=t<0;if(i!=s){return i}else{return e>t}};_$UInt_UInt_$Impl_$.gte=function(e,t){var i=e<0;var s=t<0;if(i!=s){return i}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 i=this.attributeMap;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.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 i=this.children;while(t<i.length){var s=i[t];++t;if(s.nodeType==Xml.Element){e.push(s)}}var a=e;return HxOverrides.iter(a)},elementsNamed:function(e){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 t=[];var i=0;var s=this.children;while(i<s.length){var a=s[i];++i;var r;if(a.nodeType==Xml.Element){if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}r=a.nodeName==e}else{r=false}if(r){t.push(a)}}var n=t;return HxOverrides.iter(n)},firstElement: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=0;var t=this.children;while(e<t.length){var i=t[e];++e;if(i.nodeType==Xml.Element){return i}}return null},addChild:function(e){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)}if(e.parent!=null){e.parent.removeChild(e)}this.children.push(e);e.parent=this},removeChild:function(e){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)}if(HxOverrides.remove(this.children,e)){e.parent=null;return true}return false},__class__:Xml};var openfl_events_Event=function(e,t,i){if(i==null){i=false}if(t==null){t=false}this.type=e;this.bubbles=t;this.cancelable=i;this.eventPhase=2};$hxClasses["openfl.events.Event"]=openfl_events_Event;openfl_events_Event.__name__=["openfl","events","Event"];openfl_events_Event.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,isDefaultPrevented:function(){return this.__preventDefault},preventDefault:function(){if(this.cancelable){this.__preventDefault=true}},stopPropagation:function(){this.__isCanceled=true},__class__:openfl_events_Event};var base_baseEvent_TouchCustomEvent=function(e,t,i){if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.slidePoint=new openfl_geom_Point(0,0);this.scale=1;this.slideSpeed=0};$hxClasses["base.baseEvent.TouchCustomEvent"]=base_baseEvent_TouchCustomEvent;base_baseEvent_TouchCustomEvent.__name__=["base","baseEvent","TouchCustomEvent"];base_baseEvent_TouchCustomEvent.__super__=openfl_events_Event;base_baseEvent_TouchCustomEvent.prototype=$extend(openfl_events_Event.prototype,{scale:null,slideSpeed:null,slidePoint:null,startPoint:null,get_touchScale:function(){return this.scale},set_touchScale:function(e){return this.scale=e},set_touchSlideSpeed:function(e){return this.slideSpeed=e},get_touchSlidePoint:function(){return this.slidePoint},set_touchSlidePoint:function(e){return this.slidePoint=e},set_touchStartPoint:function(e){return this.startPoint=e},__class__:base_baseEvent_TouchCustomEvent,__properties__:{set_touchStartPoint:"set_touchStartPoint",set_touchSlidePoint:"set_touchSlidePoint",get_touchSlidePoint:"get_touchSlidePoint",set_touchSlideSpeed:"set_touchSlideSpeed",set_touchScale:"set_touchScale",get_touchScale:"get_touchScale"}});var base_baseLoad_LoadData=function(e,t,i,s){this.onComplete=t;this.onProgress=i;this.onError=s;this.load(e)};$hxClasses["base.baseLoad.LoadData"]=base_baseLoad_LoadData;base_baseLoad_LoadData.__name__=["base","baseLoad","LoadData"];base_baseLoad_LoadData.prototype={loader:null,onComplete:null,onProgress:null,onError:null,load:function(e){this.loader=new openfl_net_URLLoader;this.addListenerEventToSprite(this.loader);this.loader.load(new openfl_net_URLRequest(e))},addListenerEventToSprite:function(e){if(this.onComplete!=null){e.addEventListener("complete",$bind(this,this.completeHandler))}e.addEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.addEventListener("progress",$bind(this,this.progressHandler))}},removeListenerEventFromSprite:function(e){if(this.onComplete!=null){e.removeEventListener("complete",$bind(this,this.completeHandler))}e.removeEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.removeEventListener("progress",$bind(this,this.progressHandler))}},completeHandler:function(e){if(this.onComplete!=null){this.onComplete(e)}this.destroyMe()},progressHandler:function(e){if(this.onProgress!=null){this.onProgress(e)}},ioErrorHandler:function(e){if(this.onError!=null){this.onError(e)}this.destroyMe()},destroyMe:function(){if(this.loader!=null){this.onComplete=null;this.onProgress=null;this.onError=null;this.removeListenerEventFromSprite(this.loader);this.loader=null}},__class__:base_baseLoad_LoadData};var base_baseLoad_LoadDataStringJs=function(e,t){this.onComFun=t;this.loadXmlJsFun(e)};$hxClasses["base.baseLoad.LoadDataStringJs"]=base_baseLoad_LoadDataStringJs;base_baseLoad_LoadDataStringJs.__name__=["base","baseLoad","LoadDataStringJs"];base_baseLoad_LoadDataStringJs.prototype={onComFun:null,loadXmlJsFun:function(e){var t=this;var i=null;var s=function(){if(i!=null){if(i.readyState==4){if(t.onComFun!=null){t.onComFun(i.responseText)}var e=i.status==200}}};var a=function(e){i=null;if(window.XMLHttpRequest){i=new XMLHttpRequest}else if(window.ActiveXObject){i=new ActiveXObject("Microsoft.XMLHTTP")}if(i!=null){i.onreadystatechange=s;i.open("GET",e,true);i.send(null)}};a(e)},__class__:base_baseLoad_LoadDataStringJs};var base_baseLoad_LoadFlash=function(e,t,i,s){openfl_display_Sprite.call(this);this.onComplete=t;this.onProgress=i;this.onError=s;this.load(e)};$hxClasses["base.baseLoad.LoadFlash"]=base_baseLoad_LoadFlash;base_baseLoad_LoadFlash.__name__=["base","baseLoad","LoadFlash"];base_baseLoad_LoadFlash.__super__=openfl_display_Sprite;base_baseLoad_LoadFlash.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,onComplete:null,onProgress:null,onError:null,load:function(e){this.loader=new openfl_display_Loader;this.addListenerEventToSprite(this.loader.contentLoaderInfo);this.loader.load(new openfl_net_URLRequest(e));this.addChild(this.loader)},addListenerEventToSprite:function(e){if(this.onComplete!=null){e.addEventListener("complete",$bind(this,this.completeHandler))}e.addEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.addEventListener("progress",$bind(this,this.progressHandler))}},removeListenerEventFromSprite:function(e){if(this.onComplete!=null){e.removeEventListener("complete",$bind(this,this.completeHandler))}e.removeEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.removeEventListener("progress",$bind(this,this.progressHandler))}},completeHandler:function(e){if(this.onComplete!=null){this.onComplete(e)}this.destroyMe()},progressHandler:function(e){if(this.onProgress!=null){this.onProgress(e)}},ioErrorHandler:function(e){if(this.onError!=null){this.onError(e)}this.destroyMe()},destroyMe:function(){if(this.loader!=null){this.onComplete=null;this.onProgress=null;this.onError=null;this.removeListenerEventFromSprite(this.loader.contentLoaderInfo);this.loader=null}},__class__:base_baseLoad_LoadFlash});var base_baseLoad_LoadGifImg=function(e,t,i,s){openfl_display_Sprite.call(this);this.onComplete=t;this.onProgress=i;this.onError=s;this.load(e)};$hxClasses["base.baseLoad.LoadGifImg"]=base_baseLoad_LoadGifImg;base_baseLoad_LoadGifImg.__name__=["base","baseLoad","LoadGifImg"];base_baseLoad_LoadGifImg.__super__=openfl_display_Sprite;base_baseLoad_LoadGifImg.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,_gif:null,onComplete:null,onProgress:null,onError:null,load:function(e){this.loader=new openfl_net_URLLoader;this.loader.dataFormat=0;this.addListenerEventToSprite(this.loader);this.loader.load(new openfl_net_URLRequest(e))},addListenerEventToSprite:function(e){e.addEventListener("complete",$bind(this,this.completeHandler));e.addEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.addEventListener("progress",$bind(this,this.progressHandler))}},removeListenerEventFromSprite:function(e){e.removeEventListener("complete",$bind(this,this.completeHandler));e.removeEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.removeEventListener("progress",$bind(this,this.progressHandler))}},completeHandler:function(e){var t=js_Boot.__cast(e.target,openfl_net_URLLoader).data;var i=new haxe_io_BytesBuffer;var s=0;var a=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(t);while(s<a){var r=s++;var n=t.readUnsignedByte();i.b.push(n)}var _=i.getBytes();this._gif=new gif_AnimatedGif(_);this._gif.play();this.addChild(this._gif);if(this.onComplete!=null){this.onComplete(e)}},progressHandler:function(e){if(this.onProgress!=null){this.onProgress(e)}},ioErrorHandler:function(e){if(this.onError!=null){this.onError(e)}this.destroyMe()},destroyMe:function(){if(this.loader!=null){this.removeChildren();if(this._gif!=null){this._gif.stop();this._gif=null}this.removeListenerEventFromSprite(this.loader);this.loader=null;this.onComplete=null;this.onProgress=null;this.onError=null}},__class__:base_baseLoad_LoadGifImg});var base_baseSprite_SpriteJs=function(e){if(e==null){this.div=window.document.createElement("div")}else{var t=window.document.getElementById(e);if(t!=null&&t.tagName.toLowerCase()=="div"){this.div=js_Boot.__cast(t,HTMLDivElement)}else{if(t!=null){t.remove()}this.div=window.document.createElement("div");this.div.id=e}}this.div.style.left=0+"px";this.div.style.top=0+"px";this.div.style.position="absolute";this.div.style.display="block";this.div.style.setProperty("-webkit-user-select","none");this.div.style.setProperty("-moz-user-select","none");this.div.style.setProperty("-ms-user-select","none");this.div.style.setProperty("user-select","none");this.div.onselect=function(){return false}};$hxClasses["base.baseSprite.SpriteJs"]=base_baseSprite_SpriteJs;base_baseSprite_SpriteJs.__name__=["base","baseSprite","SpriteJs"];base_baseSprite_SpriteJs.prototype={div:null,set_visible:function(e){if(e){this.div.style.display="block"}else{this.div.style.display="none"}return e},get_visible:function(){if(this.div.style.display=="block"){return true}else{return false}},set_x:function(e){this.div.style.left=e+"px";return e},set_y:function(e){this.div.style.top=e+"px";return e},set_width:function(e){this.div.style.width=e+"px";return e},get_width:function(){var e=this.div.style.width;return parseFloat(HxOverrides.substr(e,0,e.length-2))},set_height:function(e){this.div.style.height=e+"px";return e},get_height:function(){var e=this.div.style.height;return parseFloat(HxOverrides.substr(e,0,e.length-2))},setBackgroundColor:function(e){var t=Std.string(StringTools.hex(e,16));t=HxOverrides.substr(t,t.length-6,null);t="#"+t;this.div.style.backgroundColor=t},set_text:function(e){this.div.style.fontFamily="Arial";this.div.style.fontSize="2";this.div.textContent=e;return e},set_textColor:function(e){var t=Std.string(StringTools.hex(e,16));t=HxOverrides.substr(t,t.length-6,null);t="#"+t;this.div.style.color=t;return e},__class__:base_baseSprite_SpriteJs,__properties__:{set_textColor:"set_textColor",set_text:"set_text",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",set_x:"set_x",set_visible:"set_visible",get_visible:"get_visible"}};var base_baseLoad_LoadGifJs=function(e,t,i){base_baseSprite_SpriteJs.call(this);this.img=window.document.createElement("img");this.img.src=e;this.img.width=t;this.img.height=i;this.div.appendChild(this.img)};$hxClasses["base.baseLoad.LoadGifJs"]=base_baseLoad_LoadGifJs;base_baseLoad_LoadGifJs.__name__=["base","baseLoad","LoadGifJs"];base_baseLoad_LoadGifJs.__super__=base_baseSprite_SpriteJs;base_baseLoad_LoadGifJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{img:null,resize:function(e,t){if(this.img!=null){this.img.width=e;this.img.height=t}},__class__:base_baseLoad_LoadGifJs});var base_baseLoad_LoadImg=function(e,t,i,s){openfl_display_Sprite.call(this);this.onComplete=t;this.onProgress=i;this.onError=s;this.load(e)};$hxClasses["base.baseLoad.LoadImg"]=base_baseLoad_LoadImg;base_baseLoad_LoadImg.__name__=["base","baseLoad","LoadImg"];base_baseLoad_LoadImg.__super__=openfl_display_Sprite;base_baseLoad_LoadImg.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,onComplete:null,onProgress:null,onError:null,load:function(e){this.loader=new openfl_display_Loader;this.addListenerEventToSprite(this.loader.contentLoaderInfo);this.loader.load(new openfl_net_URLRequest(e));this.addChild(this.loader)},addListenerEventToSprite:function(e){if(this.onComplete!=null){e.addEventListener("complete",$bind(this,this.completeHandler))}e.addEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.addEventListener("progress",$bind(this,this.progressHandler))}},removeListenerEventFromSprite:function(e){if(this.onComplete!=null){e.removeEventListener("complete",$bind(this,this.completeHandler))}e.removeEventListener("ioError",$bind(this,this.ioErrorHandler));if(this.onProgress!=null){e.removeEventListener("progress",$bind(this,this.progressHandler))}},completeHandler:function(e){if(this.onComplete!=null){this.onComplete(e)}this.destroyMe()},progressHandler:function(e){if(this.onProgress!=null){this.onProgress(e)}},ioErrorHandler:function(e){if(this.onError!=null){this.onError(e)}this.destroyMe()},destroyMe:function(){if(this.loader!=null){this.onComplete=null;this.onProgress=null;this.onError=null;this.removeListenerEventFromSprite(this.loader.contentLoaderInfo)}},resize:function(e,t){if(this.loader!=null){this.loader.set_width(e);this.loader.set_height(t)}},__class__:base_baseLoad_LoadImg});var base_baseLoad_LoadResource=function(e,t,i,s){openfl_display_Sprite.call(this);this.detectRescource(e,t,i,s)};$hxClasses["base.baseLoad.LoadResource"]=base_baseLoad_LoadResource;base_baseLoad_LoadResource.__name__=["base","baseLoad","LoadResource"];base_baseLoad_LoadResource.__super__=openfl_display_Sprite;base_baseLoad_LoadResource.prototype=$extend(openfl_display_Sprite.prototype,{loader:null,type:null,detectRescource:function(e,t,i,s){if(e!=null){if(StringTools.trim(e).length==0){return}}else{return}var a=e.toLowerCase();if(a.indexOf(".jpg",0)>0||a.indexOf(".png",0)>0){this.type="jpg|png";this.loader=new base_baseLoad_LoadImg(e,t,i,s);this.addChild(this.loader)}else if(a.indexOf(".gif",0)>0){this.type="gif";this.loader=new base_baseLoad_LoadGifImg(e,t,i,s);this.addChild(this.loader)}else if(a.indexOf(".swf",0)>0){this.type="swf";this.loader=new base_baseLoad_LoadFlash(e,t,i,s);this.addChild(this.loader)}else{this.type="data";this.loader=new base_baseLoad_LoadData(e,t,i,s)}a=null},__class__:base_baseLoad_LoadResource});var base_baseLoad_LoadVideo=function(e,t,i){var s=this;openfl_display_Sprite.call(this);this.videoURL=e;this.videoW=t;this.videoH=i;var a=HxOverrides.substr(e,0,e.length-4)+".png";this.back=new base_baseLoad_LoadImg(a,function(e){s.back.resize(s.videoW,s.videoH)});this.addChild(this.back);this.connection=new openfl_net_NetConnection;this.connection.addEventListener("netStatus",$bind(this,this.netStatusHandler));this.connection.addEventListener("ioError",$bind(this,this.ioErrorHandle));this.connection.addEventListener("securityError",$bind(this,this.securityErrorHandler));this.connection.connect(null);window.onclick=function(){s.play()}};$hxClasses["base.baseLoad.LoadVideo"]=base_baseLoad_LoadVideo;base_baseLoad_LoadVideo.__name__=["base","baseLoad","LoadVideo"];base_baseLoad_LoadVideo.__super__=openfl_display_Sprite;base_baseLoad_LoadVideo.prototype=$extend(openfl_display_Sprite.prototype,{videoURL:null,connection:null,stream:null,video:null,videoW:null,videoH:null,back:null,line:null,ioErrorHandle:function(e){},netStatusHandler:function(e){var t=e.info.code;switch(t){case"NetConnection.Connect.Success":this.connectStream();break;case"NetStream.Play.Stop":if(this.stream!=null){this.stream.togglePause()}break;case"NetStream.Play.StreamNotFound":break}},connectStream:function(){this.stream=new openfl_net_NetStream(this.connection);this.stream.addEventListener("netStatus",$bind(this,this.netStatusHandler));this.stream.addEventListener("asyncError",$bind(this,this.asyncErrorHandler));this.video=new openfl_media_Video(this.videoW|0,this.videoH|0);this.video.attachNetStream(this.stream);this.stream.play(this.videoURL);this.stream.resume();this.addChild(this.video);this.line=new openfl_display_Shape;this.line.get_graphics().lineStyle(2,0,1);this.line.get_graphics().moveTo(0,0);this.line.get_graphics().lineTo(0,this.videoH);this.line.get_graphics().endFill();this.addChild(this.line)},securityErrorHandler:function(e){},asyncErrorHandler:function(e){},play:function(){if(this.stream!=null){this.stream.resume()}},resize:function(e,t){this.videoW=e;this.videoH=t;if(this.video!=null){this.video.set_width(this.videoW);this.video.set_height(this.videoH)}if(this.back!=null){this.back.resize(this.videoW,this.videoH)}if(this.line!=null){this.line.set_height(this.videoH)}},__class__:base_baseLoad_LoadVideo});var base_baseSprite_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["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 i=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.initialDistance=Math.sqrt(i*i+s*s)}}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 i=t.x-this.firstDotPoint.x;var s=t.y-this.firstDotPoint.y;var a=Math.sqrt(i*i+s*s);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(i,s));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 i=e.y-this.firstDotPoint.y;var s=Math.sqrt(t*t+i*i);var a=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END);a.set_touchScale(1);a.set_touchSlideSpeed(s);a.set_touchSlidePoint(new openfl_geom_Point(t,i));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 i=this.dotMap.h[this.firstDotId].stageY-this.dotMap.h[this.secondDotId].stageY;this.currentDistance=Math.sqrt(t*t+i*i);this.curScale=this.currentDistance/this.initialDistance;var s=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM);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}},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 i=new base_baseEvent_TouchCustomEvent(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END);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;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 i=t.x-this.firstDotPoint.x;var s=t.y-this.firstDotPoint.y;var a=Math.sqrt(i*i+s*s);if(this.timeCount<=1&&a!=0){var r;if(Math.abs(i)>Math.abs(s)){if(i>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(s>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(i+s<0){a=-a}r.set_touchScale(1);r.set_touchSlideSpeed(a);r.set_touchSlidePoint(new openfl_geom_Point(i,s));this.dispatchEvent(r);r=null}}},__class__:base_baseSprite_TouchSprite});var base_baseUtils_GlobalFun=function(){};$hxClasses["base.baseUtils.GlobalFun"]=base_baseUtils_GlobalFun;base_baseUtils_GlobalFun.__name__=["base","baseUtils","GlobalFun"];base_baseUtils_GlobalFun.serach=function(e){var t=window.location.search.substring(1);if(t!=null&&t.length>0){var i=t.split("&");var s=0;var a=i.length;while(s<a){var r=s++;var n=i[r].split("=");if(n[0]==e){return n[1]}}}return""};base_baseUtils_GlobalFun.serachToStr=function(e){var t=base_baseUtils_GlobalFun.serach(e);if(t.length>0){return"?"+e+"="+t}else{return""}};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 i=e.keys();while(i.hasNext()){var s=i.next();++t}return t}};base_baseUtils_MapUtil.strLength=function(e){var t=0;if(e!=null){var i=e.keys();while(i.hasNext()){var s=i.next();++t}}return t};var fabric_FabricBaseObject=function(e){this.refresh=false;openfl_display_Sprite.call(this);this.set_visible(false);this.json=e;this.objW=this.json.realWidth;this.objH=this.json.realHeight;this.objAngle=this.json.realAngle;this.objX=this.json.realLeft;this.objY=this.json.realTop;this.objectContainerId="id"+Std.string(this.json.id);this.set_x(this.objX);this.set_y(this.objY);this.lastPoint=new openfl_geom_Point(0,0);this.back=new openfl_display_Sprite;this.back.get_graphics().beginFill(0,0);this.back.get_graphics().drawRect(0,0,this.objW,this.objH);this.back.get_graphics().endFill();this.addChild(this.back);this.objectContainer=new base_baseSprite_SpriteJs(this.objectContainerId);this.objectContainer.set_visible(false);this.objectContainer.set_width(this.objW/window.devicePixelRatio);this.objectContainer.set_height(this.objH/window.devicePixelRatio);if(this.objAngle!=0){this.objectContainer.div.style.transform="rotate("+this.objAngle+"deg)";this.objectContainer.div.style.transformOrigin="top left"}var t=flipbookMM_global_GetDivJs.getInstance().fObject;t.appendChild(this.objectContainer.div);t=null;this.addEventListener("enterFrame",$bind(this,this.enterFrameHandle))};$hxClasses["fabric.FabricBaseObject"]=fabric_FabricBaseObject;fabric_FabricBaseObject.__name__=["fabric","FabricBaseObject"];fabric_FabricBaseObject.__super__=openfl_display_Sprite;fabric_FabricBaseObject.prototype=$extend(openfl_display_Sprite.prototype,{objW:null,objH:null,objX:null,objY:null,objAngle:null,objectContainer:null,objectContainerId:null,json:null,back:null,canvasF:null,fabricObject:null,objElement:null,lastPoint:null,refresh:null,enterFrameHandle:function(e){if(this.refresh&&this.get_visible()==true&&this.objectContainer!=null&&this.objElement!=null&&this.stage!=null){var t=this.parent.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));if(t.x!=this.lastPoint.x||t.y!=this.lastPoint.y){this.lastPoint.x=t.x;this.lastPoint.y=t.y;this.objectContainer.set_x(t.x/window.devicePixelRatio);this.objectContainer.set_y(t.y/window.devicePixelRatio);var i=this.getScaleX(this);var s=this.objW*i/window.devicePixelRatio;var a=this.objH*i/window.devicePixelRatio;var r=window.document.getElementById(this.objectContainerId).querySelectorAll(".canvas-container");if(r!=null&&r.length>0){js_Boot.__cast(r[0],HTMLDivElement).style.width=s+"px";js_Boot.__cast(r[0],HTMLDivElement).style.height=a+"px";var n=js_Boot.__cast(r[0],HTMLDivElement).getElementsByTagName("Canvas");var _=0;while(_<n.length){var o=n[_];++_;js_Boot.__cast(o,HTMLCanvasElement).width=s|0;js_Boot.__cast(o,HTMLCanvasElement).height=a|0;js_Boot.__cast(o,HTMLCanvasElement).style.width=s+"px";js_Boot.__cast(o,HTMLCanvasElement).style.height=a+"px"}}this.objectContainer.set_width(s);this.objectContainer.set_height(a);this.objectContainer.set_visible(true);if(this.canvasF!=null){this.canvasF.zoomToPoint({x:0,y:0},i/window.devicePixelRatio);this.canvasF.renderAll()}if(this.fabricObject!=null){if(this.fabricObject.type=="audio"){var l=js_Boot.__cast(this.fabricObject.dom,HTMLDivElement);var h=this.objectContainer.get_width()/Std.parseInt(l.style.width);l.style.transformOrigin="left top";l.style.transform="scale("+h+","+h+")"}else if(this.fabricObject.dom!=null){var c=this.objectContainer.get_width();this.fabricObject.dom.style.width=c+"px";var u=this.objectContainer.get_height();this.fabricObject.dom.style.height=u+"px"}}}}},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}},ff_active:function(){},ff_deactive:function(){},destroyMe:function(){this.removeEventListener("enterFrame",$bind(this,this.enterFrameHandle))},__class__:fabric_FabricBaseObject});var fabric_FabricObject=function(e){fabric_FabricBaseObject.call(this,e)};$hxClasses["fabric.FabricObject"]=fabric_FabricObject;fabric_FabricObject.__name__=["fabric","FabricObject"];fabric_FabricObject.__super__=fabric_FabricBaseObject;fabric_FabricObject.prototype=$extend(fabric_FabricBaseObject.prototype,{loadObject:function(){var t=this;this.objElement=window.document.createElement("canvas");this.objElement.style.position="absolute";this.objElement.id=this.json.id;var e=this.getScaleX(this);var i=(this.objW*e/window.devicePixelRatio|0)*10;var s=(this.objH*e/window.devicePixelRatio|0)*10;js_Boot.__cast(this.objElement,HTMLCanvasElement).width=i;js_Boot.__cast(this.objElement,HTMLCanvasElement).height=s;this.objElement.style.width=i+"px";this.objElement.style.height=s+"px";this.objectContainer.div.appendChild(this.objElement);var a={backgroundColor:"rgba(0,0,0,0)",selection:false,preserveObjectStacking:true,defaultCursor:"default"};var r=this.parent.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));this.objectContainer.set_x(9999);this.objectContainer.set_y(9999);this.canvasF=new window.CanvasObject(this.objElement.id,this.objectContainer.div,a);this.canvasF.gotopage=fabric_FabricBaseObject._fn_gotoPage;this.json.canvasObject=this.canvasF;window.FabricObjects.createObject(this.json,function(e){t.fabricObject=e;if(t.canvasF!=null){t.canvasF.addBaseObject(t.fabricObject);t.canvasF.renderAll()}t.refresh=true})},ff_active:function(){this.set_visible(true);this.objectContainer.set_visible(true);if(this.fabricObject!=null&&this.fabricObject.dom&&this.fabricObject.dom.firstChild!=null){if(this.json.type=="youtube"||this.json.type=="vimeo"){this.fabricObject.iframe.src=this.fabricObject.createRealSrc()}else if(this.json.type=="nativeVideo"){this.fabricObject.playVideo()}}},ff_deactive:function(){this.set_visible(false);this.objectContainer.set_visible(false);if(this.fabricObject!=null&&this.fabricObject.dom&&this.fabricObject.dom.firstChild!=null){if(this.json.type=="youtube"||this.json.type=="vimeo"){this.fabricObject.iframe.src=this.fabricObject.createEditableSrc()}else if(this.json.type=="audio"){this.fabricObject.puseAudio()}else if(this.json.type=="nativeVideo"){this.fabricObject.pauseVideo()}}},destroyMe:function(){fabric_FabricBaseObject.prototype.destroyMe.call(this);this.canvasF.removeBaseObject(this.fabricObject);this.canvasF.clear();this.canvasF=null;this.objectContainer.div.remove();this.objectContainer.div=null},__class__:fabric_FabricObject});var fabric_PageObjectGet=function(){this.onErr=null;this.onCom=null;this.objectJson=null;this.pageObjects=new haxe_ds_StringMap};$hxClasses["fabric.PageObjectGet"]=fabric_PageObjectGet;fabric_PageObjectGet.__name__=["fabric","PageObjectGet"];fabric_PageObjectGet.getInstance=function(){if(fabric_PageObjectGet.instance==null){fabric_PageObjectGet.instance=new fabric_PageObjectGet}return fabric_PageObjectGet.instance};fabric_PageObjectGet.prototype={objectJson:null,onCom:null,onErr:null,pageObjects:null,initConfig:function(e,t,i,s){var a=this;this.onCom=i;this.onErr=s;var r=window.document.createElement("script");r.src=e;r.onload=function(){var e=new base_baseLoad_LoadResource(t,$bind(a,a.onComhandle),null,$bind(a,a.onErrorHandle))};window.document.head.appendChild(r)},onComhandle:function(e){if(js_Boot.__cast(e.target.data,String).length>50){this.objectJson=JSON.parse(e.target.data);var t=$iterator(openfl_utils__$Object_Object_$Impl_$)(this.objectJson);while(t.hasNext()){var i=t.next();var s=this.loadObject(Reflect.field(this.objectJson,i));var a=this.pageObjects;if(__map_reserved[i]!=null){a.setReserved(i,s)}else{a.h[i]=s}}this.onCom(e)}else{this.onErrorHandle(e)}},onErrorHandle:function(e){this.onErr(e)},loadObject:function(e){if(!(e!=null&&Object.prototype.hasOwnProperty.call(e,"backgroundImage"))){return e}var t=Reflect.field(e,"backgroundImage").left;var i=Reflect.field(e,"backgroundImage").top;var s=2;var a=2;var r=$iterator(openfl_utils__$Object_Object_$Impl_$)(e);while(r.hasNext()){var n=r.next();if(n=="objects"){var _=Reflect.field(e,n);var o=$iterator(openfl_utils__$Object_Object_$Impl_$)(_);while(o.hasNext()){var l=o.next();var h=Reflect.field(_,l);if(h.master==null){var c=0;var u=0;if(h.shadow!=null){c=Reflect.field(h,"shadow").offsetX;u=Reflect.field(h,"shadow").offsetY}h.selectable=false;h.hoverCursor="auto";h.editable=false;h.realLeft=0+h.left-t;h.realTop=0+h.top-i;h.realAngle=h.angle;h.realWidth=(h.width+c*2+h.strokeWidth*2)*h.scaleX;h.realHeight=(h.height+u*2+h.strokeWidth*2)*h.scaleY;h.left=0;h.top=0;h.angle=0}else if(h.master==h.id){var f=[];var p=$iterator(openfl_utils__$Object_Object_$Impl_$)(h);while(p.hasNext()){var d=p.next();if(Reflect.field(h,d).master!=null&&Reflect.field(h,d).id!=null){f.push([Reflect.field(h,d).left,Reflect.field(h,d).top,Reflect.field(h,d).left+Reflect.field(h,d).width*Reflect.field(h,d).scaleX,Reflect.field(h,d).top+Reflect.field(h,d).height*Reflect.field(h,d).scaleY])}}var g=null;var m=null;var v=null;var b=null;var y=0;while(y<f.length){var x=f[y];++y;if(g==null){g=x[0]}else if(g>x[0]){g=x[0]}if(m==null){m=x[1]}else if(m>x[1]){m=x[1]}if(v==null){v=x[2]}else if(v<x[2]){v=x[2]}if(b==null){b=x[3]}else if(b<x[3]){b=x[3]}}h.realLeft=g-t-s;h.realTop=m-i-a;h.realWidth=v-g+s*2;h.realHeight=b-m+a*2;var w=$iterator(openfl_utils__$Object_Object_$Impl_$)(h);while(w.hasNext()){var k=w.next();if(Reflect.field(h,k).master!=null&&Reflect.field(h,k).id!=null){Reflect.field(h,k).selectable=false;Reflect.field(h,k).hoverCursor="auto";Reflect.field(h,k).editable=false;if(Reflect.field(h,k).master==Reflect.field(h,k).id){h.realAngle=Reflect.field(h,k).angle}Reflect.field(h,k).left=Reflect.field(h,k).left-g;Reflect.field(h,k).top=Reflect.field(h,k).top-m;Reflect.field(h,k).angle=0}}}}}}return e},__class__:fabric_PageObjectGet};var fabric_ParseObject=function(e){openfl_display_Sprite.call(this);this.pageIndex=e;this.ffobjects=[]};$hxClasses["fabric.ParseObject"]=fabric_ParseObject;fabric_ParseObject.__name__=["fabric","ParseObject"];fabric_ParseObject.__super__=openfl_display_Sprite;fabric_ParseObject.prototype=$extend(openfl_display_Sprite.prototype,{pageIndex:null,json:null,ffobjects:null,loadObject:function(){var e=fabric_PageObjectGet.getInstance();var t=""+this.pageIndex;var i=e.pageObjects;this.json=__map_reserved[t]!=null?i.getReserved(t):i.h[t];e=null;if(this.json==null){return}var s=$iterator(openfl_utils__$Object_Object_$Impl_$)(this.json);while(s.hasNext()){var a=s.next();if(a=="objects"){var r=Reflect.field(this.json,a);var n=$iterator(openfl_utils__$Object_Object_$Impl_$)(r);while(n.hasNext()){var _=n.next();var o=Reflect.field(r,_);var l=new fabric_FabricObject(o);this.addChild(l);l.loadObject();this.ffobjects.push(l)}}}},destroyMe:function(){if(this.ffobjects!=null){var e=0;var t=this.ffobjects;while(e<t.length){var i=t[e];++e;i.destroyMe()}this.ffobjects=null;this.json=null}},ff_active:function(){if(this.ffobjects!=null&&this.ffobjects.length>0){var e=0;var t=this.ffobjects;while(e<t.length){var i=t[e];++e;js_Boot.__cast(i,fabric_FabricBaseObject).ff_active()}}},ff_deactive:function(){if(this.ffobjects!=null&&this.ffobjects.length>0){var e=0;var t=this.ffobjects;while(e<t.length){var i=t[e];++e;js_Boot.__cast(i,fabric_FabricBaseObject).ff_deactive()}}},__class__:fabric_ParseObject});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 i=function(){t.lableStatus.set_textColor(16711680);t.lableStatus.set_text("loading book.bin...   : failure, format error")};if(e.xmlString==null||e.xmlString.length<=0){i();return}this.onComFun(e.xmlString)},__class__:ffcrypt_FfcryptMain});var ffcrypt_FfcryptMainJs=function(){};$hxClasses["ffcrypt.FfcryptMainJs"]=ffcrypt_FfcryptMainJs;ffcrypt_FfcryptMainJs.__name__=["ffcrypt","FfcryptMainJs"];var ffcrypt_codes_Base16=function(){};$hxClasses["ffcrypt.codes.Base16"]=ffcrypt_codes_Base16;ffcrypt_codes_Base16.__name__=["ffcrypt","codes","Base16"];ffcrypt_codes_Base16.decode=function(e){var t=0;var i=e.length;var s;var a=[];while(t<i){s=HxOverrides.substr(e,t,2);a[t/2|0]=Std.parseInt("0x"+s);t+=2}return a};var ffcrypt_codes_FFBookBinParse=function(e,t){this._key_ff="9e3879b99b9873e9b979389e6b695159";this._key=e;if(t!=null){this._key_ff=t}};$hxClasses["ffcrypt.codes.FFBookBinParse"]=ffcrypt_codes_FFBookBinParse;ffcrypt_codes_FFBookBinParse.__name__=["ffcrypt","codes","FFBookBinParse"];ffcrypt_codes_FFBookBinParse.uncompress=function(e,t){if(t==null){t=65536}var i=new haxe_io_Bytes(new ArrayBuffer(t));var s=new haxe_io_BytesBuffer;var a=new haxe_zip_InflateImpl(e,false,false);while(true){var r=a.readBytes(i,0,t);if(r<0||r>i.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var n=s.b;var _=i.b;var o=0;var l=r;while(o<l){var h=o++;s.b.push(_[h])}if(r<t){break}}return s.getBytes()};ffcrypt_codes_FFBookBinParse.prototype={_key:null,_key_ff:null,parse_v1:function(e,t){try{var i=hu_vpmedia_crypt_RC4ByteArray.decryptToByteArray(e,t);i.position=0;var s=new haxe_io_BytesBuffer;var a=0;var r=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(i);while(a<r){var n=a++;var _=i.readUnsignedByte();s.b.push(_)}var o=s.getBytes();var l=new haxe_io_BytesInput(o);l.set_bigEndian(false);var h=new haxe_zip_Reader(l);var c=h.read();var u=c.h;while(u!=null){var f=u.item;u=u.next;var p=f;if(p.fileName=="book.xml"||p.fileName=="mobile.xml"){var d=new haxe_io_BytesInput(p.data);var g=d.totlen;var m=ffcrypt_codes_FFBookBinParse.uncompress(d,g);var v=m.toString();return v}}}catch(e){haxe_CallStack.lastException=e;return null}return null},parse_v2:function(e){var t;if(e!=null){var i=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);t=_$UInt_UInt_$Impl_$.gt("1STFLIPBINMC".length+4+16,i)}else{t=true}if(t){return null}try{var s=ffcrypt_codes_Base16.decode(this._key_ff);e.position="1STFLIPBINMC".length+4;var a=e.readUTFBytes(128);var r=hu_vpmedia_crypt_Hex.toArray(a);r.position=0;var n=[];var _=0;var o=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(r);while(_<o){var l=_++;var h=r.readUnsignedByte();n.push(h)}var c=ffcrypt_codes_FFDecrypt.decrypt(s,n);var u="";var f=0;var p=c.length;while(f<p){var d=f++;u+=String.fromCharCode(c[d])}e.position="1STFLIPBINMC".length+4+128;var g=new openfl_utils_ByteArrayData(0);var m=g;e.readBytes(m,0,openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)-("1STFLIPBINMC".length+4+128));return this.parse_v1(u,m)}catch(e){haxe_CallStack.lastException=e;return null}},parse:function(e){if(_$UInt_UInt_$Impl_$.gte(256,openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e))){return null}var t=e.readUTFBytes("1STFLIPBINMC".length);e.position=0;if(t!="1STFLIPBINMC"){return this.parse_v1(this._key,e)}return this.parse_v2(e)},__class__:ffcrypt_codes_FFBookBinParse};var ffcrypt_codes_FFDecrypt=function(){};$hxClasses["ffcrypt.codes.FFDecrypt"]=ffcrypt_codes_FFDecrypt;ffcrypt_codes_FFDecrypt.__name__=["ffcrypt","codes","FFDecrypt"];ffcrypt_codes_FFDecrypt.decrypt=function(e,t){if(e.length!=16){throw new js__$Boot_HaxeError(ffcrypt_codes_FFDecrypt.ERROR_KEY)}if(t.length<8||t.length%4!=0){throw new js__$Boot_HaxeError(ffcrypt_codes_FFDecrypt.ERROR_BLOCK)}var i=[];var s=e.length;var a=0;var r=0;var n=0;var _=0;var o=0;while(o<s){a=e[o];r=e[o+1]<<8;n=e[o+2]<<16;_=e[o+3]<<24;i[o/4|0]=a|r|n|_;o+=4}var l=i;var h=[];var c=t.length;var u=0;var f=0;var p=0;var d=0;var g=0;while(g<c){u=t[g];f=t[g+1]<<8;p=t[g+2]<<16;d=t[g+3]<<24;h[g/4|0]=u|f|p|d;g+=4}var m=h;var v=m.length;var b=m[v-1];var y=m[0];var x=-1640531527;var w;var k;var P=Math.floor(6+52/v);var C=P*x;while(C!=0){k=C>>>2&3;var T=v-1;while(T>=0){b=m[T>0?T-1:v-1];w=(b>>>5^y<<2)+(y>>>3^b<<4)^(C^y)+(l[T&3^k]^b);var M=m;var S=T;M[S]-=w;y=M[S];--T}C-=x}var $=[];var E=m.length;var B;var L;var R;var A;var I=0;var D=E;while(I<D){var F=I++;B=m[F]&255;L=(m[F]&65280)>>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,i,s,a){this.isLoad=false;this.progress=0;this.loader=null;this.progress=0;this.loadType="";this.isLoad=false;this.onOpen=e;this.onProgress=i;this.onIoError=s;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,i,s,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=i;this.onIoError=s;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 i=t.data;var s=new ffcrypt_codes_FFBookBinParse(ffcrypt_samples_TSBookBinParse.BinTestKey);this.xmlString=s.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.renderStyle="mix";this.isPC=true;this.isConfigEncryption=true;openfl_display_Sprite.call(this);this.appWidth=e;this.appHeight=t;this.loadingGif=new base_baseLoad_LoadResource("./img/loading.gif");this.loadingGif.set_x(this.appWidth/2);this.loadingGif.set_y(this.appHeight/2);this.addChild(this.loadingGif);if(this.renderStyle=="pdf"||this.renderStyle=="mix"){var i=flipbookMM_global_GetDivJs.getInstance();i.loadPdfjs($bind(this,this.init))}else{this.init()}};$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,styleType:null,background:null,toolBar:null,isConfigEncryption:null,isPC:null,renderStyle:null,loadingGif:null,register:null,encrypt:null,pdfHandle:function(e){var t=flipbookMM_bookBox_Pdfjs.getInstance();if(t.getPageNum()>0){this.removeEventListener("enterFrame",$bind(this,this.pdfHandle));this.loadBook()}},init:function(){this.initConfig()},initConfig:function(){var t=this;var e=base_baseUtils_GlobalFun.serachToStr("latest");if(this.isConfigEncryption){if(this.isPC){this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH_BIN+e,$bind(this,this.loadConfig))}else{this.ffcrptMain=new ffcrypt_FfcryptMain(flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN+e,$bind(this,this.loadConfig))}this.addChild(this.ffcrptMain)}else{var i=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,i)}else{this.appLoader=new base_baseLoad_LoadData(flipbookMM_config_Resource.FLIPBOOKXML_PATH+e,i)}}},loadConfig:function(e){this.ffcrptMainJs=null;var t=new flipbookMM_config_ConfigInit(Xml.parse(e));this.isMobileDevice();this.initOtherParameter();this.pdfjsInit()},pdfjsInit:function(){if(this.renderStyle=="pdf"){var e=flipbookMM_bookBox_Pdfjs.getInstance();var t=flipbookMM_config_ConfigSetting.getInstance();e.loadPdf(t.get(flipbookMM_config_ConfigKey.DownloadFileUrl));t=null;this.addEventListener("enterFrame",$bind(this,this.pdfHandle))}else{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)},loadEncryptInfo:function(){this.encrypt=new flipbookMM_market_EncryptJs;this.encrypt.set_x((this.appWidth-this.encrypt.get_width())/2/window.devicePixelRatio);this.encrypt.set_y((this.appHeight-this.encrypt.get_height())/2/window.devicePixelRatio)},loadBook:function(){var e=flipbookMM_config_ConfigSetting.getInstance();this.styleType=e.getBookStyleType();e=null;if(this.styleType==3){var t=flipbookMM_global_GetDivJs.getInstance();t.loadThreejs($bind(this,this.loadFarbric));t=null}else{this.loadFarbric()}},loadFarbric:function(){var t=this;var e=flipbookMM_config_ConfigSetting.getInstance();var i=e.get(flipbookMM_config_ConfigKey.PageObjectEnable);var s=e.get(flipbookMM_config_ConfigKey.PageObjectConfigJson);var a=e.get(flipbookMM_config_ConfigKey.PageObjectConfigJs);if(i=="Enable"){var r=base_baseUtils_GlobalFun.serachToStr("latest");var n=fabric_PageObjectGet.getInstance();n.initConfig(a+r,s+r,function(e){t.loadBookHandle()},function(e){t.loadBookHandle()})}else{this.loadBookHandle()}},loadBookHandle:function(){this.loadBackground();this.loadRegisterInfo();this.loadEncryptInfo();this.initBookContent(this.styleType);this.loadToolBar()},initBookContent: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=flipbookMM_config_ConfigSetting.getInstance();var t=flipbookMM_global_GetDivJs.getInstance();if(t.isMobileDevice()){e.set(flipbookMM_config_ConfigKey.JS_mobile,"true");e.set(flipbookMM_config_ConfigKey.ZoomButtonEnable,"Hide")}else{e.set(flipbookMM_config_ConfigKey.JS_mobile,"false")}e=null;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");if(this.renderStyle=="pdf"){e.set(flipbookMM_config_ConfigKey.PdfjsRenderEnable,"yes");if(e.get(flipbookMM_config_ConfigKey.JS_mobile)=="true"){e.set(flipbookMM_config_ConfigKey.TxtViewButtionEnable,"hide")}}else if(this.renderStyle=="mix"){e.set(flipbookMM_config_ConfigKey.MixRenderEnable,"yes");if(e.get(flipbookMM_config_ConfigKey.JS_mobile)=="true"){e.set(flipbookMM_config_ConfigKey.TxtViewButtionEnable,"hide")}}else{e.set(flipbookMM_config_ConfigKey.PdfjsRenderEnable,"no");e.set(flipbookMM_config_ConfigKey.TxtViewButtionEnable,"hide")}e=null},getFisrtPageIndex:function(e){var t=1;var i=this.getUrlParam("pageIndex");if(i.length>0){t=Std.parseInt(i);if(t<=0||t>e){t=1}}return t},getUrlParam:function(e){var t=window.location.search;var i=t.split("?");if(i.length>1){var s=i[1].split("&");var a;var r=0;var n=s.length;while(r<n){var _=r++;a=s[_].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)}if(this.encrypt!=null){this.encrypt.set_x((this.appWidth-this.encrypt.get_width())/2/window.devicePixelRatio);this.encrypt.set_y((this.appHeight-this.encrypt.get_height())/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 i=this;openfl_display_Sprite.call(this);var s=flipbookMM_config_ConfigSetting.getInstance();if(s.hasKey(flipbookMM_config_ConfigKey.BackgroundAlpha)){this.bgAlpha=s.get(flipbookMM_config_ConfigKey.BackgroundAlpha)}if(s.hasKey(flipbookMM_config_ConfigKey.StageBackgroundColor)){this.bgColor=s.get(flipbookMM_config_ConfigKey.StageBackgroundColor)}if(s.hasKey(flipbookMM_config_ConfigKey.StageBackgroundImg)){var a=s.get(flipbookMM_config_ConfigKey.StageBackgroundImg);if(a.length>4){this.bgResUrl=a}}if(s.hasKey(flipbookMM_config_ConfigKey.StageBackgroundScene)){var r=s.get(flipbookMM_config_ConfigKey.StageBackgroundScene);if(r.length>4){this.bgResUrl=r}}if(s.yesOrNo(s.get(flipbookMM_config_ConfigKey.StageBackgroundMusicEnable))){var n=s.get(flipbookMM_config_ConfigKey.StageBackgroundMusicUrl);if(n!=null&&n.length>4){this.bgMusic=new base_baseSprite_PlayMusicJS(n);this.bgMusic.play(Std.parseInt(s.get(flipbookMM_config_ConfigKey.MusicLoopCount)));if(!s.yesOrNo(s.get(flipbookMM_config_ConfigKey.MusicAutoStart))){this.bgMusic.stop()}}}s=null;this.bgType=this.detectType(this.bgResUrl);this.resize(e,t);var _=flipbookMM_events_EventCenter.getInstance();_.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(i.bgMusic!=null){i.bgMusic.ContinuePlay()}}else if(t=="off"){if(i.bgMusic!=null){i.bgMusic.stop()}}}});_=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 i=this;this.bgWidth=e;this.bgHeight=t;var s=this.bgType;if(s==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(s){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(i.bgResLoader,base_baseLoad_LoadImg).resize(i.bgWidth,i.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 i=e.toLowerCase();if(i.indexOf(".jpg",0)>0||i.indexOf(".jpeg",0)>0||i.indexOf(".png",0)>0){t="img"}else if(i.indexOf(".gif",0)>0){t="gif"}else if(i.indexOf(".swf",0)>0){t="swf"}else if(i.indexOf(".mp4",0)>0){t="mp4"}else{t="data"}i=null;return t},__class__:flipbookMM_background_Background});var flipbookMM_bookBox_BookBox=function(e,t,i,s,a,r,n,_){if(_==null){_=1}if(r==null){r=0}this.doubleStatus=0;this.pageDefScale=1;openfl_display_Sprite.call(this);this.pageWidth=i;this.pageHeight=s;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.isRightToLeft=o.yesOrNo(o.get(flipbookMM_config_ConfigKey.IsRightToLeft));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=4;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,i,s,a,n,_,this.isRightToLeft)}else if(this.bookStyle==1){this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_,this.isRightToLeft)}else if(this.bookStyle==2){this.pageStyle=new flipbookMM_bookBox_style_SlideDoubleStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_,this.isRightToLeft)}else if(this.bookStyle==3){this.pageStyle=new flipbookMM_bookBox_style_ThreeStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_,this.isRightToLeft)}else{this.pageStyle=new flipbookMM_bookBox_style_FlipStyle(this.pageStyleW,this.pageStyleH,i,s,a,n,_,this.isRightToLeft)}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,isRightToLeft: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 l=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);l.setPageDefault();l.pageStyle.gotoPage(t)});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_NEXT,this,function(e){l.setPageDefault();l.pageStyle.gotoNextPage()});e.addEventListener(flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS,this,function(e){l.setPageDefault();l.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(l.pageStyle!=null){l.pageStyle.setMuteMode(false)}}else if(t=="off"){if(l.pageStyle!=null){l.pageStyle.setMuteMode(true)}}}});e.addEventListener(flipbookMM_events_EventConst.SECURITY_PASS_OK,this,function(e){l.resize(l.bookBoxWidth+.001,l.bookBoxHeight+.001)});e=null;if(this.isMobile){this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE,function(e){l.isSlide=true;l.pageStyle.gotoNextPage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE,function(e){l.isSlide=true;l.pageStyle.gotoPrePage()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.isDrag=true;var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastPosition.x+e.get_touchSlidePoint().x;if(t>=l.bookBoxWidth){if(s>0){s=0}else if(s<l.bookBoxWidth-t){s=l.bookBoxWidth-t}}else if(s<0){s=0}else if(s>l.bookBoxWidth-t){s=l.bookBoxWidth-t}var a=l.lastPosition.y+e.get_touchSlidePoint().y;if(i>=l.bookBoxHeight){if(a>0){a=0}else if(a<l.bookBoxHeight-i){a=l.bookBoxHeight-i}}else if(a<0){a=0}else if(a>l.bookBoxHeight-i){a=l.bookBoxHeight-i}l.currentPosition.x=s;l.currentPosition.y=a;l.pageStyle.set_x(l.currentPosition.x);l.pageStyle.set_y(l.currentPosition.y)}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END,function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastPosition.x+e.get_touchSlidePoint().x;if(t>=l.bookBoxWidth){if(s>0){s=0}else if(s<l.bookBoxWidth-t){s=l.bookBoxWidth-t}}else if(s<0){s=0}else if(s>l.bookBoxWidth-t){s=l.bookBoxWidth-t}var a=l.lastPosition.y+e.get_touchSlidePoint().y;if(i>=l.bookBoxHeight){if(a>0){a=0}else if(a<l.bookBoxHeight-i){a=l.bookBoxHeight-i}}else if(a<0){a=0}else if(a>l.bookBoxHeight-i){a=l.bookBoxHeight-i}l.currentPosition.x=s;l.currentPosition.y=a;l.pageStyle.set_x(l.currentPosition.x);l.pageStyle.set_y(l.currentPosition.y);l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.pageStyle.updatePdfTxtPosition()}});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM,function(e){if(l.isZooming==false){l.cofeX=l.pageStyle.getZoomCenterCoefX();l.cofeY=l.pageStyle.getZoomCenterCoefY()}l.isZooming=true;l.pageStyle.updateStyleStatus(true);var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();var s=l.lastScale;var a=e.get_touchScale();l.currentScale=s*a;if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleY()==l.currentScale){return}l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);var r=l.pageStyle.get_width();var n=l.pageStyle.get_height();var _=l.pageStyle.get_x()+(t-r)/l.pageStyle.getZoomCoefX(l.cofeX);if(r>=l.bookBoxWidth){if(_>0){_=0}else if(_<l.bookBoxWidth-r){_=l.bookBoxWidth-r}}else if(_<0){_=0}else if(_>l.bookBoxWidth-r){_=l.bookBoxWidth-r}var o=l.pageStyle.get_y()+(i-n)/l.pageStyle.getZoomCoefY(l.cofeY);if(n>=l.bookBoxHeight){if(o>0){o=0}else if(o<l.bookBoxHeight-n){o=l.bookBoxHeight-n}}else if(o<0){o=0}else if(o>l.bookBoxHeight-n){o=l.bookBoxHeight-n}l.pageStyle.set_x(_);l.pageStyle.set_y(o);l.lastPosition.x=l.pageStyle.get_x();l.lastPosition.y=l.pageStyle.get_y()});this.pageStyle.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END,function(e){var t=l.lastScale;var i=e.get_touchScale();l.currentScale=t*i;if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleX()<1){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.5,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);l.isZooming=false})}else{l.pageStyle.updateContentSta(true);l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);l.lastScale=l.currentScale;l.pageStyle.updatePdfTxtPosition()}})}else{this.pageStyle.addEventListener("mouseDown",function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.isDrag=true;l.pageStyle.startDrag(false);l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y}});this.pageStyle.addEventListener("mouseUp",function(e){if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.pageStyle.stopDrag();l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.pageStyle.updatePdfTxtPosition()}});var t=flipbookMM_events_EventCenter.getInstance();t.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM,this,function(e){l.currentScale=js_Boot.__cast(e._data._object,Float);if(l.isZooming==false){l.cofeX=l.pageStyle.getZoomCenterCoefX();l.cofeY=l.pageStyle.getZoomCenterCoefY()}l.isZooming=true;l.pageStyle.updateStyleStatus(true);var t=l.pageStyle.get_width();var i=l.pageStyle.get_height();if(l.currentScale>l.maxZoomScale){l.currentScale=l.maxZoomScale}if(l.pageStyle.get_scaleY()==l.currentScale){return}l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);var s=l.pageStyle.get_width();var a=l.pageStyle.get_height();var r=l.pageStyle.get_x()+(t-s)/l.pageStyle.getZoomCoefX(l.cofeX);if(s>=l.bookBoxWidth){if(r>0){r=0}else if(r<l.bookBoxWidth-s){r=l.bookBoxWidth-s}}else if(r<0){r=0}else if(r>l.bookBoxWidth-s){r=l.bookBoxWidth-s}var n=l.pageStyle.get_y()+(i-a)/l.pageStyle.getZoomCoefY(l.cofeY);if(a>=l.bookBoxHeight){if(n>0){n=0}else if(n<l.bookBoxHeight-a){n=l.bookBoxHeight-a}}else if(n<0){n=0}else if(n>l.bookBoxHeight-a){n=l.bookBoxHeight-a}l.pageStyle.set_x(r);l.pageStyle.set_y(n);l.lastPosition.x=l.pageStyle.get_x();l.lastPosition.y=l.pageStyle.get_y()});t.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM_END,this,function(e){if(l.pageStyle.get_scaleX()<=1){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.5,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);l.isZooming=false})}else{l.pageStyle.updateContentSta(true);l.pageStyle.set_scaleX(l.currentScale);l.pageStyle.set_scaleY(l.currentScale);l.lastScale=l.currentScale;l.pageStyle.updatePdfTxtPosition();l.isZooming=false}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));t=null});t=null}this.addEventListener("click",function(e){var t=e.stageX;l.doubleStatus++;if(l.doubleStatus==1){haxe_Timer.delay(function(){if(l.doubleStatus==1){if(l.isMobile&&!l.isZooming&&!l.isSlide&&!l.isDrag){if(t<l.LrNavigateWidth*window.devicePixelRatio){l.setPageDefault();l.pageStyle.gotoPrePage()}else if(t>l.bookBoxWidth-l.LrNavigateWidth*window.devicePixelRatio){l.setPageDefault();l.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(l,null,null)));e=null}}}l.isSlide=false;l.isZooming=false;l.isDrag=false;l.doubleStatus=0},300)}else if(l.doubleStatus>=2){l.doubleStatus=0;l.isSlide=false;l.isZooming=false;l.isDrag=false;if(l.pageStyle.isPlaying){return}if(l.pageStyle.get_scaleY()!=l.pageDefScale){l.pageStyle.updateContentSta(false);motion_Actuate.tween(l.pageStyle,.3,{x:l.pageDefPosiX,y:l.pageDefPosiY,scaleX:l.pageDefScale,scaleY:l.pageDefScale}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateStyleStatus(false);var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));e=null})}else{var i=l.doubleDefScale;var s=l.pageStyle.get_x()+l.pageStyle.get_width()*(l.pageStyle.get_scaleX()-i)/l.pageStyle.getZoomCoefX(.5);var a=l.pageStyle.get_y()+l.pageStyle.get_height()*(l.pageStyle.get_scaleY()-i)/l.pageStyle.getZoomCoefY(.5);l.pageStyle.updateStyleStatus(true);motion_Actuate.tween(l.pageStyle,.3,{x:s,y:a,scaleX:i,scaleY:i}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){l.currentPosition.x=l.pageStyle.get_x();l.currentPosition.y=l.pageStyle.get_y();l.lastPosition.x=l.currentPosition.x;l.lastPosition.y=l.currentPosition.y;l.currentScale=l.pageStyle.get_scaleY();l.lastScale=l.currentScale;l.pageStyle.updateContentSta(true);l.pageStyle.updatePdfTxtPosition();var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(l,l.currentScale,null)));e=null})}}l.pageStyle.playBKMusic()});this.addEventListener("mouseWheel",function(e){if(e.delta>0){l.pageStyle.gotoNextPage()}else{l.pageStyle.gotoPrePage()}});var i=flipbookMM_config_ConfigSetting.getInstance();if(i.yesOrNo(i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicEnable))){var s=i.get(flipbookMM_config_ConfigKey.StageBackgroundMusicUrl);if(s!=null&&s.length>4){if(i.yesOrNo(i.get(flipbookMM_config_ConfigKey.MusicAutoStart))){this.addEventListener("click",$bind(this,this.playBookBackgroundMusic))}}}},playBookBackgroundMusic:function(e){var t=this;var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SOUNDBTN_ON_OFF,new flipbookMM_events_EventObject(this,"on",null)));i=null;haxe_Timer.delay(function(){t.removeEventListener("click",$bind(t,t.playBookBackgroundMusic))},5e3)},setPageDefault:function(){if(this.pageStyle!=null&&this.pageStyle.get_scaleY()!=this.pageDefScale){this.pageStyle.updateContentSta(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);var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,new flipbookMM_events_EventObject(this,this.pageDefScale,null)));e=null}},__class__:flipbookMM_bookBox_BookBox});var flipbookMM_bookBox_ManagerBookLayer=function(e,t,i,s){this.pageWidth=e;this.pageHeight=t;this.maxPageIndex=i;this.pageBackColor=s;this.layerWidth=this.pageWidth;this.layerHeight=this.pageHeight;this.preloadInterval=1;this.isTxtRender=false;this.isPdfjsRender=false;var a=flipbookMM_config_ConfigSetting.getInstance();if(a.get(flipbookMM_config_ConfigKey.PdfjsRenderEnable)=="yes"){this.isPdfjsRender=true}if(a.yesOrNo(a.get(flipbookMM_config_ConfigKey.TxtViewButtionEnable))){this.isTxtRender=true}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,i,s){if(flipbookMM_bookBox_ManagerBookLayer.instance==null){flipbookMM_bookBox_ManagerBookLayer.instance=new flipbookMM_bookBox_ManagerBookLayer(e,t,i,s)}return flipbookMM_bookBox_ManagerBookLayer.instance};flipbookMM_bookBox_ManagerBookLayer.prototype={layerList:null,layerWidth:null,layerHeight:null,pageWidth:null,pageHeight:null,pageBackColor:null,isPdfjsRender:null,isTxtRender:null,maxPageIndex:null,preloadInterval:null,resize:function(e,t){this.layerWidth=e;this.layerHeight=t;var i=this.layerList.keys();while(i.hasNext()){var s=i.next();js_Boot.__cast(this.layerList.h[s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(s);this.getLoadPage(s)}},updateBufferNum:function(e){this.preloadInterval=e},getLoadPage:function(e,t,i){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,t,this.isPdfjsRender,this.isTxtRender,i);this.layerList.h[-e]=s}else{s=this.layerList.h[-e];haxe_Timer.delay(function(){if(i){i()}},100)}}else if(!this.layerList.h.hasOwnProperty(e)){s=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,e,this.pageBackColor,t,this.isPdfjsRender,this.isTxtRender,i);this.layerList.h[e]=s}else{s=this.layerList.h[e];haxe_Timer.delay(function(){if(i){i()}},100)}return s}else{var a=new flipbookMM_bookBox_PageLayer(this.layerWidth,this.layerHeight,this.pageWidth,this.pageHeight,0,this.pageBackColor,t,this.isPdfjsRender,this.isTxtRender,i);return a}},preloadPage:function(e,t){if(t==null){t=false}if(base_baseUtils_MapUtil.$length(this.layerList)>2*this.preloadInterval+1){var i=this.layerList.keys();while(i.hasNext()){var s=i.next();if(s>=0){if(Math.abs(s-e)>this.preloadInterval){js_Boot.__cast(this.layerList.h[s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(s);if(this.layerList.h.hasOwnProperty(-s)){js_Boot.__cast(this.layerList.h[-s],flipbookMM_bookBox_PageLayer).destroyMe();this.layerList.remove(-s)}}}}}var a=e-this.preloadInterval;var r=e+this.preloadInterval;if(a>0){a=a}else{a=1}if(r<this.maxPageIndex){r=r}else{r=this.maxPageIndex}if(a<r){var n=a;var _=r+1;while(n<_){var o=n++;this.getLoadPage(o);if(t){this.getLoadPage(o,true)}}}},__class__:flipbookMM_bookBox_ManagerBookLayer};var flipbookMM_bookBox_ObjectConfigInit=function(){this.objectXml=null};$hxClasses["flipbookMM.bookBox.ObjectConfigInit"]=flipbookMM_bookBox_ObjectConfigInit;flipbookMM_bookBox_ObjectConfigInit.__name__=["flipbookMM","bookBox","ObjectConfigInit"];flipbookMM_bookBox_ObjectConfigInit.getInstance=function(){if(flipbookMM_bookBox_ObjectConfigInit.instance==null){flipbookMM_bookBox_ObjectConfigInit.instance=new flipbookMM_bookBox_ObjectConfigInit}return flipbookMM_bookBox_ObjectConfigInit.instance};flipbookMM_bookBox_ObjectConfigInit.prototype={objectXml:null,setXmlData:function(e){this.objectXml=e},getXmlData:function(){return this.objectXml},__class__:flipbookMM_bookBox_ObjectConfigInit};var flipbookMM_bookBox_PageEncrypt=function(e,t,i,s){this.isEncrypt=e;this.type=t;this.excludeFrontPages=i;this.securityMode=s};$hxClasses["flipbookMM.bookBox.PageEncrypt"]=flipbookMM_bookBox_PageEncrypt;flipbookMM_bookBox_PageEncrypt.__name__=["flipbookMM","bookBox","PageEncrypt"];flipbookMM_bookBox_PageEncrypt.prototype={isEncrypt:null,type:null,excludeFrontPages:null,securityMode:null,singlePassword:null,userPass:null,setSinglePassword:function(e){this.singlePassword=e},setUserPass:function(e){this.userPass=e},verifySinglePassword:function(e){var t=haxe_crypto_Base64.encode(haxe_io_Bytes.ofString(e));if(t==this.singlePassword){return true}return false},verifyUserPassword:function(e,t){var i=haxe_crypto_Base64.encode(haxe_io_Bytes.ofString(e));var s=haxe_crypto_Base64.encode(haxe_io_Bytes.ofString(t));var a=this.userPass;if(__map_reserved[i]!=null?a.existsReserved(i):a.h.hasOwnProperty(i)){var r=this.userPass;if((__map_reserved[i]!=null?r.getReserved(i):r.h[i])==s){return true}}return false},__class__:flipbookMM_bookBox_PageEncrypt};var flipbookMM_bookBox_PageLayer=function(e,t,i,s,a,r,n,_,o,l){if(o==null){o=false}if(_==null){_=false}if(n==null){n=false}if(r==null){r=16777215}this.svgContent=null;this.svgScaleContent=null;openfl_display_Sprite.call(this);this.loadOkFlag=false;this.textRenderFlag=o;this.pageIndex=a;this.pageLayerWidth=e;this.pageLayerHeight=t;this.pageOrginalW=i;this.pageOrginalH=s;this.layerCor=r;this.isMirror=n;this.loadFinFun=l;this.isPdfRenderFlag=_;if(a==0){this.back=new openfl_display_Sprite;this.back.get_graphics().beginFill(this.layerCor,0);this.back.get_graphics().drawRect(0,0,this.pageLayerWidth,this.pageLayerHeight);this.back.get_graphics().endFill();this.addChild(this.back);return}else if(a==9999){this.back=new openfl_display_Sprite;this.back.get_graphics().beginFill(this.layerCor,1);this.back.get_graphics().drawRect(0,0,this.pageLayerWidth,this.pageLayerHeight);this.back.get_graphics().endFill();this.addChild(this.back);return}else{this.back=new openfl_display_Sprite;this.back.get_graphics().beginFill(this.layerCor);this.back.get_graphics().drawRect(0,0,this.pageLayerWidth,this.pageLayerHeight);this.back.get_graphics().endFill();this.addChild(this.back)}this.pageLayerShell=new openfl_display_Sprite;this.addChild(this.pageLayerShell);var h=flipbookMM_bookBox_PagesConfigGet.getInstance().getEncryptData();if(h!=null&&h.isEncrypt==true){if(h.type=="all"){this.isEncrypt=true}else if(h.excludeFrontPages<this.pageIndex){this.isEncrypt=true}if(this.isEncrypt){return}}this.pageParameter=flipbookMM_bookBox_PagesConfigGet.getInstance().pageList[this.pageIndex-1];this.pageLine=new openfl_display_Sprite;this.pageLine.get_graphics().clear();this.pageLine.get_graphics().lineStyle(.5,0,.5);this.pageLine.get_graphics().moveTo(0,0);this.pageLine.get_graphics().lineTo(0,this.pageLayerHeight);this.pageLine.get_graphics().lineTo(this.pageLayerWidth,this.pageLayerHeight);this.pageLine.get_graphics().lineTo(this.pageLayerWidth,0);this.pageLine.get_graphics().lineTo(0,0);this.addChild(this.pageLine);if(this.isPdfRenderFlag){this.fObject=new fabric_ParseObject(this.pageIndex);this.fObject.loadObject();this.loadPdfjsPage()}else if(this.pageParameter.pdfUrl.length>0){this.fObject=new fabric_ParseObject(this.pageIndex);this.fObject.loadObject();this.loadSinglePdf()}else{this.fObject=new fabric_ParseObject(this.pageIndex);this.fObject.loadObject();this.loadSvgImgPage()}};$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,pageParameter:null,layerCor:null,isMirror:null,back:null,pageLine:null,svgScaleContent:null,svgContent:null,pageContent:null,pdfjsContent:null,singlePagePdfContent:null,object:null,fObject:null,pageLink:null,highlightText:null,gray:null,loading:null,pageLayerShell:null,pageDisplayStatus:null,isEncrypt:null,isPdfRenderFlag:null,textRenderFlag:null,loadFinFun:null,loadSvgImgPage:function(){if(this.pageParameter.pngUrl.length>0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.pageParameter.pngUrl,$bind(this,this.onSvgImgCom))}else if(this.pageParameter.imgUrl.length>0){this.pageContent=new flipbookMM_bookBox_book_ImgPage(this.pageParameter.imgUrl,$bind(this,this.onImageCom))}else{return}this.pageLayerShell.addChild(this.pageContent)},loadPdfjsPage:function(){this.pdfjsContent=new flipbookMM_bookBox_book_PdfjsPage(this.pageIndex,this.textRenderFlag,$bind(this,this.onPdfjsCom))},loadSinglePdf:function(){this.singlePagePdfContent=new flipbookMM_bookBox_book_SinglePdfPage(this.pageParameter.pdfUrl,1,this.textRenderFlag,$bind(this,this.onSinglePdfjsCom))},onPdfjsCom:function(e){if(this.loadOkFlag==false){if(this.loading!=null){this.removeChild(this.loading);this.loading.destroyMe();this.loading=null}this.pageRealW=this.pdfjsContent.originW;this.pageRealH=this.pdfjsContent.originH;this.pageContent=new flipbookMM_bookBox_book_Page;this.pageContent.get_graphics().beginFill(0,0);this.pageContent.get_graphics().drawRect(0,0,this.pageRealW,this.pageRealH);this.pageContent.get_graphics().endFill();this.pageLayerShell.addChild(this.pageContent);var t=this.pageOrginalW/this.pageRealW;var i=this.pageOrginalH/this.pageRealH;var s=t<i?t:i;if(!this.isMirror){this.pageContent.addChild(this.pdfjsContent);this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.pageLink);this.pageContent.addChild(this.fObject);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(s);this.pageContent.set_scaleY(s);this.pageContent.set_x((this.pageOrginalW-this.pageRealW*s)/2);this.pageContent.set_y((this.pageOrginalH-this.pageRealH*s)/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var n=a<r?a:r;if(this.isMirror){this.gray=new openfl_display_Sprite;this.gray.get_graphics().beginFill(16777215,.7);this.gray.get_graphics().drawRect(0,0,this.pageOrginalW,this.pageOrginalH);this.pageLayerShell.addChild(this.gray);this.pageLayerShell.set_scaleX(-n);this.pageLayerShell.set_scaleY(n);this.pageLayerShell.set_x(this.pageOrginalW*n)}else{this.pageLayerShell.set_scaleX(n);this.pageLayerShell.set_scaleY(n)}if(this.pdfjsContent!=null){var _=this.pageContent.get_scaleX()*this.pageLayerShell.get_scaleX()*this.get_scaleX();this.pdfjsContent.defScal=1/_;this.pdfjsContent.set_scaleY(1/_);this.pdfjsContent.set_scaleX(1/_);this.pdfjsContent.loadPage(this.pageRealW*_,this.pageRealH*_,this.loadFinFun)}this.addHighlightText();this.loadOkFlag=true}},onSinglePdfjsCom:function(e){if(this.loadOkFlag==false){if(this.loading!=null){this.removeChild(this.loading);this.loading.destroyMe();this.loading=null}this.pageRealW=this.singlePagePdfContent.originW;this.pageRealH=this.singlePagePdfContent.originH;this.pageContent=new flipbookMM_bookBox_book_Page;this.pageContent.get_graphics().beginFill(0,0);this.pageContent.get_graphics().drawRect(0,0,this.pageRealW,this.pageRealH);this.pageContent.get_graphics().endFill();this.pageLayerShell.addChild(this.pageContent);var t=this.pageOrginalW/this.pageRealW;var i=this.pageOrginalH/this.pageRealH;var s=t<i?t:i;if(!this.isMirror){this.pageContent.addChild(this.singlePagePdfContent);this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.pageLink);this.pageContent.addChild(this.fObject);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(s);this.pageContent.set_scaleY(s);this.pageContent.set_x((this.pageOrginalW-this.pageRealW*s)/2);this.pageContent.set_y((this.pageOrginalH-this.pageRealH*s)/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var n=a<r?a:r;if(this.isMirror){this.gray=new openfl_display_Sprite;this.gray.get_graphics().beginFill(16777215,.7);this.gray.get_graphics().drawRect(0,0,this.pageOrginalW,this.pageOrginalH);this.pageLayerShell.addChild(this.gray);this.pageLayerShell.set_scaleX(-n);this.pageLayerShell.set_scaleY(n);this.pageLayerShell.set_x(this.pageOrginalW*n)}else{this.pageLayerShell.set_scaleX(n);this.pageLayerShell.set_scaleY(n)}if(this.singlePagePdfContent!=null){var _=this.pageContent.get_scaleX()*this.pageLayerShell.get_scaleX()*this.get_scaleX();this.singlePagePdfContent.defScal=1/_;this.singlePagePdfContent.set_scaleY(1/_);this.singlePagePdfContent.set_scaleX(1/_);this.singlePagePdfContent.loadPage(this.pageRealW*_,this.pageRealH*_,this.loadFinFun)}this.addHighlightText();this.loadOkFlag=true}},onImageCom: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 i=this.pageOrginalH/this.pageRealH;var s=t<i?t:i;if(!this.isMirror){this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.pageLink);this.pageContent.addChild(this.fObject);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(s);this.pageContent.set_scaleY(s);this.pageContent.set_x((this.pageOrginalW-this.pageRealW*s)/2);this.pageContent.set_y((this.pageOrginalH-this.pageRealH*s)/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var n=a<r?a:r;if(this.isMirror){this.gray=new openfl_display_Sprite;this.gray.get_graphics().beginFill(16777215,.7);this.gray.get_graphics().drawRect(0,0,this.pageOrginalW,this.pageOrginalH);this.pageLayerShell.addChild(this.gray);this.pageLayerShell.set_scaleX(-n);this.pageLayerShell.set_scaleY(n);this.pageLayerShell.set_x(this.pageOrginalW*n)}else{this.pageLayerShell.set_scaleX(n);this.pageLayerShell.set_scaleY(n)}this.addHighlightText();this.loadOkFlag=true}},onSvgImgCom: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 i=this.pageOrginalH/this.pageRealH;var s=t<i?t:i;if(!this.isMirror){if(this.pageParameter.txtUrl.length>0&&this.pageParameter.pngUrl.length>0){this.svgContent=new flipbookMM_bookBox_book_SvgPage(this.pageParameter.txtUrl);this.pageContent.addChild(this.svgContent);this.svgScaleContent=new flipbookMM_bookBox_book_SvgPage(this.pageParameter.txtUrl);this.pageContent.addChild(this.svgScaleContent)}this.pageLink=new flipbookMM_bookBox_pageLink_PageLink(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.pageLink);this.object=new flipbookMM_bookBox_xObject_Object(this.pageIndex);this.pageLayerShell.addChild(this.object)}this.pageContent.set_scaleX(s);this.pageContent.set_scaleY(s);this.pageContent.set_x((this.pageOrginalW-this.pageRealW*s)/2);this.pageContent.set_y((this.pageOrginalH-this.pageRealH*s)/2);var a=this.pageLayerWidth/this.pageOrginalW;var r=this.pageLayerHeight/this.pageOrginalH;var n=a<r?a:r;if(this.isMirror){this.gray=new openfl_display_Sprite;this.gray.get_graphics().beginFill(16777215,.7);this.gray.get_graphics().drawRect(0,0,this.pageOrginalW,this.pageOrginalH);this.pageLayerShell.addChild(this.gray);this.pageLayerShell.set_scaleX(-n);this.pageLayerShell.set_scaleY(n);this.pageLayerShell.set_x(this.pageOrginalW*n)}else{this.pageLayerShell.set_scaleX(n);this.pageLayerShell.set_scaleY(n)}if(this.svgContent!=null||this.svgScaleContent!=null){var _=this.pageContent.get_scaleX()*this.pageLayerShell.get_scaleX()*this.get_scaleX();this.svgContent.defScal=1/_;this.svgContent.set_scaleX(this.svgContent.defScal);this.svgContent.set_scaleY(this.svgContent.defScal);this.svgContent.loadSvg(this.pageRealW*_,this.pageRealH*_,this.loadFinFun);this.svgScaleContent.defScal=this.svgContent.defScal}this.addHighlightText();this.loadOkFlag=true}},addHighlightText:function(){if(this.pageContent!=null){this.removeHighlightText();this.highlightText=new flipbookMM_bookBox_highlightText_HighlightTextNode(this.pageRealW,this.pageRealH,this.pageIndex);this.pageContent.addChild(this.highlightText)}},removeHighlightText:function(){if(this.pageContent!=null&&this.highlightText!=null){this.pageContent.removeChild(this.highlightText);this.highlightText=null}},changeObjectStatus:function(e){this.pageDisplayStatus=e;if(this.object!=null){if(this.object._ffobjects!=null&&this.object._ffobjects.length>0){var t=0;var i=this.object._ffobjects;while(t<i.length){var s=i[t];++t;if(e){js_Boot.__cast(s,xeditor_objects_TrObject).ff_active()}else{js_Boot.__cast(s,xeditor_objects_TrObject).ff_deactive()}}}}if(this.fObject!=null){if(e){this.fObject.ff_active()}else{this.fObject.ff_deactive()}}if(this.pdfjsContent!=null&&this.pdfjsContent.pdfPageView!=null||this.singlePagePdfContent!=null&&this.singlePagePdfContent.pdfPageView!=null){this.changePageTxtStatus()}else{this.addEventListener("enterFrame",$bind(this,this.changePageTxtStatus))}if(this.pageDisplayStatus){if(this.isEncrypt){var a=flipbookMM_events_EventCenter.getInstance();a.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SECURITY_WINDOW_ON));a=null}}},changePageTxtStatus:function(e){if(this.pdfjsContent!=null&&this.pdfjsContent.pdfPageView!=null){this.removeEventListener("enterFrame",$bind(this,this.changePageTxtStatus));if(this.pageDisplayStatus){var t=this.pdfjsContent.localToGlobal(new openfl_geom_Point(this.pdfjsContent.get_x(),this.pdfjsContent.get_y()));this.pdfjsContent.updateTxtPosition(t.x,t.y,true)}else{this.pdfjsContent.updateTxtPosition(9999,0,false)}}if(this.singlePagePdfContent!=null&&this.singlePagePdfContent.pdfPageView!=null){this.removeEventListener("enterFrame",$bind(this,this.changePageTxtStatus));if(this.pageDisplayStatus){var i=this.singlePagePdfContent.localToGlobal(new openfl_geom_Point(this.singlePagePdfContent.get_x(),this.singlePagePdfContent.get_y()));this.singlePagePdfContent.updateTxtPosition(i.x,i.y,true)}else{this.singlePagePdfContent.updateTxtPosition(9999,0,false)}}},changeBkMusicStatus:function(e){if(this.object!=null){if(this.object._ffobjects!=null&&this.object._ffobjects.length>0){var t=0;var i=this.object._ffobjects;while(t<i.length){var s=i[t];++t;if(e){js_Boot.__cast(s,xeditor_objects_TrObject).ff_active_BK_music()}else{js_Boot.__cast(s,xeditor_objects_TrObject).ff_deactive_BK_music()}}}}},destroyMe:function(){this.removeChildren();if(this.svgContent!=null){this.svgContent.destroyMe();this.svgContent=null}if(this.svgScaleContent!=null){this.svgScaleContent.destroyMe();this.svgContent=null}this.removeHighlightText();if(this.pageContent!=null){this.pageContent.destroyMe();this.pageContent=null}if(this.pdfjsContent!=null){this.pdfjsContent.destroyMe();this.pdfjsContent=null}if(this.singlePagePdfContent!=null){this.singlePagePdfContent.destroyMe();this.singlePagePdfContent=null}this.object=null;if(this.fObject!=null){this.fObject.destroyMe();this.fObject=null}this.highlightText=null;this.pageLink=null;this.gray=null;this.back=null;this.pageLine=null;if(this.loading!=null){this.loading.destroyMe();this.loading=null}this.pageLayerShell=null},updateSvgContentSta:function(e,t){var i=this;if(this.svgContent!=null){this.svgContent.set_alpha(1);this.svgScaleContent.set_alpha(0);this.svgScaleContent.set_scaleX(this.svgScaleContent.defScal/e);this.svgScaleContent.set_scaleY(this.svgScaleContent.defScal/t);this.svgScaleContent.loadSvg(this.pageRealW*e/this.svgScaleContent.defScal,this.pageRealH*t/this.svgScaleContent.defScal,function(){i.svgScaleContent.set_alpha(1);i.svgContent.set_alpha(0)})}},scaleSvgContentDestroy:function(){if(this.svgContent!=null){this.svgContent.set_alpha(1);this.svgScaleContent.destroyMe()}},updatePdfjsContentSta:function(e,t){if(this.pdfjsContent!=null){this.pdfjsContent.set_scaleX(this.pdfjsContent.defScal/e);this.pdfjsContent.set_scaleY(this.pdfjsContent.defScal/t);this.pdfjsContent.resize(this.pageRealW*e/this.pdfjsContent.defScal,this.pageRealH*t/this.pdfjsContent.defScal)}if(this.singlePagePdfContent!=null){this.singlePagePdfContent.set_scaleX(this.singlePagePdfContent.defScal/e);this.singlePagePdfContent.set_scaleY(this.singlePagePdfContent.defScal/t);this.singlePagePdfContent.resize(this.pageRealW*e/this.singlePagePdfContent.defScal,this.pageRealH*t/this.singlePagePdfContent.defScal)}},scalePdfjsContentDestroy:function(){if(this.pdfjsContent!=null){var e=this.pageContent.get_scaleX()*this.pageLayerShell.get_scaleX()*this.get_scaleX();this.pdfjsContent.set_scaleY(1/e);this.pdfjsContent.set_scaleX(1/e);this.pdfjsContent.resize(this.pageRealW*e,this.pageRealH*e)}if(this.singlePagePdfContent!=null){var t=this.pageContent.get_scaleX()*this.pageLayerShell.get_scaleX()*this.get_scaleX();this.singlePagePdfContent.set_scaleY(1/t);this.singlePagePdfContent.set_scaleX(1/t);this.singlePagePdfContent.resize(this.pageRealW*t,this.pageRealH*t)}},scaleContentDestroy:function(){this.scaleSvgContentDestroy();this.scalePdfjsContentDestroy()},updateContentSta:function(e,t){this.updateSvgContentSta(e,t);this.updatePdfjsContentSta(e,t)},__class__:flipbookMM_bookBox_PageLayer});var flipbookMM_bookBox_PageParameter=function(e,t,i,s){this.imgUrl=e;this.pngUrl=t;this.txtUrl=i;this.pdfUrl=s};$hxClasses["flipbookMM.bookBox.PageParameter"]=flipbookMM_bookBox_PageParameter;flipbookMM_bookBox_PageParameter.__name__=["flipbookMM","bookBox","PageParameter"];flipbookMM_bookBox_PageParameter.prototype={imgUrl:null,pngUrl:null,txtUrl:null,pdfUrl:null,__class__:flipbookMM_bookBox_PageParameter};var flipbookMM_bookBox_PagesConfigGet=function(){this.pageEncrypt=null;this.encryptXml=null;this.objectXml=null;this.normalPageList=[];this.thumbPageList=[];this.pageList=[]};$hxClasses["flipbookMM.bookBox.PagesConfigGet"]=flipbookMM_bookBox_PagesConfigGet;flipbookMM_bookBox_PagesConfigGet.__name__=["flipbookMM","bookBox","PagesConfigGet"];flipbookMM_bookBox_PagesConfigGet.getInstance=function(){if(flipbookMM_bookBox_PagesConfigGet.instance==null){flipbookMM_bookBox_PagesConfigGet.instance=new flipbookMM_bookBox_PagesConfigGet}return flipbookMM_bookBox_PagesConfigGet.instance};flipbookMM_bookBox_PagesConfigGet.prototype={objectXml:null,encryptXml:null,normalPageList:null,thumbPageList:null,pageList:null,pageEncrypt:null,setXmlData:function(e){this.objectXml=e},setEncryptData:function(e){this.encryptXml=e},getEncryptData:function(){if(this.pageEncrypt!=null){return this.pageEncrypt}var e=false;var t="custom";var i=9999999;var s="";var a="";var r=new haxe_ds_StringMap;if(this.encryptXml!=null){var n=new haxe_xml_Fast(this.encryptXml);s=n.att.resolve("mode");a=n.att.resolve("singlePassword");var _=n.get_elements();while(_.hasNext()){var o=_.next();if(o.get_elements()!=null&&o.get_innerHTML()!=null){e=true;if(o.get_name()=="protectPagesType"){t=o.get_innerHTML()}else if(o.get_name()=="excludeFrontPages"){i=Std.parseInt(o.get_innerHTML())}else if(o.get_name()=="item"){var l=o.att.resolve("name");var h=o.get_innerHTML();if(__map_reserved[l]!=null){r.setReserved(l,h)}else{r.h[l]=h}}}}}this.pageEncrypt=new flipbookMM_bookBox_PageEncrypt(e,t,i,s);this.pageEncrypt.setSinglePassword(a);this.pageEncrypt.setUserPass(r);return this.pageEncrypt},getPagesConfig:function(){if(this.objectXml==null){return}var e=new haxe_xml_Fast(this.objectXml);var t=e.get_elements();while(t.hasNext()){var i=t.next();if(i.get_elements()!=null){var s="";var a="";var r="";var n="";var _=i.get_elements();while(_.hasNext()){var o=_.next();if(o.get_innerHTML()!=null){if(o.get_name()=="normalurl"){this.normalPageList.push(o.get_innerHTML());s=o.get_innerHTML()}else if(o.get_name()=="thumburl"){this.thumbPageList.push(o.get_innerHTML())}else if(o.get_name()=="svgurl"){if(o.get_elements()!=null){var l=o.get_elements();while(l.hasNext()){var h=l.next();if(h.get_innerHTML()!=null){if(h.get_name()=="txturl"){a=h.get_innerHTML()}else if(h.get_name()=="imgurl"){r=h.get_innerHTML()}}}}}else if(o.get_name()=="pdfurl"){n=o.get_innerHTML()}}}this.pageList.push(new flipbookMM_bookBox_PageParameter(s,r,a,n))}}},__class__:flipbookMM_bookBox_PagesConfigGet};var flipbookMM_bookBox_Pdfjs=function(){this.pageNumber=0;this.pdfDocument=null;this.pdfLib=null;this.pdfUrl=null;this.pdfLib=pdfjsLib;this.pdfViewer=pdfjsViewer};$hxClasses["flipbookMM.bookBox.Pdfjs"]=flipbookMM_bookBox_Pdfjs;flipbookMM_bookBox_Pdfjs.__name__=["flipbookMM","bookBox","Pdfjs"];flipbookMM_bookBox_Pdfjs.getInstance=function(){if(flipbookMM_bookBox_Pdfjs.instance==null){flipbookMM_bookBox_Pdfjs.instance=new flipbookMM_bookBox_Pdfjs}return flipbookMM_bookBox_Pdfjs.instance};flipbookMM_bookBox_Pdfjs.prototype={pdfUrl:null,pdfLib:null,pdfDocument:null,pageNumber:null,loadPdf:function(e){var t=this;this.pdfUrl=e;this.pdfLib.GlobalWorkerOptions.workerSrc="./pdfjs-dist/build/pdf.worker.min.js";var i="./pdfjs-dist/cmaps/";var s=true;var a=this.pdfLib.getDocument({url:this.pdfUrl,cMapUrl:i,cMapPacked:s}).promise.then(function(e){t.pdfDocument=e;t.pageNumber=t.pdfDocument.numPages})},getPageNum:function(){return this.pageNumber},getPdfDocument:function(){return this.pdfDocument},__class__:flipbookMM_bookBox_Pdfjs};var flipbookMM_bookBox_ShadowLayer=function(e){var t=this;openfl_display_Sprite.call(this);this.shadow=new base_baseLoad_LoadImg(e,function(e){t.shadow.set_y(-t.shadow.get_height()/2)});this.addChild(this.shadow)};$hxClasses["flipbookMM.bookBox.ShadowLayer"]=flipbookMM_bookBox_ShadowLayer;flipbookMM_bookBox_ShadowLayer.__name__=["flipbookMM","bookBox","ShadowLayer"];flipbookMM_bookBox_ShadowLayer.__super__=openfl_display_Sprite;flipbookMM_bookBox_ShadowLayer.prototype=$extend(openfl_display_Sprite.prototype,{shadow:null,__class__:flipbookMM_bookBox_ShadowLayer});var flipbookMM_bookBox_book_Page=function(){openfl_display_Sprite.call(this)};$hxClasses["flipbookMM.bookBox.book.Page"]=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_Page.__name__=["flipbookMM","bookBox","book","Page"];flipbookMM_bookBox_book_Page.__super__=openfl_display_Sprite;flipbookMM_bookBox_book_Page.prototype=$extend(openfl_display_Sprite.prototype,{pageW:null,pageH:null,destroyMe:function(){},__class__:flipbookMM_bookBox_book_Page});var flipbookMM_bookBox_book_ImgPage=function(e,t){flipbookMM_bookBox_book_Page.call(this);if(t==null){this.loader=new base_baseLoad_LoadImg(e,$bind(this,this.onCom))}else{this.loader=new base_baseLoad_LoadImg(e,t)}this.addChild(this.loader)};$hxClasses["flipbookMM.bookBox.book.ImgPage"]=flipbookMM_bookBox_book_ImgPage;flipbookMM_bookBox_book_ImgPage.__name__=["flipbookMM","bookBox","book","ImgPage"];flipbookMM_bookBox_book_ImgPage.__super__=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_ImgPage.prototype=$extend(flipbookMM_bookBox_book_Page.prototype,{loader:null,onCom:function(e){var t=js_Boot.__cast(e.target,openfl_display_LoaderInfo);this.pageW=t.content.get_width();this.pageH=t.content.get_height()},destroyMe:function(){this.loader.destroyMe();this.loader=null},__class__:flipbookMM_bookBox_book_ImgPage});var flipbookMM_bookBox_book_PdfInstance=function(){this.pdfLib=null;this.loadPdfjs()};$hxClasses["flipbookMM.bookBox.book.PdfInstance"]=flipbookMM_bookBox_book_PdfInstance;flipbookMM_bookBox_book_PdfInstance.__name__=["flipbookMM","bookBox","book","PdfInstance"];flipbookMM_bookBox_book_PdfInstance.getInstance=function(){if(flipbookMM_bookBox_book_PdfInstance.instance==null){flipbookMM_bookBox_book_PdfInstance.instance=new flipbookMM_bookBox_book_PdfInstance}return flipbookMM_bookBox_book_PdfInstance.instance};flipbookMM_bookBox_book_PdfInstance.prototype={pdfLib:null,onCom:function(){this.pdfLib=pdfjsLib;this.pdfViewer=pdfjsViewer;this.pdfLib.GlobalWorkerOptions.workerSrc="./pdfjs-dist/build/pdf.worker.min.js"},loadPdfjs:function(){var s=this;var e=window.document.createElement("link");e.rel="stylesheet";e.href="./pdfjs-dist/web/pdf_viewer.css";e.onload=function(){var i=window.document.getElementsByTagName("script")[0];var e=window.document.createElement("script");e.src="./pdfjs-dist/build/pdf.min.js";e.onload=function(){var t=window.document.createElement("script");t.src="./pdfjs-dist/build/pdf.worker.min.js";t.onload=function(){var e=window.document.createElement("script");e.src="./pdfjs-dist/web/pdf_viewer.js";e.onload=function(){s.onCom()};i.parentNode.insertBefore(e,t.nextSibling)};i.parentNode.insertBefore(t,e.nextSibling)};i.parentNode.insertBefore(e,i)};window.document.head.appendChild(e)},__class__:flipbookMM_bookBox_book_PdfInstance};var flipbookMM_bookBox_book_PdfjsPage=function(e,t,i){if(t==null){t=true}this.pdfjsContent=null;this.pdfPageView=null;flipbookMM_bookBox_book_Page.call(this);this.pageIndex=e;this.comFun=i;this.txtFlag=t;this.offsetScale=.75/window.devicePixelRatio;this.defScal=1;this.initPage()};$hxClasses["flipbookMM.bookBox.book.PdfjsPage"]=flipbookMM_bookBox_book_PdfjsPage;flipbookMM_bookBox_book_PdfjsPage.__name__=["flipbookMM","bookBox","book","PdfjsPage"];flipbookMM_bookBox_book_PdfjsPage.__super__=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_PdfjsPage.prototype=$extend(flipbookMM_bookBox_book_Page.prototype,{pageIndex:null,originW:null,originH:null,comFun:null,txtFlag:null,pdfPageView:null,pdfjsContent:null,offsetScale:null,defScal:null,drawContent:function(){if(this.get_numChildren()>0){this.removeChildren()}if(this.pdfjsContent!=null){if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}var e=js_Boot.__cast(this.pdfPageView.canvas,HTMLCanvasElement);this.pdfjsContent=new openfl_display_Bitmap(openfl_display_BitmapData.fromCanvas(e));this.updateTxtPosition(9999*window.devicePixelRatio,0,false);this.addChild(this.pdfjsContent)},loadFinished:function(){if(this.comFun!=null){this.comFun();this.comFun=null}},updateTxtPosition:function(e,t,i){if(i==null){i=true}if(this.pdfPageView!=null){this.pdfPageView.div.style.position="absolute";this.pdfPageView.div.style.left=e/window.devicePixelRatio+"px";this.pdfPageView.div.style.top=t/window.devicePixelRatio+"px";var s=this.pdfPageView.div.getElementsByClassName("canvasWrapper")[0];if(s!=null){s.remove()}if(this.txtFlag){var a=this.pdfPageView.div.getElementsByClassName("textLayer")[0];if(a!=null){if(i){a.style.display="block"}else{a.style.display="none"}}}}},initPage:function(){var t=this;var e=flipbookMM_bookBox_Pdfjs.getInstance();var i=e.getPdfDocument();var s=1;var a=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);var r=this;i.getPage(this.pageIndex).then(function(e){t.originW=e.view[2]-e.view[0];t.originH=e.view[3]-e.view[1];t.loadFinished()})},loadPage:function(a,r,n){var _=this;var e=flipbookMM_bookBox_Pdfjs.getInstance();var t=e.getPdfDocument();var o=1;var l=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);var h=this;t.getPage(this.pageIndex).then(function(e){_.originW=e.view[2]-e.view[0];_.originH=e.view[3]-e.view[1];var t=a/_.originW;var i=r/_.originH;if(t<=i){o=t}else{o=i}o*=_.offsetScale;if(_.txtFlag){_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),textLayerFactory:new pdfjsViewer.DefaultTextLayerFactory,annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}else{_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}_.pdfPageView.setPdfPage(e);var s=_.pdfPageView.draw();_.drawContent();if(n!=null){n();n=null}})},resize:function(e,t){if(this.pdfPageView){var i=e/this.originW;var s=t/this.originH;var a=i<=s?i:s;a*=this.offsetScale;this.pdfPageView.update(a,0);this.pdfPageView.draw();this.drawContent()}},destroyMe:function(){if(this.pdfPageView){this.pdfPageView.destroy();this.pdfPageView.div.remove();this.pdfPageView=null}if(this.pdfjsContent!=null){if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}},__class__:flipbookMM_bookBox_book_PdfjsPage});var flipbookMM_bookBox_book_SinglePdfPage=function(e,t,i,s){if(i==null){i=true}this.eventBus=null;this.onFun=null;this.pageContainer=null;this.pdfjsContent=null;this.pdfPageView=null;this.pageIndex=1;this.txtFlag=false;this.originH=0;this.originW=0;this.pageNumber=0;this.pdfDocument=null;this.pdfUrl=null;flipbookMM_bookBox_book_Page.call(this);this.pageIndex=t;this.comFun=s;this.txtFlag=i;this.pdfUrl=e;this.offsetScale=.75/window.devicePixelRatio;this.defScal=1;this.addEventListener("enterFrame",$bind(this,this.initPage))};$hxClasses["flipbookMM.bookBox.book.SinglePdfPage"]=flipbookMM_bookBox_book_SinglePdfPage;flipbookMM_bookBox_book_SinglePdfPage.__name__=["flipbookMM","bookBox","book","SinglePdfPage"];flipbookMM_bookBox_book_SinglePdfPage.__super__=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_SinglePdfPage.prototype=$extend(flipbookMM_bookBox_book_Page.prototype,{pdfUrl:null,pdfDocument:null,pageNumber:null,originW:null,originH:null,txtFlag:null,pageIndex:null,pdfPageView:null,pdfjsContent:null,pageContainer:null,offsetScale:null,defScal:null,comFun:null,onFun:null,eventBus:null,initPage:function(e){var t=this;var i=flipbookMM_bookBox_book_PdfInstance.getInstance();if(i.pdfLib==null){return}else{this.removeEventListener("enterFrame",$bind(this,this.initPage))}var s="./pdfjs-dist/cmaps/";var a=true;var r=i.pdfLib.getDocument({url:this.pdfUrl,cMapUrl:s,cMapPacked:a}).promise.then(function(e){t.pdfDocument=e;t.pageNumber=t.pdfDocument.numPages;t.pdfDocument.getPage(t.pageIndex).then(function(e){t.originW=e.view[2]-e.view[0];t.originH=e.view[3]-e.view[1];t.loadFinished()})})},loadFinished:function(){if(this.comFun!=null){this.comFun();this.comFun=null}},eventBusCallBack:function(e){this.drawContent();if(this.onFun!=null){this.onFun();this.onFun=null}},loadPage:function(r,n,e){var _=this;var o=1;var t=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);var l=window.document.createElement("div");l.style.display="none";this.pageContainer=l;t.appendChild(l);var h=this;this.onFun=e;this.pdfDocument.getPage(this.pageIndex).then(function(e){_.originW=e.view[2]-e.view[0];_.originH=e.view[3]-e.view[1];var t=r/_.originW;var i=n/_.originH;if(t<=i){o=t}else{o=i}o*=_.offsetScale;var s=new pdfjsViewer.EventBus;s.on("pagerendered",$bind(_,_.eventBusCallBack));_.eventBus=s;if(_.txtFlag){_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,eventBus:s,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),textLayerFactory:new pdfjsViewer.DefaultTextLayerFactory,annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}else{_.pdfPageView=new pdfjsViewer.PDFPageView({container:l,eventBus:s,id:h.pageIndex,scale:o,defaultViewport:e.getViewport({scale:o}),annotationLayerFactory:new pdfjsViewer.DefaultAnnotationLayerFactory})}_.pdfPageView.setPdfPage(e);var a=_.pdfPageView.draw()})},drawContent:function(){if(this.pageContainer!=null){this.pageContainer.style.display="block"}if(this.pdfjsContent!=null){this.removeChild(this.pdfjsContent);if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}var e=js_Boot.__cast(this.pdfPageView.canvas,HTMLCanvasElement);this.pdfjsContent=new openfl_display_Bitmap(openfl_display_BitmapData.fromCanvas(e));this.updateTxtPosition(9999*window.devicePixelRatio,0,false);this.addChild(this.pdfjsContent)},updateTxtPosition:function(e,t,i){if(i==null){i=true}if(this.pdfPageView!=null){this.pdfPageView.div.style.position="absolute";this.pdfPageView.div.style.left=e/window.devicePixelRatio+"px";this.pdfPageView.div.style.top=t/window.devicePixelRatio+"px";var s=this.pdfPageView.div.getElementsByClassName("canvasWrapper")[0];if(s!=null){s.remove()}if(this.txtFlag){var a=this.pdfPageView.div.getElementsByClassName("textLayer")[0];if(a!=null){if(i){a.style.display="block"}else{a.style.display="none"}}}}},resize:function(e,t){if(this.pdfPageView){var i=e/this.originW;var s=t/this.originH;var a=i<=s?i:s;a*=this.offsetScale;this.pdfPageView.update(a,0);this.pdfPageView.draw()}},destroyMe:function(){if(this.eventBus!=null){this.eventBus.off("pagerendered",$bind(this,this.eventBusCallBack));this.eventBus=null}this.comFun=null;this.onFun=null;if(this.pdfPageView){this.pdfPageView.destroy();this.pdfPageView.div.remove();this.pdfPageView=null}if(this.pdfjsContent!=null){if(this.pdfjsContent.get_bitmapData()!=null){this.pdfjsContent.get_bitmapData().dispose();this.pdfjsContent.set_bitmapData(null)}this.pdfjsContent=null}if(this.pageContainer!=null){var e=window.document.getElementById(flipbookMM_global_GetDivJs.pdfTxtId);if(e!=null){e.removeChild(this.pageContainer);this.pageContainer=null}this.pageContainer=null}},__class__:flipbookMM_bookBox_book_SinglePdfPage});var flipbookMM_bookBox_book_SvgPage=function(e){this.defScal=1;flipbookMM_bookBox_book_Page.call(this);this.svgUrl=e};$hxClasses["flipbookMM.bookBox.book.SvgPage"]=flipbookMM_bookBox_book_SvgPage;flipbookMM_bookBox_book_SvgPage.__name__=["flipbookMM","bookBox","book","SvgPage"];flipbookMM_bookBox_book_SvgPage.__super__=flipbookMM_bookBox_book_Page;flipbookMM_bookBox_book_SvgPage.prototype=$extend(flipbookMM_bookBox_book_Page.prototype,{svgUrl:null,bitmapdata:null,defScal:null,loadSvg:function(i,s,a){var r=this;var n=window.document.createElement("img");n.onload=function(){n.onload=null;var e=window.document.createElement("canvas");e.width=i;e.height=s;var t=e.getContext("2d");t.drawImage(n,0,0,n.width,n.height,0,0,i,s);r.bitmapdata=openfl_display_BitmapData.fromCanvas(e);r.removeChildren();r.addChild(new openfl_display_Bitmap(r.bitmapdata));if(a!=null){a(e);a=null}t=null;e=null;n=null};n.src=this.svgUrl},destroyMe:function(){if(this.bitmapdata!=null){this.bitmapdata.dispose();this.bitmapdata=null;this.get_graphics().clear();this.get_graphics().endFill()}},__class__:flipbookMM_bookBox_book_SvgPage});var flipbookMM_bookBox_highlightText_HighlightTextNode=function(e,t,i){openfl_display_Sprite.call(this);if(flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().targetContentPosition!=null){var s=null;var a=0;var r=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().targetContentPosition;while(a<r.length){var n=r[a];++a;if(i==n.index){s=n}}if(s!=null){var _=0;var o=s.positon.length;while(_<o){var l=_++;var h=new openfl_display_Sprite;h.get_graphics().beginFill(16764194,.7);h.get_graphics().drawRect(0,0,s.positon[l].width*e,s.positon[l].height*t);h.get_graphics().endFill();h.set_x(s.positon[l].x*e);h.set_y(s.positon[l].y*t);this.addChild(h);h=null}}}};$hxClasses["flipbookMM.bookBox.highlightText.HighlightTextNode"]=flipbookMM_bookBox_highlightText_HighlightTextNode;flipbookMM_bookBox_highlightText_HighlightTextNode.__name__=["flipbookMM","bookBox","highlightText","HighlightTextNode"];flipbookMM_bookBox_highlightText_HighlightTextNode.__super__=openfl_display_Sprite;flipbookMM_bookBox_highlightText_HighlightTextNode.prototype=$extend(openfl_display_Sprite.prototype,{__class__:flipbookMM_bookBox_highlightText_HighlightTextNode});var flipbookMM_bookBox_pageLink_PageLink=function(e,t,i){openfl_display_Sprite.call(this);this.pageW=e;this.pageH=t;this.linkList=[];this.addNode(i)};$hxClasses["flipbookMM.bookBox.pageLink.PageLink"]=flipbookMM_bookBox_pageLink_PageLink;flipbookMM_bookBox_pageLink_PageLink.__name__=["flipbookMM","bookBox","pageLink","PageLink"];flipbookMM_bookBox_pageLink_PageLink.__super__=openfl_display_Sprite;flipbookMM_bookBox_pageLink_PageLink.prototype=$extend(openfl_display_Sprite.prototype,{pageW:null,pageH:null,linkList:null,addNode:function(e){this.removeNode();this.linkList=[];var t=flipbookMM_bookBox_ObjectConfigInit.getInstance();if(t.getXmlData()!=null){var i=new haxe_xml_Fast(t.getXmlData());var s=i.get_elements();while(s.hasNext()){var a=s.next();if(a.has.resolve("pageindex")==true&&Std.parseInt(a.att.resolve("pageindex"))==e){if(a.get_elements()!=null){var r=a.get_elements();while(r.hasNext()){var n=r.next();if(n.get_name()=="object"){if(n.att.resolve("type")=="pageLink"){var _=parseFloat(n.node.resolve("location").att.resolve("x"))*this.pageW;var o=parseFloat(n.node.resolve("location").att.resolve("y"))*this.pageH;var l=parseFloat(n.node.resolve("location").att.resolve("width"))*this.pageW;var h=parseFloat(n.node.resolve("location").att.resolve("height"))*this.pageH;var c=n.node.resolve("action").att.resolve("actiontype");var u="0";if(c=="gotoPage"){u=n.node.resolve("action").node.resolve("pageindex").get_innerHTML()}else if(c=="openURL"){u=n.node.resolve("action").node.resolve("url").get_innerHTML()}var f=new flipbookMM_bookBox_pageLink_PageLinkNode(_,o,l,h,u,c);this.linkList.push(f)}}}}break}}var p=0;var d=this.linkList;while(p<d.length){var g=d[p];++p;this.addChild(g)}i=null}t=null},removeNode:function(){if(this.linkList==null){return}var e=0;var t=this.linkList.length;while(e<t){var i=e++;this.removeChild(this.linkList[i])}this.linkList=null},__class__:flipbookMM_bookBox_pageLink_PageLink});var flipbookMM_bookBox_pageLink_PageLinkNode=function(e,t,i,s,a,r,n){if(n==null){n=65280}var _=this;openfl_display_Sprite.call(this);var o=flipbookMM_config_ConfigSetting.getInstance();this._col=Std.parseInt(o.get(flipbookMM_config_ConfigKey.LinkOverColor));this._colAlpha=parseFloat(o.get(flipbookMM_config_ConfigKey.LinkOverAlpha));o=null;this.get_graphics().beginFill(this._col);this.get_graphics().drawRect(0,0,i,s);this.get_graphics().endFill();this.set_alpha(0);this.set_x(e);this.set_y(t);this.linkIndex=a;this.addEventListener("click",function(e){_.set_alpha(0);if(r=="gotoPage"){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(_,Std.parseInt(_.linkIndex),null)));t=null}else if(r=="openURL"){_.openUrl(js_Boot.__cast(_.linkIndex,String))}});this.addEventListener("mouseOver",function(e){_.set_alpha(_._colAlpha)});this.addEventListener("mouseOut",function(e){_.set_alpha(0)})};$hxClasses["flipbookMM.bookBox.pageLink.PageLinkNode"]=flipbookMM_bookBox_pageLink_PageLinkNode;flipbookMM_bookBox_pageLink_PageLinkNode.__name__=["flipbookMM","bookBox","pageLink","PageLinkNode"];flipbookMM_bookBox_pageLink_PageLinkNode.__super__=openfl_display_Sprite;flipbookMM_bookBox_pageLink_PageLinkNode.prototype=$extend(openfl_display_Sprite.prototype,{linkIndex:null,_col:null,_colAlpha:null,openUrl:function(e){var t;try{t=e;if(t.toLowerCase().indexOf("www")==0){t="http://"+t}if(t.toLowerCase().indexOf("mailto:")==0){openfl_Lib.getURL(new openfl_net_URLRequest(t),"_blank")}else{openfl_Lib.getURL(new openfl_net_URLRequest(t),"_blank")}}catch(e){haxe_CallStack.lastException=e;return}},__class__:flipbookMM_bookBox_pageLink_PageLinkNode});var flipbookMM_bookBox_style_BaseStyle=function(e,t,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=0}this.isRightToLeft=false;this.isDisplayEmbedObject=true;this.isHighlightText=false;base_baseSprite_TouchSprite.call(this);this.styleMode=n;this.isRightToLeft=_;this.paddingTop=0;this.paddingBottom=0;this.paddingLeft=0;this.paddingRight=0};$hxClasses["flipbookMM.bookBox.style.BaseStyle"]=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_BaseStyle.__name__=["flipbookMM","bookBox","style","BaseStyle"];flipbookMM_bookBox_style_BaseStyle.__super__=base_baseSprite_TouchSprite;flipbookMM_bookBox_style_BaseStyle.prototype=$extend(base_baseSprite_TouchSprite.prototype,{styleWidth:null,styleHeight:null,pageWidth:null,pageHeight:null,layerWidth:null,layerHeight:null,paddingLeft:null,paddingRight:null,paddingTop:null,paddingBottom:null,curPageIndex:null,tarPageIndex:null,maxPageIndex:null,isPlaying:null,isZoom:null,isAutoPlay:null,styleMode:null,pageLoad:null,containLayer:null,pageStep:null,pageList:null,playSound:null,isHScreen:null,isMute:null,isHighlightText:null,isDisplayEmbedObject:null,isRightToLeft:null,gotoPage:function(e){},gotoPrePage:function(){},gotoNextPage:function(){},updateStyleStatus:function(e){},updateContentSta:function(e){},updatePdfTxtPosition:function(){},getZoomCoefX:function(e){return 2},getZoomCoefY:function(e){return 2},getZoomCenterCoefX:function(){return.5},getZoomCenterCoefY:function(){return.5},playBKMusic:function(){},setMuteMode:function(e){this.isMute=e},resize:function(e,t){},__class__:flipbookMM_bookBox_style_BaseStyle});var flipbookMM_bookBox_style_FlipStance=function(){this.outPoint=new openfl_geom_Point;this.originPoint=new openfl_geom_Point(0,0);this.outAngle=0};$hxClasses["flipbookMM.bookBox.style.FlipStance"]=flipbookMM_bookBox_style_FlipStance;flipbookMM_bookBox_style_FlipStance.__name__=["flipbookMM","bookBox","style","FlipStance"];flipbookMM_bookBox_style_FlipStance.prototype={outPoint:null,originPoint:null,outAngle:null,pageWidth:null,pageHeight:null,startPosition:null,TLPoint:null,BLPoint:null,TRPoint:null,BRPoint:null,limtPoint:null,setStartPosition:function(e){this.startPosition=e;if(this.startPosition==0){this.limtPoint.changeTo("top")}else if(this.startPosition==1){this.limtPoint.changeTo("bottom")}else if(this.startPosition==2){this.limtPoint.changeTo("top")}else if(this.startPosition==3){this.limtPoint.changeTo("bottom")}},update:function(e,t){if(this.startPosition==0){this.limtPoint.update(e,t);var i=Math.atan2(this.TLPoint.y-this.limtPoint._point.y,this.TLPoint.x-this.limtPoint._point.x);var s=2*i-Math.PI/2;var a=this.limtPoint._point.x+this.pageWidth*Math.sin(s);var r=this.limtPoint._point.y-this.pageWidth*Math.cos(s);this.outPoint.x=a;this.outPoint.y=r;this.outAngle=i*2*180/Math.PI}else if(this.startPosition==1){this.limtPoint.update(e,t);var n=Math.atan2(this.BLPoint.y-this.limtPoint._point.y,this.BLPoint.x-this.limtPoint._point.x);var _=2*n-Math.PI/2;var o=this.limtPoint._point.x+this.pageWidth*Math.sin(_)+this.pageHeight*Math.cos(_);var l=this.limtPoint._point.y-this.pageWidth*Math.cos(_)+this.pageHeight*Math.sin(_);this.outPoint.x=o;this.outPoint.y=l;this.outAngle=n*2*180/Math.PI}else if(this.startPosition==2){this.limtPoint.update(e,t);var h=Math.atan2(this.TRPoint.y-this.limtPoint._point.y,this.TRPoint.x-this.limtPoint._point.x);var c=2*h-Math.PI/2;var u=this.limtPoint._point.x;var f=this.limtPoint._point.y;this.outPoint.x=u;this.outPoint.y=f;this.outAngle=h*2*180/Math.PI}else if(this.startPosition==3){this.limtPoint.update(e,t);var p=Math.atan2(this.BRPoint.y-this.limtPoint._point.y,this.BRPoint.x-this.limtPoint._point.x);var d=2*p-Math.PI/2;var g=this.limtPoint._point.x+this.pageHeight*Math.cos(d);var m=this.limtPoint._point.y+this.pageHeight*Math.sin(d);this.outPoint.x=g;this.outPoint.y=m;this.outAngle=p*2*180/Math.PI}},get_point:function(){return this.outPoint},set_Opoint:function(e){this.originPoint=e;return this.originPoint},get_angle:function(){return this.outAngle},get_limtP:function(){return this.limtPoint._point},setSize:function(e,t,i,s){this.pageWidth=i;this.pageHeight=s;this.TLPoint=new openfl_geom_Point(this.originPoint.x-this.pageWidth,this.originPoint.y-this.pageHeight/2);this.BLPoint=new openfl_geom_Point(this.originPoint.x-this.pageWidth,this.originPoint.y+this.pageHeight/2);this.TRPoint=new openfl_geom_Point(this.originPoint.x+this.pageWidth,this.originPoint.y-this.pageHeight/2);this.BRPoint=new openfl_geom_Point(this.originPoint.x+this.pageWidth,this.originPoint.y+this.pageHeight/2);this.limtPoint=new flipbookMM_bookBox_style_LimitPoint;this.limtPoint._Op=new openfl_geom_Point(this.originPoint.x,this.originPoint.y);this.limtPoint.setSize(this.pageWidth,this.pageHeight,new openfl_geom_Point);this.limtPoint.changeTo("bottom")},__class__:flipbookMM_bookBox_style_FlipStance,__properties__:{get_limtP:"get_limtP",get_angle:"get_angle",get_point:"get_point",set_Opoint:"set_Opoint"}};var flipbookMM_bookBox_style_FlipStyle=function(e,t,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=1}var o=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,1,_);this.pageWidth=i;this.pageHeight=s;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.hardCoverEnable=false;var l=flipbookMM_config_ConfigSetting.getInstance();if(l.hasKey(flipbookMM_config_ConfigKey.FLipStyleHardEnable)){this.hardCoverEnable=l.yesOrNo(l.get(flipbookMM_config_ConfigKey.FLipStyleHardEnable))}if(l.yesOrNo(l.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}l=null;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);fabric_FabricBaseObject._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.curMask=new openfl_display_Shape;this.addChild(this.curMask);this.moveContain=new openfl_display_Sprite;this.addChild(this.moveContain);this.moveMask=new openfl_display_Shape;this.moveContain.addChild(this.moveMask);this.shdowContain=new openfl_display_Sprite;this.addChild(this.shdowContain);this.shadowCurMask=new openfl_display_Shape;this.shdowContain.addChild(this.shadowCurMask);this.shadowMoveMask=new openfl_display_Shape;this.shdowContain.addChild(this.shadowMoveMask);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(i,s,a,r);this.flipStance=new flipbookMM_bookBox_style_FlipStance;this.curPageIndex=n;this.tarPageIndex=this.curPageIndex;this.startArea=-1;this.manualFlipStatus=0;this.pageStep=0;this.resize(e,t);this.addEventListener("mouseDown",function(e){if(o.isPlaying){return}if(o.get_scaleY()!=1){return}var t=new openfl_geom_Point(o.get_mouseX(),o.get_mouseY());o.manualFlipStatus=1;var i=function(){if(o.manualFlipStatus==1){var e=0;if(o.isHScreen){if(t.x<o.currentPoint.x){if(t.y<o.currentPoint.y){o.startArea=0}else{o.startArea=1}}else if(t.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}if(o.startArea==0||o.startArea==1){e=o.curPageIndex-o.pageStep;o.isGoRight=false}else if(o.startArea==2||o.startArea==3){e=o.curPageIndex+o.pageStep;o.isGoRight=true}}else{if(t.x<o.currentPoint.x){e=o.curPageIndex-o.pageStep;o.isGoRight=false}else{e=o.curPageIndex+o.pageStep;o.isGoRight=true}if(t.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}}if(o.isGoNormalPage(e)){o.flipMoveInit();o.flipPathUpdate(t.x,t.y);o.manualFlipStatus=2}}};var s=function(){if(o.manualFlipStatus==1){var e=0;if(o.isHScreen){if(t.x<o.currentPoint.x){if(t.y<o.currentPoint.y){o.startArea=0}else{o.startArea=1}}else if(t.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}if(o.startArea==0||o.startArea==1){e=o.curPageIndex+o.pageStep;o.isGoRight=true}else if(o.startArea==2||o.startArea==3){e=o.curPageIndex-o.pageStep;o.isGoRight=false}}else{if(t.x<o.currentPoint.x){e=o.curPageIndex+o.pageStep;o.isGoRight=false}else{e=o.curPageIndex-o.pageStep;o.isGoRight=true}if(t.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}}if(o.isGoNormalPage(e)){o.flipMoveInit();o.flipPathUpdate(t.x,t.y);o.manualFlipStatus=2}}};if(_){haxe_Timer.delay(s,500)}else{haxe_Timer.delay(i,500)}});this.addEventListener("mouseUp",function(e){if(o.manualFlipStatus==2){var t=o.get_mouseX();o.onTouchRelease(t)}o.manualFlipStatus=3});this.addEventListener("rollOut",function(e){if(o.manualFlipStatus==2){o.onTouchRelease(o.flipStance.get_limtP().x)}o.manualFlipStatus=3});this.addEventListener("mouseMove",function(e){if(o.manualFlipStatus==2){if(o.startArea>=0&&o.startArea<=3){var t=o.get_mouseX();var i=o.get_mouseY();o.flipPathUpdate(t,i)}}});var h=flipbookMM_events_EventCenter.getInstance();h.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){o.isDisplayEmbedObject=true}else if(t=="off"){o.isDisplayEmbedObject=false}o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){o.isHighlightText=true;o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){o.isHighlightText=false;o.flipFinished()});h=null;haxe_Timer.delay(function(){if(o.isHScreen){o.pageList[3].changeObjectStatus(true);o.pageList[4].changeObjectStatus(true)}else{o.pageList[1].changeObjectStatus(true)}o.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 i=0;if(this.styleWidth>this.styleHeight){i=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{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=i/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=s<a?s:a;if(s<a){this.layerWidth=i;this.layerHeight=this.pageHeight*s}else{this.layerWidth=this.pageWidth*a;this.layerHeight=this.styleHeight}this.currentPoint=new openfl_geom_Point(this.styleWidth/2,this.styleHeight/2);this.pageLoad.resize(this.layerWidth,this.layerHeight);if(this.isHScreen){this.originPoint=new openfl_geom_Point(this.styleWidth/2,this.styleHeight/2)}else{this.originPoint=new openfl_geom_Point((this.styleWidth-this.layerWidth)/2,this.styleHeight/2)}this.TLPoint=new openfl_geom_Point(this.originPoint.x-this.layerWidth,this.originPoint.y-this.layerHeight/2);this.BLPoint=new openfl_geom_Point(this.originPoint.x-this.layerWidth,this.originPoint.y+this.layerHeight/2);this.TRPoint=new openfl_geom_Point(this.originPoint.x+this.layerWidth,this.originPoint.y-this.layerHeight/2);this.BRPoint=new openfl_geom_Point(this.originPoint.x+this.layerWidth,this.originPoint.y+this.layerHeight/2);this.flipStance.set_Opoint(this.originPoint);this.flipStance.setSize(this.styleWidth,this.styleHeight,this.layerWidth,this.layerHeight);if(this.isHScreen){this.pageLoad.updateBufferNum(3)}else{this.pageLoad.updateBufferNum(1)}this.flipFinished();this.backMask.get_graphics().clear();this.backMask.get_graphics().beginFill(0,0);this.backMask.get_graphics().drawRect(0,0,this.layerWidth*2,this.styleHeight);this.backMask.get_graphics().endFill();if(this.isHScreen){this.backMask.set_x(this.TLPoint.x);this.backMask.set_y(0)}else{this.backMask.set_x(this.originPoint.x);this.backMask.set_y(0)}this.diagonalLen=Math.sqrt(this.layerWidth*this.layerWidth+this.layerHeight*this.layerHeight);this.curMask.get_graphics().clear();this.curMask.get_graphics().beginFill(255,0);this.curMask.get_graphics().drawRect(-this.diagonalLen,-this.diagonalLen,this.diagonalLen,2*this.diagonalLen);this.curMask.get_graphics().endFill();this.moveMask.get_graphics().clear();this.moveMask.get_graphics().beginFill(65280,0);this.moveMask.get_graphics().drawRect(-this.diagonalLen,-this.diagonalLen,this.diagonalLen,2*this.diagonalLen);this.moveMask.get_graphics().endFill();this.shadowCurMask.get_graphics().clear();this.shadowCurMask.get_graphics().beginFill(16711680,0);this.shadowCurMask.get_graphics().drawRect(0,0,2*this.layerWidth,this.layerHeight);this.shadowCurMask.get_graphics().endFill();this.shadowMoveMask.get_graphics().clear();this.shadowMoveMask.get_graphics().beginFill(65280,0);this.shadowMoveMask.get_graphics().drawRect(0,0,this.layerWidth,this.layerHeight);this.shadowMoveMask.get_graphics().endFill();if(this.shadowMove==null){this.shadowMove=new flipbookMM_bookBox_ShadowLayer("./img/shadows/shadow_top.png");this.shdowContain.addChild(this.shadowMove);this.shadowMove.set_mask(this.shadowMoveMask)}this.shadowMove.set_scaleY(this.diagonalLen);this.shadowMove.set_x(this.originPoint.x);if(this.shadowCur==null){this.shadowCur=new flipbookMM_bookBox_ShadowLayer("./img/shadows/shadow_b2.png");this.shdowContain.addChild(this.shadowCur);this.shadowCur.set_mask(this.shadowCurMask)}this.shadowCur.set_scaleY(this.diagonalLen);this.shadowCur.set_x(this.originPoint.x);if(this.shadowEffect==null){this.shadowEffect=new flipbookMM_bookBox_ShadowLayer("./img/shadows/shadow_b2.png");this.shadowEffect.set_alpha(.5);this.shadowEffect.set_scaleX(.2);this.shadowEffect.set_scaleY(this.layerHeight/2);this.shadowEffect.set_x(this.originPoint.x);this.shadowEffect.set_y(this.originPoint.y)}else{this.shadowEffect.set_scaleY(this.layerHeight/2);this.shadowEffect.set_x(this.originPoint.x);this.shadowEffect.set_y(this.originPoint.y)}},gotoPageLeftToRight:function(){if(this.isHScreen){if(this.tarPageIndex>this.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)}}}},gotoPageRightToLeft:function(){if(this.isHScreen){if(this.tarPageIndex>this.curPageIndex){this.startArea=1;this.isGoRight=false}else{this.startArea=3;this.isGoRight=true}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=false}else{this.startArea=3;this.isGoRight=true}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)}}}},gotoPage:function(e){if(this.isGoNormalPage(e)){if(this.isRightToLeft){this.gotoPageRightToLeft()}else{this.gotoPageLeftToRight()}}},gotoPrePage:function(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex+this.pageStep)}else{this.gotoPage(this.curPageIndex-this.pageStep)}},gotoNextPage:function(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex-this.pageStep)}else{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(e<this.currentPoint.x){this.tarPageIndex+=this.pageStep;this.autoFlip(this.flipStance.get_limtP(),this.TLPoint.x,false)}else{this.autoFlip(this.flipStance.get_limtP(),this.TRPoint.x,false)}}else if(this.startArea==2||this.startArea==3){if(e<this.currentPoint.x){this.autoFlip(this.flipStance.get_limtP(),this.TLPoint.x,false)}else{this.tarPageIndex-=this.pageStep;this.autoFlip(this.flipStance.get_limtP(),this.TRPoint.x,false)}}}else if(this.startArea==2||this.startArea==3){if(e<this.currentPoint.x){if(this.isGoRight==false){this.tarPageIndex+=this.pageStep}this.autoFlip(this.flipStance.get_limtP(),this.TLPoint.x,false)}else{if(this.isGoRight){this.tarPageIndex-=this.pageStep}this.autoFlip(this.flipStance.get_limtP(),this.TRPoint.x,false)}}},autoFlip:function(e,t,i){if(i==null){i=true}var s=this;this.isPlaying=true;var a=t;this.flipPoint=null;this.flipPoint=e.clone();var r=0;var n=0;var _;if(i){_=this.originPoint.y}else{_=this.flipPoint.y}var o=function(){if(s.startArea==0||s.startArea==2){if(s.flipPoint.x<s.originPoint.x){r=(_-s.TLPoint.y)/(s.originPoint.x-s.TLPoint.x)}else{r=(_-s.TRPoint.y)/(s.originPoint.x-s.TRPoint.x)}}else if(s.startArea==1||s.startArea==3){if(s.flipPoint.x<s.originPoint.x){r=(_-s.BLPoint.y)/(s.originPoint.x-s.BLPoint.x)}else{r=(_-s.BRPoint.y)/(s.originPoint.x-s.BRPoint.x)}}n=_-r*s.originPoint.x;s.flipPoint.y=r*s.flipPoint.x+n;s.flipPathUpdate(s.flipPoint.x,s.flipPoint.y)};var l=null;var h=function(){s.flipFinished();motion_Actuate.unload(l)};l=motion_Actuate.tween(this.flipPoint,.8,{x:a}).ease(motion_easing_Sine.get_easeOut()).onUpdate(o).onComplete(h)},softFlipMoveLeftToRightInit:function(){if(this.isHScreen){if(this.startArea==0||this.startArea==1){this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.curMask.set_x(this.TLPoint.x);this.curMask.set_y(this.TLPoint.y);this.curMask.set_rotation(180);this.pageList[3].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}else if(this.startArea==2||this.startArea==3){this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.curMask.set_x(this.TRPoint.x);this.curMask.set_y(this.TRPoint.y);this.curMask.set_rotation(0);this.pageList[4].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}this.pageList[3].changeObjectStatus(false);this.pageList[4].changeObjectStatus(false);this.flipStance.setStartPosition(this.startArea)}else{if(this.startArea==2||this.startArea==3){if(this.isGoRight){this.moveLayer=this.pageLoad.getLoadPage(this.curPageIndex,true);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[2].set_x(this.originPoint.x);this.pageList[2].set_y(this.TRPoint.y);this.curMask.set_x(this.TRPoint.x);this.curMask.set_y(this.TRPoint.y);this.curMask.set_rotation(0);this.pageList[1].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}else{this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex,true);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[0].set_x(this.originPoint.x);this.pageList[0].set_y(this.TRPoint.y);this.curMask.set_x(this.TLPoint.x);this.curMask.set_y(this.TLPoint.y);this.curMask.set_rotation(180);this.pageList[0].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}this.pageList[1].changeObjectStatus(false)}this.flipStance.setStartPosition(this.startArea)}this.addChild(this.curMask);this.moveContain.addChild(this.moveMask);this.setChildIndex(this.shdowContain,this.get_numChildren()-1)},softFlipMoveRightToLeftInit:function(){if(this.isHScreen){if(this.startArea==0||this.startArea==1){this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.curMask.set_x(this.TRPoint.x);this.curMask.set_y(this.TRPoint.y);this.curMask.set_rotation(0);this.pageList[4].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}else if(this.startArea==2||this.startArea==3){this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.curMask.set_x(this.TLPoint.x);this.curMask.set_y(this.TLPoint.y);this.curMask.set_rotation(180);this.pageList[3].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}this.pageList[3].changeObjectStatus(false);this.pageList[4].changeObjectStatus(false);this.flipStance.setStartPosition(this.startArea)}else{if(this.startArea==2||this.startArea==3){if(this.isGoRight){this.moveLayer=this.pageLoad.getLoadPage(this.curPageIndex,true);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[2].set_x(this.originPoint.x);this.pageList[2].set_y(this.TRPoint.y);this.curMask.set_x(this.TRPoint.x);this.curMask.set_y(this.TRPoint.y);this.curMask.set_rotation(0);this.pageList[1].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}else{this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex,true);this.moveLayer.set_x(this.styleWidth);this.moveLayer.set_y(0);this.moveContain.addChild(this.moveLayer);this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[0].set_x(this.originPoint.x);this.pageList[0].set_y(this.TRPoint.y);this.curMask.set_x(this.TLPoint.x);this.curMask.set_y(this.TLPoint.y);this.curMask.set_rotation(180);this.pageList[0].set_mask(this.curMask);this.moveLayer.set_mask(this.moveMask)}this.pageList[1].changeObjectStatus(false)}this.flipStance.setStartPosition(this.startArea)}this.addChild(this.curMask);this.moveContain.addChild(this.moveMask);this.setChildIndex(this.shdowContain,this.get_numChildren()-1)},flipMoveInit:function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_MOVE_START));e=null;if(this.isRightToLeft){this.softFlipMoveRightToLeftInit()}else{this.softFlipMoveLeftToRightInit()}},softFlipPathUpdate:function(e,t){if(this.moveLayer==null){return}this.flipStance.update(e,t);var i=this.flipStance.get_angle();var s=Math.abs(i);if(s==0||s==180){return}this.moveLayer.set_x(this.flipStance.get_point().x);this.moveLayer.set_y(this.flipStance.get_point().y);this.moveLayer.set_rotation(i);if(this.startArea==0){this.curMask.set_x(this.TLPoint.x+(this.flipStance.get_limtP().y-this.TLPoint.y)/Math.sin(this.flipStance.get_angle()*Math.PI/180));this.curMask.set_y(this.TLPoint.y);this.curMask.set_rotation(i/2)}else if(this.startArea==1){this.curMask.set_x(this.BLPoint.x+(this.flipStance.get_limtP().y-this.BLPoint.y)/Math.sin(this.flipStance.get_angle()*Math.PI/180));this.curMask.set_y(this.BLPoint.y);this.curMask.set_rotation(i/2)}else if(this.startArea==2){this.curMask.set_x(this.TRPoint.x+(this.flipStance.get_limtP().y-this.TRPoint.y)/Math.sin(this.flipStance.get_angle()*Math.PI/180));this.curMask.set_y(this.TRPoint.y);this.curMask.set_rotation(i/2)}else if(this.startArea==3){this.curMask.set_x(this.BRPoint.x+(this.flipStance.get_limtP().y-this.BRPoint.y)/Math.sin(this.flipStance.get_angle()*Math.PI/180));this.curMask.set_y(this.BRPoint.y);this.curMask.set_rotation(i/2)}this.moveMask.set_x(this.curMask.get_x());this.moveMask.set_y(this.curMask.get_y());this.moveMask.set_rotation(this.curMask.get_rotation());this.shadowMove.set_x(this.curMask.get_x());this.shadowMove.set_y(this.curMask.get_y());this.shadowMove.set_rotation(this.curMask.get_rotation()+180);this.shadowCur.set_x(this.curMask.get_x());this.shadowCur.set_y(this.curMask.get_y());this.shadowCur.set_rotation(this.curMask.get_rotation());this.shadowMoveMask.set_x(this.moveLayer.get_x());this.shadowMoveMask.set_y(this.moveLayer.get_y());this.shadowMoveMask.set_rotation(this.moveLayer.get_rotation());this.shadowCurMask.set_x(this.TLPoint.x);this.shadowCurMask.set_y(this.TLPoint.y);var a=this.layerWidth/80;var r=this.layerWidth/120;var n=0;if(this.startArea==0){n=Math.min(1,Math.abs(this.flipStance.get_limtP().x-this.TLPoint.x)/this.layerWidth)}else if(this.startArea==1){n=Math.min(1,Math.abs(this.flipStance.get_limtP().x-this.BLPoint.x)/this.layerWidth)}else if(this.startArea==2){n=Math.min(1,Math.abs(this.flipStance.get_limtP().x-this.TRPoint.x)/this.layerWidth)}else if(this.startArea==3){n=Math.min(1,Math.abs(this.flipStance.get_limtP().x-this.BRPoint.x)/this.layerWidth)}this.shadowMove.set_scaleX(n*a/6+a/6);this.shadowCur.set_scaleX(n*r/6+r/6);this.shadowMove.set_alpha(Math.max(.4,1-n));this.shadowCur.set_alpha(Math.max(.4,1-n));if(this.curMask.get_rotation()==0){this.shdowContain.set_visible(false)}else{this.shdowContain.set_visible(true)}},flipPathUpdate:function(e,t){if(this.isRefresh){return}this.isRefresh=true;this.softFlipPathUpdate(e,t);this.isRefresh=false},flipFinished:function(){if(this.isRightToLeft){this.softFlipRightToLeftFinished()}else{this.softFlipLeftToRightFinished()}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()},softFlipLeftToRightFinished:function(){this.shdowContain.set_visible(false);this.setChildIndex(this.shdowContain,0);var e=0;if(this.isHScreen){if(this.moveLayer!=null){this.moveContain.removeChildren(0);this.moveLayer.set_mask(null);this.moveLayer=null}if(this.pageList!=null){var t=this.pageList.length;var i=0;var s=t;while(i<s){var a=i++;this.pageList[a].set_mask(null)}var r=0;var n=t;while(r<n){var _=r++;this.pageList.shift()}this.removeChild(this.curMask)}if(this.containLayer.get_numChildren()>0){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(d<g){var m=d++;this.pageList[m].set_mask(null)}var v=0;var b=p;while(v<b){var y=v++;this.pageList.shift()}this.removeChild(this.curMask)}if(this.containLayer.get_numChildren()>0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var w=x++;var k=this.tarPageIndex-1+w;if(k<0){k=0}this.pageList[w]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[w]);if(w==0){this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}else{this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}}var P=0;while(P<3){var C=P++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var M=T++;if(this.isDisplayEmbedObject){if(M==1){this.pageList[M].changeObjectStatus(true)}else{this.pageList[M].changeObjectStatus(false)}}else{this.pageList[M].changeObjectStatus(false)}if(this.isHighlightText){if(M==1){this.pageList[M].addHighlightText()}}else{this.pageList[M].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)}},softFlipRightToLeftFinished:function(){this.shdowContain.set_visible(false);this.setChildIndex(this.shdowContain,0);var e=0;if(this.isHScreen){if(this.moveLayer!=null){this.moveContain.removeChildren(0);this.moveLayer.set_mask(null);this.moveLayer=null}if(this.pageList!=null){var t=this.pageList.length;var i=0;var s=t;while(i<s){var a=i++;this.pageList[a].set_mask(null)}var r=0;var n=t;while(r<n){var _=r++;this.pageList.shift()}this.removeChild(this.curMask)}if(this.containLayer.get_numChildren()>0){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-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-this.layerWidth+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(d<g){var m=d++;this.pageList[m].set_mask(null)}var v=0;var b=p;while(v<b){var y=v++;this.pageList.shift()}this.removeChild(this.curMask)}if(this.containLayer.get_numChildren()>0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var w=x++;var k=this.tarPageIndex+1-w;if(k<0){k=0}this.pageList[w]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[w]);if(w==0){this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}else{this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}}var P=0;while(P<3){var C=P++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var M=T++;if(this.isDisplayEmbedObject){if(M==1){this.pageList[M].changeObjectStatus(true)}else{this.pageList[M].changeObjectStatus(false)}}else{this.pageList[M].changeObjectStatus(false)}if(this.isHighlightText){if(M==1){this.pageList[M].addHighlightText()}}else{this.pageList[M].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 i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s!=3&&s!=4){this.containLayer.removeChild(this.pageList[s])}}else if(s!=1){this.containLayer.removeChild(this.pageList[s])}}}else{this.flipFinished()}},updateContentSta:function(e){if(e){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s==3||s==4){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}else if(s==1){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}}else{var a=0;var r=this.pageList.length;while(a<r){var n=a++;if(this.isHScreen){if(n==3||n==4){this.pageList[n].scaleContentDestroy()}}else if(n==1){this.pageList[n].scaleContentDestroy()}}}},updatePdfTxtPosition:function(){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(this.isHScreen){if(i==3||i==4){this.pageList[i].changePageTxtStatus()}}else if(i==1){this.pageList[i].changePageTxtStatus()}}},getZoomCoefX:function(e){if(this.isHScreen){return this.get_width()/this.get_scaleX()/(this.containLayer.get_width()*e)}else{return this.get_width()/this.get_scaleX()/((this.containLayer.get_width()-this.layerWidth)*e)}},getZoomCoefY:function(e){return this.get_height()/this.get_scaleY()/(this.containLayer.get_height()*e)},getZoomCenterCoefX:function(){if(this.isHScreen){return this.get_mouseX()/this.containLayer.get_width()}else{return this.get_mouseX()/(this.containLayer.get_width()-this.layerWidth)}},getZoomCenterCoefY:function(){return this.get_mouseY()/this.containLayer.get_height()},playBKMusic:function(){if(!this.isPlaying){if(!this.isMute){if(this.isHScreen){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(i==3||i==4){this.pageList[i].changeBkMusicStatus(true)}else{this.pageList[i].changeBkMusicStatus(false)}}}else{var s=0;var a=this.pageList.length;while(s<a){var r=s++;if(r==1){this.pageList[r].changeBkMusicStatus(true)}else{this.pageList[r].changeBkMusicStatus(false)}}}}else{var n=0;var _=this.pageList.length;while(n<_){var o=n++;this.pageList[o].changeBkMusicStatus(false)}}}},setMuteMode:function(e){this.isMute=e;this.playBKMusic()},__class__:flipbookMM_bookBox_style_FlipStyle});var flipbookMM_bookBox_style_LimitPoint=function(){this._isTop=false;this._tmpSpeed=1;this._speed=1;this._Op=new openfl_geom_Point;this._mPoint=new openfl_geom_Point;this._tPoint=new openfl_geom_Point;this._bPoint=new openfl_geom_Point};$hxClasses["flipbookMM.bookBox.style.LimitPoint"]=flipbookMM_bookBox_style_LimitPoint;flipbookMM_bookBox_style_LimitPoint.__name__=["flipbookMM","bookBox","style","LimitPoint"];flipbookMM_bookBox_style_LimitPoint.prototype={_width:null,_height:null,_topR:null,_tPoint:null,_bPoint:null,_mPoint:null,_dia:null,_speed:null,_tmpSpeed:null,_isTop:null,_Op:null,_point:null,setSize:function(e,t,i){this._point=new openfl_geom_Point;this._width=e;this._height=t;this._topR=Math.sqrt(this._width*this._width+this._height*this._height);this._tPoint=new openfl_geom_Point(this._Op.x,this._Op.y-t/2);this._bPoint=new openfl_geom_Point(this._Op.x,this._Op.y+t/2);this._dia=Math.sqrt(this._width*this._width+this._height*this._height);this.update(i.x,i.y);this._speed=this._tmpSpeed},change:function(){var e=new openfl_geom_Point(this._tPoint.x,this._tPoint.y);this._tPoint.x=this._bPoint.x;this._tPoint.y=this._bPoint.y;this._bPoint.x=e.x;this._bPoint.y=e.y;this._isTop=!this._isTop;return this._isTop},changeTo:function(e){if(e=="top"){if(!this._isTop){this.change()}}else if(e=="bottom"){if(this._isTop){this.change()}}},getDis:function(e,t,i,s){var a=Math.abs(e-i);var r=Math.abs(t-s);return Math.sqrt(a*a+r*r)},getAngleByPoint:function(e,t,i,s){return Math.atan2(s-t,i-e)},update:function(e,t){var i=0;this._mPoint.x=e;this._mPoint.y=t;if(!this._isTop&&t<=this._Op.y+this._height/2||this._isTop&&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{i=this.getAngleByPoint(this._bPoint.x,this._bPoint.y,e,t);this._point.x=Math.cos(i)*this._width+this._bPoint.x;this._point.y=Math.sin(i)*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{i=this.getAngleByPoint(this._tPoint.x,this._tPoint.y,e,t);this._point.x=Math.cos(i)*this._dia+this._tPoint.x;this._point.y=Math.sin(i)*this._dia+this._tPoint.y}if(this._point.x<this._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}}if(this._point.x>this._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,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=1}var o=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,2,_);this.pageWidth=i;this.pageHeight=s;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);fabric_FabricBaseObject._fn_gotoPage=$bind(this,this.gotoPage);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(i,s,a,r);var l=flipbookMM_config_ConfigSetting.getInstance();if(l.yesOrNo(l.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}l=null;this.resize(e,t);this.gotoPage(n);this.playBKMusic();var h=flipbookMM_events_EventCenter.getInstance();h.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){o.isDisplayEmbedObject=true}else if(t=="off"){o.isDisplayEmbedObject=false}o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){o.isHighlightText=true;o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){o.isHighlightText=false;o.flipFinished()});h=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 i=0;if(this.styleWidth>this.styleHeight){i=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{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=this.pageWidth/this.pageHeight;var a=i/this.pageWidth;var r=this.styleHeight/this.pageHeight;var n=a<r?a:r;if(a<r){this.layerWidth=i;this.layerHeight=this.pageHeight*a}else{this.layerWidth=this.pageWidth*r;this.layerHeight=this.styleHeight}this.pageLoad.resize(this.layerWidth,this.layerHeight);if(this.isHScreen){this.pageLoad.updateBufferNum(3)}else{this.pageLoad.updateBufferNum(1)}this.flipFinished()},gotoPage:function(e){var t=this;if(this.isZoom){return}if(this.isHScreen){var i=this.maxPageIndex%2==0?this.maxPageIndex:this.maxPageIndex+1;if(e<0||e>i){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.isRightToLeft){if(this.curPageIndex<this.tarPageIndex){this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.pageList[0].set_x(-this.styleWidth+(this.styleWidth-2*this.layerWidth)/2);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1].set_x(-this.styleWidth+(this.styleWidth-2*this.layerWidth)/2+this.layerWidth);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);motion_Actuate.tween(this.containLayer,.5,{x:this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}else{this.pageList[4]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[5]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.pageList[4].set_x(this.styleWidth+(this.styleWidth-2*this.layerWidth)/2);this.pageList[4].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[5].set_x(this.styleWidth+(this.styleWidth-2*this.layerWidth)/2+this.layerWidth);this.pageList[5].set_y((this.styleHeight-this.layerHeight)/2);motion_Actuate.tween(this.containLayer,.5,{x:-this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}}else if(this.curPageIndex<this.tarPageIndex){this.pageList[4]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.pageList[5]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[4].set_x(this.styleWidth+(this.styleWidth-2*this.layerWidth)/2);this.pageList[4].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[5].set_x(this.styleWidth+(this.styleWidth-2*this.layerWidth)/2+this.layerWidth);this.pageList[5].set_y((this.styleHeight-this.layerHeight)/2);motion_Actuate.tween(this.containLayer,.5,{x:-this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}else{this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex-1);this.pageList[1]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[0].set_x(-this.styleWidth+(this.styleWidth-2*this.layerWidth)/2);this.pageList[0].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[1].set_x(-this.styleWidth+(this.styleWidth-2*this.layerWidth)/2+this.layerWidth);this.pageList[1].set_y((this.styleHeight-this.layerHeight)/2);motion_Actuate.tween(this.containLayer,.5,{x:this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}}else if(this.isRightToLeft){if(this.curPageIndex<this.tarPageIndex){if(this.tarPageIndex-this.curPageIndex!=1){this.containLayer.removeChild(this.pageList[2])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(-this.styleWidth+(this.styleWidth-this.layerWidth)/2);this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);motion_Actuate.tween(this.containLayer,.5,{x:this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}else{if(this.curPageIndex-this.tarPageIndex!=1){this.containLayer.removeChild(this.pageList[0])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(this.styleWidth+(this.styleWidth-this.layerWidth)/2);this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);motion_Actuate.tween(this.containLayer,.5,{x:-this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}}else if(this.curPageIndex<this.tarPageIndex){if(this.tarPageIndex-this.curPageIndex!=1){this.containLayer.removeChild(this.pageList[2])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(this.styleWidth+(this.styleWidth-this.layerWidth)/2);this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);motion_Actuate.tween(this.containLayer,.5,{x:-this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}else{if(this.curPageIndex-this.tarPageIndex!=1){this.containLayer.removeChild(this.pageList[0])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);this.moveLayer.set_x(-this.styleWidth+(this.styleWidth-this.layerWidth)/2);this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);motion_Actuate.tween(this.containLayer,.5,{x:this.styleWidth}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}},flipFinished:function(){if(this.containLayer.get_numChildren()>0){this.containLayer.removeChildren(0);this.moveLayer=null}if(this.isHScreen){this.containLayer.set_x(0);var e=0;while(e<6){var t=e++;if(this.isRightToLeft){this.pageList[t]=this.pageLoad.getLoadPage(this.tarPageIndex+2-t)}else{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 i=0;while(i<6){var s=i++;if(this.isDisplayEmbedObject){if(s==2||s==3){this.pageList[s].changeObjectStatus(true)}else{this.pageList[s].changeObjectStatus(false)}}else{this.pageList[s].changeObjectStatus(false)}if(this.isHighlightText){if(s==2||s==3){this.pageList[s].addHighlightText()}}else{this.pageList[s].removeHighlightText()}}this.pageLoad.preloadPage(this.curPageIndex)}else{this.containLayer.set_x(0);if(this.isRightToLeft){this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex+1)}else{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);if(this.isRightToLeft){this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex-1)}else{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(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex+this.pageStep)}else{this.gotoPage(this.curPageIndex-this.pageStep)}},gotoNextPage:function(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex-this.pageStep)}else{this.gotoPage(this.curPageIndex+this.pageStep)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s!=2&&s!=3){this.containLayer.removeChild(this.pageList[s])}}else if(s!=1){this.containLayer.removeChild(this.pageList[s])}}}else{this.flipFinished()}},updateContentSta:function(e){if(e){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s==2||s==3){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}else if(s==1){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}}else{var a=0;var r=this.pageList.length;while(a<r){var n=a++;if(this.isHScreen){if(n==2||n==3){this.pageList[n].scaleContentDestroy()}}else if(n==1){this.pageList[n].scaleContentDestroy()}}}},updatePdfTxtPosition:function(){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(this.isHScreen){if(i==2||i==3){this.pageList[i].changePageTxtStatus()}}else if(i==1){this.pageList[i].changePageTxtStatus()}}},getZoomCoefX:function(e){if(this.isHScreen){return(this.styleWidth+this.styleWidth+this.styleWidth)/(this.styleWidth*e)}else{return(this.styleWidth+2*this.layerWidth+2*this.offsetX)/(this.styleWidth*e)}},getZoomCoefY:function(e){return 1/e},getZoomCenterCoefX:function(){return this.get_mouseX()/this.styleWidth},getZoomCenterCoefY:function(){return this.get_mouseY()/this.styleHeight},playBKMusic:function(){if(!this.isPlaying){if(!this.isMute){if(this.isHScreen){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(i==2||i==3){this.pageList[i].changeBkMusicStatus(true)}else{this.pageList[i].changeBkMusicStatus(false)}}}else{var s=0;var a=this.pageList.length;while(s<a){var r=s++;if(r==1){this.pageList[r].changeBkMusicStatus(true)}else{this.pageList[r].changeBkMusicStatus(false)}}}}else{var n=0;var _=this.pageList.length;while(n<_){var o=n++;this.pageList[o].changeBkMusicStatus(false)}}}},setMuteMode:function(e){this.isMute=e;this.playBKMusic()},__class__:flipbookMM_bookBox_style_SlideDoubleStyle});var flipbookMM_bookBox_style_SlideStyle=function(e,t,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=1}var o=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,0,_);this.pageWidth=i;this.pageHeight=s;this.maxPageIndex=a;this.curPageIndex=0;this.tarPageIndex=0;this.isPlaying=false;this.isZoom=false;this.pageStep=1;this.offsetX=10;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);fabric_FabricBaseObject._fn_gotoPage=$bind(this,this.gotoPage);this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);this.pageList=[];this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(i,s,a,r);var l=flipbookMM_config_ConfigSetting.getInstance();if(l.yesOrNo(l.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}l=null;this.resize(e,t);this.gotoPage(n);this.playBKMusic();var h=flipbookMM_events_EventCenter.getInstance();h.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){o.isDisplayEmbedObject=true}else if(t=="off"){o.isDisplayEmbedObject=false}o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){o.isHighlightText=true;o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){o.isHighlightText=false;o.flipFinished()});h=null};$hxClasses["flipbookMM.bookBox.style.SlideStyle"]=flipbookMM_bookBox_style_SlideStyle;flipbookMM_bookBox_style_SlideStyle.__name__=["flipbookMM","bookBox","style","SlideStyle"];flipbookMM_bookBox_style_SlideStyle.__super__=flipbookMM_bookBox_style_BaseStyle;flipbookMM_bookBox_style_SlideStyle.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 i=this.pageWidth/this.pageHeight;var s=this.styleWidth/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=s<a?s:a;if(s<a){this.layerWidth=this.styleWidth;this.layerHeight=this.styleWidth/i}else if(s>a){this.layerWidth=this.styleHeight*i;this.layerHeight=this.styleHeight}this.pageLoad.resize(this.layerWidth,this.layerHeight);this.pageLoad.updateBufferNum(1);var n=0;var _=this.pageList;while(n<_.length){var o=_[n];++n;if(o!=null){o.set_x((this.styleWidth-this.layerWidth)/2);o.set_y((this.styleHeight-this.layerHeight)/2)}}this.flipFinished()},gotoPage:function(e){var t=this;if(this.isZoom){return}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.curPageIndex<this.tarPageIndex){if(this.tarPageIndex-this.curPageIndex!=1){this.containLayer.removeChild(this.pageList[2])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);if(this.isRightToLeft){this.moveLayer.set_x(-this.styleWidth+(this.styleWidth-this.layerWidth)/2)}else{this.moveLayer.set_x(this.styleWidth+(this.styleWidth-this.layerWidth)/2)}this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);var i=0;if(this.isRightToLeft){i=this.styleWidth}else{i=-this.styleWidth}motion_Actuate.tween(this.containLayer,.5,{x:i}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}else{if(this.curPageIndex-this.tarPageIndex!=1){this.containLayer.removeChild(this.pageList[0])}this.moveLayer=this.pageLoad.getLoadPage(this.tarPageIndex);if(this.isRightToLeft){this.moveLayer.set_x(this.styleWidth+(this.styleWidth-this.layerWidth)/2)}else{this.moveLayer.set_x(-this.styleWidth+(this.styleWidth-this.layerWidth)/2)}this.moveLayer.set_y((this.styleHeight-this.layerHeight)/2);this.containLayer.addChild(this.moveLayer);this.pageList[1].changeObjectStatus(false);var s=0;if(this.isRightToLeft){s=-this.styleWidth}else{s=this.styleWidth}motion_Actuate.tween(this.containLayer,.5,{x:s}).ease(motion_easing_Sine.get_easeOut()).onComplete(function(){t.flipFinished()})}},flipFinished:function(){if(this.containLayer.get_numChildren()>0){this.containLayer.removeChildren(0);this.moveLayer=null}this.containLayer.set_x(0);if(this.isRightToLeft){this.pageList[0]=this.pageLoad.getLoadPage(this.tarPageIndex+1)}else{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);if(this.isRightToLeft){this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex-1)}else{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(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex+this.pageStep)}else{this.gotoPage(this.curPageIndex-this.pageStep)}},gotoNextPage:function(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex-this.pageStep)}else{this.gotoPage(this.curPageIndex+this.pageStep)}},updateStyleStatus:function(e){if(e==this.isZoom){return}this.isZoom=e;if(this.isZoom){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(s!=1){this.containLayer.removeChild(this.pageList[s])}}}else{this.flipFinished()}},updateContentSta:function(e){if(e){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(s==1){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}}else{var a=0;var r=this.pageList.length;while(a<r){var n=a++;if(n==1){this.pageList[n].scaleContentDestroy()}}}},updatePdfTxtPosition:function(){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(i==1){this.pageList[i].changePageTxtStatus()}}},getZoomCoefX:function(e){return(this.styleWidth+2*this.layerWidth+2*this.offsetX)/(this.styleWidth*e)},getZoomCoefY:function(e){return 1/e},getZoomCenterCoefX:function(){return this.get_mouseX()/this.styleWidth},getZoomCenterCoefY:function(){return this.get_mouseY()/this.styleHeight},playBKMusic:function(){if(!this.isPlaying){if(!this.isMute){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(i==1){this.pageList[i].changeBkMusicStatus(true)}else{this.pageList[i].changeBkMusicStatus(false)}}}else{var s=0;var a=this.pageList.length;while(s<a){var r=s++;this.pageList[r].changeBkMusicStatus(false)}}}},setMuteMode:function(e){this.isMute=e;this.playBKMusic()},__class__:flipbookMM_bookBox_style_SlideStyle});var flipbookMM_bookBox_style_Cone_$parameters=function(e,t,i,s){this.theta=e;this.ay=t;this.angle=i;this.conicContribution=s};$hxClasses["flipbookMM.bookBox.style.Cone_parameters"]=flipbookMM_bookBox_style_Cone_$parameters;flipbookMM_bookBox_style_Cone_$parameters.__name__=["flipbookMM","bookBox","style","Cone_parameters"];flipbookMM_bookBox_style_Cone_$parameters.prototype={theta:null,ay:null,angle:null,conicContribution:null,__class__:flipbookMM_bookBox_style_Cone_$parameters};var flipbookMM_bookBox_style_ThreeAlgo=function(){this.displayShadow=false;this._threeControl=false;this._threeMonitor=false;openfl_display_Sprite.call(this)};$hxClasses["flipbookMM.bookBox.style.ThreeAlgo"]=flipbookMM_bookBox_style_ThreeAlgo;flipbookMM_bookBox_style_ThreeAlgo.__name__=["flipbookMM","bookBox","style","ThreeAlgo"];flipbookMM_bookBox_style_ThreeAlgo.__super__=openfl_display_Sprite;flipbookMM_bookBox_style_ThreeAlgo.prototype=$extend(openfl_display_Sprite.prototype,{_renderer:null,_scene:null,_camera:null,_light:null,_spotLight:null,_orbit:null,_axesHelper:null,_threeMonitor:null,_threeControl:null,displayShadow:null,_playground:null,renderWidth:null,renderHeight:null,turnDirection:null,_texture:null,_geometry:null,_material:null,_coneCube:null,stats:null,curPageW:null,curPageH:null,curPageS:null,curPageM:null,initThree:function(e,t){var i=this;this.renderWidth=e;this.renderHeight=t;this._renderer=new THREE.WebGLRenderer({antialias:true,alpha:true});this._renderer.autoClear=true;if(this.displayShadow){this._renderer.shadowMapEnabled=true}this._renderer.setSize(this.renderWidth,this.renderHeight);window.document.getElementById("openfl-content").appendChild(this._renderer.domElement);this._renderer.domElement.style.position="absolute";this._renderer.domElement.style.left="0px";this._renderer.domElement.style.top="0px";this._camera=new THREE.PerspectiveCamera(20,this.renderWidth/this.renderHeight,1,1e4);this._camera.position.set(0,0,2865);this._camera.up.set(0,1,0);this._camera.lookAt(new THREE.Vector3(0,0,0));this._scene=new THREE.Scene;if(this._threeMonitor){if(this._threeControl){this._orbit=new THREE.OrbitControls(this._camera,this._renderer.domElement)}this._axesHelper=new THREE.AxisHelper(900);this._scene.add(this._axesHelper)}this._light=new THREE.AmbientLight(16777215,.5);this._light.position.set(0,0,100);this._scene.add(this._light);this._spotLight=new THREE.SpotLight(16777215,.5);this._spotLight.position.set(0,0,2500);if(this.displayShadow){this._spotLight.castShadow=true;this._spotLight.shadowCameraNear=8;this._spotLight.shadowCameraFar=8100;this._spotLight.shadowMapWidth=1e4;this._spotLight.shadowMapHeight=1e4;this._scene.add(new THREE.CameraHelper(this._spotLight.shadow.camera))}this._scene.add(this._spotLight);var s=new THREE.PlaneGeometry(this.renderWidth,this.renderHeight,2,2);var a=new THREE.ShadowMaterial({opacity:.2});this._playground=new THREE.Mesh(s,a);if(this.displayShadow){this._playground.receiveShadow=true}this._playground.position.set(0,0,-1);this._scene.add(this._playground);this._texture=[];this._material=[];if(this._threeMonitor){this.stats=new Stats;window.document.body.appendChild(this.stats.domElement);this.stats.setMode(0);this.addEventListener("enterFrame",function(e){i.stats.update()})}},lineScale:function(e,t,i,s,a){return(s-t)/(i-e)*(a-e)+t},degToRad:function(e){return e*Math.PI/180},curlPage:function(e,t){this._texture[0]=new THREE.CanvasTexture(t[0]);this._texture[1]=new THREE.CanvasTexture(t[1]);var i=this.curPageW;var s=this.curPageH;var a=this.curPageS;var r=this.curPageM;var n=e.theta;var _=e.ay;var o=e.angle;var l=e.conicContribution;var h=10;var c=10;var u=s/9*a;var f=[];var p=[];var d=[];n=this.degToRad(n);o=this.degToRad(o);var g=h;var m=c;var v=Math.sqrt(g*g+(m/2-_)*(m/2-_));var b=v*Math.sin(n);var y;if(l>0){y=1}else{y=-1;_=-_+c}l=Math.abs(l);var x=0;var w=(c-1)*u/2;var k=0;var P=m;while(k<P){var C=k++;var T=0;var M=g;while(T<M){var S=T++;var $=S*i/s;var E=C;var B=0;var L=$;var R=E;var A=B;var I=Math.sqrt($*$+(E-_)*(E-_));var D=I*Math.sin(n);var F=Math.asin($/I)/Math.sin(n);L=D*Math.sin(F);R=I+y*_-D*(1-Math.cos(F))*Math.sin(n);A=D*(1-Math.cos(F))*Math.cos(n);var O=L*Math.cos(o)-A*Math.sin(o);var j=L*Math.sin(o)+A*Math.cos(o);L=O;A=j;L=L*u-x;R=-y*R*u+w;A*=u;var G=$;var H=E;var U=B;var N=G/b;U=-b;G=-U*Math.sin(N);U*=Math.cos(N);U+=b;var W=G*Math.cos(o)-U*Math.sin(o);var V=G*Math.sin(o)+U*Math.cos(o);G=W;U=V;G=G*u-x;H=-H*u+w;U*=u;var z=1-l;$=l*L+z*G;E=l*R+z*H;B=l*A+z*U;if(this.turnDirection){f.push(new THREE.Vector3($,E,B))}else{f.push(new THREE.Vector3(-$,E,B))}}}var X=0;var Y=m-1;while(X<Y){var J=X++;var K=0;var q=g-1;while(K<q){var Z=K++;var Q=J*g+Z;var ee=(J+1)*g+(Z+1);var te=(J+1)*g+Z;p.push(new THREE.Face3(Q,ee,te));var ie=J*g+(Z+1);var se=(J+1)*g+(Z+1);var ae=J*g+Z;p.push(new THREE.Face3(ie,se,ae))}}var re=i/r;var ne=s/r;var _e=1/(g-1)*re;var oe=1/(m-1)*ne;var le=0;var he=m-1;while(le<he){var ce=le++;var ue=0;var fe=g-1;while(ue<fe){var pe=ue++;d.push([new THREE.Vector2(pe*_e,ce*oe),new THREE.Vector2((pe+1)*_e,(ce+1)*oe),new THREE.Vector2(pe*_e,(ce+1)*oe)]);d.push([new THREE.Vector2((pe+1)*_e,ce*oe),new THREE.Vector2((pe+1)*_e,(ce+1)*oe),new THREE.Vector2(pe*_e,ce*oe)])}}this._geometry=new THREE.Geometry;this._geometry.vertices=f;this._geometry.faces=p;this._geometry.faceVertexUvs[0]=d;this._geometry.computeFaceNormals();this._geometry.computeVertexNormals();if(this._texture[0]!=null){this._texture[0].wrapS=THREE.RepeatWrapping;this._texture[0].wrapT=THREE.RepeatWrapping;this._texture[0].repeat.set(-1,-1)}this._material[0]=new THREE.MeshPhongMaterial({map:this._texture[0],side:THREE.FrontSide});if(this._texture[1]!=null){this._texture[1].wrapS=THREE.RepeatWrapping;this._texture[1].wrapT=THREE.RepeatWrapping;this._texture[1].repeat.set(1,-1)}this._material[1]=new THREE.MeshPhongMaterial({map:this._texture[1],side:THREE.BackSide})},paperDoubleParamesL:function(e,t){var i=!(Math.abs(e)<1.001&&Math.abs(t)<1.001);var s=0;var a=0;var r=0;var n=[1,.9,.5,0,-.5,-.75,-.9,-1];var _=[0,.1,0,0,90,135,170,180];var o=[90,85,55,25,30,50,85,90];var l=[-2e3,-20,-12.5,-5,-7,-10,-20,-2e3];var h=n.length;var c=0;var u=h;while(c<u){var f=c++;if(e>=n[f]){if(f==0){s=o[0];a=l[0];r=_[0]}else{s=this.lineScale(n[f-1],o[f-1],n[f],o[f],e);a=this.lineScale(n[f-1],l[f-1],n[f],l[f],e);r=this.lineScale(n[f-1],_[f-1],n[f],_[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(s,a,r,t)},paperDoubleParamesR:function(e,t){var i=!(Math.abs(e)<1.001&&Math.abs(t)<1.001);var s=0;var a=0;var r=0;var n=[1,.9,.5,0,-.5,-.75,-.9,-1];var _=[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=n.length;var c=0;var u=h;while(c<u){var f=c++;if(e>=n[f]){if(f==0){s=o[0];a=l[0];r=_[0]}else{s=this.lineScale(n[f-1],o[f-1],n[f],o[f],e);a=this.lineScale(n[f-1],l[f-1],n[f],l[f],e);r=this.lineScale(n[f-1],_[f-1],n[f],_[f],e)}break}}return new flipbookMM_bookBox_style_Cone_$parameters(s,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 i=e>=t?e:t;var s=i;var a=8;while(a<14){var r=a++;s=Math.pow(2,r);if(i<=s){break}}return s|0},updateThreeStyle:function(e,t,i){if(this.turnDirection){var s=this.paperDoubleParamesR(e,t);this.curlPage(s,i)}else{var a=this.paperDoubleParamesL(e,t);this.curlPage(a,i)}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,i,s,a){if(this._renderer!=null){this.clearThreeStyle();window.document.getElementById("openfl-content").removeChild(this._renderer.domElement)}this.initThree(s,a);this._scene.position.set(e,t,i)},updateCanvasParamater:function(e,t,i,s,a){this.curPageW=e;this.curPageH=t;this.curPageM=i;this.curPageS=s;this.turnDirection=a},__class__:flipbookMM_bookBox_style_ThreeAlgo});var flipbookMM_bookBox_style_ThreeStyle=function(e,t,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=1}var o=this;flipbookMM_bookBox_style_BaseStyle.call(this,e,t,i,s,a,r,3,_);this.pageWidth=i;this.pageHeight=s;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 l=flipbookMM_config_ConfigSetting.getInstance();if(l.hasKey(flipbookMM_config_ConfigKey.FLipStyleHardEnable)){this.hardCoverEnable=l.yesOrNo(l.get(flipbookMM_config_ConfigKey.FLipStyleHardEnable))}if(l.yesOrNo(l.get(flipbookMM_config_ConfigKey.PageSwitchSoundEnable))){this.playSound=new base_baseSprite_PlayMusicJS("./sounds/type1.mp3")}l=null;xeditor_objects_TrObject._fn_gotoPage=$bind(this,this.gotoPage);fabric_FabricBaseObject._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(i,s,a,r);this.flipStance=new flipbookMM_bookBox_style_FlipStance;this.curPageIndex=n;this.tarPageIndex=this.curPageIndex;this.startArea=-1;this.manualFlipStatus=0;this.pageStep=0;this.resize(e,t);this.addEventListener("mouseDown",function(e){if(o.isPlaying){return}if(o.get_scaleY()!=1){return}var s=new openfl_geom_Point(o.get_mouseX(),o.get_mouseY());o.manualFlipStatus=1;var t=function(){if(o.manualFlipStatus==1){var e=0;if(o.isHScreen){if(s.x<o.currentPoint.x){if(s.y<o.currentPoint.y){o.startArea=0}else{o.startArea=1}}else if(s.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}if(_){if(o.startArea==0||o.startArea==1){e=o.curPageIndex+o.pageStep;o.isGoRight=true}else if(o.startArea==2||o.startArea==3){e=o.curPageIndex-o.pageStep;o.isGoRight=false}}else if(o.startArea==0||o.startArea==1){e=o.curPageIndex-o.pageStep;o.isGoRight=false}else if(o.startArea==2||o.startArea==3){e=o.curPageIndex+o.pageStep;o.isGoRight=true}}else{if(s.x<o.currentPoint.x){e=o.curPageIndex-o.pageStep;o.isGoRight=false}else{e=o.curPageIndex+o.pageStep;o.isGoRight=true}if(s.y<o.currentPoint.y){o.startArea=2}else{o.startArea=3}}if(o.isGoNormalPage(e)){o.flipMoveInit();if(o.isHScreen){if(_){o.flipPathUpdate((o.layerHeight/2-s.y)/(o.layerHeight/2),(s.x-o.layerWidth)/o.layerWidth)}else{o.flipPathUpdate((s.x-o.layerWidth)/o.layerWidth,(o.layerHeight/2-s.y)/(o.layerHeight/2))}}else{var t=(s.x+o.layerWidth-o.layerWidth)/o.layerWidth;var i=o.layerHeight/2-o.get_mouseY();o.flipPathUpdate(t,i/(o.layerHeight/2))}o.isAutoPlay=false;o.manualFlipStatus=2}}};haxe_Timer.delay(t,500)});this.addEventListener("mouseUp",function(e){if(o.manualFlipStatus==2){var t=o.get_mouseX();var i=o.get_mouseY();o.onTouchRelease(t,i)}o.manualFlipStatus=3});this.addEventListener("rollOut",function(e){if(o.manualFlipStatus==2){var t=o.get_mouseX();var i=o.get_mouseY();o.onTouchRelease(t,i)}o.manualFlipStatus=3});this.addEventListener("mouseMove",function(e){if(o.manualFlipStatus==2){if(o.startArea>=0&&o.startArea<=3){if(o.isHScreen){var t=(o.get_mouseX()-o.layerWidth)/o.layerWidth;var i=o.layerHeight/2-o.get_mouseY();o.flipPathUpdate(t,i/(o.layerHeight/2))}else if(o.startArea==0||o.startArea==1){var s=(o.get_mouseX()+o.layerWidth-o.layerWidth)/o.layerWidth;var a=o.layerHeight/2-o.get_mouseY();o.flipPathUpdate(s,a/(o.layerHeight/2))}else{var r=(o.get_mouseX()+o.layerWidth-o.layerWidth)/o.layerWidth;var n=o.layerHeight/2-o.get_mouseY();o.flipPathUpdate(r,n/(o.layerHeight/2))}}}});var h=flipbookMM_events_EventCenter.getInstance();h.addEventListener(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,this,function(e){var t=js_Boot.__cast(e._data._object,String);if(t=="on"){o.isDisplayEmbedObject=true}else if(t=="off"){o.isDisplayEmbedObject=false}o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,this,function(e){o.isHighlightText=true;o.flipFinished()});h.addEventListener(flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL,this,function(e){o.isHighlightText=false;o.flipFinished()});h=null;haxe_Timer.delay(function(){if(o.isHScreen){o.pageList[3].changeObjectStatus(true);o.pageList[4].changeObjectStatus(true)}else{o.pageList[1].changeObjectStatus(true)}o.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 i=0;if(this.styleWidth>this.styleHeight){i=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{i=this.styleWidth;if(this.isHScreen==true){if(this.tarPageIndex>this.maxPageIndex){this.tarPageIndex=this.maxPageIndex}}this.isHScreen=false;this.pageStep=1}var s=i/this.pageWidth;var a=this.styleHeight/this.pageHeight;var r=s<a?s:a;if(s<a){this.layerWidth=i;this.layerHeight=this.pageHeight*s}else{this.layerWidth=this.pageWidth*a;this.layerHeight=this.styleHeight}this.currentPoint=new openfl_geom_Point(this.styleWidth/2,this.styleHeight/2);this.pageLoad.resize(this.layerWidth,this.layerHeight);if(this.isHScreen){this.originPoint=new openfl_geom_Point(this.styleWidth/2,this.styleHeight/2)}else{this.originPoint=new openfl_geom_Point((this.styleWidth-this.layerWidth)/2,this.styleHeight/2)}this.TLPoint=new openfl_geom_Point(this.originPoint.x-this.layerWidth,this.originPoint.y-this.layerHeight/2);this.BLPoint=new openfl_geom_Point(this.originPoint.x-this.layerWidth,this.originPoint.y+this.layerHeight/2);this.TRPoint=new openfl_geom_Point(this.originPoint.x+this.layerWidth,this.originPoint.y-this.layerHeight/2);this.BRPoint=new openfl_geom_Point(this.originPoint.x+this.layerWidth,this.originPoint.y+this.layerHeight/2);this.flipStance.set_Opoint(this.originPoint);this.flipStance.setSize(this.styleWidth,this.styleHeight,this.layerWidth,this.layerHeight);if(this.isHScreen){this.pageLoad.updateBufferNum(3)}else{this.pageLoad.updateBufferNum(1)}this.flipFinished();this.backMask.get_graphics().clear();this.backMask.get_graphics().beginFill(0,0);this.backMask.get_graphics().drawRect(0,0,this.layerWidth*2,this.styleHeight);this.backMask.get_graphics().endFill();if(this.isHScreen){this.backMask.set_x(this.TLPoint.x);this.backMask.set_y(0)}else{this.backMask.set_x(this.originPoint.x);this.backMask.set_y(0)}this.diagonalLen=Math.sqrt(this.layerWidth*this.layerWidth+this.layerHeight*this.layerHeight);if(this.shadowEffect==null){this.shadowEffect=new flipbookMM_bookBox_ShadowLayer("./img/shadows/shadow_b2.png");this.shadowEffect.set_alpha(.5);this.shadowEffect.set_scaleX(.2);this.shadowEffect.set_scaleY(this.layerHeight/2);this.shadowEffect.set_x(this.originPoint.x);this.shadowEffect.set_y(this.originPoint.y)}else{this.shadowEffect.set_scaleY(this.layerHeight/2);this.shadowEffect.set_x(this.originPoint.x);this.shadowEffect.set_y(this.originPoint.y)}this.resizeThreeStyle()},gotoPage:function(e){if(this.isGoNormalPage(e)){if(this.isHScreen){if(this.isRightToLeft){if(this.tarPageIndex>this.curPageIndex){this.startArea=1;this.isGoRight=false}else{this.startArea=3;this.isGoRight=true}}else if(this.tarPageIndex>this.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(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex+this.pageStep)}else{this.gotoPage(this.curPageIndex-this.pageStep)}},gotoNextPage:function(){if(this.isRightToLeft){this.gotoPage(this.curPageIndex-this.pageStep)}else{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(e<this.currentPoint.x){this.tarPageIndex+=this.pageStep;this.autoFlip(new openfl_geom_Point(e,t),0)}else{this.autoFlip(new openfl_geom_Point(e,t),2*this.layerWidth)}}else if(this.startArea==2||this.startArea==3){if(e<this.currentPoint.x){this.autoFlip(new openfl_geom_Point(e,t),0)}else{this.tarPageIndex-=this.pageStep;this.autoFlip(new openfl_geom_Point(e,t),2*this.layerWidth)}}}else if(this.startArea==2||this.startArea==3){if(e<this.currentPoint.x){if(this.isGoRight==false){this.tarPageIndex+=this.pageStep}this.autoFlip(new openfl_geom_Point(e+this.layerWidth,t),0)}else{if(this.isGoRight){this.tarPageIndex-=this.pageStep}this.autoFlip(new openfl_geom_Point(e+this.layerWidth,t),2*this.layerWidth)}}},autoFlip:function(e,t){var i=this;this.isPlaying=true;this.flipPoint=null;this.flipPoint=e.clone();var s=function(){i.flipPathUpdate((i.flipPoint.x-i.layerWidth)/i.layerWidth,(i.layerHeight/2-i.flipPoint.y)/(i.layerHeight/2))};var a=null;var r=function(){i.flipFinished();motion_Actuate.unload(a)};var n;if(this.isAutoPlay){n=.8}else{n=.3}a=motion_Actuate.tween(this.flipPoint,n,{x:t}).ease(motion_easing_Linear.get_easeNone()).onUpdate(s).onComplete(r);this.isAutoPlay=true},hardFlipMoveInit:function(){if(this.isHScreen){this.pageList[3].changeObjectStatus(false);this.pageList[4].changeObjectStatus(false);if(this.isRightToLeft){if(this.startArea==0||this.startArea==1){if(this.tarPageIndex>=this.maxPageIndex){this.containLayer.removeChildren(4,8)}this.containLayer.setChildIndex(this.pageList[6],this.containLayer.get_numChildren()-1);this.containLayer.removeChild(this.pageList[4])}else if(this.startArea==2||this.startArea==3){if(this.tarPageIndex==1){this.containLayer.removeChildren(0,4)}this.containLayer.setChildIndex(this.pageList[1],this.containLayer.get_numChildren()-1);this.containLayer.removeChild(this.pageList[3])}}else if(this.startArea==0||this.startArea==1){if(this.tarPageIndex==1){this.containLayer.removeChildren(0,4)}this.containLayer.setChildIndex(this.pageList[1],this.containLayer.get_numChildren()-1);this.containLayer.removeChild(this.pageList[3])}else if(this.startArea==2||this.startArea==3){if(this.tarPageIndex>=this.maxPageIndex){this.containLayer.removeChildren(4,8)}this.containLayer.setChildIndex(this.pageList[6],this.containLayer.get_numChildren()-1);this.containLayer.removeChild(this.pageList[4])}}else if(this.startArea==2||this.startArea==3){if(this.isGoRight){this.containLayer.removeChild(this.pageList[1]);this.pageList[2]=this.pageLoad.getLoadPage(this.tarPageIndex);this.pageList[2].set_x(this.originPoint.x);this.pageList[2].set_y(this.TRPoint.y)}this.pageList[1].changeObjectStatus(false)}this.setChildIndex(this.shdowContain,this.get_numChildren()-1)},flipMoveInit:function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_MOVE_START));e=null;this.initThreeCanvas();this.hardFlipMoveInit()},softFlipPathUpdate:function(e,t){if(this.threeAlog!=null){this.threeAlog.updateThreeStyle(e,t,this.threeCanvas)}},flipPathUpdate:function(e,t){if(this.isRefresh){return}this.isRefresh=true;var i=e;var s=t;if(i>1){i=1}else if(i<-1){i=-1}s*=1.5;if(s>1){s=1}else if(s<-1){s=-1}if(this.isGoRight){this.softFlipPathUpdate(i,-s)}else{this.softFlipPathUpdate(-i,-s)}this.isRefresh=false},flipFinished:function(){if(this.threeAlog!=null){this.threeAlog.clearThreeStyle()}this.hardFlipFinished();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()},hardFlipFinished: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 i=0;var s=t;while(i<s){var a=i++;this.pageList[a].set_mask(null)}var r=0;var n=t;while(r<n){var _=r++;this.pageList.shift()}}if(this.containLayer.get_numChildren()>0){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(this.isRightToLeft){if((l/4|0)==0){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)}else{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 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(d<g){var m=d++;this.pageList[m].set_mask(null)}var v=0;var b=p;while(v<b){var y=v++;this.pageList.shift()}}if(this.containLayer.get_numChildren()>0){this.containLayer.removeChildren(0)}var x=0;while(x<3){var w=x++;var k=0;if(this.isRightToLeft){k=this.tarPageIndex+1-w}else{k=this.tarPageIndex-1+w}if(k<0){k=0}this.pageList[w]=this.pageLoad.getLoadPage(k);this.containLayer.addChild(this.pageList[w]);if(w==0){this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2-this.layerWidth);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}else{this.pageList[w].set_x((this.styleWidth-this.layerWidth)/2);this.pageList[w].set_y((this.styleHeight-this.layerHeight)/2);this.pageList[w].set_rotation(0)}}var P=0;while(P<3){var C=P++;this.containLayer.setChildIndex(this.pageList[C],2-C)}var T=0;while(T<3){var M=T++;if(this.isDisplayEmbedObject){if(M==1){this.pageList[M].changeObjectStatus(true)}else{this.pageList[M].changeObjectStatus(false)}}else{this.pageList[M].changeObjectStatus(false)}if(this.isHighlightText){if(M==1){this.pageList[M].addHighlightText()}}else{this.pageList[M].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 i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s!=3&&s!=4){this.containLayer.removeChild(this.pageList[s])}}else if(s!=1){this.containLayer.removeChild(this.pageList[s])}}}else{this.flipFinished()}},updateContentSta:function(e){if(e){var t=0;var i=this.pageList.length;while(t<i){var s=t++;if(this.isHScreen){if(s==3||s==4){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}else if(s==1){this.pageList[s].updateContentSta(this.get_scaleX(),this.get_scaleY())}}}else{var a=0;var r=this.pageList.length;while(a<r){var n=a++;if(this.isHScreen){if(n==3||n==4){this.pageList[n].scaleContentDestroy()}}else if(n==1){this.pageList[n].scaleContentDestroy()}}}},updatePdfTxtPosition:function(){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(this.isHScreen){if(i==3||i==4){this.pageList[i].changePageTxtStatus()}}else if(i==1){this.pageList[i].changePageTxtStatus()}}},getZoomCoefX:function(e){if(this.isHScreen){return this.get_width()/this.get_scaleX()/(this.containLayer.get_width()*e)}else{return this.get_width()/this.get_scaleX()/((this.containLayer.get_width()-this.layerWidth)*e)}},getZoomCoefY:function(e){return this.get_height()/this.get_scaleY()/(this.containLayer.get_height()*e)},getZoomCenterCoefX:function(){if(this.isHScreen){return this.get_mouseX()/this.containLayer.get_width()}else{return this.get_mouseX()/(this.containLayer.get_width()-this.layerWidth)}},getZoomCenterCoefY:function(){return this.get_mouseY()/this.containLayer.get_height()},playBKMusic:function(){if(!this.isPlaying){if(!this.isMute){if(this.isHScreen){var e=0;var t=this.pageList.length;while(e<t){var i=e++;if(i==3||i==4){this.pageList[i].changeBkMusicStatus(true)}else{this.pageList[i].changeBkMusicStatus(false)}}}else{var s=0;var a=this.pageList.length;while(s<a){var r=s++;if(r==1){this.pageList[r].changeBkMusicStatus(true)}else{this.pageList[r].changeBkMusicStatus(false)}}}}else{var n=0;var _=this.pageList.length;while(n<_){var o=n++;this.pageList[o].changeBkMusicStatus(false)}}}},setMuteMode:function(e){this.isMute=e;this.playBKMusic()},initThreeCanvas:function(){var e=0;var t=0;if(this.isHScreen){if(this.isRightToLeft){if(this.startArea==0||this.startArea==1){e=this.curPageIndex;t=this.tarPageIndex-1}else if(this.startArea==2||this.startArea==3){e=this.tarPageIndex;t=this.tarPageIndex+1}}else if(this.startArea==0||this.startArea==1){e=this.tarPageIndex+1;t=this.tarPageIndex}else if(this.startArea==2||this.startArea==3){e=this.tarPageIndex-1;t=this.curPageIndex}}else if(this.startArea==2||this.startArea==3){if(this.isGoRight){e=this.curPageIndex;t=this.curPageIndex}else{e=this.tarPageIndex;t=this.tarPageIndex}}this.threeCanvas=[];var i;if(this.isHScreen){i=this.pageLoad.getLoadPage(e)}else{i=this.pageLoad.getLoadPage(e,true)}var s=new openfl_display_BitmapData(i.get_width()|0,i.get_height()|0);s.draw(i);var a=s.image.get_src();var r=this.threeAlog.computeWH(a.width,a.height);var n=a.getContext("2d",null).getImageData(0,0,a.width,a.height);var _=a.width;var o=a.height;var l=1011/(window.document.body.clientHeight*window.devicePixelRatio);this.threeAlog.updateCanvasParamater(_,o,r,l,this.isGoRight);a.setAttribute("width",r==null?"null":""+r);a.setAttribute("height",r==null?"null":""+r);a.getContext("2d",null).putImageData(n,r-_,0);this.threeCanvas.push(a);var h;if(this.isHScreen){h=this.pageLoad.getLoadPage(t)}else{h=this.pageLoad.getLoadPage(t)}var c=this.pageLoad.getLoadPage(t);var u=new openfl_display_BitmapData(c.get_width()|0,c.get_height()|0);u.draw(c);var f=u.image.get_src();var p=this.threeAlog.computeWH(f.width,f.height);var d=f.getContext("2d",null).getImageData(0,0,f.width,f.height);f.setAttribute("width",p==null?"null":""+p);f.setAttribute("height",p==null?"null":""+p);f.getContext("2d",null).putImageData(d,0,0);this.threeCanvas.push(f)},resizeThreeStyle:function(){if(this.threeAlog==null){this.threeAlog=new flipbookMM_bookBox_style_ThreeAlgo}var e=window.innerWidth;var t=window.innerHeight;if(this.isHScreen){this.threeAlog.resizeThreeStyle(0,0,0,e,t)}else{this.threeAlog.resizeThreeStyle(-this.layerWidth/2,0,0,e,t)}},__class__:flipbookMM_bookBox_style_ThreeStyle});var flipbookMM_bookBox_xObject_Object=function(e){openfl_display_Sprite.call(this);this._ffobjects=[];this.add_ffobjects(e)};$hxClasses["flipbookMM.bookBox.xObject.Object"]=flipbookMM_bookBox_xObject_Object;flipbookMM_bookBox_xObject_Object.__name__=["flipbookMM","bookBox","xObject","Object"];flipbookMM_bookBox_xObject_Object.__super__=openfl_display_Sprite;flipbookMM_bookBox_xObject_Object.prototype=$extend(openfl_display_Sprite.prototype,{_ffobjects:null,add_ffobjects:function(e){this.remove_ffobjects();var t=flipbookMM_bookBox_ObjectConfigInit.getInstance();if(t.getXmlData()!=null){var i=new haxe_xml_Fast(t.getXmlData());var s=null;var a=i.get_elements();while(a.hasNext()){var r=a.next();if(r.has.resolve("pageindex")==true&&Std.parseInt(r.att.resolve("pageindex"))==e){if(r.hasNode.resolve("ffobjects")){s=r.node.resolve("ffobjects").x;break}}}if(s!=null){this._ffobjects=xeditor_serial_TRUnSerialConverter.from(s,e);var n=0;var _=this._ffobjects.length;while(n<_){var o=n++;this.addChild(this._ffobjects[o])}}s=null;i=null}t=null},remove_ffobjects:function(){if(this._ffobjects==null){return}var e=0;var t=this._ffobjects.length;while(e<t){var i=e++;this.removeChild(this._ffobjects[i])}this._ffobjects=null},__class__:flipbookMM_bookBox_xObject_Object});var flipbookMM_config_ConfigInit=function(e){this.fast=new haxe_xml_Fast(e.firstElement());var t=flipbookMM_config_ConfigSetting.getInstance();t.set(flipbookMM_config_ConfigKey.AppRegister,this.fast.att.resolve("r"));var i=this.fast.get_elements();while(i.hasNext()){var s=i.next();if(s.get_name()=="info"||s.get_name()=="extconfig"){var a=s.get_elements();while(a.hasNext()){var r=a.next();if(r.has.resolve("name")==true&&r.get_innerData().length>0){t.set(r.att.resolve("name"),r.get_innerData())}}}else if(s.get_name()=="pageobjects"){var n=flipbookMM_bookBox_ObjectConfigInit.getInstance();n.setXmlData(s.x);n=null;var _=xeditor_objects_VideoHtmlManage.getInstance();_.parseVideoXml(s.x);_.videoLoad();_=null}else if(s.get_name()=="bookmark"){var o=flipbookMM_toolbar_bookMark_BookMarkConfigInit.getInstance();o.setXmlData(s.x);o=null}else if(s.get_name()=="pages"){var l=flipbookMM_bookBox_PagesConfigGet.getInstance();l.setXmlData(s.x);l.getPagesConfig();l=null}else if(s.get_name()=="security"){if(t.get(flipbookMM_config_ConfigKey.SecurityMode)!="Public"){var h=flipbookMM_bookBox_PagesConfigGet.getInstance();h.setEncryptData(s.x);h.getEncryptData();h=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 i=this.settings;var s=t;if(__map_reserved[e]!=null){i.setReserved(e,s)}else{i.h[e]=s}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},getBookStyleType:function(){var e;var t=this.get(flipbookMM_config_ConfigKey.DefaultBookStyle);if(t=="Flip"){e=1}else if(t=="Slide"){e=0}else if(t=="Flip:Hardcover"){e=1;this.set(flipbookMM_config_ConfigKey.IsHardCoverStyle,"Enable")}else if(t=="Slide:Double page"){e=2}else if(t=="Flip:3D"){e=3}else{e=1}return e},__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,i){var s=null;s=new flipbookMM_events_EventCenterEvent(e,t);s._action=i;return s},addEventListener:function(e,t,i){if(t==null||i==null||e==null){return false}if(this._eventMode==true&&this._eventSprite!=null){t.addEventListener(e,i)}var s=this.getMap();var a=null;a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];if(a==null){a=[];if(__map_reserved[e]!=null){s.setReserved(e,a)}else{s.h[e]=a}}return this.helpAddTargetAction(a,t,i)},helpAddTargetAction:function(e,t,i){if(t==null||e==null){return false}var s=null;if(e.length==0){s=new flipbookMM_events_EventAction(t,i);e.push(s);return true}else{var a=0;while(a<e.length){var r=e[a];++a;if(r.target==t){r.action=i;return true}}s=new flipbookMM_events_EventAction(t,i);e.push(s);return true}},dispatchEvent:function(e){var t=e.type;var i=e._data;var s=e._action;if(t==null||t==""){return}if(this._eventMode==true&&this._eventSprite!=null){var a=null;a=this.getNewEvent(t,i,s);this._eventSprite.dispatchEvent(a);return}var r=this.getMap();var n=null;n=__map_reserved[t]!=null?r.getReserved(t):r.h[t];if(n==null){return}if(n.length>0){var _=null;_=this.getNewEvent(t,i,s);var o=0;while(o<n.length){var l=n[o];++o;if(l.action!=null){_.set_owner(l.target);l.action(_)}}_.destroy();_=null}return},__class__:flipbookMM_events_EventCenter};var flipbookMM_events_EventCenterEvent=function(e,t,i,s){if(s==null){s=false}if(i==null){i=false}openfl_events_Event.call(this,e,i,s);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,i){this._event=i;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.openfl.style.position="absolute";this.openfl.style.cursor="pointer";this.tool=window.document.createElement("div");this.tool.id=flipbookMM_global_GetDivJs.toolId;this.tool.style.position="absolute";this.tool.style.left="0px";this.tool.style.top="0px";this.tool.style.zIndex="300";this.noOPenfl=window.document.createElement("div");this.noOPenfl.id=flipbookMM_global_GetDivJs.noOpenflId;this.noOPenfl.style.position="absolute";this.noOPenfl.style.left="0px";this.noOPenfl.style.top="0px";this.noOPenfl.style.zIndex="200";this.fObject=window.document.createElement("div");this.fObject.id=flipbookMM_global_GetDivJs.fObjectId;this.fObject.style.position="absolute";this.fObject.style.left="0px";this.fObject.style.top="0px";this.fObject.style.zIndex="150";this.pdfTxt=window.document.createElement("div");this.pdfTxt.id=flipbookMM_global_GetDivJs.pdfTxtId;this.pdfTxt.style.position="absolute";this.pdfTxt.style.left="0px";this.pdfTxt.style.top="0px";this.pdfTxt.style.zIndex="100";this.pdfTxt.style.setProperty("pointer-events","none");this.pdfTxt.style.cursor="pointer";this.body.appendChild(this.pdfTxt);this.body.appendChild(this.noOPenfl);this.body.appendChild(this.tool);this.body.appendChild(this.fObject);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,pdfTxt:null,tool:null,fObject:null,loadPdfjs:function(s){var e=window.document.createElement("link");e.rel="stylesheet";e.href="./pdfjs-dist/web/pdf_viewer.css";e.onload=function(){var i=window.document.getElementsByTagName("script")[0];var e=window.document.createElement("script");e.src="./pdfjs-dist/build/pdf.min.js";e.onload=function(){var t=window.document.createElement("script");t.src="./pdfjs-dist/build/pdf.worker.min.js";t.onload=function(){var e=window.document.createElement("script");e.src="./pdfjs-dist/web/pdf_viewer.js";e.onload=function(){if(s!=null){s();s=null}};i.parentNode.insertBefore(e,t.nextSibling)};i.parentNode.insertBefore(t,e.nextSibling)};i.parentNode.insertBefore(e,i)};window.document.head.appendChild(e)},loadThreejs:function(e){var t=window.document.createElement("script");t.src="./three.min.js";t.onload=function(){if(e!=null){e();e=null}};var i=window.document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)},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}};return e()},__class__:flipbookMM_global_GetDivJs};var flipbookMM_market_EncryptJs=function(){var t=this;base_baseSprite_SpriteJs.call(this);this.pageEncrypt=flipbookMM_bookBox_PagesConfigGet.getInstance().getEncryptData();if(this.pageEncrypt.isEncrypt==false){return}this.createContainer();var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.SECURITY_WINDOW_ON,this,function(e){t.set_visible(true)});e.addEventListener(flipbookMM_events_EventConst.SECURITY_WINDOW_OFF,this,function(e){t.set_visible(false)})};$hxClasses["flipbookMM.market.EncryptJs"]=flipbookMM_market_EncryptJs;flipbookMM_market_EncryptJs.__name__=["flipbookMM","market","EncryptJs"];flipbookMM_market_EncryptJs.__super__=base_baseSprite_SpriteJs;flipbookMM_market_EncryptJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{pageEncrypt:null,createContainer:function(){if(this.pageEncrypt.securityMode=="single"){this.createSinglePasswordContainer()}else if(this.pageEncrypt.securityMode=="userlist"){this.createUserPasswordContainer()}},createUserPasswordContainer:function(){var s=this;this.set_width(300);this.set_height(200);this.set_visible(false);this.setBackgroundColor(15724527);var e=window.document.createElement("div");e.innerText="Login";e.style.padding="5px";e.style.backgroundColor="#312f2f";e.style.color="white";e.style.height="22px";this.div.appendChild(e);var t=window.document.createElement("div");t.style.padding="30px 5px";var i=window.document.createElement("div");i.style.padding="5px";var a=window.document.createElement("div");a.innerText="User:";a.style.display="inline-block";a.style.width="100px";i.appendChild(a);var r=window.document.createElement("input");r.id="encrypt-user";r.style.display="inline-block";i.appendChild(r);t.appendChild(i);var n=window.document.createElement("div");n.style.padding="5px";var _=window.document.createElement("div");_.innerText="Password:";_.style.display="inline-block";_.style.width="100px";n.appendChild(_);var o=window.document.createElement("input");o.style.display="inline-block";o.id="encrypt-password";n.appendChild(o);t.appendChild(n);this.div.appendChild(t);var l=window.document.createElement("div");l.style.display="flex";l.style.justifyContent="space-around";var h=window.document.createElement("div");h.innerText="Login";h.id="encrypt-login";h.style.backgroundColor="#e8e7e7";h.style.borderRadius="5px";h.style.padding="5px";h.style.cursor="pointer";var c=window.document.createElement("div");c.innerText="Cancel";c.id="encrypt-cancel";c.style.backgroundColor="#e8e7e7";c.style.borderRadius="5px";c.style.padding="5px";c.style.cursor="pointer";l.appendChild(h);l.appendChild(c);this.div.appendChild(l);flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);h.onmouseover=function(){h.style.backgroundColor="#bdb6b6"};h.onmouseout=function(){h.style.backgroundColor="#e8e7e7"};h.onmousedown=function(){h.style.backgroundColor="#757070"};h.onmouseup=function(){h.style.backgroundColor="#e8e7e7"};h.onclick=function(){var e=js_Boot.__cast(window.document.getElementById("encrypt-user"),HTMLInputElement).value;var t=js_Boot.__cast(window.document.getElementById("encrypt-password"),HTMLInputElement).value;if(t!=null&&e!=null){if(s.pageEncrypt.verifyUserPassword(e,t)){s.set_visible(false);s.pageEncrypt.isEncrypt=false;var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SECURITY_PASS_OK));i=null}}};c.onmouseover=function(){c.style.backgroundColor="#bdb6b6"};c.onmouseout=function(){c.style.backgroundColor="#e8e7e7"};c.onmousedown=function(){c.style.backgroundColor="#757070"};c.onmouseup=function(){c.style.backgroundColor="#e8e7e7"};c.onclick=function(){s.set_visible(false)}},createSinglePasswordContainer:function(){var i=this;this.set_width(300);this.set_height(200);this.set_visible(false);this.setBackgroundColor(15724527);var e=window.document.createElement("div");e.innerText="Login";e.style.padding="5px";e.style.backgroundColor="#312f2f";e.style.color="white";e.style.height="22px";this.div.appendChild(e);var t=window.document.createElement("div");t.style.padding="40px 5px";var s=window.document.createElement("div");s.style.padding="5px";s.style.textAlign="center";var a=window.document.createElement("div");a.innerText="Password:";a.style.display="inline-block";a.style.width="100px";s.appendChild(a);var r=window.document.createElement("input");r.style.display="inline-block";r.id="encrypt-password";s.appendChild(r);t.appendChild(s);this.div.appendChild(t);var n=window.document.createElement("div");n.style.display="flex";n.style.justifyContent="space-around";var _=window.document.createElement("div");_.innerText="Login";_.id="encrypt-login";_.style.backgroundColor="#e8e7e7";_.style.borderRadius="5px";_.style.padding="5px";_.style.cursor="pointer";var o=window.document.createElement("div");o.innerText="Cancel";o.id="encrypt-cancel";o.style.backgroundColor="#e8e7e7";o.style.borderRadius="5px";o.style.padding="5px";o.style.cursor="pointer";n.appendChild(_);n.appendChild(o);this.div.appendChild(n);flipbookMM_global_GetDivJs.getInstance().market.appendChild(this.div);_.onmouseover=function(){_.style.backgroundColor="#bdb6b6"};_.onmouseout=function(){_.style.backgroundColor="#e8e7e7"};_.onmousedown=function(){_.style.backgroundColor="#757070"};_.onmouseup=function(){_.style.backgroundColor="#e8e7e7"};_.onclick=function(){var e=js_Boot.__cast(window.document.getElementById("encrypt-password"),HTMLInputElement).value;if(e!=null){if(i.pageEncrypt.verifySinglePassword(e)){i.set_visible(false);i.pageEncrypt.isEncrypt=false;var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SECURITY_PASS_OK));t=null}}};o.onmouseover=function(){o.style.backgroundColor="#bdb6b6"};o.onmouseout=function(){o.style.backgroundColor="#e8e7e7"};o.onmousedown=function(){o.style.backgroundColor="#757070"};o.onmouseup=function(){o.style.backgroundColor="#e8e7e7"};o.onclick=function(){i.set_visible(false)}},__class__:flipbookMM_market_EncryptJs});var flipbookMM_market_LogoJs=function(e,t,i,s,a,r,n,_){var o=this;base_baseSprite_SpriteJs.call(this);this.logWid=i;this.logHei=s;this.offWid=a;this.offHei=r;this.logUrl=n;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=_;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 i=e/2-36-27;var s=t/3*2;var a=i/this.logWid;var r=s/this.logHei;var n=0;var _=0;if(a<=r){n=i;_=this.logHei*i/this.logWid}else{n=this.logWid*s/this.logHei;_=s}this.log.style.height=_+"px";this.log.style.width=n+"px";this.log.style.left=this.offWid+"px";this.log.style.top=this.offHei+(t-_)/2+"px";var o=flipbookMM_toolbar_bar_AutoLayout.getInstance();o.updateLogWidht(n);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 i=t.get(flipbookMM_config_ConfigKey.AppShowName);var s=t.get(flipbookMM_config_ConfigKey.AppLinkWebsite);var a;if(i.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(i);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(s);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(s),"_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,i,s,a){if(a==null){a=36}if(s==null){s=36}if(i==null){i=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(i);this.backG.get_graphics().drawRect(0,0,s,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 i=e>>16&255;if(i<0){i=0}else{i=i}var s=e>>8&255;if(s<0){s=0}else{s=s}var a=e&255;if(a<0){a=0}else{a=a}if(this._bitmap==null){return}var r=0;var n=0;var _=0;var o=1;var l=this._bitmap.get_bitmapData();if(l==null){return}try{var h=0;var c=l.width;while(h<c){var u=h++;var f=0;var p=l.height;while(f<p){var d=f++;var g=l.getPixel32(u,d);g=flipbookMM_utils_color_ColorUtils.transform(g,0,0,0,1,i,s,a,t);l.setPixel32(u,d,g)}}}catch(e){haxe_CallStack.lastException=e}return},__class__:flipbookMM_toolbar_IconBtnSprite});var flipbookMM_toolbar_IconBtnSpriteJs=function(e,t,i,s){if(i==null){i=0}if(t==null){t=16777215}var a=this;base_baseSprite_SpriteJs.call(this);this.backG=new base_baseSprite_SpriteJs;this.div.appendChild(this.backG.div);this.isLoaded=false;this.iconW=0;this.iconH=0;this.onComFun=s;this.div2=window.document.createElement("img");this.div2.style.position="absolute";this.div2.style.cursor="pointer";this.div2.style.setProperty("image-rendering","-webkit-optimize-contrast");this.div2.onload=function(){a.div2.onload=null;a.iconW=a.div2.width;a.iconH=a.div2.height;a.backG.set_width(a.iconW);a.backG.set_height(a.iconH);a.backG.setBackgroundColor(i);a.isLoaded=true;a.drawColorTransform(t);if(a.onComFun!=null){a.onComFun();a.onComFun=null}};this.div2.src=e;this.div.appendChild(this.div2)};$hxClasses["flipbookMM.toolbar.IconBtnSpriteJs"]=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_IconBtnSpriteJs.__name__=["flipbookMM","toolbar","IconBtnSpriteJs"];flipbookMM_toolbar_IconBtnSpriteJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_IconBtnSpriteJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{backG:null,div2:null,iconW:null,iconH:null,onComFun:null,isLoaded:null,updateBgAlpha:function(e){this.backG.div.style.opacity=e==null?"null":""+e},drawColorTransform:function(e,t){if(t==null){t=1}if(!this.isLoaded&&this.iconW==0&&this.iconH==0){return}var i=window.document.createElement("canvas");i.width=this.iconW;i.height=this.iconH;var s=i.getContext("2d",null);s.drawImage(this.div2,0,0);var a=e>>16&255;var r=e>>8&255;var n=e&255;var _=s.getImageData(0,0,this.iconW,this.iconH);var o=_.data.length/4|0;var l=0;var h=o;while(l<h){var c=l++;if(_.data[c*4+3]!=0){_.data[c*4]=a;_.data[c*4+1]=r;_.data[c*4+2]=n;_.data[c*4+3]=(_.data[c*4+3]*t|0)&255}}s.putImageData(_,0,0);this.div2.src=i.toDataURL();i=null;s=null;_=null},__class__:flipbookMM_toolbar_IconBtnSpriteJs});var flipbookMM_toolbar_ToolBarJs=function(e,t,i){if(i==null){i=1}openfl_display_Sprite.call(this);this.firstPage=i;var s=flipbookMM_config_ConfigSetting.getInstance();if(s.hasKey(flipbookMM_config_ConfigKey.ControlBarColor)){this.toolBarColor=0}if(s.hasKey(flipbookMM_config_ConfigKey.TopToolbarBgColor)){this.topColor=s.get(flipbookMM_config_ConfigKey.TopToolbarBgColor)}if(s.hasKey(flipbookMM_config_ConfigKey.BottomToolbarBgColor)){this.bottomColor=s.get(flipbookMM_config_ConfigKey.BottomToolbarBgColor)}this.topAlpha=s.get(flipbookMM_config_ConfigKey.TopToolbarBgAlpha);this.bottomAlpha=s.get(flipbookMM_config_ConfigKey.BottomToolbarBgAlpha);if(s.hasKey(flipbookMM_config_ConfigKey.PageCount)){this.pageNum=Std.parseInt(s.get(flipbookMM_config_ConfigKey.PageCount))}this.switchBarCol=s.get(flipbookMM_config_ConfigKey.TopToolbarBgColor);this.switchBarAlp=s.get(flipbookMM_config_ConfigKey.TopToolbarBgAlpha);if(s.hasKey(flipbookMM_config_ConfigKey.TopToolBarHeight)){this.topBarHeight=Std.parseInt(s.get(flipbookMM_config_ConfigKey.TopToolBarHeight))}else{this.topBarHeight=50}if(s.hasKey(flipbookMM_config_ConfigKey.BottomToolbarHeight)){this.bottomBarHeight=Std.parseInt(s.get(flipbookMM_config_ConfigKey.BottomToolbarHeight))}else{this.bottomBarHeight=50}if(s.hasKey(flipbookMM_config_ConfigKey.JS_mobile)){this.isMobile=s.yesOrNo(s.get(flipbookMM_config_ConfigKey.JS_mobile))}else{this.isMobile=true}s=null;this.thumbnails=new flipbookMM_toolbar_thumbnails_ThumbnailsTag(this.toolBarColor);this.addChild(this.thumbnails);this.resize(e,t);this.addListEvent()};$hxClasses["flipbookMM.toolbar.ToolBarJs"]=flipbookMM_toolbar_ToolBarJs;flipbookMM_toolbar_ToolBarJs.__name__=["flipbookMM","toolbar","ToolBarJs"];flipbookMM_toolbar_ToolBarJs.__super__=openfl_display_Sprite;flipbookMM_toolbar_ToolBarJs.prototype=$extend(openfl_display_Sprite.prototype,{toolBarWidth:null,toolBarHeight:null,toolBarColor:null,pageNum:null,topBarHeight:null,bottomBarHeight:null,top:null,bottom:null,topColor:null,bottomColor:null,topAlpha:null,bottomAlpha:null,switchBar:null,switchBarCol:null,switchBarAlp:null,thumbnails:null,thumWid:null,thumHei:null,shareUI:null,zoomUI:null,leftNavbar:null,rightNavbar:null,isMobile:null,firstPage:null,addListEvent:function(){var _=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.TOOL_BAR_ON_OFF,this,function(e){if(_.top!=null){if(_.top.get_visible()){_.top.set_visible(false)}else{_.top.set_visible(true)}}if(_.bottom!=null){if(_.bottom.get_visible()){_.bottom.set_visible(false)}else{_.bottom.set_visible(true)}}if(_.leftNavbar!=null){if(_.leftNavbar.get_visible()){_.leftNavbar.set_visible(false)}else{_.leftNavbar.set_visible(true)}}if(_.rightNavbar!=null){if(_.rightNavbar.get_visible()){_.rightNavbar.set_visible(false)}else{_.rightNavbar.set_visible(true)}}if(_.shareUI!=null){if(!_.top.get_visible()){_.shareUI.set_visible(false)}}if(_.zoomUI!=null){if(!_.top.get_visible()){_.zoomUI.set_visible(false)}}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.TOP_RIGHT_EXP_ON_OFF,new flipbookMM_events_EventObject(_,"off",null)));t=null});e.addEventListener(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,this,function(e){if(_.switchBar==null){var t=0;if(e._data._object>0){t=js_Boot.__cast(e._data._object,Int)}else{var i=flipbookMM_toolbar_bar_AutoLayout.getInstance();var s=0;var a=i.leftExpandList;while(s<a.length){var r=a[s];++s;if(r!=0){t=r;break}}}_.switchBar=new flipbookMM_toolbar_menu_SwitchMenu(_.toolBarWidth,_.toolBarHeight,_.pageNum,t,_.switchBarCol,_.switchBarAlp);_.addChild(_.switchBar);_.switchBar.setMenuVisible(true);if(_.shareUI!=null){_.shareUI.set_visible(false)}if(_.zoomUI!=null){_.zoomUI.set_visible(false)}_.setToolNavVisible(false)}else if(_.switchBar.get_visible()){_.switchBar.setMenuVisible(false);_.setToolNavVisible(true)}else{_.switchBar.setMenuVisible(true);_.setToolNavVisible(false);if(_.shareUI!=null){_.shareUI.set_visible(false)}}if(_.switchBar!=null){var n=e._data._object;if(n==2||n==3){if(_.shareUI!=null){_.shareUI.set_visible(false)}if(_.zoomUI!=null){_.zoomUI.set_visible(false)}_.setToolNavVisible(false);_.switchBar.setMenuVisible(true,n)}}});e.addEventListener(flipbookMM_events_EventConst.SHARE_ON_OFF,this,function(e){var t=e._data._object;if(t==null){if(_.shareUI==null){_.shareUI=new flipbookMM_toolbar_share_ShareUIJs;_.shareUI.set_y(_.topBarHeight);_.shareUI.set_x((_.toolBarWidth-_.shareUI.get_width()*window.devicePixelRatio)/2/window.devicePixelRatio);flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(_.shareUI.div);_.shareUI.set_visible(true)}else if(_.shareUI.get_visible()){_.shareUI.set_visible(false)}else{_.shareUI.set_visible(true)}}else if(_.shareUI!=null){if(t=="off"){_.shareUI.set_visible(false)}else if(t=="on"){_.shareUI.set_visible(true)}}});e.addEventListener(flipbookMM_events_EventConst.ZOOM_ON_OFF,this,function(e){var t=e._data._object;if(t==null){if(_.zoomUI==null){_.zoomUI=new flipbookMM_toolbar_zoom_ZoomUIJs;_.zoomUI.set_y(_.topBarHeight);_.zoomUI.set_x((_.toolBarWidth-_.zoomUI.get_width()*window.devicePixelRatio)/2/window.devicePixelRatio);flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(_.zoomUI.div);_.zoomUI.set_visible(true)}else if(_.zoomUI.get_visible()){_.zoomUI.set_visible(false)}else{_.zoomUI.set_visible(true)}if(_.zoomUI.get_visible()){var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(_,2,null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(_,null,null)));i=null}else{var s=flipbookMM_events_EventCenter.getInstance();s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(_,1,null)));s.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(_,null,null)));s=null}}else if(_.zoomUI!=null){if(t=="off"){_.zoomUI.set_visible(false)}else{_.zoomUI.set_visible(true)}if(_.zoomUI.get_visible()){var a=flipbookMM_events_EventCenter.getInstance();a.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(_,2,null)));a.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(_,null,null)));a=null}else{var r=flipbookMM_events_EventCenter.getInstance();r.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(_,1,null)));r.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(_,null,null)));r=null}}});e=null},setToolNavVisible:function(e){if(this.top!=null){this.top.set_visible(e)}if(this.bottom!=null){this.bottom.set_visible(e)}if(this.leftNavbar!=null){this.leftNavbar.set_visible(e)}if(this.rightNavbar!=null){this.rightNavbar.set_visible(e)}},resize:function(e,t){this.toolBarWidth=e;this.toolBarHeight=t;if(this.top==null){this.top=new flipbookMM_toolbar_bar_TopBarJs(this.toolBarWidth/window.devicePixelRatio,this.topBarHeight,this.topColor,this.topAlpha);flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(this.top.div)}else{this.top.resize(this.toolBarWidth/window.devicePixelRatio,this.topBarHeight)}this.top.set_x(0);this.top.set_y(0);if(this.bottom==null){this.bottom=new flipbookMM_toolbar_bar_BottomBarJs(this.toolBarWidth/window.devicePixelRatio,this.bottomBarHeight,this.pageNum,this.bottomColor,this.bottomAlpha,this.firstPage);flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(this.bottom.div)}else{this.bottom.resize(this.toolBarWidth/window.devicePixelRatio,this.bottomBarHeight)}this.bottom.set_x(0);this.bottom.set_y(this.toolBarHeight/window.devicePixelRatio-this.bottomBarHeight);if(!this.isMobile){if(this.leftNavbar==null){this.leftNavbar=new flipbookMM_toolbar_bar_LefeNavigationBarJs;flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(this.leftNavbar.div);this.leftNavbar.set_visible(true)}this.leftNavbar.set_x(0);this.leftNavbar.set_y((this.toolBarHeight-this.leftNavbar.backH*window.devicePixelRatio)/2/window.devicePixelRatio);if(this.rightNavbar==null){this.rightNavbar=new flipbookMM_toolbar_bar_RightNavigationBarJs;flipbookMM_global_GetDivJs.getInstance().menuBar.appendChild(this.rightNavbar.div);this.rightNavbar.set_visible(true)}this.rightNavbar.set_x((this.toolBarWidth-this.rightNavbar.backW*window.devicePixelRatio)/window.devicePixelRatio);this.rightNavbar.set_y((this.toolBarHeight-this.rightNavbar.backH*window.devicePixelRatio)/2/window.devicePixelRatio)}if(this.switchBar!=null){this.switchBar.resize(this.toolBarWidth,this.toolBarHeight);this.switchBar.set_x(0);this.switchBar.set_y(0)}if(this.shareUI!=null){this.shareUI.set_y(this.topBarHeight);this.shareUI.set_x((this.toolBarWidth-this.shareUI.get_width()*window.devicePixelRatio)/2/window.devicePixelRatio)}if(this.zoomUI!=null){this.zoomUI.set_y(this.topBarHeight);this.zoomUI.set_x((this.toolBarWidth-this.zoomUI.get_width()*window.devicePixelRatio)/2/window.devicePixelRatio)}this.thumWid=140;this.thumHei=200;this.thumbnails.resize(this.thumWid*window.devicePixelRatio,this.thumHei*window.devicePixelRatio);this.thumbnails.set_visible(false);this.thumbnails.set_x((this.toolBarWidth-this.thumbnails.get_width())/2);this.thumbnails.set_y(this.toolBarHeight-this.bottomBarHeight-(this.thumHei+20)*window.devicePixelRatio)},__class__:flipbookMM_toolbar_ToolBarJs});var flipbookMM_toolbar_autoPlay_AutoPlayJs=function(e,t,i){var s=this;base_baseSprite_SpriteJs.call(this);this.playUrl="./img/toolbarImg/ic_play_circle_outline_black_36dp.png";this.pauseUrl="./img/toolbarImg/ic_pause_circle_outline_black_36dp.png";this.isPlaying=e;this.playBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.playUrl,t,i);this.div.appendChild(this.playBtn.div);this.pauseBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.pauseUrl,t,i);this.div.appendChild(this.pauseBtn.div);this.curPageIndex=1;this.maxPageIndex=1;var a=flipbookMM_config_ConfigSetting.getInstance();if(a.hasKey(flipbookMM_config_ConfigKey.PageCount)){this.maxPageIndex=Std.parseInt(a.get(flipbookMM_config_ConfigKey.PageCount))}this.intervalSecond=Std.parseInt(a.get(flipbookMM_config_ConfigKey.AutoFlipInterval));if(this.intervalSecond==null){this.intervalSecond=1e3}else{this.intervalSecond*=1e3}this.loopCount=Std.parseInt(a.get(flipbookMM_config_ConfigKey.AutoFlipLoops));if(this.loopCount==null){this.loopCount=1}a=null;this.lastCount=this.loopCount;this.timer=new openfl_utils_Timer(this.intervalSecond);this.timer.addEventListener("timer",function(e){if(s.lastCount>0||s.lastCount==-1){var t=s.curPageIndex++;if(t<=s.maxPageIndex){var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.GO_TO_PAGE_NUM,new flipbookMM_events_EventObject(s,t,null)));i=null}else{if(s.lastCount>0){s.lastCount--}if(s.lastCount==-1||s.lastCount>0){s.curPageIndex=0;s.isPlaying=true;s.updateStatus()}else{s.curPageIndex=s.maxPageIndex;s.isPlaying=false;s.updateStatus()}}}});var r=flipbookMM_events_EventCenter.getInstance();r.addEventListener(flipbookMM_events_EventConst.PAGE_CURRENT,this,function(e){s.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(s.isPlaying==false){s.isPlaying=true;s.updateStatus()}}else if(t=="off"){if(s.isPlaying==true){s.isPlaying=false;s.updateStatus()}}});r=null;this.div.addEventListener("click",function(e){if(s.isPlaying){s.isPlaying=false}else{s.isPlaying=true}if(s.curPageIndex==s.maxPageIndex){s.curPageIndex=0}if(s.loopCount!=-1){s.lastCount=1}s.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.TxtViewButtionEnable))){this.allList.push(11)}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.FullscreenEnable))){this.allList.push(13)}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)}if(e.yesOrNo(e.get(flipbookMM_config_ConfigKey.ZoomButtonEnable))){this.allList.push(12)}},autoAssign:function(){var e=0;var t=0;var i=this.allList;while(t<i.length){var s=i[t];++t;switch(s){case 1:++e;break;case 2:++e;break;case 3:++e;break;default:}}if(e>0){this.leftList.push(-1);if(this.isLog){this.leftList.push(8)}this.leftExpandList.push(0);var a=0;var r=this.allList;while(a<r.length){var n=r[a];++a;switch(n){case 1:this.leftExpandList.push(n);break;case 2:this.leftExpandList.push(n);break;case 3:this.leftExpandList.push(n);break;default:}}}else if(this.isLog){this.leftList.push(8)}var _=0;if(!this.isLog){this.logWidth=0}else{this.logWidth=flipbookMM_toolbar_bar_AutoLayout.LOGO_WIDTH}var o=(this.layoutWidth-(this.logWidth+2*flipbookMM_toolbar_bar_AutoLayout.Button_margin_X))/(flipbookMM_toolbar_bar_AutoLayout.Button_Width+2*flipbookMM_toolbar_bar_AutoLayout.Button_margin_X)|0;var l=0;var h=this.allList;while(l<h.length){var c=h[l];++l;switch(c){case 4:++_;break;case 5:++_;break;case 7:++_;break;case 9:++_;break;case 10:++_;break;case 11:++_;break;case 12:++_;break;case 13:++_;break;default:}}if(this.isThumbnail){++_}if(this.isSearchText){++_}if(_<=o){if(this.isThumbnail){this.rightList.push(2)}if(this.isSearchText){this.rightList.push(3)}var u=0;var f=this.allList;while(u<f.length){var p=f[u];++u;switch(p){case 4:this.rightList.push(p);break;case 5:this.rightList.push(p);break;case 7:this.rightList.push(p);break;case 9:this.rightList.push(p);break;case 10:this.rightList.push(p);break;case 11:this.rightList.push(p);break;case 12:this.rightList.push(p);break;case 13:this.rightList.push(p);break;default:}}}else{this.rightList.push(-2);if(this.isThumbnail){this.rightList.push(2)}if(this.isSearchText){this.rightList.push(3)}var d=o-this.rightList.length;var g=0;var m=this.allList;while(g<m.length){var v=m[g];++g;switch(v){case 4:if(d>0){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;case 11:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 12:if(d>0){this.rightList.push(v);--d}else{this.rightExpandList.push(v)}break;case 13: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,i,s,a,r){if(r==null){r=1}base_baseSprite_SpriteJs.call(this);this.color=s;this.botAlp=a;this.pageTotalNum=i;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,i,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,i,s,a){if(a==null){a=1}var r=this;base_baseSprite_SpriteJs.call(this);this.maxNum=i;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 n=flipbookMM_config_ConfigSetting.getInstance();this.lineLeftColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.BottomSlideActionColor));this.lineRightColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.BottomSlideDefaultColor));this.circleColor=this.lineLeftColor;this.textActionColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.TextResponsivColor));this.textDisplayColor=Std.parseInt(n.get(flipbookMM_config_ConfigKey.TextDefaultColor));this.styleStr=n.get(flipbookMM_config_ConfigKey.DefaultBookStyle);n=null;this.rect=new base_baseSprite_SpriteJs;this.rect.div.style.cursor="pointer";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.leftTag.div.style.cursor="pointer";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.rightTag.div.style.cursor="pointer";this.div.appendChild(this.rightTag.div);this.rightTag.set_width(150);this.rightTag.div.addEventListener("click",function(e){if(r.curRecentIndex<r.recentViewPage.length-1&&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 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,t,null)));i=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 i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,new flipbookMM_events_EventObject(r,t,null)));i=null}};this.rect.div.addEventListener("touchmove",function(e){var t=e.targetTouches[0].pageX;r.updateSlideBar(t-r.slideStartX);var i=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,i,null)));s=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 i=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,i,null)));s=null});var _=flipbookMM_events_EventCenter.getInstance();_.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()});_=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.curRecentIndex<this.recentViewPage.length-1&&this.recentViewPage.length>0){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<this.maxNum){this.centerTag.set_text(this.curPageIndex-1+"-"+this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex==this.maxNum){if(this.curPageIndex%2==0){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else{this.centerTag.set_text(this.curPageIndex-1+"-"+this.curPageIndex+"/"+this.maxNum)}}}else{this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}}else if(this.styleStr=="Slide"){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else if(this.styleStr=="Slide:Double page"){if(openfl_Lib.get_current().stage.stageWidth>=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<this.maxNum){this.centerTag.set_text(this.curPageIndex-1+"-"+this.curPageIndex+"/"+this.maxNum)}else if(this.curPageIndex==this.maxNum){if(this.curPageIndex%2==1){this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}else{this.centerTag.set_text(this.curPageIndex-1+"-"+this.curPageIndex+"/"+this.maxNum)}}}else{this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}}else{this.centerTag.set_text(this.curPageIndex+"/"+this.maxNum)}this.centerTag.set_textColor(this.textDisplayColor);if(this.centerTag.div.clientWidth==0){this.centerTag.set_x((this.slideWidth-50)/2)}else{this.centerTag.set_x((this.slideWidth-this.centerTag.div.clientWidth)/2)}this.centerTag.set_y(this.slideHeight/2);this.leftTag.set_x(0);this.leftTag.set_y(this.slideHeight/2);this.rightTag.set_x(this.slideWidth-this.rightTag.get_width());this.rightTag.set_y(this.slideHeight/2)},resize:function(e,t){this.slideWidth=e*5/6;this.slideHeight=t;this.slideStartX=e/6/2;this.back.set_width(this.slideWidth);this.back.set_height(this.slideHeight/2);this.back.set_x(0);this.back.set_y(-this.slideHeight/4);this.rect.set_y(this.slideHeight/4);this.updateTextStatus();this.upBarProgress(this.progress)},__class__:flipbookMM_toolbar_bar_SlideObjectJs});var flipbookMM_toolbar_bar_TopBarJs=function(e,t,i,s){base_baseSprite_SpriteJs.call(this);this.topBarColor=i;this.topBarAlpha=s;var a=flipbookMM_config_ConfigSetting.getInstance();this.autoPlayFlag=a.yesOrNo(a.get(flipbookMM_config_ConfigKey.AutoFlipAutoStart));this.buttonColor=Std.parseInt(a.get(flipbookMM_config_ConfigKey.ButtonDefaultColor));this.buttonBackColor=Std.parseInt(a.get(flipbookMM_config_ConfigKey.TopToolbarBgColor));a=null;this.back=new base_baseSprite_SpriteJs;this.div.appendChild(this.back.div);this.back.setBackgroundColor(this.topBarColor);this.resize(e,t)};$hxClasses["flipbookMM.toolbar.bar.TopBarJs"]=flipbookMM_toolbar_bar_TopBarJs;flipbookMM_toolbar_bar_TopBarJs.__name__=["flipbookMM","toolbar","bar","TopBarJs"];flipbookMM_toolbar_bar_TopBarJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_TopBarJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{topBarWidth:null,topBarHeight:null,topBarColor:null,topBarAlpha:null,back:null,soundBtn:null,shareBtn:null,downloadBtn:null,fullscreenBtn:null,printBtn:null,txtViewBtn:null,zoomBtn:null,switchBtn:null,topRightExpBtn:null,buttonColor:null,buttonBackColor:null,thumbnails:null,searchJs:null,autoPlayBtn:null,autoPlayFlag:null,logoBtn:null,autoLayout:null,updataLoadIcon:function(){var e=0;var t=this.autoLayout.leftList;while(e<t.length){var i=t[e];++e;this.loadIcon(i)}var s=0;var a=this.autoLayout.rightList;while(s<a.length){var r=a[s];++s;this.loadIcon(r)}var n=0;var _=this.autoLayout.rightExpandList;while(n<_.length){var o=_[n];++n;this.loadIcon(o)}},loadIcon:function(e){switch(e){case-2:if(this.topRightExpBtn==null){this.topRightExpBtn=new flipbookMM_toolbar_bar_TopRightExpBtnJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.topRightExpBtn.div)}break;case-1:if(this.switchBtn==null){this.switchBtn=new flipbookMM_toolbar_menu_SwitchBtnJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.switchBtn.div)}break;case 2:if(this.thumbnails==null){this.thumbnails=new flipbookMM_toolbar_thumbnails_ThumbnailsJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.thumbnails.div)}break;case 3:if(this.searchJs==null){this.searchJs=new flipbookMM_toolbar_searchText_SearchTextJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.searchJs.div)}break;case 4:if(this.soundBtn==null){this.soundBtn=new flipbookMM_toolbar_sound_SoundBtnJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.soundBtn.div)}break;case 5:if(this.shareBtn==null){this.shareBtn=new flipbookMM_toolbar_share_ShareJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.shareBtn.div)}break;case 7:if(this.autoPlayBtn==null){this.autoPlayBtn=new flipbookMM_toolbar_autoPlay_AutoPlayJs(this.autoPlayFlag,this.buttonColor,this.buttonBackColor);this.div.appendChild(this.autoPlayBtn.div)}break;case 8:if(this.logoBtn==null){var t=flipbookMM_config_ConfigSetting.getInstance();var i=parseFloat(t.get(flipbookMM_config_ConfigKey.LogoWidth));var s=parseFloat(t.get(flipbookMM_config_ConfigKey.LogoHeight));var a=Std.parseInt(t.get(flipbookMM_config_ConfigKey.LogoLeftMargin));var r=Std.parseInt(t.get(flipbookMM_config_ConfigKey.LogoTopMargin));var n=t.get(flipbookMM_config_ConfigKey.LogoImgUrl);var _=t.get(flipbookMM_config_ConfigKey.LogoLinkUrl);var o=t.get(flipbookMM_config_ConfigKey.TopToolbarBgColor);t=null;this.logoBtn=new flipbookMM_market_LogoJs(this.topBarWidth,this.topBarHeight,i,s,a,r,n,_);this.div.appendChild(this.logoBtn.div)}break;case 9:if(this.downloadBtn==null){this.downloadBtn=new flipbookMM_toolbar_download_DownloadJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.downloadBtn.div)}break;case 10:if(this.printBtn==null){this.printBtn=new flipbookMM_toolbar_print_PrintJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.printBtn.div)}break;case 11:if(this.txtViewBtn==null){this.txtViewBtn=new flipbookMM_toolbar_txtView_TxtViewJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.txtViewBtn.div)}break;case 12:if(this.zoomBtn==null){this.zoomBtn=new flipbookMM_toolbar_zoom_ZoomJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.zoomBtn.div)}break;case 13:if(this.fullscreenBtn==null){this.fullscreenBtn=new flipbookMM_toolbar_fullscreen_FullscreenJs(this.buttonColor,this.buttonBackColor);this.div.appendChild(this.fullscreenBtn.div)}break;default:}},updateIconDisplay:function(){var e=0;var t=this.autoLayout.leftList;while(e<t.length){var i=t[e];++e;this.getIconSprite(i).set_visible(true)}var s=0;var a=this.autoLayout.rightList;while(s<a.length){var r=a[s];++s;this.getIconSprite(r).set_visible(true)}var n=0;var _=this.autoLayout.rightExpandList;while(n<_.length){var o=_[n];++n;this.getIconSprite(o).set_visible(false)}if(this.autoLayout.rightExpandList.length==0){if(this.topRightExpBtn!=null){this.topRightExpBtn.set_visible(false)}}else if(this.topRightExpBtn!=null){this.topRightExpBtn.set_visible(true)}if(this.topRightExpBtn!=null){if(this.topRightExpBtn.getStatus()){var l=0;var h=this.autoLayout.rightExpandList;while(l<h.length){var c=h[l];++l;this.getIconSprite(c).set_visible(true)}}else{var u=0;var f=this.autoLayout.rightExpandList;while(u<f.length){var p=f[u];++u;this.getIconSprite(p).set_visible(false)}}}},getIconSprite:function(e){switch(e){case-2:if(this.topRightExpBtn==null){this.loadIcon(-2)}return this.topRightExpBtn;case-1:return this.switchBtn;case 2:return this.thumbnails;case 3:return this.searchJs;case 4:return this.soundBtn;case 5:return this.shareBtn;case 7:return this.autoPlayBtn;case 8:return this.logoBtn;case 9:return this.downloadBtn;case 10:return this.printBtn;case 11:return this.txtViewBtn;case 12:return this.zoomBtn;case 13:return this.fullscreenBtn;default:return new base_baseSprite_SpriteJs}},setIconSpritePare:function(e,t,i,s){switch(e){case-2:this.topRightExpBtn.set_x(t);this.topRightExpBtn.set_y(i);this.topRightExpBtn.updateBgAlpha(s);break;case-1:this.switchBtn.set_x(t);this.switchBtn.set_y(i);this.switchBtn.updateBgAlpha(s);break;case 2:this.thumbnails.set_x(t);this.thumbnails.set_y(i);this.thumbnails.updateBgAlpha(s);break;case 3:this.searchJs.set_x(t);this.searchJs.set_y(i);this.searchJs.updateBgAlpha(s);break;case 4:this.soundBtn.set_x(t);this.soundBtn.set_y(i);this.soundBtn.updateBgAlpha(s);break;case 5:this.shareBtn.set_x(t);this.shareBtn.set_y(i);this.shareBtn.updateBgAlpha(s);break;case 7:this.autoPlayBtn.set_x(t);this.autoPlayBtn.set_y(i);this.autoPlayBtn.updateBgAlpha(s);break;case 8:this.logoBtn.set_x(t);this.logoBtn.set_y(i);break;case 9:this.downloadBtn.set_x(t);this.downloadBtn.set_y(i);this.downloadBtn.updateBgAlpha(s);break;case 10:this.printBtn.set_x(t);this.printBtn.set_y(i);this.printBtn.updateBgAlpha(s);break;case 11:this.txtViewBtn.set_x(t);this.txtViewBtn.set_y(i);this.txtViewBtn.updateBgAlpha(s);break;case 12:this.zoomBtn.set_x(t);this.zoomBtn.set_y(i);this.zoomBtn.updateBgAlpha(s);break;case 13:this.fullscreenBtn.set_x(t);this.fullscreenBtn.set_y(i);this.fullscreenBtn.updateBgAlpha(s);break;default:}},updateIconPosition:function(){var e=0;var t=this.autoLayout.leftList.length;while(e<t){var i=e++;var s=this.autoLayout.leftList[i];var a=flipbookMM_toolbar_bar_AutoLayout.Button_margin_X+i*(flipbookMM_toolbar_bar_AutoLayout.Button_Width+flipbookMM_toolbar_bar_AutoLayout.Button_margin_X);var r=flipbookMM_toolbar_bar_AutoLayout.Button_margin_Y;this.setIconSpritePare(s,a,r,0)}var n=0;var _=this.autoLayout.rightList.length;while(n<_){var o=n++;var l=this.autoLayout.rightList[o];var h=this.topBarWidth-(o+1)*(flipbookMM_toolbar_bar_AutoLayout.Button_Width+flipbookMM_toolbar_bar_AutoLayout.Button_margin_X);var c=flipbookMM_toolbar_bar_AutoLayout.Button_margin_Y;this.setIconSpritePare(l,h,c,0)}var u=0;var f=this.autoLayout.rightExpandList.length;while(u<f){var p=u++;var d=this.autoLayout.rightExpandList[p];var g=this.topBarWidth-(flipbookMM_toolbar_bar_AutoLayout.Button_margin_X+flipbookMM_toolbar_bar_AutoLayout.Button_Width);var m=this.topBarHeight+flipbookMM_toolbar_bar_AutoLayout.Button_margin_Y+(flipbookMM_toolbar_bar_AutoLayout.Button_Height+flipbookMM_toolbar_bar_AutoLayout.Button_margin_Y)*p;this.setIconSpritePare(d,g,m,.5)}},autoLayoutInit:function(e,t){var o=this;if(this.autoLayout==null){this.autoLayout=flipbookMM_toolbar_bar_AutoLayout.getInstance();this.autoLayout.resize(e,t);this.updataLoadIcon();var i=flipbookMM_events_EventCenter.getInstance();i.addEventListener(flipbookMM_events_EventConst.TOP_RIGHT_EXP_ON_OFF,this,function(e){var t=e._data._object;if(t=="on"){var i=0;var s=o.autoLayout.rightExpandList;while(i<s.length){var a=s[i];++i;o.getIconSprite(a).set_visible(true)}if(o.topRightExpBtn!=null){o.topRightExpBtn.setStatus(true)}}else{var r=0;var n=o.autoLayout.rightExpandList;while(r<n.length){var _=n[r];++r;o.getIconSprite(_).set_visible(false)}if(o.topRightExpBtn!=null){o.topRightExpBtn.setStatus(false)}}if(o.autoLayout.rightExpandList.length==0){if(o.topRightExpBtn!=null){o.topRightExpBtn.set_visible(false)}}else if(o.topRightExpBtn!=null){o.topRightExpBtn.set_visible(true)}});i=null}},resize:function(e,t){this.topBarWidth=e;this.topBarHeight=t;this.back.div.style.width=this.topBarWidth+"px";this.back.div.style.height=this.topBarHeight+"px";this.back.div.style.opacity=this.topBarAlpha;if(this.autoLayout==null){this.autoLayoutInit(this.topBarWidth,this.topBarHeight)}if(this.logoBtn!=null){this.logoBtn.resize(this.topBarWidth,this.topBarHeight)}this.autoLayout.resize(this.topBarWidth,this.topBarHeight);this.updataLoadIcon();this.updateIconPosition();this.updateIconDisplay()},__class__:flipbookMM_toolbar_bar_TopBarJs});var flipbookMM_toolbar_bar_TopRightExpBtnJs=function(e,t){var s=this;base_baseSprite_SpriteJs.call(this);this.ExpOnUrl="./img/toolbarImg/ic_clear_black_36dp.png";this.ExpOffUrl="./img/toolbarImg/ic_more_horiz_black_36dp.png";this.expOnOffFlag=false;this.expOnBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.ExpOnUrl,e,t);this.div.appendChild(this.expOnBtn.div);this.expOnBtn.set_visible(false);this.expOffBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.ExpOffUrl,e,t);this.div.appendChild(this.expOffBtn.div);this.expOffBtn.set_visible(true);this.updateStatus();this.div.addEventListener("click",function(e){s.expOnOffFlag=!s.expOnOffFlag;s.updateStatus();var t;if(s.expOnOffFlag){t="on"}else{t="off"}var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SHARE_ON_OFF,new flipbookMM_events_EventObject(s,"off",null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.TOP_RIGHT_EXP_ON_OFF,new flipbookMM_events_EventObject(s,t,null)));i=null})};$hxClasses["flipbookMM.toolbar.bar.TopRightExpBtnJs"]=flipbookMM_toolbar_bar_TopRightExpBtnJs;flipbookMM_toolbar_bar_TopRightExpBtnJs.__name__=["flipbookMM","toolbar","bar","TopRightExpBtnJs"];flipbookMM_toolbar_bar_TopRightExpBtnJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_bar_TopRightExpBtnJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{expOnOffFlag:null,ExpOnUrl:null,ExpOffUrl:null,expOnBtn:null,expOffBtn:null,updateBgAlpha:function(e){this.expOnBtn.updateBgAlpha(e);this.expOffBtn.updateBgAlpha(e)},setStatus:function(e){this.expOnOffFlag=e;this.updateStatus()},getStatus:function(){return this.expOnOffFlag},updateStatus:function(){if(this.expOnOffFlag){this.expOnBtn.set_visible(true);this.expOffBtn.set_visible(false)}else{this.expOnBtn.set_visible(false);this.expOffBtn.set_visible(true)}},__class__:flipbookMM_toolbar_bar_TopRightExpBtnJs});var flipbookMM_toolbar_bookMark_BookMark=function(e,t){var i="./img/toolbarImg/ic_format_list_bulleted_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,i,e,t)};$hxClasses["flipbookMM.toolbar.bookMark.BookMark"]=flipbookMM_toolbar_bookMark_BookMark;flipbookMM_toolbar_bookMark_BookMark.__name__=["flipbookMM","toolbar","bookMark","BookMark"];flipbookMM_toolbar_bookMark_BookMark.__super__=flipbookMM_toolbar_IconBtnSprite;flipbookMM_toolbar_bookMark_BookMark.prototype=$extend(flipbookMM_toolbar_IconBtnSprite.prototype,{__class__:flipbookMM_toolbar_bookMark_BookMark});var flipbookMM_toolbar_bookMark_MarkDataType=function(){this.id=0;this.level=0;this.text=null;this.link=0;this.parent=0;this.extend=false};$hxClasses["flipbookMM.toolbar.bookMark.MarkDataType"]=flipbookMM_toolbar_bookMark_MarkDataType;flipbookMM_toolbar_bookMark_MarkDataType.__name__=["flipbookMM","toolbar","bookMark","MarkDataType"];flipbookMM_toolbar_bookMark_MarkDataType.prototype={id:null,level:null,text:null,link:null,extend:null,parent:null,__class__:flipbookMM_toolbar_bookMark_MarkDataType};var flipbookMM_toolbar_bookMark_BookMarkConfigDecode=function(e){this.curOrder=0;this.fast=e;this.data=[];this.xmlParse(this.fast);var t=0;var i=this.data;while(t<i.length){var s=i[t];++t;if(s.parent>=0){this.data[s.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 i=e.get_elements();while(i.hasNext()){var s=i.next();if(s.get_name()=="node"&&s.get_innerHTML().length>0){var a=new flipbookMM_toolbar_bookMark_MarkDataType;var r=s.get_elements();while(r.hasNext()){var n=r.next();var _=n.get_name();switch(_){case"child":this.xmlParse(n);break;case"index":a.link=Std.parseInt(n.get_innerData());break;case"label":a.text=n.get_innerData();break;case"level":a.level=Std.parseInt(n.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,i){openfl_display_Sprite.call(this);this.nodeData=i;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 i=this;this.nodeData.extend=false;if(this.nodeData.extend){this.extendShell.addEventListener("click",function(e){e.stopPropagation();i.updateExtendShape(!i.extendStatus);var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.UPDATE_BOOK_MARK,new flipbookMM_events_EventObject(i,null,null)));t=null});this.extendShell.addEventListener("mouseDown",function(e){i.extendSHellBack.set_alpha(.5)});this.extendShell.addEventListener("mouseUp",function(e){i.extendSHellBack.set_alpha(0)});this.extendShell.addEventListener("mouseOut",function(e){i.extendSHellBack.set_alpha(0)})}this.addEventListener("click",function(e){e.stopPropagation()});this.addEventListener("mouseDown",function(e){i.clickFlag=1});this.addEventListener("mouseUp",function(e){if(i.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(i,i.nodeData.link,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.addEventListener("mouseOut",function(e){i.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 i=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,i-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,i,s){base_baseSprite_TouchSprite.call(this);this.backColor=i;this.backALpha=s;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 i=0;var s=this.markDecode.data.length;while(i<s){var a=i++;var r=new flipbookMM_toolbar_bookMark_BookMarkNode(this.unitWidth,this.unitHeight,this.markDecode.data[a]);this.tableContent.push(r)}this.displayHeight=this.tableContent.length*this.unitHeight;this.updateShowData(0);t=null}e=null},updateShowData:function(e){if(this.tableContent.length==0){var t=new base_baseSprite_TextSprite;t.set_text("No bookmark.");t.set_textColor(16777215);this.tray.addChild(t);return}if(this.curRowNum==e){return}this.curRowNum=e;var i=this.curRowNum;if(i>=this.bufferRow){i-=this.bufferRow}var s=i;var a=i+this.maxRow+this.bufferRow+1;while(s<a){var r=s++;if(r<this.tableContent.length&&r>=0){if(!this.displayNode.h.hasOwnProperty(r)){this.displayNode.h[r]=this.tableContent[r];var n=this.displayNode.h[r];this.tray.addChild(n);n.set_x(0);n.set_y(r*this.unitHeight);n=null}}}var _=this.displayNode.keys();while(_.hasNext()){var o=_.next();if(o<i||o>i+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 i=0;var s=this.tableContent;while(i<s.length){var a=s[i];++i;a.resize(this.unitWidth,this.unitHeight)}if(this.tableContent.length>0){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 s=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=s.tray.get_y();t+=e.get_touchSlidePoint().y*4;if(s.displayHeight<=s.tableHeight){t=0}else if(t<s.tableHeight-s.displayHeight){t=s.tableHeight-s.displayHeight}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);s.updateShowData(-t/s.unitHeight|0)})});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE,function(e){var t=s.tray.get_y();t+=e.get_touchSlidePoint().y*4;if(s.displayHeight<=s.tableHeight){t=0}else if(t>0){t=0}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);s.updateShowData(-t/s.unitHeight|0)})});this.addEventListener("mouseDown",function(e){s.preTrayPosition.y=s.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=s.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||s.displayHeight<=s.tableHeight){s.tray.set_y(0)}else if(t<s.tableHeight-s.displayHeight){s.tray.set_y(s.tableHeight-s.displayHeight)}else{s.tray.set_y(t)}var i=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(i)});this.addEventListener("mouseWheel",function(e){var t=0;if(e.delta<0){t=s.tray.get_y();t+=e.delta*2;if(s.displayHeight<=s.tableHeight){t=0}else if(t<s.tableHeight-s.displayHeight){t=s.tableHeight-s.displayHeight}}else{t=s.tray.get_y();t+=e.delta*2;if(s.displayHeight<=s.tableHeight){t=0}else if(t>0){t=0}}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.unitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);s.updateShowData(-t/s.unitHeight|0)})})},__class__:flipbookMM_toolbar_bookMark_BookMarkUI});var flipbookMM_toolbar_download_DownloadJs=function(e,t){var i="./img/toolbarImg/ic_file_download_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,i,e,t);this.div.onclick=function(){var e=flipbookMM_config_ConfigSetting.getInstance();var t=e.get(flipbookMM_config_ConfigKey.DownloadFileUrl);e=null;var i=encodeURI(t);openfl_Lib.getURL(new openfl_net_URLRequest(i),"_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_fullscreen_FullscreenJs=function(e,t){var i=this;base_baseSprite_SpriteJs.call(this);this.fullscreenUrl="./img/toolbarImg/ic_fullscreen_black_36dp.png";this.cancelFullscreenUrl="./img/toolbarImg/ic_fullscreen_exit_black_36dp.png";this.fullscreenStatus=false;this.fullscreenBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.fullscreenUrl,e,t);this.div.appendChild(this.fullscreenBtn.div);this.fullscreenBtn.set_visible(true);this.noScreenBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.cancelFullscreenUrl,e,t);this.div.appendChild(this.noScreenBtn.div);this.noScreenBtn.set_visible(false);this.div.onclick=function(){var e=window.document.body;if(i.fullscreenStatus==true){i.launchIntoFullscreen(e,false)}else{i.launchIntoFullscreen(e,true)}window.console.log("hello owe")};window.onresize=function(e){window.console.log("---",i.checkFull());window.console.log("eeeee",e);i.fullscreenStatus=i.checkFull();i.updateStatus()}};$hxClasses["flipbookMM.toolbar.fullscreen.FullscreenJs"]=flipbookMM_toolbar_fullscreen_FullscreenJs;flipbookMM_toolbar_fullscreen_FullscreenJs.__name__=["flipbookMM","toolbar","fullscreen","FullscreenJs"];flipbookMM_toolbar_fullscreen_FullscreenJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_fullscreen_FullscreenJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{fullscreenUrl:null,cancelFullscreenUrl:null,fullscreenStatus:null,fullscreenBtn:null,noScreenBtn:null,launchIntoFullscreen:function(e,t){if(t){if(e.requestFullscreen){e.requestFullscreen()}else if(e.mozRequestFullScreen){e.mozRequestFullScreen()}else if(e.webkitRequestFullscreen){e.webkitRequestFullscreen()}else if(e.msRequestFullscreen){e.msRequestFullscreen()}}else{var i=window.document;if(i.exitFullscreen){i.exitFullscreen()}else if(i.msExitFullscreen){i.msExitFullscreen()}else if(i.mozCancelFullScreen){i.mozCancelFullScreen()}else if(i.webkitExitFullscreen){i.webkitExitFullscreen()}}},checkFull:function(){var e=document.isFullScreen||document.mozIsFullScreen||document.webkitIsFullScreen;window.console.log("isFull",e);if(e==true){return true}else{return false}},updateStatus:function(){if(this.fullscreenStatus){this.fullscreenBtn.set_visible(false);this.noScreenBtn.set_visible(true)}else{this.fullscreenBtn.set_visible(true);this.noScreenBtn.set_visible(false)}},updateBgAlpha:function(e){this.fullscreenBtn.updateBgAlpha(e);this.noScreenBtn.updateBgAlpha(e)},__class__:flipbookMM_toolbar_fullscreen_FullscreenJs});var flipbookMM_toolbar_menu_BackBtn=function(e,t){var i=this;var s="./img/toolbarImg/ic_keyboard_arrow_left_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,s,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(i,"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 i=this;var s="./img/toolbarImg/ic_menu_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,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(i,null,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF,new flipbookMM_events_EventObject(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"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,i,s,a,r){if(s==null){s=1}var n=this;openfl_display_Sprite.call(this);this.pageNum=i;this.swtColor=a;this.swtAlp=r;var _=flipbookMM_config_ConfigSetting.getInstance();this.topButDefCol=Std.parseInt(_.get(flipbookMM_config_ConfigKey.ButtonDefaultColor));this.topButActCol=Std.parseInt(_.get(flipbookMM_config_ConfigKey.ButtonResponsiveColor));_=null;this.curTitle=s;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(n,null,null)));t=null});if(this.bookmark!=null){this.bookmark.addEventListener("click",function(e){n.curTitle=1;n.updateMenuDisplay(n.curTitle)})}if(this.thumbnails!=null){this.thumbnails.addEventListener("click",function(e){n.curTitle=2;n.updateMenuDisplay(n.curTitle)})}if(this.searchText!=null){this.searchText.addEventListener("click",function(e){n.curTitle=3;n.updateMenuDisplay(n.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 i=1;var s=this.topButActCol;if(t>1){var a=0;var r=this.autoLayout.leftExpandList;while(a<r.length){var n=r[a];++a;if(n==1){if(this.bookmark==null){if(n==this.curTitle){s=this.topButActCol}else{s=this.topButDefCol}this.bookmark=new flipbookMM_toolbar_bookMark_BookMark(s,this.swtColor);this.addChild(this.bookmark);if(s==this.topButActCol){s=this.topButDefCol}}}else if(n==2){if(this.thumbnails==null){if(n==this.curTitle){s=this.topButActCol}else{s=this.topButDefCol}this.thumbnails=new flipbookMM_toolbar_thumbnails_Thumbnails(s,this.swtColor);this.addChild(this.thumbnails)}}else if(n==3){if(this.searchText==null){if(n==this.curTitle){s=this.topButActCol}else{s=this.topButDefCol}this.searchText=new flipbookMM_toolbar_searchText_SearchText(s,this.swtColor);this.addChild(this.searchText)}}}if(e==1){if(this.bookmark!=null){this.bookmark.drawColorTransform(this.topButActCol)}if(this.thumbnails!=null){this.thumbnails.drawColorTransform(this.topButDefCol)}if(this.searchText!=null){this.searchText.drawColorTransform(this.topButDefCol)}}else if(e==2){if(this.bookmark!=null){this.bookmark.drawColorTransform(this.topButDefCol)}if(this.thumbnails!=null){this.thumbnails.drawColorTransform(this.topButActCol)}if(this.searchText!=null){this.searchText.drawColorTransform(this.topButDefCol)}}else if(e==3){if(this.bookmark!=null){this.bookmark.drawColorTransform(this.topButDefCol)}if(this.thumbnails!=null){this.thumbnails.drawColorTransform(this.topButDefCol)}if(this.searchText!=null){this.searchText.drawColorTransform(this.topButActCol)}}else{if(this.bookmark!=null){this.bookmark.drawColorTransform(this.topButActCol)}if(this.thumbnails!=null){this.thumbnails.drawColorTransform(this.topButDefCol)}if(this.searchText!=null){this.searchText.drawColorTransform(this.topButDefCol)}}var _=0;var o=this.autoLayout.leftExpandList;while(_<o.length){var l=o[_];++_;if(l==1){this.bookmark.set_x(this.exitAction.get_x()+this.swtBarWidth/t*i);this.bookmark.set_y(this.exitAction.get_y());++i;continue}if(l==2){this.thumbnails.set_x(this.exitAction.get_x()+this.swtBarWidth/t*i);this.thumbnails.set_y(this.exitAction.get_y());++i;continue}if(l==3){this.searchText.set_x(this.exitAction.get_x()+this.swtBarWidth/t*i);this.searchText.set_y(this.exitAction.get_y());++i;continue}}}},resize:function(e,t){this.swtBarWidth=e;this.swtBarHeight=t;this.titleHeight=50*window.devicePixelRatio;this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.swtColor);this.back.get_graphics().drawRect(0,0,this.swtBarWidth,this.titleHeight);this.back.get_graphics().endFill();this.back.set_alpha(this.swtAlp);this.exitAction.set_x(10);this.exitAction.set_y(10);if(this.switchUI==null){this.switchUI=new flipbookMM_toolbar_menu_SwitchMenuUI(this.swtBarWidth,this.swtBarHeight-this.titleHeight,this.pageNum,this.curTitle);this.addChild(this.switchUI)}else{this.switchUI.resize(this.swtBarWidth,this.swtBarHeight-this.titleHeight)}this.switchUI.set_x(0);this.switchUI.set_y(this.titleHeight);this.updateIconColor(this.curTitle)},__class__:flipbookMM_toolbar_menu_SwitchMenu});var flipbookMM_toolbar_menu_SwitchMenuUI=function(e,t,i,s){if(s==null){s=1}openfl_display_Sprite.call(this);this.pageNum=i;this.curTitle=s;var a=flipbookMM_config_ConfigSetting.getInstance();this.bookmarkCol=Std.parseInt(a.get(flipbookMM_config_ConfigKey.BookMarkBgColor));this.bookmarkAlp=parseFloat(a.get(flipbookMM_config_ConfigKey.BookMarkBgAlpha));this.thumbnailsCol=Std.parseInt(a.get(flipbookMM_config_ConfigKey.ThumbnailBgColor));this.thumbnailsAlp=parseFloat(a.get(flipbookMM_config_ConfigKey.ThumbnailBgAlpha));this.searchTextCol=Std.parseInt(a.get(flipbookMM_config_ConfigKey.SearchTextBgColor));this.searchTextAlp=parseFloat(a.get(flipbookMM_config_ConfigKey.SearchTextBgAlpha));this.isMobile=a.yesOrNo(a.get(flipbookMM_config_ConfigKey.JS_mobile));a=null;this.resize(e,t);this.updateCurStatus(s)};$hxClasses["flipbookMM.toolbar.menu.SwitchMenuUI"]=flipbookMM_toolbar_menu_SwitchMenuUI;flipbookMM_toolbar_menu_SwitchMenuUI.__name__=["flipbookMM","toolbar","menu","SwitchMenuUI"];flipbookMM_toolbar_menu_SwitchMenuUI.__super__=openfl_display_Sprite;flipbookMM_toolbar_menu_SwitchMenuUI.prototype=$extend(openfl_display_Sprite.prototype,{swtEntityWidth:null,swtEntityHeight:null,pageNum:null,bookmarkUI:null,bookmarkCol:null,bookmarkAlp:null,thumbnailsUI:null,thumbnailsCol:null,thumbnailsAlp:null,searchTextUI:null,searchTextCol:null,searchTextAlp:null,curTitle:null,isMobile:null,updateCurStatus:function(e){this.curTitle=e;if(this.curTitle==1){if(this.bookmarkUI==null){this.bookmarkUI=new flipbookMM_toolbar_bookMark_BookMarkUI(this.swtEntityWidth,this.swtEntityHeight,this.bookmarkCol,this.bookmarkAlp);this.addChild(this.bookmarkUI)}if(this.bookmarkUI!=null){this.bookmarkUI.set_visible(true)}if(this.thumbnailsUI!=null){this.thumbnailsUI.set_visible(false)}if(this.searchTextUI!=null){this.searchTextUI.set_visible(false);this.searchTextUI.setInputBoxVisible(false)}}else if(this.curTitle==2){if(this.thumbnailsUI==null){this.thumbnailsUI=new flipbookMM_toolbar_thumbnails_ThumbnailsUI(this.swtEntityWidth,this.swtEntityHeight,this.pageNum,this.thumbnailsCol,this.thumbnailsAlp);this.addChild(this.thumbnailsUI)}if(this.bookmarkUI!=null){this.bookmarkUI.set_visible(false)}if(this.thumbnailsUI!=null){this.thumbnailsUI.set_visible(true)}if(this.searchTextUI!=null){this.searchTextUI.set_visible(false);this.searchTextUI.setInputBoxVisible(false)}}else if(this.curTitle==3){if(this.searchTextUI==null){this.searchTextUI=new flipbookMM_toolbar_searchText_SearchTextUI(this.swtEntityWidth,this.swtEntityHeight,this.searchTextCol,this.searchTextAlp);this.addChild(this.searchTextUI)}if(this.bookmarkUI!=null){this.bookmarkUI.set_visible(false)}if(this.thumbnailsUI!=null){this.thumbnailsUI.set_visible(false)}if(this.searchTextUI!=null){this.searchTextUI.set_visible(true);this.searchTextUI.setInputBoxVisible(true)}}else{if(this.bookmarkUI==null){this.bookmarkUI=new flipbookMM_toolbar_bookMark_BookMarkUI(this.swtEntityWidth,this.swtEntityHeight,this.bookmarkCol,this.bookmarkAlp);this.addChild(this.bookmarkUI)}if(this.bookmarkUI!=null){this.bookmarkUI.set_visible(true)}if(this.thumbnailsUI!=null){this.thumbnailsUI.set_visible(false)}if(this.searchTextUI!=null){this.searchTextUI.set_visible(false);this.searchTextUI.setInputBoxVisible(false)}}},setUIVisible:function(e){if(this.bookmarkUI!=null){this.bookmarkUI.set_visible(e)}if(this.thumbnailsUI!=null){this.thumbnailsUI.set_visible(e)}if(this.searchTextUI!=null){this.searchTextUI.set_visible(e);this.searchTextUI.setInputBoxVisible(e)}},resize:function(e,t){if(this.isMobile){this.swtEntityWidth=e;this.swtEntityHeight=t}else{this.swtEntityWidth=e/2;this.swtEntityHeight=t}if(this.bookmarkUI!=null){this.bookmarkUI.resize(this.swtEntityWidth,this.swtEntityHeight)}if(this.thumbnailsUI!=null){this.thumbnailsUI.resize(this.swtEntityWidth,this.swtEntityHeight)}if(this.searchTextUI!=null){this.searchTextUI.resize(this.swtEntityWidth,this.swtEntityHeight)}},__class__:flipbookMM_toolbar_menu_SwitchMenuUI});var flipbookMM_toolbar_print_PrintJs=function(e,t){var i=this;var s="./img/toolbarImg/ic_print_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);var a=flipbookMM_bookBox_PagesConfigGet.getInstance();this.pageCount=a.pageList.length;var r=flipbookMM_config_ConfigSetting.getInstance();var n=Std.parseInt(r.get(flipbookMM_config_ConfigKey.PageWidth));var _=Std.parseInt(r.get(flipbookMM_config_ConfigKey.PageHeight));this.pageLoad=flipbookMM_bookBox_ManagerBookLayer.getInstance(n,_,a.pageList.length,0);this.loadPrintCssStyle();this.isloading=false;this.div.onclick=function(){i.myPrint()}};$hxClasses["flipbookMM.toolbar.print.PrintJs"]=flipbookMM_toolbar_print_PrintJs;flipbookMM_toolbar_print_PrintJs.__name__=["flipbookMM","toolbar","print","PrintJs"];flipbookMM_toolbar_print_PrintJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_print_PrintJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{isloading:null,pageLoad:null,pageCount:null,loadPrintCssStyle:function(){var e=window.document.createElement("style");var t=this.pageCount*297;e.innerHTML="\n\t\t@page {\n\t\t\tsize: A4;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t\tbody {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\t-moz-box-sizing: border-box;\n\t\t\t}\n\t\t\t.a4page {\n\t\t\t\twidth: 210mm;\n\t\t\t\tmin-height: 297mm;\n\t\t\t\tpadding: 20mm;\n\t\t\t\tmargin: 10mm auto;\n\t\t\t\tbackground: white;\n\t\t\t}\n\t\t\t.a4subpage {\n\t\t\t\tdisplay:block;\n\t\t\t\tpadding: 1cm;\n\t\t\t\theight: 257mm;\n\t\t\t}\n\n\t\t@media print {\n\t\t\thtml, body {\n\t\t\t\twidth: 210mm;\n\t\t\t\theight: "+t+"mm;\n\t\t\t}\n\n\t\t\t.a4page {\n\t\t\t\tmargin: 0;\n\t\t\t\tborder: initial;\n\t\t\t\tborder-radius: initial;\n\t\t\t\twidth: initial;\n\t\t\t\tmin-height: initial;\n\t\t\t\tbox-shadow: initial;\n\t\t\t\tbackground: initial;\n\t\t\t\tpage-break-after: always;\n\t\t\t}\n\t\t\t#openfl-content {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t\t#pdf-txt {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t\t#openfl-menu {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t\t#tool {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\n\t\t\t#fobject {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t}";window.document.head.appendChild(e)},createPrintContent:function(){var _=this;if(this.isloading){return}else{this.isloading=true}var o=new base_baseSprite_SpriteJs;o.setBackgroundColor(16777215);o.set_width(300);o.set_height(200);var e=(window.document.body.clientWidth-o.get_width())/2;o.set_x(e);var t=(window.document.body.clientHeight-o.get_height())/2;o.set_y(t);o.div.style.textAlign="center";o.div.style.borderRadius=10+"px";o.div.style.border="1px solid #888";var l=flipbookMM_global_GetDivJs.getInstance();l.noOPenfl.appendChild(o.div);var h=window.document.createElement("div");h.style.lineHeight=100+"px";h.style.height=100+"px";o.div.appendChild(h);var i=window.document.createElement("img");i.src="./img/loading.gif";o.div.appendChild(i);var c=window.document.createElement("div");c.id="printContainer";l.body.appendChild(c);var s=0;var a=this.pageCount;while(s<a){var r=[s++];var n=[];var u=this.pageLoad.getLoadPage(r[0]+1,false,function(r,n){return function(){var e=new openfl_display_BitmapData(r[0].get_width()|0,r[0].get_height()|0);e.draw(r[0]);var t=e.image.get_src();var i=window.document.createElement("div");i.className="a4page";var s=window.document.createElement("img");var a=window.document.createElement("div");a.className="a4subpage";i.appendChild(a);s.src=t.toDataURL();s.style.width="100%";s.style.height="100%";s.onload=function(e){return function(){h.innerHTML="loading page "+e[0];if(e[0]==_.pageCount-1){l.noOPenfl.removeChild(o.div);o=null;window.print();haxe_Timer.delay(function(){return function(){l.body.removeChild(c);l=null;c=null;_.isloading=false}}(),1e3)}}}(n);a.appendChild(s);c.appendChild(i)}}(n,r));n[0]=u}},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 i=t.get(flipbookMM_config_ConfigKey.SearchTextBgColor);this.input.style.backgroundColor=t.ColorTrans(i);var s=t.get(flipbookMM_config_ConfigKey.ButtonDefaultColor);this.input.style.color=t.ColorTrans(s);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.style.position="absolute";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=10+"px";this.searchBtn.style.top="6px";this.searchBtn.style.paddingLeft=10+"px"},__class__:flipbookMM_toolbar_searchText_InputContentJs});var flipbookMM_toolbar_searchText_SearchText=function(e,t){var i="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,i,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 i=this;var e=function(e){var t=Xml.parse(e.target.data);i.textSrcFast=new haxe_xml_Fast(t);i.loader.destroyMe();i.loader=null;i.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(i,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 i=t.next();var s=new flipbookMM_toolbar_searchText_PageTextContentType;s.index=Std.parseInt(i.att.resolve("Index"));s.content=i.get_innerData();this.pageContent.push(s);this.pageTextIndex.push(s.index);s=null}var a=0;var r=this.pageTotalNum;while(a<r){var n=a++;this.coreStrContentParse(n)}if(this.pageTotalNum>0){this.coreStrPositionParse(1)}}}}e=null},coreStrContentParse:function(e){if(e<this.pageContent.length){var t=this.pageContent[e].content;var i=this.pageContent[e].index;var s=0;var a=new EReg("[^\r\n.?!。?!]*"+this.searchString+"[^\r\n.?!。?!]?[^\r\n.?!。?!]*","gi");var r=0;var n=0;var _=this.searchString.length;var o=0;while(o<t.length){s=t.toLowerCase().indexOf(this.searchString.toLowerCase(),o);if(s!=-1){if(a.match(HxOverrides.substr(t,o,null))){r=a.matchedPos().pos;n=a.matchedPos().len;var l=new flipbookMM_toolbar_searchText_SearchTextType;l.coreString=this.searchString;l.pageIndex=i;l.relativePosition=s;l.nearString=HxOverrides.substr(t,o+r,n);this.targetContent.push(l);o=s+_;l=null}}else{break}}a=null;t=null}},coreStrPositionParse:function(d){var g=this;var m=d;var v=null;var e=function(e){var t=e.target.data;var i=null;var s=[];if(t!=null&&t.length>0){if(t.indexOf("\r\n")!=-1){i="\r\n"}else{if(t.indexOf("\r")!=-1){i="\r"}if(t.indexOf("\n")!=-1){i="\n"}}t=StringTools.replace(t,i,",");var a=t.split(",");var r=0;var n=g.targetContent.length;while(r<n){var _=r++;if(g.targetContent[_].pageIndex==d){var o=0;var l=g.searchString.length;while(o<l){var h=o++;var c=new flipbookMM_toolbar_searchText_CoreStrParameterType;c.x=parseFloat(a[(g.targetContent[_].relativePosition+h)*4]);c.y=parseFloat(a[(g.targetContent[_].relativePosition+h)*4+1]);c.width=parseFloat(a[(g.targetContent[_].relativePosition+h)*4+2]);c.height=parseFloat(a[(g.targetContent[_].relativePosition+h)*4+3]);s.push(c)}}}if(s.length>0){var u=new flipbookMM_toolbar_searchText_PageCoreStrPositonType;u.index=d;u.positon=s;g.targetContentPosition.push(u);s=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 i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED,new flipbookMM_events_EventObject(this,null,null)));i=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 i=this;var s="./img/toolbarImg/ic_search_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,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(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,3,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"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,i){var s=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 "+(i.pageIndex==null?"null":""+i.pageIndex));this.pageId.set_textColor(16777215);this.nodeContent.addChild(this.pageId);this.nearStr=new base_baseSprite_TextSprite(i.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){s.clickFlag=1});this.nodeContent.addEventListener("mouseUp",function(e){if(s.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(s,i.pageIndex,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.nodeContent.addEventListener("mouseOut",function(e){s.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 i=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,i,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,i-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,i,s){var r=this;base_baseSprite_TouchSprite.call(this);this.color=i;this.backAlpha=s;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 i=r.searchTextDecode.targetContent;while(t<i.length){var s=i[t];++t;var a=new flipbookMM_toolbar_searchText_SearchTextNode(r.unitWidth,r.unitHeight,s);r.tableContent.push(a);a=null}r.tray.set_y(0);if(r.tableContent.length>0){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(t<r.panelHeigth-r.displayHeight){t=r.panelHeigth-r.displayHeight}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(base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE,function(e){var t=r.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(r.displayHeight<=r.panelHeigth){t=0}else if(t>0){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(t<r.panelHeigth-r.displayHeight){r.tray.set_y(r.panelHeigth-r.displayHeight)}else{r.tray.set_y(t)}var i=-r.tray.get_y()/r.unitHeight|0;r.updateShowData(i)});this.addEventListener("mouseWheel",function(e){var t=0;if(e.delta>0){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(t<r.panelHeigth-r.displayHeight){t=r.panelHeigth-r.displayHeight}}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)})})};$hxClasses["flipbookMM.toolbar.searchText.SearchTextUI"]=flipbookMM_toolbar_searchText_SearchTextUI;flipbookMM_toolbar_searchText_SearchTextUI.__name__=["flipbookMM","toolbar","searchText","SearchTextUI"];flipbookMM_toolbar_searchText_SearchTextUI.__super__=base_baseSprite_TouchSprite;flipbookMM_toolbar_searchText_SearchTextUI.prototype=$extend(base_baseSprite_TouchSprite.prototype,{UI_Width:null,UI_Height:null,panelWidth:null,panelHeigth:null,inputBoxWidth:null,inputBoxHeight:null,unitWidth:null,unitHeight:null,maxRow:null,bufferRow:null,displayHeight:null,curRowNum:null,displayNode:null,color:null,backAlpha:null,back:null,searchPanel:null,tray:null,searchPanelMask:null,inputBox:null,inputContent:null,coreStr:null,tableContent:null,searchTextDecode:null,noResoult:null,preTrayPosition:null,setInputBoxVisible:function(e){this.inputContent.set_visible(e);return e},inputBoxInit:function(){var s=this;this.inputContent=new flipbookMM_toolbar_searchText_InputContentJs;flipbookMM_global_GetDivJs.getInstance().noOPenfl.appendChild(this.inputContent.div);this.inputContent.input.onkeydown=function(e){if(e.keyCode==13){var t=s.inputContent.input.value;if(s.coreStr!=t){s.tableContent=null;var i=s.tray.get_numChildren();if(i>0){s.tray.removeChildren()}if(s.searchTextDecode!=null){s.searchTextDecode.targetContent=null;s.searchTextDecode=null}s.coreStr=t;if(StringTools.trim(s.coreStr).length>1){s.inputContent.div.blur();s.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();s.searchTextDecode.searchText(s.coreStr)}else{flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe();s.displayHeight=0;s.noResoult.set_text("Please enter at least two characters.");s.noResoult.set_textColor(16711680);s.tray.addChild(s.noResoult)}}}};this.inputContent.cancleBtn.onclick=function(){s.coreStr="";s.inputContent.input.value="";s.tableContent=null;var e=s.tray.get_numChildren();if(e>0){s.tray.removeChildren()}flipbookMM_toolbar_searchText_SearchTextDecode.getInstance().distoryMe()};this.inputContent.searchBtn.onclick=function(){var e=s.inputContent.input.value;if(s.coreStr!=e){s.tableContent=null;var t=s.tray.get_numChildren();if(t>0){s.tray.removeChildren(0)}if(s.searchTextDecode!=null){s.searchTextDecode.targetContent=null;s.searchTextDecode=null}s.coreStr=e;if(StringTools.trim(s.coreStr).length>1){s.searchTextDecode=flipbookMM_toolbar_searchText_SearchTextDecode.getInstance();s.searchTextDecode.searchText(s.coreStr)}}}},updateShowData:function(e){if(this.curRowNum==e){return}this.curRowNum=e;var t=this.curRowNum;if(t>=this.bufferRow){t-=this.bufferRow}var i=t;var s=t+this.maxRow+this.bufferRow+1;while(i<s){var a=i++;if(a<this.tableContent.length&&a>=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 n=this.displayNode.keys();while(n.hasNext()){var _=n.next();if(_<t||_>t+this.maxRow+this.bufferRow){this.tray.removeChild(this.displayNode.h[_]);this.displayNode.remove(_)}}},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 i=0;var s=this.tableContent;while(i<s.length){var a=s[i];++i;a.resize(this.unitWidth,this.unitHeight)}if(this.tableContent.length>0){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 i=this;var s="./img/toolbarImg/ic_share_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,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(i,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 i=window.document.createElement("img");i.src="./img/socialShare/facebook.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/facebook/offer?")};var s=window.document.createElement("img");s.src="./img/socialShare/twitter.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/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 n=window.document.createElement("img");n.src="./img/socialShare/addthis.png";n.style.padding=8+"px";this.div.appendChild(n);n.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 i;var s=flipbookMM_config_ConfigSetting.getInstance();var a=s.get(flipbookMM_config_ConfigKey.AppShowName);if(a.indexOf("Next")==0){i=e+"url="+t+"&pubid=ra-57870619ab04adca&ct=1&pco=tbxnj-1.0"}else{i=e+"url="+t+"&pubid=ra-5786fca66f6f5cc9&ct=1&pco=tbxnj-1.0"}s=null;try{if(this._linkUrl.toLowerCase().indexOf("www")==0){i="http://"+i}if(this._linkUrl.toLowerCase().indexOf("mailto:")==0){i=this._linkUrl;openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}else{openfl_Lib.getURL(new openfl_net_URLRequest(i),"_blank")}}catch(e){haxe_CallStack.lastException=e;return}},__class__:flipbookMM_toolbar_share_ShareUIJs});var flipbookMM_toolbar_sound_SoundBtnJs=function(e,t){var i=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){i.soundOnOffFlag=!i.soundOnOffFlag;i.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 i=this;var s="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSprite.call(this,s,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(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,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 i=this;var s="./img/toolbarImg/ic_view_module_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,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(i,"off",null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF,new flipbookMM_events_EventObject(i,2,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE,new flipbookMM_events_EventObject(i,"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(i,e,t,s){this.comFun=null;var a=this;openfl_display_Sprite.call(this);this.pageW=e;this.pageH=t;this.isFinished=false;this.clickFlag=0;this.comFun=s;this.pageT=new base_baseSprite_TextSprite(i==null?"null":""+i);var r=flipbookMM_bookBox_PagesConfigGet.getInstance();var n=r.thumbPageList[i-1];r=null;var _=flipbookMM_config_ConfigSetting.getInstance();if(_.get(flipbookMM_config_ConfigKey.PdfjsRenderEnable)=="yes"){this.isPdfjsRender=true;this.pdfLoader=new flipbookMM_bookBox_book_PdfjsPage(i,false,$bind(this,this.loadHandle))}else{this.isPdfjsRender=false;this.loader=new base_baseLoad_LoadImg(n,$bind(this,this.loadHandle));this.addChild(this.loader)}_=null;this.addEventListener("mouseDown",function(e){a.clickFlag=1});this.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,i,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.addEventListener("mouseOut",function(e){a.clickFlag=0});this.addEventListener("removed",function(e){a.destroyMe()})};$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,pdfLoader:null,pageW:null,pageH:null,realW:null,realH:null,isFinished:null,pageT:null,clickFlag:null,comFun:null,isPdfjsRender:null,loadHandle:function(e){if(this.isPdfjsRender){this.onPdfjsCom(e)}else{this.onImgCom(e)}if(this.comFun!=null){this.comFun();this.comFun=null}},onImgCom: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 i=this.pageW/this.realW;var s=this.pageH/this.realH;var a=i<s?i:s;this.loader.set_scaleX(a);this.loader.set_scaleY(a);this.loader.set_x((this.pageW-this.loader.get_width())/2);this.loader.set_y((this.pageH-this.loader.get_height())/2);this.isFinished=true;this.pageT.set_x(this.pageW/2);this.pageT.set_y(this.pageH/2);this.addChild(this.pageT)},onPdfjsCom:function(e){var t=this;this.realW=this.pdfLoader.originW;this.realH=this.pdfLoader.originH;var i=this.pageW/this.realW;var s=this.pageH/this.realH;var a=i<s?i:s;this.pdfLoader.loadPage(this.realW*a,this.realH*a,function(){t.pdfLoader.set_x((t.pageW-t.pdfLoader.get_width())/2);t.pdfLoader.set_y((t.pageH-t.pdfLoader.get_height())/2);t.addChild(t.pdfLoader);t.isFinished=true;t.pageT.set_x(t.pageW/2);t.pageT.set_y(t.pageH/2);t.addChild(t.pageT)})},destroyMe:function(){if(this.loader!=null){this.loader.destroyMe();this.loader=null}if(this.pdfLoader!=null){this.pdfLoader.destroyMe();this.pdfLoader=null}},__class__:flipbookMM_toolbar_thumbnails_ThumbnailsNode});var flipbookMM_toolbar_thumbnails_ThumbnailsTag=function(e){var i=this;openfl_display_Sprite.call(this);this.thumColor=e;this.back=new openfl_display_Sprite;this.addChild(this.back);this.curPageIndex=0;this.containLayer=new openfl_display_Sprite;this.addChild(this.containLayer);var t=flipbookMM_events_EventCenter.getInstance();t.addEventListener(flipbookMM_events_EventConst.THUMBNAIL_DISPLAY,this,function(e){var t=js_Boot.__cast(e._data._object,Int);i.update(t);i.set_visible(true)});t.addEventListener(flipbookMM_events_EventConst.THUMBNAIL_HIDE,this,function(e){i.set_visible(false)});t=null};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsTag"]=flipbookMM_toolbar_thumbnails_ThumbnailsTag;flipbookMM_toolbar_thumbnails_ThumbnailsTag.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsTag"];flipbookMM_toolbar_thumbnails_ThumbnailsTag.__super__=openfl_display_Sprite;flipbookMM_toolbar_thumbnails_ThumbnailsTag.prototype=$extend(openfl_display_Sprite.prototype,{thumWidth:null,thumHeight:null,thumColor:null,curPageIndex:null,curPage:null,containLayer:null,back:null,update:function(e){if(e!=this.curPageIndex){this.containLayer.removeChildren();this.curPage=null;this.curPage=new flipbookMM_toolbar_thumbnails_ThumbnailsNode(e,this.thumWidth,this.thumHeight);this.containLayer.addChild(this.curPage);this.curPageIndex=e}},resize:function(e,t){this.thumWidth=e;this.thumHeight=t;this.back.get_graphics().clear();this.back.get_graphics().beginFill(this.thumColor);this.back.get_graphics().drawRect(0,0,this.thumWidth,this.thumHeight);this.back.get_graphics().endFill()},__class__:flipbookMM_toolbar_thumbnails_ThumbnailsTag});var flipbookMM_toolbar_thumbnails_ThumbnailsUI=function(e,t,i,s,a){base_baseSprite_TouchSprite.call(this);this.maxCount=i;this.backColor=s;this.backAlpha=a;this.curRowNum=0;this.offsetX=0;this.bufferLength=1;this.back=new openfl_display_Sprite;this.addChild(this.back);this.tray=new openfl_display_Sprite;this.addChild(this.tray);this.trayMask=new openfl_display_Shape;this.addChild(this.trayMask);this.tray.set_mask(this.trayMask);this.tableContent=new haxe_ds_IntMap;this.preTrayPosition=new openfl_geom_Point;this.addListEvent();this.resize(e,t)};$hxClasses["flipbookMM.toolbar.thumbnails.ThumbnailsUI"]=flipbookMM_toolbar_thumbnails_ThumbnailsUI;flipbookMM_toolbar_thumbnails_ThumbnailsUI.__name__=["flipbookMM","toolbar","thumbnails","ThumbnailsUI"];flipbookMM_toolbar_thumbnails_ThumbnailsUI.__super__=base_baseSprite_TouchSprite;flipbookMM_toolbar_thumbnails_ThumbnailsUI.prototype=$extend(base_baseSprite_TouchSprite.prototype,{TWidth:null,THeight:null,TUnitWidth:null,TUnitHeight:null,offsetX:null,column:null,row:null,backColor:null,backAlpha:null,maxCount:null,back:null,tray:null,trayMask:null,tableContent:null,tableHeight:null,curRowNum:null,preTrayPosition:null,bufferLength:null,updateShowData:function(e){if(this.curRowNum==e){return}else{this.curRowNum=e}var t=this.curRowNum-this.bufferLength;if(t<0){t=0}var i=0;var s=this.row+this.bufferLength*2;while(i<s){var a=i++;var r=0;var n=this.column;while(r<n){var _=r++;var o=(t+a)*this.column+_;if(o<this.maxCount){if(!this.tableContent.h.hasOwnProperty(o)){var l=this.tableContent;var h=new flipbookMM_toolbar_thumbnails_ThumbnailsNode(o+1,this.TUnitWidth,this.TUnitHeight-10);l.h[o]=h;var c=this.tableContent.h[o];this.tray.addChild(c);c.set_x(_*this.TUnitWidth+this.offsetX);c.set_y((t+a)*this.TUnitHeight)}}}}var u=this.tableContent.keys();while(u.hasNext()){var f=u.next();if(f<t*this.column||f>=(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 i=this.maxCount%this.column;if(i==0){i=this.maxCount/this.column}else{i=this.maxCount/this.column+1|0}this.tableHeight=this.TUnitHeight*i;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 s=this.curRowNum;this.curRowNum=-1;this.tray.removeChildren();this.tableContent=null;this.tableContent=new haxe_ds_IntMap;this.updateShowData(s)},addListEvent:function(){var s=this;this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE,function(e){var t=s.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(s.tableHeight<=s.THeight){t=0}else if(t<s.THeight-s.tableHeight){t=s.THeight-s.tableHeight}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)})});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE,function(e){var t=s.tray.get_y();t+=e.get_touchSlidePoint().y*3;if(s.tableHeight<=s.THeight){t=0}else if(t>0){t=0}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)})});this.addEventListener("mouseDown",function(e){s.preTrayPosition.y=s.tray.get_y()});this.addEventListener(base_baseEvent_TouchCustomEvent.TOUCH_DRAG,function(e){var t=s.preTrayPosition.y+e.get_touchSlidePoint().y;if(t>0||s.tableHeight<=s.THeight){s.tray.set_y(0)}else if(t<s.THeight-s.tableHeight){s.tray.set_y(s.THeight-s.tableHeight)}else{s.tray.set_y(t)}var i=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(i)});this.addEventListener("mouseWheel",function(e){var t=0;if(e.delta>0){t=s.tray.get_y();t+=e.delta*2;if(s.tableHeight<=s.THeight){t=0}else if(t>0){t=0}}else{t=s.tray.get_y();t+=e.delta*2;if(s.tableHeight<=s.THeight){t=0}else if(t<s.THeight-s.tableHeight){t=s.THeight-s.tableHeight}}motion_Actuate.tween(s.tray,.7,{y:t}).ease(motion_easing_Sine.get_easeOut()).onUpdate(function(){var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)}).onComplete(function(){s.tray.set_y(t);var e=-s.tray.get_y()/s.TUnitHeight|0;s.updateShowData(e)})})},__class__:flipbookMM_toolbar_thumbnails_ThumbnailsUI});var flipbookMM_toolbar_txtView_TxtViewJs=function(e,t){var i=this;base_baseSprite_SpriteJs.call(this);this.txtOnUrl="./img/toolbarImg/ic_title_black_36dp.png";this.txtOffUrl="./img/toolbarImg/ic_hand_black_36dp.png";this.txtOnOffFlag=true;this.txtOnBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.txtOnUrl,e,t);this.div.appendChild(this.txtOnBtn.div);this.txtOffBtn=new flipbookMM_toolbar_IconBtnSpriteJs(this.txtOffUrl,e,t);this.div.appendChild(this.txtOffBtn.div);this.txtOffBtn.set_visible(false);this.updateStatus();this.div.addEventListener("click",function(e){i.txtOnOffFlag=!i.txtOnOffFlag;i.updateStatus()})};$hxClasses["flipbookMM.toolbar.txtView.TxtViewJs"]=flipbookMM_toolbar_txtView_TxtViewJs;flipbookMM_toolbar_txtView_TxtViewJs.__name__=["flipbookMM","toolbar","txtView","TxtViewJs"];flipbookMM_toolbar_txtView_TxtViewJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_txtView_TxtViewJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{txtOnOffFlag:null,txtOnUrl:null,txtOffUrl:null,txtOnBtn:null,txtOffBtn:null,updateBgAlpha:function(e){this.txtOnBtn.updateBgAlpha(e);this.txtOffBtn.updateBgAlpha(e)},updateStatus:function(){var e;if(this.txtOnOffFlag){e="on";this.txtOnBtn.set_visible(true);this.txtOffBtn.set_visible(false)}else{e="off";this.txtOnBtn.set_visible(false);this.txtOffBtn.set_visible(true)}var t=flipbookMM_global_GetDivJs.getInstance();if(this.txtOnOffFlag){t.pdfTxt.style.setProperty("pointer-events","none");t.pdfTxt.style.cursor="pointer"}else{t.pdfTxt.style.removeProperty("pointer-events");t.pdfTxt.style.removeProperty("cursor")}},__class__:flipbookMM_toolbar_txtView_TxtViewJs});var flipbookMM_toolbar_zoom_ZoomJs=function(e,t){var i=this;var s="./img/toolbarImg/ic_zoom_in_black_36dp.png";flipbookMM_toolbar_IconBtnSpriteJs.call(this,s,e,t);this.div.onclick=function(){var e=flipbookMM_events_EventCenter.getInstance();e.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.ZOOM_ON_OFF,new flipbookMM_events_EventObject(i,null,null)));e=null}};$hxClasses["flipbookMM.toolbar.zoom.ZoomJs"]=flipbookMM_toolbar_zoom_ZoomJs;flipbookMM_toolbar_zoom_ZoomJs.__name__=["flipbookMM","toolbar","zoom","ZoomJs"];flipbookMM_toolbar_zoom_ZoomJs.__super__=flipbookMM_toolbar_IconBtnSpriteJs;flipbookMM_toolbar_zoom_ZoomJs.prototype=$extend(flipbookMM_toolbar_IconBtnSpriteJs.prototype,{__class__:flipbookMM_toolbar_zoom_ZoomJs});var flipbookMM_toolbar_zoom_ZoomLineJs=function(e,t,i,s,a,r){if(r==null){r=1}if(a==null){a=4}if(s==null){s=1}base_baseSprite_SpriteJs.call(this);this.init(e,t,i,s,a,r)};$hxClasses["flipbookMM.toolbar.zoom.ZoomLineJs"]=flipbookMM_toolbar_zoom_ZoomLineJs;flipbookMM_toolbar_zoom_ZoomLineJs.__name__=["flipbookMM","toolbar","zoom","ZoomLineJs"];flipbookMM_toolbar_zoom_ZoomLineJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_zoom_ZoomLineJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{rect:null,left:null,positon:null,right:null,lineWidth:null,lineHeight:null,rectWidth:null,rectHeight:null,minScale:null,maxScale:null,dotR:null,downFlag:null,lineLeftColor:null,lineRightColor:null,circleColor:null,init:function(e,t,i,s,a,r){this.lineWidth=e;this.lineHeight=2;this.minScale=s;this.maxScale=a;this.dotR=i;this.rectWidth=e;this.rectHeight=t;this.downFlag=false;this.lineLeftColor=23551;this.lineRightColor=14540253;this.circleColor=this.lineLeftColor;this.updatePositon(r);this.addEvent()},addEvent:function(){var s=this;if(this.rect==null){return}this.rect.div.onmousedown=function(e){s.downFlag=true};this.rect.div.onmouseout=function(e){if(s.downFlag){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));t=null}s.downFlag=false};this.rect.div.onmouseleave=function(e){if(s.downFlag){var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));t=null}s.downFlag=false};this.rect.div.onmouseup=function(e){if(s.downFlag){var t=e.offsetX/s.rect.get_width()*(s.maxScale-s.minScale)+s.minScale;s.updatePositon(t);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(s,t,null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));i=null}s.downFlag=false};this.rect.div.onmousemove=function(e){if(s.downFlag){var t=e.offsetX/s.rect.get_width()*(s.maxScale-s.minScale)+s.minScale;s.updatePositon(t);var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(s,t,null)));i=null}}},updatePositon:function(e){if(this.left==null){this.left=new base_baseSprite_SpriteJs;this.div.appendChild(this.left.div);this.left.setBackgroundColor(this.lineLeftColor)}this.left.set_x(0);this.left.set_y((this.rectHeight-this.lineHeight)/2);this.left.set_width(this.lineWidth/(this.maxScale-this.minScale)*(e-this.minScale));this.left.set_height(this.lineHeight);if(this.right==null){this.right=new base_baseSprite_SpriteJs;this.div.appendChild(this.right.div);this.right.setBackgroundColor(this.lineRightColor)}this.right.set_x(this.lineWidth/(this.maxScale-this.minScale)*(e-this.minScale));this.right.set_y((this.rectHeight-this.lineHeight)/2);this.right.set_width(this.lineWidth/(this.maxScale-this.minScale)*(this.maxScale-e));this.right.set_height(this.lineHeight);if(this.positon==null){this.positon=new base_baseSprite_SpriteJs;this.div.appendChild(this.positon.div);this.positon.set_width(this.dotR*2);this.positon.set_height(this.dotR*2);this.positon.div.style.borderRadius=this.dotR+"px";this.positon.setBackgroundColor(this.circleColor)}this.positon.set_x(-this.dotR+this.lineWidth/(this.maxScale-this.minScale)*(e-this.minScale));this.positon.set_y((this.rectHeight-this.dotR*2)/2);if(this.rect==null){this.rect=new base_baseSprite_SpriteJs;this.rect.set_x(0);this.rect.set_y(0);this.rect.set_width(this.rectWidth);this.rect.set_height(this.rectHeight);this.rect.div.style.cursor="pointer";this.div.appendChild(this.rect.div)}},__class__:flipbookMM_toolbar_zoom_ZoomLineJs});var flipbookMM_toolbar_zoom_ZoomUIJs=function(){base_baseSprite_SpriteJs.call(this);this.init();this.addEvent()};$hxClasses["flipbookMM.toolbar.zoom.ZoomUIJs"]=flipbookMM_toolbar_zoom_ZoomUIJs;flipbookMM_toolbar_zoom_ZoomUIJs.__name__=["flipbookMM","toolbar","zoom","ZoomUIJs"];flipbookMM_toolbar_zoom_ZoomUIJs.__super__=base_baseSprite_SpriteJs;flipbookMM_toolbar_zoom_ZoomUIJs.prototype=$extend(base_baseSprite_SpriteJs.prototype,{zoomOut:null,zoomIn:null,zoomLine:null,currentScale:null,minScale:null,maxScale:null,init:function(){var s=this;this.currentScale=1;this.minScale=1;this.maxScale=4;this.setBackgroundColor(16777215);this.div.style.borderRadius=10+"px";this.set_width(260);this.set_height(50);this.div.style.textAlign="center";var e=window.document.createElement("img");e.src="./img/toolbarImg/ic_zoom_out_black_24dp.png";this.zoomOut=new base_baseSprite_SpriteJs;this.zoomOut.div.appendChild(e);this.zoomOut.div.style.padding="0px 8px";this.zoomOut.div.style.cursor="pointer";this.zoomOut.set_x(0);this.zoomOut.set_y(13);this.zoomOut.div.onclick=function(e){if(s.currentScale<=s.minScale){return}var t=s.currentScale-.5;if(t<s.minScale){t=s.minScale}var i=flipbookMM_events_EventCenter.getInstance();i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(s,t,null)));i.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));i=null};this.div.appendChild(this.zoomOut.div);this.zoomLine=new flipbookMM_toolbar_zoom_ZoomLineJs(180,50,5,this.minScale,this.maxScale,this.currentScale);this.zoomLine.set_x(40);this.zoomLine.set_y(0);this.div.appendChild(this.zoomLine.div);var t=window.document.createElement("img");t.src="./img/toolbarImg/ic_zoom_in_black_24dp.png";t.onclick=function(){if(s.currentScale>=s.maxScale){return}var e=s.currentScale+.5;if(e>s.maxScale){e=s.maxScale}var t=flipbookMM_events_EventCenter.getInstance();t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM,new flipbookMM_events_EventObject(s,e,null)));t.dispatchEvent(new flipbookMM_events_EventCenterEvent(flipbookMM_events_EventConst.PAGE_ZOOM_END,new flipbookMM_events_EventObject(s,null,null)));t=null};this.zoomIn=new base_baseSprite_SpriteJs;this.zoomIn.div.appendChild(t);this.zoomIn.div.style.padding="0px 8px";this.zoomIn.div.style.cursor="pointer";this.zoomIn.set_x(220);this.zoomIn.set_y(13);this.div.appendChild(this.zoomIn.div)},addEvent:function(){var i=this;var e=flipbookMM_events_EventCenter.getInstance();e.addEventListener(flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT,this,function(e){var t=js_Boot.__cast(e._data._object,Float);i.currentScale=t;if(i.zoomLine!=null){i.zoomLine.updatePositon(t)}});e=null},__class__:flipbookMM_toolbar_zoom_ZoomUIJs});var flipbookMM_utils_color_ColorUtils=function(){};$hxClasses["flipbookMM.utils.color.ColorUtils"]=flipbookMM_utils_color_ColorUtils;flipbookMM_utils_color_ColorUtils.__name__=["flipbookMM","utils","color","ColorUtils"];flipbookMM_utils_color_ColorUtils.red=function(e){return e>>>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,i,s){if(s==null){s=0}var a=(e&255)<<16;var r=(t&255)<<8;var n=i&255;var _=(s&255)<<24;return a|r|n|_};flipbookMM_utils_color_ColorUtils.transform=function(e,t,i,s,a,r,n,_,o){if(o==null){o=0}if(_==null){_=0}if(n==null){n=0}if(r==null){r=0}if(a==null){a=1}if(s==null){s=1}if(i==null){i=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*i+n|0;var d=c*s+_|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,i,s,a,r){if(a==null){a=-1}if(s==null){s=-1}if(i==null){i=0}if(t==null){t=0}if(this.data==null){return}var n=new openfl_geom_Matrix;n.identity();if(s>-1&&a>-1){n.scale(s/this.data.width,a/this.data.height)}n.translate(t,i);var _=new format_svg_SVGRenderer(this.data,r);_.render(e,n)},__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,i,s){},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,i,s){this.graphics.curveTo(e,t,i,s)},__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 i=this.y2-this.y1;var s=Math.atan2(i,t);var a=Math.sqrt(t*t+i*i);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(s);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 i=this.children;while(t<i.length){var s=i[t];++t;if(s[1]==1){var a=s[2];if(a.name==e){return a}var r=a.findGroup(e);if(r!=null){return r}}}return null},name:null,children:null,__class__:format_svg_Group};var format_svg_DisplayElement=$hxClasses["format.svg.DisplayElement"]={__ename__:["format","svg","DisplayElement"],__constructs__:["DisplayPath","DisplayGroup","DisplayText"]};format_svg_DisplayElement.DisplayPath=function(e){var t=["DisplayPath",0,e];t.__enum__=format_svg_DisplayElement;t.toString=$estr;return t};format_svg_DisplayElement.DisplayGroup=function(e){var t=["DisplayGroup",1,e];t.__enum__=format_svg_DisplayElement;t.toString=$estr;return t};format_svg_DisplayElement.DisplayText=function(e){var t=["DisplayText",2,e];t.__enum__=format_svg_DisplayElement;t.toString=$estr;return t};var format_svg_Path=function(){};$hxClasses["format.svg.Path"]=format_svg_Path;format_svg_Path.__name__=["format","svg","Path"];format_svg_Path.prototype={matrix:null,name:null,fill:null,alpha:null,fill_alpha:null,stroke_alpha:null,stroke_colour:null,stroke_width:null,stroke_caps:null,joint_style:null,miter_limit:null,segments:null,__class__:format_svg_Path};var format_svg_PathParser=function(){if(format_svg_PathParser.sCommandArgs==null){format_svg_PathParser.sCommandArgs=[];var e=0;while(e<128){var t=e++;format_svg_PathParser.sCommandArgs[t]=this.commandArgs(t)}}};$hxClasses["format.svg.PathParser"]=format_svg_PathParser;format_svg_PathParser.__name__=["format","svg","PathParser"];format_svg_PathParser.prototype={lastMoveX:null,lastMoveY:null,prev:null,parse:function(e,t){this.lastMoveX=this.lastMoveY=0;var i=0;var s=[];var a=[];var r=0;var n=-1;var _=-1;this.prev=null;var o=e.length;var l=false;while(i<=o){var h=i==o?32:HxOverrides.cca(e,i);var c=h>0&&h<128?format_svg_PathParser.sCommandArgs[h]:-1;if(c==-1){throw new js__$Boot_HaxeError("failed parsing path near '"+HxOverrides.substr(e,i,null)+"'")}if(c==-2){++i}else if(c<=-3){var u=i+1;var f=-1;var p=c==-5;if(c==-6){f=0;p=true}while(u<e.length){var d=HxOverrides.cca(e,u);var g=d<0||d>127?-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(n>=0){var m=parseFloat(HxOverrides.substr(e,i,u-i));s.push(m)}i=u}else{n=h;_=c;l=false;r=i;s=[];++i}var v=0;var b=0;if(n>=0){if(_==s.length){if(t&&this.prev!=null){v=this.prev.prevX();b=this.prev.prevY()}this.prev=this.createCommand(n,s);if(this.prev==null){throw new js__$Boot_HaxeError("Unknown command "+String.fromCharCode(n)+" near '"+HxOverrides.substr(e,r,null)+"'")}if(t&&this.prev.getType()==4){var y=this.prev;var x=y.toQuadratics(v,b);var w=0;while(w<x.length){var k=x[w];++w;a.push(k)}}else{a.push(this.prev)}l=true;if(_==0){_=-1;n=-1}else if(n==77){n=76}else if(n==109){n=108}r=i;s=[]}}}if(n>=0&&!l){throw new js__$Boot_HaxeError("Unfinished command ("+s.length+"/"+_+") 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 i=this.prevX();var s=this.prevY();return new format_svg_CubicSegment(i*2-this.prevCX(),s*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 n=this.prevX();var _=this.prevY();return new format_svg_ArcSegment(n,_,t[0],t[1],t[2],t[3]!=0,t[4]!=0,t[5]+n,t[6]+_);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,i,s){format_svg_PathSegment.call(this,i,s);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,i,s,a,r){format_svg_PathSegment.call(this,a,r);this.cx1=e;this.cy1=t;this.cx2=i;this.cy2=s};$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,i){return e+(t-e)*i},toGfx:function(e,t){var i=t.lastX;var s=t.lastY;var a=t.transX(this.cx1,this.cy1);var r=t.transY(this.cx1,this.cy1);var n=t.transX(this.cx2,this.cy2);var _=t.transY(this.cx2,this.cy2);t.setLast(this.x,this.y);var o=t.lastX;var l=t.lastY;var h=this.Interp(i,a,.75);var c=this.Interp(s,r,.75);var u=this.Interp(o,n,.75);var f=this.Interp(l,_,.75);var p=(o-i)/16;var d=(l-s)/16;var g=this.Interp(i,a,.375);var m=this.Interp(s,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 w=this.Interp(o,n,.375);var k=this.Interp(l,_,.375);var P=(g+v)*.5;var C=(m+b)*.5;var T=(h+u)*.5;var M=(c+f)*.5;var S=(y+w)*.5;var $=(x+k)*.5;e.curveTo(g,m,P,C);e.curveTo(v,b,T,M);e.curveTo(y,x,S,$);e.curveTo(w,k,o,l)},toQuadratics:function(e,t){var i=[];var s=this.Interp(e,this.cx1,.75);var a=this.Interp(t,this.cy1,.75);var r=this.Interp(this.x,this.cx2,.75);var n=this.Interp(this.y,this.cy2,.75);var _=(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(s,r,.375)-_;var u=this.Interp(a,n,.375)-o;var f=this.Interp(r,s,.375)+_;var p=this.Interp(n,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=(s+r)*.5;var y=(a+n)*.5;var x=(f+d)*.5;var w=(p+g)*.5;i.push(new format_svg_QuadraticSegment(l,h,m,v));i.push(new format_svg_QuadraticSegment(c,u,b,y));i.push(new format_svg_QuadraticSegment(f,p,x,w));i.push(new format_svg_QuadraticSegment(d,g,this.x,this.y));return i},getType:function(){return 4},__class__:format_svg_CubicSegment});var format_svg_ArcSegment=function(e,t,i,s,a,r,n,_,o){this.x1=e;this.y1=t;format_svg_PathSegment.call(this,_,o);this.rx=i;this.ry=s;this.phi=a;this.fA=r;this.fS=n};$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 i=this.phi*Math.PI/180;var s=Math.cos(i);var a=Math.sin(i);var r=(this.x1-this.x)*.5;var n=(this.y1-this.y)*.5;var _=s*r+a*n;var o=-a*r+s*n;var l=this.rx*this.rx;var h=this.ry*this.ry;var c=_*_;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*_/this.rx;var g=(this.x1+this.x)*.5;var m=(this.y1+this.y)*.5;var v=s*p-a*d+g;var b=a*p+s*d+m;var y=Math.atan2((o-d)/this.ry,(_-p)/this.rx);var x=Math.atan2((-o-d)/this.ry,(-_-p)/this.rx)-y;if(this.fS&&x<0){x+=2*Math.PI}else if(!this.fS&&x>0){x-=2*Math.PI}var w=t.matrix;var k;var P;var C;var T;var M;var S;if(w!=null){k=w.a*this.rx;P=w.c*this.ry;C=w.a*v+w.c*b+w.tx;T=w.b*this.rx;M=w.d*this.ry;S=w.b*v+w.d*b+w.ty}else{k=this.rx;P=0;C=v+w.tx;T=0;M=this.ry;S=b+w.ty}var $=Math.abs(x)*Math.sqrt(k*k+P*P+T*T+M*M);$*=5;var E=Math.round($);if(E>1){x/=E;var B=1;var L=E-1;while(B<L){var R=B++;var A=Math.cos(y);var I=Math.sin(y);y+=x;e.lineTo(k*A+P*I+C,T*A+M*I+S)}}e.lineTo(t.lastX,t.lastY)},getType:function(){return 5},__class__:format_svg_ArcSegment});var format_svg_RenderContext=function(e,t,i,s){this.matrix=e;this.rect=t;this.rectW=i!=null?i:t!=null?t.width:1;this.rectH=s!=null?s:t!=null?t.height:1;this.firstX=0;this.firstY=0;this.lastX=0;this.lastY=0};$hxClasses["format.svg.RenderContext"]=format_svg_RenderContext;format_svg_RenderContext.__name__=["format","svg","RenderContext"];format_svg_RenderContext.prototype={transX:function(e,t){if(this.rect!=null&&e>this.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 i=e.firstElement();var s;if(i!=null){if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}if(i.nodeName!="svg"){if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}s=i.nodeName!="svg:svg"}else{s=false}}else{s=true}if(s){var a;if(i==null){a="null"}else{if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}a=i.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",i,null,0);this.height=this.getFloatStyle("height",i,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(i.exists("viewBox")){var n=i.get("viewBox");var _=n.indexOf(",")!=-1?n.split(","):n.split(" ");r=new openfl_geom_Rectangle(parseFloat(StringTools.trim(_[0])),parseFloat(StringTools.trim(_[1])),parseFloat(StringTools.trim(_[2])),parseFloat(StringTools.trim(_[3])))}this.loadGroup(this,i,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 i=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 s=parseFloat(format_svg_SVGData.mScaleMatch.matched(1));e.scale(s,s);i=s}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;i=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 n=parseFloat(format_svg_SVGData.mRotationMatch.matched(2));if(isNaN(n)){n=0}var _=parseFloat(format_svg_SVGData.mRotationMatch.matched(3));if(isNaN(_)){_=0}var o=r*Math.PI/180;e.translate(-n,-_);e.rotate(o);e.translate(n,_)}return i},getColorStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}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,i){var s=this.getStyle(e,t,i,"");if(s==""){return format_svg_SVGData.defaultFill}if(s.charAt(0)=="#"){var a=HxOverrides.substr(s,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(s)){var r=format_svg_SVGData.mRGBMatch;var n=parseFloat(r.matched(1));if(r.matched(2)=="%"){n=n*255/100}var _=parseFloat(r.matched(3));if(r.matched(4)=="%"){_=_*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=n;if(l<0){l=0}if(l>255){l=255}var h=_;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(s=="none"){return format_svg_FillType.FillNone}if(format_svg_SVGData.mURLMatch.match(s)){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:"+s)},getFloat:function(e,t,i){if(i==null){i=0}if(e.exists(t)){return parseFloat(e.get(t))}return i},getFloatStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}return parseFloat(a)},getStyleAndConvert:function(e,t,i,s,a){var r=this.getStyle(e,t,i,"");if(r==""||!(__map_reserved[r]!=null?a.existsReserved(r):a.h.hasOwnProperty(r))){return s}return __map_reserved[r]!=null?a.getReserved(r):a.h[r]},getStrokeStyle:function(e,t,i,s){var a=this.getStyle(e,t,i,"");if(a==""){return s}if(format_svg_SVGData.mRGBMatch.match(a)){var r=format_svg_SVGData.mRGBMatch;var n=parseFloat(r.matched(1));if(r.matched(2)=="%"){n=n*255/100}var _=parseFloat(r.matched(3));if(r.matched(4)=="%"){_=_*255/100}var o=parseFloat(r.matched(5));if(r.matched(6)=="%"){o=o*255/100}var l=n;if(l<0){l=0}if(l>255){l=255}var h=_;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,i,s){if(t!=null&&t.exists(e)){return t.get(e)}if(i!=null&&(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e))){return __map_reserved[e]!=null?i.getReserved(e):i.h[e]}return s},getStyles:function(e,t){if(!e.exists("style")){return t}var i=new haxe_ds_StringMap;if(t!=null){var s=t.keys();while(s.hasNext()){var a=s.next();var r=__map_reserved[a]!=null?t.getReserved(a):t.h[a];if(__map_reserved[a]!=null){i.setReserved(a,r)}else{i.h[a]=r}}}var n=e.get("style");var _=format_svg_SVGData.mStyleSplit.split(n);var o=0;while(o<_.length){var l=_[o];++o;if(format_svg_SVGData.mStyleValue.match(l)){var h=format_svg_SVGData.mStyleValue.matched(1);var c=format_svg_SVGData.mStyleValue.matched(2);if(__map_reserved[h]!=null){i.setReserved(h,c)}else{i.h[h]=c}}}return i},loadDefs:function(e){var t=0;while(t<2){var i=t++;var s=e.elements();while(s.hasNext()){var a=s.next();if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}var r=a.nodeName;if(HxOverrides.substr(r,0,4)=="svg:"){r=HxOverrides.substr(r,4,null)}if(r=="linearGradient"){this.loadGradient(a,0,i==1)}else if(r=="radialGradient"){this.loadGradient(a,1,i==1)}}}},loadGradient:function(e,t,i){var s=e.get("id");var a=new format_svg_Grad(t);if(i&&e.exists("xlink:href")){var r=e.get("xlink:href");if(r.charAt(0)!="#"){throw new js__$Boot_HaxeError("xlink - unkown syntax : "+r)}var n=this.mGrads;var _=HxOverrides.substr(r,1,null);var o=__map_reserved[_]!=null?n.getReserved(_):n.h[_];if(o!=null){a.colors=o.colors;a.alphas=o.alphas;a.ratios=o.ratios;a.gradMatrix=o.gradMatrix.clone();a.spread=o.spread;a.interp=o.interp;a.radius=o.radius}else{throw new js__$Boot_HaxeError("Unknown xlink : "+r)}}if(e.exists("x1")){a.x1=this.getFloat(e,"x1");a.y1=this.getFloat(e,"y1");a.x2=this.getFloat(e,"x2");a.y2=this.getFloat(e,"y2")}else{a.x1=this.getFloat(e,"cx");a.y1=this.getFloat(e,"cy");a.x2=this.getFloat(e,"fx",a.x1);a.y2=this.getFloat(e,"fy",a.y1)}a.radius=this.getFloat(e,"r");if(e.exists("gradientTransform")){this.applyTransform(a.gradMatrix,e.get("gradientTransform"))}var l=e.elements();while(l.hasNext()){var h=l.next();var c=this.getStyles(h,null);a.colors.push(this.getColorStyle("stop-color",h,c,0));a.alphas.push(this.getFloatStyle("stop-opacity",h,c,1));a.ratios.push(parseFloat(h.get("offset"))*255|0)}var u=this.mGrads;if(__map_reserved[s]!=null){u.setReserved(s,a)}else{u.h[s]=a}},loadGroup:function(e,t,i,s){if(t.exists("transform")){i=i.clone();this.applyTransform(i,t.get("transform"))}if(t.exists("inkscape:label")){e.name=t.get("inkscape:label")}else if(t.exists("id")){e.name=t.get("id")}var a=this.getStyles(t,s);if(t.exists("opacity")){var r=t.get("opacity");if(a==null){a=new haxe_ds_StringMap}if(__map_reserved["opacity"]!=null?a.existsReserved("opacity"):a.h.hasOwnProperty("opacity")){r=Std.string(parseFloat(r)*parseFloat(__map_reserved["opacity"]!=null?a.getReserved("opacity"):a.h["opacity"]))}if(__map_reserved["opacity"]!=null){a.setReserved("opacity",r)}else{a.h["opacity"]=r}}var n=t.elements();while(n.hasNext()){var _=n.next();if(_.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+_.nodeType)}var o=_.nodeName;if(HxOverrides.substr(o,0,4)=="svg:"){o=HxOverrides.substr(o,4,null)}if(_.exists("display")&&_.get("display")=="none"){continue}if(o=="defs"){this.loadDefs(_)}else if(o=="g"){if(!(_.exists("display")&&_.get("display")=="none")){e.children.push(format_svg_DisplayElement.DisplayGroup(this.loadGroup(new format_svg_Group,_,i,a)))}}else if(o=="path"||o=="line"||o=="polyline"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,false)))}else if(o=="rect"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,true,false)))}else if(o=="polygon"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,false)))}else if(o=="ellipse"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,true)))}else if(o=="circle"){e.children.push(format_svg_DisplayElement.DisplayPath(this.loadPath(_,i,a,false,true,true)))}else if(o=="text"){e.children.push(format_svg_DisplayElement.DisplayText(this.loadText(_,i,a)))}else if(o=="linearGradient"){this.loadGradient(_,0,true)}else if(o=="radialGradient"){this.loadGradient(_,1,true)}}return e},loadPath:function(e,t,i,s,a,r){if(r==null){r=false}if(e.exists("transform")){t=t.clone();this.applyTransform(t,e.get("transform"))}var n=this.getStyles(e,i);var _=e.exists("id")?e.get("id"):"";var o=new format_svg_Path;o.fill=this.getFillStyle("fill",e,n);o.alpha=this.getFloatStyle("opacity",e,n,1);o.fill_alpha=this.getFloatStyle("fill-opacity",e,n,1);o.stroke_alpha=this.getFloatStyle("stroke-opacity",e,n,1);o.stroke_colour=this.getStrokeStyle("stroke",e,n,null);o.stroke_width=this.getFloatStyle("stroke-width",e,n,1);var l=new haxe_ds_StringMap;var h=1;if(__map_reserved["round"]!=null){l.setReserved("round",h)}else{l.h["round"]=h}var c=2;if(__map_reserved["square"]!=null){l.setReserved("square",c)}else{l.h["square"]=c}var u=0;if(__map_reserved["butt"]!=null){l.setReserved("butt",u)}else{l.h["butt"]=u}o.stroke_caps=this.getStyleAndConvert("stroke-linecap",e,n,0,l);var f=new haxe_ds_StringMap;var p=0;if(__map_reserved["bevel"]!=null){f.setReserved("bevel",p)}else{f.h["bevel"]=p}var d=2;if(__map_reserved["round"]!=null){f.setReserved("round",d)}else{f.h["round"]=d}var g=1;if(__map_reserved["miter"]!=null){f.setReserved("miter",g)}else{f.h["miter"]=g}o.joint_style=this.getStyleAndConvert("stroke-linejoin",e,n,1,f);o.miter_limit=this.getFloatStyle("stroke-miterlimit",e,n,3);o.segments=[];o.matrix=t;o.name=_;if(s){var m=e.exists("x")?parseFloat(e.get("x")):0;var v=e.exists("y")?parseFloat(e.get("y")):0;var b=parseFloat(e.get("width"));var y=parseFloat(e.get("height"));var x=e.exists("rx")?parseFloat(e.get("rx")):0;var w=e.exists("ry")?parseFloat(e.get("ry")):0;if(x==0||w==0){o.segments.push(new format_svg_MoveSegment(m,v));o.segments.push(new format_svg_DrawSegment(m+b,v));o.segments.push(new format_svg_DrawSegment(m+b,v+y));o.segments.push(new format_svg_DrawSegment(m,v+y));o.segments.push(new format_svg_DrawSegment(m,v))}else{o.segments.push(new format_svg_MoveSegment(m,v+w));o.segments.push(new format_svg_QuadraticSegment(m,v,m+x,v));o.segments.push(new format_svg_DrawSegment(m+b-x,v));o.segments.push(new format_svg_QuadraticSegment(m+b,v,m+b,v+x));o.segments.push(new format_svg_DrawSegment(m+b,v+y-w));o.segments.push(new format_svg_QuadraticSegment(m+b,v+y,m+b-x,v+y));o.segments.push(new format_svg_DrawSegment(m+x,v+y));o.segments.push(new format_svg_QuadraticSegment(m,v+y,m,v+y-w));o.segments.push(new format_svg_DrawSegment(m,v+w))}}else if(a){var k=e.exists("cx")?parseFloat(e.get("cx")):0;var P=e.exists("cy")?parseFloat(e.get("cy")):0;var C=r&&e.exists("r")?parseFloat(e.get("r")):0;var T=r?C:e.exists("rx")?parseFloat(e.get("rx")):0;var M=T*.7071067811865476;var S=T*.41421356237309503;var $=r?C:e.exists("ry")?parseFloat(e.get("ry")):0;var E=$*.7071067811865476;var B=$*.41421356237309503;o.segments.push(new format_svg_MoveSegment(k+T,P));o.segments.push(new format_svg_QuadraticSegment(k+T,P+B,k+M,P+E));o.segments.push(new format_svg_QuadraticSegment(k+S,P+$,k,P+$));o.segments.push(new format_svg_QuadraticSegment(k-S,P+$,k-M,P+E));o.segments.push(new format_svg_QuadraticSegment(k-T,P+B,k-T,P));o.segments.push(new format_svg_QuadraticSegment(k-T,P-B,k-M,P-E));o.segments.push(new format_svg_QuadraticSegment(k-S,P-$,k,P-$));o.segments.push(new format_svg_QuadraticSegment(k+S,P-$,k+M,P-E));o.segments.push(new format_svg_QuadraticSegment(k+T,P-B,k+T,P))}else{var L=e.exists("points")?"M"+e.get("points")+"z":e.exists("x1")?"M"+e.get("x1")+","+e.get("y1")+" "+e.get("x2")+","+e.get("y2")+"z":e.get("d");var R=0;var A=this.mPathParser.parse(L,this.mConvertCubics);while(R<A.length){var I=A[R];++R;o.segments.push(I)}}return o},loadText:function(e,t,i){if(e.exists("transform")){t=t.clone();this.applyTransform(t,e.get("transform"))}var s=this.getStyles(e,i);var a=new format_svg_Text;a.matrix=t;a.name=e.exists("id")?e.get("id"):"";a.x=this.getFloat(e,"x",0);a.y=this.getFloat(e,"y",0);a.fill=this.getFillStyle("fill",e,s);a.fill_alpha=this.getFloatStyle("fill-opacity",e,s,1);a.stroke_alpha=this.getFloatStyle("stroke-opacity",e,s,1);a.stroke_colour=this.getStrokeStyle("stroke",e,s,null);a.stroke_width=this.getFloatStyle("stroke-width",e,s,1);a.font_family=this.getStyle("font-family",e,s,"");a.font_size=this.getFloatStyle("font-size",e,s,12);a.letter_spacing=this.getFloatStyle("letter-spacing",e,s,0);a.kerning=this.getFloatStyle("kerning",e,s,0);a.text_align=this.getStyle("text-align",e,s,"start");var r="";var n=e.elements();while(n.hasNext()){var _=n.next();r+=haxe_xml_Printer.print(_)}a.text=r;return a},__class__:format_svg_SVGData});var format_svg_SVGRenderer=function(e,t){this.mSvg=e;this.width=this.mSvg.width;this.height=this.mSvg.height;this.mRoot=this.mSvg;if(t!=null){this.mRoot=this.mSvg.findGroup(t);if(this.mRoot==null){throw new js__$Boot_HaxeError("Could not find SVG group: "+t)}}};$hxClasses["format.svg.SVGRenderer"]=format_svg_SVGRenderer;format_svg_SVGRenderer.__name__=["format","svg","SVGRenderer"];format_svg_SVGRenderer.prototype={width:null,height:null,mSvg:null,mRoot:null,mGfx:null,mMatrix:null,mScaleRect:null,mScaleW:null,mScaleH:null,mFilter:null,mGroupPath:null,iterateText:function(e){if(this.mFilter!=null&&!this.mFilter(e.name,this.mGroupPath)){return}this.mGfx.renderText(e)},iteratePath:function(e){if(this.mFilter!=null&&!this.mFilter(e.name,this.mGroupPath)){return}if(e.segments.length==0||this.mGfx==null){return}var t=0;var i=0;var s=e.matrix.clone();s.concat(this.mMatrix);var a=new format_svg_RenderContext(s,this.mScaleRect,this.mScaleW,this.mScaleH);var r=this.mGfx.geometryOnly();if(!r){e.segments[0].toGfx(this.mGfx,a);var n=e.fill;switch(n[1]){case 0:var _=n[2];_.updateMatrix(s);this.mGfx.beginGradientFill(_);break;case 1:var o=n[2];this.mGfx.beginFill(o,e.fill_alpha*e.alpha);break;case 2:break}if(e.stroke_colour!=null){var l=new format_gfx_LineStyle;var h=Math.sqrt(s.a*s.a+s.d*s.d)/format_svg_SVGRenderer.SQRT2;l.thickness=e.stroke_width*h;l.alpha=e.stroke_alpha*e.alpha;l.color=e.stroke_colour;l.capsStyle=e.stroke_caps;l.jointStyle=e.joint_style;l.miterLimit=e.miter_limit;this.mGfx.lineStyle(l)}}var c=0;var u=e.segments;while(c<u.length){var f=u[c];++c;f.toGfx(this.mGfx,a)}this.mGfx.endLineStyle();this.mGfx.endFill()},iterateGroup:function(e,t){if(t&&e.name!=null&&HxOverrides.substr(e.name,0,1)=="."){return}this.mGroupPath.push(e.name);var i=0;var s=e.children;while(i<s.length){var a=s[i];++i;switch(a[1]){case 0:var r=a[2];this.iteratePath(r);break;case 1:var n=a[2];this.iterateGroup(n,t);break;case 2:var _=a[2];this.iterateText(_);break}}this.mGroupPath.pop()},render:function(e,t,i,s,a,r){this.mGfx=new format_gfx_GfxGraphics(e);if(t==null){this.mMatrix=new openfl_geom_Matrix}else{this.mMatrix=t.clone()}this.mScaleRect=s;this.mScaleW=a;this.mScaleH=r;this.mFilter=i;this.mGroupPath=[];this.iterateGroup(this.mRoot,i==null)},__class__:format_svg_SVGRenderer};var format_svg_Text=function(){};$hxClasses["format.svg.Text"]=format_svg_Text;format_svg_Text.__name__=["format","svg","Text"];format_svg_Text.prototype={name:null,x:null,y:null,matrix:null,text:null,fill:null,fill_alpha:null,stroke_alpha:null,stroke_colour:null,stroke_width:null,font_family:null,font_size:null,kerning:null,letter_spacing:null,text_align:null,__class__:format_svg_Text};var gif_AnimatedGif=function(e){this.pos=0;openfl_display_Sprite.call(this);this.bmaps=[];this.frames=gif_images_GifDecoder.decode(e).frameList;var t=0;var i=this.frames;while(t<i.length){var s=i[t];++t;var a=new openfl_display_BitmapData(s.imageWidth,s.imageHeight);var r=s.getRgbaImageData();var n=0;if(s.interlaceFlag){var _=0;var o=8;var l=0;var h=0;while(h<4){var c=h++;switch(c){case 0:_=0;o=8;break;case 1:_=4;o=8;break;case 2:_=2;o=4;break;case 3:_=1;o=2;break}l=_;while(l<s.imageHeight){var u=0;var f=s.imageWidth;while(u<f){var p=u++;var d=r[n];a.setPixel32(p,l,d);++n}l+=o}}}else{var g=0;var m=r.length;while(g<m){var v=g++;var b=r[v];a.setPixel32(v%s.imageWidth|0,v/s.imageWidth|0,b)}}var y=new openfl_display_Bitmap(a);y.set_x(s.imageLeftPosition);y.set_y(s.imageTopPosition);this.addChild(y);y.set_visible(false);this.bmaps.push(y);s.clearBinaryData()}this.bmaps[0].set_visible(true);this.pos=-1;this.playing=false;this.timer=null};$hxClasses["gif.AnimatedGif"]=gif_AnimatedGif;gif_AnimatedGif.__name__=["gif","AnimatedGif"];gif_AnimatedGif.__super__=openfl_display_Sprite;gif_AnimatedGif.prototype=$extend(openfl_display_Sprite.prototype,{bmaps:null,frames:null,pos:null,playing:null,timer:null,play:function(){if(this.playing){return this}this.playing=true;this.timer=new openfl_utils_Timer(0,1);this.timer.addEventListener("timer",$bind(this,this.timerTick));this.timer.set_delay(this.nextFrame());this.timer.start();return this},stop:function(){if(!this.playing){return this}this.playing=false;this.timer.stop();this.timer.removeEventListener("timer",$bind(this,this.timerTick));this.timer=null;return this},nextFrame:function(){if(this.pos>=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(e<t){var i=e++;this.bmaps[i].set_visible(false)}}this.bmaps[this.pos].set_visible(true);if(this.frames[this.pos].delayTime>10){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,i){var s=i;var a=e.b;if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}try{while(s>0){a[t]=this.readByte();++t;--s}}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 i-s},set_bigEndian:function(e){this.bigEndian=e;return e},readFullBytes:function(e,t,i){while(i>0){var s=this.readBytes(e,t,i);if(s==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}t+=s;i-=s}},read:function(e){var t=new haxe_io_Bytes(new ArrayBuffer(e));var i=0;while(e>0){var s=this.readBytes(t,i,e);if(s==0){throw new js__$Boot_HaxeError(haxe_io_Error.Blocked)}i+=s;e-=s}return t},readInt16:function(){var e=this.readByte();var t=this.readByte();var i=this.bigEndian?t|e<<8:e|t<<8;if((i&32768)!=0){return i-65536}return i},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 i=this.readByte();var s=this.readByte();if(this.bigEndian){return s|i<<8|t<<16|e<<24}else{return e|t<<8|i<<16|s<<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,i){if(t==null){t=0}if(i==null){i=e.length-t}if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}this.b=e.b;this.pos=t;this.len=i;this.totlen=i};$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,i){if(t<0||i<0||t+i>e.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(this.len==0&&i>0){throw new js__$Boot_HaxeError(new haxe_io_Eof)}if(this.len<i){i=this.len}var s=this.b;var a=e.b;var r=0;var n=i;while(r<n){var _=r++;a[t+_]=s[this.pos+_]}this.pos+=i;this.len-=i;return i},__class__:haxe_io_BytesInput});var gif_bytes_BytesInputWrapper=function(e,t,i,s){haxe_io_BytesInput.call(this,e,i,s);if(t!=null){switch(t[1]){case 0:this.set_bigEndian(true);break;case 1:this.set_bigEndian(false);break}}};$hxClasses["gif.bytes.BytesInputWrapper"]=gif_bytes_BytesInputWrapper;gif_bytes_BytesInputWrapper.__name__=["gif","bytes","BytesInputWrapper"];gif_bytes_BytesInputWrapper.__super__=haxe_io_BytesInput;gif_bytes_BytesInputWrapper.prototype=$extend(haxe_io_BytesInput.prototype,{__class__:gif_bytes_BytesInputWrapper});var gif_color__$Rgb_Rgb_$Impl_$={};$hxClasses["gif.color._Rgb.Rgb_Impl_"]=gif_color__$Rgb_Rgb_$Impl_$;gif_color__$Rgb_Rgb_$Impl_$.__name__=["gif","color","_Rgb","Rgb_Impl_"];gif_color__$Rgb_Rgb_$Impl_$.fromComponents=function(e,t,i){var s=(gif_color__$Rgb_Rgb_$Impl_$.limitateComponent(e)<<16|gif_color__$Rgb_Rgb_$Impl_$.limitateComponent(t)<<8|gif_color__$Rgb_Rgb_$Impl_$.limitateComponent(i))&16777215;return s};gif_color__$Rgb_Rgb_$Impl_$.limitateComponent=function(e){var t=e;if(t>255){return 255}else{var i=e;if(i<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 i=new gif_images_GifInfo;gif_images_GifDecoder.readHeader(t,i);if(i.globalColorTableFlag){gif_images_GifDecoder.readGlobalColorTable(t,i)}var s=new gif_images_GifFrameInfo(i);try{while(true){var a=t.readByte();switch(a){case 33:var r=t.readByte();switch(r){case 249:gif_images_GifDecoder.readGraphicControlExtension(t,s);break;case 254:gif_images_GifDecoder.readComment(t,s);break;case 255:gif_images_GifDecoder.readApplicationExtension(t,s);break}break;case 44:gif_images_GifDecoder.readImageDescriptor(t,s);if(s.localColorTableFlag){gif_images_GifDecoder.readLocalColorTable(t,s)}gif_images_GifDecoder.readImageData(t,s);i.frameList.push(s);s=new gif_images_GifFrameInfo(i);break;case 59:throw"__break__";break;default:throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}}}catch(e){if(e!="__break__")throw e}return i};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 i=e.readByte();t.globalColorTableFlag=(i&128)==128;t.colorResolution=(i&112)>>4;t.sortFlag=(i&8)==8;t.sizeOfGlobalTable=i&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 i=e.toString();switch(i){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 i=1<<t.sizeOfGlobalTable+1;var s=0;var a=i;while(s<a){var r=s++;t.globalColorTable.push(gif_images_GifDecoder.readRgb(e))}};gif_images_GifDecoder.readGraphicControlExtension=function(e,t){var i=e.readByte();if(i!=4){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}var s=e.readByte();t.disposalMethod=(s&28)>>2;t.userInputFlag=(s&2)==2;t.transparentColorFlag=(s&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 i;while(true){i=e.readByte()&255;if(i>0){e.read(i)}if(!(i>0)){break}}};gif_images_GifDecoder.readApplicationExtension=function(e,t){var i=e.readByte();if(i!=11){throw new js__$Boot_HaxeError(gif_images_Error.InvalidFormat)}var s=e.readInt32();var a=e.readInt32();var r=e.readByte();var n=e.readByte();var _=e.readByte();if(s==1346454355&&a==808333893&&r==50&&n==46&&_==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 i=e.readByte();t.localColorTableFlag=(i&128)==128;t.interlaceFlag=(i&64)==64;t.sortFlag=(i&32)==32;t.sizeOfLocalColorTable=i&7};gif_images_GifDecoder.readLocalColorTable=function(e,t){var i=1<<t.sizeOfLocalColorTable+1;var s=0;var a=i;while(s<a){var r=s++;t.localColorTable.push(gif_images_GifDecoder.readRgb(e))}};gif_images_GifDecoder.readBlock=function(e){var t=e.readByte();var i=new haxe_io_Bytes(new ArrayBuffer(t));var s=0;if(t>0){try{var a=0;while(s<t){e.readBytes(i,s,t-s);if(t-s==-1){break}s+=t-s}}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;if(js_Boot.__instanceof(e,gif_images_Error)){}else throw e}}return{block:i,bytesWritten:s}};gif_images_GifDecoder.readImageData=function(e,t){var i=-1;var s=4096;var a=t.imageWidth*t.imageHeight;var r;var n;var _;var o;var l;var h;var c;var u;var f;var p;var d;var g;var m;var v;var b;var y;var x;var w=null;var k=new Array(s);var P=k;var C=new Array(s);var T=C;var M=new Array(s+1);var S=M;m=e.readByte();n=1<<m;l=n+1;r=n+2;c=i;o=m+1;_=(1<<o)-1;var $=0;var E=n;while($<E){var B=$++;P[B]=0;T[B]=B}y=0;x=y;b=x;v=b;p=v;u=p;g=u;d=0;while(d<a){if(b==0){if(u<o){if(p==0){var L=gif_images_GifDecoder.readBlock(e);p=L.bytesWritten;w=L.block;if(p<=0){break}y=0}g+=(w.b[y]&255)<<u;u+=8;++y;--p;continue}f=g&_;g>>=o;u-=o;if(f>r||f==l){break}if(f==n){o=m+1;_=(1<<o)-1;r=n+2;c=i;continue}if(c==i){S[b++]=T[f];c=f;v=f;continue}h=f;if(f==r){S[b++]=v;f=c}while(f>n){S[b++]=T[f];f=P[f]}v=T[f]&255;if(r>=s){break}S[b++]=v;P[r]=c;T[r]=v;++r;if((r&_)==0&&r<s){++o;_+=r}c=h}--b;t.imageData[x++]=S[b];++d}var R=x;var A=a;while(R<A){var I=R++;t.imageData[I]=0}e.readByte()};gif_images_GifDecoder.readRgb=function(e){var t=e.readByte();var i=e.readByte();var s=e.readByte();return gif_color__$Rgb_Rgb_$Impl_$.fromComponents(t,i,s)};var gif_images_GifFrameInfo=function(e){this.parent=e;this.localColorTable=[];this.imageData=[]};$hxClasses["gif.images.GifFrameInfo"]=gif_images_GifFrameInfo;gif_images_GifFrameInfo.__name__=["gif","images","GifFrameInfo"];gif_images_GifFrameInfo.prototype={parent:null,disposalMethod:null,userInputFlag:null,transparentColorFlag:null,delayTime:null,transparentColorIndex:null,imageLeftPosition:null,imageTopPosition:null,imageWidth:null,imageHeight:null,localColorTableFlag:null,interlaceFlag:null,sortFlag:null,sizeOfLocalColorTable:null,localColorTable:null,imageData:null,clearBinaryData:function(){this.imageData=null;this.localColorTable=null},getGlobalRbgaPalette:function(){var e=[];var t=0;var i=this.parent.globalColorTable.length;while(t<i){var s=t++;this.parent.globalColorTable[s]=-16777216|this.parent.globalColorTable[s]&16777215;e[s]=this.parent.globalColorTable[s];if(this.transparentColorFlag&&s==this.transparentColorIndex){e[s]=0|e[s]&16777215}}return e},getLocalRbgaPalette:function(){var e=[];var t=0;var i=this.localColorTable.length;while(t<i){var s=t++;this.localColorTable[s]=-16777216|this.localColorTable[s]&16777215;e[s]=this.localColorTable[s];if(this.transparentColorFlag&&s==this.transparentColorIndex){e[s]=0|e[s]&16777215}}return e},getRgbaImageData:function(){var e=this.localColorTableFlag?this.getLocalRbgaPalette():this.getGlobalRbgaPalette();var t=[];var i=0;var s=this.imageData.length;while(i<s){var a=i++;t[a]=e[this.imageData[a]]}return t},__class__:gif_images_GifFrameInfo};var gif_images_Version=$hxClasses["gif.images.Version"]={__ename__:["gif","images","Version"],__constructs__:["Gif87a","Gif89a"]};gif_images_Version.Gif87a=["Gif87a",0];gif_images_Version.Gif87a.toString=$estr;gif_images_Version.Gif87a.__enum__=gif_images_Version;gif_images_Version.Gif89a=["Gif89a",1];gif_images_Version.Gif89a.toString=$estr;gif_images_Version.Gif89a.__enum__=gif_images_Version;var gif_images_GifInfo=function(){this.globalColorTable=[];this.frameList=[]};$hxClasses["gif.images.GifInfo"]=gif_images_GifInfo;gif_images_GifInfo.__name__=["gif","images","GifInfo"];gif_images_GifInfo.prototype={version:null,logicalScreenWidth:null,logicalScreenHeight:null,globalColorTableFlag:null,colorResolution:null,sortFlag:null,sizeOfGlobalTable:null,backgroundColorIndex:null,pixelAspectRaito:null,globalColorTable:null,frameList:null,animationLoopCount:null,__class__:gif_images_GifInfo};var haxe_StackItem=$hxClasses["haxe.StackItem"]={__ename__:["haxe","StackItem"],__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"]};haxe_StackItem.CFunction=["CFunction",0];haxe_StackItem.CFunction.toString=$estr;haxe_StackItem.CFunction.__enum__=haxe_StackItem;haxe_StackItem.Module=function(e){var t=["Module",1,e];t.__enum__=haxe_StackItem;t.toString=$estr;return t};haxe_StackItem.FilePos=function(e,t,i){var s=["FilePos",2,e,t,i];s.__enum__=haxe_StackItem;s.toString=$estr;return s};haxe_StackItem.Method=function(e,t){var i=["Method",3,e,t];i.__enum__=haxe_StackItem;i.toString=$estr;return i};haxe_StackItem.LocalFunction=function(e){var t=["LocalFunction",4,e];t.__enum__=haxe_StackItem;t.toString=$estr;return t};var haxe_CallStack=function(){};$hxClasses["haxe.CallStack"]=haxe_CallStack;haxe_CallStack.__name__=["haxe","CallStack"];haxe_CallStack.getStack=function(e){if(e==null){return[]}var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){var i=[];var s=0;while(s<t.length){var a=t[s];++s;if(haxe_CallStack.wrapCallSite!=null){a=haxe_CallStack.wrapCallSite(a)}var r=null;var n=a.getFunctionName();if(n!=null){var _=n.lastIndexOf(".");if(_>=0){var o=HxOverrides.substr(n,0,_);var l=HxOverrides.substr(n,_+1,null);r=haxe_StackItem.Method(o,l)}}i.push(haxe_StackItem.FilePos(r,a.getFileName(),a.getLineNumber()))}return i};var i=haxe_CallStack.makeStack(e.stack);Error.prepareStackTrace=t;return i};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 i=0;while(i<e.length){var s=e[i];++i;t.b+="\nCalled from ";haxe_CallStack.itemToString(t,s)}return t.b};haxe_CallStack.itemToString=function(e,t){switch(t[1]){case 0:e.b+="a C function";break;case 1:var i=t[2];e.b+="module ";e.b+=i==null?"null":""+i;break;case 2:var s=t[4];var a=t[3];var r=t[2];if(r!=null){haxe_CallStack.itemToString(e,r);e.b+=" ("}e.b+=a==null?"null":""+a;e.b+=" line ";e.b+=s==null?"null":""+s;if(r!=null){e.b+=")"}break;case 3:var n=t[3];var _=t[2];e.b+=_==null?"null":""+_;e.b+=".";e.b+=n==null?"null":""+n;break;case 4:var o=t[2];e.b+="local function #";e.b+=o==null?"null":""+o;break}};haxe_CallStack.makeStack=function(e){if(e==null){return[]}else if(typeof e=="string"){var t=e.split("\n");if(t[0]=="Error"){t.shift()}var i=[];var s=new EReg("^   at ([A-Za-z0-9_. ]+) \\(([^)]+):([0-9]+):([0-9]+)\\)$","");var a=0;while(a<t.length){var r=t[a];++a;if(s.match(r)){var n=s.matched(1).split(".");var _=n.pop();var o=s.matched(2);var l=Std.parseInt(s.matched(3));i.push(haxe_StackItem.FilePos(_=="Anonymous function"?haxe_StackItem.LocalFunction():_=="Global code"?null:haxe_StackItem.Method(n.join("."),_),o,l))}else{i.push(haxe_StackItem.Module(StringTools.trim(r)))}}return i}else{return e}};var haxe__$Int64__$_$_$Int64=function(e,t){this.high=e;this.low=t};$hxClasses["haxe._Int64.___Int64"]=haxe__$Int64__$_$_$Int64;haxe__$Int64__$_$_$Int64.__name__=["haxe","_Int64","___Int64"];haxe__$Int64__$_$_$Int64.prototype={high:null,low:null,__class__:haxe__$Int64__$_$_$Int64};var haxe_Serializer=function(){this.buf=new StringBuf;this.cache=[];this.useCache=haxe_Serializer.USE_CACHE;this.useEnumIndex=haxe_Serializer.USE_ENUM_INDEX;this.shash=new haxe_ds_StringMap;this.scount=0};$hxClasses["haxe.Serializer"]=haxe_Serializer;haxe_Serializer.__name__=["haxe","Serializer"];haxe_Serializer.run=function(e){var t=new haxe_Serializer;t.serialize(e);return t.toString()};haxe_Serializer.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash;var i=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(i!=null){this.buf.b+="R";this.buf.b+=i==null?"null":""+i;return}var s=this.shash;var a=this.scount++;if(__map_reserved[e]!=null){s.setReserved(e,a)}else{s.h[e]=a}this.buf.b+="y";e=encodeURIComponent(e);this.buf.b+=Std.string(e.length);this.buf.b+=":";this.buf.b+=e==null?"null":""+e},serializeRef:function(e){var t=typeof e;var i=0;var s=this.cache.length;while(i<s){var a=i++;var r=this.cache[a];if(typeof r==t&&r==e){this.buf.b+="r";this.buf.b+=a==null?"null":""+a;return true}}this.cache.push(e);return false},serializeFields:function(e){var t=0;var i=Reflect.fields(e);while(t<i.length){var s=i[t];++t;this.serializeString(s);this.serialize(Reflect.field(e,s))}this.buf.b+="g"},serialize:function(e){var t=Type["typeof"](e);switch(t[1]){case 0:this.buf.b+="n";break;case 1:var i=e;if(i==0){this.buf.b+="z";return}this.buf.b+="i";this.buf.b+=i==null?"null":""+i;break;case 2:var s=e;if(isNaN(s)){this.buf.b+="k"}else if(!isFinite(s)){this.buf.b+=s<0?"m":"p"}else{this.buf.b+="d";this.buf.b+=s==null?"null":""+s}break;case 3:this.buf.b+=e?"t":"f";break;case 4:if(js_Boot.__instanceof(e,Class)){var a=Type.getClassName(e);this.buf.b+="A";this.serializeString(a)}else if(js_Boot.__instanceof(e,Enum)){this.buf.b+="B";this.serializeString(Type.getEnumName(e))}else{if(this.useCache&&this.serializeRef(e)){return}this.buf.b+="o";this.serializeFields(e)}break;case 5:throw new js__$Boot_HaxeError("Cannot serialize function");break;case 6:var r=t[2];if(r==String){this.serializeString(e);return}if(this.useCache&&this.serializeRef(e)){return}switch(r){case Array:var n=0;this.buf.b+="a";var _=e["length"];var o=0;var l=_;while(o<l){var h=o++;if(e[h]==null){++n}else{if(n>0){if(n==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=n==null?"null":""+n}n=0}this.serialize(e[h])}}if(n>0){if(n==1){this.buf.b+="n"}else{this.buf.b+="u";this.buf.b+=n==null?"null":""+n}}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 w=Reflect.field(x,"__id__");Reflect.deleteField(x,"__id__");this.serialize(x);x["__id__"]=w;this.serialize(b.h[x.__id__])}this.buf.b+="h";break;case haxe_ds_StringMap:this.buf.b+="b";var k=e;var P=k.keys();while(P.hasNext()){var C=P.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 M=0;var S=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<R){var A=L++;$[A]=HxOverrides.cca(haxe_Serializer.BASE64,A)}haxe_Serializer.BASE64_CODES=$}while(M<S){var I=T.b[M++];var D=T.b[M++];var F=T.b[M++];this.buf.b+=String.fromCharCode($[I>>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(M==S){var O=T.b[M++];var j=T.b[M++];this.buf.b+=String.fromCharCode($[O>>2]);this.buf.b+=String.fromCharCode($[(O<<4|j>>4)&63]);this.buf.b+=String.fromCharCode($[j<<2&63])}else if(M==S+1){var G=T.b[M++];this.buf.b+=String.fromCharCode($[G>>2]);this.buf.b+=String.fromCharCode($[G<<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 W=U;while(N<W){var V=N++;this.serialize(e[V])}if(this.useCache){this.cache.push(e)}break;default:throw new js__$Boot_HaxeError("Cannot serialize "+Std.string(e))}},__class__:haxe_Serializer};var haxe_Timer=function(e){var t=this;this.id=setInterval(function(){t.run()},e)};$hxClasses["haxe.Timer"]=haxe_Timer;haxe_Timer.__name__=["haxe","Timer"];haxe_Timer.delay=function(e,t){var i=new haxe_Timer(t);i.run=function(){i.stop();e()};return i};haxe_Timer.prototype={id:null,stop:function(){if(this.id==null){return}clearInterval(this.id);this.id=null},run:function(){},__class__:haxe_Timer};var haxe__$Unserializer_DefaultResolver=function(){};$hxClasses["haxe._Unserializer.DefaultResolver"]=haxe__$Unserializer_DefaultResolver;haxe__$Unserializer_DefaultResolver.__name__=["haxe","_Unserializer","DefaultResolver"];haxe__$Unserializer_DefaultResolver.prototype={resolveClass:function(e){return Type.resolveClass(e)},resolveEnum:function(e){return Type.resolveEnum(e)},__class__:haxe__$Unserializer_DefaultResolver};var haxe_Unserializer=function(e){this.buf=e;this.length=e.length;this.pos=0;this.scache=[];this.cache=[];var t=haxe_Unserializer.DEFAULT_RESOLVER;if(t==null){t=new haxe__$Unserializer_DefaultResolver;haxe_Unserializer.DEFAULT_RESOLVER=t}this.resolver=t};$hxClasses["haxe.Unserializer"]=haxe_Unserializer;haxe_Unserializer.__name__=["haxe","Unserializer"];haxe_Unserializer.initCodes=function(){var e=[];var t=0;var i=haxe_Unserializer.BASE64.length;while(t<i){var s=t++;e[haxe_Unserializer.BASE64.charCodeAt(s)]=s}return e};haxe_Unserializer.run=function(e){return new haxe_Unserializer(e).unserialize()};haxe_Unserializer.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(e){if(e==null){if(haxe__$Unserializer_NullResolver.instance==null){haxe__$Unserializer_NullResolver.instance=new haxe__$Unserializer_NullResolver}this.resolver=haxe__$Unserializer_NullResolver.instance}else{this.resolver=e}},readDigits:function(){var e=0;var t=false;var i=this.pos;while(true){var s=this.buf.charCodeAt(this.pos);if(s!=s){break}if(s==45){if(this.pos!=i){break}t=true;this.pos++;continue}if(s<48||s>57){break}e=e*10+(s-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 i=this.unserialize();e[t]=i}this.pos++},unserializeEnum:function(e,t){if(this.buf.charCodeAt(this.pos++)!=58){throw new js__$Boot_HaxeError("Invalid enum format")}var i=this.readDigits();if(i==0){return Type.createEnum(e,t)}var s=[];while(i-- >0)s.push(this.unserialize());return Type.createEnum(e,t,s)},unserialize:function(){var e=this.buf.charCodeAt(this.pos++);switch(e){case 65:var t=this.unserialize();var i=this.resolver.resolveClass(t);if(i==null){throw new js__$Boot_HaxeError("Class not found "+t)}return i;case 66:var s=this.unserialize();var a=this.resolver.resolveEnum(s);if(a==null){throw new js__$Boot_HaxeError("Enum not found "+s)}return a;case 67:var r=this.unserialize();var n=this.resolver.resolveClass(r);if(n==null){throw new js__$Boot_HaxeError("Class not found "+r)}var _=Type.createEmptyInstance(n);this.cache.push(_);_.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103){throw new js__$Boot_HaxeError("Invalid custom data")}return _;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 w=Type.createEmptyInstance(x);this.cache.push(w);this.unserializeObject(w);return w;case 100:return this.readFloat();case 102:return false;case 105:return this.readDigits();case 106:var k=this.unserialize();var P=this.resolver.resolveEnum(k);if(P==null){throw new js__$Boot_HaxeError("Enum not found "+k)}this.pos++;var C=this.readDigits();var T=P.__constructs__.slice()[C];if(T==null){throw new js__$Boot_HaxeError("Unknown enum index "+k+"@"+C)}var M=this.unserializeEnum(P,T);this.cache.push(M);return M;case 107:return NaN;case 108:var S=new List;this.cache.push(S);var $=this.buf;while(this.buf.charCodeAt(this.pos)!=104)S.add(this.unserialize());this.pos++;return S;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<F){throw new js__$Boot_HaxeError("Invalid bytes length")}var j=haxe_Unserializer.CODES;if(j==null){j=haxe_Unserializer.initCodes();haxe_Unserializer.CODES=j}var G=this.pos;var H=F&3;var U=(F>>2)*3+(H>=2?H-1:0);var N=G+(F-H);var W=new haxe_io_Bytes(new ArrayBuffer(U));var V=0;while(G<N){var z=j[O.charCodeAt(G++)];var X=j[O.charCodeAt(G++)];W.b[V++]=(z<<2|X>>4)&255;var Y=j[O.charCodeAt(G++)];W.b[V++]=(X<<4|Y>>2)&255;var J=j[O.charCodeAt(G++)];W.b[V++]=(Y<<6|J)&255}if(H>=2){var K=j[O.charCodeAt(G++)];var q=j[O.charCodeAt(G++)];W.b[V++]=(K<<2|q>>4)&255;if(H==3){var Z=j[O.charCodeAt(G++)];W.b[V++]=(q<<4|Z>>2)&255}}this.pos+=F;this.cache.push(W);return W;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 ie=this.resolver.resolveEnum(te);if(ie==null){throw new js__$Boot_HaxeError("Enum not found "+te)}var se=this.unserializeEnum(ie,this.unserialize());this.cache.push(se);return se;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<ae){throw new js__$Boot_HaxeError("Invalid string length")}var re=HxOverrides.substr(this.buf,this.pos,ae);this.pos+=ae;re=decodeURIComponent(re.split("+").join(" "));this.scache.push(re);return re;case 122:return 0;default:}this.pos--;throw new js__$Boot_HaxeError("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos)},__class__:haxe_Unserializer};var haxe__$Unserializer_NullResolver=function(){};$hxClasses["haxe._Unserializer.NullResolver"]=haxe__$Unserializer_NullResolver;haxe__$Unserializer_NullResolver.__name__=["haxe","_Unserializer","NullResolver"];haxe__$Unserializer_NullResolver.prototype={resolveClass:function(e){return null},resolveEnum:function(e){return null},__class__:haxe__$Unserializer_NullResolver};var haxe_crypto_Adler32=function(){this.a1=1;this.a2=0};$hxClasses["haxe.crypto.Adler32"]=haxe_crypto_Adler32;haxe_crypto_Adler32.__name__=["haxe","crypto","Adler32"];haxe_crypto_Adler32.read=function(e){var t=new haxe_crypto_Adler32;var i=e.readByte();var s=e.readByte();var a=e.readByte();var r=e.readByte();t.a1=a<<8|r;t.a2=i<<8|s;return t};haxe_crypto_Adler32.prototype={a1:null,a2:null,update:function(e,t,i){var s=this.a1;var a=this.a2;var r=t;var n=t+i;while(r<n){var _=r++;var o=e.b[_];s=(s+o)%65521;a=(a+s)%65521}this.a1=s;this.a2=a},equals:function(e){if(e.a1==this.a1){return e.a2==this.a2}else{return false}},__class__:haxe_crypto_Adler32};var haxe_io_Bytes=function(e){this.length=e.byteLength;this.b=new Uint8Array(e);this.b.bufferValue=e;e.hxBytes=this;e.bytes=this.b};$hxClasses["haxe.io.Bytes"]=haxe_io_Bytes;haxe_io_Bytes.__name__=["haxe","io","Bytes"];haxe_io_Bytes.alloc=function(e){return new haxe_io_Bytes(new ArrayBuffer(e))};haxe_io_Bytes.ofString=function(e,t){var i=[];var s=0;while(s<e.length){var a=e.charCodeAt(s++);if(55296<=a&&a<=56319){a=a-55232<<10|e.charCodeAt(s++)&1023}if(a<=127){i.push(a)}else if(a<=2047){i.push(192|a>>6);i.push(128|a&63)}else if(a<=65535){i.push(224|a>>12);i.push(128|a>>6&63);i.push(128|a&63)}else{i.push(240|a>>18);i.push(128|a>>12&63);i.push(128|a>>6&63);i.push(128|a&63)}}return new haxe_io_Bytes(new Uint8Array(i).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.ofHex=function(e){if((e.length&1)!=0){throw new js__$Boot_HaxeError("Not a hex string (odd number of digits)")}var t=[];var i=0;var s=e.length>>1;while(i<s){var a=e.charCodeAt(i*2);var r=e.charCodeAt(i*2+1);a=(a&15)+((a&64)>>6)*9;r=(r&15)+((r&64)>>6)*9;t.push((a<<4|r)&255);++i}return new haxe_io_Bytes(new Uint8Array(t).buffer)};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,i,s){if(e<0||i<0||s<0||e+s>this.length||i+s>t.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}if(i==0&&s==t.b.byteLength){this.b.set(t.b,e)}else{this.b.set(t.b.subarray(i,i+s),e)}},getString:function(e,t,i){if(e<0||t<0||e+t>this.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var s="";var a=this.b;var r=String.fromCharCode;var n=e;var _=e+t;while(n<_){var o=a[n++];if(o<128){if(o==0){break}s+=r(o)}else if(o<224){s+=r((o&63)<<6|a[n++]&127)}else if(o<240){var l=a[n++];s+=r((o&31)<<12|(l&127)<<6|a[n++]&127)}else{var h=a[n++];var c=a[n++];var u=(o&15)<<18|(h&127)<<12|(c&127)<<6|a[n++]&127;s+=r((u>>10)+55232);s+=r(u&1023|56320)}}return s},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 i=new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).encodeBytes(e).toString();if(t){var s=e.length%3;switch(s){case 1:i+="==";break;case 2:i+="=";break;default:}}return i};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 i=1;while(t>1<<i)++i;if(i>8||t!=1<<i){throw new js__$Boot_HaxeError("BaseCode : base length must be a power of two.")}this.base=e;this.nbits=i};$hxClasses["haxe.crypto.BaseCode"]=haxe_crypto_BaseCode;haxe_crypto_BaseCode.__name__=["haxe","crypto","BaseCode"];haxe_crypto_BaseCode.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(e){var t=this.nbits;var i=this.base;var s=e.length*8/t|0;var a=new haxe_io_Bytes(new ArrayBuffer(s+(e.length*8%t==0?0:1)));var r=0;var n=0;var _=(1<<t)-1;var o=0;var l=0;while(l<s){while(n<t){n+=8;r<<=8;r|=e.b[o++]}n-=t;a.b[l++]=i.b[r>>n&_]&255}if(n>0){a.b[l++]=i.b[r<<t-n&_]&255}return a},initTable:function(){var e=[];var t=0;while(t<256){var i=t++;e[i]=-1}var s=0;var a=this.base.length;while(s<a){var r=s++;e[this.base.b[r]]=r}this.tbl=e},decodeBytes:function(e){var t=this.nbits;var i=this.base;if(this.tbl==null){this.initTable()}var s=this.tbl;var a=e.length*t>>3;var r=new haxe_io_Bytes(new ArrayBuffer(a));var n=0;var _=0;var o=0;var l=0;while(l<a){while(_<8){_+=t;n<<=t;var h=s[e.b[o++]];if(h==-1){throw new js__$Boot_HaxeError("BaseCode : invalid encoded char")}n|=h}_-=8;r.b[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,i,s){var a=i+s>>1;if(s-i<12){if(s<=i){return}var r=i+1;var n=s;while(r<n){var _=r++;var o=_;while(o>i){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,i,a);haxe_ds_ArraySort.rec(e,t,a,s);haxe_ds_ArraySort.doMerge(e,t,i,a,s,a-i,s-a)};haxe_ds_ArraySort.doMerge=function(e,t,i,s,a,r,n){var _;var o;var l;var h;var c;if(r==0||n==0){return}if(r+n==2){if(t(e[s],e[i])<0){haxe_ds_ArraySort.swap(e,s,i)}return}if(r>n){l=r>>1;_=i+l;o=haxe_ds_ArraySort.lower(e,t,s,a,_);h=o-s}else{h=n>>1;o=s+h;_=haxe_ds_ArraySort.upper(e,t,i,s,o);l=_-i}haxe_ds_ArraySort.rotate(e,t,_,s,o);c=_+h;haxe_ds_ArraySort.doMerge(e,t,i,_,c,l,h);haxe_ds_ArraySort.doMerge(e,t,c,o,a,r-l,n-h)};haxe_ds_ArraySort.rotate=function(e,t,i,s,a){var r;if(i==s||s==a){return}r=haxe_ds_ArraySort.gcd(a-i,s-i);while(r--!=0){var n=e[i+r];var _=s-i;var o=i+r;var l=i+r+_;while(l!=i+r){e[o]=e[l];o=l;if(a-l>_){l+=_}else{l=i+(_-(a-l))}}e[o]=n}};haxe_ds_ArraySort.gcd=function(e,t){while(t!=0){var i=e%t;e=t;t=i}return e};haxe_ds_ArraySort.upper=function(e,t,i,s,a){var r=s-i;var n;var _;while(r>0){n=r>>1;_=i+n;if(t(e[a],e[_])<0){r=n}else{i=_+1;r=r-n-1}}return i};haxe_ds_ArraySort.lower=function(e,t,i,s,a){var r=s-i;var n;var _;while(r>0){n=r>>1;_=i+n;if(t(e[_],e[a])<0){i=_+1;r=r-n-1}else{r=n}}return i};haxe_ds_ArraySort.swap=function(e,t,i){var s=e[t];e[t]=e[i];e[i]=s};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<this.count},next:function(){var e=this.map;var t=this.keys[this.index++];if(__map_reserved[t]!=null){return e.getReserved(t)}else{return e.h[t]}},__class__:haxe_ds__$StringMap_StringMapIterator};var haxe_ds_StringMap=function(){this.h={}};$hxClasses["haxe.ds.StringMap"]=haxe_ds_StringMap;haxe_ds_StringMap.__name__=["haxe","ds","StringMap"];haxe_ds_StringMap.__interfaces__=[haxe_IMap];haxe_ds_StringMap.prototype={h:null,rh:null,set:function(e,t){if(__map_reserved[e]!=null){this.setReserved(e,t)}else{this.h[e]=t}},get:function(e){if(__map_reserved[e]!=null){return this.getReserved(e)}return this.h[e]},exists:function(e){if(__map_reserved[e]!=null){return this.existsReserved(e)}return this.h.hasOwnProperty(e)},setReserved:function(e,t){if(this.rh==null){this.rh={}}this.rh["$"+e]=t},getReserved:function(e){if(this.rh==null){return null}else{return this.rh["$"+e]}},existsReserved:function(e){if(this.rh==null){return false}return this.rh.hasOwnProperty("$"+e)},remove:function(e){if(__map_reserved[e]!=null){e="$"+e;if(this.rh==null||!this.rh.hasOwnProperty(e)){return false}delete this.rh[e];return true}else{if(!this.h.hasOwnProperty(e)){return false}delete this.h[e];return true}},keys:function(){return HxOverrides.iter(this.arrayKeys())},arrayKeys:function(){var e=[];for(var t in this.h){if(this.h.hasOwnProperty(t)){e.push(t)}}if(this.rh!=null){for(var t in this.rh){if(t.charCodeAt(0)==36){e.push(t.substr(1))}}}return e},__class__:haxe_ds_StringMap};var haxe_io_BytesBuffer=function(){this.b=[]};$hxClasses["haxe.io.BytesBuffer"]=haxe_io_BytesBuffer;haxe_io_BytesBuffer.__name__=["haxe","io","BytesBuffer"];haxe_io_BytesBuffer.prototype={b:null,getBytes:function(){var e=new haxe_io_Bytes(new Uint8Array(this.b).buffer);this.b=null;return e},__class__:haxe_io_BytesBuffer};var haxe_io_Eof=function(){};$hxClasses["haxe.io.Eof"]=haxe_io_Eof;haxe_io_Eof.__name__=["haxe","io","Eof"];haxe_io_Eof.prototype={toString:function(){return"Eof"},__class__:haxe_io_Eof};var haxe_io_Error=$hxClasses["haxe.io.Error"]={__ename__:["haxe","io","Error"],__constructs__:["Blocked","Overflow","OutsideBounds","Custom"]};haxe_io_Error.Blocked=["Blocked",0];haxe_io_Error.Blocked.toString=$estr;haxe_io_Error.Blocked.__enum__=haxe_io_Error;haxe_io_Error.Overflow=["Overflow",1];haxe_io_Error.Overflow.toString=$estr;haxe_io_Error.Overflow.__enum__=haxe_io_Error;haxe_io_Error.OutsideBounds=["OutsideBounds",2];haxe_io_Error.OutsideBounds.toString=$estr;haxe_io_Error.OutsideBounds.__enum__=haxe_io_Error;haxe_io_Error.Custom=function(e){var t=["Custom",3,e];t.__enum__=haxe_io_Error;t.toString=$estr;return t};var haxe_io_FPHelper=function(){};$hxClasses["haxe.io.FPHelper"]=haxe_io_FPHelper;haxe_io_FPHelper.__name__=["haxe","io","FPHelper"];haxe_io_FPHelper.i32ToFloat=function(e){var t=1-(e>>>31<<1);var i=e>>>23&255;var s=e&8388607;if(s==0&&i==0){return 0}return t*(1+Math.pow(2,-23)*s)*Math.pow(2,i-127)};haxe_io_FPHelper.floatToI32=function(e){if(e==0){return 0}var t=e<0?-e:e;var i=Math.floor(Math.log(t)/.6931471805599453);if(i<-127){i=-127}else if(i>128){i=128}var s=Math.round((t/Math.pow(2,i)-1)*8388608);if(s==8388608&&i<128){s=0;++i}return(e<0?-2147483648:0)|i+127<<23|s};haxe_io_FPHelper.i64ToDouble=function(e,t){var i=1-(t>>>31<<1);var s=(t>>20&2047)-1023;var a=(t&1048575)*4294967296+(e>>>31)*2147483648+(e&2147483647);if(a==0&&s==-1023){return 0}return i*(1+Math.pow(2,-52)*a)*Math.pow(2,s)};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 i=e<0?-e:e;var s=Math.floor(Math.log(i)/.6931471805599453);var a=Math.round((i/Math.pow(2,s)-1)*4503599627370496);var r=a|0;var n=a/4294967296|0;t.low=r;t.high=(e<0?-2147483648:0)|s+1023<<20|n}return t};var haxe_io_Path=function(e){switch(e){case".":case"..":this.dir=e;this.file="";return}var t=e.lastIndexOf("/");var i=e.lastIndexOf("\\");if(t<i){this.dir=HxOverrides.substr(e,0,i);e=HxOverrides.substr(e,i+1,null);this.backslash=true}else if(i<t){this.dir=HxOverrides.substr(e,0,t);e=HxOverrides.substr(e,t+1,null)}else{this.dir=null}var s=e.lastIndexOf(".");if(s!=-1){this.ext=HxOverrides.substr(e,s+1,null);this.file=HxOverrides.substr(e,0,s)}else{this.ext=null;this.file=e}};$hxClasses["haxe.io.Path"]=haxe_io_Path;haxe_io_Path.__name__=["haxe","io","Path"];haxe_io_Path.directory=function(e){var t=new haxe_io_Path(e);if(t.dir==null){return""}return t.dir};haxe_io_Path.prototype={dir:null,file:null,ext:null,backslash:null,__class__:haxe_io_Path};var haxe_xml__$Fast_NodeAccess=function(e){this.__x=e};$hxClasses["haxe.xml._Fast.NodeAccess"]=haxe_xml__$Fast_NodeAccess;haxe_xml__$Fast_NodeAccess.__name__=["haxe","xml","_Fast","NodeAccess"];haxe_xml__$Fast_NodeAccess.prototype={__x:null,resolve:function(e){var t=this.__x.elementsNamed(e).next();if(t==null){var i;if(this.__x.nodeType==Xml.Document){i="Document"}else{var s=this.__x;if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}i=s.nodeName}throw new js__$Boot_HaxeError(i+" is missing element "+e)}return new haxe_xml_Fast(t)},__class__:haxe_xml__$Fast_NodeAccess};var haxe_xml__$Fast_AttribAccess=function(e){this.__x=e};$hxClasses["haxe.xml._Fast.AttribAccess"]=haxe_xml__$Fast_AttribAccess;haxe_xml__$Fast_AttribAccess.__name__=["haxe","xml","_Fast","AttribAccess"];haxe_xml__$Fast_AttribAccess.prototype={__x:null,resolve:function(e){if(this.__x.nodeType==Xml.Document){throw new js__$Boot_HaxeError("Cannot access document attribute "+e)}var t=this.__x.get(e);if(t==null){var i=this.__x;if(i.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+i.nodeType)}throw new js__$Boot_HaxeError(i.nodeName+" is missing attribute "+e)}return t},__class__:haxe_xml__$Fast_AttribAccess};var haxe_xml__$Fast_HasAttribAccess=function(e){this.__x=e};$hxClasses["haxe.xml._Fast.HasAttribAccess"]=haxe_xml__$Fast_HasAttribAccess;haxe_xml__$Fast_HasAttribAccess.__name__=["haxe","xml","_Fast","HasAttribAccess"];haxe_xml__$Fast_HasAttribAccess.prototype={__x:null,resolve:function(e){if(this.__x.nodeType==Xml.Document){throw new js__$Boot_HaxeError("Cannot access document attribute "+e)}return this.__x.exists(e)},__class__:haxe_xml__$Fast_HasAttribAccess};var haxe_xml__$Fast_HasNodeAccess=function(e){this.__x=e};$hxClasses["haxe.xml._Fast.HasNodeAccess"]=haxe_xml__$Fast_HasNodeAccess;haxe_xml__$Fast_HasNodeAccess.__name__=["haxe","xml","_Fast","HasNodeAccess"];haxe_xml__$Fast_HasNodeAccess.prototype={__x:null,resolve:function(e){return this.__x.elementsNamed(e).hasNext()},__class__:haxe_xml__$Fast_HasNodeAccess};var haxe_xml__$Fast_NodeListAccess=function(e){this.__x=e};$hxClasses["haxe.xml._Fast.NodeListAccess"]=haxe_xml__$Fast_NodeListAccess;haxe_xml__$Fast_NodeListAccess.__name__=["haxe","xml","_Fast","NodeListAccess"];haxe_xml__$Fast_NodeListAccess.prototype={__x:null,__class__:haxe_xml__$Fast_NodeListAccess};var haxe_xml_Fast=function(e){if(e.nodeType!=Xml.Document&&e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Invalid nodeType "+e.nodeType)}this.x=e;this.node=new haxe_xml__$Fast_NodeAccess(e);this.nodes=new haxe_xml__$Fast_NodeListAccess(e);this.att=new haxe_xml__$Fast_AttribAccess(e);this.has=new haxe_xml__$Fast_HasAttribAccess(e);this.hasNode=new haxe_xml__$Fast_HasNodeAccess(e)};$hxClasses["haxe.xml.Fast"]=haxe_xml_Fast;haxe_xml_Fast.__name__=["haxe","xml","Fast"];haxe_xml_Fast.prototype={x:null,node:null,nodes:null,att:null,has:null,hasNode:null,get_name:function(){if(this.x.nodeType==Xml.Document){return"Document"}else{var e=this.x;if(e.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+e.nodeType)}return e.nodeName}},get_innerData:function(){var e=this.x;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);if(!t.hasNext()){throw new js__$Boot_HaxeError(this.get_name()+" does not have data")}var i=t.next();if(t.hasNext()){var s=t.next();var a;if(i.nodeType==Xml.PCData&&s.nodeType==Xml.CData){if(i.nodeType==Xml.Document||i.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+i.nodeType)}a=StringTools.trim(i.nodeValue)==""}else{a=false}if(a){if(!t.hasNext()){if(s.nodeType==Xml.Document||s.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+s.nodeType)}return s.nodeValue}var r=t.next();var n;var _;if(r.nodeType==Xml.PCData){if(r.nodeType==Xml.Document||r.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+r.nodeType)}_=StringTools.trim(r.nodeValue)==""}else{_=false}if(_){n=!t.hasNext()}else{n=false}if(n){if(s.nodeType==Xml.Document||s.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+s.nodeType)}return s.nodeValue}}throw new js__$Boot_HaxeError(this.get_name()+" does not only have data")}if(i.nodeType!=Xml.PCData&&i.nodeType!=Xml.CData){throw new js__$Boot_HaxeError(this.get_name()+" does not have data")}if(i.nodeType==Xml.Document||i.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+i.nodeType)}return i.nodeValue},get_innerHTML:function(){var e="";var t=this.x;if(t.nodeType!=Xml.Document&&t.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found "+t.nodeType)}var i=HxOverrides.iter(t.children);while(i.hasNext()){var s=i.next();e+=Std.string(haxe_xml_Printer.print(s))}return e},get_elements:function(){var t=this.x.elements();return{hasNext:$bind(t,t.hasNext),next:function(){var e=t.next();if(e==null){return null}return new haxe_xml_Fast(e)}}},__class__:haxe_xml_Fast,__properties__:{get_elements:"get_elements",get_innerHTML:"get_innerHTML",get_innerData:"get_innerData",get_name:"get_name"}};var haxe_xml_XmlParserException=function(e,t,i){this.xml=t;this.message=e;this.position=i;this.lineNumber=1;this.positionAtLine=0;var s=0;var a=i;while(s<a){var r=s++;var n=t.charCodeAt(r);if(n==10){this.lineNumber++;this.positionAtLine=0}else if(n!=13){this.positionAtLine++}}};$hxClasses["haxe.xml.XmlParserException"]=haxe_xml_XmlParserException;haxe_xml_XmlParserException.__name__=["haxe","xml","XmlParserException"];haxe_xml_XmlParserException.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return Type.getClassName(js_Boot.getClass(this))+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:haxe_xml_XmlParserException};var haxe_xml_Parser=function(){};$hxClasses["haxe.xml.Parser"]=haxe_xml_Parser;haxe_xml_Parser.__name__=["haxe","xml","Parser"];haxe_xml_Parser.parse=function(e,t){if(t==null){t=false}var i=Xml.createDocument();haxe_xml_Parser.doParse(e,t,0,i);return i};haxe_xml_Parser.doParse=function(e,t,i,s){if(i==null){i=0}var a=null;var r=1;var n=1;var _=null;var o=0;var l=0;var h=0;var c=e.charCodeAt(i);var u=new StringBuf;var f=1;var p=-1;while(c==c){switch(r){case 0:switch(c){case 9:case 10:case 13:case 32:break;default:r=n;continue}break;case 1:if(c==60){r=0;n=2}else{o=i;r=13;continue}break;case 2:switch(c){case 33:if(e.charCodeAt(i+1)==91){i+=2;if(HxOverrides.substr(e,i,6).toUpperCase()!="CDATA["){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <![CDATA[",e,i))}i+=5;r=17;o=i+1}else if(e.charCodeAt(i+1)==68||e.charCodeAt(i+1)==100){if(HxOverrides.substr(e,i+2,6).toUpperCase()!="OCTYPE"){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <!DOCTYPE",e,i))}i+=8;r=16;o=i+1}else if(e.charCodeAt(i+1)!=45||e.charCodeAt(i+2)!=45){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected \x3c!--",e,i))}else{i+=2;r=15;o=i+1}break;case 47:if(s==null){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,i))}o=i+1;r=0;n=10;break;case 63:r=14;o=i;break;default:r=3;o=i;continue}break;case 3:if(!(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c==58||c==46||c==95||c==45)){if(i==o){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,i))}a=Xml.createElement(HxOverrides.substr(e,o,i-o));s.addChild(a);++l;r=0;n=4;continue}break;case 4:switch(c){case 47:r=11;break;case 62:r=9;break;default:r=5;o=i;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==i){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected attribute name",e,i))}d=HxOverrides.substr(e,o,i-o);_=d;if(a.exists(_)){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Duplicate attribute ["+_+"]",e,i))}r=0;n=6;continue}break;case 6:if(c==61){r=0;n=7}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected =",e,i))}break;case 7:switch(c){case 34:case 39:u=new StringBuf;r=8;o=i+1;p=c;break;default:throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException('Expected "',e,i))}break;case 8:switch(c){case 38:var g=i-o;u.b+=g==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,g);r=18;f=8;o=i+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,i))}else if(c==p){var m=i-o;u.b+=m==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,m);var v=u.b;u=new StringBuf;a.set(_,v);r=0;n=4}break;default:if(c==p){var b=i-o;u.b+=b==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,b);var y=u.b;u=new StringBuf;a.set(_,y);r=0;n=4}}break;case 9:i=haxe_xml_Parser.doParse(e,t,i,a);o=i;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==i){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",e,i))}var x=HxOverrides.substr(e,o,i-o);if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}if(x!=s.nodeName){if(s.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+s.nodeType)}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected </"+s.nodeName+">",e,i))}r=0;n=12;continue}break;case 11:if(c==62){r=1}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,i))}break;case 12:if(c==62){if(l==0){s.addChild(Xml.createPCData(""))}return i}else{throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",e,i))}break;case 13:if(c==60){var w=i-o;u.b+=w==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,w);var k=Xml.createPCData(u.b);u=new StringBuf;s.addChild(k);++l;r=0;n=2}else if(c==38){var P=i-o;u.b+=P==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,P);r=18;f=13;o=i+1}break;case 14:if(c==63&&e.charCodeAt(i+1)==62){++i;var C=HxOverrides.substr(e,o+1,i-o-2);s.addChild(Xml.createProcessingInstruction(C));++l;r=1}break;case 15:if(c==45&&e.charCodeAt(i+1)==45&&e.charCodeAt(i+2)==62){s.addChild(Xml.createComment(HxOverrides.substr(e,o,i-o)));++l;i+=2;r=1}break;case 16:if(c==91){++h}else if(c==93){--h}else if(c==62&&h==0){s.addChild(Xml.createDocType(HxOverrides.substr(e,o,i-o)));++l;r=1}break;case 17:if(c==93&&e.charCodeAt(i+1)==93&&e.charCodeAt(i+2)==62){var T=Xml.createCData(HxOverrides.substr(e,o,i-o));s.addChild(T);++l;i+=2;r=1}break;case 18:if(c==59){var M=HxOverrides.substr(e,o,i-o);if(M.charCodeAt(0)==35){var S=M.charCodeAt(1)==120?Std.parseInt("0"+HxOverrides.substr(M,1,M.length-1)):Std.parseInt(HxOverrides.substr(M,1,M.length-1));u.b+=String.fromCharCode(S)}else{var $=haxe_xml_Parser.escapes;if(!(__map_reserved[M]!=null?$.existsReserved(M):$.h.hasOwnProperty(M))){if(t){throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: "+M,e,i))}u.b+=Std.string("&"+M+";")}else{var E=haxe_xml_Parser.escapes;var B=__map_reserved[M]!=null?E.getReserved(M):E.h[M];u.b+=Std.string(B)}}o=i+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,i))}u.b+="&";var L=i-o;u.b+=L==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,L);o=i--;r=f}break}c=e.charCodeAt(++i)}if(r==1){o=i;r=13}if(r==13){if(i!=o||l==0){var R=i-o;u.b+=R==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,R);s.addChild(Xml.createPCData(u.b));++l}return i}if(!t&&r==18&&f==13){u.b+="&";var A=i-o;u.b+=A==null?HxOverrides.substr(e,o,null):HxOverrides.substr(e,o,A);s.addChild(Xml.createPCData(u.b));++l;return i}throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Unexpected end",e,i))};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 i=new haxe_xml_Printer(t);i.writeNode(e,"");return i.output.b};haxe_xml_Printer.prototype={output:null,pretty:null,writeNode:function(e,t){var i=e.nodeType;switch(i){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 s=e.attributes();while(s.hasNext()){var a=s.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 n=HxOverrides.iter(e.children);while(n.hasNext()){var _=n.next();this.writeNode(_,this.pretty?t+"\t":t)}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);this.output.b+=">";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+"<![CDATA[");if(e.nodeType==Xml.Document||e.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+e.nodeType)}var h=StringTools.trim(e.nodeValue);this.output.b+=Std.string(h);this.output.b+="]]>";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("<!DOCTYPE "+e.nodeValue+">");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("<?"+e.nodeValue+"?>");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 i=t.next();var s=i.nodeType;switch(s){case 0:case 1:return true;case 2:case 3:if(i.nodeType==Xml.Document||i.nodeType==Xml.Element){throw new js__$Boot_HaxeError("Bad node type, unexpected "+i.nodeType)}if(StringTools.ltrim(i.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 i=["FUnknown",0,e,t];i.__enum__=haxe_zip_ExtraField;i.toString=$estr;return i};haxe_zip_ExtraField.FInfoZipUnicodePath=function(e,t){var i=["FInfoZipUnicodePath",1,e,t];i.__enum__=haxe_zip_ExtraField;i.toString=$estr;return i};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 i=["NeedBit",1,e,t];i.__enum__=haxe_zip_Huffman;i.toString=$estr;return i};haxe_zip_Huffman.NeedBits=function(e,t){var i=["NeedBits",2,e,t];i.__enum__=haxe_zip_Huffman;i.toString=$estr;return i};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 i=e[2];var s=this.treeDepth(i);var a=this.treeDepth(t);return 1+(s<a?s:a);case 2:throw new js__$Boot_HaxeError("assert");break}},treeCompress:function(e){var t=this.treeDepth(e);if(t==0){return e}if(t==1){if(e[1]==1){var i=e[3];var s=e[2];return haxe_zip_Huffman.NeedBit(this.treeCompress(s),this.treeCompress(i))}else{throw new js__$Boot_HaxeError("assert")}}var a=1<<t;var r=[];var n=0;var _=a;while(n<_){var o=n++;r.push(haxe_zip_Huffman.Found(-1))}this.treeWalk(r,0,0,t,e);return haxe_zip_Huffman.NeedBits(t,r)},treeWalk:function(e,t,i,s,a){if(a[1]==1){var r=a[3];var n=a[2];if(s>0){this.treeWalk(e,t,i+1,s-1,n);this.treeWalk(e,t|1<<i,i+1,s-1,r)}else{e[t]=this.treeCompress(a)}}else{e[t]=this.treeCompress(a)}},treeMake:function(e,t,i,s){if(s>t){throw new js__$Boot_HaxeError("Invalid huffman")}var a=i<<5|s;if(e.h.hasOwnProperty(a)){return haxe_zip_Huffman.Found(e.h[a])}i<<=1;++s;return haxe_zip_Huffman.NeedBit(this.treeMake(e,t,i,s),this.treeMake(e,t,i|1,s))},make:function(e,t,i,s){var a=[];var r=[];if(s>32){throw new js__$Boot_HaxeError("Invalid huffman")}var n=0;var _=s;while(n<_){var o=n++;a.push(0);r.push(0)}var l=0;var h=i;while(l<h){var c=l++;var u=e[c+t];if(u>=s){throw new js__$Boot_HaxeError("Invalid huffman")}a[u]++}var f=0;var p=1;var d=s-1;while(p<d){var g=p++;f=f+a[g]<<1;r[g]=f}var m=new haxe_ds_IntMap;var v=0;var b=i;while(v<b){var y=v++;var x=e[y+t];if(x!=0){var w=r[x-1];r[x-1]=w+1;m.h[w<<5|x]=y}}return this.treeCompress(haxe_zip_Huffman.NeedBit(this.treeMake(m,s,0,1),this.treeMake(m,s,1,1)))},__class__:haxe_zip_HuffTools};var haxe_zip__$InflateImpl_Window=function(e){this.buffer=new haxe_io_Bytes(new ArrayBuffer(65536));this.pos=0;if(e){this.crc=new haxe_crypto_Adler32}};$hxClasses["haxe.zip._InflateImpl.Window"]=haxe_zip__$InflateImpl_Window;haxe_zip__$InflateImpl_Window.__name__=["haxe","zip","_InflateImpl","Window"];haxe_zip__$InflateImpl_Window.prototype={buffer:null,pos:null,crc:null,slide:function(){if(this.crc!=null){this.crc.update(this.buffer,0,32768)}var e=new haxe_io_Bytes(new ArrayBuffer(65536));this.pos-=32768;e.blit(0,this.buffer,32768,this.pos);this.buffer=e},addBytes:function(e,t,i){if(this.pos+i>65536){this.slide()}this.buffer.blit(this.pos,e,t,i);this.pos+=i},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,i){if(i==null){i=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 s=0;while(s<19){var a=s++;this.lengths.push(-1)}this.window=new haxe_zip__$InflateImpl_Window(i)};$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 i=t++;e.push(i<=143?8:i<=255?9:i<=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,i){this.needed=i;this.outpos=t;this.output=e;if(i>0){while(this.inflateLoop()){}}return i-this.needed},getBits:function(e){while(this.nbits<e){this.bits|=this.input.readByte()<<this.nbits;this.nbits+=8}var t=this.bits&(1<<e)-1;this.nbits-=e;this.bits>>=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<<e-1|this.getRevBits(e-1)}else{return this.getRevBits(e-1)}},resetBits:function(){this.bits=0;this.nbits=0},addBytes:function(e,t,i){this.window.addBytes(e,t,i);this.output.blit(this.outpos,e,t,i);this.needed-=i;this.outpos+=i},addByte:function(e){this.window.addByte(e);this.output.b[this.outpos]=e&255;this.needed--;this.outpos++},addDistOne:function(e){var t=this.window.getLastChar();var i=0;var s=e;while(i<s){var a=i++;this.addByte(t)}},addDist:function(e,t){this.addBytes(this.window.buffer,this.window.pos-e,t)},applyHuffman:function(e){switch(e[1]){case 0:var t=e[2];return t;case 1:var i=e[3];var s=e[2];return this.applyHuffman(this.getBit()?i:s);case 2:var a=e[3];var r=e[2];return this.applyHuffman(a[this.getBits(r)])}},inflateLengths:function(e,t){var i=0;var s=0;while(i<t){var a=this.applyHuffman(this.huffman);switch(a){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:s=a;e[i]=a;++i;break;case 16:var r=i+3+this.getBits(2);if(r>t){throw new js__$Boot_HaxeError("Invalid data")}while(i<r){e[i]=s;++i}break;case 17:i+=3+this.getBits(3);if(i>t){throw new js__$Boot_HaxeError("Invalid data")}break;case 18:i+=11+this.getBits(7);if(i>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 i=t&15;var s=t>>4;if(i!=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 n=this.getBits(2);switch(n){case 0:this.len=this.input.readUInt16();var _=this.input.readUInt16();if(_!=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(u<f){var p=u++;this.lengths[haxe_zip_InflateImpl.CODE_LENGTHS_POS[p]]=this.getBits(3)}var d=c;while(d<19){var g=d++;this.lengths[haxe_zip_InflateImpl.CODE_LENGTHS_POS[g]]=0}this.huffman=this.htools.make(this.lengths,0,19,8);var m=[];var v=0;var b=l+h;while(v<b){var y=v++;m.push(0)}this.inflateLengths(m,l+h);this.huffdist=this.htools.make(m,l,h,16);this.huffman=this.htools.make(m,0,l,16);this.state=haxe_zip__$InflateImpl_State.CData;return true;default:throw new js__$Boot_HaxeError("Invalid data")}break;case 2:var x=this.applyHuffman(this.huffman);if(x<256){this.addByte(x);return this.needed>0}else if(x==256){this.state=this["final"]?haxe_zip__$InflateImpl_State.Crc:haxe_zip__$InflateImpl_State.Block;return true}else{x-=257;var w=haxe_zip_InflateImpl.LEN_EXTRA_BITS_TBL[x];if(w==-1){throw new js__$Boot_HaxeError("Invalid data")}this.len=haxe_zip_InflateImpl.LEN_BASE_VAL_TBL[x]+this.getBits(w);var k=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);w=haxe_zip_InflateImpl.DIST_EXTRA_BITS_TBL[k];if(w==-1){throw new js__$Boot_HaxeError("Invalid data")}this.dist=haxe_zip_InflateImpl.DIST_BASE_VAL_TBL[k]+this.getBits(w);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 P=this.len<this.needed?this.len:this.needed;var C=this.input.read(P);this.len-=P;this.addBytes(C,0,P);if(this.len==0){this.state=this["final"]?haxe_zip__$InflateImpl_State.Crc:haxe_zip__$InflateImpl_State.Block}return this.needed>0;case 4:var T=this.window.checksum();if(T==null){this.state=haxe_zip__$InflateImpl_State.Done;return true}var M=haxe_crypto_Adler32.read(this.input);if(!T.equals(M)){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 S=this.len<this.dist?this.len:this.dist;var $=this.needed<S?this.needed:S;this.addDist(this.dist,$);this.len-=$}if(this.len==0){this.state=haxe_zip__$InflateImpl_State.CData}return this.needed>0;case 6:var E=this.len<this.needed?this.len:this.needed;this.addDistOne(E);this.len-=E;if(this.len==0){this.state=haxe_zip__$InflateImpl_State.CData}return this.needed>0;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 i=e>>5&63;var s=e&31;var a=this.i.readUInt16();var r=a>>9;var n=a>>5&15;var _=a&31;return new Date(r+1980,n-1,_,t,i,s<<1)},readExtraFields:function(e){var t=new List;while(e>0){if(e<4){throw new js__$Boot_HaxeError("Invalid extra fields data")}var i=this.i.readUInt16();var s=this.i.readUInt16();if(e<s){throw new js__$Boot_HaxeError("Invalid extra fields data")}if(i==28789){var a=this.i.readByte();if(a!=1){var r=new haxe_io_BytesBuffer;r.b.push(a);var n=this.i.read(s-1);var _=r.b;var o=n.b;var l=0;var h=n.length;while(l<h){var c=l++;r.b.push(o[c])}t.add(haxe_zip_ExtraField.FUnknown(i,r.getBytes()))}else{var u=this.i.readInt32();var f=this.i.read(s-5).toString();t.add(haxe_zip_ExtraField.FInfoZipUnicodePath(f,u))}}else{t.add(haxe_zip_ExtraField.FUnknown(i,this.i.read(s)))}e-=4+s}return t},readEntryHeader:function(){var e=this.i;var t=e.readInt32();if(t==33639248||t==101010256){return null}if(t!=67324752){throw new js__$Boot_HaxeError("Invalid Zip Data")}var i=e.readUInt16();var s=e.readUInt16();var a=(s&2048)!=0;if((s&63473)!=0){throw new js__$Boot_HaxeError("Unsupported flags "+s)}var r=e.readUInt16();var n=r!=0;if(n&&r!=8){throw new js__$Boot_HaxeError("Unsupported compression "+r)}var _=this.readZipDate();var o=e.readInt32();var l=e.readInt32();var h=e.readInt32();var c=e.readInt16();var u=e.readInt16();var f=e.readString(c);var p=this.readExtraFields(u);if(a){p.push(haxe_zip_ExtraField.FUtf8)}var d=null;if((s&8)!=0){o=null}return{fileName:f,fileSize:h,fileTime:_,compressed:n,dataSize:l,data:d,crc32:o,extraFields:p}},read:function(){var e=new List;var t=null;var i=null;while(true){var s=this.readEntryHeader();if(s==null){break}if(s.crc32==null){if(s.compressed){var a=65536;if(i==null){i=new haxe_io_Bytes(new ArrayBuffer(a))}var r=new haxe_io_BytesBuffer;var n=new haxe_zip_InflateImpl(this.i,false,false);while(true){var _=n.readBytes(i,0,a);if(_<0||_>i.length){throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds)}var o=r.b;var l=i.b;var h=0;var c=_;while(h<c){var u=h++;r.b.push(l[u])}if(_<a){break}}s.data=r.getBytes()}else{s.data=this.i.read(s.dataSize)}s.crc32=this.i.readInt32();if(s.crc32==134695760){s.crc32=this.i.readInt32()}s.dataSize=this.i.readInt32();s.fileSize=this.i.readInt32();s.dataSize=s.fileSize;s.compressed=false}else{s.data=this.i.read(s.dataSize)}e.add(s)}return e},__class__:haxe_zip_Reader};var hu_vpmedia_crypt_ARC4=function(e){this.i=0;this.j=0;var t=new openfl_utils_ByteArrayData(0);this.S=t;if(e!=null){this.init(e)}};$hxClasses["hu.vpmedia.crypt.ARC4"]=hu_vpmedia_crypt_ARC4;hu_vpmedia_crypt_ARC4.__name__=["hu","vpmedia","crypt","ARC4"];hu_vpmedia_crypt_ARC4.prototype={i:null,j:null,S:null,init:function(e){var t;var i;var s;this.S.position=0;var a=0;while(a<256){var r=a++;this.S.writeByte(r)}i=0;var n=0;while(n<256){var _=n++;this.S.position=_;var o=this.S.readUnsignedByte();var l=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);e.position=_$UInt_UInt_$Impl_$.toFloat(_)%_$UInt_UInt_$Impl_$.toFloat(l)|0;var h=e.readUnsignedByte();i=i+o+h&255;this.S.position=_;s=this.S.readUnsignedByte();this.S.position=i;var c=this.S.readUnsignedByte();this.S.position=_;this.S.writeByte(c);this.S.position=i;this.S.writeByte(s)}this.i=0;this.j=0},next:function(){var e;this.i=this.i+1&255;this.S.position=this.i;var t=this.S.readUnsignedByte();this.j=this.j+t&255;this.S.position=this.i;e=this.S.readUnsignedByte();this.S.position=this.j;var i=this.S.readUnsignedByte();this.S.position=this.i;this.S.writeByte(i);this.S.position=this.j;this.S.writeByte(e);this.S.position=this.i;t=this.S.readUnsignedByte();this.S.position=e+t&255;var s=this.S.readUnsignedByte();return s},encrypt:function(e){var t=0;var i=_$UInt_UInt_$Impl_$.toFloat(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e))|0;while(t<i){e.position=t;var s=e.readUnsignedByte();var a=this.next();e.position=t;e.writeByte(s^a);++t}},decrypt:function(e){this.encrypt(e)},__class__:hu_vpmedia_crypt_ARC4};var hu_vpmedia_crypt_Hex=function(){};$hxClasses["hu.vpmedia.crypt.Hex"]=hu_vpmedia_crypt_Hex;hu_vpmedia_crypt_Hex.__name__=["hu","vpmedia","crypt","Hex"];hu_vpmedia_crypt_Hex.toArray=function(e){var t=new RegExp("\\s|:","gm".split("u").join(""));e=e.replace(t,"");var i=new openfl_utils_ByteArrayData(0);var s=i;if((e.length&1)==1){e="0"+e}s.position=0;var a=0;while(a<e.length){var r=Std.parseInt("0x"+HxOverrides.substr(e,a,2));s.writeByte(r);a+=2}return s};hu_vpmedia_crypt_Hex.fromArray=function(e,t){if(t==null){t=false}var i="";var s=0;var a=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);while(s<a){var r=s++;i+=HxOverrides.substr("0"+StringTools.hex(e.b[r]),-2,2);if(t){if(r<(_$UInt_UInt_$Impl_$.toFloat(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)-1)|0)){i+=":"}}}return i};hu_vpmedia_crypt_Hex.fromString=function(e,t){if(t==null){t=false}var i=new openfl_utils_ByteArrayData(0);var s=i;s.writeUTFBytes(e);return hu_vpmedia_crypt_Hex.fromArray(s,t)};var hu_vpmedia_crypt_RC4ByteArray=function(){};$hxClasses["hu.vpmedia.crypt.RC4ByteArray"]=hu_vpmedia_crypt_RC4ByteArray;hu_vpmedia_crypt_RC4ByteArray.__name__=["hu","vpmedia","crypt","RC4ByteArray"];hu_vpmedia_crypt_RC4ByteArray.decryptToByteArray=function(e,t){var i=hu_vpmedia_crypt_Hex.toArray(hu_vpmedia_crypt_Hex.fromString(e));var s=t;var a=new hu_vpmedia_crypt_ARC4(i);a.init(i);a.decrypt(s);return s};var openfl_display_MovieClip=function(){openfl_display_Sprite.call(this);this.__currentFrame=1;this.__currentLabels=[];this.__instanceFields=[];this.__totalFrames=0;this.__enabled=true;if(openfl_display_MovieClip.__initSymbol!=null){this.__swf=openfl_display_MovieClip.__initSWF;this.__symbol=openfl_display_MovieClip.__initSymbol;openfl_display_MovieClip.__initSWF=null;openfl_display_MovieClip.__initSymbol=null;this.__fromSymbol(this.__swf,this.__symbol)}};$hxClasses["openfl.display.MovieClip"]=openfl_display_MovieClip;openfl_display_MovieClip.__name__=["openfl","display","MovieClip"];openfl_display_MovieClip.__super__=openfl_display_Sprite;openfl_display_MovieClip.prototype=$extend(openfl_display_Sprite.prototype,{__activeInstances:null,__activeInstancesByFrameObjectID:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__enabled:null,__frameScripts:null,__frameTime:null,__hasDown:null,__hasOver:null,__hasUp:null,__instanceFields:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__mouseIsDown:null,__playing:null,__swf:null,__symbol:null,__timeElapsed:null,__totalFrames:null,gotoAndPlay:function(e,t){this.play();this.__goto(this.__resolveFrameReference(e))},gotoAndStop:function(e,t){this.stop();this.__goto(this.__resolveFrameReference(e))},play:function(){if(this.__symbol==null||this.__playing||this.__totalFrames<2){return}this.__playing=true;this.__frameTime=1e3/this.__swf.frameRate|0;this.__timeElapsed=0},stop:function(){this.__playing=false},__enterFrame:function(e){this.__updateFrameScript(e);this.__updateSymbol(this.__currentFrame);openfl_display_Sprite.prototype.__enterFrame.call(this,e)},__updateFrameScript:function(e){if(this.__symbol!=null&&this.__playing){var t=this.__getNextFrame(e);if(this.__lastFrameScriptEval==t){openfl_display_Sprite.prototype.__enterFrame.call(this,e);return}if(this.__frameScripts!=null){if(t<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames)){openfl_display_Sprite.prototype.__enterFrame.call(this,e);return}this.__currentFrame=1}if(!this.__evaluateFrameScripts(t)){openfl_display_Sprite.prototype.__enterFrame.call(this,e);return}}else{this.__currentFrame=t}}},__updateSymbol:function(e){if(this.__symbol!=null&&this.__currentFrame!=this.__lastFrameUpdate){this.__updateFrameLabel();var t=new haxe_ds_IntMap;var i;var s;var a;var r=0;var n=e;while(r<n){var _=r++;i=_+1;s=this.__symbol.frames[_];if(s.objects==null){continue}var o=0;var l=s.objects;while(o<l.length){var h=l[o];++o;var c=h.type;switch(c[1]){case 0:a=this.__activeInstancesByFrameObjectID.get(h.id);if(a!=null){t.h[h.id]=a;this.__updateDisplayObject(a.displayObject,h,true)}break;case 1:a=t.h[h.id];if(a!=null&&a.displayObject!=null){this.__updateDisplayObject(a.displayObject,h)}break;case 2:t.remove(h.id);break}}}var u=[];var f=[];var p=t.iterator();while(p.hasNext()){var d=p.next();if(u.indexOf(d)==-1){u.push(d);if(d.clipDepth>0){f.push(d)}}}u.sort($bind(this,this.__sortDepths));var g;var m;var v;var b;var y;var x=0;var w=u.length;while(x<w){var k=x++;g=this.__children[k];a=u[k];m=a.depth;v=a.displayObject;if(g!=v){b=v;this.addChildAt(v,k)}else{b=this.__children[k]}y=false;var P=0;while(P<f.length){var C=f[P];++P;if(m>C.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 M=u.length;var S=this.__children.length;while(M<S){T=this.__children[M];var $=0;var E=this.__activeInstances;while($<E.length){var B=E[$];++$;if(B.displayObject==T){if(js_Boot.__instanceof(T,openfl_display_MovieClip)){var L=T;L.gotoAndPlay(1)}this.removeChild(T);--M;--S}}++M}this.__lastFrameUpdate=this.__currentFrame;this.__updateInstanceFields()}},__evaluateFrameScripts:function(e){var t=this.__currentFrame;var i=e+1;while(t<i){var s=t++;if(s==this.__lastFrameScriptEval){continue}this.__lastFrameScriptEval=s;this.__currentFrame=s;if(this.__frameScripts.h.hasOwnProperty(s)){this.__updateSymbol(s);var a=this.__frameScripts.h[s];a();if(this.__currentFrame!=s){return false}}if(!this.__playing){return false}}return true},__fromSymbol:function(swf,symbol){var _gthis=this;if(this.__activeInstances!=null){return}this.__swf=swf;this.__symbol=symbol;this.__activeInstances=[];this.__activeInstancesByFrameObjectID=new haxe_ds_IntMap;this.__currentFrame=1;this.__lastFrameScriptEval=-1;this.__lastFrameUpdate=-1;this.__totalFrames=this.__symbol.frames.length;var frame;var frameData;var _g1=0;var _g=this.__symbol.frames.length;while(_g1<_g){var i=_g1++;frame=i+1;frameData=this.__symbol.frames[i];if(frameData.label!=null){this.__currentLabels.push(new openfl_display_FrameLabel(frameData.label,i+1))}if(frameData.script!=null){if(this.__frameScripts==null){this.__frameScripts=new haxe_ds_IntMap}this.__frameScripts.h[frame]=frameData.script}else if(frameData.scriptSource!=null){if(this.__frameScripts==null){this.__frameScripts=new haxe_ds_IntMap}try{var script=[eval("(function(){"+frameData.scriptSource+"})")];var wrapper=function(t){return function(){try{t[0].call(_gthis)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;lime_utils_Log.info("Error evaluating frame script\n "+Std.string(e)+"\n"+haxe_CallStack.exceptionStack().map(function(){return function(e){return e[2]}}()).join("\n")+"\n"+Std.string(e.stack)+"\n"+t[0].toString(),{fileName:"MovieClip.hx",lineNumber:651,className:"openfl.display.MovieClip",methodName:"__fromSymbol"})}}}(script);this.__frameScripts.h[frame]=wrapper}catch(e){haxe_CallStack.lastException=e;if(this.__symbol.className!=null){lime_utils_Log.warn('Unable to evaluate frame script source for symbol "'+this.__symbol.className+'" frame '+frame+"\n"+frameData.scriptSource,{fileName:"MovieClip.hx",lineNumber:672,className:"openfl.display.MovieClip",methodName:"__fromSymbol"})}else{lime_utils_Log.warn("Unable to evaluate frame script source:\n"+frameData.scriptSource,{fileName:"MovieClip.hx",lineNumber:677,className:"openfl.display.MovieClip",methodName:"__fromSymbol"})}}}}var frame1;var frameData1;var instance;var duplicate;var symbol1;var displayObject;var _g11=0;var _g2=this.__totalFrames;while(_g11<_g2){var i1=_g11++;frame1=i1+1;frameData1=this.__symbol.frames[i1];if(frameData1.objects==null){continue}var _g21=0;var _g3=frameData1.objects;while(_g21<_g3.length){var frameObject=_g3[_g21];++_g21;if(frameObject.type==openfl__$internal_symbols_timeline_FrameObjectType.CREATE){if(this.__activeInstancesByFrameObjectID.h.hasOwnProperty(frameObject.id)){continue}else{instance=null;duplicate=false;var _g4=0;var _g5=this.__activeInstances;while(_g4<_g5.length){var activeInstance=_g5[_g4];++_g4;if(activeInstance.displayObject!=null&&activeInstance.characterID==frameObject.symbol&&activeInstance.depth==frameObject.depth){instance=activeInstance;duplicate=true;break}}}if(instance==null){symbol1=this.__swf.symbols.h[frameObject.symbol];if(symbol1!=null){displayObject=symbol1.__createObject(this.__swf);if(displayObject!=null){displayObject.parent=this;displayObject.stage=this.stage;if(this.stage!=null){displayObject.dispatchEvent(new openfl_events_Event("addedToStage",false,false))}instance=new openfl_display__$MovieClip_FrameSymbolInstance(frame1,frameObject.id,frameObject.symbol,frameObject.depth,displayObject,frameObject.clipDepth)}}}if(instance!=null){this.__activeInstancesByFrameObjectID.h[frameObject.id]=instance;if(!duplicate){this.__activeInstances.push(instance);this.__updateDisplayObject(instance.displayObject,frameObject)}}}}}if(this.__totalFrames>1){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 i=0;var s=this.__currentLabels;while(i<s.length){var a=s[i];++i;if(a.get_name()==t){return a.get_frame()}}throw new js__$Boot_HaxeError(new openfl_errors_ArgumentError("Error #2109: Frame label "+t+" not found in scene."))}else{throw new js__$Boot_HaxeError("Invalid type for frame "+Type.getClassName(e))}},__sortDepths:function(e,t){return e.depth-t.depth},__tabTest:function(e){if(!this.__enabled){return}openfl_display_Sprite.prototype.__tabTest.call(this,e)},__updateDisplayObject:function(e,t,i){if(i==null){i=false}if(e==null){return}if(t.name!=null){e.set_name(t.name)}if(t.matrix!=null){e.get_transform().set_matrix(t.matrix)}if(t.colorTransform!=null){e.get_transform().set_colorTransform(t.colorTransform)}else if(i&&!e.get_transform().get_colorTransform().__isDefault(true)){e.get_transform().set_colorTransform(new openfl_geom_ColorTransform)}if(t.filters!=null){var s=[];var a=0;var r=t.filters;while(a<r.length){var n=r[a];++a;switch(n[1]){case 0:var _=n[4];var o=n[3];var l=n[2];s.push(new openfl_filters_BlurFilter(l,o,_));break;case 1:var h=n[2];s.push(new openfl_filters_ColorMatrixFilter(h));break;case 2:var c=n[12];var u=n[11];var f=n[10];var p=n[9];var d=n[8];var g=n[7];var m=n[6];var v=n[5];var b=n[4];var y=n[3];var x=n[2];s.push(new openfl_filters_DropShadowFilter(x,y,b,v,m,g,d,p,f,u,c));break;case 3:var w=n[9];var k=n[8];var P=n[7];var C=n[6];var T=n[5];var M=n[4];var S=n[3];var $=n[2];s.push(new openfl_filters_GlowFilter($,S,M,T,C,P,k,w));break}}e.set_filters(s)}else{e.set_filters(null)}if(t.visible!=null){e.set_visible(t.visible)}if(t.blendMode!=null){e.set_blendMode(t.blendMode)}if(t.cacheAsBitmap!=null){e.set_cacheAsBitmap(t.cacheAsBitmap)}},__updateFrameLabel:function(){this.__currentFrameLabel=this.__symbol.frames[this.__currentFrame-1].label;if(this.__currentFrameLabel!=null){this.__currentLabel=this.__currentFrameLabel}else{this.__currentLabel=null;var e=0;var t=this.__currentLabels;while(e<t.length){var i=t[e];++e;if(i.get_frame()<this.__currentFrame){this.__currentLabel=i.get_name()}else{break}}}},__updateInstanceFields:function(){var e=0;var t=this.__instanceFields;while(e<t.length){var i=t[e];++e;var s=0;var a=this.__children;while(s<a.length){var r=a[s];++s;if(r.get_name()==i){this[i]=r;break}}}},__onMouseDown:function(e){if(this.__enabled&&this.__hasDown){this.gotoAndStop("_down")}this.__mouseIsDown=true;this.stage.addEventListener("mouseUp",$bind(this,this.__onMouseUp),true)},__onMouseUp:function(e){this.__mouseIsDown=false;if(this.stage!=null){this.stage.removeEventListener("mouseUp",$bind(this,this.__onMouseUp))}if(e.target==this&&this.__enabled&&this.__hasOver){this.gotoAndStop("_over")}else if(this.__enabled&&this.__hasUp){this.gotoAndStop("_up")}},__onRollOut:function(e){if(!this.__enabled){return}if(this.__mouseIsDown&&this.__hasOver){this.gotoAndStop("_over")}else if(this.__hasUp){this.gotoAndStop("_up")}},__onRollOver:function(e){if(this.__enabled&&this.__hasOver){this.gotoAndStop("_over")}},set_buttonMode:function(e){if(this.__buttonMode!=e){if(e){this.__hasDown=false;this.__hasOver=false;this.__hasUp=false;var t=0;var i=this.__currentLabels;while(t<i.length){var s=i[t];++t;var a=s.get_name();switch(a){case"_down":this.__hasDown=true;break;case"_over":this.__hasOver=true;break;case"_up":this.__hasUp=true;break;default:}}if(this.__hasDown||this.__hasOver||this.__hasUp){this.addEventListener("rollOver",$bind(this,this.__onRollOver));this.addEventListener("rollOut",$bind(this,this.__onRollOut));this.addEventListener("mouseDown",$bind(this,this.__onMouseDown))}}else{this.removeEventListener("rollOver",$bind(this,this.__onRollOver));this.removeEventListener("rollOut",$bind(this,this.__onRollOut));this.removeEventListener("mouseDown",$bind(this,this.__onMouseDown))}this.__buttonMode=e}return e},__class__:openfl_display_MovieClip});var jaris_TMovieClipEx=function(e,t){openfl_display_MovieClip.call(this);this._realWidth=e;this._realHeight=t};$hxClasses["jaris.TMovieClipEx"]=jaris_TMovieClipEx;jaris_TMovieClipEx.__name__=["jaris","TMovieClipEx"];jaris_TMovieClipEx.__super__=openfl_display_MovieClip;jaris_TMovieClipEx.prototype=$extend(openfl_display_MovieClip.prototype,{_realWidth:null,_realHeight:null,resize:function(e,t){this._realWidth=e;this._realHeight=t},get_realWidth:function(){return this._realWidth},get_realHeight:function(){return this._realHeight},__class__:jaris_TMovieClipEx,__properties__:$extend(openfl_display_MovieClip.prototype.__properties__,{get_realHeight:"get_realHeight",get_realWidth:"get_realWidth"})});var jaris_TPlayer=function(e,t,i){this._parameters={};jaris_TMovieClipEx.call(this,t,i);this.init_parameters();var s=0;var a=Reflect.fields(e);while(s<a.length){var r=a[s];++s;this._parameters[r]=Reflect.field(e,r)}var n=e.streamtype!=""&&e.streamtype!=null?e.streamtype:jaris_player_StreamType.FILE;var _=new jaris_player_Player(this);this._player=_;_.setStreamType(n);this._player.setSource(this._parameters.url);if(e.poster!=null){var o=e.poster;var l=new jaris_display_Poster(o,this);l.setPlayer(_);this.addChild(l)}if(e.logo!=null){var h=e.logo!=null?e.logo:"logo.png";var c=e.logoposition!=null?e.logoposition:"top left";var u=e.logoalpha!=null?parseFloat(e.logoalpha)/100:.3;var f=e.logowidth!=null?parseFloat(e.logowidth):130;var p=e.logolink!=null?e.logolink:"http://www.1stflip.com";var d=new jaris_display_Logo(h,c,u,f);d.setLink(p);this.addChild(d)}if(e.controls!="false"){var g=e.duration!=""&&e.duration!=null?e.duration:"0";var m=e.controltype!=""&&e.controltype!=null?Std.parseInt(e.controltype):0;var v=e.controlsize!=""&&e.controlsize!=null?Std.parseInt(e.controlsize):0;var b=["","","","",""];b[0]=e.darkcolor!=null?e.darkcolor:"";b[1]=e.brightcolor!=null?e.brightcolor:"";b[2]=e.controlcolor!=null?e.controlcolor:"";b[3]=e.hovercolor!=null?e.hovercolor:"";b[4]=e.seekcolor!=null?e.seekcolor:"";var y=new jaris_player_newcontrols_NewControls(_);y.setDurationLabel(g);y.setControlColors(b);y.setControlSize(v);this.addChild(y)}if(e.loop!=null&&e.loop=="true"){var x=new jaris_player_Loop(_)}this.render();this.dispatchEvent(new openfl_events_Event("resize"))};$hxClasses["jaris.TPlayer"]=jaris_TPlayer;jaris_TPlayer.__name__=["jaris","TPlayer"];jaris_TPlayer.__super__=jaris_TMovieClipEx;jaris_TPlayer.prototype=$extend(jaris_TMovieClipEx.prototype,{_parameters:null,_player:null,init_parameters:function(){this._parameters.streamtype="file";this._parameters.url="";this._parameters.darkcolor="0x000000";this._parameters.brightcolor="0x4c4c4c";this._parameters.controlColor="0xFFFFFF";this._parameters.hovercolor="0x67A8C1";this._parameters.seekcolor="0x7c7c7c";this._parameters.autostart="false";this._parameters.poster=""},get_parameters:function(){return this._parameters},resize:function(e,t){jaris_TMovieClipEx.prototype.resize.call(this,e,t);this.render();this.dispatchEvent(new openfl_events_Event("resize"))},render:function(){this.get_graphics().clear();this.get_graphics().lineStyle(null);this.get_graphics().beginFill(0,1);this.get_graphics().drawRect(0,0,this._realWidth,this._realHeight);this.get_graphics().endFill()},setPlay:function(){if(this._player.isPlaying()!=true){this._player.togglePlay()}},setPause:function(){if(this._player.isPlaying()==true){this._player.togglePlay()}},__class__:jaris_TPlayer,__properties__:$extend(jaris_TMovieClipEx.prototype.__properties__,{get_parameters:"get_parameters"})});var jaris_animation_Animation=function(){};$hxClasses["jaris.animation.Animation"]=jaris_animation_Animation;jaris_animation_Animation.__name__=["jaris","animation","Animation"];jaris_animation_Animation.fadeIn=function(e,t){var i=new jaris_animation_AnimationsBase;i.fadeIn(e,t)};jaris_animation_Animation.fadeOut=function(e,t){var i=new jaris_animation_AnimationsBase;i.fadeOut(e,t)};var jaris_animation_AnimationsBase=function(){this._stage=openfl_Lib.get_current().stage};$hxClasses["jaris.animation.AnimationsBase"]=jaris_animation_AnimationsBase;jaris_animation_AnimationsBase.__name__=["jaris","animation","AnimationsBase"];jaris_animation_AnimationsBase.prototype={_fadeInTimer:null,_fadeOutTimer:null,_stage:null,_currentObject:null,fadeOutTimer:function(e){if(this._currentObject.alpha>0){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 i=this._loaderThumb;i.set_x(i.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 i=.5*this._movieClip.get_width();var s=15;this._loaderTrack.set_x(this._movieClip.get_width()/2-i/2);this._loaderTrack.set_y(this._movieClip.get_height()/2-s/2);this._loaderTrack.get_graphics().lineStyle(2,this._controlColor);this._loaderTrack.get_graphics().drawRect(0,0,i,s);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,s,s)},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,i,s){if(s==null){s=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=i;this._source=e;this._width=s;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 i=openfl_Lib.get_current().get_loaderInfo().parameters;var s=["","","",""];s[0]=i.brightcolor!=null?i.brightcolor:"";s[1]=i.controlcolor!=null?i.controlcolor:"";this._loaderStatus=new jaris_display_Loader(this._movieClip);this._loaderStatus.show();this._loaderStatus.setColors(s);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 i=this._movieClip.get_realHeight();var s=this._movieClip.get_realWidth();var a=this._movieClip.get_realHeight();if(e>=1){a=t/e;if(a>i){a=i;s=a*e}}else{s=i*e;if(s>t){s=t;a=s/e}}this.set_height(a);this.set_width(s);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,i){if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);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 i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.__width,this.__height);i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__getIndexBuffer:function(e){var t=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context){var i=new Uint16Array(6);this.__indexBufferData=i;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 i=t.RGBA;var s=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,i,s,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 i=1;var s=1;var a=new Float32Array(20);this.__vertexBufferData=a;this.__vertexBufferData[0]=this.get_width();this.__vertexBufferData[1]=this.get_height();this.__vertexBufferData[3]=i;this.__vertexBufferData[4]=s;this.__vertexBufferData[6]=this.get_height();this.__vertexBufferData[9]=s;this.__vertexBufferData[10]=this.get_width();this.__vertexBufferData[13]=i;this.__vertexBufferContext=e.__context;this.__vertexBuffer=e.createVertexBuffer(3,5);this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},__hitTest:function(e,t,i,s,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 n=this.__renderTransform;var _=n.a*n.d-n.b*n.c;var o=_==0?-n.tx:1/_*(n.c*(n.ty-t)+n.d*(e-n.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(s!=null&&!a){s.push(r)}return true}return false},__hitTestMask:function(e,t){var i=openfl_geom_Point.__pool.get();i.setTo(e,t);this.__globalToLocal(i,i);var s=i.x>0&&i.y>0&&i.x<=this.__width&&i.y<=this.__height;openfl_geom_Point.__pool.release(i);return s},__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,i,s,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 i=function(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}};i()}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 i=77;var s=88;if(e.keyCode==9){this.toggleAspectRatio()}else if(e.keyCode==t){this.toggleFullscreen()}else if(e.keyCode==i){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==s){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._lastProgress<this.getBytesLoaded()){this._lastProgress=this.getBytesLoaded();this.callEvents(jaris_events_PlayerEvents.PROGRESS)}},onSoundComplete:function(e){this._mediaDuration=this._sound.get_length()/1e3;this._downloadCompleted=true;this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED)},onSoundID3:function(e){if(this._firstLoad){this._soundChannel=this._sound.play();this._checkAudioTimer.start();this._isPlaying=true;this._firstLoad=false;this._mediaLoaded=true;this._mediaDuration=this._sound.bytesTotal/this._sound.bytesLoaded*this._sound.get_length()/1e3;this._aspectRatio=jaris_player_AspectRatio.getAspectRatio(this._videoWidth,this._videoHeight);this._originalAspectRatio=this._aspectRatio;this._id3Info=this._sound.get_id3();this.callEvents(jaris_events_PlayerEvents.CONNECTION_SUCCESS);this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED);this.resizeAndCenterPlayer();this.setVolume(this._userSettings.getVolume())}},onSoundIOError:function(e){this.callEvents(jaris_events_PlayerEvents.CONNECTION_FAILED)},onSoundProgress:function(e){if(this._sound.isBuffering){this.callEvents(jaris_events_PlayerEvents.BUFFERING)}else{this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING)}this._mediaDuration=this._sound.bytesTotal/this._sound.bytesLoaded*this._sound.get_length()/1e3;this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED)},onYouTubeLoaderInit:function(e){this._youtubeLoader.content.addEventListener("onReady",$bind(this,this.onYoutubeReady));this._youtubeLoader.content.addEventListener("onError",$bind(this,this.onYoutubeError));this._youtubeLoader.content.addEventListener("onStateChange",$bind(this,this.onYoutubeStateChange));this._youtubeLoader.content.addEventListener("onPlaybackQualityChange",$bind(this,this.onYoutubePlaybackQualityChange))},onYoutubeReady:function(e){this._movieClip.addChild(this._youtubeLoader.content);this._movieClip.setChildIndex(this._youtubeLoader.content,0);Reflect.field(this._youtubeLoader.content,"setSize")(this._movieClip.get_realWidth(),this._movieClip.get_realHeight());Reflect.field(this._youtubeLoader.content,"loadVideoByUrl")(jaris_utils_Utils.youtubeSourceParse(this._mediaSource));this.callEvents(jaris_events_PlayerEvents.BUFFERING)},onYoutubeStateChange:function(e){var t=Std.parseInt(Reflect.field(e,"data"));switch(t){case-1:this.callEvents(jaris_events_PlayerEvents.BUFFERING);break;case 0:this._isPlaying=false;this._mediaEndReached=true;this.callEvents(jaris_events_PlayerEvents.PLAYBACK_FINISHED);break;case 1:if(this._firstLoad){this._isPlaying=true;this._videoWidth=this._movieClip.get_realWidth();this._videoHeight=this._movieClip.get_realHeight();this._firstLoad=false;this._mediaLoaded=true;this._mediaDuration=Reflect.field(this._youtubeLoader.content,"getDuration")();this._aspectRatio=jaris_player_AspectRatio.getAspectRatio(this._videoWidth,this._videoHeight);this._originalAspectRatio=this._aspectRatio;this.callEvents(jaris_events_PlayerEvents.CONNECTION_SUCCESS);this.callEvents(jaris_events_PlayerEvents.MEDIA_INITIALIZED);this.resizeAndCenterPlayer();this.setVolume(this._userSettings.getVolume())}this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING);break;case 2:this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING);break;case 3:this.callEvents(jaris_events_PlayerEvents.BUFFERING);break;case 5:this.callEvents(jaris_events_PlayerEvents.NOT_BUFFERING);break}},onYoutubePlaybackQualityChange:function(e){},onYoutubeError:function(e){this.callEvents(jaris_events_PlayerEvents.ERROR,Reflect.field(e,"data"))},callEvents:function(e,t){if(t==null){t=""}var i=new jaris_events_PlayerEvents(e,true);i.aspectRatio=this.getAspectRatio();i.duration=this.getDuration();i.fullscreen=this.isFullscreen();i.mute=this.getMute();i.volume=this.getVolume();i.width=this._video.get_width();i.height=this._video.get_height();i.stream=this.getNetStream();i.sound=this.getSound();i.time=this.getCurrentTime();i.id3Info=this.getId3Info();i.errinfo=t;this.dispatchEvent(i)},resizeAndCenterPlayer:function(){if(this._streamType!=jaris_player_StreamType.YOUTUBE){this._video.set_height(this._movieClip.get_realHeight());if(this._aspectRatio>0){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 i="0";var s=0;var a=Reflect.fields(this._seekPoints);while(s<a.length){var r=a[s];++s;if(Reflect.field(this._seekPoints,r)<e){t=r}else{i=r;break}}if(e-this._seekPoints[Std.parseInt(t)]<this._seekPoints[Std.parseInt(i)]-e){return this._seekPoints[Std.parseInt(t)]}else{return this._seekPoints[Std.parseInt(i)]}}return e},canSeek:function(e){if(this._type==jaris_player_InputType.VIDEO){e=this.getBestSeekPoint(e)}var t=Math.floor((this.getDuration()-this._startTime)*(this.getBytesLoaded()/this.getBytesTotal()))-1;if(e>=this._startTime&&e<this._startTime+t){return true}return false},load:function(e,t,i,s){if(s==null){s=""}if(i==null){i="file"}if(t==null){t="video"}var a=this;this.stopAndClose();this._type=t;this._streamType=i;this._mediaSource=e;this._stopped=false;this._mediaLoaded=false;this._firstLoad=true;this._startTime=0;this._downloadCompleted=false;this._seekPoints=[];this._server=s;this.callEvents(jaris_events_PlayerEvents.BUFFERING);if(this._streamType==jaris_player_StreamType.YOUTUBE){openfl_system_Security.allowDomain("*");openfl_system_Security.allowDomain("www.youtube.com");openfl_system_Security.allowDomain("youtube.com");openfl_system_Security.allowDomain("s.ytimg.com");openfl_system_Security.allowDomain("i.ytimg.com");this._youtubeLoader=new openfl_display_Loader;this._youtubeLoader.contentLoaderInfo.addEventListener("init",$bind(this,this.onYouTubeLoaderInit));this._youtubeLoader.contentLoaderInfo.addEventListener("ioError",function(e){a.callEvents(jaris_events_PlayerEvents.ERROR,e.text)});this._youtubeLoader.load(new openfl_net_URLRequest("http://www.youtube.com/apiplayer?version=3"))}else if(this._type==jaris_player_InputType.VIDEO&&(this._streamType==jaris_player_StreamType.FILE||this._streamType==jaris_player_StreamType.PSEUDOSTREAM)){this._connection.connect(null);this._stream=new jaris_player_MyNetStream(this._connection);this._stream.addEventListener("netStatus",$bind(this,this.onNetStatus));this._stream.addEventListener("asyncError",$bind(this,this.doAsyncError));this._stream.bufferTime=this._bufferTime;this._stream.play(e);this._stream.client=this;this._video.attachNetStream(this._stream)}else if(this._type==jaris_player_InputType.VIDEO&&this._streamType==jaris_player_StreamType.RTMP){this._connection.connect(this._server)}else if(this._type==jaris_player_InputType.AUDIO&&this._streamType==jaris_player_StreamType.RTMP){this._connection.connect(this._server)}else if(this._type==jaris_player_InputType.AUDIO&&this._streamType==jaris_player_StreamType.FILE){this._sound.load(new openfl_net_URLRequest(e))}},doAsyncError:function(e){},stopAndClose:function(){if(this._mediaLoaded){this._mediaLoaded=false;this._isPlaying=false;this._stopped=true;this._startTime=0;if(this._streamType==jaris_player_StreamType.YOUTUBE){Reflect.field(this._youtubeLoader.content,"destroy")()}else if(this._type!=jaris_player_InputType.VIDEO){this._soundChannel.stop();this._sound.close()}}this.callEvents(jaris_events_PlayerEvents.STOP_CLOSE)},forward:function(){var e=this.getCurrentTime()+8+this._startTime;if(this.getDuration()>e){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 i=Reflect.field(this._youtubeLoader.content,"seekTo");if(i!=null){i(e)}}}else if(this._youtubeLoader!=null){var s=Reflect.field(this._youtubeLoader.content,"seekTo");if(s!=null){s(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(e<this._volume){this.callEvents(jaris_events_PlayerEvents.VOLUME_DOWN)}if(e>0){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,i,s,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=i;this._height=s;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 i=[e,e];var s=[.75,1];var a=[0,255];var r=.7*this.get_width();var n=.4*this.get_height();var _=this.get_width()/2-r/2+1;var o=this.get_height()/2-n/2+1;this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,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(_,o,r,n);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,i,s,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=i;this._height=s;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 i=new openfl_geom_Matrix;i.createGradientBox(this._width,this._height,jaris_utils_Utils.degreesToRadians(-90),this._width,0);var s=[e,e];var a=[.75,1];var r=[0,255];this.get_graphics().lineStyle(0,e,0,true);this.get_graphics().beginGradientFill(0,s,a,r,i);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 i=this._loaderThumb;i.set_x(i.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 i=.5*this._movieClip.get_realWidth();var s=11;this._loaderTrack.set_x(this._movieClip.get_realWidth()/2-i/2);this._loaderTrack.set_y(this._movieClip.get_realHeight()/2-s/2);this._loaderTrack.get_graphics().lineStyle();this._loaderTrack.get_graphics().beginFill(this._seekColor,.3);this._loaderTrack.get_graphics().drawRoundRect(0,s/2/2,i,s/2,5,5);var a=new openfl_geom_Matrix;a.createGradientBox(s*3,s,jaris_utils_Utils.degreesToRadians(-90),s*3,0);var r=[this._controlColor,this._controlColor];var n=[.75,1];var _=[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,s*3,s,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 i=["","","",""];i[0]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._darkColor));i[1]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._controlColor));i[2]=Std.string(_$UInt_UInt_$Impl_$.toFloat(this._seekColor));this._loader.setColors(i);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 i=t/this._volumeTrack.get_height();this._player.setVolume(i);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 i=[this._controlColor,this._controlColor];var s=[.75,1];var a=[0,255];this._thumb.get_graphics().beginGradientFill(0,i,s,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 i=this._player.getStartTime()/this._player.getDuration();var s=(i>0?i*this._track.get_width():0)+this._track.get_x();this._trackDownloaded.get_graphics().clear();this._trackDownloaded.get_graphics().lineStyle();this._trackDownloaded.set_x(s);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 i=this._controlSize;var s=t/2;var a=.8*(i-e*2)|0;this._controlsBar.set_x(0);this._controlsBar.set_y(this._movieClip.get_realHeight()-i);var r=new openfl_geom_Matrix;r.createGradientBox(t,i,jaris_utils_Utils.degreesToRadians(-90),t,0);var n=[this._brightColor,this._darkColor];var _=[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,i-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=i;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,i,s,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=i;this._height=s;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 i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,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,i,s,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=i;this._height=s;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 i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,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,i,s,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=i;this._height=s;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 i=[e,e];var s=[.75,1];var a=[0,255];this.get_graphics().lineStyle();this.get_graphics().beginGradientFill(0,i,s,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 i="";var s="";var a="";if(e/60/60>=1){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%60)<10){i="0"+Math.floor(e/60%60)+":"}else{i=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){s="00:";if(Math.floor(e/60)<10){i="0"+Math.floor(e/60)+":"}else{i=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{s="00:";i="00:";if(Math.floor(e)<10){t="0"+Math.floor(e)}else{t=Std.string(Math.floor(e))}}a+=s+i+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 i=js_Boot.__nativeClassName(e);if(i!=null){return js_Boot.__resolveNativeClass(i)}return null}};js_Boot.__string_rec=function(e,t){if(e==null){return"null"}if(t.length>=5){return"<...>"}var i=typeof e;if(i=="function"&&(e.__name__||e.__ename__)){i="object"}switch(i){case"function":return"<function>";case"object":if(e instanceof Array){if(e.__enum__){if(e.length==2){return e[0]}var s=e[0]+"(";t+="\t";var a=2;var r=e.length;while(a<r){var n=a++;if(n!=2){s+=","+js_Boot.__string_rec(e[n],t)}else{s+=js_Boot.__string_rec(e[n],t)}}return s+")"}var _=e.length;var o;var l="[";t+="\t";var h=0;var c=_;while(h<c){var u=h++;l+=(u>0?",":"")+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 i=e.__interfaces__;if(i!=null){var s=0;var a=i.length;while(s<a){var r=s++;var n=i[r];if(n==t||js_Boot.__interfLoop(n,t)){return true}}}return js_Boot.__interfLoop(e.__super__,t)};js_Boot.__instanceof=function(e,t){if(t==null){return false}switch(t){case Array:if(e instanceof Array){return e.__enum__==null}else{return false}break;case Bool:return typeof e=="boolean";case Dynamic:return true;case Float:return typeof e=="number";case Int:if(typeof e=="number"){return(e|0)===e}else{return false}break;case String:return typeof e=="string";default:if(e!=null){if(typeof t=="function"){if(e instanceof t){return true}if(js_Boot.__interfLoop(js_Boot.getClass(e),t)){return true}}else if(typeof t=="object"&&js_Boot.__isNativeObj(t)){if(e instanceof t){return true}}}else{return false}if(t==Class?e.__name__!=null:false){return true}if(t==Enum?e.__ename__!=null:false){return true}return e.__enum__==t}};js_Boot.__cast=function(e,t){if(js_Boot.__instanceof(e,t)){return e}else{throw new js__$Boot_HaxeError("Cannot cast "+Std.string(e)+" to "+Std.string(t))}};js_Boot.__nativeClassName=function(e){var t=js_Boot.__toStr.call(e).slice(8,-1);if(t=="Object"||t=="Function"||t=="Math"||t=="JSON"){return null}return t};js_Boot.__isNativeObj=function(e){return js_Boot.__nativeClassName(e)!=null};js_Boot.__resolveNativeClass=function(e){return $global[e]};var js_Browser=function(){};$hxClasses["js.Browser"]=js_Browser;js_Browser.__name__=["js","Browser"];js_Browser.getLocalStorage=function(){try{var e=window.localStorage;e.getItem("");return e}catch(e){haxe_CallStack.lastException=e;return null}};var js_html__$CanvasElement_CanvasUtil=function(){};$hxClasses["js.html._CanvasElement.CanvasUtil"]=js_html__$CanvasElement_CanvasUtil;js_html__$CanvasElement_CanvasUtil.__name__=["js","html","_CanvasElement","CanvasUtil"];js_html__$CanvasElement_CanvasUtil.getContextWebGL=function(e,t){var i=0;var s=["webgl","experimental-webgl"];while(i<s.length){var a=s[i];++i;var r=e.getContext(a,t);if(r!=null){return r}}return null};var js_html_compat_ArrayBuffer=function(e){if(e instanceof Array&&e.__enum__==null){this.a=e;this.byteLength=e.length}else{var t=e;this.a=[];var i=0;var s=t;while(i<s){var a=i++;this.a[a]=0}this.byteLength=t}};$hxClasses["js.html.compat.ArrayBuffer"]=js_html_compat_ArrayBuffer;js_html_compat_ArrayBuffer.__name__=["js","html","compat","ArrayBuffer"];js_html_compat_ArrayBuffer.sliceImpl=function(e,t){var i=new Uint8Array(this,e,t==null?null:t-e);var s=new ArrayBuffer(i.byteLength);var a=new Uint8Array(s);a.set(i);return s};js_html_compat_ArrayBuffer.prototype={byteLength:null,a:null,slice:function(e,t){return new js_html_compat_ArrayBuffer(this.a.slice(e,t))},__class__:js_html_compat_ArrayBuffer};var js_html_compat_DataView=function(e,t,i){this.buf=e;this.offset=t==null?0:t;this.length=i==null?e.byteLength-this.offset:i;if(this.offset<0||this.length<0||this.offset+this.length>e.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 i=this.getUint16(e,t);if(i>=32768){return i-65536}else{return i}},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 i=this.offset+e;var s=this.buf.a[i++];var a=this.buf.a[i++];var r=this.buf.a[i++];var n=this.buf.a[i++];if(t){return s|a<<8|r<<16|n<<24}else{return n|r<<8|a<<16|s<<24}},getUint32:function(e,t){var i=this.getInt32(e,t);if(i<0){return i+4294967296}else{return i}},getFloat32:function(e,t){return haxe_io_FPHelper.i32ToFloat(this.getInt32(e,t))},getFloat64:function(e,t){var i=this.getInt32(e,t);var s=this.getInt32(e+4,t);return haxe_io_FPHelper.i64ToDouble(t?i:s,t?s:i)},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,i){this.setUint16(e,t<0?t+65536:t,i)},setUint16:function(e,t,i){var s=e+this.offset;if(i){this.buf.a[s]=t&255;this.buf.a[s++]=t>>8&255}else{this.buf.a[s++]=t>>8&255;this.buf.a[s]=t&255}},setInt32:function(e,t,i){this.setUint32(e,t,i)},setUint32:function(e,t,i){var s=e+this.offset;if(i){this.buf.a[s++]=t&255;this.buf.a[s++]=t>>8&255;this.buf.a[s++]=t>>16&255;this.buf.a[s++]=t>>>24}else{this.buf.a[s++]=t>>>24;this.buf.a[s++]=t>>16&255;this.buf.a[s++]=t>>8&255;this.buf.a[s++]=t&255}},setFloat32:function(e,t,i){this.setUint32(e,haxe_io_FPHelper.floatToI32(t),i)},setFloat64:function(e,t,i){var s=haxe_io_FPHelper.doubleToI64(t);if(i){this.setUint32(e,s.low);this.setUint32(e,s.high)}else{this.setUint32(e,s.high);this.setUint32(e,s.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,i){var s;if(typeof e=="number"){s=[];var a=0;var r=e;while(a<r){var n=a++;s[n]=0}s.byteLength=s.length<<2;s.byteOffset=0;var _=[];var o=0;var l=s.length<<2;while(o<l){var h=o++;_.push(0)}s.buffer=new js_html_compat_ArrayBuffer(_)}else if(js_Boot.__instanceof(e,js_html_compat_ArrayBuffer)){var c=e;if(t==null){t=0}if(i==null){i=c.byteLength-t>>2}s=[];var u=0;var f=i;while(u<f){var p=u++;var d=c.a[t++]|c.a[t++]<<8|c.a[t++]<<16|c.a[t++]<<24;s.push(haxe_io_FPHelper.i32ToFloat(d))}s.byteLength=s.length<<2;s.byteOffset=t;s.buffer=c}else if(e instanceof Array&&e.__enum__==null){s=e.slice();var g=[];var m=0;while(m<s.length){var v=s[m];++m;var b=haxe_io_FPHelper.floatToI32(v);g.push(b&255);g.push(b>>8&255);g.push(b>>16&255);g.push(b>>>24)}s.byteLength=s.length<<2;s.byteOffset=0;s.buffer=new js_html_compat_ArrayBuffer(g)}else{throw new js__$Boot_HaxeError("TODO "+Std.string(e))}s.subarray=js_html_compat_Float32Array._subarray;s.set=js_html_compat_Float32Array._set;return s};js_html_compat_Float32Array._set=function(e,t){if(js_Boot.__instanceof(e.buffer,js_html_compat_ArrayBuffer)){var i=e;if(e.byteLength+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var s=0;var a=e.byteLength;while(s<a){var r=s++;this[r+t]=i[r]}}else if(e instanceof Array&&e.__enum__==null){var n=e;if(n.length+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _=0;var o=n.length;while(_<o){var l=_++;this[l+t]=n[l]}}else{throw new js__$Boot_HaxeError("TODO")}};js_html_compat_Float32Array._subarray=function(e,t){var i=js_html_compat_Float32Array._new(this.slice(e,t));i.byteOffset=e*4;return i};var js_html_compat_Uint8Array=function(){};$hxClasses["js.html.compat.Uint8Array"]=js_html_compat_Uint8Array;js_html_compat_Uint8Array.__name__=["js","html","compat","Uint8Array"];js_html_compat_Uint8Array._new=function(e,t,i){var s;if(typeof e=="number"){s=[];var a=0;var r=e;while(a<r){var n=a++;s[n]=0}s.byteLength=s.length;s.byteOffset=0;s.buffer=new js_html_compat_ArrayBuffer(s)}else if(js_Boot.__instanceof(e,js_html_compat_ArrayBuffer)){var _=e;if(t==null){t=0}if(i==null){i=_.byteLength-t}if(t==0){s=_.a}else{s=_.a.slice(t,t+i)}s.byteLength=s.length;s.byteOffset=t;s.buffer=_}else if(e instanceof Array&&e.__enum__==null){s=e.slice();s.byteLength=s.length;s.byteOffset=0;s.buffer=new js_html_compat_ArrayBuffer(s)}else{throw new js__$Boot_HaxeError("TODO "+Std.string(e))}s.subarray=js_html_compat_Uint8Array._subarray;s.set=js_html_compat_Uint8Array._set;return s};js_html_compat_Uint8Array._set=function(e,t){if(js_Boot.__instanceof(e.buffer,js_html_compat_ArrayBuffer)){var i=e;if(e.byteLength+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var s=0;var a=e.byteLength;while(s<a){var r=s++;this[r+t]=i[r]}}else if(e instanceof Array&&e.__enum__==null){var n=e;if(n.length+t>this.byteLength){throw new js__$Boot_HaxeError("set() outside of range")}var _=0;var o=n.length;while(_<o){var l=_++;this[l+t]=n[l]}}else{throw new js__$Boot_HaxeError("TODO")}};js_html_compat_Uint8Array._subarray=function(e,t){var i=js_html_compat_Uint8Array._new(this.slice(e,t));i.byteOffset=e;return i};var lime__$internal_backend_html5_GameDeviceData=function(){this.connected=true;this.buttons=[];this.axes=[]};$hxClasses["lime._internal.backend.html5.GameDeviceData"]=lime__$internal_backend_html5_GameDeviceData;lime__$internal_backend_html5_GameDeviceData.__name__=["lime","_internal","backend","html5","GameDeviceData"];lime__$internal_backend_html5_GameDeviceData.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:lime__$internal_backend_html5_GameDeviceData};var lime__$internal_backend_html5_HTML5AudioSource=function(e){this.parent=e;this.id=-1;this.gain=1;this.position=new lime_math_Vector4};$hxClasses["lime._internal.backend.html5.HTML5AudioSource"]=lime__$internal_backend_html5_HTML5AudioSource;lime__$internal_backend_html5_HTML5AudioSource.__name__=["lime","_internal","backend","html5","HTML5AudioSource"];lime__$internal_backend_html5_HTML5AudioSource.prototype={completed:null,gain:null,id:null,length:null,loops:null,parent:null,playing:null,position:null,dispose:function(){},init:function(){},play:function(){if(this.playing||this.parent.buffer==null||this.parent.buffer.__srcHowl==null){return}this.playing=true;var e=this.getCurrentTime();this.completed=false;var t=this.parent.buffer.__srcHowl._volume;this.parent.buffer.__srcHowl._volume=this.parent.get_gain();this.id=this.parent.buffer.__srcHowl.play();this.parent.buffer.__srcHowl._volume=t;this.setPosition(this.parent.get_position());this.parent.buffer.__srcHowl.on("end",$bind(this,this.howl_onEnd),this.id);this.setCurrentTime(e)},stop:function(){this.playing=false;if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){this.parent.buffer.__srcHowl.stop(this.id)}},howl_onEnd:function(){this.playing=false;if(this.loops>0){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.activeRequests<lime__$internal_backend_html5_HTML5HTTPRequest.requestLimit){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests++;lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage(e,t)}else{lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.add({instance:null,uri:e,promise:t,type:"IMAGE"})}return t.future};lime__$internal_backend_html5_HTML5HTTPRequest.processQueue=function(){if(lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests<lime__$internal_backend_html5_HTML5HTTPRequest.requestLimit&&lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.length>0){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 i=lime__$internal_backend_html5_HTML5HTTPRequest.__fixHostname(t.hostname);var s=lime__$internal_backend_html5_HTML5HTTPRequest.__fixProtocol(t.protocol);var a=lime__$internal_backend_html5_HTML5HTTPRequest.__fixPort(t.port,s);var r=i==""||i==lime__$internal_backend_html5_HTML5HTTPRequest.originHostname;var n=a==""||a==lime__$internal_backend_html5_HTML5HTTPRequest.originPort;if(s!="file:"&&r){return n}else{return false}};lime__$internal_backend_html5_HTML5HTTPRequest.__loadImage=function(e,i){var s=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){s.crossOrigin="Anonymous"}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress==null){lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress="onprogress"in s}if(lime__$internal_backend_html5_HTML5HTTPRequest.supportsImageProgress||StringTools.startsWith(e,"data:")){s.addEventListener("load",function(e){var t=new lime_graphics_ImageBuffer(null,s.width,s.height);t.__srcImage=s;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();i.complete(new lime_graphics_Image(t))},false);s.addEventListener("progress",function(e){i.progress(e.loaded,e.total)},false);s.addEventListener("error",function(e){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue();i.error(e.detail)},false);s.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){i.complete(e)})};a.onerror=function(e){i.error(e.message)};a.onprogress=function(e){if(e.lengthComputable){i.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,i){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=i;var s="";if(this.parent.data==null){var a=this.parent.formData.keys();while(a.hasNext()){var r=a.next();if(s.length>0){s+="&"}var n=encodeURIComponent(r)+"=";var _=this.parent.formData;var o=Std.string(__map_reserved[r]!=null?_.getReserved(r):_.h[r]);s+=n+encodeURIComponent(o)}if(this.parent.method=="GET"&&s!=""){if(e.indexOf("?")>-1){e+="&"+s}else{e+="?"+s}s=""}}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<c.length){var u=c[h];++h;if(u.name=="Content-Type"){l=u.value}else{this.request.setRequestHeader(u.name,u.value)}}if(this.parent.contentType!=null){l=this.parent.contentType}if(l==null){if(this.parent.data!=null){l="application/octet-stream"}else if(s!=""){l="application/x-www-form-urlencoded"}}if(l!=null){this.request.setRequestHeader("Content-Type",l)}if(this.parent.withCredentials){this.request.withCredentials=true}if(this.parent.data!=null){this.request.send(this.parent.data.b.bufferValue)}else{this.request.send(s)}},loadData:function(e){var t=new lime_app_Promise;if(lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests<lime__$internal_backend_html5_HTML5HTTPRequest.requestLimit){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests++;this.__loadData(e,t)}else{lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.add({instance:this,uri:e,promise:t,type:"BINARY"})}return t.future},loadText:function(e){var t=new lime_app_Promise;if(lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests<lime__$internal_backend_html5_HTML5HTTPRequest.requestLimit){lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests++;this.__loadText(e,t)}else{lime__$internal_backend_html5_HTML5HTTPRequest.requestQueue.add({instance:this,uri:e,promise:t,type:"TEXT"})}return t.future},processResponse:function(){if(this.parent.enableResponseHeaders){this.parent.responseHeaders=[];var e;var t;var i=0;var s=this.request.getAllResponseHeaders().split("\n");while(i<s.length){var a=s[i];++i;e=StringTools.trim(HxOverrides.substr(a,0,a.indexOf(":")));t=StringTools.trim(HxOverrides.substr(a,a.indexOf(":")+1,null));if(e!=""){this.parent.responseHeaders.push(new lime_net_HTTPRequestHeader(e,t))}}}this.parent.responseStatus=this.request.status},__loadData:function(e,i){var s=this;var t=function(e){i.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)){var t=null;if(s.request.responseType==""){if(s.request.responseText!=null){t=haxe_io_Bytes.ofString(s.request.responseText)}}else if(s.request.response!=null){t=haxe_io_Bytes.ofData(s.request.response)}s.processResponse();i.complete(t)}else{s.processResponse();i.error(s.request.status)}s.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 i=this;var s=function(e){t.progress(e.loaded,e.total)};var a=function(e){if(i.request.readyState!=4){return}if(i.request.status!=null&&(i.request.status>=200&&i.request.status<=400||i.validStatus0&&i.request.status==0)){i.processResponse();t.complete(i.request.responseText)}else{i.processResponse();t.error(i.request.status)}i.request=null;lime__$internal_backend_html5_HTML5HTTPRequest.activeRequests--;lime__$internal_backend_html5_HTML5HTTPRequest.processQueue()};this.binary=false;this.load(e,s,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 i=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(i,HTMLCanvasElement)){this.canvas=i}else if(this.renderType=="dom"){this.div=window.document.createElement("div")}else{this.canvas=window.document.createElement("canvas")}if(this.canvas!=null){var s=this.canvas.style;s.setProperty("-webkit-transform","translateZ(0)",null);s.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(i!=null){e.__width=i.clientWidth;e.__height=i.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(i!=null){if(this.canvas!=null){if(i!=this.canvas){i.appendChild(this.canvas)}}else{i.appendChild(this.div)}var r=["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];var n=0;while(n<r.length){var _=r[n];++n;i.addEventListener(_,$bind(this,this.handleMouseEvent),true)}i.addEventListener("contextmenu",$bind(this,this.handleContextMenuEvent),true);i.addEventListener("dragstart",$bind(this,this.handleDragEvent),true);i.addEventListener("dragover",$bind(this,this.handleDragEvent),true);i.addEventListener("drop",$bind(this,this.handleDragEvent),true);i.addEventListener("touchstart",$bind(this,this.handleTouchEvent),true);i.addEventListener("touchmove",$bind(this,this.handleTouchEvent),true);i.addEventListener("touchend",$bind(this,this.handleTouchEvent),true);i.addEventListener("touchcancel",$bind(this,this.handleTouchEvent),true);i.addEventListener("gamepadconnected",$bind(this,this.handleGamepadEvent),true);i.addEventListener("gamepaddisconnected",$bind(this,this.handleGamepadEvent),true)}this.createContext();if(e.context.type=="webgl"){this.canvas.addEventListener("webglcontextlost",$bind(this,this.handleContextEvent),false);this.canvas.addEventListener("webglcontextrestored",$bind(this,this.handleContextEvent),false)}};$hxClasses["lime._internal.backend.html5.HTML5Window"]=lime__$internal_backend_html5_HTML5Window;lime__$internal_backend_html5_HTML5Window.__name__=["lime","_internal","backend","html5","HTML5Window"];lime__$internal_backend_html5_HTML5Window.prototype={canvas:null,div:null,cacheElementHeight:null,cacheElementWidth:null,cacheMouseX:null,cacheMouseY:null,cursor:null,currentTouches:null,isFullscreen:null,parent:null,primaryTouch:null,renderType:null,requestedFullscreen:null,resizeElement:null,scale:null,setHeight:null,setWidth:null,textInputEnabled:null,unusedTouchesPool:null,close:function(){this.parent.application.__removeWindow(this.parent)},createContext:function(){var e=new lime_graphics_RenderContext;var t=this.parent.__attributes.context;e.window=this.parent;e.attributes=t;if(this.div!=null){e.dom=this.div;e.type="dom";e.version=""}else if(this.canvas!=null){var i=null;var s=true;var a=this.renderType=="opengl"||this.renderType=="opengles"||this.renderType=="webgl";var r=!Object.prototype.hasOwnProperty.call(t,"version")||t.version!="1";var n=false;if(a||!s&&(!Object.prototype.hasOwnProperty.call(t,"hardware")||t.hardware)){var _=Object.prototype.hasOwnProperty.call(t,"background")&&t.background==null;var o=Object.prototype.hasOwnProperty.call(t,"colorDepth")?t.colorDepth:16;var l=Object.prototype.hasOwnProperty.call(t,"antialiasing");var h={alpha:_||o>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(u<c.length){var f=c[u];++u;i=this.canvas.getContext(f,h);if(i!=null&&f=="webgl2"){n=true}if(i!=null){break}}}if(i==null){e.canvas2D=this.canvas.getContext("2d");e.type="canvas";e.version=""}else{e.webgl=lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.fromWebGL2RenderContext(i);if(n){e.webgl2=i}if(lime_graphics_opengl_GL.context==null){lime_graphics_opengl_GL.context=i;lime_graphics_opengl_GL.type="webgl";lime_graphics_opengl_GL.version=n?2:1}e.type="webgl";e.version=n?"2":"1"}}this.parent.context=e},getDisplay:function(){return lime_system_System.getDisplay(0)},handleContextEvent:function(e){var t=e.type;switch(t){case"webglcontextlost":if(e.cancelable){e.preventDefault()}var i=lime_graphics_opengl_GL.context!=null;this.parent.context=null;this.parent.onRenderContextLost.dispatch();break;case"webglcontextrestored":this.createContext();this.parent.onRenderContextRestored.dispatch(this.parent.context);break;default:}},handleContextMenuEvent:function(e){if((this.parent.onMouseUp.canceled||this.parent.onMouseDown.canceled)&&e.cancelable){e.preventDefault()}},handleCutOrCopyEvent:function(e){e.clipboardData.setData("text/plain",lime_system_Clipboard.get_text());if(e.cancelable){e.preventDefault()}},handleDragEvent:function(e){var t=e.type;switch(t){case"dragover":e.preventDefault();return false;case"dragstart":if(js_Boot.__cast(e.target,HTMLElement).nodeName.toLowerCase()=="img"&&e.cancelable){e.preventDefault();return false}break;case"drop":if(e.dataTransfer!=null&&e.dataTransfer.files.length>0){this.parent.onDropFile.dispatch(e.dataTransfer.files);e.preventDefault();return false}break}return true},handleFocusEvent:function(e){var t=this;if(this.textInputEnabled){if(e.relatedTarget==null||this.isDescendent(e.relatedTarget)){haxe_Timer.delay(function(){if(t.textInputEnabled){lime__$internal_backend_html5_HTML5Window.textInput.focus()}},20)}}},handleFullscreenEvent:function(e){var t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(t!=null){this.isFullscreen=true;this.parent.__fullscreen=true;if(this.requestedFullscreen){this.requestedFullscreen=false;this.parent.onFullscreen.dispatch()}}else{this.isFullscreen=false;this.parent.__fullscreen=false;this.parent.onRestore.dispatch();var i=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];var s=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror","MSFullscreenError"];var a=0;var r=i.length;while(a<r){var n=a++;window.document.removeEventListener(i[n],$bind(this,this.handleFullscreenEvent),false);window.document.removeEventListener(s[n],$bind(this,this.handleFullscreenEvent),false)}}},handleGamepadEvent:function(e){var t=e.type;switch(t){case"gamepadconnected":lime_ui_Joystick.__connect(e.gamepad.index);if(e.gamepad.mapping=="standard"){lime_ui_Gamepad.__connect(e.gamepad.index)}break;case"gamepaddisconnected":lime_ui_Joystick.__disconnect(e.gamepad.index);lime_ui_Gamepad.__disconnect(e.gamepad.index);break;default:}},handleInputEvent:function(e){if(lime__$internal_backend_html5_HTML5Window.textInput.value!=lime__$internal_backend_html5_HTML5Window.dummyCharacter){var t=StringTools.replace(lime__$internal_backend_html5_HTML5Window.textInput.value,lime__$internal_backend_html5_HTML5Window.dummyCharacter,"");if(t.length>0){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 i=0;if(e.type!="wheel"){if(this.parent.element!=null){if(this.canvas!=null){var s=this.canvas.getBoundingClientRect();t=(e.clientX-s.left)*(this.parent.__width/s.width);i=(e.clientY-s.top)*(this.parent.__height/s.height)}else if(this.div!=null){var a=this.div.getBoundingClientRect();t=e.clientX-a.left;i=e.clientY-a.top}else{var r=this.parent.element.getBoundingClientRect();t=(e.clientX-r.left)*(this.parent.__width/r.width);i=(e.clientY-r.top)*(this.parent.__height/r.height)}}else{t=e.clientX;i=e.clientY}var n=e.type;switch(n){case"mousedown":if(e.currentTarget==this.parent.element){window.addEventListener("mouseup",$bind(this,this.handleMouseEvent))}this.parent.onMouseDown.dispatch(t,i,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||i!=this.cacheMouseY){this.parent.onMouseMove.dispatch(t,i);this.parent.onMouseMoveRelative.dispatch(t-this.cacheMouseX,i-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,i,e.button);if(this.parent.onMouseUp.canceled&&e.cancelable){e.preventDefault()}break;default:}this.cacheMouseX=t;this.cacheMouseY=i}else{var _;var o=e.deltaMode;switch(o){case 0:_=lime_ui_MouseWheelMode.PIXELS;break;case 1:_=lime_ui_MouseWheelMode.LINES;break;case 2:_=lime_ui_MouseWheelMode.PAGES;break;default:_=lime_ui_MouseWheelMode.UNKNOWN}this.parent.onMouseWheel.dispatch(e.deltaX,-e.deltaY,_);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 i=this.setWidth;var s=this.setHeight;if(i==0||s==0){if(t!=null){i=t.width;s=t.height}else{i=1;s=1}}var a;var r;var n;var _;var o;var l=0;var h=e.changedTouches;while(l<h.length){var c=h[l];++l;r=0;n=0;if(t!=null){r=(c.clientX-t.left)*(i/t.width);n=(c.clientY-t.top)*(s/t.height)}else{r=c.clientX;n=c.clientY}if(e.type=="touchstart"){a=this.unusedTouchesPool.pop();if(a==null){a=new lime_ui_Touch(r/i,n/s,c.identifier,0,0,c.force,this.parent.id)}else{a.x=r/i;a.y=n/s;a.id=c.identifier;a.dx=0;a.dy=0;a.pressure=c.force;a.device=this.parent.id}this.currentTouches.h[c.identifier]=a;lime_ui_Touch.onStart.dispatch(a);if(this.primaryTouch==null){this.primaryTouch=a}if(a==this.primaryTouch){this.parent.onMouseDown.dispatch(r,n,0)}}else{a=this.currentTouches.h[c.identifier];if(a!=null){_=a.x;o=a.y;a.x=r/i;a.y=n/s;a.dx=a.x-_;a.dy=a.y-o;a.pressure=c.force;var u=e.type;switch(u){case"touchcancel":lime_ui_Touch.onCancel.dispatch(a);this.currentTouches.remove(c.identifier);this.unusedTouchesPool.add(a);if(a==this.primaryTouch){this.primaryTouch=null}break;case"touchend":lime_ui_Touch.onEnd.dispatch(a);this.currentTouches.remove(c.identifier);this.unusedTouchesPool.add(a);if(a==this.primaryTouch){this.parent.onMouseUp.dispatch(r,n,0);this.primaryTouch=null}break;case"touchmove":lime_ui_Touch.onMove.dispatch(a);if(a==this.primaryTouch){this.parent.onMouseMove.dispatch(r,n)}break;default:}}}}},isDescendent:function(e){if(e==this.parent.element){return true}while(e!=null){if(e.parentNode==this.parent.element){return true}e=e.parentNode}return false},setClipboard:function(e){var t=this.textInputEnabled;this.setTextInputEnabled(true);var i=lime__$internal_backend_html5_HTML5Window.textInput.value;lime__$internal_backend_html5_HTML5Window.textInput.value=e;lime__$internal_backend_html5_HTML5Window.textInput.select();if(window.document.queryCommandEnabled("copy")){window.document.execCommand("copy")}lime__$internal_backend_html5_HTML5Window.textInput.value=i;this.setTextInputEnabled(t)},setCursor:function(e){if(this.cursor!=e){if(e==null){this.parent.element.style.cursor="none"}else{var t;switch(e[1]){case 0:t="default";break;case 1:t="crosshair";break;case 3:t="move";break;case 4:t="pointer";break;case 5:t="nesw-resize";break;case 6:t="ns-resize";break;case 7:t="nwse-resize";break;case 8:t="ew-resize";break;case 9:t="text";break;case 10:t="wait";break;case 11:t="wait";break;default:t="auto"}this.parent.element.style.cursor=t}this.cursor=e}return this.cursor},setFullscreen:function(e){if(e){if(!this.requestedFullscreen&&!this.isFullscreen){this.requestedFullscreen=true;if($_=this.parent.element,$bind($_,$_.requestFullscreen)){document.addEventListener("fullscreenchange",$bind(this,this.handleFullscreenEvent),false);document.addEventListener("fullscreenerror",$bind(this,this.handleFullscreenEvent),false);this.parent.element.requestFullscreen()}else if(this.parent.element.mozRequestFullScreen){document.addEventListener("mozfullscreenchange",$bind(this,this.handleFullscreenEvent),false);document.addEventListener("mozfullscreenerror",$bind(this,this.handleFullscreenEvent),false);this.parent.element.mozRequestFullScreen()}else if(this.parent.element.webkitRequestFullscreen){document.addEventListener("webkitfullscreenchange",$bind(this,this.handleFullscreenEvent),false);document.addEventListener("webkitfullscreenerror",$bind(this,this.handleFullscreenEvent),false);this.parent.element.webkitRequestFullscreen()}else if(this.parent.element.msRequestFullscreen){document.addEventListener("MSFullscreenChange",$bind(this,this.handleFullscreenEvent),false);document.addEventListener("MSFullscreenError",$bind(this,this.handleFullscreenEvent),false);this.parent.element.msRequestFullscreen()}}}else if(this.isFullscreen){this.requestedFullscreen=false;if(document.exitFullscreen){document.exitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}}return e},setTextInputEnabled:function(e){if(e){if(lime__$internal_backend_html5_HTML5Window.textInput==null){lime__$internal_backend_html5_HTML5Window.textInput=window.document.createElement("input");lime__$internal_backend_html5_HTML5Window.textInput.type="text";lime__$internal_backend_html5_HTML5Window.textInput.style.position="absolute";lime__$internal_backend_html5_HTML5Window.textInput.style.opacity="0";lime__$internal_backend_html5_HTML5Window.textInput.style.color="transparent";lime__$internal_backend_html5_HTML5Window.textInput.value=lime__$internal_backend_html5_HTML5Window.dummyCharacter;lime__$internal_backend_html5_HTML5Window.textInput.autocapitalize="off";lime__$internal_backend_html5_HTML5Window.textInput.autocorrect="off";lime__$internal_backend_html5_HTML5Window.textInput.autocomplete="off";lime__$internal_backend_html5_HTML5Window.textInput.style.left="0px";lime__$internal_backend_html5_HTML5Window.textInput.style.top="50%";if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)){lime__$internal_backend_html5_HTML5Window.textInput.style.fontSize="0px";lime__$internal_backend_html5_HTML5Window.textInput.style.width="0px";lime__$internal_backend_html5_HTML5Window.textInput.style.height="0px"}else{lime__$internal_backend_html5_HTML5Window.textInput.style.width="1px";lime__$internal_backend_html5_HTML5Window.textInput.style.height="1px"}lime__$internal_backend_html5_HTML5Window.textInput.style.pointerEvents="none";lime__$internal_backend_html5_HTML5Window.textInput.style.zIndex="-10000000"}if(lime__$internal_backend_html5_HTML5Window.textInput.parentNode==null){this.parent.element.appendChild(lime__$internal_backend_html5_HTML5Window.textInput)}if(!this.textInputEnabled){lime__$internal_backend_html5_HTML5Window.textInput.addEventListener("input",$bind(this,this.handleInputEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.addEventListener("blur",$bind(this,this.handleFocusEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.addEventListener("cut",$bind(this,this.handleCutOrCopyEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.addEventListener("copy",$bind(this,this.handleCutOrCopyEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.addEventListener("paste",$bind(this,this.handlePasteEvent),true)}lime__$internal_backend_html5_HTML5Window.textInput.focus();lime__$internal_backend_html5_HTML5Window.textInput.select()}else if(lime__$internal_backend_html5_HTML5Window.textInput!=null){lime__$internal_backend_html5_HTML5Window.textInput.removeEventListener("input",$bind(this,this.handleInputEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.removeEventListener("blur",$bind(this,this.handleFocusEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.removeEventListener("cut",$bind(this,this.handleCutOrCopyEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.removeEventListener("copy",$bind(this,this.handleCutOrCopyEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.removeEventListener("paste",$bind(this,this.handlePasteEvent),true);lime__$internal_backend_html5_HTML5Window.textInput.blur()}return this.textInputEnabled=e},updateSize:function(){if(!this.parent.__resizable){return}var e;var t;if(this.parent.element!=null){e=this.parent.element.clientWidth;t=this.parent.element.clientHeight}else{e=window.innerWidth;t=window.innerHeight}if(e!=this.cacheElementWidth||t!=this.cacheElementHeight){this.cacheElementWidth=e;this.cacheElementHeight=t;var i=this.resizeElement||this.setWidth==0&&this.setHeight==0;if(this.parent.element!=null&&(this.div==null||this.div!=null&&i)){if(i){if(this.parent.__width!=e||this.parent.__height!=t){this.parent.__width=e;this.parent.__height=t;if(this.canvas!=null){if(this.parent.element!=this.canvas){this.canvas.width=Math.round(e*this.scale);this.canvas.height=Math.round(t*this.scale);this.canvas.style.width=e+"px";this.canvas.style.height=t+"px"}}else{this.div.style.width=e+"px";this.div.style.height=t+"px"}this.parent.onResize.dispatch(e,t)}}else{var s=this.setWidth!=0?e/this.setWidth:1;var a=this.setHeight!=0?t/this.setHeight:1;var r=e;var n=t;var _=0;var o=0;if(s<a){n=Math.floor(this.setHeight*s);o=Math.floor((t-n)/2)}else{r=Math.floor(this.setWidth*a);_=Math.floor((e-r)/2)}if(this.canvas!=null){if(this.parent.element!=this.canvas){this.canvas.style.width=r+"px";this.canvas.style.height=n+"px";this.canvas.style.marginLeft=_+"px";this.canvas.style.marginTop=o+"px"}}else{this.div.style.width=r+"px";this.div.style.height=n+"px";this.div.style.marginLeft=_+"px";this.div.style.marginTop=o+"px"}}}}},__class__:lime__$internal_backend_html5_HTML5Window};var lime__$internal_graphics_ImageCanvasUtil=function(){};$hxClasses["lime._internal.graphics.ImageCanvasUtil"]=lime__$internal_graphics_ImageCanvasUtil;lime__$internal_graphics_ImageCanvasUtil.__name__=["lime","_internal","graphics","ImageCanvasUtil"];lime__$internal_graphics_ImageCanvasUtil.colorTransform=function(e,t,i){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.colorTransform(e,t,i)};lime__$internal_graphics_ImageCanvasUtil.convertToCanvas=function(e,t){if(t==null){t=false}var i=e.buffer;if(i.__srcImage!=null){if(i.__srcCanvas==null){lime__$internal_graphics_ImageCanvasUtil.createCanvas(e,i.__srcImage.width,i.__srcImage.height);i.__srcContext.drawImage(i.__srcImage,0,0)}i.__srcImage=null}else if(i.__srcCanvas==null&&i.data!=null){e.set_transparent(true);lime__$internal_graphics_ImageCanvasUtil.createCanvas(e,i.width,i.height);lime__$internal_graphics_ImageCanvasUtil.createImageData(e);i.__srcContext.putImageData(i.__srcImageData,0,0)}else if(e.type==lime_graphics_ImageType.DATA&&i.__srcImageData!=null&&e.dirty){i.__srcContext.putImageData(i.__srcImageData,0,0);e.dirty=false}if(t){i.data=null;i.__srcImageData=null}else if(i.data==null&&i.__srcImageData!=null){i.data=i.__srcImageData.data}e.type=lime_graphics_ImageType.CANVAS};lime__$internal_graphics_ImageCanvasUtil.convertToData=function(e,t){if(t==null){t=false}var i=e.buffer;if(i.__srcImage!=null){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e)}if(i.__srcCanvas!=null&&i.data==null){lime__$internal_graphics_ImageCanvasUtil.createImageData(e);if(e.type==lime_graphics_ImageType.CANVAS){e.dirty=false}}else if(e.type==lime_graphics_ImageType.CANVAS&&i.__srcCanvas!=null&&e.dirty){if(i.__srcImageData==null){lime__$internal_graphics_ImageCanvasUtil.createImageData(e)}else{i.__srcImageData=i.__srcContext.getImageData(0,0,i.width,i.height);var s=i.__srcImageData.data.buffer;var a;if(s!=null){a=new Uint8Array(s)}else{a=null}i.data=a}e.dirty=false}if(t){e.buffer.__srcCanvas=null;e.buffer.__srcContext=null}e.type=lime_graphics_ImageType.DATA};lime__$internal_graphics_ImageCanvasUtil.copyChannel=function(e,t,i,s,a,r){lime__$internal_graphics_ImageCanvasUtil.convertToData(t);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.copyChannel(e,t,i,s,a,r)};lime__$internal_graphics_ImageCanvasUtil.copyPixels=function(e,t,i,s,a,r,n){if(n==null){n=false}if(s==null||s.x>=e.width||s.y>=e.height||i==null||i.width<1||i.height<1){return}if(a!=null&&a.get_transparent()){if(r==null){r=new lime_math_Vector2}var _=e.clone();_.copyChannel(a,new lime_math_Rectangle(r.x,r.y,i.width,i.height),new lime_math_Vector2(i.x,i.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);t=_}lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e,true);if(!n){if(e.get_transparent()&&t.get_transparent()){e.buffer.__srcContext.clearRect(s.x+e.offsetX,s.y+e.offsetY,i.width+e.offsetX,i.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(),i.x+t.offsetX|0,i.y+t.offsetY|0,i.width|0,i.height|0,s.x+e.offsetX|0,s.y+e.offsetY|0,i.width|0,i.height|0)}e.dirty=true;e.version++};lime__$internal_graphics_ImageCanvasUtil.createCanvas=function(e,t,i){var s=e.buffer;if(s.__srcCanvas==null){s.__srcCanvas=window.document.createElement("canvas");s.__srcCanvas.width=t;s.__srcCanvas.height=i;if(!e.get_transparent()){if(!e.get_transparent()){s.__srcCanvas.setAttribute("moz-opaque","true")}s.__srcContext=s.__srcCanvas.getContext("2d",{alpha:false})}else{s.__srcContext=s.__srcCanvas.getContext("2d")}}};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 i=t.__srcImageData.data.buffer;var s;if(i!=null){s=new Uint8Array(i)}else{s=null}t.data=s}};lime__$internal_graphics_ImageCanvasUtil.fillRect=function(e,t,i,s){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e);var a;var r;var n;var _;if(s==1){a=i>>16&255;r=i>>8&255;n=i&255;if(e.get_transparent()){_=i>>24&255}else{_=255}}else{a=i>>24&255;r=i>>16&255;n=i>>8&255;if(e.get_transparent()){_=i&255}else{_=255}}if(t.x==0&&t.y==0&&t.width==e.width&&t.height==e.height){if(e.get_transparent()&&_==0){e.buffer.__srcCanvas.width=e.buffer.width;return}}if(_<255){e.buffer.__srcContext.clearRect(t.x+e.offsetX,t.y+e.offsetY,t.width+e.offsetX,t.height+e.offsetY)}if(_>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,i,s){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);return lime__$internal_graphics_ImageDataUtil.getPixel32(e,t,i,s)};lime__$internal_graphics_ImageCanvasUtil.setPixel32=function(e,t,i,s,a){lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.setPixel32(e,t,i,s,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,i){var s=e.buffer.data;if(s==null){return}var a=e.buffer.format;var r=e.buffer.premultiplied;var n=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,t);var _=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(i);var o=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(i);var l=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(i);var h=lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(i);var c;var u;var f;var p=0;var d=n.height;while(p<d){var g=p++;c=n.byteOffset+n.stride*g;var m=0;var v=n.width;while(m<v){var b=m++;u=c+b*4;switch(a){case 0:f=(s[u]&255)<<24|(s[u+1]&255)<<16|(s[u+2]&255)<<8|s[u+3]&255;break;case 1:f=(s[u+1]&255)<<24|(s[u+2]&255)<<16|(s[u+3]&255)<<8|s[u]&255;break;case 2:f=(s[u+2]&255)<<24|(s[u+1]&255)<<16|(s[u]&255)<<8|s[u+3]&255;break}if(r){if((f&255)!=0&&(f&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(f&255);f=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((f>>>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|_[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:s[u]=f>>>24&255;s[u+1]=f>>>16&255;s[u+2]=f>>>8&255;s[u+3]=f&255;break;case 1:s[u]=f&255;s[u+1]=f>>>24&255;s[u+2]=f>>>16&255;s[u+3]=f>>>8&255;break;case 2:s[u]=f>>>8&255;s[u+1]=f>>>16&255;s[u+2]=f>>>24&255;s[u+3]=f&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.copyChannel=function(e,t,i,s,a,r){var n;switch(r[1]){case 0:n=0;break;case 1:n=1;break;case 2:n=2;break;case 3:n=3;break}var _;switch(a[1]){case 0:_=0;break;case 1:_=1;break;case 2:_=2;break;case 3:_=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,i);var c=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(e,new lime_math_Rectangle(s.x,s.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 w=c.height;while(x<w){var k=x++;g=h.byteOffset+h.stride*k;m=c.byteOffset+c.stride*k;var P=0;var C=c.width;while(P<C){var T=P++;switch(u){case 0:v=(o[g]&255)<<24|(o[g+1]&255)<<16|(o[g+2]&255)<<8|o[g+3]&255;break;case 1:v=(o[g+1]&255)<<24|(o[g+2]&255)<<16|(o[g+3]&255)<<8|o[g]&255;break;case 2:v=(o[g+2]&255)<<24|(o[g+1]&255)<<16|(o[g]&255)<<8|o[g+3]&255;break}if(p){if((v&255)!=0&&(v&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(v&255);v=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((v>>>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(_){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(n){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,i,s,a,r,n){if(n==null){n=false}if(e.width==t.width&&e.height==t.height&&i.width==t.width&&i.height==t.height&&i.x==0&&i.y==0&&s.x==0&&s.y==0&&a==null&&r==null&&n==false&&e.get_format()==t.get_format()){e.buffer.data.set(t.buffer.data)}else{var _=t.buffer.data;var o=e.buffer.data;if(_==null||o==null){return}var l=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(t,i);var h=new lime_math_Rectangle(s.x,s.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 w=t.buffer.premultiplied;var k=e.buffer.premultiplied;var P=t.buffer.bitsPerPixel/8|0;var C=e.buffer.bitsPerPixel/8|0;var T=a!=null&&a.get_transparent();var M=n||T&&!e.get_transparent();if(!T){if(M){var S=0;var $=c.height;while(S<$){var E=S++;p=l.byteOffset+l.stride*E;d=c.byteOffset+c.stride*E;var B=0;var L=c.width;while(B<L){var R=B++;switch(u){case 0:y=(_[p]&255)<<24|(_[p+1]&255)<<16|(_[p+2]&255)<<8|_[p+3]&255;break;case 1:y=(_[p+1]&255)<<24|(_[p+2]&255)<<16|(_[p+3]&255)<<8|_[p]&255;break;case 2:y=(_[p+2]&255)<<24|(_[p+1]&255)<<16|(_[p]&255)<<8|_[p+3]&255;break}if(w){if((y&255)!=0&&(y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(y&255);y=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>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&&w==k&&P==C){var O=0;var j=c.height;while(O<j){var G=O++;p=l.byteOffset+l.stride*G;d=c.byteOffset+c.stride*G;o.set(_.subarray(p,p+c.width*C),d)}}else{var H=0;var U=c.height;while(H<U){var N=H++;p=l.byteOffset+l.stride*N;d=c.byteOffset+c.stride*N;var W=0;var V=c.width;while(W<V){var z=W++;switch(u){case 0:y=(_[p]&255)<<24|(_[p+1]&255)<<16|(_[p+2]&255)<<8|_[p+3]&255;break;case 1:y=(_[p+1]&255)<<24|(_[p+2]&255)<<16|(_[p+3]&255)<<8|_[p]&255;break;case 2:y=(_[p+2]&255)<<24|(_[p+1]&255)<<16|(_[p]&255)<<8|_[p+3]&255;break}if(w){if((y&255)!=0&&(y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(y&255);y=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>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 J;var K;var q=new lime__$internal_graphics__$ImageDataUtil_ImageDataView(a,new lime_math_Rectangle(r.x,r.y,a.width,a.height));c.clip(s.x|0,s.y|0,q.width,q.height);if(M){var Z=0;var Q=c.height;while(Z<Q){var ee=Z++;p=l.byteOffset+l.stride*ee;d=c.byteOffset+c.stride*ee;J=q.byteOffset+q.stride*ee;var te=0;var ie=c.width;while(te<ie){var se=te++;switch(u){case 0:y=(_[p]&255)<<24|(_[p+1]&255)<<16|(_[p+2]&255)<<8|_[p+3]&255;break;case 1:y=(_[p+1]&255)<<24|(_[p+2]&255)<<16|(_[p+3]&255)<<8|_[p]&255;break;case 2:y=(_[p+2]&255)<<24|(_[p+1]&255)<<16|(_[p]&255)<<8|_[p+3]&255;break}if(w){if((y&255)!=0&&(y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(y&255);y=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>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[J]&255)<<24|(X[J+1]&255)<<16|(X[J+2]&255)<<8|X[J+3]&255;break;case 1:K=(X[J+1]&255)<<24|(X[J+2]&255)<<16|(X[J+3]&255)<<8|X[J]&255;break;case 2:K=(X[J+2]&255)<<24|(X[J+1]&255)<<16|(X[J]&255)<<8|X[J+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 ne=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|(ne&255)<<8|x&255&255;var _e=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|_e&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;J+=4}}}else{var oe=0;var le=c.height;while(oe<le){var he=oe++;p=l.byteOffset+l.stride*he;d=c.byteOffset+c.stride*he;J=q.byteOffset+q.stride*he;var ce=0;var ue=c.width;while(ce<ue){var fe=ce++;switch(u){case 0:y=(_[p]&255)<<24|(_[p+1]&255)<<16|(_[p+2]&255)<<8|_[p+3]&255;break;case 1:y=(_[p+1]&255)<<24|(_[p+2]&255)<<16|(_[p+3]&255)<<8|_[p]&255;break;case 2:y=(_[p+2]&255)<<24|(_[p+1]&255)<<16|(_[p]&255)<<8|_[p+3]&255;break}if(w){if((y&255)!=0&&(y&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(y&255);y=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((y>>>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[J]&255)<<24|(X[J+1]&255)<<16|(X[J+2]&255)<<8|X[J+3]&255;break;case 1:K=(X[J+1]&255)<<24|(X[J+2]&255)<<16|(X[J+3]&255)<<8|X[J]&255;break;case 2:K=(X[J+2]&255)<<24|(X[J+1]&255)<<16|(X[J]&255)<<8|X[J+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;J+=4}}}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.fillRect=function(e,t,i,s){var a;switch(s){case 1:var r=i;var n=0;var _=n;_=(r>>>16&255&255)<<24|(r>>>8&255&255)<<16|(r&255&255)<<8|r>>>24&255&255;a=_;break;case 2:var o=i;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=i}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<m){var v=g++;d=p.byteOffset+p.stride*v;var b=0;var y=p.width;while(b<y){var x=b++;var w=d+x*4;switch(u){case 0:c[w]=a>>>24&255;c[w+1]=a>>>16&255;c[w+2]=a>>>8&255;c[w+3]=a&255;break;case 1:c[w]=a&255;c[w+1]=a>>>24&255;c[w+2]=a>>>16&255;c[w+3]=a>>>8&255;break;case 2:c[w]=a>>>8&255;c[w+1]=a>>>16&255;c[w+2]=a>>>24&255;c[w+3]=a&255;break}}}e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.gaussianBlur=function(e,t,i,s,a,r,n,_,o){if(_==null){_=1}if(n==null){n=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=i.width|0;var p=i.height|0;var d=a|0;var g=r|0;var m=s.x|0;var v=s.y|0;var b=n*2-1;var y=Math.pow(2,n)*.125;var x=lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur(d*y,b);var w=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,(w[0]-1)/2);var P=1;var C=0;var T=b/2|0;while(C<T){var M=C++;lime__$internal_graphics_ImageDataUtil.__boxBlur(c,u,f,p,(x[P]-1)/2,(w[P]-1)/2);lime__$internal_graphics_ImageDataUtil.__boxBlur(u,c,f,p,(x[P+1]-1)/2,(w[P+1]-1)/2);P+=2}var S;var $;if(k!=0||_!=1){if(k<=0){$=0;while($<p){S=0;while(S<f){lime__$internal_graphics_ImageDataUtil.__translatePixel(c,t.get_rect(),e.get_rect(),s,S,$,_);++S}++$}}else{$=p-1;while($>=0){S=f-1;while(S>=0){lime__$internal_graphics_ImageDataUtil.__translatePixel(c,t.get_rect(),e.get_rect(),s,S,$,_);--S}--$}}}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,i,s){var a;var r=e.buffer.data;var n=4*(i+e.offsetY)*e.buffer.width+(t+e.offsetX)*4;var _=e.buffer.premultiplied;switch(e.buffer.format){case 0:a=(r[n]&255)<<24|(r[n+1]&255)<<16|(r[n+2]&255)<<8|r[n+3]&255;break;case 1:a=(r[n+1]&255)<<24|(r[n+2]&255)<<16|(r[n+3]&255)<<8|r[n]&255;break;case 2:a=(r[n+2]&255)<<24|(r[n+1]&255)<<16|(r[n]&255)<<8|r[n+3]&255;break}if(_){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(s){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 i=e.buffer.format;var s=t.length/4|0;var a;var r=0;var n=s;while(r<n){var _=r++;var o=_*4;switch(i){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=_*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(i){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 i=e.buffer.data;if(i==null){return}var s;var a;var r=i.length/4|0;var n;var _;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:n=0;_=1;o=2;l=3;break;case 1:n=1;_=2;o=3;l=0;break;case 2:n=2;_=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<y){var x=b++;s=x*4;p=i[s+n];d=i[s+_];g=i[s+o];m=i[s+l];i[s+h]=p;i[s+c]=d;i[s+u]=g;i[s+f]=m}e.buffer.format=t;e.dirty=true;e.version++};lime__$internal_graphics_ImageDataUtil.setPixel32=function(e,t,i,s,a){var r;switch(a){case 1:var n=s;var _=0;var o=_;o=(n>>>16&255&255)<<24|(n>>>8&255&255)<<16|(n&255&255)<<8|n>>>24&255&255;r=o;break;case 2:var l=s;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=s}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*(i+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 i=e.buffer.format;var s=t.length/4|0;var a;var r=0;var n=s;while(r<n){var _=r++;var o=_*4;switch(i){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=_*4;switch(i){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,i,s,a,r){t.set(e);var n=a|0;var _=r|0;lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,0);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,1);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,2);lime__$internal_graphics_ImageDataUtil.__boxBlurH(t,e,i,s,n,3);var o=1/(_+_+1);var l=i*4;var h;var c;var u;var f;var p;var d;var g=0;var m=i;while(g<m){var v=g++;h=v*4;c=h;u=h+_*l;f=e[h];p=e[h+l*(s-1)];d=(_+1)*f;var b=0;var y=_;while(b<y){var x=b++;d=d+e[h+x*l]}var w=0;var k=_+1;while(w<k){var P=w++;d=d+(e[u]-f);t[h]=Math.round(_$UInt_UInt_$Impl_$.toFloat(d)*o);u+=l;h+=l}var C=_+1;var T=s-_;while(C<T){var M=C++;d=d+(e[u]-e[c]);t[h]=Math.round(_$UInt_UInt_$Impl_$.toFloat(d)*o);c+=l;u+=l;h+=l}var S=s-_;var $=s;while(S<$){var E=S++;d=d+(p-e[c]);t[h]=Math.round(_$UInt_UInt_$Impl_$.toFloat(d)*o);c+=l;h+=l}}var B=1/(_+_+1);var L=i*4;var R;var A;var I;var D;var F;var O;var j=0;var G=i;while(j<G){var H=j++;R=H*4+1;A=R;I=R+_*L;D=e[R];F=e[R+L*(s-1)];O=(_+1)*D;var U=0;var N=_;while(U<N){var W=U++;O=O+e[R+W*L]}var V=0;var z=_+1;while(V<z){var X=V++;O=O+(e[I]-D);t[R]=Math.round(_$UInt_UInt_$Impl_$.toFloat(O)*B);I+=L;R+=L}var Y=_+1;var J=s-_;while(Y<J){var K=Y++;O=O+(e[I]-e[A]);t[R]=Math.round(_$UInt_UInt_$Impl_$.toFloat(O)*B);A+=L;I+=L;R+=L}var q=s-_;var Z=s;while(q<Z){var Q=q++;O=O+(F-e[A]);t[R]=Math.round(_$UInt_UInt_$Impl_$.toFloat(O)*B);A+=L;R+=L}}var ee=1/(_+_+1);var te=i*4;var ie;var se;var ae;var re;var ne;var _e;var oe=0;var le=i;while(oe<le){var he=oe++;ie=he*4+2;se=ie;ae=ie+_*te;re=e[ie];ne=e[ie+te*(s-1)];_e=(_+1)*re;var ce=0;var ue=_;while(ce<ue){var fe=ce++;_e=_e+e[ie+fe*te]}var pe=0;var de=_+1;while(pe<de){var ge=pe++;_e=_e+(e[ae]-re);t[ie]=Math.round(_$UInt_UInt_$Impl_$.toFloat(_e)*ee);ae+=te;ie+=te}var me=_+1;var ve=s-_;while(me<ve){var be=me++;_e=_e+(e[ae]-e[se]);t[ie]=Math.round(_$UInt_UInt_$Impl_$.toFloat(_e)*ee);se+=te;ae+=te;ie+=te}var ye=s-_;var xe=s;while(ye<xe){var we=ye++;_e=_e+(ne-e[se]);t[ie]=Math.round(_$UInt_UInt_$Impl_$.toFloat(_e)*ee);se+=te;ie+=te}}var ke=1/(_+_+1);var Pe=i*4;var Ce;var Te;var Me;var Se;var $e;var Ee;var Be=0;var Le=i;while(Be<Le){var Re=Be++;Ce=Re*4+3;Te=Ce;Me=Ce+_*Pe;Se=e[Ce];$e=e[Ce+Pe*(s-1)];Ee=(_+1)*Se;var Ae=0;var Ie=_;while(Ae<Ie){var De=Ae++;Ee=Ee+e[Ce+De*Pe]}var Fe=0;var Oe=_+1;while(Fe<Oe){var je=Fe++;Ee=Ee+(e[Me]-Se);t[Ce]=Math.round(_$UInt_UInt_$Impl_$.toFloat(Ee)*ke);Me+=Pe;Ce+=Pe}var Ge=_+1;var He=s-_;while(Ge<He){var Ue=Ge++;Ee=Ee+(e[Me]-e[Te]);t[Ce]=Math.round(_$UInt_UInt_$Impl_$.toFloat(Ee)*ke);Te+=Pe;Me+=Pe;Ce+=Pe}var Ne=s-_;var We=s;while(Ne<We){var Ve=Ne++;Ee=Ee+($e-e[Te]);t[Ce]=Math.round(_$UInt_UInt_$Impl_$.toFloat(Ee)*ke);Te+=Pe;Ce+=Pe}}};lime__$internal_graphics_ImageDataUtil.__boxBlurH=function(e,t,i,s,a,r){var n=1/(a+a+1);var _;var o;var l;var h;var c;var u;var f=0;var p=s;while(f<p){var d=f++;_=d*i;o=_;l=_+a;h=e[_*4+r];c=e[(_+i-1)*4+r];u=(a+1)*h;var g=0;var m=a;while(g<m){var v=g++;u=u+e[(_+v)*4+r]}var b=0;var y=a+1;while(b<y){var x=b++;u=u+(e[l*4+r]-h);t[_*4+r]=Math.round(_$UInt_UInt_$Impl_$.toFloat(u)*n);++l;++_}var w=a+1;var k=i-a;while(w<k){var P=w++;u=u+(e[l*4+r]-e[o*4+r]);t[_*4+r]=Math.round(_$UInt_UInt_$Impl_$.toFloat(u)*n);++l;++o;++_}var C=i-a;var T=i;while(C<T){var M=C++;u=u+(c-e[o*4+r]);t[_*4+r]=Math.round(_$UInt_UInt_$Impl_$.toFloat(u)*n);++o;++_}}};lime__$internal_graphics_ImageDataUtil.__calculateSourceOffset=function(e,t,i,s){var a=i-(t.x|0);var r=s-(t.y|0);var n=0;if(a<0||r<0||a>=e.width||r>=e.height){n=-1}else{n=4*(r*(e.width|0)+a)}return n};lime__$internal_graphics_ImageDataUtil.__getBoxesForGaussianBlur=function(e,t){var i=Math.sqrt(12*e*e/t+1);var s=Math.floor(i);if(s%2==0){--s}var a=s+2;var r=(12*e*e-t*s*s-4*t*s-3*t)/(-4*s-4);var n=Math.round(r);var _=[];var o=0;var l=t;while(o<l){var h=o++;_.push(h<n?s:a)}return _};lime__$internal_graphics_ImageDataUtil.__translatePixel=function(e,t,i,s,a,r,n){var _=4*(r*(i.width|0)+a);var o=lime__$internal_graphics_ImageDataUtil.__calculateSourceOffset(t,s,a,r);if(o<0){e[_]=e[_+1]=e[_+2]=e[_+3]=0}else{e[_]=e[o];e[_+1]=e[o+1];e[_+2]=e[o+2];var l=_$UInt_UInt_$Impl_$.toFloat(e[o+3])*n|0;e[_+3]=l<0?0:l>255?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,i,s){if(this.tempRect==null){this.tempRect=new lime_math_Rectangle}this.tempRect.setTo(e,t,i,s);this.rect.intersection(this.tempRect,this.rect);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 i;var s;var a;var r;a=0;i=e;s=0;r=e.length;var n;var _;var o;var l;o=0;n=t;_=0;l=t.length;while(s<r&&_<l){a=s;var h=i;var c=h;var u=c.charCodeAt(s);s+=!(55296<=u&&u<=56319)?1:2;var f=e;var p=f;var d=lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointAt(p,a);o=_;var g=n;var m=g;var v=m.charCodeAt(_);_+=!(55296<=v&&v<=56319)?1:2;var b=t;var y=b;var x=lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointAt(y,o);if(d<x){return-1}if(d>x){return 1}}if(_<l){return-1}if(s<r){return 1}return 0};var lime__$internal_unifill__$Utf16_Utf16_$Impl_$={};$hxClasses["lime._internal.unifill._Utf16.Utf16_Impl_"]=lime__$internal_unifill__$Utf16_Utf16_$Impl_$;lime__$internal_unifill__$Utf16_Utf16_$Impl_$.__name__=["lime","_internal","unifill","_Utf16","Utf16_Impl_"];lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointAt=function(t,e){return lime__$internal_unifill__$Utf16_Utf16Impl.decode_code_point(t.length,function(e){return t.charCodeAt(e)},e)};lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount=function(e,t,i){var s=t;var a=0;while(s<i){var r=e.charCodeAt(s);s+=!(55296<=r&&r<=56319)?1:2;++a}return a};var lime__$internal_unifill__$Utf16_Utf16Impl=function(){};$hxClasses["lime._internal.unifill._Utf16.Utf16Impl"]=lime__$internal_unifill__$Utf16_Utf16Impl;lime__$internal_unifill__$Utf16_Utf16Impl.__name__=["lime","_internal","unifill","_Utf16","Utf16Impl"];lime__$internal_unifill__$Utf16_Utf16Impl.decode_code_point=function(e,t,i){if(i<0||e<=i){throw new js__$Boot_HaxeError(new lime__$internal_unifill_InvalidCodeUnitSequence(i))}var s=t(i);if(55296<=s&&s<=56319){if(i+1<0||e<=i+1){throw new js__$Boot_HaxeError(new lime__$internal_unifill_InvalidCodeUnitSequence(i))}var a=t(i+1);if(56320<=a&&a<=57343){return s-55232<<10|a&1023}else{throw new js__$Boot_HaxeError(new lime__$internal_unifill_InvalidCodeUnitSequence(i))}}else if(56320<=s&&s<=57343){throw new js__$Boot_HaxeError(new lime__$internal_unifill_InvalidCodeUnitSequence(i))}else{return s}};var lime_app_Future=function(e,t){if(t==null){t=false}if(e!=null){if(t){var i=new lime_app_Promise;i.future=this;lime_app__$Future_FutureWork.queue({promise:i,work:e})}else{try{this.value=e();this.isComplete=true}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.error=e;this.isError=true}}}};$hxClasses["lime.app.Future"]=lime_app_Future;lime_app_Future.__name__=["lime","app","Future"];lime_app_Future.withError=function(e){var t=new lime_app_Future;t.isError=true;t.error=e;return t};lime_app_Future.withValue=function(e){var t=new lime_app_Future;t.isComplete=true;t.value=e;return t};lime_app_Future.prototype={error:null,isComplete:null,isError:null,value:null,__completeListeners:null,__errorListeners:null,__progressListeners:null,onComplete:function(e){if(e!=null){if(this.isComplete){e(this.value)}else if(!this.isError){if(this.__completeListeners==null){this.__completeListeners=[]}this.__completeListeners.push(e)}}return this},onError:function(e){if(e!=null){if(this.isError){e(this.error)}else if(!this.isComplete){if(this.__errorListeners==null){this.__errorListeners=[]}this.__errorListeners.push(e)}}return this},onProgress:function(e){if(e!=null){if(this.__progressListeners==null){this.__progressListeners=[]}this.__progressListeners.push(e)}return this},then:function(i){if(this.isComplete){return i(this.value)}else if(this.isError){var e=new lime_app_Future;e.isError=true;e.error=this.error;return e}else{var s=new lime_app_Promise;this.onError($bind(s,s.error));this.onProgress($bind(s,s.progress));this.onComplete(function(e){var t=i(e);t.onError($bind(s,s.error));t.onComplete($bind(s,s.complete))});return s.future}},__class__:lime_app_Future};var lime_app__$Future_FutureWork=function(){};$hxClasses["lime.app._Future.FutureWork"]=lime_app__$Future_FutureWork;lime_app__$Future_FutureWork.__name__=["lime","app","_Future","FutureWork"];lime_app__$Future_FutureWork.queue=function(e){if(lime_app__$Future_FutureWork.threadPool==null){lime_app__$Future_FutureWork.threadPool=new lime_system_ThreadPool;lime_app__$Future_FutureWork.threadPool.doWork.add(lime_app__$Future_FutureWork.threadPool_doWork);lime_app__$Future_FutureWork.threadPool.onComplete.add(lime_app__$Future_FutureWork.threadPool_onComplete);lime_app__$Future_FutureWork.threadPool.onError.add(lime_app__$Future_FutureWork.threadPool_onError)}lime_app__$Future_FutureWork.threadPool.queue(e)};lime_app__$Future_FutureWork.threadPool_doWork=function(t){try{var e=t.work();lime_app__$Future_FutureWork.threadPool.sendComplete({promise:t.promise,result:e})}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;lime_app__$Future_FutureWork.threadPool.sendError({promise:t.promise,error:e})}};lime_app__$Future_FutureWork.threadPool_onComplete=function(e){e.promise.complete(e.result)};lime_app__$Future_FutureWork.threadPool_onError=function(e){e.promise.error(e.error)};var lime_app_Promise=function(){this.future=new lime_app_Future};$hxClasses["lime.app.Promise"]=lime_app_Promise;lime_app_Promise.__name__=["lime","app","Promise"];lime_app_Promise.prototype={future:null,complete:function(e){if(!this.future.isError){this.future.isComplete=true;this.future.value=e;if(this.future.__completeListeners!=null){var t=0;var i=this.future.__completeListeners;while(t<i.length){var s=i[t];++t;s(e)}this.future.__completeListeners=null}}return this},completeWith:function(e){e.onComplete($bind(this,this.complete));e.onError($bind(this,this.error));e.onProgress($bind(this,this.progress));return this},error:function(e){if(!this.future.isComplete){this.future.isError=true;this.future.error=e;if(this.future.__errorListeners!=null){var t=0;var i=this.future.__errorListeners;while(t<i.length){var s=i[t];++t;s(e)}this.future.__errorListeners=null}}return this},progress:function(e,t){if(!this.future.isError&&!this.future.isComplete){if(this.future.__progressListeners!=null){var i=0;var s=this.future.__progressListeners;while(i<s.length){var a=s[i];++i;a(e,t)}}}return this},__class__:lime_app_Promise};var lime_app__$Event_$Dynamic_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Dynamic_Void"]=lime_app__$Event_$Dynamic_$Void;lime_app__$Event_$Dynamic_$Void.__name__=["lime","app","_Event_Dynamic_Void"];lime_app__$Event_$Dynamic_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$Dynamic_$Void};var lime_app__$Event_$Float_$Float_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Float_Float_Float_Void"]=lime_app__$Event_$Float_$Float_$Float_$Void;lime_app__$Event_$Float_$Float_$Float_$Void.__name__=["lime","app","_Event_Float_Float_Float_Void"];lime_app__$Event_$Float_$Float_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,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,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(r<s.length){s[r](e,t,i);if(!a[r]){this.remove(s[r])}else{++r}if(this.canceled){break}}},__class__:lime_app__$Event_$Float_$Float_$Float_$Void};var lime_app__$Event_$Float_$Float_$Int_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Float_Float_Int_Void"]=lime_app__$Event_$Float_$Float_$Int_$Void;lime_app__$Event_$Float_$Float_$Int_$Void.__name__=["lime","app","_Event_Float_Float_Int_Void"];lime_app__$Event_$Float_$Float_$Int_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(r<s.length){s[r](e,t,i);if(!a[r]){this.remove(s[r])}else{++r}if(this.canceled){break}}},__class__:lime_app__$Event_$Float_$Float_$Int_$Void};var lime_app__$Event_$Float_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Float_Float_Void"]=lime_app__$Event_$Float_$Float_$Void;lime_app__$Event_$Float_$Float_$Void.__name__=["lime","app","_Event_Float_Float_Void"];lime_app__$Event_$Float_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__listeners;var s=this.__repeat;var a=0;while(a<i.length){i[a](e,t);if(!s[a]){this.remove(i[a])}else{++a}if(this.canceled){break}}},__class__:lime_app__$Event_$Float_$Float_$Void};var lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void;lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void.__name__=["lime","app","_Event_Float_Float_lime_ui_MouseButton_Void"];lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(r<s.length){s[r](e,t,i);if(!a[r]){this.remove(s[r])}else{++r}if(this.canceled){break}}},__class__:lime_app__$Event_$Float_$Float_$lime_$ui_$MouseButton_$Void};var lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void;lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void.__name__=["lime","app","_Event_Float_Float_lime_ui_MouseWheelMode_Void"];lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){this.canceled=false;var s=this.__listeners;var a=this.__repeat;var r=0;while(r<s.length){s[r](e,t,i);if(!a[r]){this.remove(s[r])}else{++r}if(this.canceled){break}}},__class__:lime_app__$Event_$Float_$Float_$lime_$ui_$MouseWheelMode_$Void};var lime_app__$Event_$Int_$Float_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_Float_Float_Void"]=lime_app__$Event_$Int_$Float_$Float_$Void;lime_app__$Event_$Int_$Float_$Float_$Void.__name__=["lime","app","_Event_Int_Float_Float_Void"];lime_app__$Event_$Int_$Float_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__listeners;var s=this.__repeat;var a=0;while(a<i.length){i[a](e,t);if(!s[a]){this.remove(i[a])}else{++a}if(this.canceled){break}}},__class__:lime_app__$Event_$Int_$Float_$Void};var lime_app__$Event_$Int_$Int_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_Int_Void"]=lime_app__$Event_$Int_$Int_$Void;lime_app__$Event_$Int_$Int_$Void.__name__=["lime","app","_Event_Int_Int_Void"];lime_app__$Event_$Int_$Int_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__listeners;var s=this.__repeat;var a=0;while(a<i.length){i[a](e,t);if(!s[a]){this.remove(i[a])}else{++a}if(this.canceled){break}}},__class__:lime_app__$Event_$Int_$Int_$Void};var lime_app__$Event_$Int_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_Void"]=lime_app__$Event_$Int_$Void;lime_app__$Event_$Int_$Void.__name__=["lime","app","_Event_Int_Void"];lime_app__$Event_$Int_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$Int_$Void};var lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void;lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.__name__=["lime","app","_Event_Int_lime_ui_JoystickHatPosition_Void"];lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);this.__repeat.push(!t)},cancel:function(){this.canceled=true},has:function(e){var t=0;var i=this.__listeners;while(t<i.length){var s=i[t];++t;if(Reflect.compareMethods(s,e)){return true}}return false},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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$String_$Void};var lime_app__$Event_$Void_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_Void_Void"]=lime_app__$Event_$Void_$Void;lime_app__$Event_$Void_$Void.__name__=["lime","app","_Event_Void_Void"];lime_app__$Event_$Void_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=0;while(i<e.length){e[i]();if(!t[i]){this.remove(e[i])}else{++i}if(this.canceled){break}}},__class__:lime_app__$Event_$Void_$Void};var lime_app__$Event_$lime_$graphics_$RenderContext_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_graphics_RenderContext_Void"]=lime_app__$Event_$lime_$graphics_$RenderContext_$Void;lime_app__$Event_$lime_$graphics_$RenderContext_$Void.__name__=["lime","app","_Event_lime_graphics_RenderContext_Void"];lime_app__$Event_$lime_$graphics_$RenderContext_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$graphics_$RenderContext_$Void};var lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void;lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void.__name__=["lime","app","_Event_lime_ui_GamepadAxis_Float_Void"];lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__listeners;var s=this.__repeat;var a=0;while(a<i.length){i[a](e,t);if(!s[a]){this.remove(i[a])}else{++a}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void};var lime_app__$Event_$lime_$ui_$GamepadButton_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_GamepadButton_Void"]=lime_app__$Event_$lime_$ui_$GamepadButton_$Void;lime_app__$Event_$lime_$ui_$GamepadButton_$Void.__name__=["lime","app","_Event_lime_ui_GamepadButton_Void"];lime_app__$Event_$lime_$ui_$GamepadButton_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$GamepadButton_$Void};var lime_app__$Event_$lime_$ui_$Gamepad_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_Gamepad_Void"]=lime_app__$Event_$lime_$ui_$Gamepad_$Void;lime_app__$Event_$lime_$ui_$Gamepad_$Void.__name__=["lime","app","_Event_lime_ui_Gamepad_Void"];lime_app__$Event_$lime_$ui_$Gamepad_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$Gamepad_$Void};var lime_app__$Event_$lime_$ui_$Joystick_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_Joystick_Void"]=lime_app__$Event_$lime_$ui_$Joystick_$Void;lime_app__$Event_$lime_$ui_$Joystick_$Void.__name__=["lime","app","_Event_lime_ui_Joystick_Void"];lime_app__$Event_$lime_$ui_$Joystick_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$Joystick_$Void};var lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.__name__=["lime","app","_Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__listeners;var s=this.__repeat;var a=0;while(a<i.length){i[a](e,t);if(!s[a]){this.remove(i[a])}else{++a}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void};var lime_app__$Event_$lime_$ui_$Touch_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_Touch_Void"]=lime_app__$Event_$lime_$ui_$Touch_$Void;lime_app__$Event_$lime_$ui_$Touch_$Void.__name__=["lime","app","_Event_lime_ui_Touch_Void"];lime_app__$Event_$lime_$ui_$Touch_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$Touch_$Void};var lime_app__$Event_$lime_$ui_$Window_$Void=function(){this.canceled=false;this.__listeners=[];this.__priorities=[];this.__repeat=[]};$hxClasses["lime.app._Event_lime_ui_Window_Void"]=lime_app__$Event_$lime_$ui_$Window_$Void;lime_app__$Event_$lime_$ui_$Window_$Void.__name__=["lime","app","_Event_lime_ui_Window_Void"];lime_app__$Event_$lime_$ui_$Window_$Void.prototype={canceled:null,__repeat:null,__priorities:null,add:function(e,t,i){if(i==null){i=0}if(t==null){t=false}var s=0;var a=this.__priorities.length;while(s<a){var r=s++;if(i>this.__priorities[r]){this.__listeners.splice(r,0,e);this.__priorities.splice(r,0,i);this.__repeat.splice(r,0,!t);return}}this.__listeners.push(e);this.__priorities.push(i);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 i=this.__repeat;var s=0;while(s<t.length){t[s](e);if(!i[s]){this.remove(t[s])}else{++s}if(this.canceled){break}}},__class__:lime_app__$Event_$lime_$ui_$Window_$Void};var lime_graphics_Image=function(e,t,i,s,a,r,n){if(a==null){a=-1}if(s==null){s=-1}if(i==null){i=0}if(t==null){t=0}this.offsetX=t;this.offsetY=i;this.width=s;this.height=a;this.version=0;if(n==null){n=lime_graphics_ImageType.CANVAS}this.type=n;if(e==null){if(s>0&&a>0){var _=this.type;switch(_[1]){case 0:this.buffer=new lime_graphics_ImageBuffer(null,s,a);lime__$internal_graphics_ImageCanvasUtil.createCanvas(this,s,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,s,a),r)}break;case 1:var o=s*a*4;var l;if(o!=null){l=new Uint8Array(o)}else{l=null}this.buffer=new lime_graphics_ImageBuffer(l,s,a);if(r!=null&&r!=0){this.fillRect(new lime_math_Rectangle(0,0,s,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 i=new lime_graphics_Image;i.__fromBase64(e,t);return i};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 i=new lime_graphics_Image(t);i.type=lime_graphics_ImageType.CANVAS;return i};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 i=new lime_graphics_Image(t);i.type=lime_graphics_ImageType.CANVAS;return i};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 i=e.length%3;switch(i){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 i=this.type;switch(i[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,i,s,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,i,s,a);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);lime__$internal_graphics_ImageDataUtil.copyChannel(this,e,t,i,s,a);break;case 2:var n;switch(s[1]){case 0:n=1;break;case 1:n=2;break;case 2:n=4;break;case 3:n=8;break}var _;switch(a[1]){case 0:_=1;break;case 1:_=2;break;case 2:_=4;break;case 3:_=8;break}t.offset(e.offsetX,e.offsetY);i.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(e.buffer.get_src(),t.__toFlashRectangle(),i.__toFlashPoint(),n,_);break;default:}},copyPixels:function(e,t,i,s,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(i.x+t.width>this.width){t.width=this.width-i.x}if(i.y+t.height>this.height){t.height=this.height-i.y}if(i.x<0){t.width+=i.x;t.x-=i.x;i.x=0}if(i.y<0){t.height+=i.y;t.y-=i.y;i.y=0}if(e==this&&i.x<t.get_right()&&i.y<t.get_bottom()){e=this.clone()}var n=this.type;switch(n[1]){case 0:if(s!=null||e.type!=lime_graphics_ImageType.CANVAS){lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);if(s!=null){lime__$internal_graphics_ImageCanvasUtil.convertToData(s)}lime__$internal_graphics_ImageDataUtil.copyPixels(this,e,t,i,s,a,r)}else{lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e);lime__$internal_graphics_ImageCanvasUtil.copyPixels(this,e,t,i,s,a,r)}break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageCanvasUtil.convertToData(e);if(s!=null){lime__$internal_graphics_ImageCanvasUtil.convertToData(s)}lime__$internal_graphics_ImageDataUtil.copyPixels(this,e,t,i,s,a,r);break;case 2:t.offset(e.offsetX,e.offsetY);i.offset(this.offsetX,this.offsetY);if(s!=null&&a!=null){a.offset(s.offsetX,s.offsetY)}this.buffer.__srcBitmapData.copyPixels(e.buffer.__srcBitmapData,t.__toFlashRectangle(),i.__toFlashPoint(),s!=null?s.buffer.get_src():null,a!=null?a.__toFlashPoint():null,r);break;default:}},fillRect:function(e,t,i){e=this.__clipRect(e);if(this.buffer==null||e==null){return}var s=this.type;switch(s[1]){case 0:lime__$internal_graphics_ImageCanvasUtil.fillRect(this,e,t,i);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);if(this.buffer.data.length==0){return}lime__$internal_graphics_ImageDataUtil.fillRect(this,e,t,i);break;case 2:e.offset(this.offsetX,this.offsetY);var a;if(i==null){var r=t;var n=0;var _=n;_=(r&255&255)<<24|(r>>>24&255&255)<<16|(r>>>16&255&255)<<8|r>>>8&255&255;a=_}else{switch(i){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,i){if(this.buffer==null||e<0||t<0||e>=this.width||t>=this.height){return 0}var s=this.type;switch(s[1]){case 0:return lime__$internal_graphics_ImageCanvasUtil.getPixel32(this,e,t,i);case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);return lime__$internal_graphics_ImageDataUtil.getPixel32(this,e,t,i);case 2:var a=this.buffer.__srcBitmapData.getPixel32(e+this.offsetX,t+this.offsetY);if(i==null){var r=0;var n=r;n=(a>>>16&255&255)<<24|(a>>>8&255&255)<<16|(a&255&255)<<8|a>>>24&255&255;var _=n;return _}else{switch(i){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,i,s){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,i,s);break;case 1:lime__$internal_graphics_ImageCanvasUtil.convertToData(this);lime__$internal_graphics_ImageDataUtil.setPixel32(this,e,t,i,s);break;case 2:var r;if(s==null){var n=i;var _=0;var o=_;o=(n&255&255)<<24|(n>>>24&255&255)<<16|(n>>>16&255&255)<<8|n>>>8&255&255;r=o}else{switch(s){case 1:r=i;break;case 2:var l=i;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=i;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,i){var s=this;var a=new Image;var r=function(e){s.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);s.buffer.__srcImage=a;s.offsetX=0;s.offsetY=0;s.width=s.buffer.width;s.height=s.buffer.height;if(i!=null){i(s)}};a.addEventListener("load",r,false);a.src="data:"+t+";base64,"+e},__fromBytes:function(e,t){var i="";if(lime_graphics_Image.__isPNG(e)){i="image/png"}else if(lime_graphics_Image.__isJPG(e)){i="image/jpeg"}else if(lime_graphics_Image.__isGIF(e)){i="image/gif"}else{return false}this.__fromBase64(lime_graphics_Image.__base64Encode(e),i,t);return true},__fromFile:function(e,t,i){var s=this;var a=new Image;if(!lime__$internal_backend_html5_HTML5HTTPRequest.__isSameOrigin(e)){a.crossOrigin="Anonymous"}a.onload=function(e){s.buffer=new lime_graphics_ImageBuffer(null,a.width,a.height);s.buffer.__srcImage=a;s.width=a.width;s.height=a.height;if(t!=null){t(s)}};a.onerror=function(e){if(i!=null){i()}};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 i=this.type;if(i[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,i,s,a){if(s==null){s=32}if(i==null){i=0}if(t==null){t=0}this.data=e;this.width=t;this.height=i;this.bitsPerPixel=s;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 i;if(t!=null){i=new Uint8Array(t)}else{i=null}e.data=i;var s=this.data;var a;if(s!=null){a=new Uint8Array(s)}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 n=new Uint8ClampedArray(this.__srcImageData.data);e.__srcImageData.data.set(n)}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*(this.bitsPerPixel/8|0)},__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,i,s,a){if(s!=null){e.uniform2fv(t,i,s,a)}else{e.uniform2fv(t,i)}};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,i,s){e.bufferData(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D=function(e,t,i,s,a,r,n,_,o,l){if(_!=null){e.texImage2D(t,i,s,a,r,n,_,o,l)}else{e.texImage2D(t,i,s,a,r,n)}};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv=function(e,t,i,s){e.uniformMatrix2fv(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix3fv=function(e,t,i,s){e.uniformMatrix3fv(t,i,s)};lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv=function(e,t,i,s){e.uniformMatrix4fv(t,i,s)};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 i;lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[0]=0;var s=1;while(s<256){var a=s++;i=Math.floor(a*e[18]+e[19]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__alphaTable[a]=i}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 i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[12]+e[14]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__blueTable[a]=i}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 i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[6]+e[9]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__greenTable[a]=i}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 i;var s=0;while(s<256){var a=s++;i=Math.floor(a*e[0]+e[4]*255);if(i>255){i=255}if(i<0){i=0}lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__redTable[a]=i}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 i=lime_math__$Matrix4_Matrix4_$Impl_$.__identity;var s;if(i!=null){s=new Float32Array(i)}else{s=null}t=s}return t};lime_math__$Matrix4_Matrix4_$Impl_$.append=function(e,t){var i=e[0];var s=e[4];var a=e[8];var r=e[12];var n=e[1];var _=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 w=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,1);var k=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,5);var P=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 M=lime_math__$Matrix4_Matrix4_$Impl_$.get(t,6);var S=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]=i*v+n*b+h*y+p*x;e[1]=i*w+n*k+h*P+p*C;e[2]=i*T+n*M+h*S+p*$;e[3]=i*E+n*B+h*L+p*R;e[4]=s*v+_*b+c*y+d*x;e[5]=s*w+_*k+c*P+d*C;e[6]=s*T+_*M+c*S+d*$;e[7]=s*E+_*B+c*L+d*R;e[8]=a*v+o*b+u*y+g*x;e[9]=a*w+o*k+u*P+g*C;e[10]=a*T+o*M+u*S+g*$;e[11]=a*E+o*B+u*L+g*R;e[12]=r*v+l*b+f*y+m*x;e[13]=r*w+l*k+f*P+m*C;e[14]=r*T+l*M+f*S+m*$;e[15]=r*E+l*B+f*L+m*R};lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho=function(e,t,i,s,a,r,n){var _=1/(i-t);var o=1/(a-s);var l=1/(n-r);e[0]=2*_;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+i)*_;e[13]=-(s+a)*o;e[14]=-(r+n)*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,i){e[t]=i;return i};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,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=i;this.height=s};$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 i=this.x<e.x?e.x:this.x;var s=this.get_right()>e.get_right()?e.get_right():this.get_right();if(s<=i){t.setEmpty();return t}var a=this.y<e.y?e.y:this.y;var r=this.get_bottom()>e.get_bottom()?e.get_bottom():this.get_bottom();if(r<=a){t.setEmpty();return t}t.x=i;t.y=a;t.width=s-i;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,i,s){this.x=e;this.y=t;this.width=i;this.height=s},__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,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.w=s;this.x=e;this.y=t;this.z=i};$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 i=new lime_app_Promise;var t=lime_media_AudioBuffer.fromFile(e);if(t!=null){if(t!=null){t.__srcHowl.on("load",function(){i.complete(t)});t.__srcHowl.on("loaderror",function(e,t){i.error(t)});t.__srcHowl.load()}}else{i.error(null)}return i.future};lime_media_AudioBuffer.loadFromFiles=function(e){var t=new lime_app_Promise;var i=lime_media_AudioBuffer.fromFiles(e);if(i!=null){i.__srcHowl.on("load",function(){t.complete(i)});i.__srcHowl.on("loaderror",function(){t.error(null)});i.__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 i=e.b[2];var s=e.b[1];var a=e.b[0];switch(a){case 73:if(s==68){if(i==51){return"audio/mp3"}}break;case 255:switch(s){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 n=e.b[1];var _=e.b[0];switch(_){case 73:if(n==68){if(r==51){return"audio/mp3"}}break;case 255:switch(n){case 243:case 250:case 251:return"audio/mp3";default:}break;default:}}lime_utils_Log.error("Unsupported sound format",{fileName:"AudioBuffer.hx",lineNumber:361,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 i=t.openDevice();var s=t.createContext(i);t.makeContextCurrent(s);t.processContext(s)}}lime_media_AudioManager.context=e}};var lime_media_AudioSource=function(e,t,i,s){if(s==null){s=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(i!=null&&i!=0){this.set_length(i)}this.set_loops(s);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 i=new lime_app_Promise;var s=this.__backend.loadData(this.uri);s.onProgress($bind(i,i.progress));s.onError($bind(i,i.error));s.onComplete(function(e){t.responseData=t.fromBytes(e);i.complete(t.responseData)});return i.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 i=new lime_app_Promise;var s=this.__backend.loadText(this.uri);s.onProgress($bind(i,i.progress));s.onError($bind(i,i.error));s.onComplete(function(e){t.responseData=e;i.complete(t.responseData)});return i.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 i=lime_app_Application.current.__window;if(i!=null){i.__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,i,s){this.width=e;this.height=t;this.refreshRate=i;this.pixelFormat=s};$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 i=new lime_system_Sensor(e,t);lime_system_Sensor.sensors.push(i);lime_system_Sensor.sensorByID.h[t]=i;return i};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,i,s,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 n=null;if(typeof t=="string"){n=window.document.getElementById(t)}else if(t==null){n=window.document.createElement("div")}else{n=t}if(n==null){window.console.log("[lime.embed] ERROR: Cannot find target element: "+Std.string(t));return}if(i==null){i=0}if(s==null){s=0}if(a==null){a={}}if(Object.prototype.hasOwnProperty.call(a,"background")&&typeof a.background=="string"){var _=StringTools.replace(Std.string(a.background),"#","");if(_.indexOf("0x")>-1){a.background=Std.parseInt(_)}else{a.background=Std.parseInt("0x"+_)}}a.element=n;a.width=i;a.height=s;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 i=lime_system_System.__applicationEntryPoint;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.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 i=t;var s;if(e!=null){s=new Uint16Array(e,0)}else{s=null}var a=s;i[0]=170;i[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_$Dynamic_$Void;this.onError=new lime_app__$Event_$Dynamic_$Void;this.onComplete=new lime_app__$Event_$Dynamic_$Void;this.doWork=new lime_app__$Event_$Dynamic_$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 i=window.document.createTextNode("BESbswy");t.appendChild(i);var s=t.style;s.display="block";s.position="absolute";s.top="-9999px";s.left="-9999px";s.fontSize="300px";s.width="auto";s.height="auto";s.lineHeight="normal";s.margin="0";s.padding="0";s.fontVariant="normal";s.whiteSpace="nowrap";s.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 i=this;var s=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){s.complete(i)},function(e){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:512,className:"lime.text.Font",methodName:"__loadFromName"});s.complete(i)})}else{var n=lime_text_Font.__measureFontNode("'"+t+"', sans-serif");var _=lime_text_Font.__measureFontNode("'"+t+"', serif");var o=n.offsetWidth;var l=_.offsetWidth;var h=-1;var c=3e3;var u=50;var f=0;var p;var d;var g=function(){f+=1;if(n.offsetWidth==o){p=_.offsetWidth!=l}else{p=true}d=f*u>=c;if(p||d){window.clearInterval(h);n.parentNode.removeChild(n);_.parentNode.removeChild(_);n=null;_=null;if(d){lime_utils_Log.warn('Could not load web font "'+t+'"',{fileName:"Font.hx",lineNumber:547,className:"lime.text.Font",methodName:"__loadFromName"})}s.complete(i)}};h=window.setInterval(g,u)}return s.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 i=e;var s=i;var a=s;var r;if(t>=0){var n=0;var _=a.length;var o=0;while(o<t&&n<_){var l=a.charCodeAt(n);n+=!(55296<=l&&l<=56319)?1:2;++o}r=n}else{var h=0;var c=0;while(c<-t&&0<h){var u=a.charCodeAt(h-1);h-=!(56320<=u&&u<=57343)?1:2;++c}r=h}var f=e;var p=f;var d=p;var g=d.charCodeAt(r);var m=HxOverrides.substr(d,r,!(55296<=g&&g<=56319)?1:2);var v=m;return v};lime_text__$UTF8String_UTF8String_$Impl_$.charCodeAt=function(e,t){var i;if(t>=0){var s=e;var a=s;i=t>=lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(a,0,e.length)}else{i=true}if(i){return null}var r=e;var n=r;var _=n;var o;if(t>=0){var l=0;var h=_.length;var c=0;while(c<t&&l<h){var u=_.charCodeAt(l);l+=!(55296<=u&&u<=56319)?1:2;++c}o=l}else{var f=0;var p=0;while(p<-t&&0<f){var d=_.charCodeAt(f-1);f-=!(56320<=d&&d<=57343)?1:2;++p}o=f}var g=e;var m=g;return lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointAt(m,o)};lime_text__$UTF8String_UTF8String_$Impl_$.indexOf=function(e,t,i){if(i==null){i=0}var s=e;var a=s;var r=a;var n;if(i>=0){var _=0;var o=r.length;var l=0;while(l<i&&_<o){var h=r.charCodeAt(_);_+=!(55296<=h&&h<=56319)?1:2;++l}n=_}else{var c=0;var u=0;while(u<-i&&0<c){var f=r.charCodeAt(c-1);c-=!(56320<=f&&f<=57343)?1:2;++u}n=c}var p=e.indexOf(t,n);if(p>=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,i){if(i==null){i=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e)-t}return HxOverrides.substr(e,t,i)};lime_text__$UTF8String_UTF8String_$Impl_$.substring=function(e,t,i){var s;if(t<0){s=0}else{var a=e;var r=a;var n=r;if(t>=0){var _=0;var o=n.length;var l=0;while(l<t&&_<o){var h=n.charCodeAt(_);_+=!(55296<=h&&h<=56319)?1:2;++l}s=_}else{var c=0;var u=0;while(u<-t&&0<c){var f=n.charCodeAt(c-1);c-=!(56320<=f&&f<=57343)?1:2;++u}s=c}}var p;if(i==null){p=e.length}else if(i<0){p=0}else{var d=e;var g=d;var m=g;if(i>=0){var v=0;var b=m.length;var y=0;while(y<i&&v<b){var x=m.charCodeAt(v);v+=!(55296<=x&&x<=56319)?1:2;++y}p=v}else{var w=0;var k=0;while(k<-i&&0<w){var P=m.charCodeAt(w-1);w-=!(56320<=P&&P<=57343)?1:2;++k}p=w}}return e.substring(s,p)};lime_text__$UTF8String_UTF8String_$Impl_$.equals=function(e,t){if(e==null||t==null){return e==t}return lime__$internal_unifill_Unifill.uCompare(e,t)==0};lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic=function(e){return Std.string(e)};lime_text__$UTF8String_UTF8String_$Impl_$.get_length=function(e){if(e==null){return 0}else{var t=e;var i=t;return lime__$internal_unifill__$Utf16_Utf16_$Impl_$.codePointCount(i,0,e.length)}};var lime_text_harfbuzz_HBSegmentProperties=function(){};$hxClasses["lime.text.harfbuzz.HBSegmentProperties"]=lime_text_harfbuzz_HBSegmentProperties;lime_text_harfbuzz_HBSegmentProperties.__name__=["lime","text","harfbuzz","HBSegmentProperties"];var lime_ui_Gamepad=function(e){this.onDisconnect=new lime_app__$Event_$Void_$Void;this.onButtonUp=new lime_app__$Event_$lime_$ui_$GamepadButton_$Void;this.onButtonDown=new lime_app__$Event_$lime_$ui_$GamepadButton_$Void;this.onAxisMove=new lime_app__$Event_$lime_$ui_$GamepadAxis_$Float_$Void;this.id=e;this.connected=true};$hxClasses["lime.ui.Gamepad"]=lime_ui_Gamepad;lime_ui_Gamepad.__name__=["lime","ui","Gamepad"];lime_ui_Gamepad.__connect=function(e){if(!lime_ui_Gamepad.devices.h.hasOwnProperty(e)){var t=new lime_ui_Gamepad(e);lime_ui_Gamepad.devices.h[e]=t;lime_ui_Gamepad.onConnect.dispatch(t)}};lime_ui_Gamepad.__disconnect=function(e){var t=lime_ui_Gamepad.devices.h[e];if(t!=null){t.connected=false}lime_ui_Gamepad.devices.remove(e);if(t!=null){t.onDisconnect.dispatch()}};lime_ui_Gamepad.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,__class__:lime_ui_Gamepad};var lime_ui_Joystick=function(e){this.onTrackballMove=new lime_app__$Event_$Int_$Float_$Float_$Void;this.onHatMove=new lime_app__$Event_$Int_$lime_$ui_$JoystickHatPosition_$Void;this.onDisconnect=new lime_app__$Event_$Void_$Void;this.onButtonUp=new lime_app__$Event_$Int_$Void;this.onButtonDown=new lime_app__$Event_$Int_$Void;this.onAxisMove=new lime_app__$Event_$Int_$Float_$Void;this.id=e;this.connected=true};$hxClasses["lime.ui.Joystick"]=lime_ui_Joystick;lime_ui_Joystick.__name__=["lime","ui","Joystick"];lime_ui_Joystick.__connect=function(e){if(!lime_ui_Joystick.devices.h.hasOwnProperty(e)){var t=new lime_ui_Joystick(e);lime_ui_Joystick.devices.h[e]=t;lime_ui_Joystick.onConnect.dispatch(t)}};lime_ui_Joystick.__disconnect=function(e){var t=lime_ui_Joystick.devices.h[e];if(t!=null){t.connected=false}lime_ui_Joystick.devices.remove(e);if(t!=null){t.onDisconnect.dispatch()}};lime_ui_Joystick.__getDeviceData=function(){if(navigator.getGamepads){return navigator.getGamepads()}else if(navigator.webkitGetGamepads){return navigator.webkitGetGamepads()}else{return null}};lime_ui_Joystick.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,onHatMove:null,onTrackballMove:null,__class__:lime_ui_Joystick};var lime_ui__$KeyModifier_KeyModifier_$Impl_$={};$hxClasses["lime.ui._KeyModifier.KeyModifier_Impl_"]=lime_ui__$KeyModifier_KeyModifier_$Impl_$;lime_ui__$KeyModifier_KeyModifier_$Impl_$.__name__=["lime","ui","_KeyModifier","KeyModifier_Impl_"];lime_ui__$KeyModifier_KeyModifier_$Impl_$.__properties__={get_shiftKey:"get_shiftKey",get_metaKey:"get_metaKey",get_ctrlKey:"get_ctrlKey",get_altKey:"get_altKey"};lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey=function(e){if((e&256)<=0){return(e&512)>0}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,i,s,a,r,n){this.x=e;this.y=t;this.id=i;this.dx=s;this.dy=a;this.pressure=r;this.device=n};$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=160681};$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 i=this.image;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){return true}}if(t=="FONT"||t==null){var s=this.font;if(__map_reserved[e]!=null?s.existsReserved(e):s.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,i){switch(t){case"FONT":this.font.set(e,i);break;case"IMAGE":if(!js_Boot.__instanceof(i,lime_graphics_Image)){throw new js__$Boot_HaxeError("Cannot cache non-Image asset: "+Std.string(i)+" as Image")}this.image.set(e,i);break;case"MUSIC":case"SOUND":if(!js_Boot.__instanceof(i,lime_media_AudioBuffer)){throw new js__$Boot_HaxeError("Cannot cache non-AudioBuffer asset: "+Std.string(i)+" as AudioBuffer")}this.audio.set(e,i);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 i=t;while(i.hasNext()){var s=i.next();if(StringTools.startsWith(s,e)){this.audio.remove(s)}}var a=this.font.keys();var r=a;while(r.hasNext()){var n=r.next();if(StringTools.startsWith(n,e)){this.font.remove(n)}}var _=this.image.keys();var o=_;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 i=Type.resolveClass(e.libraryType);if(i!=null){t=Type.createInstance(i,e.libraryArgs)}else{lime_utils_Log.warn("Could not find library type: "+e.libraryType,{fileName:"AssetLibrary.hx",lineNumber:119,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 i=t!=null?js_Boot.__cast(t,String):null;var s=this.types;var a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];if(a!=null){if(a==i||(i=="SOUND"||i=="MUSIC")&&(a=="MUSIC"||a=="SOUND")){return true}if(i=="BINARY"||i==null||a=="BINARY"&&i=="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 i=this.cachedAudioBuffers;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 i=this.cachedBytes;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.cachedText;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 n=this.cachedBytes;if(__map_reserved[e]!=null){n.setReserved(e,r)}else{n.h[e]=r}return r}else{var _=this.classTypes;if(__map_reserved[e]!=null?_.existsReserved(e):_.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 i=this.cachedFonts;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 i=this.cachedImages;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 i=this.cachedText;if(__map_reserved[e]!=null){return i.getReserved(e)}else{return i.h[e]}}else{var s=this.getBytes(e);if(s==null){return null}else{return s.getString(0,s.length)}}},isLocal:function(e,t){var i=this.classTypes;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){return true}var s=t!=null?js_Boot.__cast(t,String):null;switch(s){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 i=this.preload;if(!(__map_reserved[t]!=null?i.getReserved(t):i.h[t])){continue}var s=this.types;lime_utils_Log.verbose("Preloading asset: "+t+" ["+(__map_reserved[t]!=null?s.getReserved(t):s.h[t])+"]",{fileName:"AssetLibrary.hx",lineNumber:365,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(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));r.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));r.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadBytes_onComplete)]));break;case"FONT":this.assetsTotal++;var n=this.loadFont(t);n.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));n.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));n.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadFont_onComplete)]));break;case"IMAGE":this.assetsTotal++;var _=this.loadImage(t);_.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));_.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));_.onComplete(function(t,i){return function(e){i[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(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));o.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onError)]));o.onComplete(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.loadAudioBuffer_onComplete)]));break;case"TEXT":this.assetsTotal++;var l=this.loadText(t);l.onProgress(function(i,s){return function(e,t){s[0](i[0],e,t)}}([t],[$bind(this,this.load_onProgress)]));l.onError(function(t,i){return function(e){i[0](t[0],e)}}([t],[$bind(this,this.load_onError)]));l.onComplete(function(t,i){return function(e){i[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 i=this.cachedAudioBuffers;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 n=this.pathGroups;return lime_media_AudioBuffer.loadFromFiles(__map_reserved[e]!=null?n.getReserved(e):n.h[e])}else{var _=this.paths;return lime_media_AudioBuffer.loadFromFile(__map_reserved[e]!=null?_.getReserved(e):_.h[e])}}}},loadBytes:function(e){var t=this.cachedBytes;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedBytes;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 i=this.cachedFonts;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 n=this.paths;return lime_text_Font.loadFromName(__map_reserved[e]!=null?n.getReserved(e):n.h[e])}}},loadImage:function(e){var t=this.cachedImages;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.cachedImages;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s=this.classTypes;if(__map_reserved[e]!=null?s.existsReserved(e):s.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 i=this.cachedText;return lime_app_Future.withValue(__map_reserved[e]!=null?i.getReserved(e):i.h[e])}else{var s;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){s=r.existsReserved(e)}else{s=r.h.hasOwnProperty(e)}}else{s=true}if(s){var n=this.getBytes(e);if(n==null){return lime_app_Future.withValue(null)}else{var _=n.getString(0,n.length);var o=this.cachedText;if(__map_reserved[e]!=null){o.setReserved(e,_)}else{o.h[e]=_}return lime_app_Future.withValue(_)}}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:570,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"})}if(e!=null){var i=this.sizes;var s=__map_reserved[e]!=null?i.getReserved(e):i.h[e];var a=this.bytesLoadedCache;if(!(__map_reserved[e]!=null?a.existsReserved(e):a.h.hasOwnProperty(e))){this.bytesLoaded+=s}else{var r=this.bytesLoadedCache;var n=__map_reserved[e]!=null?r.getReserved(e):r.h[e];if(n<s){this.bytesLoaded+=s-n}}var _=this.bytesLoadedCache;if(__map_reserved[e]!=null){_.setReserved(e,s)}else{_.h[e]=s}}if(this.assetsLoaded<this.assetsTotal){this.promise.progress(this.bytesLoaded,this.bytesTotal)}else{this.loaded=true;this.promise.progress(this.bytesTotal,this.bytesTotal);this.promise.complete(this)}},__cacheBreak:function(e){return lime_utils_Assets.__cacheBreak(e)},__fromManifest:function(e){var t=e.version>=2;var i;var s;var a;var r;var n=e.rootPath;if(n==null){n=""}if(n!=""){n+="/"}var _=0;var o=e.assets;while(_<o.length){var l=o[_];++_;if(t&&Object.prototype.hasOwnProperty.call(l,"size")){i=l.size}else{i=100}s=l.id;if(Object.prototype.hasOwnProperty.call(l,"path")){var h=this.paths;var c=this.__cacheBreak(n+Std.string(Reflect.field(l,"path")));var u=h;if(__map_reserved[s]!=null){u.setReserved(s,c)}else{u.h[s]=c}}if(Object.prototype.hasOwnProperty.call(l,"pathGroup")){a=Reflect.field(l,"pathGroup");var f=0;var p=a.length;while(f<p){var d=f++;a[d]=this.__cacheBreak(n+a[d])}var g=this.pathGroups;if(__map_reserved[s]!=null){g.setReserved(s,a)}else{g.h[s]=a}}var m=this.sizes;if(__map_reserved[s]!=null){m.setReserved(s,i)}else{m.h[s]=i}var v=l.type;var b=this.types;if(__map_reserved[s]!=null){b.setReserved(s,v)}else{b.h[s]=v}if(Object.prototype.hasOwnProperty.call(l,"preload")){var y=this.preload;var x=Reflect.field(l,"preload");var w=y;if(__map_reserved[s]!=null){w.setReserved(s,x)}else{w.h[s]=x}}if(Object.prototype.hasOwnProperty.call(l,"className")){r=Type.resolveClass(Reflect.field(l,"className"));var k=this.classTypes;if(__map_reserved[s]!=null){k.setReserved(s,r)}else{k.h[s]=r}}}this.bytesTotal=0;var P=0;var C=e.assets;while(P<C.length){var T=C[P];++P;s=T.id;var M;var S=this.preload;if(__map_reserved[s]!=null?S.existsReserved(s):S.h.hasOwnProperty(s)){var $=this.preload;if(__map_reserved[s]!=null){M=$.getReserved(s)}else{M=$.h[s]}}else{M=false}if(M){var E=this.sizes;this.bytesTotal+=__map_reserved[s]!=null?E.getReserved(s):E.h[s]}}},loadAudioBuffer_onComplete:function(e,t){var i=this.cachedAudioBuffers;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}var s=this.pathGroups;if(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e)){var a=this.pathGroups;var r=__map_reserved[e]!=null?a.getReserved(e):a.h[e];var n=this.pathGroups.keys();while(n.hasNext()){var _=n.next();if(_==e){continue}var o=0;while(o<r.length){var l=r[o];++o;var h=this.pathGroups;if((__map_reserved[_]!=null?h.getReserved(_):h.h[_]).indexOf(l)>-1){var c=this.cachedAudioBuffers;if(__map_reserved[_]!=null){c.setReserved(_,t)}else{c.h[_]=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:710,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}else{lime_utils_Log.warn('Could not load "'+e+'"',{fileName:"AssetLibrary.hx",lineNumber:714,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"})}this.loadAudioBuffer_onComplete(e,new lime_media_AudioBuffer)},loadBytes_onComplete:function(e,t){var i=this.cachedBytes;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadFont_onComplete:function(e,t){var i=this.cachedFonts;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadImage_onComplete:function(e,t){var i=this.cachedImages;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}this.__assetLoaded(e)},loadText_onComplete:function(e,t){var i=this.cachedText;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.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,i){if(t>0){var s=this.sizes;var a=__map_reserved[e]!=null?s.getReserved(e):s.h[e];var r;if(i>0){r=t/i;if(r>1){r=1}t=Math.floor(r*a)}else if(t>a){t=a}var n=this.bytesLoadedCache;if(__map_reserved[e]!=null?n.existsReserved(e):n.h.hasOwnProperty(e)){var _=this.bytesLoadedCache;var o=__map_reserved[e]!=null?_.getReserved(e):_.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 i=JSON.parse(e);var s=new lime_utils_AssetManifest;s.name=i.name;s.libraryType=i.libraryType;s.libraryArgs=i.libraryArgs;s.assets=haxe_Unserializer.run(i.assets);if(Object.prototype.hasOwnProperty.call(i,"rootPath")){s.rootPath=i.rootPath}if(t!=null&&t!=""){if(s.rootPath==null||s.rootPath==""){s.rootPath=t}else{s.rootPath=t+"/"+s.rootPath}}return s};lime_utils_AssetManifest.__resolvePath=function(e){if(e==null){return null}var t=e.indexOf("?");var i;if(t>-1){i=HxOverrides.substr(e,0,t)}else{i=e}StringTools.replace(i,"\\","/");while(StringTools.endsWith(i,"/"))i=HxOverrides.substr(i,0,i.length-1);if(StringTools.endsWith(i,".bundle")){if(t>-1){return i+"/library.json"+HxOverrides.substr(e,t,null)}else{return i+"/library.json"}}else{return e}};lime_utils_AssetManifest.__resolveRootPath=function(e,t){if(e!=null){return e}var i=t.indexOf("?");if(i>-1){e=HxOverrides.substr(t,0,i)}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 i;var s;var a;var r=e.indexOf(":");s=e.substring(0,r);i=e.substring(r+1);a=lime_utils_Assets.getLibrary(s);if(a!=null){return a.exists(i,t)}return false};lime_utils_Assets.getAsset=function(e,t,i){if(i&&lime_utils_Assets.cache.enabled){switch(t){case"BINARY":case"TEXT":i=false;break;case"FONT":var s=lime_utils_Assets.cache.font.get(e);if(s!=null){return s}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 n;var _;var o;var l=e.indexOf(":");_=e.substring(0,l);n=e.substring(l+1);o=lime_utils_Assets.getLibrary(_);if(o!=null){if(o.exists(n,t)){if(o.isLocal(n,t)){var h=o.getAsset(n,t);if(i&&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:132,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:137,className:"lime.utils.Assets",methodName:"getAsset"})}}else{lime_utils_Log.error(lime_utils_Assets.__libraryNotFound(_),{fileName:"Assets.hx",lineNumber:142,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,i){if(i==null){i=true}if(i&&lime_utils_Assets.cache.enabled){if(lime_utils_Assets.cache.exists(e,t)){return true}}var s;var a;var r;var n=e.indexOf(":");a=e.substring(0,n);s=e.substring(n+1);r=lime_utils_Assets.getLibrary(a);if(r!=null){return r.isLocal(s,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 i=null;var s=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null?s.existsReserved(a):s.h.hasOwnProperty(a)){var n=lime_utils_Assets.libraryPaths;if(__map_reserved[a]!=null){t=n.getReserved(a)}else{t=n.h[a]}i=lime_utils_Assets.defaultRootPath}else{if(StringTools.endsWith(t,".bundle")){t+="/library.json"}t=lime_utils_Assets.__cacheBreak(t)}lime_utils_AssetManifest.loadFromFile(t,i).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 i=lime_utils_Assets.libraries;if(__map_reserved[a]!=null){i.setReserved(a,t)}else{i.h[a]=t}t.onChange.add(($_=lime_utils_Assets.onChange,$bind($_,$_.dispatch)));var s=t.load();r.completeWith(s)}}).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 i=lime_utils_Assets.libraries;if(__map_reserved[e]!=null?i.existsReserved(e):i.h.hasOwnProperty(e)){var s=lime_utils_Assets.libraries;if((__map_reserved[e]!=null?s.getReserved(e):s.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 i=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(i!=null){lime_utils_Assets.cache.clear(e+":");i.onChange.remove(lime_utils_Assets.library_onChange);i.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 i=new haxe_io_Bytes(t);return i};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 i="["+t.className+"] ERROR: "+Std.string(e);if(lime_utils_Log.throwErrors){throw new js__$Boot_HaxeError(i)}else{console.error(i)}}};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 s=this;var e=0;var t=this.libraries;while(e<t.length){var i=t[e];++e;this.bytesTotal+=i.bytesTotal}this.loadedLibraries=-1;this.preloadStarted=false;var a=0;var r=this.libraries;while(a<r.length){var n=[r[a]];++a;lime_utils_Log.verbose("Preloading asset library",{fileName:"Preloader.hx",lineNumber:132,className:"lime.utils.Preloader",methodName:"load"});n[0].load().onProgress(function(i){return function(e,t){if(s.bytesLoadedCache.h.__keys__[i[0].__id__]==null){s.bytesLoaded+=e}else{s.bytesLoaded+=e-s.bytesLoadedCache.h[i[0].__id__]}s.bytesLoadedCache.set(i[0],e);if(!s.simulateProgress){s.onProgress.dispatch(s.bytesLoaded,s.bytesTotal)}}}(n)).onComplete(function(t){return function(e){if(s.bytesLoadedCache.h.__keys__[t[0].__id__]==null){s.bytesLoaded+=t[0].bytesTotal}else{s.bytesLoaded+=t[0].bytesTotal-s.bytesLoadedCache.h[t[0].__id__]}s.loadedAssetLibrary()}}(n)).onError(function(){return function(e){lime_utils_Log.error(e,{fileName:"Preloader.hx",lineNumber:168,className:"lime.utils.Preloader",methodName:"load"})}}())}var _=0;var o=this.libraryNames;while(_<o.length){var l=o[_];++_;this.bytesTotal+=200}this.loadedLibraries++;this.preloadStarted=true;this.updateProgress()},loadedAssetLibrary:function(e){this.loadedLibraries++;var t=this.loadedLibraries;if(!this.preloadStarted){++t}var i=this.libraries.length+this.libraryNames.length;if(e!=null){lime_utils_Log.verbose("Loaded asset library: "+e+" ["+t+"/"+i+"]",{fileName:"Preloader.hx",lineNumber:195,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"})}else{lime_utils_Log.verbose("Loaded asset library ["+t+"/"+i+"]",{fileName:"Preloader.hx",lineNumber:199,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"})}this.updateProgress()},start:function(){if(this.complete||this.simulateProgress||!this.preloadComplete){return}this.complete=true;this.onComplete.dispatch()},update:function(e,t){},updateProgress:function(){var o=this;if(!this.simulateProgress){this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal)}if(this.loadedLibraries==this.libraries.length&&!this.initLibraryNames){this.initLibraryNames=true;var e=0;var t=this.libraryNames;while(e<t.length){var i=[t[e]];++e;lime_utils_Log.verbose("Preloading asset library: "+i[0],{fileName:"Preloader.hx",lineNumber:236,className:"lime.utils.Preloader",methodName:"updateProgress"});lime_utils_Assets.loadLibrary(i[0]).onProgress(function(_){return function(e,t){if(t>0){var i=o.bytesTotalCache;if(!(__map_reserved[_[0]]!=null?i.existsReserved(_[0]):i.h.hasOwnProperty(_[0]))){var s=o.bytesTotalCache;if(__map_reserved[_[0]]!=null){s.setReserved(_[0],t)}else{s.h[_[0]]=t}o.bytesTotal+=t-200}if(e>t){e=t}var a=o.bytesLoadedCache2;if(!(__map_reserved[_[0]]!=null?a.existsReserved(_[0]):a.h.hasOwnProperty(_[0]))){o.bytesLoaded+=e}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=e-(__map_reserved[_[0]]!=null?r.getReserved(_[0]):r.h[_[0]])}var n=o.bytesLoadedCache2;if(__map_reserved[_[0]]!=null){n.setReserved(_[0],e)}else{n.h[_[0]]=e}if(!o.simulateProgress){o.onProgress.dispatch(o.bytesLoaded,o.bytesTotal)}}}}(i)).onComplete(function(n){return function(e){var t=200;var i=o.bytesTotalCache;if(__map_reserved[n[0]]!=null?i.existsReserved(n[0]):i.h.hasOwnProperty(n[0])){var s=o.bytesTotalCache;if(__map_reserved[n[0]]!=null){t=s.getReserved(n[0])}else{t=s.h[n[0]]}}var a=o.bytesLoadedCache2;if(!(__map_reserved[n[0]]!=null?a.existsReserved(n[0]):a.h.hasOwnProperty(n[0]))){o.bytesLoaded+=t}else{var r=o.bytesLoadedCache2;o.bytesLoaded+=t-(__map_reserved[n[0]]!=null?r.getReserved(n[0]):r.h[n[0]])}o.loadedAssetLibrary(n[0])}}(i)).onError(function(){return function(e){lime_utils_Log.error(e,{fileName:"Preloader.hx",lineNumber:290,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:301,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,i){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=i;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<t.length){var i=t[e];++e;if(Object.prototype.hasOwnProperty.call(this.target,i)){this.target[i]=Reflect.field(this.properties,i)}else{Reflect.setProperty(this.target,i,Reflect.field(this.properties,i))}}},autoVisible:function(e){if(e==null){e=true}this._autoVisible=e;return this},callMethod:function(e,t){if(t==null){t=[]}return e.apply(e,t)},change:function(){if(this._onUpdate!=null){var e=this._onUpdate;var t=this._onUpdateParams;if(t==null){t=[]}e.apply(e,t)}},complete:function(e){if(e==null){e=true}if(e){this.change();if(this._onComplete!=null){var t=this._onComplete;var i=this._onCompleteParams;if(i==null){i=[]}t.apply(t,i)}}motion_Actuate.unload(this)},delay:function(e){this._delay=e;return this},ease:function(e){this._ease=e;return this},move:function(){},onComplete:function(e,t){this._onComplete=e;if(t==null){this._onCompleteParams=[]}else{this._onCompleteParams=t}if(this.duration==0){this.complete()}return this},onRepeat:function(e,t){this._onRepeat=e;if(t==null){this._onRepeatParams=[]}else{this._onRepeatParams=t}return this},onUpdate:function(e,t){this._onUpdate=e;if(t==null){this._onUpdateParams=[]}else{this._onUpdateParams=t}return this},onPause:function(e,t){this._onPause=e;if(t==null){this._onPauseParams=[]}else{this._onPauseParams=t}return this},onResume:function(e,t){this._onResume=e;if(t==null){this._onResumeParams=[]}else{this._onResumeParams=t}return this},pause:function(){if(this._onPause!=null){var e=this._onPause;var t=this._onPauseParams;if(t==null){t=[]}e.apply(e,t)}},reflect:function(e){if(e==null){e=true}this._reflect=e;this.special=true;return this},repeat:function(e){if(e==null){e=-1}this._repeat=e;return this},resume:function(){if(this._onResume!=null){var e=this._onResume;var t=this._onResumeParams;if(t==null){t=[]}e.apply(e,t)}},reverse:function(e){if(e==null){e=true}this._reverse=e;this.special=true;return this},smartRotation:function(e){if(e==null){e=true}this._smartRotation=e;this.special=true;return this},snapping:function(e){if(e==null){e=true}this._snapping=e;this.special=true;return this},stop:function(e,t,i){},__class__:motion_actuators_GenericActuator};var motion_actuators_SimpleActuator=function(e,t,i){this.active=true;this.propertyDetails=[];this.sendChange=false;this.paused=false;this.cacheVisible=false;this.initialized=false;this.setVisible=false;this.toggleVisible=false;this.startTime=openfl_Lib.getTimer()/1e3;motion_actuators_GenericActuator.call(this,e,t,i);if(!motion_actuators_SimpleActuator.addedEvent){motion_actuators_SimpleActuator.addedEvent=true;openfl_Lib.get_current().stage.addEventListener("enterFrame",motion_actuators_SimpleActuator.stage_onEnterFrame)}};$hxClasses["motion.actuators.SimpleActuator"]=motion_actuators_SimpleActuator;motion_actuators_SimpleActuator.__name__=["motion","actuators","SimpleActuator"];motion_actuators_SimpleActuator.stage_onEnterFrame=function(e){var t=openfl_Lib.getTimer()/1e3;var i;var s=0;var a=false;var r=0;var n=motion_actuators_SimpleActuator.actuatorsLength;while(r<n){var _=r++;i=motion_actuators_SimpleActuator.actuators[s];if(i!=null&&i.active){if(t>=i.timeOffset){i.update(t)}++s}else{motion_actuators_SimpleActuator.actuators.splice(s,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,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_TransformActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_MotionPathActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_openfl_display_DisplayObject:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},setField_motion_actuators_SimpleActuator_T:function(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)){e[t]=i}else{Reflect.setProperty(e,t,i)}},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 i=this.cacheVisible;if(Object.prototype.hasOwnProperty.call(t,"visible")){t["visible"]=i}else{Reflect.setProperty(t,"visible",i)}}}return this},delay:function(e){this._delay=e;this.timeOffset=this.startTime+e;return this},getField:function(e,t){var i=null;if(Object.prototype.hasOwnProperty.call(e,t)){i=Reflect.field(e,t)}else{i=Reflect.getProperty(e,t)}return i},initialize:function(){var e;var t;var i=0;var s=Reflect.fields(this.properties);while(i<s.length){var a=s[i];++i;var r=true;if(Object.prototype.hasOwnProperty.call(this.target,a)&&!(this.target.__properties__&&this.target.__properties__["set_"+a])){t=Reflect.field(this.target,a)}else{r=false;t=Reflect.getProperty(this.target,a)}if(typeof t=="number"){var n=this.properties;var _=null;if(Object.prototype.hasOwnProperty.call(n,a)){_=Reflect.field(n,a)}else{_=Reflect.getProperty(n,a)}var o=_;if(t==null){t=0}if(o==null){o=0}e=new motion_actuators_PropertyDetails(this.target,a,t,o-t,r);this.propertyDetails.push(e)}}this.detailsLength=this.propertyDetails.length;this.initialized=true},move:function(){this.toggleVisible=Object.prototype.hasOwnProperty.call(this.properties,"alpha")&&js_Boot.__instanceof(this.target,openfl_display_DisplayObject);var e;if(this.toggleVisible&&this.properties.alpha!=0){var t=this.target;var i=null;if(Object.prototype.hasOwnProperty.call(t,"visible")){i=Reflect.field(t,"visible")}else{i=Reflect.getProperty(t,"visible")}e=!i}else{e=false}if(e){this.setVisible=true;var s=this.target;var a=null;if(Object.prototype.hasOwnProperty.call(s,"visible")){a=Reflect.field(s,"visible")}else{a=Reflect.getProperty(s,"visible")}this.cacheVisible=a;var r=this.target;if(Object.prototype.hasOwnProperty.call(r,"visible")){r["visible"]=true}else{Reflect.setProperty(r,"visible",true)}}this.timeOffset=this.startTime;motion_actuators_SimpleActuator.actuators.push(this);++motion_actuators_SimpleActuator.actuatorsLength},onUpdate:function(e,t){this._onUpdate=e;if(t==null){this._onUpdateParams=[]}else{this._onUpdateParams=t}this.sendChange=true;return this},pause:function(){if(!this.paused){this.paused=true;motion_actuators_GenericActuator.prototype.pause.call(this);this.pauseTime=openfl_Lib.getTimer()}},resume:function(){if(this.paused){this.paused=false;this.timeOffset+=(openfl_Lib.getTimer()-this.pauseTime)/1e3;motion_actuators_GenericActuator.prototype.resume.call(this)}},setProperty:function(e,t){if(e.isField){e.target[e.propertyName]=t}else{Reflect.setProperty(e.target,e.propertyName,t)}},stop:function(e,t,i){if(this.active){if(e==null){this.active=false;if(t){this.apply()}this.complete(i);return}var s=0;var a=Reflect.fields(e);while(s<a.length){var r=a[s];++s;if(Object.prototype.hasOwnProperty.call(this.properties,r)){this.active=false;if(t){this.apply()}this.complete(i);return}}}},update:function(e){if(!this.paused){var t;var i;var s;var a=(e-this.timeOffset)/this.duration;if(a>1){a=1}if(!this.initialized){this.initialize()}if(!this.special){i=this._ease.calculate(a);var r=0;var n=this.detailsLength;while(r<n){var _=r++;t=this.propertyDetails[_];var o=t.start+t.change*i;if(t.isField){t.target[t.propertyName]=o}else{Reflect.setProperty(t.target,t.propertyName,o)}}}else{if(!this._reverse){i=this._ease.calculate(a)}else{i=this._ease.calculate(1-a)}var l;var h=0;var c=this.detailsLength;while(h<c){var u=h++;t=this.propertyDetails[u];if(this._smartRotation&&(t.propertyName=="rotation"||t.propertyName=="rotationX"||t.propertyName=="rotationY"||t.propertyName=="rotationZ")){var f=t.change%360;if(f>180){f-=360}else if(f<-180){f+=360}l=t.start+f*i}else{l=t.start+t.change*i}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,i){motion_Actuate.stop(e,t);if(i==null){i=motion_Actuate.defaultActuator}var s=Type.createInstance(i,[e,0,t]);s.apply();return s};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,i,s){if(s==null){s=true}if(i==null){i=false}if(e!=null){if(js_Boot.__instanceof(e,motion_actuators_IGenericActuator)){var a=e;a.stop(null,i,s)}else{var r=motion_Actuate.getLibrary(e,false);if(r!=null){if(typeof t=="string"){var n={};n[t]=null;t=n}else if(t instanceof Array&&t.__enum__==null){var _={};var o=0;var l=js_Boot.__cast(t,Array);while(o<l.length){var h=l[o];++o;_[h]=null}t=_}var c=r.length-1;while(c>=0){r[c].stop(t,i,s);--c}}}}};motion_Actuate.tween=function(e,t,i,s,a){if(s==null){s=true}if(e!=null){if(t>0){if(a==null){a=motion_Actuate.defaultActuator}var r=Type.createInstance(a,[e,t,i]);var n=motion_Actuate.getLibrary(r.target);if(s){var _=n.length-1;while(_>=0){n[_].stop(r.properties,false,false);--_}n=motion_Actuate.getLibrary(r.target)}n.push(r);r.move();return r}else{return motion_Actuate.apply(e,i,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,i){this.filterIndex=-1;motion_actuators_SimpleActuator.call(this,e,t,i);if(js_Boot.__instanceof(i.filter,Class)){this.filterClass=i.filter;if(e.get_filters().length==0){e.set_filters([Type.createInstance(this.filterClass,[])])}var s=0;var a=e.get_filters();while(s<a.length){var r=a[s];++s;if(js_Boot.__instanceof(r,this.filterClass)){this.filter=r}}}else{this.filterIndex=i.filter;this.filter=e.get_filters()[this.filterIndex]}};$hxClasses["motion.actuators.FilterActuator"]=motion_actuators_FilterActuator;motion_actuators_FilterActuator.__name__=["motion","actuators","FilterActuator"];motion_actuators_FilterActuator.__super__=motion_actuators_SimpleActuator;motion_actuators_FilterActuator.prototype=$extend(motion_actuators_SimpleActuator.prototype,{filter:null,filterClass:null,filterIndex:null,apply:function(){var e=0;var t=Reflect.fields(this.properties);while(e<t.length){var i=t[e];++e;if(i!="filter"){this.filter[i]=Reflect.field(this.properties,i)}}var s=this.target;var a=null;if(Object.prototype.hasOwnProperty.call(s,"filters")){a=Reflect.field(s,"filters")}else{a=Reflect.getProperty(s,"filters")}var r=a;r[this.properties.filter]=this.filter;var n=this.target;if(Object.prototype.hasOwnProperty.call(n,"filters")){n["filters"]=r}else{Reflect.setProperty(n,"filters",r)}},initialize:function(){var e;var t;var i=0;var s=Reflect.fields(this.properties);while(i<s.length){var a=s[i];++i;if(a!="filter"){var r=this.filter;var n=null;if(Object.prototype.hasOwnProperty.call(r,a)){n=Reflect.field(r,a)}else{n=Reflect.getProperty(r,a)}t=n;e=new motion_actuators_PropertyDetails(this.filter,a,t,Reflect.field(this.properties,a)-t);this.propertyDetails.push(e)}}this.detailsLength=this.propertyDetails.length;this.initialized=true},update:function(e){motion_actuators_SimpleActuator.prototype.update.call(this,e);var t=this.target.get_filters();if(this.filterIndex>-1){t[this.properties.filter]=this.filter}else{var i=0;var s=t.length;while(i<s){var a=i++;if(js_Boot.__instanceof(t[a],this.filterClass)){t[a]=this.filter}}}var r=this.target;if(Object.prototype.hasOwnProperty.call(r,"filters")){r["filters"]=t}else{Reflect.setProperty(r,"filters",t)}},__class__:motion_actuators_FilterActuator});var motion_actuators_MethodActuator=function(e,t,i){this.currentParameters=[];this.tweenProperties={};motion_actuators_SimpleActuator.call(this,e,t,i);if(!Object.prototype.hasOwnProperty.call(i,"start")){this.properties.start=[]}if(!Object.prototype.hasOwnProperty.call(i,"end")){this.properties.end=this.properties.start}var s=0;var a=this.properties.start.length;while(s<a){var r=s++;this.currentParameters.push(this.properties.start[r])}};$hxClasses["motion.actuators.MethodActuator"]=motion_actuators_MethodActuator;motion_actuators_MethodActuator.__name__=["motion","actuators","MethodActuator"];motion_actuators_MethodActuator.__super__=motion_actuators_SimpleActuator;motion_actuators_MethodActuator.prototype=$extend(motion_actuators_SimpleActuator.prototype,{currentParameters:null,tweenProperties:null,apply:function(){var e=this.target;var t=this.properties.end;if(t==null){t=[]}e.apply(e,t)},complete:function(e){if(e==null){e=true}var t=0;var i=this.properties.start.length;while(t<i){var s=t++;this.currentParameters[s]=Reflect.field(this.tweenProperties,"param"+s)}var a=this.target;var r=this.currentParameters;if(r==null){r=[]}a.apply(a,r);motion_actuators_SimpleActuator.prototype.complete.call(this,e)},initialize:function(){var e;var t;var i;var s=0;var a=this.properties.start.length;while(s<a){var r=s++;t="param"+r;i=this.properties.start[r];this.tweenProperties[t]=i;if(typeof i=="number"||typeof i=="number"&&(i|0)===i){e=new motion_actuators_PropertyDetails(this.tweenProperties,t,i,this.properties.end[r]-i);this.propertyDetails.push(e)}}this.detailsLength=this.propertyDetails.length;this.initialized=true},update:function(e){motion_actuators_SimpleActuator.prototype.update.call(this,e);if(this.active&&!this.paused){var t=0;var i=this.properties.start.length;while(t<i){var s=t++;this.currentParameters[s]=Reflect.field(this.tweenProperties,"param"+s)}var a=this.target;var r=this.currentParameters;if(r==null){r=[]}a.apply(a,r)}},__class__:motion_actuators_MethodActuator});var motion_actuators_MotionPathActuator=function(e,t,i){motion_actuators_SimpleActuator.call(this,e,t,i)};$hxClasses["motion.actuators.MotionPathActuator"]=motion_actuators_MotionPathActuator;motion_actuators_MotionPathActuator.__name__=["motion","actuators","MotionPathActuator"];motion_actuators_MotionPathActuator.__super__=motion_actuators_SimpleActuator;motion_actuators_MotionPathActuator.prototype=$extend(motion_actuators_SimpleActuator.prototype,{apply:function(){var e=0;var t=Reflect.fields(this.properties);while(e<t.length){var i=t[e];++e;if(Object.prototype.hasOwnProperty.call(this.target,i)){this.target[i]=js_Boot.__cast(Reflect.field(this.properties,i),motion_IComponentPath).get_end()}else{Reflect.setProperty(this.target,i,js_Boot.__cast(Reflect.field(this.properties,i),motion_IComponentPath).get_end())}}},initialize:function(){var e;var t;var i=0;var s=Reflect.fields(this.properties);while(i<s.length){var a=s[i];++i;t=js_Boot.__cast(Reflect.field(this.properties,a),motion_IComponentPath);if(t!=null){var r=true;if(Object.prototype.hasOwnProperty.call(this.target,a)){t.start=Reflect.field(this.target,a)}else{r=false;t.start=Reflect.getProperty(this.target,a)}e=new motion_actuators_PropertyPathDetails(this.target,a,t,r);this.propertyDetails.push(e)}}this.detailsLength=this.propertyDetails.length;this.initialized=true},update:function(e){if(!this.paused){var t;var i;var s=(e-this.timeOffset)/this.duration;if(s>1){s=1}if(!this.initialized){this.initialize()}if(!this.special){i=this._ease.calculate(s);var a=0;var r=this.propertyDetails;while(a<r.length){var n=r[a];++a;if(n.isField){n.target[n.propertyName]=js_Boot.__cast(n,motion_actuators_PropertyPathDetails).path.calculate(i)}else{Reflect.setProperty(n.target,n.propertyName,js_Boot.__cast(n,motion_actuators_PropertyPathDetails).path.calculate(i))}}}else{if(!this._reverse){i=this._ease.calculate(s)}else{i=this._ease.calculate(1-s)}var _;var o=0;var l=this.propertyDetails;while(o<l.length){var h=l[o];++o;if(!this._snapping){if(h.isField){h.target[h.propertyName]=js_Boot.__cast(h,motion_actuators_PropertyPathDetails).path.calculate(i)}else{Reflect.setProperty(h.target,h.propertyName,js_Boot.__cast(h,motion_actuators_PropertyPathDetails).path.calculate(i))}}else if(h.isField){h.target[h.propertyName]=Math.round(js_Boot.__cast(h,motion_actuators_PropertyPathDetails).path.calculate(i))}else{Reflect.setProperty(h.target,h.propertyName,Math.round(js_Boot.__cast(h,motion_actuators_PropertyPathDetails).path.calculate(i)))}}}if(s==1){if(this._repeat==0){this.active=false;var c;if(this.toggleVisible){var u=this.target;var f=null;if(Object.prototype.hasOwnProperty.call(u,"alpha")){f=Reflect.field(u,"alpha")}else{f=Reflect.getProperty(u,"alpha")}c=f==0}else{c=false}if(c){var p=this.target;if(Object.prototype.hasOwnProperty.call(p,"visible")){p["visible"]=false}else{Reflect.setProperty(p,"visible",false)}}this.complete(true);return}else{if(this._onRepeat!=null){var d=this._onRepeat;var g=this._onRepeatParams;if(g==null){g=[]}d.apply(d,g)}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_MotionPathActuator});var motion_actuators_PropertyDetails=function(e,t,i,s,a){if(a==null){a=true}this.target=e;this.propertyName=t;this.start=i;this.change=s;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,i,s){if(s==null){s=true}motion_actuators_PropertyDetails.call(this,e,t,0,0,s);this.path=i};$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,i){motion_actuators_SimpleActuator.call(this,e,t,i)};$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 i=t;var s=this.endColorTransform;if(Object.prototype.hasOwnProperty.call(i,"colorTransform")){i["colorTransform"]=s}else{Reflect.setProperty(i,"colorTransform",s)}}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 i;var s;if(t<.5){i=1;s=t*2}else{i=1-(t-.5)*2;s=1}this.endColorTransform.redMultiplier=i;this.endColorTransform.greenMultiplier=i;this.endColorTransform.blueMultiplier=i;this.endColorTransform.redOffset=s*(e>>16&255);this.endColorTransform.greenOffset=s*(e>>8&255);this.endColorTransform.blueOffset=s*(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 n=null;if(Object.prototype.hasOwnProperty.call(r,"alpha")){n=Reflect.field(r,"alpha")}else{n=Reflect.getProperty(r,"alpha")}this.endColorTransform.alphaMultiplier=n}var _=this.target;var o=null;if(Object.prototype.hasOwnProperty.call(_,"transform")){o=Reflect.field(_,"transform")}else{o=Reflect.getProperty(_,"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(p<a.length){var d=a[p];++p;var g=null;if(Object.prototype.hasOwnProperty.call(c,d)){g=Reflect.field(c,d)}else{g=Reflect.getProperty(c,d)}f=g;var m=this.tweenColorTransform;var v=this.endColorTransform;var b=null;if(Object.prototype.hasOwnProperty.call(v,d)){b=Reflect.field(v,d)}else{b=Reflect.getProperty(v,d)}u=new motion_actuators_PropertyDetails(m,d,f,b-f);this.propertyDetails.push(u)}},initializeSound:function(){var e=this.target;var t=null;if(Object.prototype.hasOwnProperty.call(e,"soundTransform")){t=Reflect.field(e,"soundTransform")}else{t=Reflect.getProperty(e,"soundTransform")}if(t==null){var i=this.target;var s=new openfl_media_SoundTransform;if(Object.prototype.hasOwnProperty.call(i,"soundTransform")){i["soundTransform"]=s}else{Reflect.setProperty(i,"soundTransform",s)}}var a=this.target;var r=null;if(Object.prototype.hasOwnProperty.call(a,"soundTransform")){r=Reflect.field(a,"soundTransform")}else{r=Reflect.getProperty(a,"soundTransform")}var n=r;var _=this.target;var o=null;if(Object.prototype.hasOwnProperty.call(_,"soundTransform")){o=Reflect.field(_,"soundTransform")}else{o=Reflect.getProperty(_,"soundTransform")}this.endSoundTransform=o;this.tweenSoundTransform=new openfl_media_SoundTransform;if(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")){this.endSoundTransform.volume=this.properties.soundVolume;this.propertyDetails.push(new motion_actuators_PropertyDetails(this.tweenSoundTransform,"volume",n.volume,this.endSoundTransform.volume-n.volume))}if(Object.prototype.hasOwnProperty.call(this.properties,"soundPan")){this.endSoundTransform.pan=this.properties.soundPan;this.propertyDetails.push(new motion_actuators_PropertyDetails(this.tweenSoundTransform,"pan",n.pan,this.endSoundTransform.pan-n.pan))}},update:function(e){motion_actuators_SimpleActuator.prototype.update.call(this,e);if(this.endColorTransform!=null){var t=this.target;var i=null;if(Object.prototype.hasOwnProperty.call(t,"transform")){i=Reflect.field(t,"transform")}else{i=Reflect.getProperty(t,"transform")}var s=i;var a=this.tweenColorTransform;if(Object.prototype.hasOwnProperty.call(s,"colorTransform")){s["colorTransform"]=a}else{Reflect.setProperty(s,"colorTransform",a)}}if(this.endSoundTransform!=null){var r=this.target;var n=this.tweenSoundTransform;if(Object.prototype.hasOwnProperty.call(r,"soundTransform")){r["soundTransform"]=n}else{Reflect.setProperty(r,"soundTransform",n)}}},__class__:motion_actuators_TransformActuator});var motion_easing_Bounce=function(){};$hxClasses["motion.easing.Bounce"]=motion_easing_Bounce;motion_easing_Bounce.__name__=["motion","easing","Bounce"];motion_easing_Bounce.__properties__={get_easeOut:"get_easeOut"};motion_easing_Bounce.get_easeOut=function(){return new motion_easing_BounceEaseOut};var motion_easing_BounceEaseOut=function(){};$hxClasses["motion.easing.BounceEaseOut"]=motion_easing_BounceEaseOut;motion_easing_BounceEaseOut.__name__=["motion","easing","BounceEaseOut"];motion_easing_BounceEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_BounceEaseOut.prototype={calculate:function(e){var t=e;if((t/=1)<.36363636363636365){return 7.5625*t*t}else if(t<.7272727272727273){return 7.5625*(t-=.5454545454545454)*t+.75}else if(t<.9090909090909091){return 7.5625*(t-=.8181818181818182)*t+.9375}else{return 7.5625*(t-=.9545454545454546)*t+.984375}},__class__:motion_easing_BounceEaseOut};var motion_easing_Elastic=function(){};$hxClasses["motion.easing.Elastic"]=motion_easing_Elastic;motion_easing_Elastic.__name__=["motion","easing","Elastic"];motion_easing_Elastic.__properties__={get_easeOut:"get_easeOut"};motion_easing_Elastic.get_easeOut=function(){return new motion_easing_ElasticEaseOut(.1,.4)};var motion_easing_ElasticEaseOut=function(e,t){this.a=e;this.p=t};$hxClasses["motion.easing.ElasticEaseOut"]=motion_easing_ElasticEaseOut;motion_easing_ElasticEaseOut.__name__=["motion","easing","ElasticEaseOut"];motion_easing_ElasticEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_ElasticEaseOut.prototype={a:null,p:null,calculate:function(e){if(e==0){return 0}if(e==1){return 1}var t;if(this.a<1){this.a=1;t=this.p/4}else{t=this.p/(2*Math.PI)*Math.asin(1/this.a)}return this.a*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/this.p)+1},__class__:motion_easing_ElasticEaseOut};var motion_easing_Linear=function(){};$hxClasses["motion.easing.Linear"]=motion_easing_Linear;motion_easing_Linear.__name__=["motion","easing","Linear"];motion_easing_Linear.__properties__={get_easeNone:"get_easeNone"};motion_easing_Linear.get_easeNone=function(){return new motion_easing_LinearEaseNone};var motion_easing_LinearEaseNone=function(){};$hxClasses["motion.easing.LinearEaseNone"]=motion_easing_LinearEaseNone;motion_easing_LinearEaseNone.__name__=["motion","easing","LinearEaseNone"];motion_easing_LinearEaseNone.__interfaces__=[motion_easing_IEasing];motion_easing_LinearEaseNone.prototype={calculate:function(e){return e},__class__:motion_easing_LinearEaseNone};var motion_easing_Quad=function(){};$hxClasses["motion.easing.Quad"]=motion_easing_Quad;motion_easing_Quad.__name__=["motion","easing","Quad"];motion_easing_Quad.__properties__={get_easeOut:"get_easeOut"};motion_easing_Quad.get_easeOut=function(){return new motion_easing_QuadEaseOut};var motion_easing_QuadEaseOut=function(){};$hxClasses["motion.easing.QuadEaseOut"]=motion_easing_QuadEaseOut;motion_easing_QuadEaseOut.__name__=["motion","easing","QuadEaseOut"];motion_easing_QuadEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_QuadEaseOut.prototype={calculate:function(e){return-e*(e-2)},__class__:motion_easing_QuadEaseOut};var motion_easing_Quart=function(){};$hxClasses["motion.easing.Quart"]=motion_easing_Quart;motion_easing_Quart.__name__=["motion","easing","Quart"];motion_easing_Quart.__properties__={get_easeOut:"get_easeOut"};motion_easing_Quart.get_easeOut=function(){return new motion_easing_QuartEaseOut};var motion_easing_QuartEaseOut=function(){};$hxClasses["motion.easing.QuartEaseOut"]=motion_easing_QuartEaseOut;motion_easing_QuartEaseOut.__name__=["motion","easing","QuartEaseOut"];motion_easing_QuartEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_QuartEaseOut.prototype={calculate:function(e){return-(--e*e*e*e-1)},__class__:motion_easing_QuartEaseOut};var motion_easing_Sine=function(){};$hxClasses["motion.easing.Sine"]=motion_easing_Sine;motion_easing_Sine.__name__=["motion","easing","Sine"];motion_easing_Sine.__properties__={get_easeOut:"get_easeOut"};motion_easing_Sine.get_easeOut=function(){return new motion_easing_SineEaseOut};var motion_easing_SineEaseOut=function(){};$hxClasses["motion.easing.SineEaseOut"]=motion_easing_SineEaseOut;motion_easing_SineEaseOut.__name__=["motion","easing","SineEaseOut"];motion_easing_SineEaseOut.__interfaces__=[motion_easing_IEasing];motion_easing_SineEaseOut.prototype={calculate:function(e){return Math.sin(e*(Math.PI/2))},__class__:motion_easing_SineEaseOut};var openfl_Lib=function(){};$hxClasses["openfl.Lib"]=openfl_Lib;openfl_Lib.__name__=["openfl","Lib"];openfl_Lib.__properties__={get_current:"get_current"};openfl_Lib.getTimer=function(){return lime_system_System.getTimer()};openfl_Lib.getURL=function(e,t){openfl_Lib.navigateToURL(e,t)};openfl_Lib.navigateToURL=function(e,t){if(t==null){t="_blank"}var i=e.url;if(Type["typeof"](e.data)==ValueType.TObject){var s="";var a=Reflect.fields(e.data);var r=0;while(r<a.length){var n=a[r];++r;if(s.length>0){s+="&"}var _=encodeURIComponent(n)+"=";var o=Std.string(Reflect.field(e.data,n));s+=_+encodeURIComponent(o)}if(i.indexOf("?")>-1){i+="&"+s}else{i+="?"+s}}lime_system_System.openURL(i,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 i=t;var s=e;while(i<s){var a=i++;this.__array[a]=false}}else{while(this.__array.length>e)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,i,s){if(s==null){s=false}if(t==null){t=false}if(e==null){e=0}if(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a<r){var n=a++;this.__array[n]=i[n]}}}else{if(i==null){i=[]}this.__array=i}if(e>0){this.set_length(e)}this.fixed=t};$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(0,false,this.__array.slice())}else{var t=e;if(t.__array.length>0){return new openfl__$Vector_FloatVector(0,false,this.__array.concat(t.__array))}else{return new openfl__$Vector_FloatVector(0,false,this.__array.slice())}}},copy:function(){return new openfl__$Vector_FloatVector(0,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||e<this.__array.length){return this.__array[e]=t}else{return t}},toJSON:function(){return this.__array},get_length:function(){return this.__array.length},set_length:function(e){if(e!=this.__array.length&&!this.fixed){var t=this.__array.length;if(e<0){e=0}if(e>t){var i=t;var s=e;while(i<s){var a=i++;this.__array[a]=0}}else{while(this.__array.length>e)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 i=t;var s=e;while(i<s){var a=i++;this.__array[a]=null}}else{while(this.__array.length>e)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,i){if(t==null){t=false}if(e==null){e=0}if(i==null){i=[]}this.__array=i;if(e>0){this.set_length(e)}this.fixed=t};$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 i=t;var s=e;while(i<s){var a=i++;this.__array[a]=0}}else{while(this.__array.length>e)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,i,s){if(s==null){s=false}if(t==null){t=false}if(e==null){e=0}if(s){this.__array=[];if(i!=null){var a=0;var r=i.length;while(a<r){var n=a++;this.__array[n]=i[n]}}}else{if(i==null){i=[]}this.__array=i}if(e>0){this.set_length(e)}this.fixed=t};$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 i=t;var s=this.__array.length;while(i<s){var a=i++;if(this.__array[a]==e){return a}}return-1},push:function(e){if(!this.fixed){return this.__array.push(e)}else{return this.__array.length}},set:function(e,t){if(!this.fixed||e<this.__array.length){return this.__array[e]=t}else{return t}},sort:function(e){this.__array.sort(e)},splice:function(e,t){return new openfl__$Vector_ObjectVector(0,false,this.__array.splice(e,t))},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 i=t;var s=e;while(i<s){var a=i++;this.__array.push(null)}}else{while(this.__array.length>e)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 i=e.readInt();var s=new haxe__$Int64__$_$_$Int64(i,t);return s};openfl__$internal_formats_agal_AGALConverter.convertToGLSL=function(e,t){e.position=0;e.__endian=1;var i=e.readByte()&255;if(i==176){return e.readUTF()}if(i!=160){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Magic value must be 0xA0, may not be AGAL"))}var s=e.readInt();if(s!=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 n=new openfl__$internal_formats_agal_RegisterMap;var _="";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);_+="\t";switch(l){case 0:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+"; // mov");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 1:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" + "+d.toGLSL()+"; // add");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 2:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" - "+d.toGLSL()+"; // sub");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 3:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL()+"; // mul");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 4:_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" / "+d.toGLSL()+"; // div");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 5:var g=p.toGLSL();if(g.indexOf(".")>-1){_+=Std.string(f.toGLSL()+" = 1.0 / "+p.toGLSL()+"; // rcp")}else{_+=Std.string(f.toGLSL()+" = vec4(1) / "+p.toGLSL()+"; // rcp")}n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 6:_+=Std.string(f.toGLSL()+" = min("+p.toGLSL()+", "+d.toGLSL()+"); // min");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 7:_+=Std.string(f.toGLSL()+" = max("+p.toGLSL()+", "+d.toGLSL()+"); // max");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 8:_+=Std.string(f.toGLSL()+" = fract("+p.toGLSL()+"); // frc");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 9:_+=Std.string(f.toGLSL()+" = sqrt("+p.toGLSL()+"); // sqrt");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 10:_+=Std.string(f.toGLSL()+" = inversesqrt("+p.toGLSL()+"); // rsq");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 11:_+=Std.string(f.toGLSL()+" = pow("+p.toGLSL()+", "+d.toGLSL()+"); // pow");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 12:_+=Std.string(f.toGLSL()+" = log2("+p.toGLSL()+"); // log");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 13:_+=Std.string(f.toGLSL()+" = exp2("+p.toGLSL()+"); // exp");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 14:_+=Std.string(f.toGLSL()+" = normalize("+p.toGLSL()+"); // normalize");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 15:_+=Std.string(f.toGLSL()+" = sin("+p.toGLSL()+"); // sin");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 16:_+=Std.string(f.toGLSL()+" = cos("+p.toGLSL()+"); // cos");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 17:p.sourceMask=d.sourceMask=7;_+=Std.string(f.toGLSL()+" = cross(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")); // crs");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 18:p.sourceMask=d.sourceMask=7;_+=Std.string(f.toGLSL()+" = vec4(dot(vec3("+p.toGLSL()+"), vec3("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp3");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 19:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(dot(vec4("+p.toGLSL()+"), vec4("+d.toGLSL()+")))"+f.getWriteMask()+"; // dp4");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 20:_+=Std.string(f.toGLSL()+" = abs("+p.toGLSL()+"); // abs");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 21:_+=Std.string(f.toGLSL()+" = -"+p.toGLSL()+"; // neg");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 22:_+=Std.string(f.toGLSL()+" = clamp("+p.toGLSL()+", 0.0, 1.0); // saturate");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 23:var m=n.getRegisterUsage(d);if(m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&m!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * mat3("+d.toGLSL(false)+"); // m33");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=7;_+=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");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 24:var v=n.getRegisterUsage(d);if(v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&v!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m44");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;_+=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");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,3)}break;case 25:f.mask&=7;var b=n.getRegisterUsage(d);if(b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4&&b!=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){_+=Std.string(f.toGLSL()+" = "+p.toGLSL()+" * "+d.toGLSL(false)+"; // m34");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4)}else{p.sourceMask=d.sourceMask=15;_+=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");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,0);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,1);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4,2)}break;case 39:p.sourceMask=15;_+=Std.string("if (any(lessThan("+p.toGLSL()+", vec4(0)))) discard;");n.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;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA);_+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");_+=Std.string("\t\t"+f.toGLSL()+" = vec4(texture2D("+y.toGLSL()+", "+p.toGLSL()+").xyz, texture2D("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");_+="\t} else {\n";_+=Std.string("\t\t"+f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex\n");_+="\t}"}else{p.sourceMask=3;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D);_+=Std.string(f.toGLSL()+" = texture2D("+y.toGLSL()+", "+p.toGLSL()+"); // tex")}break;case 1:if(y.t==2){p.sourceMask=7;n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA);_+=Std.string("if ("+y.toGLSL()+"_alphaEnabled) {\n");_+=Std.string("\t\t"+f.toGLSL()+" = vec4(textureCube("+y.toGLSL()+", "+p.toGLSL()+").xyz, textureCube("+y.toGLSL()+"_alpha, "+p.toGLSL()+").x); // tex + alpha\n");_+="\t} else {\n";_+=Std.string("\t\t"+f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");_+="\t}"}else{p.sourceMask=7;_+=Std.string(f.toGLSL()+" = textureCube("+y.toGLSL()+", "+p.toGLSL()+"); // tex");n.addSaR(y,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE)}break}n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.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;_+=Std.string(f.toGLSL()+" = vec4(greaterThanEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // ste");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 42:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(lessThan("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // slt");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 44:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(equal("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // seq");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;case 45:p.sourceMask=d.sourceMask=15;_+=Std.string(f.toGLSL()+" = vec4(notEqual("+p.toGLSL()+", "+d.toGLSL()+"))"+f.getWriteMask()+"; // sne");n.addDR(f,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(p,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);n.addSR(d,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Opcode "+l))}_+="\n"}if(openfl__$internal_formats_agal_AGALConverter.limitedProfile==null){var w=lime_graphics_opengl_GL.context.getParameter(7938);openfl__$internal_formats_agal_AGALConverter.limitedProfile=w.indexOf("OpenGL ES")>-1||w.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(n.toGLSL(false));if(r==openfl__$internal_formats_agal__$AGALConverter_ProgramType.VERTEX){k+="uniform vec4 vcPositionScale;\n"}k+="void main() {\n";k+=Std.string(n.toGLSL(true));k+=Std.string(_);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 i=new openfl__$internal_formats_agal__$AGALConverter_DestRegister;i.programType=t;i.type=e>>>24&15;i.mask=e>>>16&15;i.n=e&65535;return i};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,i,s){var a=0;var r=this.mEntries;while(a<r.length){var n=r[a];++a;if(n.type==e&&n.name==t&&n.number==i){if(n.usage!=s){throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("Cannot use register in multiple ways yet (mat4/vec4)"))}return}}var _=new openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry;_.type=e;_.name=t;_.number=i;_.usage=s;this.mEntries.push(_)},addDR:function(e,t){this.add(e.type,e.toGLSL(false),e.n,t)},addSaR:function(e,t){this.add(e.type,e.toGLSL(),e.n,t)},addSR:function(e,t,i){if(i==null){i=0}if(e.d!=0){this.add(e.itype,openfl__$internal_formats_agal_AGALConverter.prefixFromType(e.itype,e.programType)+e.n,e.n,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4);this.add(e.type,openfl__$internal_formats_agal_AGALConverter.prefixFromType(e.type,e.programType)+e.o,e.o,openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY);return}this.add(e.type,e.toGLSL(false,i),e.n+i,t)},getRegisterUsage:function(e){if(e.d!=0){return openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY}return this.getUsage(e.type,e.toGLSL(false),e.n)},getUsage:function(e,t,i){var s=0;var a=this.mEntries;while(s<a.length){var r=a[s];++s;if(r.type==e&&r.name==t&&r.number==i){return r.usage}}return openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.UNUSED},toGLSL:function(e){this.mEntries.sort(function(e,t){return e.number-t.number});var t;this.mEntries.sort(function(e,t){return js_Boot.__cast(e.type,Int)-js_Boot.__cast(t.type,Int)});var i="";var s=0;var a=this.mEntries.length;while(s<a){var r=s++;t=this.mEntries[r];if(e&&t.type!=2||!e&&t.type==2){continue}if(t.type==3){continue}var n=t.type;switch(n){case 0:i+="attribute ";break;case 1:i+="uniform ";break;case 2:i+="\t";break;case 3:break;case 4:i+="varying ";break;case 5:i+="uniform ";break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}var _=t.usage;switch(_[1]){case 0:lime_utils_Log.info("Missing switch patten: RegisterUsage.UNUSED",{fileName:"AGALConverter.hx",lineNumber:745,className:"openfl._internal.formats.agal.RegisterMap",methodName:"toGLSL"});break;case 1:i+="vec4 ";break;case 2:i+="mat4 ";break;case 3:i+="sampler2D ";break;case 4:break;case 5:i+="samplerCube ";break;case 6:break;case 7:i+="vec4 ";break}if(t.usage==openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA){i+="sampler2D ";i+=Std.string(t.name);i+=";\n";i+="uniform ";i+="sampler2D ";i+=Std.string(t.name+"_alpha");i+=";\n";i+="uniform ";i+="bool ";i+=Std.string(t.name+"_alphaEnabled");i+=";\n"}else if(t.usage==openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA){i+="samplerCube ";i+=Std.string(t.name);i+=";\n";i+="uniform ";i+="samplerCube ";i+=Std.string(t.name+"_alpha");i+=";\n";i+="uniform ";i+="bool ";i+=Std.string(t.name+"_alphaEnabled");i+=";\n"}else if(t.usage==openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY){i+=Std.string(t.name+"[128]");i+=";\n"}else{i+=Std.string(t.name);i+=";\n"}}return i},__class__:openfl__$internal_formats_agal_RegisterMap};var openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.RegisterMapEntry"]=openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry;openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry.__name__=["openfl","_internal","formats","agal","_AGALConverter","RegisterMapEntry"];openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry.prototype={name:null,number:null,type:null,usage:null,__class__:openfl__$internal_formats_agal__$AGALConverter_RegisterMapEntry};var openfl__$internal_formats_agal__$AGALConverter_RegisterUsage=$hxClasses["openfl._internal.formats.agal._AGALConverter.RegisterUsage"]={__ename__:["openfl","_internal","formats","agal","_AGALConverter","RegisterUsage"],__constructs__:["UNUSED","VECTOR_4","MATRIX_4_4","SAMPLER_2D","SAMPLER_2D_ALPHA","SAMPLER_CUBE","SAMPLER_CUBE_ALPHA","VECTOR_4_ARRAY"]};openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.UNUSED=["UNUSED",0];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.UNUSED.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.UNUSED.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4=["VECTOR_4",1];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4=["MATRIX_4_4",2];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.MATRIX_4_4.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D=["SAMPLER_2D",3];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA=["SAMPLER_2D_ALPHA",4];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_2D_ALPHA.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE=["SAMPLER_CUBE",5];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA=["SAMPLER_CUBE_ALPHA",6];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.SAMPLER_CUBE_ALPHA.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY=["VECTOR_4_ARRAY",7];openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY.toString=$estr;openfl__$internal_formats_agal__$AGALConverter_RegisterUsage.VECTOR_4_ARRAY.__enum__=openfl__$internal_formats_agal__$AGALConverter_RegisterUsage;var openfl__$internal_formats_agal__$AGALConverter_SamplerRegister=function(){};$hxClasses["openfl._internal.formats.agal._AGALConverter.SamplerRegister"]=openfl__$internal_formats_agal__$AGALConverter_SamplerRegister;openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.__name__=["openfl","_internal","formats","agal","_AGALConverter","SamplerRegister"];openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.parse=function(e,t){var i=new openfl__$internal_formats_agal__$AGALConverter_SamplerRegister;i.programType=t;var s=60;s&=63;var a;if(s==0){var r=new haxe__$Int64__$_$_$Int64(e.high,e.low);a=r}else if(s<32){var n=new haxe__$Int64__$_$_$Int64(e.high>>s,e.high<<32-s|e.low>>>s);a=n}else{var _=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>s-32);a=_}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);i.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);i.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 w=new haxe__$Int64__$_$_$Int64(e.high>>b,e.high<<32-b|e.low>>>b);y=w}else{var k=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>b-32);y=k}var P=new haxe__$Int64__$_$_$Int64(0,15);var C=P;var T=new haxe__$Int64__$_$_$Int64(y.high&C.high,y.low&C.low);i.w=T.low;var M=48;M&=63;var S;if(M==0){var $=new haxe__$Int64__$_$_$Int64(e.high,e.low);S=$}else if(M<32){var E=new haxe__$Int64__$_$_$Int64(e.high>>M,e.high<<32-M|e.low>>>M);S=E}else{var B=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>M-32);S=B}var L=new haxe__$Int64__$_$_$Int64(0,15);var R=L;var A=new haxe__$Int64__$_$_$Int64(S.high&R.high,S.low&R.low);i.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 j=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>I-32);D=j}var G=new haxe__$Int64__$_$_$Int64(0,15);var H=G;var U=new haxe__$Int64__$_$_$Int64(D.high&H.high,D.low&H.low);i.d=U.low;var N=40;N&=63;var W;if(N==0){var V=new haxe__$Int64__$_$_$Int64(e.high,e.low);W=V}else if(N<32){var z=new haxe__$Int64__$_$_$Int64(e.high>>N,e.high<<32-N|e.low>>>N);W=z}else{var X=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>N-32);W=X}var Y=new haxe__$Int64__$_$_$Int64(0,15);var J=Y;var K=new haxe__$Int64__$_$_$Int64(W.high&J.high,W.low&J.low);i.t=K.low;var q=32;q&=63;var Z;if(q==0){var Q=new haxe__$Int64__$_$_$Int64(e.high,e.low);Z=Q}else if(q<32){var ee=new haxe__$Int64__$_$_$Int64(e.high>>q,e.high<<32-q|e.low>>>q);Z=ee}else{var te=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>q-32);Z=te}var ie=new haxe__$Int64__$_$_$Int64(0,15);var se=ie;var ae=new haxe__$Int64__$_$_$Int64(Z.high&se.high,Z.low&se.low);i.type=ae.low;var re=16;re&=63;var ne;if(re==0){var _e=new haxe__$Int64__$_$_$Int64(e.high,e.low);ne=_e}else if(re<32){var oe=new haxe__$Int64__$_$_$Int64(e.high>>re,e.high<<32-re|e.low>>>re);ne=oe}else{var le=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>re-32);ne=le}var he=new haxe__$Int64__$_$_$Int64(0,255);var ce=he;var ue=new haxe__$Int64__$_$_$Int64(ne.high&ce.high,ne.low&ce.low);i.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);i.n=de.low;return i};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 i;var s=this.f;switch(s){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:i=2;break;case 1:i=1;break;case 2:i=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 n=(this.s&4)==4;var _=(this.s&1)==1;var o=this.t==2;var l=(this.b<<24>>24)/8;return new openfl__$internal_renderer_SamplerState(e,t,i,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,i){var s=new openfl__$internal_formats_agal__$AGALConverter_SourceRegister;s.programType=t;var a=63;a&=63;var r;if(a==0){var n=new haxe__$Int64__$_$_$Int64(e.high,e.low);r=n}else if(a<32){var _=new haxe__$Int64__$_$_$Int64(e.high>>a,e.high<<32-a|e.low>>>a);r=_}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);s.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);s.q=b.low;var y=40;y&=63;var x;if(y==0){var w=new haxe__$Int64__$_$_$Int64(e.high,e.low);x=w}else if(y<32){var k=new haxe__$Int64__$_$_$Int64(e.high>>y,e.high<<32-y|e.low>>>y);x=k}else{var P=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>y-32);x=P}var C=new haxe__$Int64__$_$_$Int64(0,15);var T=C;var M=new haxe__$Int64__$_$_$Int64(x.high&T.high,x.low&T.low);s.itype=M.low;var S=32;S&=63;var $;if(S==0){var E=new haxe__$Int64__$_$_$Int64(e.high,e.low);$=E}else if(S<32){var B=new haxe__$Int64__$_$_$Int64(e.high>>S,e.high<<32-S|e.low>>>S);$=B}else{var L=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>S-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);s.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 j=new haxe__$Int64__$_$_$Int64(e.high>>D,e.high<<32-D|e.low>>>D);F=j}else{var G=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>D-32);F=G}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);s.s=N.low;var W=16;W&=63;var V;if(W==0){var z=new haxe__$Int64__$_$_$Int64(e.high,e.low);V=z}else if(W<32){var X=new haxe__$Int64__$_$_$Int64(e.high>>W,e.high<<32-W|e.low>>>W);V=X}else{var Y=new haxe__$Int64__$_$_$Int64(e.high>>31,e.high>>W-32);V=Y}var J=new haxe__$Int64__$_$_$Int64(0,255);var K=J;var q=new haxe__$Int64__$_$_$Int64(V.high&K.high,V.low&K.low);s.o=q.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);s.n=ee.low;s.sourceMask=i;return s};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 i=this.s==228&&this.sourceMask==15;var s="";if(this.type!=5&&!i){var a=0;while(a<4){var r=a++;if((this.sourceMask&1<<r)!=0){var n=this.s>>r*2&3;switch(n){case 0:s+="x";break;case 1:s+="y";break;case 2:s+="z";break;case 3:s+="w";break}}}}var _=openfl__$internal_formats_agal_AGALConverter.prefixFromType(this.type,this.programType);if(this.d==0){_+=this.n+t}else{_+=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;_+="[ int("+l+") +"+t+"]"}if(e&&s!=""){_+="."+s}return _},__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,i){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 s=e.split("<");if(s.length==1){e=e.replace(openfl__$internal_formats_html_HTMLParser.__regexHTMLTag.r,"");if(i.get_length()>1){i.splice(1,i.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=i.get(0);a.format=t;a.start=0;a.end=e.length;return e}else{i.splice(0,i.get_length());e="";var r;var n=0;var _=s.length;while(n<_){var o=n++;r=s[o];r=r.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[3].r,"<");r=r.replace(openfl__$internal_formats_html_HTMLParser.__regexEntities[4].r,">");s[o]=r}var l=[t.clone()];var h=[];var c;var u=false;var f=0;while(f<s.length){var p=s[f];++f;if(p==""){continue}var d=HxOverrides.substr(p,0,1)=="/";var g=p.indexOf(">");var m=g+1;var v=p.indexOf(" ");var b=p.substring(d?1:0,v>-1&&v<g?v:g);var y;if(d){if(b.toLowerCase()!=h[h.length-1].toLowerCase()){lime_utils_Log.info("Invalid HTML, unexpected closing tag ignored: "+b,{fileName:"HTMLParser.hx",lineNumber:97,className:"openfl._internal.formats.html.HTMLParser",methodName:"parse"});continue}h.pop();l.pop();y=l[l.length-1].clone();if(b.toLowerCase()=="p"&&i.get_length()>0){e+="\n";u=true}if(m<p.length){c=HxOverrides.substr(p,m,null);i.push(new openfl__$internal_text_TextFormatRange(y,e.length,e.length+c.length));e+=c;u=false}}else{y=l[l.length-1].clone();if(g>-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 w=openfl__$internal_formats_html_HTMLParser.__getAttributeMatch(openfl__$internal_formats_html_HTMLParser.__regexSize);var k=HxOverrides.cca(w,0);if(k==43||k==45){var P=l.length>=2?l[l.length-2]:t;y.size=P.size+Std.parseInt(w)}else{y.size=Std.parseInt(w)}}break;case"p":if(i.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 M=[];var S=0;while(S<T.length){var $=T[S];++S;M.push(Std.parseInt($))}y.tabStops=M}break;case"u":y.underline=true;break}l.push(y);h.push(b);if(m<p.length){c=p.substring(m);i.push(new openfl__$internal_text_TextFormatRange(y,e.length,e.length+c.length));e+=c;u=false}}else{i.push(new openfl__$internal_text_TextFormatRange(y,e.length,e.length+p.length));e+=p;u=false}}}if(i.get_length()==0){i.push(new openfl__$internal_text_TextFormatRange(l[0],0,0))}}return e};openfl__$internal_formats_html_HTMLParser.__getAttributeMatch=function(e){if(e.matched(2)!=null){return e.matched(2)}else{return e.matched(3)}};var openfl__$internal_formats_swf_FilterType=$hxClasses["openfl._internal.formats.swf.FilterType"]={__ename__:["openfl","_internal","formats","swf","FilterType"],__constructs__:["BlurFilter","ColorMatrixFilter","DropShadowFilter","GlowFilter"]};openfl__$internal_formats_swf_FilterType.BlurFilter=function(e,t,i){var s=["BlurFilter",0,e,t,i];s.__enum__=openfl__$internal_formats_swf_FilterType;s.toString=$estr;return s};openfl__$internal_formats_swf_FilterType.ColorMatrixFilter=function(e){var t=["ColorMatrixFilter",1,e];t.__enum__=openfl__$internal_formats_swf_FilterType;t.toString=$estr;return t};openfl__$internal_formats_swf_FilterType.DropShadowFilter=function(e,t,i,s,a,r,n,_,o,l,h){var c=["DropShadowFilter",2,e,t,i,s,a,r,n,_,o,l,h];c.__enum__=openfl__$internal_formats_swf_FilterType;c.toString=$estr;return c};openfl__$internal_formats_swf_FilterType.GlowFilter=function(e,t,i,s,a,r,n,_){var o=["GlowFilter",3,e,t,i,s,a,r,n,_];o.__enum__=openfl__$internal_formats_swf_FilterType;o.toString=$estr;return o};var openfl__$internal_formats_swf_SWFLite=function(){this.symbols=new haxe_ds_IntMap;this.symbolsByClassName=new haxe_ds_StringMap};$hxClasses["openfl._internal.formats.swf.SWFLite"]=openfl__$internal_formats_swf_SWFLite;openfl__$internal_formats_swf_SWFLite.__name__=["openfl","_internal","formats","swf","SWFLite"];openfl__$internal_formats_swf_SWFLite.resolveClass=function(e){var t=Type.resolveClass(e);if(t==null){t=Type.resolveClass(StringTools.replace(e,"openfl._legacy","openfl"))}if(t==null){t=Type.resolveClass(StringTools.replace(e,"openfl._v2","openfl"))}return t};openfl__$internal_formats_swf_SWFLite.resolveEnum=function(e){var t=Type.resolveEnum(e);if(t==null){t=Type.resolveEnum(StringTools.replace(e,"openfl._legacy","openfl"))}if(t==null){t=Type.resolveEnum(StringTools.replace(e,"openfl._v2","openfl"))}return t};openfl__$internal_formats_swf_SWFLite.unserialize=function(e){if(e==null){return null}var t=new haxe_Unserializer(e);t.setResolver({resolveClass:openfl__$internal_formats_swf_SWFLite.resolveClass,resolveEnum:openfl__$internal_formats_swf_SWFLite.resolveEnum});var i=t.unserialize();if(i!=null){i.__init()}return i};openfl__$internal_formats_swf_SWFLite.prototype={frameRate:null,library:null,root:null,symbols:null,symbolsByClassName:null,createButton:function(e){return null},createMovieClip:function(e){if(e==null){e=""}if(e==""){return this.root.__createObject(this)}else{var t=this.symbolsByClassName;var i=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(i!=null){if(js_Boot.__instanceof(i,openfl__$internal_symbols_SpriteSymbol)){return js_Boot.__cast(i,openfl__$internal_symbols_SpriteSymbol).__createObject(this)}}}return null},getBitmapData:function(e){var t=this.symbolsByClassName;var i=__map_reserved[e]!=null?t.getReserved(e):t.h[e];if(i!=null){if(js_Boot.__instanceof(i,openfl__$internal_symbols_BitmapSymbol)){var s=i;return openfl_utils_Assets.getBitmapData(s.path)}}return null},hasSymbol:function(e){var t=this.symbolsByClassName;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},serialize:function(){var e=new haxe_Serializer;e.serialize(this);return e.toString()},__init:function(){var e=this.symbols.iterator();while(e.hasNext()){var t=e.next();if(t==null||t.className==null){continue}var i=t.className;var s=this.symbolsByClassName;if(__map_reserved[i]!=null){s.setReserved(i,t)}else{s.h[i]=t}}},__class__:openfl__$internal_formats_swf_SWFLite};var openfl_utils_AssetLibrary=function(){lime_utils_AssetLibrary.call(this)};$hxClasses["openfl.utils.AssetLibrary"]=openfl_utils_AssetLibrary;openfl_utils_AssetLibrary.__name__=["openfl","utils","AssetLibrary"];openfl_utils_AssetLibrary.fromBytes=function(e,t){return openfl_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(e),t))};openfl_utils_AssetLibrary.fromFile=function(e,t){return openfl_utils_AssetLibrary.fromManifest(lime_utils_AssetManifest.fromFile(e,t))};openfl_utils_AssetLibrary.fromManifest=function(e){var t=lime_utils_AssetLibrary.fromManifest(e);if(t!=null){if(js_Boot.__instanceof(t,openfl_utils_AssetLibrary)){return t}else{var i=new openfl_utils_AssetLibrary;i.__proxy=t;return i}}else{return null}};openfl_utils_AssetLibrary.loadFromBytes=function(e,t){return lime_utils_AssetManifest.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(e),t).then(function(e){return openfl_utils_AssetLibrary.loadFromManifest(e)})};openfl_utils_AssetLibrary.loadFromFile=function(e,t){return lime_utils_AssetManifest.loadFromFile(e,t).then(function(e){return openfl_utils_AssetLibrary.loadFromManifest(e)})};openfl_utils_AssetLibrary.loadFromManifest=function(e){var t=openfl_utils_AssetLibrary.fromManifest(e);if(t!=null){return t.load().then(function(e){return lime_app_Future.withValue(e)})}else{return lime_app_Future.withError("Could not load asset manifest")}};openfl_utils_AssetLibrary.__super__=lime_utils_AssetLibrary;openfl_utils_AssetLibrary.prototype=$extend(lime_utils_AssetLibrary.prototype,{__proxy:null,exists:function(e,t){if(this.__proxy!=null){return this.__proxy.exists(e,t)}else{return lime_utils_AssetLibrary.prototype.exists.call(this,e,t)}},getAsset:function(e,t){if(this.__proxy!=null){return this.__proxy.getAsset(e,t)}else{return lime_utils_AssetLibrary.prototype.getAsset.call(this,e,t)}},getAudioBuffer:function(e){if(this.__proxy!=null){return this.__proxy.getAudioBuffer(e)}else{return lime_utils_AssetLibrary.prototype.getAudioBuffer.call(this,e)}},getBytes:function(e){if(this.__proxy!=null){return this.__proxy.getBytes(e)}else{return lime_utils_AssetLibrary.prototype.getBytes.call(this,e)}},getFont:function(e){if(this.__proxy!=null){return this.__proxy.getFont(e)}else{return lime_utils_AssetLibrary.prototype.getFont.call(this,e)}},getImage:function(e){if(this.__proxy!=null){return this.__proxy.getImage(e)}else{return lime_utils_AssetLibrary.prototype.getImage.call(this,e)}},getMovieClip:function(e){return null},getText:function(e){if(this.__proxy!=null){return this.__proxy.getText(e)}else{return lime_utils_AssetLibrary.prototype.getText.call(this,e)}},isLocal:function(e,t){if(this.__proxy!=null){return this.__proxy.isLocal(e,t)}else{return lime_utils_AssetLibrary.prototype.isLocal.call(this,e,t)}},load:function(){if(this.__proxy!=null){return this.__proxy.load()}else{return lime_utils_AssetLibrary.prototype.load.call(this)}},loadAudioBuffer:function(e){if(this.__proxy!=null){return this.__proxy.loadAudioBuffer(e)}else{return lime_utils_AssetLibrary.prototype.loadAudioBuffer.call(this,e)}},loadBytes:function(e){if(this.__proxy!=null){return this.__proxy.loadBytes(e)}else{return lime_utils_AssetLibrary.prototype.loadBytes.call(this,e)}},loadFont:function(e){if(this.__proxy!=null){return this.__proxy.loadFont(e)}else{return lime_utils_AssetLibrary.prototype.loadFont.call(this,e)}},loadImage:function(e){if(this.__proxy!=null){return this.__proxy.loadImage(e)}else{return lime_utils_AssetLibrary.prototype.loadImage.call(this,e)}},loadText:function(e){if(this.__proxy!=null){return this.__proxy.loadText(e)}else{return lime_utils_AssetLibrary.prototype.loadText.call(this,e)}},unload:function(){if(this.__proxy!=null){this.__proxy.unload();return}else{lime_utils_AssetLibrary.prototype.unload.call(this);return}},__class__:openfl_utils_AssetLibrary});var openfl__$internal_formats_swf_SWFLiteLibrary=function(e,t){openfl_utils_AssetLibrary.call(this);this.id=e;this.instanceID=t!=null?t:e;this.alphaCheck=new haxe_ds_StringMap;this.imageClassNames=new haxe_ds_StringMap;this.rootPath=""};$hxClasses["openfl._internal.formats.swf.SWFLiteLibrary"]=openfl__$internal_formats_swf_SWFLiteLibrary;openfl__$internal_formats_swf_SWFLiteLibrary.__name__=["openfl","_internal","formats","swf","SWFLiteLibrary"];openfl__$internal_formats_swf_SWFLiteLibrary.__super__=openfl_utils_AssetLibrary;openfl__$internal_formats_swf_SWFLiteLibrary.prototype=$extend(openfl_utils_AssetLibrary.prototype,{alphaCheck:null,id:null,imageClassNames:null,instanceID:null,preloading:null,rootPath:null,swf:null,exists:function(e,t){if(this.swf==null){return false}if(e==""&&t=="MOVIE_CLIP"){return true}if(t=="IMAGE"||t=="MOVIE_CLIP"){if(this.swf!=null){return this.swf.hasSymbol(e)}else{return false}}return false},getImage:function(e){var t=this.imageClassNames;if(__map_reserved[e]!=null?t.existsReserved(e):t.h.hasOwnProperty(e)){var i=this.imageClassNames;if(__map_reserved[e]!=null){e=i.getReserved(e)}else{e=i.h[e]}}var s=this.alphaCheck;if(!(__map_reserved[e]!=null?s.existsReserved(e):s.h.hasOwnProperty(e))){var a=this.swf.symbols.iterator();while(a.hasNext()){var r=a.next();if(js_Boot.__instanceof(r,openfl__$internal_symbols_BitmapSymbol)&&js_Boot.__cast(r,openfl__$internal_symbols_BitmapSymbol).path==e){var n=r;if(n.alpha!=null){var _=openfl_utils_AssetLibrary.prototype.getImage.call(this,e);var o=openfl_utils_AssetLibrary.prototype.getImage.call(this,n.alpha);this.__copyChannel(_,o);var l=this.cachedImages;if(__map_reserved[e]!=null){l.setReserved(e,_)}else{l.h[e]=_}this.cachedImages.remove(n.alpha);var h=this.alphaCheck;if(__map_reserved[e]!=null){h.setReserved(e,true)}else{h.h[e]=true}return _}}}var c=this.alphaCheck;if(__map_reserved[e]!=null){c.setReserved(e,true)}else{c.h[e]=true}}return openfl_utils_AssetLibrary.prototype.getImage.call(this,e)},getMovieClip:function(e){if(this.swf!=null){return this.swf.createMovieClip(e)}else{return null}},isLocal:function(e,t){return true},load:function(){var u=this;if(this.id!=null){var e=this.id;var t=this.preload;if(__map_reserved[e]!=null){t.setReserved(e,true)}else{t.h[e]=true}}var f=new lime_app_Promise;this.preloading=true;var i=function(e){var t=u.id;var i=u.cachedText;if(__map_reserved[t]!=null){i.setReserved(t,e)}else{i.h[t]=e}u.swf=openfl__$internal_formats_swf_SWFLite.unserialize(e);u.swf.library=u;var s;var a=u.swf.symbols.iterator();while(a.hasNext()){var r=a.next();if(js_Boot.__instanceof(r,openfl__$internal_symbols_BitmapSymbol)){s=r;if(s.className!=null){var n=s.className;var _=s.path;var o=u.imageClassNames;if(__map_reserved[n]!=null){o.setReserved(n,_)}else{o.h[n]=_}}}}var l=u.instanceID;var h=u.swf;var c=openfl__$internal_formats_swf_SWFLite.instances;if(__map_reserved[l]!=null){c.setReserved(l,h)}else{c.h[l]=h}u.__load().onProgress($bind(f,f.progress)).onError($bind(f,f.error)).onComplete(function(e){u.preloading=false;f.complete(u)})};if(openfl_utils_Assets.exists(this.id)){var s=this.paths.keys();while(s.hasNext()){var a=s.next();var r=this.preload;if(__map_reserved[a]!=null){r.setReserved(a,true)}else{r.h[a]=true}}this.loadText(this.id).onError($bind(f,f.error)).onComplete(i)}else{var n=this.paths.keys();while(n.hasNext()){var _=n.next();var o=this.preload;if(__map_reserved[_]!=null){o.setReserved(_,true)}else{o.h[_]=true}}var l=null;var h=this.id;var c=this.paths;if(__map_reserved[h]!=null?c.existsReserved(h):c.h.hasOwnProperty(h)){var p=this.id;var d=this.paths;if(__map_reserved[p]!=null){l=d.getReserved(p)}else{l=d.h[p]}}else if(this.rootPath!=null&&this.rootPath!=""){l=this.rootPath+"/"+this.id}else{l=this.id}var g=new openfl_net_URLLoader;g.addEventListener("complete",function(e){i(g.data)});g.addEventListener("ioError",function(e){f.error(e)});g.load(new openfl_net_URLRequest(l))}return f.future},loadImage:function(n){var _=this;var e=this.imageClassNames;if(__map_reserved[n]!=null?e.existsReserved(n):e.h.hasOwnProperty(n)){var t=this.imageClassNames;if(__map_reserved[n]!=null){n=t.getReserved(n)}else{n=t.h[n]}}var i;if(!this.preloading){var s=this.alphaCheck;i=!(__map_reserved[n]!=null?s.existsReserved(n):s.h.hasOwnProperty(n))}else{i=false}if(i){var a=this.swf.symbols.iterator();while(a.hasNext()){var r=a.next();if(js_Boot.__instanceof(r,openfl__$internal_symbols_BitmapSymbol)&&js_Boot.__cast(r,openfl__$internal_symbols_BitmapSymbol).path==n){var o=[r];if(o[0].alpha!=null){var l=[new lime_app_Promise];this.__loadImage(n).onError(($_=l[0],$bind($_,$_.error))).onComplete(function(e,t){return function(r){_.__loadImage(t[0].alpha).onError(($_=e[0],$bind($_,$_.error))).onComplete(function(s,a){return function(e){_.__copyChannel(r,e);var t=_.cachedImages;if(__map_reserved[n]!=null){t.setReserved(n,r)}else{t.h[n]=r}_.cachedImages.remove(a[0].alpha);var i=_.alphaCheck;if(__map_reserved[n]!=null){i.setReserved(n,true)}else{i.h[n]=true}s[0].complete(r)}}(e,t))}}(l,o));return l[0].future}else{var h=this.alphaCheck;if(__map_reserved[n]!=null){h.setReserved(n,true)}else{h.h[n]=true}}}}}return openfl_utils_AssetLibrary.prototype.loadImage.call(this,n)},unload:function(){if(this.swf==null){return}var e;var t=this.instanceID;var i=openfl__$internal_formats_swf_SWFLite.instances;if(__map_reserved[t]!=null?i.existsReserved(t):i.h.hasOwnProperty(t)){var s=this.instanceID;var a=openfl__$internal_formats_swf_SWFLite.instances;e=(__map_reserved[s]!=null?a.getReserved(s):a.h[s])==this.swf}else{e=false}if(e){openfl__$internal_formats_swf_SWFLite.instances.remove(this.instanceID)}var r;var n=this.swf.symbols.iterator();while(n.hasNext()){var _=n.next();if(js_Boot.__instanceof(_,openfl__$internal_symbols_BitmapSymbol)){r=_;openfl_utils_Assets.cache.removeBitmapData(r.path)}}},__copyChannel:function(e,t){if(t!=null){e.copyChannel(t,t.get_rect(),new lime_math_Vector2,lime_graphics_ImageChannel.RED,lime_graphics_ImageChannel.ALPHA)}e.buffer.premultiplied=true;e.set_premultiplied(false)},__fromManifest:function(e){this.rootPath=e.rootPath;openfl_utils_AssetLibrary.prototype.__fromManifest.call(this,e);this.bytesTotal=0;var t=this.paths.keys();while(t.hasNext()){var i=t.next();var s=this.sizes;this.bytesTotal+=__map_reserved[i]!=null?s.getReserved(i):s.h[i]}},__load:function(){return openfl_utils_AssetLibrary.prototype.load.call(this)},__loadImage:function(e){return openfl_utils_AssetLibrary.prototype.loadImage.call(this,e)},__class__:openfl__$internal_formats_swf_SWFLiteLibrary});var openfl__$internal_formats_swf_ShapeCommand=$hxClasses["openfl._internal.formats.swf.ShapeCommand"]={__ename__:["openfl","_internal","formats","swf","ShapeCommand"],__constructs__:["BeginBitmapFill","BeginFill","BeginGradientFill","CurveTo","EndFill","LineStyle","LineTo","MoveTo"]};openfl__$internal_formats_swf_ShapeCommand.BeginBitmapFill=function(e,t,i,s){var a=["BeginBitmapFill",0,e,t,i,s];a.__enum__=openfl__$internal_formats_swf_ShapeCommand;a.toString=$estr;return a};openfl__$internal_formats_swf_ShapeCommand.BeginFill=function(e,t){var i=["BeginFill",1,e,t];i.__enum__=openfl__$internal_formats_swf_ShapeCommand;i.toString=$estr;return i};openfl__$internal_formats_swf_ShapeCommand.BeginGradientFill=function(e,t,i,s,a,r,n,_){var o=["BeginGradientFill",2,e,t,i,s,a,r,n,_];o.__enum__=openfl__$internal_formats_swf_ShapeCommand;o.toString=$estr;return o};openfl__$internal_formats_swf_ShapeCommand.CurveTo=function(e,t,i,s){var a=["CurveTo",3,e,t,i,s];a.__enum__=openfl__$internal_formats_swf_ShapeCommand;a.toString=$estr;return a};openfl__$internal_formats_swf_ShapeCommand.EndFill=["EndFill",4];openfl__$internal_formats_swf_ShapeCommand.EndFill.toString=$estr;openfl__$internal_formats_swf_ShapeCommand.EndFill.__enum__=openfl__$internal_formats_swf_ShapeCommand;openfl__$internal_formats_swf_ShapeCommand.LineStyle=function(e,t,i,s,a,r,n,_){var o=["LineStyle",5,e,t,i,s,a,r,n,_];o.__enum__=openfl__$internal_formats_swf_ShapeCommand;o.toString=$estr;return o};openfl__$internal_formats_swf_ShapeCommand.LineTo=function(e,t){var i=["LineTo",6,e,t];i.__enum__=openfl__$internal_formats_swf_ShapeCommand;i.toString=$estr;return i};openfl__$internal_formats_swf_ShapeCommand.MoveTo=function(e,t){var i=["MoveTo",7,e,t];i.__enum__=openfl__$internal_formats_swf_ShapeCommand;i.toString=$estr;return i};var openfl__$internal_renderer_DrawCommandBuffer=function(){if(openfl__$internal_renderer_DrawCommandBuffer.empty==null){this.types=[];this.b=[];this.i=[];this.f=[];this.o=[];this.ff=[];this.ii=[];this.copyOnWrite=true}else{this.clear()}};$hxClasses["openfl._internal.renderer.DrawCommandBuffer"]=openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_DrawCommandBuffer.__name__=["openfl","_internal","renderer","DrawCommandBuffer"];openfl__$internal_renderer_DrawCommandBuffer.prototype={types:null,b:null,copyOnWrite:null,f:null,ff:null,i:null,ii:null,o:null,append:function(e){if(this.get_length()==0){this.types=e.types;this.b=e.b;this.i=e.i;this.f=e.f;this.o=e.o;this.ff=e.ff;this.ii=e.ii;this.copyOnWrite=e.copyOnWrite=true;return e}var t=new openfl__$internal_renderer_DrawCommandReader(e);var i=0;var s=e.types;while(i<s.length){var a=s[i];++i;switch(a[1]){case 0:var r=t.prev;switch(r[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=openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;var n=t;var _=n;this.beginBitmapFill(_.buffer.o[_.oPos],_.buffer.o[_.oPos+1],_.buffer.b[_.bPos],_.buffer.b[_.bPos+1]);break;case 1: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=openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;var l=t;var h=l;this.beginFill(h.buffer.i[h.iPos],h.buffer.f[h.fPos]);break;case 2: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=openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;var u=t;var f=u;this.beginGradientFill(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.f[f.fPos]);break;case 3: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=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var d=t;var g=d;this.beginShaderFill(g.buffer.o[g.oPos]);break;case 4:var m=t.prev;switch(m[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=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var v=t;var b=v;this.cubicCurveTo(b.buffer.f[b.fPos],b.buffer.f[b.fPos+1],b.buffer.f[b.fPos+2],b.buffer.f[b.fPos+3],b.buffer.f[b.fPos+4],b.buffer.f[b.fPos+5]);break;case 5:var y=t.prev;switch(y[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=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var x=t;var w=x;this.curveTo(w.buffer.f[w.fPos],w.buffer.f[w.fPos+1],w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+3]);break;case 6:var k=t.prev;switch(k[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=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var P=t;var C=P;this.drawCircle(C.buffer.f[C.fPos],C.buffer.f[C.fPos+1],C.buffer.f[C.fPos+2]);break;case 7:var T=t.prev;switch(T[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=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var M=t;var S=M;this.drawEllipse(S.buffer.f[S.fPos],S.buffer.f[S.fPos+1],S.buffer.f[S.fPos+2],S.buffer.f[S.fPos+3]);break;case 8:var $=t.prev;switch($[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=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var E=t;var B=E;this.drawQuads(B.buffer.o[B.oPos],B.buffer.o[B.oPos+1],B.buffer.o[B.oPos+2]);break;case 9: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=openfl__$internal_renderer_DrawCommandType.DRAW_RECT;var R=t;var A=R;this.drawRect(A.buffer.f[A.fPos],A.buffer.f[A.fPos+1],A.buffer.f[A.fPos+2],A.buffer.f[A.fPos+3]);break;case 10:var I=t.prev;switch(I[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=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var D=t;var F=D;this.drawRoundRect(F.buffer.f[F.fPos],F.buffer.f[F.fPos+1],F.buffer.f[F.fPos+2],F.buffer.f[F.fPos+3],F.buffer.f[F.fPos+4],F.buffer.o[F.oPos]);break;case 12: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=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var j=t;var G=j;this.drawTriangles(G.buffer.o[G.oPos],G.buffer.o[G.oPos+1],G.buffer.o[G.oPos+2],G.buffer.o[G.oPos+3]);break;case 13: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=openfl__$internal_renderer_DrawCommandType.END_FILL;var U=t;var N=U;this.endFill();break;case 14:var W=t.prev;switch(W[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=openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;var V=t;var z=V;this.lineBitmapStyle(z.buffer.o[z.oPos],z.buffer.o[z.oPos+1],z.buffer.b[z.bPos],z.buffer.b[z.bPos+1]);break;case 15:var X=t.prev;switch(X[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=openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;var Y=t;var J=Y;this.lineGradientStyle(J.buffer.o[J.oPos],J.buffer.ii[J.iiPos],J.buffer.ff[J.ffPos],J.buffer.ii[J.iiPos+1],J.buffer.o[J.oPos+1],J.buffer.o[J.oPos+2],J.buffer.o[J.oPos+3],J.buffer.f[J.fPos]);break;case 16:var K=t.prev;switch(K[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=openfl__$internal_renderer_DrawCommandType.LINE_STYLE;var q=t;var Z=q;this.lineStyle(Z.buffer.o[Z.oPos],Z.buffer.i[Z.iPos],Z.buffer.f[Z.fPos],Z.buffer.b[Z.bPos],Z.buffer.o[Z.oPos+1],Z.buffer.o[Z.oPos+2],Z.buffer.o[Z.oPos+3],Z.buffer.f[Z.fPos+1]);break;case 17:var Q=t.prev;switch(Q[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=openfl__$internal_renderer_DrawCommandType.LINE_TO;var ee=t;var te=ee;this.lineTo(te.buffer.f[te.fPos],te.buffer.f[te.fPos+1]);break;case 18:var ie=t.prev;switch(ie[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=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var se=t;var ae=se;this.moveTo(ae.buffer.f[ae.fPos],ae.buffer.f[ae.fPos+1]);break;case 20:var re=t.prev;switch(re[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=openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX;var ne=t;var _e=ne;this.overrideMatrix(_e.buffer.o[_e.oPos]);break;case 21:var oe=t.prev;switch(oe[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=openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD;var le=t;var he=le;this.windingEvenOdd();break;case 22:var ce=t.prev;switch(ce[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=openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO;var ue=t;var fe=ue;this.windingNonZero();break;default:}}t.destroy();return e},beginBitmapFill:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL);this.o.push(e);this.o.push(t);this.b.push(i);this.b.push(s)},beginFill:function(e,t){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_FILL);this.i.push(e);this.f.push(t)},beginGradientFill:function(e,t,i,s,a,r,n,_){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL);this.o.push(e);this.ii.push(t);this.ff.push(i);this.ii.push(s);this.o.push(a);this.o.push(r);this.o.push(n);this.f.push(_)},beginShaderFill:function(e){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL);this.o.push(e)},clear:function(){this.types=openfl__$internal_renderer_DrawCommandBuffer.empty.types;this.b=openfl__$internal_renderer_DrawCommandBuffer.empty.b;this.i=openfl__$internal_renderer_DrawCommandBuffer.empty.i;this.f=openfl__$internal_renderer_DrawCommandBuffer.empty.f;this.o=openfl__$internal_renderer_DrawCommandBuffer.empty.o;this.ff=openfl__$internal_renderer_DrawCommandBuffer.empty.ff;this.ii=openfl__$internal_renderer_DrawCommandBuffer.empty.ii;this.copyOnWrite=true},copy:function(){var e=new openfl__$internal_renderer_DrawCommandBuffer;e.append(this);return e},cubicCurveTo:function(e,t,i,s,a,r){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO);this.f.push(e);this.f.push(t);this.f.push(i);this.f.push(s);this.f.push(a);this.f.push(r)},curveTo:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.CURVE_TO);this.f.push(e);this.f.push(t);this.f.push(i);this.f.push(s)},drawCircle:function(e,t,i){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE);this.f.push(e);this.f.push(t);this.f.push(i)},drawEllipse:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE);this.f.push(e);this.f.push(t);this.f.push(i);this.f.push(s)},drawQuads:function(e,t,i){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_QUADS);this.o.push(e);this.o.push(t);this.o.push(i)},drawRect:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_RECT);this.f.push(e);this.f.push(t);this.f.push(i);this.f.push(s)},drawRoundRect:function(e,t,i,s,a,r){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT);this.f.push(e);this.f.push(t);this.f.push(i);this.f.push(s);this.f.push(a);this.o.push(r)},drawTriangles:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES);this.o.push(e);this.o.push(t);this.o.push(i);this.o.push(s)},endFill:function(){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.END_FILL)},lineBitmapStyle:function(e,t,i,s){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE);this.o.push(e);this.o.push(t);this.b.push(i);this.b.push(s)},lineGradientStyle:function(e,t,i,s,a,r,n,_){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE);this.o.push(e);this.ii.push(t);this.ff.push(i);this.ii.push(s);this.o.push(a);this.o.push(r);this.o.push(n);this.f.push(_)},lineStyle:function(e,t,i,s,a,r,n,_){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_STYLE);this.o.push(e);this.i.push(t);this.f.push(i);this.b.push(s);this.o.push(a);this.o.push(r);this.o.push(n);this.f.push(_)},lineTo:function(e,t){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_TO);this.f.push(e);this.f.push(t)},moveTo:function(e,t){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.MOVE_TO);this.f.push(e);this.f.push(t)},prepareWrite:function(){if(this.copyOnWrite){this.types=this.types.slice();this.b=this.b.slice();this.i=this.i.slice();this.f=this.f.slice();this.o=this.o.slice();this.ff=this.ff.slice();this.ii=this.ii.slice();this.copyOnWrite=false}},overrideMatrix:function(e){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX);this.o.push(e)},windingEvenOdd:function(){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD)},windingNonZero:function(){this.prepareWrite();this.types.push(openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO)},get_length:function(){return this.types.length},__class__:openfl__$internal_renderer_DrawCommandBuffer,__properties__:{get_length:"get_length"}};var openfl__$internal_renderer_DrawCommandReader=function(e){this.buffer=e;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=openfl__$internal_renderer_DrawCommandType.UNKNOWN};$hxClasses["openfl._internal.renderer.DrawCommandReader"]=openfl__$internal_renderer_DrawCommandReader;openfl__$internal_renderer_DrawCommandReader.__name__=["openfl","_internal","renderer","DrawCommandReader"];openfl__$internal_renderer_DrawCommandReader.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,destroy:function(){this.buffer=null;this.reset()},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},__class__:openfl__$internal_renderer_DrawCommandReader};var openfl__$internal_renderer_DrawCommandType=$hxClasses["openfl._internal.renderer.DrawCommandType"]={__ename__:["openfl","_internal","renderer","DrawCommandType"],__constructs__:["BEGIN_BITMAP_FILL","BEGIN_FILL","BEGIN_GRADIENT_FILL","BEGIN_SHADER_FILL","CUBIC_CURVE_TO","CURVE_TO","DRAW_CIRCLE","DRAW_ELLIPSE","DRAW_QUADS","DRAW_RECT","DRAW_ROUND_RECT","DRAW_TILES","DRAW_TRIANGLES","END_FILL","LINE_BITMAP_STYLE","LINE_GRADIENT_STYLE","LINE_STYLE","LINE_TO","MOVE_TO","OVERRIDE_BLEND_MODE","OVERRIDE_MATRIX","WINDING_EVEN_ODD","WINDING_NON_ZERO","UNKNOWN"]};openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL=["BEGIN_BITMAP_FILL",0];openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.toString=$estr;openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.BEGIN_FILL=["BEGIN_FILL",1];openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.toString=$estr;openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL=["BEGIN_GRADIENT_FILL",2];openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.toString=$estr;openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL=["BEGIN_SHADER_FILL",3];openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL.toString=$estr;openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO=["CUBIC_CURVE_TO",4];openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.toString=$estr;openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.CURVE_TO=["CURVE_TO",5];openfl__$internal_renderer_DrawCommandType.CURVE_TO.toString=$estr;openfl__$internal_renderer_DrawCommandType.CURVE_TO.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE=["DRAW_CIRCLE",6];openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE=["DRAW_ELLIPSE",7];openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_QUADS=["DRAW_QUADS",8];openfl__$internal_renderer_DrawCommandType.DRAW_QUADS.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_QUADS.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_RECT=["DRAW_RECT",9];openfl__$internal_renderer_DrawCommandType.DRAW_RECT.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_RECT.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT=["DRAW_ROUND_RECT",10];openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_TILES=["DRAW_TILES",11];openfl__$internal_renderer_DrawCommandType.DRAW_TILES.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_TILES.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES=["DRAW_TRIANGLES",12];openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.toString=$estr;openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.END_FILL=["END_FILL",13];openfl__$internal_renderer_DrawCommandType.END_FILL.toString=$estr;openfl__$internal_renderer_DrawCommandType.END_FILL.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE=["LINE_BITMAP_STYLE",14];openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.toString=$estr;openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE=["LINE_GRADIENT_STYLE",15];openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.toString=$estr;openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.LINE_STYLE=["LINE_STYLE",16];openfl__$internal_renderer_DrawCommandType.LINE_STYLE.toString=$estr;openfl__$internal_renderer_DrawCommandType.LINE_STYLE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.LINE_TO=["LINE_TO",17];openfl__$internal_renderer_DrawCommandType.LINE_TO.toString=$estr;openfl__$internal_renderer_DrawCommandType.LINE_TO.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.MOVE_TO=["MOVE_TO",18];openfl__$internal_renderer_DrawCommandType.MOVE_TO.toString=$estr;openfl__$internal_renderer_DrawCommandType.MOVE_TO.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE=["OVERRIDE_BLEND_MODE",19];openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE.toString=$estr;openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX=["OVERRIDE_MATRIX",20];openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.toString=$estr;openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD=["WINDING_EVEN_ODD",21];openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD.toString=$estr;openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO=["WINDING_NON_ZERO",22];openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO.toString=$estr;openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO.__enum__=openfl__$internal_renderer_DrawCommandType;openfl__$internal_renderer_DrawCommandType.UNKNOWN=["UNKNOWN",23];openfl__$internal_renderer_DrawCommandType.UNKNOWN.toString=$estr;openfl__$internal_renderer_DrawCommandType.UNKNOWN.__enum__=openfl__$internal_renderer_DrawCommandType;var openfl__$internal_renderer_SamplerState=function(e,t,i,s,a,r,n){if(n==null){n=false}if(r==null){r=false}if(a==null){a=false}if(s==null){s=0}if(i==null){i=2}if(t==null){t=5}if(e==null){e=0}this.wrap=e;this.filter=t;this.mipfilter=i;this.lodBias=s;this.ignoreSampler=a;this.centroid=r;this.textureAlpha=n};$hxClasses["openfl._internal.renderer.SamplerState"]=openfl__$internal_renderer_SamplerState;openfl__$internal_renderer_SamplerState.__name__=["openfl","_internal","renderer","SamplerState"];openfl__$internal_renderer_SamplerState.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var e=new openfl__$internal_renderer_SamplerState(this.wrap,this.filter,this.mipfilter,this.lodBias,this.ignoreSampler,this.centroid,this.textureAlpha);e.mipmapGenerated=this.mipmapGenerated;return e},copyFrom:function(e){if(e==null||e.ignoreSampler){return}this.wrap=e.wrap;this.filter=e.filter;this.mipfilter=e.mipfilter;this.lodBias=e.lodBias;this.centroid=e.centroid;this.textureAlpha=e.textureAlpha},equals:function(e){if(e==null){return false}if(this.wrap==e.wrap&&this.filter==e.filter&&this.mipfilter==e.mipfilter&&this.lodBias==e.lodBias){return this.textureAlpha==e.textureAlpha}else{return false}},__class__:openfl__$internal_renderer_SamplerState};var openfl__$internal_renderer_ShaderBuffer=function(){this.inputRefs=[];this.inputFilter=[];this.inputMipFilter=[];this.inputs=[];this.inputWrap=[];this.overrideIntNames=[];this.overrideIntValues=[];this.overrideFloatNames=[];this.overrideFloatValues=[];this.overrideBoolNames=[];this.overrideBoolValues=[];this.paramLengths=[];this.paramPositions=[];this.paramRefs_Bool=[];this.paramRefs_Float=[];this.paramRefs_Int=[];this.paramTypes=[]};$hxClasses["openfl._internal.renderer.ShaderBuffer"]=openfl__$internal_renderer_ShaderBuffer;openfl__$internal_renderer_ShaderBuffer.__name__=["openfl","_internal","renderer","ShaderBuffer"];openfl__$internal_renderer_ShaderBuffer.prototype={inputCount:null,inputRefs:null,inputFilter:null,inputMipFilter:null,inputs:null,inputWrap:null,overrideBoolCount:null,overrideBoolNames:null,overrideBoolValues:null,overrideFloatCount:null,overrideFloatNames:null,overrideFloatValues:null,overrideIntCount:null,overrideIntNames:null,overrideIntValues:null,paramBoolCount:null,paramCount:null,paramData:null,paramDataBuffer:null,paramDataLength:null,paramFloatCount:null,paramLengths:null,paramPositions:null,paramRefs_Bool:null,paramRefs_Float:null,paramRefs_Int:null,paramTypes:null,shader:null,addBoolOverride:function(e,t){this.overrideBoolNames[this.overrideBoolCount]=e;this.overrideBoolValues[this.overrideBoolCount]=t;this.overrideBoolCount++},addFloatOverride:function(e,t){this.overrideFloatNames[this.overrideFloatCount]=e;this.overrideFloatValues[this.overrideFloatCount]=t;this.overrideFloatCount++},clearOverride:function(){this.overrideIntCount=0;this.overrideFloatCount=0;this.overrideBoolCount=0},__class__:openfl__$internal_renderer_ShaderBuffer};var openfl__$internal_renderer_canvas_CanvasGraphics=function(){};$hxClasses["openfl._internal.renderer.canvas.CanvasGraphics"]=openfl__$internal_renderer_canvas_CanvasGraphics;openfl__$internal_renderer_canvas_CanvasGraphics.__name__=["openfl","_internal","renderer","canvas","CanvasGraphics"];openfl__$internal_renderer_canvas_CanvasGraphics.closePath=function(e){if(e==null){e=false}if(openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle==null){return}if(!e){openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath()}openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();if(e){openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath()}openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath()};openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill=function(e,t,i){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e.image);openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(i);return openfl__$internal_renderer_canvas_CanvasGraphics.context.createPattern(e.image.get_src(),t?"repeat":"no-repeat")};openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern=function(e,t,i,s,a,r,n,_){var o=null;var l=null;var h=null;var c=false;if(a==null){a=openfl_geom_Matrix.__pool.get();c=true}switch(e){case 0:l=openfl_geom_Point.__pool.get();l.setTo(-819.2,0);var u=l.x;var f=l.y;l.x=u*a.a+f*a.c+a.tx;l.y=u*a.b+f*a.d+a.ty;h=openfl_geom_Point.__pool.get();h.setTo(819.2,0);var p=h.x;var d=h.y;h.x=p*a.a+d*a.c+a.tx;h.y=p*a.b+d*a.d+a.ty;o=openfl__$internal_renderer_canvas_CanvasGraphics.context.createLinearGradient(l.x,l.y,h.x,h.y);break;case 1:l=openfl_geom_Point.__pool.get();l.setTo(1638.4,0);var g=l.x;var m=l.y;l.x=g*a.a+m*a.c+a.tx;l.y=g*a.b+m*a.d+a.ty;o=openfl__$internal_renderer_canvas_CanvasGraphics.context.createRadialGradient(a.tx,a.ty,0,a.tx,a.ty,Math.abs((l.x-a.tx)/2));break}var v;var b;var y;var x;var w;var k;var P=0;var C=t.length;while(P<C){var T=P++;v=t[T];b=i[T];y=(v&16711680)>>>16;x=(v&65280)>>>8;w=v&255;k=s[T]/255;if(k<0){k=0}if(k>1){k=1}o.addColorStop(k,"rgba("+y+", "+x+", "+w+", "+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,i,s){var a=window.document.createElement("canvas");var r=a.getContext("2d");a.width=i;a.height=s;var n=e.image.get_src();r.fillStyle=r.createPattern(n,t?"repeat":"no-repeat");r.beginPath();r.moveTo(0,0);r.lineTo(0,s);r.lineTo(i,s);r.lineTo(i,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,i,s,a,r){if(r==null){r=a}a*=.5;r*=.5;if(a>i/2){a=i/2}if(r>s/2){r=s/2}var n=e+i;var _=t+s;var o=-a+a*.7071067811865476;var l=-a+a*.41421356237309503;var h=-r+r*.7071067811865476;var c=-r+r*.41421356237309503;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(n,_-r);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n,_+c,n+o,_+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n+l,_,n-a,_);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(e+a,_);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e-l,_,e-o,_+h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(e,_+c,e,_-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(n-a,t);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n+l,t,n+o,t-h);openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(n,t-c,n,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,i){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 s=e.__renderTransform;var a=t*s.a+i*s.c+s.tx;var r=t*s.b+i*s.d+s.ty;t=a;i=r;t-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*s.a+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*s.c+s.tx;i-=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x*s.b+openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y*s.d+s.ty;var n=e.__canvas;var _=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(s.a,s.b,s.c,s.d,s.tx,s.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(l<h.length){var c=h[l];++l;switch(c[1]){case 0:case 1:case 2:case 3:openfl__$internal_renderer_canvas_CanvasGraphics.endFill();if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(t,i,openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)){o.destroy();e.__canvas=n;e.__context=_;return true}openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(t,i)){o.destroy();e.__canvas=n;e.__context=_;return true}if(c==openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL){var u=o.prev;switch(u[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;var f=o;var p=f;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(p.buffer.o[p.oPos],p.buffer.o[p.oPos+1],p.buffer.b[p.bPos],p.buffer.b[p.bPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(p.buffer.o[p.oPos],p.buffer.o[p.oPos+1],p.buffer.b[p.bPos],p.buffer.b[p.bPos+1])}else if(c==openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL){var d=o.prev;switch(d[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;var g=o;var m=g;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos])}else if(c==openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL){var v=o.prev;switch(v[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var b=o;var y=b;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginShaderFill(y.buffer.o[y.oPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginShaderFill(y.buffer.o[y.oPos])}else{var x=o.prev;switch(x[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;var w=o;var k=w;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(k.buffer.i[k.iPos],1);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(k.buffer.i[k.iPos],1)}break;case 4:var P=o.prev;switch(P[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var C=o;var T=C;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(T.buffer.f[T.fPos],T.buffer.f[T.fPos+1],T.buffer.f[T.fPos+2],T.buffer.f[T.fPos+3],T.buffer.f[T.fPos+4],T.buffer.f[T.fPos+5]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(T.buffer.f[T.fPos],T.buffer.f[T.fPos+1],T.buffer.f[T.fPos+2],T.buffer.f[T.fPos+3],T.buffer.f[T.fPos+4],T.buffer.f[T.fPos+5]);break;case 5:var M=o.prev;switch(M[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var S=o;var $=S;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo($.buffer.f[$.fPos],$.buffer.f[$.fPos+1],$.buffer.f[$.fPos+2],$.buffer.f[$.fPos+3]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo($.buffer.f[$.fPos],$.buffer.f[$.fPos+1],$.buffer.f[$.fPos+2],$.buffer.f[$.fPos+3]);break;case 6:var E=o.prev;switch(E[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var B=o;var L=B;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(L.buffer.f[L.fPos],L.buffer.f[L.fPos+1],L.buffer.f[L.fPos+2]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(L.buffer.f[L.fPos],L.buffer.f[L.fPos+1],L.buffer.f[L.fPos+2]);break;case 7:var R=o.prev;switch(R[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var A=o;var I=A;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(I.buffer.f[I.fPos],I.buffer.f[I.fPos+1],I.buffer.f[I.fPos+2],I.buffer.f[I.fPos+3]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(I.buffer.f[I.fPos],I.buffer.f[I.fPos+1],I.buffer.f[I.fPos+2],I.buffer.f[I.fPos+3]);break;case 9:var D=o.prev;switch(D[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.DRAW_RECT;var F=o;var O=F;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(O.buffer.f[O.fPos],O.buffer.f[O.fPos+1],O.buffer.f[O.fPos+2],O.buffer.f[O.fPos+3]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(O.buffer.f[O.fPos],O.buffer.f[O.fPos+1],O.buffer.f[O.fPos+2],O.buffer.f[O.fPos+3]);break;case 10:var j=o.prev;switch(j[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var G=o;var H=G;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(H.buffer.f[H.fPos],H.buffer.f[H.fPos+1],H.buffer.f[H.fPos+2],H.buffer.f[H.fPos+3],H.buffer.f[H.fPos+4],H.buffer.o[H.oPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(H.buffer.f[H.fPos],H.buffer.f[H.fPos+1],H.buffer.f[H.fPos+2],H.buffer.f[H.fPos+3],H.buffer.f[H.fPos+4],H.buffer.o[H.oPos]);break;case 13:var U=o.prev;switch(U[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.END_FILL;var N=o;openfl__$internal_renderer_canvas_CanvasGraphics.endFill();if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(t,i,openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)){o.destroy();e.__canvas=n;e.__context=_;return true}openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(t,i)){o.destroy();e.__canvas=n;e.__context=_;return true}openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;break;case 14:var W=o.prev;switch(W[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;var V=o;var z=V;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(z.buffer.o[z.oPos],z.buffer.o[z.oPos+1],z.buffer.b[z.bPos],z.buffer.b[z.bPos+1]);break;case 15:var X=o.prev;switch(X[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;var Y=o;var J=Y;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(J.buffer.o[J.oPos],J.buffer.ii[J.iiPos],J.buffer.ff[J.ffPos],J.buffer.ii[J.iiPos+1],J.buffer.o[J.oPos+1],J.buffer.o[J.oPos+2],J.buffer.o[J.oPos+3],J.buffer.f[J.fPos]);break;case 16:var K=o.prev;switch(K[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.LINE_STYLE;var q=o;var Z=q;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(Z.buffer.o[Z.oPos],Z.buffer.i[Z.iPos],1,Z.buffer.b[Z.bPos],Z.buffer.o[Z.oPos+1],Z.buffer.o[Z.oPos+2],Z.buffer.o[Z.oPos+3],Z.buffer.f[Z.fPos+1]);break;case 17:var Q=o.prev;switch(Q[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var ee=o;var te=ee;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(te.buffer.f[te.fPos],te.buffer.f[te.fPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(te.buffer.f[te.fPos],te.buffer.f[te.fPos+1]);break;case 18:var ie=o.prev;switch(ie[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var se=o;var ae=se;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(ae.buffer.f[ae.fPos],ae.buffer.f[ae.fPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(ae.buffer.f[ae.fPos],ae.buffer.f[ae.fPos+1]);break;case 21:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";break;case 22:openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="nonzero";break;default:var re=o.prev;switch(re[1]){case 0:o.oPos+=2;o.bPos+=2;break;case 1:o.iPos+=1;o.fPos+=1;break;case 2:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 3:o.oPos+=1;break;case 4:o.fPos+=6;break;case 5:o.fPos+=4;break;case 6:o.fPos+=3;break;case 7:o.fPos+=4;break;case 8:o.oPos+=3;break;case 9:o.fPos+=4;break;case 10:o.fPos+=5;o.oPos+=1;break;case 12:o.oPos+=4;break;case 13:break;case 14:o.oPos+=2;o.bPos+=2;break;case 15:o.oPos+=4;o.iiPos+=2;o.ffPos+=1;o.fPos+=1;break;case 16:o.oPos+=4;o.iPos+=1;o.fPos+=2;o.bPos+=1;break;case 17:o.fPos+=2;break;case 18:o.fPos+=2;break;case 19:o.oPos+=1;break;case 20:o.oPos+=1;break;case 21:case 22:break;default:}o.prev=c}}var ne=false;if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length()>0){openfl__$internal_renderer_canvas_CanvasGraphics.endFill()}if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill&&openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(t,i,openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)){ne=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,i)){ne=true}o.destroy();e.__canvas=n;e.__context=_;return ne}};openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT=function(e,t){if(t==null){t=false}var i=-Infinity;var s=-Infinity;var a=e.get_length();var r=1;var n=a+1;while(r<n){var _=r++;if(t&&_%3==0){continue}s=e.get(_-1);if(i<s){i=s}}if(!t){return{max:i,uvt:e}}var o=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);var l=1;var h=a+1;while(l<h){var c=l++;if(t&&c%3==0){continue}o.push(e.get(c-1))}return{max:i,uvt:o}};openfl__$internal_renderer_canvas_CanvasGraphics.playCommands=function(e,t){if(t==null){t=false}openfl__$internal_renderer_canvas_CanvasGraphics.bounds=openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__bounds;var i=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;var s=openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;var a=0;var r=0;var n=false;var _=0;var o=0;var l=false;openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);var h=false;var c=new openfl__$internal_renderer_DrawCommandReader(e);var u;var f;var p;var d;var g=.5522848;var m;var v;var b;var y;var x;var w;var k;var P;var C;var T;var M;var S;var $;var E;var B;var L=null;var R=null;var A=0;var I=e.types;try{while(A<I.length){var D=I[A];++A;switch(D[1]){case 0:var F=c.prev;switch(F[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_BITMAP_FILL;var O=c;var j=O;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=j.buffer.o[j.oPos];openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(j.buffer.o[j.oPos],j.buffer.b[j.bPos],j.buffer.b[j.bPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=true;if(j.buffer.o[j.oPos+1]!=null){openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix=j.buffer.o[j.oPos+1];openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix=j.buffer.o[j.oPos+1].clone();openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.invert()}else{openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix=null;openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix=null}break;case 1:var G=c.prev;switch(G[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_FILL;var H=c;var U=H;if(U.buffer.f[U.fPos]<.005){openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false}else{if(U.buffer.f[U.fPos]==1){var N=StringTools.hex(U.buffer.i[U.iPos]&16777215,6);openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle="#"+N}else{k=(U.buffer.i[U.iPos]&16711680)>>>16;P=(U.buffer.i[U.iPos]&65280)>>>8;C=U.buffer.i[U.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle="rgba("+k+", "+P+", "+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 W=c.prev;switch(W[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 V=c;var z=V;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 J=Y;var K=J.buffer.o[J.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 q=c.prev;switch(q[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]-i,Q.buffer.f[Q.fPos+1]-s,Q.buffer.f[Q.fPos+2]-i,Q.buffer.f[Q.fPos+3]-s,Q.buffer.f[Q.fPos+4]-i,Q.buffer.f[Q.fPos+5]-s);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 ie=te;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(ie.buffer.f[ie.fPos]-i,ie.buffer.f[ie.fPos+1]-s,ie.buffer.f[ie.fPos+2]-i,ie.buffer.f[ie.fPos+3]-s);break;case 6:var se=c.prev;switch(se[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]-i+re.buffer.f[re.fPos+2],re.buffer.f[re.fPos+1]-s);openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(re.buffer.f[re.fPos]-i,re.buffer.f[re.fPos+1]-s,re.buffer.f[re.fPos+2],0,Math.PI*2,true);break;case 7:var ne=c.prev;switch(ne[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 _e=c;var oe=_e;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-=i;f-=s;m=p/2*g;v=d/2*g;b=u+p;y=f+d;x=u+p/2;w=f+d/2;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(u,w);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(u,w-v,x-m,f,x,f);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x+m,f,b,w-v,b,w);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(b,w+v,x+m,y,x,y);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x-m,y,u,w+v,u,w);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.graphics.__renderTransform;var we=openfl__$internal_renderer_canvas_CanvasGraphics.worldAlpha;var ke;var Pe;openfl__$internal_renderer_canvas_CanvasGraphics.context.save();var Ce=0;var Te=ve;while(Ce<Te){var Me=Ce++;if(de){ke=fe.get(Me)*4}else{ke=Me*4}if(ke<0){continue}be.setTo(ue.get(ke),ue.get(ke+1),ue.get(ke+2),ue.get(ke+3));if(be.width<=0||be.height<=0){continue}if(ge&&me){Pe=Me*6;ye.setTo(pe.get(Pe),pe.get(Pe+1),pe.get(Pe+2),pe.get(Pe+3),pe.get(Pe+4),pe.get(Pe+5))}else if(ge){Pe=Me*4;ye.setTo(pe.get(Pe),pe.get(Pe+1),pe.get(Pe+2),pe.get(Pe+3),be.x,be.y)}else if(me){Pe=Me*2;ye.tx=pe.get(Pe);ye.ty=pe.get(Pe+1)}else{ye.tx=be.x;ye.ty=be.y}ye.tx+=a-i;ye.ty+=r-s;ye.concat(xe);openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(ye.a,ye.b,ye.c,ye.d,ye.tx,ye.ty);if(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill!=null){openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),be.x,be.y,be.width,be.height,0,0,be.width,be.height)}else{openfl__$internal_renderer_canvas_CanvasGraphics.context.fillRect(0,0,be.width,be.height)}}openfl_geom_Rectangle.__pool.release(be);openfl_geom_Matrix.__pool.release(ye);openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();break;case 9:var Se=c.prev;switch(Se[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_RECT;var $e=c;var Ee=$e;T=false;if(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill!=null&&!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){S=0;$=0;E=0;B=0;M=true;if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix!=null){if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b!=0||openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c!=0){M=false}else{if(L==null){L=openfl_geom_Point.__pool.get()}if(R==null){R=openfl_geom_Point.__pool.get()}L.setTo(Ee.buffer.f[Ee.fPos],Ee.buffer.f[Ee.fPos+1]);var Be=openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix;var Le=L.x;var Re=L.y;L.x=Le*Be.a+Re*Be.c+Be.tx;L.y=Le*Be.b+Re*Be.d+Be.ty;R.setTo(Ee.buffer.f[Ee.fPos]+Ee.buffer.f[Ee.fPos+2],Ee.buffer.f[Ee.fPos+1]+Ee.buffer.f[Ee.fPos+3]);var Ae=openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix;var Ie=R.x;var De=R.y;R.x=Ie*Ae.a+De*Ae.c+Ae.tx;R.y=Ie*Ae.b+De*Ae.d+Ae.ty;S=L.y;B=L.x;E=R.y;$=R.x}}else{S=Ee.buffer.f[Ee.fPos+1];B=Ee.buffer.f[Ee.fPos];E=Ee.buffer.f[Ee.fPos+1]+Ee.buffer.f[Ee.fPos+3];$=Ee.buffer.f[Ee.fPos]+Ee.buffer.f[Ee.fPos+2]}if(M&&S>=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,S,$-B,E-S,Ee.buffer.f[Ee.fPos]-i,Ee.buffer.f[Ee.fPos+1]-s,Ee.buffer.f[Ee.fPos+2],Ee.buffer.f[Ee.fPos+3])}}}if(!T){h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(Ee.buffer.f[Ee.fPos]-i,Ee.buffer.f[Ee.fPos+1]-s,Ee.buffer.f[Ee.fPos+2],Ee.buffer.f[Ee.fPos+3])}break;case 10:var Fe=c.prev;switch(Fe[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 Oe=c;var je=Oe;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(je.buffer.f[je.fPos]-i,je.buffer.f[je.fPos+1]-s,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 Ge=c.prev;switch(Ge[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 He=c;var Ue=He;var Ne=Ue.buffer.o[Ue.oPos];var We=Ue.buffer.o[Ue.oPos+1];var Ve=Ue.buffer.o[Ue.oPos+2];var ze=null;var Xe=openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill==null;if(Xe&&Ve!=null){throw"__break__"}if(!Xe){if(Ve==null){Ve=openfl__$Vector_Vector_$Impl_$.toFloatVector(null);var Ye=0;var Je=Ne.get_length()/2|0;while(Ye<Je){var Ke=Ye++;Ve.push(Ne.get(Ke*2)-i/openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width);Ve.push(Ne.get(Ke*2+1)-s/openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height)}}var qe=Ve.get_length()!=Ne.get_length();var Ze=openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT(Ve,qe);var Qe=Ze.max;Ve=Ze.uvt;if(Qe>1){ze=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{ze=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 et=0;var tt=We.get_length();var it;var st;var at;var rt;var nt;var _t;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 wt;var kt;var Pt;var Ct;var Tt;var Mt;var St;var $t;while(et<tt){it=et;st=et+1;at=et+2;rt=We.get(it)*2;nt=We.get(it)*2+1;_t=We.get(st)*2;ot=We.get(st)*2+1;lt=We.get(at)*2;ht=We.get(at)*2+1;ct=Ne.get(rt)-i;ut=Ne.get(nt)-s;ft=Ne.get(_t)-i;pt=Ne.get(ot)-s;dt=Ne.get(lt)-i;gt=Ne.get(ht)-s;var Et=Ue.buffer.o[Ue.oPos+3];switch(Et){case 0:if((ft-ct)*(gt-ut)-(pt-ut)*(dt-ct)<0){et+=3;continue}break;case 2:if(!((ft-ct)*(gt-ut)-(pt-ut)*(dt-ct)<0)){et+=3;continue}break;default:}if(Xe){openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(ct,ut);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(ft,pt);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(dt,gt);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting){openfl__$internal_renderer_canvas_CanvasGraphics.context.fill(openfl__$internal_renderer_canvas_CanvasGraphics.windingRule)}et+=3;continue}mt=Ve.get(rt)*ze.width;bt=Ve.get(_t)*ze.width;xt=Ve.get(lt)*ze.width;vt=Ve.get(nt)*ze.height;yt=Ve.get(ot)*ze.height;wt=Ve.get(ht)*ze.height;kt=mt*(wt-yt)-bt*wt+xt*yt+(bt-xt)*vt;if(kt==0){et+=3;openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();continue}openfl__$internal_renderer_canvas_CanvasGraphics.context.save();openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(ct,ut);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(ft,pt);openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(dt,gt);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();openfl__$internal_renderer_canvas_CanvasGraphics.context.clip();Pt=-(vt*(dt-ft)-yt*dt+wt*ft+(yt-wt)*ct)/kt;Ct=(yt*gt+vt*(pt-gt)-wt*pt+(wt-yt)*ut)/kt;Tt=(mt*(dt-ft)-bt*dt+xt*ft+(bt-xt)*ct)/kt;Mt=-(bt*gt+mt*(pt-gt)-xt*pt+(xt-bt)*ut)/kt;St=(mt*(wt*ft-yt*dt)+vt*(bt*dt-xt*ft)+(xt*yt-bt*wt)*ct)/kt;$t=(mt*(wt*pt-yt*gt)+vt*(bt*gt-xt*pt)+(xt*yt-bt*wt)*ut)/kt;openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(Pt,Ct,Tt,Mt,St,$t);openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(ze,0,0,ze.width,ze.height);openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();et+=3}break;case 14:var Bt=c.prev;switch(Bt[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_BITMAP_STYLE;var Lt=c;var Rt=Lt;if(t&&openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke){openfl__$internal_renderer_canvas_CanvasGraphics.closePath()}openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(a-i,r-s);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(Rt.buffer.o[Rt.oPos],Rt.buffer.b[Rt.bPos],Rt.buffer.b[Rt.bPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=true;break;case 15:var At=c.prev;switch(At[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_GRADIENT_STYLE;var It=c;var Dt=It;if(t&&openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke){openfl__$internal_renderer_canvas_CanvasGraphics.closePath()}openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(a-i,r-s);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle=openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(Dt.buffer.o[Dt.oPos],Dt.buffer.ii[Dt.iiPos],Dt.buffer.ff[Dt.ffPos],Dt.buffer.ii[Dt.iiPos+1],Dt.buffer.o[Dt.oPos+1],Dt.buffer.o[Dt.oPos+2],Dt.buffer.o[Dt.oPos+3],Dt.buffer.f[Dt.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing(true);openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=true;break;case 16:var Ft=c.prev;switch(Ft[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_STYLE;var Ot=c;var jt=Ot;if(t&&openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke){openfl__$internal_renderer_canvas_CanvasGraphics.closePath(true)}openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(a-i,r-s);if(jt.buffer.o[jt.oPos]==null){openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke=false}else{openfl__$internal_renderer_canvas_CanvasGraphics.context.lineWidth=jt.buffer.o[jt.oPos]>0?jt.buffer.o[jt.oPos]:1;var Gt=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=Gt;var Ht;if(jt.buffer.o[jt.oPos+2]==null){Ht="round"}else{var Ut=jt.buffer.o[jt.oPos+2];if(Ut==0){Ht="butt"}else{Ht=openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(jt.buffer.o[jt.oPos+2]).toLowerCase()}}openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap=Ht;openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit=jt.buffer.f[jt.fPos+1];if(jt.buffer.f[jt.fPos]==1){var Nt=StringTools.hex(jt.buffer.i[jt.iPos]&16777215,6);openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="#"+Nt}else{k=(jt.buffer.i[jt.iPos]&16711680)>>>16;P=(jt.buffer.i[jt.iPos]&65280)>>>8;C=jt.buffer.i[jt.iPos]&255;openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle="rgba("+k+", "+P+", "+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 Vt=c;var zt=Vt;h=true;openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(zt.buffer.f[zt.fPos]-i,zt.buffer.f[zt.fPos+1]-s);a=zt.buffer.f[zt.fPos];r=zt.buffer.f[zt.fPos+1];if(a==_&&r==o){n=true}break;case 18:var Xt=c.prev;switch(Xt[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 Yt=c;var Jt=Yt;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(Jt.buffer.f[Jt.fPos]-i,Jt.buffer.f[Jt.fPos+1]-s);a=Jt.buffer.f[Jt.fPos];r=Jt.buffer.f[Jt.fPos+1];if(l){n=true}_=Jt.buffer.f[Jt.fPos];o=Jt.buffer.f[Jt.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 Kt=c.prev;switch(Kt[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&&n){openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(_-i,o-s);openfl__$internal_renderer_canvas_CanvasGraphics.closePath(false)}else if(n&&a==_&&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 i=e.__width;var s=e.__height;if(!e.__visible||e.__commands.get_length()==0||openfl__$internal_renderer_canvas_CanvasGraphics.bounds==null||i<1||s<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 n=t.pixelRatio;var _=i*n|0;var o=s*n|0;t.__setBlendModeContext(openfl__$internal_renderer_canvas_CanvasGraphics.context,10);if(t.__isDOM){if(r.width==_&&r.height==o){openfl__$internal_renderer_canvas_CanvasGraphics.context.clearRect(0,0,_,o)}else{r.width=_;r.height=o;r.style.width=i+"px";r.style.height=s+"px"}var l=e.__renderTransform;openfl__$internal_renderer_canvas_CanvasGraphics.context.setTransform(l.a*n,l.b*n,l.c*n,l.d*n,l.tx*n,l.ty*n)}else{if(r.width==_&&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,_,o)}else{r.width=i;r.height=s}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(p<d.length){var g=d[p];++p;switch(g[1]){case 0:case 1:case 2:case 3:openfl__$internal_renderer_canvas_CanvasGraphics.endFill();openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();if(g==openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL){var m=f.prev;switch(m[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;var v=f;var b=v;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(b.buffer.o[b.oPos],b.buffer.o[b.oPos+1],b.buffer.b[b.bPos],b.buffer.b[b.bPos+1]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(b.buffer.o[b.oPos],b.buffer.o[b.oPos+1],b.buffer.b[b.bPos],b.buffer.b[b.bPos+1])}else if(g==openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL){var y=f.prev;switch(y[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;var x=f;var w=x;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(w.buffer.o[w.oPos],w.buffer.ii[w.iiPos],w.buffer.ff[w.ffPos],w.buffer.ii[w.iiPos+1],w.buffer.o[w.oPos+1],w.buffer.o[w.oPos+2],w.buffer.o[w.oPos+3],w.buffer.f[w.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(w.buffer.o[w.oPos],w.buffer.ii[w.iiPos],w.buffer.ff[w.ffPos],w.buffer.ii[w.iiPos+1],w.buffer.o[w.oPos+1],w.buffer.o[w.oPos+2],w.buffer.o[w.oPos+3],w.buffer.f[w.fPos])}else if(g==openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL){var k=f.prev;switch(k[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var P=f;var C=P;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginShaderFill(C.buffer.o[C.oPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginShaderFill(C.buffer.o[C.oPos])}else{var T=f.prev;switch(T[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;var M=f;var S=M;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(S.buffer.i[S.iPos],S.buffer.f[S.fPos]);openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(S.buffer.i[S.iPos],S.buffer.f[S.fPos])}break;case 4:var $=f.prev;switch($[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var E=f;var B=E;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(B.buffer.f[B.fPos],B.buffer.f[B.fPos+1],B.buffer.f[B.fPos+2],B.buffer.f[B.fPos+3],B.buffer.f[B.fPos+4],B.buffer.f[B.fPos+5]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(B.buffer.f[B.fPos],B.buffer.f[B.fPos+1],B.buffer.f[B.fPos+2],B.buffer.f[B.fPos+3],B.buffer.f[B.fPos+4],B.buffer.f[B.fPos+5])}else{c=B.buffer.f[B.fPos+4];u=B.buffer.f[B.fPos+5]}break;case 5:var L=f.prev;switch(L[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var R=f;var A=R;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(A.buffer.f[A.fPos],A.buffer.f[A.fPos+1],A.buffer.f[A.fPos+2],A.buffer.f[A.fPos+3]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(A.buffer.f[A.fPos],A.buffer.f[A.fPos+1],A.buffer.f[A.fPos+2],A.buffer.f[A.fPos+3])}else{c=A.buffer.f[A.fPos+2];u=A.buffer.f[A.fPos+3]}break;case 6:var I=f.prev;switch(I[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var D=f;var F=D;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(F.buffer.f[F.fPos],F.buffer.f[F.fPos+1],F.buffer.f[F.fPos+2]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(F.buffer.f[F.fPos],F.buffer.f[F.fPos+1],F.buffer.f[F.fPos+2])}break;case 7:var O=f.prev;switch(O[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var j=f;var G=j;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(G.buffer.f[G.fPos],G.buffer.f[G.fPos+1],G.buffer.f[G.fPos+2],G.buffer.f[G.fPos+3]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(G.buffer.f[G.fPos],G.buffer.f[G.fPos+1],G.buffer.f[G.fPos+2],G.buffer.f[G.fPos+3])}break;case 8:var H=f.prev;switch(H[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var U=f;var N=U;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawQuads(N.buffer.o[N.oPos],N.buffer.o[N.oPos+1],N.buffer.o[N.oPos+2]);break;case 9:var W=f.prev;switch(W[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_RECT;var V=f;var z=V;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(z.buffer.f[z.fPos],z.buffer.f[z.fPos+1],z.buffer.f[z.fPos+2],z.buffer.f[z.fPos+3]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(z.buffer.f[z.fPos],z.buffer.f[z.fPos+1],z.buffer.f[z.fPos+2],z.buffer.f[z.fPos+3])}break;case 10:var X=f.prev;switch(X[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var Y=f;var J=Y;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(J.buffer.f[J.fPos],J.buffer.f[J.fPos+1],J.buffer.f[J.fPos+2],J.buffer.f[J.fPos+3],J.buffer.f[J.fPos+4],J.buffer.o[J.oPos]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(J.buffer.f[J.fPos],J.buffer.f[J.fPos+1],J.buffer.f[J.fPos+2],J.buffer.f[J.fPos+3],J.buffer.f[J.fPos+4],J.buffer.o[J.oPos])}break;case 12:var K=f.prev;switch(K[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var q=f;var Z=q;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawTriangles(Z.buffer.o[Z.oPos],Z.buffer.o[Z.oPos+1],Z.buffer.o[Z.oPos+2],Z.buffer.o[Z.oPos+3]);break;case 13:var Q=f.prev;switch(Q[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.END_FILL;var ee=f;openfl__$internal_renderer_canvas_CanvasGraphics.endFill();openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();openfl__$internal_renderer_canvas_CanvasGraphics.hasFill=false;h=false;openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill=null;c=0;u=0;break;case 14:var te=f.prev;switch(te[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;var ie=f;var se=ie;if(!h&&(c!=0||u!=0)){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(c,u);c=0;u=0}h=true;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(se.buffer.o[se.oPos],se.buffer.o[se.oPos+1],se.buffer.b[se.bPos],se.buffer.b[se.bPos+1]);break;case 15:var ae=f.prev;switch(ae[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;var re=f;var ne=re;if(!h&&(c!=0||u!=0)){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(c,u);c=0;u=0}h=true;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(ne.buffer.o[ne.oPos],ne.buffer.ii[ne.iiPos],ne.buffer.ff[ne.ffPos],ne.buffer.ii[ne.iiPos+1],ne.buffer.o[ne.oPos+1],ne.buffer.o[ne.oPos+2],ne.buffer.o[ne.oPos+3],ne.buffer.f[ne.fPos]);break;case 16:var _e=f.prev;switch(_e[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.LINE_STYLE;var oe=f;var le=oe;if(!h&&le.buffer.o[le.oPos]!=null){if(c!=0||u!=0){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(c,u);c=0;u=0}}h=le.buffer.o[le.oPos]!=null;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(le.buffer.o[le.oPos],le.buffer.i[le.iPos],le.buffer.f[le.fPos],le.buffer.b[le.bPos],le.buffer.o[le.oPos+1],le.buffer.o[le.oPos+2],le.buffer.o[le.oPos+3],le.buffer.f[le.fPos+1]);break;case 17:var he=f.prev;switch(he[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var ce=f;var ue=ce;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(ue.buffer.f[ue.fPos],ue.buffer.f[ue.fPos+1]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(ue.buffer.f[ue.fPos],ue.buffer.f[ue.fPos+1])}else{c=ue.buffer.f[ue.fPos];u=ue.buffer.f[ue.fPos+1]}break;case 18:var fe=f.prev;switch(fe[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var pe=f;var de=pe;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(de.buffer.f[de.fPos],de.buffer.f[de.fPos+1]);if(h){openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(de.buffer.f[de.fPos],de.buffer.f[de.fPos+1])}else{c=de.buffer.f[de.fPos];u=de.buffer.f[de.fPos+1]}break;case 19:var ge=f.prev;switch(ge[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE;var me=f;var ve=me;t.__setBlendModeContext(openfl__$internal_renderer_canvas_CanvasGraphics.context,ve.buffer.o[ve.oPos]);break;case 21:var be=f.prev;switch(be[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.WINDING_EVEN_ODD;var ye=f;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.windingEvenOdd();openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="evenodd";break;case 22:var xe=f.prev;switch(xe[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=openfl__$internal_renderer_DrawCommandType.WINDING_NON_ZERO;var we=f;openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.windingNonZero();openfl__$internal_renderer_canvas_CanvasGraphics.windingRule="nonzero";break;default:var ke=f.prev;switch(ke[1]){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 13:break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1;break;case 21:case 22:break;default:}f.prev=g}}if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length()>0){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 i=0;var s=0;var a=0;var r=0;var n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _;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(v<b.length){var y=b[v];++v;switch(y[1]){case 4:var x=n.prev;switch(x[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;var w=n;var k=w;openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(k.buffer.f[k.fPos]-a,k.buffer.f[k.fPos+1]-r,k.buffer.f[k.fPos+2]-a,k.buffer.f[k.fPos+3]-r,k.buffer.f[k.fPos+4]-a,k.buffer.f[k.fPos+5]-r);i=k.buffer.f[k.fPos+4];s=k.buffer.f[k.fPos+5];break;case 5:var P=n.prev;switch(P[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.CURVE_TO;var C=n;var T=C;openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(T.buffer.f[T.fPos]-a,T.buffer.f[T.fPos+1]-r,T.buffer.f[T.fPos+2]-a,T.buffer.f[T.fPos+3]-r);i=T.buffer.f[T.fPos+2];s=T.buffer.f[T.fPos+3];break;case 6:var M=n.prev;switch(M[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;var S=n;var $=S;openfl__$internal_renderer_canvas_CanvasGraphics.context.arc($.buffer.f[$.fPos]-a,$.buffer.f[$.fPos+1]-r,$.buffer.f[$.fPos+2],0,Math.PI*2,true);break;case 7:var E=n.prev;switch(E[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;var B=n;var L=B;_=L.buffer.f[L.fPos];o=L.buffer.f[L.fPos+1];l=L.buffer.f[L.fPos+2];h=L.buffer.f[L.fPos+3];_-=a;o-=r;u=l/2*c;f=h/2*c;p=_+l;d=o+h;g=_+l/2;m=o+h/2;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(_,m);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(_,m-f,g-u,o,g,o);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(g+u,o,p,m-f,p,m);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(p,m+f,g+u,d,g,d);openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(g-u,d,_,m+f,_,m);break;case 9:var R=n.prev;switch(R[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_RECT;var A=n;var I=A;openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(I.buffer.f[I.fPos]-a,I.buffer.f[I.fPos+1]-r,I.buffer.f[I.fPos+2],I.buffer.f[I.fPos+3]);openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();break;case 10:var D=n.prev;switch(D[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;var F=n;var O=F;openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(O.buffer.f[O.fPos]-a,O.buffer.f[O.fPos+1]-r,O.buffer.f[O.fPos+2],O.buffer.f[O.fPos+3],O.buffer.f[O.fPos+4],O.buffer.o[O.oPos]);break;case 17:var j=n.prev;switch(j[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.LINE_TO;var G=n;var H=G;openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(H.buffer.f[H.fPos]-a,H.buffer.f[H.fPos+1]-r);i=H.buffer.f[H.fPos];s=H.buffer.f[H.fPos+1];break;case 18:var U=n.prev;switch(U[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var N=n;var W=N;openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(W.buffer.f[W.fPos]-a,W.buffer.f[W.fPos+1]-r);i=W.buffer.f[W.fPos];s=W.buffer.f[W.fPos+1];break;default:var V=n.prev;switch(V[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=y}}n.destroy()}};openfl__$internal_renderer_canvas_CanvasGraphics.setSmoothing=function(e){if(!openfl__$internal_renderer_canvas_CanvasGraphics.allowSmoothing){e=false}if(openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled!=e){openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled=e}};var openfl__$internal_renderer_canvas_CanvasTextField=function(){};$hxClasses["openfl._internal.renderer.canvas.CanvasTextField"]=openfl__$internal_renderer_canvas_CanvasTextField;openfl__$internal_renderer_canvas_CanvasTextField.__name__=["openfl","_internal","renderer","canvas","CanvasTextField"];var openfl__$internal_renderer_canvas_CanvasVideo=function(){};$hxClasses["openfl._internal.renderer.canvas.CanvasVideo"]=openfl__$internal_renderer_canvas_CanvasVideo;openfl__$internal_renderer_canvas_CanvasVideo.__name__=["openfl","_internal","renderer","canvas","CanvasVideo"];openfl__$internal_renderer_canvas_CanvasVideo.render=function(e,t){if(!e.__renderable||e.__stream==null){return}var i=t.__getAlpha(e.__worldAlpha);if(i<=0){return}var s=t.context;if(e.__stream.__video!=null){t.__setBlendMode(e.__worldBlendMode);t.__pushMaskObject(e);s.globalAlpha=i;var a=e.__scrollRect;var r=e.smoothing;t.setTransform(e.__worldTransform,s);if(!r){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(e.__stream.__video,0,0,e.get_width(),e.get_height())}else{s.drawImage(e.__stream.__video,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height)}if(!r){s.imageSmoothingEnabled=true}t.__popMaskObject(e)}};var openfl__$internal_renderer_context3D_Context3DBitmap=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DBitmap"]=openfl__$internal_renderer_context3D_Context3DBitmap;openfl__$internal_renderer_context3D_Context3DBitmap.__name__=["openfl","_internal","renderer","context3D","Context3DBitmap"];openfl__$internal_renderer_context3D_Context3DBitmap.render=function(e,t){if(!e.__renderable||e.__worldAlpha<=0){return}if(e.__bitmapData!=null&&e.__bitmapData.__isValid){var i=t.__context3D;t.__setBlendMode(e.__worldBlendMode);t.__pushMaskObject(e);var s=t.__initDisplayShader(e.__worldShader);t.setShader(s);t.applyBitmapData(e.__bitmapData,t.__allowSmoothing&&(e.smoothing||t.__upscaled));t.applyMatrix(t.__getMatrix(e.__renderTransform,e.pixelSnapping));t.applyAlpha(e.__worldAlpha);t.applyColorTransform(e.__worldColorTransform);t.updateShader();var a=e.__bitmapData.getVertexBuffer(i);if(s.__position!=null){i.setVertexBufferAt(s.__position.index,a,0,3)}if(s.__textureCoord!=null){i.setVertexBufferAt(s.__textureCoord.index,a,3,2)}var r=e.__bitmapData.getIndexBuffer(i);i.drawTriangles(r);t.__clearShader();t.__popMaskObject(e)}};openfl__$internal_renderer_context3D_Context3DBitmap.renderMask=function(e,t){if(e.__bitmapData!=null&&e.__bitmapData.__isValid){var i=t.__context3D;var s=t.__maskShader;t.setShader(s);t.applyBitmapData(openfl__$internal_renderer_context3D_Context3DMaskShader.opaqueBitmapData,true);t.applyMatrix(t.__getMatrix(e.__renderTransform,e.pixelSnapping));t.updateShader();var a=e.__bitmapData.getVertexBuffer(i);if(s.__position!=null){i.setVertexBufferAt(s.__position.index,a,0,3)}if(s.__textureCoord!=null){i.setVertexBufferAt(s.__textureCoord.index,a,3,2)}var r=e.__bitmapData.getIndexBuffer(i);i.drawTriangles(r);t.__clearShader()}};var openfl__$internal_renderer_context3D_Context3DBuffer=function(e,t,i,s){this.context3D=e;this.elementType=t;this.dataPerVertex=s;this.indexCount=0;this.vertexCount=0;this.resize(i)};$hxClasses["openfl._internal.renderer.context3D.Context3DBuffer"]=openfl__$internal_renderer_context3D_Context3DBuffer;openfl__$internal_renderer_context3D_Context3DBuffer.__name__=["openfl","_internal","renderer","context3D","Context3DBuffer"];openfl__$internal_renderer_context3D_Context3DBuffer.prototype={dataPerVertex:null,elementCount:null,elementType:null,indexCount:null,vertexBuffer:null,vertexBufferData:null,vertexCount:null,context3D:null,flushVertexBufferData:function(){if(this.vertexBufferData.length>this.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 i=0;var s=this.elementType;switch(s[1]){case 0:i=e*4;break;case 1:i=e*3;break;case 2:i=e*3;break}var a=i*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 n=this.vertexBufferData;var _;if(a!=null){_=new Float32Array(a)}else{_=null}this.vertexBufferData=_;this.vertexBufferData.set(n)}},__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,i,s){if(s==null){s=-1}if(i==null){i=true}this.transparent=i;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(i){if((s&-16777216)==0){s=0}}else{s=-16777216|s&16777215}s=s<<8|s>>>24&255;this.image=new lime_graphics_Image(null,0,0,e,t,s);this.image.set_transparent(i);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 i=new openfl_display_BitmapData(0,0,t,0);i.__fromImage(lime_graphics_Image.fromCanvas(e));i.image.set_transparent(t);return i};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 i=new openfl_display_BitmapData(0,0,t,0);i.__fromImage(e);i.image.set_transparent(t);if(i.image!=null){return i}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,i){return lime_graphics_Image.loadFromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(e)).then(function(e){var t=openfl_display_BitmapData.fromImage(e);if(i!=null){t.__applyAlpha(i)}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,__indexBufferGrid: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,__vertexBufferGrid:null,__vertexBufferHeight:null,__vertexBufferScaleX:null,__vertexBufferScaleY:null,__vertexBufferWidth: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,i,s,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(),i.__toLimeVector2(),s!=null?s.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,i,s,a,r){if(r==null){r=false}if(e==null){return}e.__update(false,true);var n=openfl_geom_Matrix.__pool.get();n.copyFrom(e.__renderTransform);n.invert();if(t!=null){n.concat(t)}var _=null;if(a!=null){_=openfl_geom_Matrix.__pool.get();_.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(i!=null){o.__combine(i)}var l=new openfl_display_OpenGLRenderer(openfl_Lib.get_current().stage.context3D,this);l.__allowSmoothing=r;l.__overrideBlendMode=s;l.__worldTransform=n;l.__worldAlpha=1/e.__worldAlpha;l.__worldColorTransform=o;l.__resize(this.width,this.height);if(a!=null){l.__pushMaskRect(a,_)}this.__drawGL(e,l);if(a!=null){l.__popMaskRect();openfl_geom_Matrix.__pool.release(_)}}else{if(i!=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,i);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=s;d.__worldTransform=n;d.__worldAlpha=1/e.__worldAlpha;d.__worldColorTransform=o;if(a!=null){d.__pushMaskRect(a,_)}this.__drawCanvas(e,d);if(a!=null){d.__popMaskRect();openfl_geom_Matrix.__pool.release(_)}}openfl_geom_Matrix.__pool.release(n)},fillRect:function(e,t){this.__fillRect(e,t,true)},getIndexBuffer:function(e,t){var i=e.gl;if(this.__indexBuffer==null||this.__indexBufferContext!=e.__context||t!=null&&this.__indexBufferGrid==null||this.__indexBufferGrid!=null&&!this.__indexBufferGrid.equals(t)){this.__indexBufferContext=e.__context;this.__indexBuffer=null;if(t!=null){if(this.__indexBufferGrid==null){this.__indexBufferGrid=new openfl_geom_Rectangle}this.__indexBufferGrid.copyFrom(t);var s=t.width;var a=t.height;if(s!=0&&a!=0){var r=new Uint16Array(54);this.__indexBufferData=r;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.__indexBufferData[6]=4;this.__indexBufferData[7]=0;this.__indexBufferData[8]=5;this.__indexBufferData[9]=5;this.__indexBufferData[10]=0;this.__indexBufferData[11]=2;this.__indexBufferData[12]=6;this.__indexBufferData[13]=4;this.__indexBufferData[14]=7;this.__indexBufferData[15]=7;this.__indexBufferData[16]=4;this.__indexBufferData[17]=5;this.__indexBufferData[18]=8;this.__indexBufferData[19]=9;this.__indexBufferData[20]=0;this.__indexBufferData[21]=0;this.__indexBufferData[22]=9;this.__indexBufferData[23]=1;this.__indexBufferData[24]=10;this.__indexBufferData[25]=8;this.__indexBufferData[26]=4;this.__indexBufferData[27]=4;this.__indexBufferData[28]=8;this.__indexBufferData[29]=0;this.__indexBufferData[30]=11;this.__indexBufferData[31]=10;this.__indexBufferData[32]=6;this.__indexBufferData[33]=6;this.__indexBufferData[34]=10;this.__indexBufferData[35]=4;this.__indexBufferData[36]=12;this.__indexBufferData[37]=13;this.__indexBufferData[38]=8;this.__indexBufferData[39]=8;this.__indexBufferData[40]=13;this.__indexBufferData[41]=9;this.__indexBufferData[42]=14;this.__indexBufferData[43]=12;this.__indexBufferData[44]=10;this.__indexBufferData[45]=10;this.__indexBufferData[46]=12;this.__indexBufferData[47]=8;this.__indexBufferData[48]=15;this.__indexBufferData[49]=14;this.__indexBufferData[50]=11;this.__indexBufferData[51]=11;this.__indexBufferData[52]=14;this.__indexBufferData[53]=10;this.__indexBuffer=e.createIndexBuffer(54)}else if(s==0&&a!=0){var n=new Uint16Array(18);this.__indexBufferData=n;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.__indexBufferData[6]=4;this.__indexBufferData[7]=5;this.__indexBufferData[8]=0;this.__indexBufferData[9]=0;this.__indexBufferData[10]=5;this.__indexBufferData[11]=1;this.__indexBufferData[12]=6;this.__indexBufferData[13]=7;this.__indexBufferData[14]=4;this.__indexBufferData[15]=4;this.__indexBufferData[16]=7;this.__indexBufferData[17]=5;this.__indexBuffer=e.createIndexBuffer(18)}else if(s!=0&&a==0){var _=new Uint16Array(18);this.__indexBufferData=_;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.__indexBufferData[6]=4;this.__indexBufferData[7]=0;this.__indexBufferData[8]=5;this.__indexBufferData[9]=5;this.__indexBufferData[10]=0;this.__indexBufferData[11]=2;this.__indexBufferData[12]=6;this.__indexBufferData[13]=4;this.__indexBufferData[14]=7;this.__indexBufferData[15]=7;this.__indexBufferData[16]=4;this.__indexBufferData[17]=5;this.__indexBuffer=e.createIndexBuffer(18)}}else{this.__indexBufferGrid=null}if(this.__indexBuffer==null){var o=new Uint16Array(6);this.__indexBufferData=o;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.__indexBuffer=e.createIndexBuffer(6)}this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},getVertexBuffer:function(e,t,i){var s=e.gl;if(this.__vertexBuffer==null||this.__vertexBufferContext!=e.__context||t!=null&&this.__vertexBufferGrid==null||this.__vertexBufferGrid!=null&&!this.__vertexBufferGrid.equals(t)||i!=null&&(this.__vertexBufferWidth!=i.get_width()||this.__vertexBufferHeight!=i.get_height()||this.__vertexBufferScaleX!=i.get_scaleX()||this.__vertexBufferScaleY!=i.get_scaleY())){this.__uvRect=new openfl_geom_Rectangle(0,0,this.width,this.height);var a=1;var r=1;this.__vertexBufferContext=e.__context;this.__vertexBuffer=null;if(t!=null&&i!=null){if(this.__vertexBufferGrid==null){this.__vertexBufferGrid=new openfl_geom_Rectangle}this.__vertexBufferGrid.copyFrom(t);this.__vertexBufferWidth=i.get_width();this.__vertexBufferHeight=i.get_height();this.__vertexBufferScaleX=i.get_scaleX();this.__vertexBufferScaleY=i.get_scaleY();var n=t.width;var _=t.height;if(n!=0&&_!=0){var o=new Float32Array(224);this.__vertexBufferData=o;var l=t.x;var h=t.y;var c=this.width-n-l;var u=this.height-_-h;var f=l/this.width;var p=h/this.height;var d=n/this.width;var g=_/this.height;var m=c/this.width;var v=u/this.height;var b=l/i.get_scaleX();var y=h/i.get_scaleY();var x=c/i.get_scaleX();var w=u/i.get_scaleY();var k=i.get_width()/i.get_scaleX()-b-x;var P=i.get_height()/i.get_scaleY()-y-w;this.__vertexBufferData[0]=b;this.__vertexBufferData[1]=y;this.__vertexBufferData[3]=a*f;this.__vertexBufferData[4]=r*p;this.__vertexBufferData[15]=y;this.__vertexBufferData[18]=r*p;this.__vertexBufferData[28]=b;this.__vertexBufferData[31]=a*f;this.__vertexBufferData[56]=b+k;this.__vertexBufferData[57]=y;this.__vertexBufferData[59]=a*(f+d);this.__vertexBufferData[60]=r*p;this.__vertexBufferData[70]=b+k;this.__vertexBufferData[73]=a*(f+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=y;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r*p;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=a;this.__vertexBufferData[112]=b;this.__vertexBufferData[113]=y+P;this.__vertexBufferData[115]=a*f;this.__vertexBufferData[116]=r*(p+g);this.__vertexBufferData[127]=y+P;this.__vertexBufferData[130]=r*(p+g);this.__vertexBufferData[140]=b+k;this.__vertexBufferData[141]=y+P;this.__vertexBufferData[143]=a*(f+d);this.__vertexBufferData[144]=r*(p+g);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=y+P;this.__vertexBufferData[157]=a;this.__vertexBufferData[158]=r*(p+g);this.__vertexBufferData[168]=b;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=a*f;this.__vertexBufferData[172]=r;this.__vertexBufferData[183]=this.height;this.__vertexBufferData[186]=r;this.__vertexBufferData[196]=b+k;this.__vertexBufferData[197]=this.height;this.__vertexBufferData[199]=a*(f+d);this.__vertexBufferData[200]=r;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=a;this.__vertexBufferData[214]=r;this.__vertexBuffer=e.createVertexBuffer(16,14)}else if(n==0&&_!=0){var C=new Float32Array(112);this.__vertexBufferData=C;var T=t.y;var M=this.height-_-T;var S=T/this.height;var $=_/this.height;var E=M/this.height;var B=T/i.get_scaleY();var L=M/i.get_scaleY();var R=i.get_height()/i.get_scaleY()-B-L;var A=i.get_width()/i.get_scaleX();this.__vertexBufferData[0]=A;this.__vertexBufferData[1]=B;this.__vertexBufferData[3]=a;this.__vertexBufferData[4]=r*S;this.__vertexBufferData[15]=B;this.__vertexBufferData[18]=r*S;this.__vertexBufferData[28]=A;this.__vertexBufferData[31]=a;this.__vertexBufferData[56]=A;this.__vertexBufferData[57]=B+R;this.__vertexBufferData[59]=a;this.__vertexBufferData[60]=r*(S+$);this.__vertexBufferData[71]=B+R;this.__vertexBufferData[74]=r*(S+$);this.__vertexBufferData[84]=A;this.__vertexBufferData[85]=this.height;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r;this.__vertexBufferData[99]=this.height;this.__vertexBufferData[102]=r;this.__vertexBuffer=e.createVertexBuffer(8,14)}else if(_==0&&n!=0){var I=new Float32Array(112);this.__vertexBufferData=I;var D=t.x;var F=this.width-n-D;var O=D/this.width;var j=n/this.width;var G=F/this.width;var H=D/i.get_scaleX();var U=F/i.get_scaleX();var N=i.get_width()/i.get_scaleX()-H-U;var W=i.get_height()/i.get_scaleY();this.__vertexBufferData[0]=H;this.__vertexBufferData[1]=W;this.__vertexBufferData[3]=a*O;this.__vertexBufferData[4]=r;this.__vertexBufferData[15]=W;this.__vertexBufferData[18]=r;this.__vertexBufferData[28]=H;this.__vertexBufferData[31]=a*O;this.__vertexBufferData[56]=H+N;this.__vertexBufferData[57]=W;this.__vertexBufferData[59]=a*(O+j);this.__vertexBufferData[60]=r;this.__vertexBufferData[70]=H+N;this.__vertexBufferData[73]=a*(O+j);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=W;this.__vertexBufferData[87]=a;this.__vertexBufferData[88]=r;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=a;this.__vertexBuffer=e.createVertexBuffer(8,14)}}else{this.__vertexBufferGrid=null}if(this.__vertexBuffer==null){var V=new Float32Array(56);this.__vertexBufferData=V;this.__vertexBufferData[0]=this.width;this.__vertexBufferData[1]=this.height;this.__vertexBufferData[3]=a;this.__vertexBufferData[4]=r;this.__vertexBufferData[15]=this.height;this.__vertexBufferData[18]=r;this.__vertexBufferData[28]=this.width;this.__vertexBufferData[31]=a;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,i){if(!this.readable){return}this.image.setPixel32(e,t,i,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 i=0;var s=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e);while(i<s){var a=i++;t[a*4+3]=e.readUnsignedByte()}this.image.version++},__drawCanvas:function(e,t){var i=this.image.buffer;if(!t.__allowSmoothing){t.applySmoothing(i.__srcContext,false)}t.__render(e);if(!t.__allowSmoothing){t.applySmoothing(i.__srcContext,true)}i.__srcContext.setTransform(1,0,0,1,0,0);i.__srcImageData=null;i.data=null;this.image.dirty=true;this.image.version++},__drawGL:function(e,t){var i=t.__context3D;var s=i.__state.renderToTexture;var a=i.__state.renderToTextureDepthStencil;var r=i.__state.renderToTextureAntiAlias;var n=i.__state.renderToTextureSurfaceSelector;i.setRenderToTexture(this.getTexture(i),true);t.__render(e);if(s!=null){i.setRenderToTexture(s,a,r,n)}else{i.setRenderToBackBuffer()}},__fillRect:function(e,t,i){if(e==null){return}if(this.transparent&&(t&-16777216)==0){t=0}if(i&&this.__texture!=null&&this.__texture.__glFramebuffer!=null&&openfl_Lib.get_current().stage.__renderer.__type=="opengl"){var s=openfl_Lib.get_current().stage.__renderer;var a=s.__context3D;var r=t;var n=!this.rect.equals(e);var _=a.__state.renderToTexture;var o=a.__state.renderToTextureDepthStencil;var l=a.__state.renderToTextureAntiAlias;var h=a.__state.renderToTextureSurfaceSelector;a.setRenderToTexture(this.__texture);if(n){a.setScissorRectangle(e)}a.clear((r>>>16&255)/255,(r>>>8&255)/255,(r&255)/255,this.transparent?(r>>>24&255)/255:1,0,0,1);if(n){a.setScissorRectangle(null)}if(_!=null){a.setRenderToTexture(_,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 i=openfl_geom_Rectangle.__pool.get();this.rect.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__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 i=t.gl;e.__setBlendMode(10);var s=e.__defaultDisplayShader;e.setShader(s);e.applyBitmapData(this,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(s.__position!=null){t.setVertexBufferAt(s.__position.index,a,0,3)}if(s.__textureCoord!=null){t.setVertexBufferAt(s.__textureCoord.index,a,3,2)}var r=this.getIndexBuffer(t);t.drawTriangles(r);e.__clearShader()},__setUVRect:function(e,t,i,s,a){var r=this.getVertexBuffer(e);if(r!=null&&(s!=this.__uvRect.width||a!=this.__uvRect.height||t!=this.__uvRect.x||i!=this.__uvRect.y)){var n=e.gl;if(this.__uvRect==null){this.__uvRect=new openfl_geom_Rectangle}this.__uvRect.setTo(t,i,s,a);var _=this.__textureWidth>0?t/this.__textureWidth:0;var o=this.__textureHeight>0?i/this.__textureHeight:0;var l=this.__textureWidth>0?s/this.__textureWidth:0;var h=this.__textureHeight>0?a/this.__textureHeight:0;this.__vertexBufferData[0]=s;this.__vertexBufferData[1]=a;this.__vertexBufferData[3]=_+l;this.__vertexBufferData[4]=o+h;this.__vertexBufferData[15]=a;this.__vertexBufferData[17]=_;this.__vertexBufferData[18]=o+h;this.__vertexBufferData[28]=s;this.__vertexBufferData[31]=_+l;this.__vertexBufferData[32]=o;this.__vertexBufferData[45]=_;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,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t;this.width=i;this.height=s};$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&&e<this.get_right()){return t<this.get_bottom()}else{return false}},containsPoint:function(e){return this.contains(e.x,e.y)},copyFrom:function(e){this.x=e.x;this.y=e.y;this.width=e.width;this.height=e.height},equals:function(e){if(e==this){return true}else if(e!=null&&this.x==e.x&&this.y==e.y&&this.width==e.width){return this.height==e.height}else{return false}},setTo:function(e,t,i,s){this.x=e;this.y=t;this.width=i;this.height=s},__contract:function(e,t,i,s){if(this.width==0&&this.height==0){return}var a=0;var r=0;var n=0;var _=0;if(this.x<e){a=e-this.x}if(this.y<t){r=t-this.y}if(this.get_right()>e+i){n=e+i-this.get_right()}if(this.get_bottom()>t+s){_=t+s-this.get_bottom()}this.x+=a;this.y+=r;this.width+=n-a;this.height+=_-r},__expand:function(e,t,i,s){if(this.width==0&&this.height==0){this.x=e;this.y=t;this.width=i;this.height=s;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(a<e+i){this.width=e+i-this.x}if(r<t+s){this.height=t+s-this.y}},__toLimeRectangle:function(){if(openfl_geom_Rectangle.__limeRectangle==null){openfl_geom_Rectangle.__limeRectangle=new lime_math_Rectangle}openfl_geom_Rectangle.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return openfl_geom_Rectangle.__limeRectangle},__transform:function(e,t){var i=t.a*this.x+t.c*this.y;var s=i;var a=t.b*this.x+t.d*this.y;var r=a;var n=t.a*(this.x+this.width)+t.c*this.y;var _=t.b*(this.x+this.width)+t.d*this.y;if(n<i){i=n}if(_<a){a=_}if(n>s){s=n}if(_>r){r=_}n=t.a*(this.x+this.width)+t.c*(this.y+this.height);_=t.b*(this.x+this.width)+t.d*(this.y+this.height);if(n<i){i=n}if(_<a){a=_}if(n>s){s=n}if(_>r){r=_}n=t.a*this.x+t.c*(this.y+this.height);_=t.b*this.x+t.d*(this.y+this.height);if(n<i){i=n}if(_<a){a=_}if(n>s){s=n}if(_>r){r=_}e.setTo(i+t.tx,a+t.ty,s-i,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,i,s,a,r){if(r==null){r=0}if(a==null){a=0}if(s==null){s=1}if(i==null){i=0}if(t==null){t=0}if(e==null){e=1}this.a=e;this.b=t;this.c=i;this.d=s;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 i=this.c*e.a+this.d*e.c;this.d=this.c*e.b+this.d*e.d;this.c=i;var s=this.tx*e.a+this.ty*e.c+e.tx;this.ty=this.tx*e.b+this.ty*e.d+e.ty;this.tx=s},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,i,s,a){if(a==null){a=0}if(s==null){s=0}if(i==null){i=0}this.a=e/1638.4;this.d=t/1638.4;if(i!=0){var r=Math.cos(i);var n=Math.sin(i);this.b=n*this.d;this.c=-n*this.a;this.a*=r;this.d*=r}else{this.b=0;this.c=0}this.tx=s+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 i=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=i}return this},rotate:function(e){var t=Math.cos(e);var i=Math.sin(e);var s=this.a*t-this.b*i;this.b=this.a*i+this.b*t;this.a=s;var a=this.c*t-this.d*i;this.d=this.c*i+this.d*t;this.c=a;var r=this.tx*t-this.ty*i;this.ty=this.tx*i+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,i,s,a,r){this.a=e;this.b=t;this.c=i;this.d=s;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,i,s,a,r,n,_){if(_==null){_=0}if(n==null){n=0}if(r==null){r=0}if(a==null){a=0}if(s==null){s=1}if(i==null){i=1}if(t==null){t=1}if(e==null){e=1}this.redMultiplier=e;this.greenMultiplier=t;this.blueMultiplier=i;this.alphaMultiplier=s;this.redOffset=a;this.greenOffset=r;this.blueOffset=n;this.alphaOffset=_};$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 i=0;var s=0;var a=0;var r=0;var n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _=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<u.length){var f=u[c];++c;switch(f[1]){case 0:var p=n.prev;switch(p[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;var d=n;var g=d;h=g.buffer.o[g.oPos];break;case 1:h=null;var m=n.prev;switch(m[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=f;break;case 3:var v=n.prev;switch(v[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var b=n;var y=b;var x=y.buffer.o[y.oPos];h=null;if(x!=null){var w=0;var k=x.inputCount;while(w<k){var P=w++;if(x.inputRefs[P].name=="bitmap"){h=x.inputs[P];break}}}break;case 8:if(h!=null){var C=n.prev;switch(C[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var T=n;var M=T;var S=M.buffer.o[M.oPos];var $=M.buffer.o[M.oPos+1];var E=M.buffer.o[M.oPos+2];var B=$!=null;var L=false;var R=false;var A=B?$.get_length():Math.floor(S.get_length()/4);if(A==0){return}if(E!=null){if(E.get_length()>=A*6){L=true;R=true}else if(E.get_length()>=A*4){L=true}else if(E.get_length()>=A*2){R=true}}var I=4;var D=I*4;if(e.__quadBuffer==null){e.__quadBuffer=new openfl__$internal_renderer_context3D_Context3DBuffer(_,openfl__$internal_renderer_context3D_Context3DElementType.QUADS,A,I)}else{e.__quadBuffer.resize(i+A,I)}var F;var O=1;var j;var G;var H;var U;var N;var W;var V;var z;var X;var Y;var J;var K;var q;var Z;var Q;var ee;var te;var ie;var se;var ae;var re=e.__quadBuffer.vertexBufferData;H=h.width;U=h.height;var ne=h.rect;var _e=0;var oe=A;while(_e<oe){var le=_e++;F=(i+le)*D;if(B){se=$.get(le)*4}else{se=le*4}if(se<0){continue}o.setTo(S.get(se),S.get(se+1),S.get(se+2),S.get(se+3));N=o.width;W=o.height;if(N<=0||W<=0){continue}if(L&&R){ae=le*6;l.setTo(E.get(ae),E.get(ae+1),E.get(ae+2),E.get(ae+3),E.get(ae+4),E.get(ae+5))}else if(L){ae=le*4;l.setTo(E.get(ae),E.get(ae+1),E.get(ae+2),E.get(ae+3),o.x,o.y)}else if(R){ae=le*2;l.tx=E.get(ae);l.ty=E.get(ae+1)}else{l.tx=o.x;l.ty=o.y}V=o.x/H;z=o.y/U;X=o.get_right()/H;Y=o.get_bottom()/U;J=0*l.a+0*l.c+l.tx;K=0*l.b+0*l.d+l.ty;q=N*l.a+0*l.c+l.tx;Z=N*l.b+0*l.d+l.ty;Q=0*l.a+W*l.c+l.tx;ee=0*l.b+W*l.d+l.ty;te=N*l.a+W*l.c+l.tx;ie=N*l.b+W*l.d+l.ty;re[F]=J;re[F+1]=K;re[F+2]=V;re[F+3]=z;re[F+I]=q;re[F+I+1]=Z;re[F+I+2]=X;re[F+I+3]=z;re[F+I*2]=Q;re[F+I*2+1]=ee;re[F+I*2+2]=V;re[F+I*2+3]=Y;re[F+I*3]=te;re[F+I*3+1]=ie;re[F+I*3+2]=X;re[F+I*3+3]=Y}i+=A}break;case 12:var he=n.prev;switch(he[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var ce=n;var ue=ce;var fe=ue.buffer.o[ue.oPos];var pe=ue.buffer.o[ue.oPos+1];var de=ue.buffer.o[ue.oPos+2];var ge=ue.buffer.o[ue.oPos+3];var me=pe!=null;var ve=Math.floor(fe.get_length()/2);var be=me?pe.get_length():ve;var ye=de!=null;var xe=ye&&de.get_length()>=ve*3;var we=xe?4:2;var ke=xe?3:2;var Pe=we+2;var Ce=xe?r:a;openfl__$internal_renderer_context3D_Context3DGraphics.resizeVertexBuffer(e,xe,Ce+be*Pe);var Te=xe?e.__vertexBufferDataUVT:e.__vertexBufferData;var Me;var Se;var $e;var Ee;var Be=0;var Le=be;while(Be<Le){var Re=Be++;Me=Ce+Re*Pe;if(me){Se=pe.get(Re)*2}else{Se=Re*2}if(me){$e=pe.get(Re)*ke}else{$e=Re*ke}if(xe){Ee=de.get($e+2);Te[Me]=fe.get(Se)/Ee;Te[Me+1]=fe.get(Se+1)/Ee;Te[Me+2]=0;Te[Me+3]=1/Ee}else{Te[Me]=fe.get(Se);Te[Me+1]=fe.get(Se+1)}Te[Me+we]=ye?de.get($e):0;Te[Me+we+1]=ye?de.get($e+1):0}if(xe){r+=be*Pe}else{a+=be*Pe}break;case 13:h=null;break;default:var Ae=n.prev;switch(Ae[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=f}}if(i>0){e.__quadBuffer.flushVertexBufferData()}if(s>0){var Ie=e.__triangleIndexBuffer;if(Ie==null||s>e.__triangleIndexBufferCount){Ie=_.createIndexBuffer(s,0);e.__triangleIndexBuffer=Ie;e.__triangleIndexBufferCount=s}Ie.uploadFromTypedArray(e.__triangleIndexBufferData)}if(a>0){var De=e.__vertexBuffer;if(De==null||a>e.__vertexBufferCount){De=_.createVertexBuffer(a,4,0);e.__vertexBuffer=De;e.__vertexBufferCount=a}De.uploadFromTypedArray(e.__vertexBufferData)}if(r>0){var Fe=e.__vertexBufferUVT;if(Fe==null||r>e.__vertexBufferCountUVT){Fe=_.createVertexBuffer(r,6,0);e.__vertexBufferUVT=Fe;e.__vertexBufferCountUVT=r}Fe.uploadFromTypedArray(e.__vertexBufferDataUVT)}openfl_geom_Rectangle.__pool.release(o);openfl_geom_Matrix.__pool.release(l)};openfl__$internal_renderer_context3D_Context3DGraphics.isCompatible=function(e){if(e.__owner.__worldScale9Grid!=null){return false}var t=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var i=false;var s=false;var a=false;var r=0;var n=e.__commands.types;while(r<n.length){var _=n[r];++r;switch(_[1]){case 0:s=true;i=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=_;break;case 1:s=false;i=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=_;break;case 3:s=false;i=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=_;break;case 8:if(s||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=_}else{t.destroy();return false}break;case 9:if(i){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=_}else{t.destroy();return false}break;case 12:if(s||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=_}else{t.destroy();return false}break;case 13:s=false;i=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=_;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=_;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=_;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 i=t.__softwareRenderer.__worldTransform;t.__softwareRenderer.__worldTransform=t.__worldTransform;openfl__$internal_renderer_canvas_CanvasGraphics.render(e,t.__softwareRenderer);t.__softwareRenderer.__worldTransform=i}else{e.__bitmap=null;e.__update(t.__worldTransform);var s=e.__bounds;var a=e.__width;var r=e.__height;if(s!=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 n=new openfl__$internal_renderer_DrawCommandReader(e.__commands);var _=t.__context3D;var o=_.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 w=0;var k=e.__commands.types;while(w<k.length){var P=k[w];++w;switch(P[1]){case 0:var C=n.prev;switch(C[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;var T=n;var M=T;c=M.buffer.o[M.oPos];u=M.buffer.b[M.bPos];f=M.buffer.b[M.bPos+1];h=null;p=null;break;case 1:var S=n.prev;switch(S[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;var $=n;var E=$;var B=E.buffer.i[E.iPos]|0;var L=E.buffer.f[E.fPos]*255|0;p=B&16777215|L<<24;h=null;c=null;break;case 3:var R=n.prev;switch(R[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.BEGIN_SHADER_FILL;var A=n;var I=A;h=I.buffer.o[I.oPos];v=0;if(h==null||h.shader==null||h.shader.__bitmap==null){c=null}else{c=h.shader.__bitmap.input}p=null;break;case 8:if(c!=null){var D=n.prev;switch(D[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_QUADS;var F=n;var O=F;var j=O.buffer.o[O.oPos];var G=O.buffer.o[O.oPos+1];var H=O.buffer.o[O.oPos+2];var U=G!=null;var N=U?G.get_length():Math.floor(j.get_length()/4);var W=t.__getMatrix(e.__owner.__renderTransform,1);var V;if(h!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){V=t.__initShaderBuffer(h);t.__setShaderBuffer(h);t.applyMatrix(W);t.applyBitmapData(c,false,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform)}else{if(openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){V=t.__maskShader}else{V=t.__initGraphicsShader(null)}t.setShader(V);t.applyMatrix(W);t.applyBitmapData(c,f,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform);t.updateShader()}var z=m+N;while(m<z){N=Math.min(z-m,_.__quadIndexBufferElements)|0;if(N<=0){break}if(h!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){t.__updateShaderBuffer(v)}if(V.__position!=null){_.setVertexBufferAt(V.__position.index,e.__quadBuffer.vertexBuffer,m*16,2)}if(V.__textureCoord!=null){_.setVertexBufferAt(V.__textureCoord.index,e.__quadBuffer.vertexBuffer,m*16+2,2)}_.drawTriangles(_.__quadIndexBuffer,0,N*2);v+=N*4;m+=N}t.__clearShader()}break;case 9:if(p!=null){var X=n.prev;switch(X[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_RECT;var Y=n;var J=Y;var K=J.buffer.f[J.fPos];var q=J.buffer.f[J.fPos+1];var Z=J.buffer.f[J.fPos+2];var Q=J.buffer.f[J.fPos+3];var ee=p;openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform.redOffset=ee>>>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=q;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,true,u);t.applyAlpha((ee>>>24&255)/255*e.__owner.__worldAlpha);t.applyColorTransform(openfl__$internal_renderer_context3D_Context3DGraphics.tempColorTransform);t.updateShader();var ie=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getVertexBuffer(_);if(te.__position!=null){_.setVertexBufferAt(te.__position.index,ie,0,3)}if(te.__textureCoord!=null){_.setVertexBufferAt(te.__textureCoord.index,ie,3,2)}var se=openfl__$internal_renderer_context3D_Context3DGraphics.blankBitmapData.getIndexBuffer(_);_.drawTriangles(se);v+=4;t.__clearShader()}break;case 12:var ae=n.prev;switch(ae[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;var re=n;var ne=re;var _e=ne.buffer.o[ne.oPos];var oe=ne.buffer.o[ne.oPos+1];var le=ne.buffer.o[ne.oPos+2];var he=ne.buffer.o[ne.oPos+3];var ce=oe!=null;var ue=Math.floor(_e.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 we;if(h!=null&&!openfl__$internal_renderer_context3D_Context3DGraphics.maskRender){we=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){we=t.__maskShader}else{we=t.__initGraphicsShader(null)}t.setShader(we);t.applyMatrix(xe);t.applyBitmapData(c,f,u);t.applyAlpha(e.__owner.__worldAlpha);t.applyColorTransform(e.__owner.__worldColorTransform);t.updateShader()}if(we.__position!=null){_.setVertexBufferAt(we.__position.index,be,ye,de?4:2)}if(we.__textureCoord!=null){_.setVertexBufferAt(we.__textureCoord.index,be,ye+ge,2)}switch(he){case 0:_.setCulling(0);break;case 2:_.setCulling(1);break;default:}_.__drawTriangles(0,fe);v+=fe;if(de){x+=ve*fe}else{y+=ve*fe}if(he!=1){_.setCulling(0)}t.__clearShader();break;case 13:c=null;p=null;h=null;var ke=n.prev;switch(ke[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=P;break;case 18:var Pe=n.prev;switch(Pe[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.MOVE_TO;var Ce=n;var Te=Ce;d=Te.buffer.f[Te.fPos];g=Te.buffer.f[Te.fPos+1];break;case 19:var Me=n.prev;switch(Me[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=openfl__$internal_renderer_DrawCommandType.OVERRIDE_BLEND_MODE;var Se=n;var $e=Se;t.__setBlendMode($e.buffer.o[$e.oPos]);break;default:var Ee=n.prev;switch(Ee[1]){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 13:break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1;break;case 21:case 22:break;default:}n.prev=P}}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,i){var s=t?e.__vertexBufferDataUVT:e.__vertexBufferData;var a=null;if(s==null){var r;if(i!=null){r=new Float32Array(i)}else{r=null}a=r}else if(i>s.length){var n;if(i!=null){n=new Float32Array(i)}else{n=null}a=n;a.set(s)}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<t.length){var i=t[e];++e;i.__useArray=false}var s=0;var a=this.__paramFloat;while(s<a.length){var r=a[s];++s;r.__useArray=false}var n=0;var _=this.__paramInt;while(n<_.length){var o=_[n];++n;o.__useArray=false}},__createGLShader:function(e,t){var i=this.__context.gl;var s=i.createShader(t);i.shaderSource(s,e);i.compileShader(s);if(i.getShaderParameter(s,i.COMPILE_STATUS)==0){var a=t==i.VERTEX_SHADER?"Error compiling vertex shader":"Error compiling fragment shader";a+="\n"+i.getShaderInfoLog(s);a+="\n"+e;lime_utils_Log.error(a,{fileName:"Shader.hx",lineNumber:323,className:"openfl.display.Shader",methodName:"__createGLShader"})}return s},__createGLProgram:function(e,t){var i=this.__context.gl;var s=this.__createGLShader(e,i.VERTEX_SHADER);var a=this.__createGLShader(t,i.FRAGMENT_SHADER);var r=i.createProgram();var n=0;var _=this.__paramFloat;while(n<_.length){var o=_[n];++n;if(o.name.indexOf("Position")>-1&&StringTools.startsWith(o.name,"openfl_")){i.bindAttribLocation(r,0,o.name);break}}i.attachShader(r,s);i.attachShader(r,a);i.linkProgram(r);if(i.getProgramParameter(r,i.LINK_STATUS)==0){var l="Unable to initialize the shader program";l+="\n"+i.getProgramInfoLog(r);lime_utils_Log.error(l,{fileName:"Shader.hx",lineNumber:356,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 i=0;var s=this.__inputBitmapData;while(i<s.length){var a=s[i];++i;a.__disableGL(this.__context,t);++t}var r=0;var n=this.__paramBool;while(r<n.length){var _=n[r];++r;_.__disableGL(this.__context)}var o=0;var l=this.__paramFloat;while(o<l.length){var h=l[o];++o;h.__disableGL(this.__context)}var c=0;var u=this.__paramInt;while(c<u.length){var f=u[c];++c;f.__disableGL(this.__context)}this.__context.__bindGLArrayBuffer(null);if(this.__context.__context.type=="opengl"){e.disable(e.TEXTURE_2D)}},__enable:function(){this.__init();if(this.program!=null){this.__enableGL()}},__enableGL:function(){var e=0;var t=this.__context.gl;var i=0;var s=this.__inputBitmapData;while(i<s.length){var a=s[i];++i;t.uniform1i(a.index,e);++e}if(this.__context.__context.type=="opengl"&&e>0){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 i=t+this.get_glVertexSource();var s=t+this.get_glFragmentSource();var a=i+s;var r=this.__context.__programs;if(__map_reserved[a]!=null?r.existsReserved(a):r.h.hasOwnProperty(a)){var n=this.__context.__programs;this.program=__map_reserved[a]!=null?n.getReserved(a):n.h[a]}else{this.program=this.__context.createProgram(1);this.program.__glProgram=this.__createGLProgram(i,s);var _=this.program;var o=this.__context.__programs;if(__map_reserved[a]!=null){o.setReserved(a,_)}else{o.h[a]=_}}if(this.program!=null){this.glProgram=this.program.__glProgram;var l=0;var h=this.__inputBitmapData;while(l<h.length){var c=h[l];++l;if(c.__isUniform){c.index=e.getUniformLocation(this.glProgram,c.name)}else{c.index=e.getAttribLocation(this.glProgram,c.name)}}var u=0;var f=this.__paramBool;while(u<f.length){var p=f[u];++u;if(p.__isUniform){p.index=e.getUniformLocation(this.glProgram,p.name)}else{p.index=e.getAttribLocation(this.glProgram,p.name)}}var d=0;var g=this.__paramFloat;while(d<g.length){var m=g[d];++d;if(m.__isUniform){m.index=e.getUniformLocation(this.glProgram,m.name)}else{m.index=e.getAttribLocation(this.glProgram,m.name)}}var v=0;var b=this.__paramInt;while(v<b.length){var y=b[v];++v;if(y.__isUniform){y.index=e.getUniformLocation(this.glProgram,y.name)}else{y.index=e.getAttribLocation(this.glProgram,y.name)}}}}},__processGLData:function(e,t){var i=0;var s;var a;var r;var n;if(t=="uniform"){a=new EReg("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","")}else{a=new EReg("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","")}while(a.matchSub(e,i)){n=a.matched(1);r=a.matched(2);if(StringTools.startsWith(r,"gl_")){continue}var _=t=="uniform";if(StringTools.startsWith(n,"sampler")){var o=new openfl_display_ShaderInput;o.name=r;o.__isUniform=_;this.__inputBitmapData.push(o);switch(r){case"bitmap":this.__bitmap=o;break;case"openfl_Texture":this.__texture=o;break;default:}this.__data[r]=o;if(this.__isGenerated){this[r]=o}}else if(!Object.prototype.hasOwnProperty.call(this.__data,r)||Reflect.field(this.__data,r)==null){var l;switch(n){case"bool":l=0;break;case"bvec2":l=1;break;case"bvec3":l=2;break;case"bvec4":l=3;break;case"dvec2":case"vec2":l=5;break;case"dvec3":case"vec3":l=6;break;case"double":case"float":l=4;break;case"ivec3":case"uvec3":l=10;break;case"ivec4":case"uvec4":l=11;break;case"mat2":case"mat2x2":l=12;break;case"mat2x3":l=13;break;case"mat2x4":l=14;break;case"mat3x2":l=15;break;case"mat3":case"mat3x3":l=16;break;case"mat3x4":l=17;break;case"mat4":case"mat4x4":l=20;break;case"mat4x2":l=18;break;case"mat4x3":l=19;break;case"int":case"uint":l=8;break;case"ivec2":case"uvec2":l=9;break;case"dvec4":case"vec4":l=7;break;default:l=null}var h;switch(l){case 1:case 5:case 9:h=2;break;case 3:case 7:case 11:case 12:h=4;break;case 2:case 6:case 10:h=3;break;case 16:h=9;break;case 20:h=16;break;default:h=1}var c;switch(l){case 12:c=2;break;case 16:c=3;break;case 20:c=4;break;default:c=1}switch(l){case 0:case 1:case 2:case 3:var u=new openfl_display_ShaderParameter;u.set_name(r);u.type=l;u.__arrayLength=c;u.__isBool=true;u.__isUniform=_;u.__length=h;this.__paramBool.push(u);if(r=="openfl_HasColorTransform"){this.__hasColorTransform=u}this.__data[r]=u;if(this.__isGenerated){this[r]=u}break;case 8:case 9:case 10:case 11:var f=new openfl_display_ShaderParameter;f.set_name(r);f.type=l;f.__arrayLength=c;f.__isInt=true;f.__isUniform=_;f.__length=h;this.__paramInt.push(f);this.__data[r]=f;if(this.__isGenerated){this[r]=f}break;default:var p=new openfl_display_ShaderParameter;p.set_name(r);p.type=l;p.__arrayLength=c;if(c>0){var d=c*c;var g;if(d!=null){g=new Float32Array(d)}else{g=null}p.__uniformMatrix=g}p.__isFloat=true;p.__isUniform=_;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}}}s=a.matchedPos();i=s.pos+s.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 i=this.__inputBitmapData;while(t<i.length){var s=i[t];++t;s.__updateGL(this.__context,e);++e}var a=0;var r=this.__paramBool;while(a<r.length){var n=r[a];++a;n.__updateGL(this.__context)}var _=0;var o=this.__paramFloat;while(_<o.length){var l=o[_];++_;l.__updateGL(this.__context)}var h=0;var c=this.__paramInt;while(h<c.length){var u=c[h];++h;u.__updateGL(this.__context)}},__updateGLFromBuffer:function(e,t){var i=0;var s;var a;var r;var n;var _;var o=0;var l=e.inputCount;while(o<l){var h=o++;s=e.inputRefs[h];a=e.inputs[h];r=e.inputFilter[h];n=e.inputMipFilter[h];_=e.inputWrap[h];if(a!=null){s.__updateGL(this.__context,i,a,r,n,_);++i}}var c=this.__context.gl;if(e.paramDataLength>0){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 w=null;var k=null;var P=null;var C=0;var T=e.paramCount;while(C<T){var M=C++;x=false;if(M<d){v=e.paramRefs_Bool[u];var S=0;var $=e.overrideBoolCount;while(S<$){var E=S++;if(v.name==e.overrideBoolNames[E]){w=e.overrideBoolValues[E];x=true;break}}if(x){v.__updateGL(this.__context,w)}else{v.__updateGLFromBuffer(this.__context,m,e.paramPositions[M],e.paramLengths[M],t)}++u}else if(M<d+g){b=e.paramRefs_Float[f];var B=0;var L=e.overrideFloatCount;while(B<L){var R=B++;if(b.name==e.overrideFloatNames[R]){k=e.overrideFloatValues[R];x=true;break}}if(x){b.__updateGL(this.__context,k)}else{b.__updateGLFromBuffer(this.__context,m,e.paramPositions[M],e.paramLengths[M],t)}++f}else{y=e.paramRefs_Int[p];var A=0;var I=e.overrideIntCount;while(A<I){var D=A++;if(y.name==e.overrideIntNames[D]){P=e.overrideIntValues[D];x=true;break}}if(x){y.__updateGL(this.__context,P)}else{y.__updateGLFromBuffer(this.__context,m,e.paramPositions[M],e.paramLengths[M],t)}++p}}},get_glFragmentSource:function(){return this.__glFragmentSource},get_glVertexSource:function(){return this.__glVertexSource},__class__:openfl_display_Shader,__properties__:{get_glVertexSource:"get_glVertexSource",get_glFragmentSource:"get_glFragmentSource"}};var openfl__$internal_renderer_context3D_Context3DMaskShader=function(){if(this.__glFragmentSource==null){this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform sampler2D openfl_Texture;\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\tdiscard;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = color;\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\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}"}openfl_display_Shader.call(this);this.__isGenerated=true;this.__initGL()};$hxClasses["openfl._internal.renderer.context3D.Context3DMaskShader"]=openfl__$internal_renderer_context3D_Context3DMaskShader;openfl__$internal_renderer_context3D_Context3DMaskShader.__name__=["openfl","_internal","renderer","context3D","Context3DMaskShader"];openfl__$internal_renderer_context3D_Context3DMaskShader.__super__=openfl_display_Shader;openfl__$internal_renderer_context3D_Context3DMaskShader.prototype=$extend(openfl_display_Shader.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:openfl__$internal_renderer_context3D_Context3DMaskShader});var openfl__$internal_renderer_context3D_Context3DShape=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DShape"]=openfl__$internal_renderer_context3D_Context3DShape;openfl__$internal_renderer_context3D_Context3DShape.__name__=["openfl","_internal","renderer","context3D","Context3DShape"];openfl__$internal_renderer_context3D_Context3DShape.render=function(e,t){if(!e.__renderable||e.__worldAlpha<=0){return}var i=e.__graphics;if(i!=null){t.__setBlendMode(e.__worldBlendMode);t.__pushMaskObject(e);openfl__$internal_renderer_context3D_Context3DGraphics.render(i,t);if(i.__bitmap!=null&&i.__visible){var s=t.__context3D;var a=e.__worldScale9Grid;var r=t.__initDisplayShader(e.__worldShader);t.setShader(r);t.applyBitmapData(i.__bitmap,true);t.applyMatrix(t.__getMatrix(i.__worldTransform,1));t.applyAlpha(e.__worldAlpha);t.applyColorTransform(e.__worldColorTransform);t.updateShader();var n=i.__bitmap.getVertexBuffer(s);if(r.__position!=null){s.setVertexBufferAt(r.__position.index,n,0,3)}if(r.__textureCoord!=null){s.setVertexBufferAt(r.__textureCoord.index,n,3,2)}var _=i.__bitmap.getIndexBuffer(s);s.drawTriangles(_);t.__clearShader()}t.__popMaskObject(e)}};openfl__$internal_renderer_context3D_Context3DShape.renderMask=function(e,t){var i=e.__graphics;if(i!=null){openfl__$internal_renderer_context3D_Context3DGraphics.renderMask(i,t);if(i.__bitmap!=null){var s=t.__context3D;var a=t.__maskShader;t.setShader(a);t.applyBitmapData(i.__bitmap,true);t.applyMatrix(t.__getMatrix(i.__worldTransform,1));t.updateShader();var r=i.__bitmap.getVertexBuffer(s);if(a.__position!=null){s.setVertexBufferAt(a.__position.index,r,0,3)}if(a.__textureCoord!=null){s.setVertexBufferAt(a.__textureCoord.index,r,3,2)}var n=i.__bitmap.getIndexBuffer(s);s.drawTriangles(n);t.__clearShader()}}};var openfl__$internal_renderer_context3D_Context3DState=function(){this.backBufferEnableDepthAndStencil=false;this.blendDestinationAlphaFactor=9;this.blendSourceAlphaFactor=2;this.blendDestinationRGBFactor=9;this.blendSourceRGBFactor=2;this.colorMaskRed=true;this.colorMaskGreen=true;this.colorMaskBlue=true;this.colorMaskAlpha=true;this.culling=3;this.depthCompareMode=4;this.depthMask=true;this.samplerStates=[];this.scissorRectangle=new openfl_geom_Rectangle;this.stencilCompareMode=0;this.stencilDepthFail=5;this.stencilFail=5;this.stencilPass=5;this.stencilReadMask=255;this.stencilReferenceValue=0;this.stencilTriangleFace=2;this.stencilWriteMask=255;this.textures=[];this.__frontFaceGLCCW=true;this.__glBlendEquation=32774};$hxClasses["openfl._internal.renderer.context3D.Context3DState"]=openfl__$internal_renderer_context3D_Context3DState;openfl__$internal_renderer_context3D_Context3DState.__name__=["openfl","_internal","renderer","context3D","Context3DState"];openfl__$internal_renderer_context3D_Context3DState.prototype={backBufferEnableDepthAndStencil:null,blendDestinationAlphaFactor:null,blendSourceAlphaFactor:null,blendDestinationRGBFactor:null,blendSourceRGBFactor:null,colorMaskRed:null,colorMaskGreen:null,colorMaskBlue:null,colorMaskAlpha:null,culling:null,depthCompareMode:null,depthMask:null,program:null,renderToTexture:null,renderToTextureAntiAlias:null,renderToTextureDepthStencil:null,renderToTextureSurfaceSelector:null,samplerStates:null,scissorEnabled:null,scissorRectangle:null,stencilCompareMode:null,stencilDepthFail:null,stencilFail:null,stencilPass:null,stencilReadMask:null,stencilReferenceValue:null,stencilTriangleFace:null,stencilWriteMask:null,textures:null,shader:null,__currentGLArrayBuffer:null,__currentGLElementArrayBuffer:null,__currentGLFramebuffer:null,__currentGLTexture2D:null,__currentGLTextureCubeMap:null,__enableGLBlend:null,__enableGLCullFace:null,__enableGLDepthTest:null,__enableGLScissorTest:null,__enableGLStencilTest:null,__frontFaceGLCCW:null,__glBlendEquation:null,__primaryGLFramebuffer:null,__class__:openfl__$internal_renderer_context3D_Context3DState};var openfl__$internal_renderer_context3D_Context3DTextField=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DTextField"]=openfl__$internal_renderer_context3D_Context3DTextField;openfl__$internal_renderer_context3D_Context3DTextField.__name__=["openfl","_internal","renderer","context3D","Context3DTextField"];openfl__$internal_renderer_context3D_Context3DTextField.render=function(e,t){var i=t.__softwareRenderer;var s=e.__worldTransform;var a=e.__textEngine;var r=a.background||a.border?a.bounds:a.textBounds;var n=e.__graphics;if(e.__dirty){e.__updateLayout();if(n.__bounds==null){n.__bounds=new openfl_geom_Rectangle}n.__bounds.copyFrom(r)}n.__update(i.__worldTransform);if(e.__dirty||n.__softwareDirty){var _=n.__width;var o=n.__height;if((a.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(a.text,""))&&!a.background&&!a.border&&!a.__hasFocus&&(a.type!=1||!a.selectable)||(a.width<=0||a.height<=0)&&a.autoSize!=2){e.__graphics.__canvas=null;e.__graphics.__context=null;e.__graphics.__bitmap=null;e.__graphics.__softwareDirty=false;e.__graphics.set___dirty(false);e.__dirty=false}else{if(e.__graphics.__canvas==null){e.__graphics.__canvas=window.document.createElement("canvas");e.__graphics.__context=e.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=n.__context;var l=n.__renderTransform;if(i.__isDOM){var h=i.pixelRatio;n.__canvas.width=_*h|0;n.__canvas.height=o*h|0;n.__canvas.style.width=_+"px";n.__canvas.style.height=o+"px";var c=openfl_geom_Matrix.__pool.get();c.copyFrom(l);c.scale(h,h);i.setTransform(c,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(c)}else{n.__canvas.width=_;n.__canvas.height=o;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.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,n.__canvas.width,n.__canvas.height)}if(a.text!=null&&a.text!=""||a.__hasFocus){var u=a.text;if(!i.__allowSmoothing||a.antiAliasType==0&&a.sharpness==400){n.__context.imageSmoothingEnabled=false}else{n.__context.imageSmoothingEnabled=true}if(a.border||a.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1);if(a.background){var f=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+f;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var p=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+p;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var d=-e.get_scrollH();var g=0;var m=0;var v=e.get_scrollV()-1;while(m<v){var b=m++;g-=a.lineHeights.get(b)}var y;var x=0;var w=a.layoutGroups;while(x<w.get_length()){var k=w.get(x);++x;if(k.lineIndex<e.get_scrollV()-1){continue}if(k.lineIndex>e.get_scrollV()+a.bottomScrollV-2){break}var P="#"+StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(k.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,k.startIndex,k.endIndex),k.offsetX+d-r.x,k.offsetY+k.ascent+g-r.y);if(e.__caretIndex>-1&&a.selectable){if(e.__selectionIndex==e.__caretIndex){if(e.__showCursor&&k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex){y=0;var C=0;var T=e.__caretIndex-k.startIndex;while(C<T){var M=C++;if(k.positions.length<=M){break}y+=k.positions[M]}var S=0;var $=e.get_scrollV();var E=k.lineIndex+1;while($<E){var B=$++;S+=a.lineHeights.get(B-1)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var L=StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+L;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(k.offsetX+y-e.get_scrollH()-r.x,S+2-r.y);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(k.offsetX+y-e.get_scrollH()-r.x,S+openfl__$internal_text_TextEngine.getFormatHeight(e.get_defaultTextFormat())-1-r.y);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}else if(k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex||k.startIndex<=e.__selectionIndex&&k.endIndex>=e.__selectionIndex||k.startIndex>e.__caretIndex&&k.endIndex<e.__selectionIndex||k.startIndex>e.__selectionIndex&&k.endIndex<e.__caretIndex){var R=Math.min(e.__selectionIndex,e.__caretIndex)|0;var A=Math.max(e.__selectionIndex,e.__caretIndex)|0;if(k.startIndex>R){R=k.startIndex}if(k.endIndex<A){A=k.endIndex}var I;var D;I=e.getCharBoundaries(R);if(A>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)){D=e.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)-1);D.x+=D.width+2}else{D=e.getCharBoundaries(A)}if(I!=null&&D!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(I.x+d,I.y+g,D.x-I.x,k.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,R,A),d+I.x,k.offsetY+k.ascent+g)}}}if(k.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var F=k.offsetX+d-r.x;var O=Math.floor(k.offsetY+g+k.ascent-r.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(F,O);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(F+k.width,O);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(a.border||a.background){if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,r.width,r.height)}if(a.background){var j=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+j;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var G=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(e.__caretIndex>-1&&a.selectable&&e.__showCursor){var H=-e.get_scrollH();var U=0;var N=0;var W=e.get_scrollV()-1;while(N<W){var V=N++;U+=a.lineHeights.get(V)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var z=StringTools.hex(e.get_defaultTextFormat().color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+z;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(H+2.5,U+2.5);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(H+2.5,U+openfl__$internal_text_TextEngine.getFormatHeight(e.get_defaultTextFormat())-1);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}n.__bitmap=openfl_display_BitmapData.fromCanvas(e.__graphics.__canvas);n.__visible=true;e.__dirty=false;n.__softwareDirty=false;n.set___dirty(false)}}e.__graphics.__hardwareDirty=false};openfl__$internal_renderer_context3D_Context3DTextField.renderMask=function(e,t){var i=t.__softwareRenderer;var s=e.__worldTransform;var a=e.__textEngine;var r=a.background||a.border?a.bounds:a.textBounds;var n=e.__graphics;if(e.__dirty){e.__updateLayout();if(n.__bounds==null){n.__bounds=new openfl_geom_Rectangle}n.__bounds.copyFrom(r)}n.__update(i.__worldTransform);if(e.__dirty||n.__softwareDirty){var _=n.__width;var o=n.__height;if((a.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(a.text,""))&&!a.background&&!a.border&&!a.__hasFocus&&(a.type!=1||!a.selectable)||(a.width<=0||a.height<=0)&&a.autoSize!=2){e.__graphics.__canvas=null;e.__graphics.__context=null;e.__graphics.__bitmap=null;e.__graphics.__softwareDirty=false;e.__graphics.set___dirty(false);e.__dirty=false}else{if(e.__graphics.__canvas==null){e.__graphics.__canvas=window.document.createElement("canvas");e.__graphics.__context=e.__graphics.__canvas.getContext("2d")}openfl__$internal_renderer_canvas_CanvasTextField.context=n.__context;var l=n.__renderTransform;if(i.__isDOM){var h=i.pixelRatio;n.__canvas.width=_*h|0;n.__canvas.height=o*h|0;n.__canvas.style.width=_+"px";n.__canvas.style.height=o+"px";var c=openfl_geom_Matrix.__pool.get();c.copyFrom(l);c.scale(h,h);i.setTransform(c,openfl__$internal_renderer_canvas_CanvasTextField.context);openfl_geom_Matrix.__pool.release(c)}else{n.__canvas.width=_;n.__canvas.height=o;openfl__$internal_renderer_canvas_CanvasTextField.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.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,n.__canvas.width,n.__canvas.height)}if(a.text!=null&&a.text!=""||a.__hasFocus){var u=a.text;if(!i.__allowSmoothing||a.antiAliasType==0&&a.sharpness==400){n.__context.imageSmoothingEnabled=false}else{n.__context.imageSmoothingEnabled=true}if(a.border||a.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1);if(a.background){var f=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+f;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var p=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+p;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline="alphabetic";openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign="start";var d=-e.get_scrollH();var g=0;var m=0;var v=e.get_scrollV()-1;while(m<v){var b=m++;g-=a.lineHeights.get(b)}var y;var x=0;var w=a.layoutGroups;while(x<w.get_length()){var k=w.get(x);++x;if(k.lineIndex<e.get_scrollV()-1){continue}if(k.lineIndex>e.get_scrollV()+a.bottomScrollV-2){break}var P="#"+StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.font=openfl__$internal_text_TextEngine.getFont(k.format);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,k.startIndex,k.endIndex),k.offsetX+d-r.x,k.offsetY+k.ascent+g-r.y);if(e.__caretIndex>-1&&a.selectable){if(e.__selectionIndex==e.__caretIndex){if(e.__showCursor&&k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex){y=0;var C=0;var T=e.__caretIndex-k.startIndex;while(C<T){var M=C++;if(k.positions.length<=M){break}y+=k.positions[M]}var S=0;var $=e.get_scrollV();var E=k.lineIndex+1;while($<E){var B=$++;S+=a.lineHeights.get(B-1)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var L=StringTools.hex(k.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+L;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(k.offsetX+y-e.get_scrollH()-r.x,S+2-r.y);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(k.offsetX+y-e.get_scrollH()-r.x,S+openfl__$internal_text_TextEngine.getFormatHeight(e.get_defaultTextFormat())-1-r.y);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}else if(k.startIndex<=e.__caretIndex&&k.endIndex>=e.__caretIndex||k.startIndex<=e.__selectionIndex&&k.endIndex>=e.__selectionIndex||k.startIndex>e.__caretIndex&&k.endIndex<e.__selectionIndex||k.startIndex>e.__selectionIndex&&k.endIndex<e.__caretIndex){var R=Math.min(e.__selectionIndex,e.__caretIndex)|0;var A=Math.max(e.__selectionIndex,e.__caretIndex)|0;if(k.startIndex>R){R=k.startIndex}if(k.endIndex<A){A=k.endIndex}var I;var D;I=e.getCharBoundaries(R);if(A>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)){D=e.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(a.text)-1);D.x+=D.width+2}else{D=e.getCharBoundaries(A)}if(I!=null&&D!=null){openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#000000";openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(I.x+d,I.y+g,D.x-I.x,k.height);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#FFFFFF";openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(u,R,A),d+I.x,k.offsetY+k.ascent+g)}}}if(k.format.underline){openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle=P;openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var F=k.offsetX+d-r.x;var O=Math.floor(k.offsetY+g+k.ascent-r.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(F,O);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(F+k.width,O);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(a.border||a.background){if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,r.width-1,r.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,r.width,r.height)}if(a.background){var j=StringTools.hex(a.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+j;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(a.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var G=StringTools.hex(a.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+G;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(e.__caretIndex>-1&&a.selectable&&e.__showCursor){var H=-e.get_scrollH();var U=0;var N=0;var W=e.get_scrollV()-1;while(N<W){var V=N++;U+=a.lineHeights.get(V)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var z=StringTools.hex(e.get_defaultTextFormat().color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+z;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(H+2.5,U+2.5);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(H+2.5,U+openfl__$internal_text_TextEngine.getFormatHeight(e.get_defaultTextFormat())-1);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}n.__bitmap=openfl_display_BitmapData.fromCanvas(e.__graphics.__canvas);n.__visible=true;e.__dirty=false;n.__softwareDirty=false;n.set___dirty(false)}}e.__graphics.__hardwareDirty=false};var openfl__$internal_renderer_context3D_Context3DVideo=function(){};$hxClasses["openfl._internal.renderer.context3D.Context3DVideo"]=openfl__$internal_renderer_context3D_Context3DVideo;openfl__$internal_renderer_context3D_Context3DVideo.__name__=["openfl","_internal","renderer","context3D","Context3DVideo"];openfl__$internal_renderer_context3D_Context3DVideo.render=function(e,t){if(!e.__renderable||e.__worldAlpha<=0||e.__stream==null){return}if(e.__stream.__video!=null){var i=t.__context3D;var s=i.gl;var a=e.__getTexture(i);if(a==null){return}t.__setBlendMode(e.__worldBlendMode);t.__pushMaskObject(e);var r=t.__initDisplayShader(e.__worldShader);t.setShader(r);t.applyBitmapData(null,true,false);t.applyMatrix(t.__getMatrix(e.__renderTransform,1));t.applyAlpha(e.__worldAlpha);t.applyColorTransform(e.__worldColorTransform);if(r.__textureSize!=null){openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue[0]=e.__stream!=null?e.__stream.__video.videoWidth:0;openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue[1]=e.__stream!=null?e.__stream.__video.videoHeight:0;r.__textureSize.value=openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue}t.updateShader();i.setTextureAt(0,e.__getTexture(i));i.__flushGLTextures();s.uniform1i(r.__texture.index,0);if(e.smoothing){s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR)}else{s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.NEAREST)}var n=e.__getVertexBuffer(i);if(r.__position!=null){i.setVertexBufferAt(r.__position.index,n,0,3)}if(r.__textureCoord!=null){i.setVertexBufferAt(r.__textureCoord.index,n,3,2)}var _=e.__getIndexBuffer(i);i.drawTriangles(_);t.__clearShader();t.__popMaskObject(e)}};openfl__$internal_renderer_context3D_Context3DVideo.renderMask=function(e,t){if(e.__stream==null){return}if(e.__stream.__video!=null){var i=t.__context3D;var s=i.gl;var a=t.__maskShader;t.setShader(a);t.applyBitmapData(openfl__$internal_renderer_context3D_Context3DMaskShader.opaqueBitmapData,true);t.applyMatrix(t.__getMatrix(e.__renderTransform,1));t.updateShader();var r=e.__getVertexBuffer(i);if(a.__position!=null){i.setVertexBufferAt(a.__position.index,r,0,3)}if(a.__textureCoord!=null){i.setVertexBufferAt(a.__textureCoord.index,r,3,2)}var n=e.__getIndexBuffer(i);i.drawTriangles(n);t.__clearShader()}};var openfl__$internal_renderer_dom_DOMBitmap=function(){};$hxClasses["openfl._internal.renderer.dom.DOMBitmap"]=openfl__$internal_renderer_dom_DOMBitmap;openfl__$internal_renderer_dom_DOMBitmap.__name__=["openfl","_internal","renderer","dom","DOMBitmap"];openfl__$internal_renderer_dom_DOMBitmap.clear=function(e,t){if(e.__image!=null){t.element.removeChild(e.__image);e.__image=null;e.__style=null}if(e.__canvas!=null){t.element.removeChild(e.__canvas);e.__canvas=null;e.__style=null}};openfl__$internal_renderer_dom_DOMBitmap.renderCanvas=function(e,t){if(e.__image!=null){t.element.removeChild(e.__image);e.__image=null}if(e.__canvas==null){e.__canvas=window.document.createElement("canvas");e.__context=e.__canvas.getContext("2d");e.__imageVersion=-1;if(!t.__allowSmoothing||!e.smoothing){e.__context.imageSmoothingEnabled=false}t.__initializeElement(e,e.__canvas)}if(e.__imageVersion!=e.__bitmapData.image.version){lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(e.__bitmapData.image);e.__canvas.width=e.__bitmapData.width+1;e.__canvas.width=e.__bitmapData.width;e.__canvas.height=e.__bitmapData.height;e.__context.drawImage(e.__bitmapData.image.buffer.__srcCanvas,0,0);e.__imageVersion=e.__bitmapData.image.version}t.__updateClip(e);t.__applyStyle(e,true,true,true)};openfl__$internal_renderer_dom_DOMBitmap.renderImage=function(e,t){if(e.__canvas!=null){t.element.removeChild(e.__canvas);e.__canvas=null}if(e.__image==null){e.__image=window.document.createElement("img");e.__image.crossOrigin="Anonymous";e.__image.src=e.__bitmapData.image.buffer.__srcImage.src;t.__initializeElement(e,e.__image)}t.__updateClip(e);t.__applyStyle(e,true,true,true)};var openfl__$internal_renderer_dom_DOMDisplayObject=function(){};$hxClasses["openfl._internal.renderer.dom.DOMDisplayObject"]=openfl__$internal_renderer_dom_DOMDisplayObject;openfl__$internal_renderer_dom_DOMDisplayObject.__name__=["openfl","_internal","renderer","dom","DOMDisplayObject"];openfl__$internal_renderer_dom_DOMDisplayObject.clear=function(e,t){openfl__$internal_renderer_dom_DOMShape.clear(e,t)};var openfl__$internal_renderer_dom_DOMShape=function(){};$hxClasses["openfl._internal.renderer.dom.DOMShape"]=openfl__$internal_renderer_dom_DOMShape;openfl__$internal_renderer_dom_DOMShape.__name__=["openfl","_internal","renderer","dom","DOMShape"];openfl__$internal_renderer_dom_DOMShape.clear=function(e,t){if(e.__canvas!=null){t.element.removeChild(e.__canvas);e.__canvas=null;e.__style=null}};var openfl__$internal_renderer_dom_DOMTextField=function(){};$hxClasses["openfl._internal.renderer.dom.DOMTextField"]=openfl__$internal_renderer_dom_DOMTextField;openfl__$internal_renderer_dom_DOMTextField.__name__=["openfl","_internal","renderer","dom","DOMTextField"];openfl__$internal_renderer_dom_DOMTextField.clear=function(e,t){if(e.__div!=null){t.element.removeChild(e.__div);e.__div=null;e.__style=null}};openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch=function(e){if(e.matched(2)!=null){return e.matched(2)}else{return e.matched(3)}};var openfl__$internal_renderer_dom_DOMVideo=function(){};$hxClasses["openfl._internal.renderer.dom.DOMVideo"]=openfl__$internal_renderer_dom_DOMVideo;openfl__$internal_renderer_dom_DOMVideo.__name__=["openfl","_internal","renderer","dom","DOMVideo"];openfl__$internal_renderer_dom_DOMVideo.clear=function(e,t){if(e.__active){t.element.removeChild(e.__stream.__video);e.__active=false}};openfl__$internal_renderer_dom_DOMVideo.render=function(e,t){if(e.stage!=null&&e.__stream!=null&&e.__worldVisible&&e.__renderable){if(!e.__active){t.__initializeElement(e,e.__stream.__video);e.__active=true;e.__dirty=true}if(e.__dirty){e.__stream.__video.width=e.__width|0;e.__stream.__video.height=e.__height|0;e.__dirty=false}t.__updateClip(e);t.__applyStyle(e,true,true,true)}else{openfl__$internal_renderer_dom_DOMVideo.clear(e,t)}};var openfl__$internal_symbols_SWFSymbol=function(){};$hxClasses["openfl._internal.symbols.SWFSymbol"]=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_SWFSymbol.__name__=["openfl","_internal","symbols","SWFSymbol"];openfl__$internal_symbols_SWFSymbol.prototype={className:null,id:null,__createObject:function(e){return null},__class__:openfl__$internal_symbols_SWFSymbol};var openfl__$internal_symbols_BitmapSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.BitmapSymbol"]=openfl__$internal_symbols_BitmapSymbol;openfl__$internal_symbols_BitmapSymbol.__name__=["openfl","_internal","symbols","BitmapSymbol"];openfl__$internal_symbols_BitmapSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_BitmapSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{alpha:null,path:null,smooth:null,__createObject:function(e){return new openfl_display_Bitmap(openfl_display_BitmapData.fromImage(e.library.getImage(this.path)),1,this.smooth!=false)},__class__:openfl__$internal_symbols_BitmapSymbol});var openfl__$internal_symbols_ButtonSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.ButtonSymbol"]=openfl__$internal_symbols_ButtonSymbol;openfl__$internal_symbols_ButtonSymbol.__name__=["openfl","_internal","symbols","ButtonSymbol"];openfl__$internal_symbols_ButtonSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_ButtonSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{downState:null,hitState:null,overState:null,upState:null,__createObject:function(e){var t=null;openfl_display_SimpleButton.__initSWF=e;openfl_display_SimpleButton.__initSymbol=this;if(this.className!=null){var i=Type.resolveClass(this.className);if(i!=null){t=Type.createInstance(i,[])}}if(t==null){t=new openfl_display_SimpleButton}return t},__class__:openfl__$internal_symbols_ButtonSymbol});var openfl__$internal_symbols_DynamicTextSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.DynamicTextSymbol"]=openfl__$internal_symbols_DynamicTextSymbol;openfl__$internal_symbols_DynamicTextSymbol.__name__=["openfl","_internal","symbols","DynamicTextSymbol"];openfl__$internal_symbols_DynamicTextSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_DynamicTextSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{align:null,border:null,color:null,fontHeight:null,fontID:null,fontName:null,height:null,html:null,indent:null,input:null,leading:null,leftMargin:null,multiline:null,password:null,rightMargin:null,selectable:null,text:null,width:null,wordWrap:null,x:null,y:null,__createObject:function(e){var t=new openfl_text_TextField;t.__fromSymbol(e,this);return t},__class__:openfl__$internal_symbols_DynamicTextSymbol});var openfl__$internal_symbols_FontSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.FontSymbol"]=openfl__$internal_symbols_FontSymbol;openfl__$internal_symbols_FontSymbol.__name__=["openfl","_internal","symbols","FontSymbol"];openfl__$internal_symbols_FontSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_FontSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{advances:null,ascent:null,bold:null,codes:null,descent:null,glyphs:null,italic:null,leading:null,name:null,__class__:openfl__$internal_symbols_FontSymbol});var openfl__$internal_symbols_ShapeSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.ShapeSymbol"]=openfl__$internal_symbols_ShapeSymbol;openfl__$internal_symbols_ShapeSymbol.__name__=["openfl","_internal","symbols","ShapeSymbol"];openfl__$internal_symbols_ShapeSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_ShapeSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{commands:null,rendered:null,__createObject:function(e){var t=new openfl_display_Shape;var i=t.get_graphics();if(this.rendered!=null){i.copyFrom(this.rendered.get_graphics());return t}var s=0;var a=this.commands;while(s<a.length){var r=a[s];++s;switch(r[1]){case 0:var n=r[5];var _=r[4];var o=r[3];var l=r[2];var h=e.symbols.get(l);var c=e.library.getImage(h.path);if(c!=null){i.beginBitmapFill(openfl_display_BitmapData.fromImage(c),o,_,n)}break;case 1:var u=r[3];var f=r[2];i.beginFill(f,u);break;case 2:var p=r[9];var d=r[8];var g=r[7];var m=r[6];var v=r[5];var b=r[4];var y=r[3];var x=r[2];i.beginGradientFill(x,y,b,v,m,g,d,p);break;case 3:var w=r[5];var k=r[4];var P=r[3];var C=r[2];i.curveTo(C,P,k,w);break;case 4:i.endFill();break;case 5:var T=r[9];var M=r[8];var S=r[7];var $=r[6];var E=r[5];var B=r[4];var L=r[3];var R=r[2];if(R!=null){i.lineStyle(R,L,B,E,$,S,M,T)}else{i.lineStyle()}break;case 6:var A=r[3];var I=r[2];i.lineTo(I,A);break;case 7:var D=r[3];var F=r[2];i.moveTo(F,D);break}}this.commands=null;this.rendered=new openfl_display_Shape;this.rendered.get_graphics().copyFrom(t.get_graphics());return t},__class__:openfl__$internal_symbols_ShapeSymbol});var openfl__$internal_symbols_SpriteSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this);this.frames=[]};$hxClasses["openfl._internal.symbols.SpriteSymbol"]=openfl__$internal_symbols_SpriteSymbol;openfl__$internal_symbols_SpriteSymbol.__name__=["openfl","_internal","symbols","SpriteSymbol"];openfl__$internal_symbols_SpriteSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_SpriteSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{baseClassName:null,frames:null,scale9Grid:null,__createObject:function(e){openfl_display_MovieClip.__initSWF=e;openfl_display_MovieClip.__initSymbol=this;var t=null;if(this.className!=null){t=Type.resolveClass(this.className);var i=t==null}if(t==null&&this.baseClassName!=null){t=Type.resolveClass(this.baseClassName);var s=t==null}var a=null;if(t!=null){a=Type.createInstance(t,[])}else{a=new openfl_display_MovieClip}a.set_scale9Grid(this.scale9Grid);return a},__class__:openfl__$internal_symbols_SpriteSymbol});var openfl__$internal_symbols_StaticTextSymbol=function(){openfl__$internal_symbols_SWFSymbol.call(this)};$hxClasses["openfl._internal.symbols.StaticTextSymbol"]=openfl__$internal_symbols_StaticTextSymbol;openfl__$internal_symbols_StaticTextSymbol.__name__=["openfl","_internal","symbols","StaticTextSymbol"];openfl__$internal_symbols_StaticTextSymbol.__super__=openfl__$internal_symbols_SWFSymbol;openfl__$internal_symbols_StaticTextSymbol.prototype=$extend(openfl__$internal_symbols_SWFSymbol.prototype,{matrix:null,records:null,rendered:null,__createObject:function(e){var t=new openfl_text_StaticText;var i=t.__graphics;if(this.rendered!=null){t.text=this.rendered.text;i.copyFrom(this.rendered.__graphics);return t}var s="";if(this.records!=null){var a=null;var r=16777215;var n=this.matrix.tx;var _=this.matrix.ty;var o;var l;var h=0;var c=this.records;while(h<c.length){var u=c[h];++h;if(u.fontID!=null){a=e.symbols.h[u.fontID]}if(u.offsetX!=null){n=this.matrix.tx+u.offsetX*.05}if(u.offsetY!=null){_=this.matrix.ty+u.offsetY*.05}if(u.color!=null){r=u.color}if(a!=null){o=u.fontHeight/1024*.05;var f=0;var p=u.glyphs.length;while(f<p){var d=f++;l=u.glyphs[d];s+=String.fromCharCode(a.codes[l]);var g=0;var m=a.glyphs[l];while(g<m.length){var v=m[g];++g;switch(v[1]){case 1:var b=v[3];i.beginFill(r&16777215,(r>>24&255)/255);break;case 3:var y=v[5];var x=v[4];var w=v[3];var k=v[2];i.curveTo(k*o+n,w*o+_,x*o+n,y*o+_);break;case 4:i.endFill();break;case 5:var P=v[9];var C=v[8];var T=v[7];var M=v[6];var S=v[5];var $=v[4];var E=v[3];var B=v[2];if(B!=null){i.lineStyle(B,E,$,S,M,T,C,P)}else{i.lineStyle()}break;case 6:var L=v[3];var R=v[2];i.lineTo(R*o+n,L*o+_);break;case 7:var A=v[3];var I=v[2];i.moveTo(I*o+n,A*o+_);break;default:}}n+=u.advances[d]*.05}}}}t.text=s;this.records=null;this.rendered=new openfl_text_StaticText;this.rendered.text=s;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 i=e.bold;var s=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(i&&s){var n=openfl_text_Font.__fontByName;var _=a+" Bold Italic";if(__map_reserved[_]!=null){r=n.existsReserved(_)}else{r=n.h.hasOwnProperty(_)}}else{r=false}if(r){return openfl__$internal_text_TextEngine.findFont(a+" Bold Italic")}else{var o;if(i){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(s){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 i;var s;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;i=e.size*e.__descent}else if(a!=null&&a.unitsPerEM!=0){t=a.ascender/a.unitsPerEM*e.size;i=Math.abs(a.descender/a.unitsPerEM*e.size)}else{t=e.size;i=e.size*.185}s=e.leading;return t+i+s};openfl__$internal_text_TextEngine.getFont=function(e){var t=e.font;var i=e.bold;var s=e.italic;if(t==null){t="_serif"}var a=StringTools.replace(StringTools.replace(t," Normal","")," Regular","");var r;if(i&&s){var n=openfl_text_Font.__fontByName;var _=a+" Bold Italic";if(__map_reserved[_]!=null){r=n.existsReserved(_)}else{r=n.h.hasOwnProperty(_)}}else{r=false}if(r){t=a+" Bold Italic";i=false;s=false}else{var o;if(i){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";i=false}else{var c;if(s){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";s=false}else{if(i&&(t.indexOf(" Bold ")>-1||StringTools.endsWith(t," Bold"))){i=false}if(s&&(t.indexOf(" Italic ")>-1||StringTools.endsWith(t," Italic"))){s=false}}}}var p=s?"italic ":"normal ";p+="normal ";p+=i?"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 i=this.width;var s=0;var a=this.layoutGroups;while(s<a.get_length()){var r=a.get(s);++s;if(r.offsetX<t){t=r.offsetX}if(r.offsetY<i){i=r.offsetY}}if(t>=this.width){t=2}if(i>=this.height){i=2}var n=this.textHeight*1.185;this.textBounds.setTo(Math.max(t-2,0),Math.max(i-2,0),Math.min(this.textWidth+4,this.bounds.width+4),Math.min(n+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 i=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text,"\r",e);if(t==-1){return i}if(i==-1){return t}if(t<i){return t}else{return i}},getLineMeasurements:function(){this.lineAscents.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);this.lineHeights.set_length(0);this.lineWidths.set_length(0);var e=0;var t=0;var i=null;var s=0;var a=0;var r=0;this.textWidth=0;this.textHeight=0;this.numLines=1;this.bottomScrollV=0;this.maxScrollH=0;var n=0;var _=this.layoutGroups;while(n<_.get_length()){var o=_.get(n);++n;while(o.lineIndex>this.numLines-1){this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(i!=null?i:0);this.lineHeights.push(s);this.lineWidths.push(a);e=0;t=0;i=null;s=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(i==null){i=o.leading}else{i=Math.max(i,o.leading)|0}s=Math.max(s,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;i=u;r=h+c;this.textHeight=r}this.lineAscents.push(e);this.lineDescents.push(t);this.lineLeadings.push(i!=null?i:0);this.lineHeights.push(s);this.lineWidths.push(a);if(this.numLines==1){this.bottomScrollV=1;if(i>0){this.textHeight+=i}}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 n=-1;var v=null;var t=null;var i=openfl_text_TextField.__defaultTextFormat.clone();var s=0;var a=0;var r=0;var _=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 w=function(e,t,i){var s=[];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 n=0;var _;var o=t;var l=i;while(o<l){var h=o++;_=openfl__$internal_text_TextEngine.__context.measureText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(e,t,h+1)).width;s.push(_-n);n=_}}else{var c=t;var u=i;while(c<u){var f=c++;var p;if(f<lime_text__$UTF8String_UTF8String_$Impl_$.get_length(e)-1){var d=openfl__$internal_text_TextEngine.__context.measureText(lime_text__$UTF8String_UTF8String_$Impl_$.charAt(e,f+1)).width;var g=openfl__$internal_text_TextEngine.__context.measureText(lime_text__$UTF8String_UTF8String_$Impl_$.substr(e,f,2)).width;p=g-d}else{p=openfl__$internal_text_TextEngine.__context.measureText(lime_text__$UTF8String_UTF8String_$Impl_$.charAt(e,f)).width}s.push(p)}}return s};var k=function(e){var t=0;var i=0;while(i<e.length){var s=e[i];++i;t+=s}return t};var P=function(e){return openfl__$internal_text_TextEngine.__context.measureText(e).width};var C=function(e,t){if(o==null||o.startIndex!=o.endIndex){o=new openfl__$internal_text_TextLayoutGroup(v.format,e,t);m.layoutGroups.push(o)}else{o.format=v.format;o.startIndex=e;o.endIndex=t}};var T=function(){if(i.__ascent!=null){a=i.size*i.__ascent;_=i.size*i.__descent}else if(t!=null&&t.unitsPerEM!=0){a=t.ascender/t.unitsPerEM*i.size;_=Math.abs(t.descender/t.unitsPerEM*i.size)}else{a=i.size;_=i.size*.185}s=i.leading;c=Math.ceil(a+_+s);if(c>u){u=c}if(a>r){r=a}};var M=function(){var e=m.textFormatRanges.get_length()-1;if(n<e){n+=1;v=m.textFormatRanges.get(n);i.__merge(v.format);openfl__$internal_text_TextEngine.__context.font=openfl__$internal_text_TextEngine.getFont(i);t=openfl__$internal_text_TextEngine.getFontInstance(i);return true}return false};var S=function(e,t){if(t<=v.end){l=w(m.text,e,t);h=k(l)}else{var i=e;var s=v.end;var a=0;l=[];h=0;while(true){if(i!=s){var r=w(m.text,i,s);l=l.concat(r)}if(s!=t){if(!M()){lime_utils_Log.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"TextEngine.hx",lineNumber:1011,className:"openfl._internal.text.TextEngine",methodName:"getLayoutGroups"});break}i=s;if(t<v.end){s=t}else{s=v.end}++a}else{h=k(l);break}}n-=a+1;M()}};var $=function(e){if(e<=v.end){l=w(m.text,b,e);h=k(l);C(b,e);o.positions=l;o.offsetX=d;o.ascent=a;o.descent=_;o.leading=s;o.lineIndex=y;o.offsetY=g;o.width=h;o.height=c;d+=h;if(e==v.end){o=null;M();T()}}else{while(true){var t=e<v.end?e:v.end;if(b!=t){l=w(m.text,b,t);h=k(l);C(b,t);o.positions=l;o.offsetX=d;o.ascent=a;o.descent=_;o.leading=s;o.lineIndex=y;o.offsetY=g;o.width=h;o.height=c;d+=h;b=t}if(t==v.end){o=null}if(t==e){break}if(!M()){lime_utils_Log.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"TextEngine.hx",lineNumber:1099,className:"openfl._internal.text.TextEngine",methodName:"getLayoutGroups"});break}T()}}b=e};var E=function(){T();var e=m.layoutGroups.get_length();while(--e>-1){var t=m.layoutGroups.get(e);if(t.lineIndex<y){break}if(t.lineIndex>y){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 i;var s;var a;var r;var n;var _=k(t);while(d+_>m.width-2){s=0;i=s;r=0;while(d+r<m.width-2){n=t[i];if(n==0){++i;++s}else{r+=n;++i}}if(i<2&&r+d>m.width-2){if(b+i-s==e){break}}else{while(d+r>m.width-2){--i;if(i-s>0){S(b,b+i-s);r=h}else{i=1;s=0;S(b,b+1);r=0}}}a=b+i-s;$(a);E();S(a,e);t=l;_=h}};var L=function(e){if(m.width>=4&&m.wordWrap){B(e)}$(e)};M();T();x=v.format;var R;var A=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)+1;while(b<A)if(p>-1&&(f==-1||p<f)){if(b<=p){S(b,p);L(p);o=null}else if(o!=null&&o.startIndex!=o.endIndex){if(o.endIndex==f){o.width-=o.positions[o.positions.length-1]}o=null}if(v.end==p){M();T();x=v.format}if(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&&p<D){D=p}}if(D==-1){D=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)}S(b,D);if(x.align==2){if(l.length>0&&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 j=l[l.length-1];var G=j;if(d+h-G<=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 W=this.layoutGroups.get(this.layoutGroups.get_length()-N).offsetX;var V=this.layoutGroups.get_length()-N;var z=this.layoutGroups.get_length();while(V<z){var X=V++;o=this.layoutGroups.get(X);o.offsetX-=W;o.offsetY=g;o.lineIndex=y;d+=o.width}}L(D);R=false}else if(o!=null&&b==f){if(x.align!=2){o.endIndex=f;o.positions=o.positions.concat(l);o.width+=h}d+=h;b=D}else if(o==null||x.align==2){L(D)}else{var Y=D<v.end?D:v.end;if(Y<D){l=w(this.text,b,Y);h=k(l)}o.endIndex=Y;o.positions=o.positions.concat(l);o.width+=h;d+=h;if(Y==v.end){o=null;M();T();b=Y;if(Y!=D){$(D)}}if(p==D){++D}b=D}var J=lime_text__$UTF8String_UTF8String_$Impl_$.indexOf(this.text," ",b);if(p==e){o.endIndex=p;if(p-o.startIndex-o.positions.length<0){o.positions.push(0)}b=p+1}e=f;f=J;var K;if(!(p>-1&&p<=b&&(f>p||f==-1))){var q=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);K=b>q}else{K=true}if(K){break}}}else{var Z=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);if(b<Z){var Q=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text);S(b,Q);L(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text));E()}b+=1}},restrictText:function(e){if(e==null){return e}if(this.__restrictRegexp!=null){e=this.__restrictRegexp.split(e).join("")}return e},setTextAlignment:function(){var e=-1;var t=0;var i=this.width-4;var s;var a;var r=false;var n=0;var _=this.layoutGroups.get_length();while(n<_){var o=n++;s=this.layoutGroups.get(o);if(s.lineIndex!=e){e=s.lineIndex;var l=s.format.align;switch(l){case 0:if(this.lineWidths.get(e)<i){t=Math.round((i-this.lineWidths.get(e))/2)}else{t=0}break;case 2:if(this.lineWidths.get(e)<i){a=1;var h=o+1;var c=this.layoutGroups.get_length();while(h<c){var u=h++;if(this.layoutGroups.get(u).lineIndex==e){if(u==0||lime_text__$UTF8String_UTF8String_$Impl_$.charCodeAt(this.text,this.layoutGroups.get(u).startIndex-1)==32){++a}}else{break}}if(a>1){s=this.layoutGroups.get(o+a-1);var f=lime_text__$UTF8String_UTF8String_$Impl_$.charCodeAt(this.text,s.endIndex);if(s.endIndex<lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.text)&&f!=10&&f!=13){t=(i-this.lineWidths.get(e))/(a-1);r=true;var p=1;while(true){this.layoutGroups.get(o+p).offsetX+=t*p;if(!(++p<a)){break}}}}}t=0;break;case 4:if(this.lineWidths.get(e)<i){t=Math.round(i-this.lineWidths.get(e))}else{t=0}break;default:t=0}}if(t>0){s.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,i){this.format=e;this.start=t;this.end=i};$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,i){this.format=e;this.startIndex=t;this.endIndex=i};$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 i=$bind(this,this.__onWindowClose);var s=t;var a=function(){i(s)};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,i){if(i==null){i=false}openfl_display_DisplayObject.call(this);this.__bitmapData=e;this.pixelSnapping=t;this.smoothing=i;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 i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height);i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)}},__hitTest:function(e,t,i,s,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 n=this.__renderTransform;var _=n.a*n.d-n.b*n.c;var o=_==0?-n.tx:1/_*(n.c*(n.ty-t)+n.d*(e-n.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(s!=null&&!a){s.push(r)}return true}return false},__hitTestMask:function(e,t){if(this.__bitmapData==null){return false}this.__getRenderTransform();var i=this.__renderTransform;var s=i.a*i.d-i.b*i.c;var a=s==0?-i.tx:1/s*(i.c*(i.ty-t)+i.d*(e-i.tx));var r=this.__renderTransform;var n=r.a*r.d-r.b*r.c;var _=n==0?-r.ty:1/n*(r.a*(t-r.ty)+r.b*(r.tx-e));if(a>0&&_>0&&a<=this.__bitmapData.width&&_<=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 i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.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 n=e.context;e.setTransform(this.__renderTransform,n);var _=this.opaqueBackground;n.fillStyle="rgb("+(_>>>16&255)+","+(_>>>8&255)+","+(_&255)+")";n.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.__width;var c=l.__height;var u=l.__canvas;if(u!=null&&l.__visible&&h>=1&&c>=1){var f=l.__worldTransform;var p=e.context;var d=this.__scrollRect;var g=this.__worldScale9Grid;if(d==null||d.width>0&&d.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);p.globalAlpha=o;if(g!=null&&f.b==0&&f.c==0){p.setTransform(1,0,0,1,f.tx,f.ty);var m=l.__bounds;var v=l.__renderTransform.a;var b=l.__renderTransform.d;var y=f.a;var x=f.d;var w=Math.round(g.x*v);var k=Math.round(g.y*b);var P=Math.round((m.get_right()-g.get_right())*v);var C=Math.round((m.get_bottom()-g.get_bottom())*b);var T=Math.round(g.width*v);var M=Math.round(g.height*b);var S=Math.round(g.x*y);var $=Math.round(g.y*x);var E=Math.round((m.get_right()-g.get_right())*y);var B=Math.round((m.get_bottom()-g.get_bottom())*x);var L=Math.round(h*y)-S-E;var R=Math.round(c*x)-$-B;e.applySmoothing(p,false);if(T!=0&&M!=0){p.drawImage(u,0,0,w,k,0,0,S,$);p.drawImage(u,w,0,T,k,S,0,L,$);p.drawImage(u,w+T,0,P,k,S+L,0,E,$);p.drawImage(u,0,k,w,M,0,$,S,R);p.drawImage(u,w,k,T,M,S,$,L,R);p.drawImage(u,w+T,k,P,M,S+L,$,E,R);p.drawImage(u,0,k+M,w,C,0,$+R,S,B);p.drawImage(u,w,k+M,T,C,S,$+R,L,B);p.drawImage(u,w+T,k+M,P,C,S+L,$+R,E,B)}else if(T==0&&M!=0){var A=S+L+E;p.drawImage(u,0,0,h,k,0,0,A,$);p.drawImage(u,0,k,h,M,0,$,A,R);p.drawImage(u,0,k+M,h,C,0,$+R,A,B)}else if(M==0&&T!=0){var I=$+R+B;p.drawImage(u,0,0,w,c,0,0,S,I);p.drawImage(u,w,0,T,c,S,0,L,I);p.drawImage(u,w+T,0,P,c,S+L,0,E,I)}}else{e.setTransform(f,p);if(e.__isDOM){var D=1/e.pixelRatio;p.scale(D,D)}p.drawImage(u,0,0,h,c)}e.__popMaskObject(this)}}}}}}}}}if(!!this.__renderable){var F=e.__getAlpha(this.__worldAlpha);if(F>0&&this.__bitmapData!=null&&this.__bitmapData.__isValid&&this.__bitmapData.readable){var O=e.context;e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(this.__bitmapData.image);O.globalAlpha=F;var j=this.__scrollRect;e.setTransform(this.__renderTransform,O);if(!e.__allowSmoothing||!this.smoothing){O.imageSmoothingEnabled=false}if(j==null){O.drawImage(this.__bitmapData.image.get_src(),0,0,this.__bitmapData.image.width,this.__bitmapData.image.height)}else{O.drawImage(this.__bitmapData.image.get_src(),j.x,j.y,j.width,j.height)}if(!e.__allowSmoothing||!this.smoothing){O.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 i=this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0;var s=this.__graphics;if(this.stage!=null&&this.__worldVisible&&this.__renderable&&s!=null){openfl__$internal_renderer_canvas_CanvasGraphics.render(s,e.__canvasRenderer);if(s.__softwareDirty||this.__worldAlphaChanged||this.__canvas!=s.__canvas){if(s.__canvas!=null){if(this.__canvas!=s.__canvas){if(this.__canvas!=null){e.element.removeChild(this.__canvas)}this.__canvas=s.__canvas;this.__context=s.__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=s.__worldTransform;if(s.__transformDirty){s.__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 i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}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},set_bitmapData:function(e){this.__bitmapData=e;this.smoothing=false;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}var t=this.__filters!=null;this.__imageVersion=-1;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){this.set_scaleY(e/this.__bitmapData.height)}else{this.set_scaleY(0)}return e},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){this.set_scaleX(e/this.__bitmapData.width)}else{this.set_scaleX(0)}return e},__class__:openfl_display_Bitmap,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{set_bitmapData:"set_bitmapData",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],i="WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1];return{dom:i,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,i,s){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(i&&e.__worldAlphaChanged){if(e.__worldAlpha<1){a.setProperty("opacity",e.__worldAlpha==null?"null":""+e.__worldAlpha,null)}else{a.removeProperty("opacity")}}if(s&&e.__worldClipChanged){if(e.__worldClip==null){a.removeProperty("clip")}else{var n=e.__worldClip;a.setProperty("clip","rect("+n.y+"px, "+n.get_right()+"px, "+n.get_bottom()+"px, "+n.x+"px)",null)}}},__initializeElement:function(e,t){var i=e.__style=t.style;i.setProperty("position","absolute",null);i.setProperty("top","0",null);i.setProperty("left","0",null);i.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 i=this.__clipRects[this.__numClipRects];e.__transform(i,t);if(this.__numClipRects>0){var s=this.__clipRects[this.__numClipRects-1];i.__contract(s.x,s.y,s.width,s.height)}if(i.height<0){i.height=0}if(i.width<0){i.width=0}this.__currentClipRect=i;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 i=openfl_geom_Matrix.__pool.get();i.copyFrom(e.__renderTransform);i.invert();this.__currentClipRect.__transform(t,i);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(i)}},__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\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\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\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\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\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\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\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,i,s){if(s==null){s=false}if(i==null){i=true}this.__commands.beginBitmapFill(e,t!=null?t.clone():null,i,s);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,i,s,a,r,n,_){if(_==null){_=0}if(n==null){n=1}if(r==null){r=0}if(t==null||t.length==0){return}if(i==null){i=[];var o=0;var l=t.length;while(o<l){var h=o++;i.push(1)}}if(s==null){s=[];var c=0;var u=t.length;while(c<u){var f=c++;s.push(Math.ceil(f/t.length*255))}}if(i.length<t.length||s.length<t.length){return}this.__commands.beginGradientFill(e,t,i,s,a,r,n,_);var p=0;while(p<i.length){var d=i[p];++p;if(d>0){this.__visible=true;break}}},clear:function(){var e=this.__usedShaderBuffers.h;while(e!=null){var t=e.item;e=e.next;var i=t;this.__shaderBufferPool.release(i)}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,i,s){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(e<i&&e>this.__positionX||e>i&&e<this.__positionX){a=i}else{var n=(this.__positionX-e)/(this.__positionX-2*e+i);a=this.__calculateBezierQuadPoint(n,this.__positionX,e,i)}if(t<s&&t>this.__positionY||t>s&&t<this.__positionY){r=s}else{var _=(this.__positionY-t)/(this.__positionY-2*t+s);r=this.__calculateBezierQuadPoint(_,this.__positionY,t,s)}this.__inflateBounds(a-this.__strokePadding,r-this.__strokePadding);this.__inflateBounds(a+this.__strokePadding,r+this.__strokePadding);this.__positionX=i;this.__positionY=s;this.__commands.curveTo(e,t,i,s);this.set___dirty(true)},drawCircle:function(e,t,i){if(i<=0){return}this.__inflateBounds(e-i-this.__strokePadding,t-i-this.__strokePadding);this.__inflateBounds(e+i+this.__strokePadding,t+i+this.__strokePadding);this.__commands.drawCircle(e,t,i);this.set___dirty(true)},drawEllipse:function(e,t,i,s){if(i<=0||s<=0){return}this.__inflateBounds(e-this.__strokePadding,t-this.__strokePadding);this.__inflateBounds(e+i+this.__strokePadding,t+s+this.__strokePadding);this.__commands.drawEllipse(e,t,i,s);this.set___dirty(true)},drawRect:function(e,t,i,s){if(i==0&&s==0){return}var a=i<0?-1:1;var r=s<0?-1:1;this.__inflateBounds(e-this.__strokePadding*a,t-this.__strokePadding*r);this.__inflateBounds(e+i+this.__strokePadding*a,t+s+this.__strokePadding*r);this.__commands.drawRect(e,t,i,s);this.set___dirty(true)},drawRoundRect:function(e,t,i,s,a,r){if(i==0&&s==0){return}var n=i<0?-1:1;var _=s<0?-1:1;this.__inflateBounds(e-this.__strokePadding*n,t-this.__strokePadding*_);this.__inflateBounds(e+i+this.__strokePadding*n,t+s+this.__strokePadding*_);this.__commands.drawRoundRect(e,t,i,s,a,r);this.set___dirty(true)},endFill:function(){this.__commands.endFill()},lineStyle:function(e,t,i,s,a,r,n,_){if(_==null){_=3}if(a==null){a=2}if(s==null){s=false}if(i==null){i=1}if(t==null){t=0}if(e!=null){if(n==1){if(e>this.__strokePadding){this.__strokePadding=e}}else if(e/2>this.__strokePadding){this.__strokePadding=e/2}}this.__commands.lineStyle(e,t,i,s,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,i,s){var a=1-e;return a*a*t+2*a*e*i+e*e*s},__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 i=openfl_geom_Rectangle.__pool.get();this.__bounds.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__hitTest:function(e,t,i,s){if(this.__bounds==null){return false}var a=s.a*s.d-s.b*s.c;var r=a==0?-s.tx:1/a*(s.c*(s.ty-t)+s.d*(e-s.tx));var n=s.a*s.d-s.b*s.c;var _=n==0?-s.ty:1/n*(s.a*(t-s.ty)+s.b*(s.tx-e));if(r>this.__bounds.x&&_>this.__bounds.y&&this.__bounds.contains(r,_)){if(i){return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,r,_)}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(e<this.__bounds.x){this.__bounds.width+=this.__bounds.x-e;this.__bounds.x=e;this.__transformDirty=true}if(t<this.__bounds.y){this.__bounds.height+=this.__bounds.y-t;this.__bounds.y=t;this.__transformDirty=true}if(e>this.__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 i=1;var s=1;if(t!=null){if(t.b==0){i=Math.abs(t.a)}else{i=Math.sqrt(t.a*t.a+t.b*t.b)}if(t.c==0){s=Math.abs(t.d)}else{s=Math.sqrt(t.c*t.c+t.d*t.d)}}else{return}if(e!=null){if(e.b==0){i*=e.a}else{i*=Math.sqrt(e.a*e.a+e.b*e.b)}if(e.c==0){s*=e.d}else{s*=Math.sqrt(e.c*e.c+e.d*e.d)}}var a=this.__bounds.width*i;var r=this.__bounds.height*s;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;i=openfl_display_Graphics.maxTextureWidth/this.__bounds.width}if(openfl_display_Graphics.maxTextureWidth!=null&&r>openfl_display_Graphics.maxTextureHeight){r=openfl_display_Graphics.maxTextureHeight;s=openfl_display_Graphics.maxTextureHeight/this.__bounds.height}this.__renderTransform.a=a/this.__bounds.width;this.__renderTransform.d=r/this.__bounds.height;var n=1/this.__renderTransform.a;var _=1/this.__renderTransform.d;this.__worldTransform.a=n*t.a;this.__worldTransform.b=n*t.b;this.__worldTransform.c=_*t.c;this.__worldTransform.d=_*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\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\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\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\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\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\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\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 i="";this.__path=e.url;var s=this.__path.indexOf("?");if(s>-1){this.__path=this.__path.substring(0,s)}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(s>-1){e.url=this.__path+e.url.substring(s)}else{e.url=this.__path}}var a=this.__path.lastIndexOf(".");if(a>-1){i=this.__path.substring(a+1)}var r;switch(i){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 n=new openfl_net_URLLoader;n.dataFormat=0;if(this.contentLoaderInfo.contentType.indexOf("/json")>-1||this.contentLoaderInfo.contentType.indexOf("/javascript")>-1||this.contentLoaderInfo.contentType.indexOf("/ecmascript")>-1){n.dataFormat=1}n.addEventListener("complete",$bind(this,this.loader_onComplete));n.addEventListener("ioError",$bind(this,this.loader_onError));n.addEventListener("progress",$bind(this,this.loader_onProgress));n.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 i=this.content.get_height()|0;this.contentLoaderInfo.height=i;this.addChild(this.content);this.contentLoaderInfo.dispatchEvent(new openfl_events_Event("complete"))},BitmapData_onProgress:function(e,t){var i=new openfl_events_ProgressEvent("progress");i.bytesLoaded=e;i.bytesTotal=t;this.contentLoaderInfo.dispatchEvent(i)},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<this.bytesTotal){this.bytesLoaded=this.bytesTotal}this.__update(this.bytesLoaded,this.bytesTotal);this.__completed=true;this.dispatchEvent(new openfl_events_Event("complete"))}},__update:function(e,t){this.bytesLoaded=e;this.bytesTotal=t;this.dispatchEvent(new openfl_events_ProgressEvent("progress",false,false,e,t))},__class__:openfl_display_LoaderInfo});var openfl_display__$MovieClip_FrameSymbolInstance=function(e,t,i,s,a,r){this.initFrame=e;this.initFrameObjectID=t;this.characterID=i;this.depth=s;this.displayObject=a;this.clipDepth=r};$hxClasses["openfl.display._MovieClip.FrameSymbolInstance"]=openfl_display__$MovieClip_FrameSymbolInstance;openfl_display__$MovieClip_FrameSymbolInstance.__name__=["openfl","display","_MovieClip","FrameSymbolInstance"];openfl_display__$MovieClip_FrameSymbolInstance.prototype={characterID:null,clipDepth:null,depth:null,displayObject:null,initFrame:null,initFrameObjectID:null,__class__:openfl_display__$MovieClip_FrameSymbolInstance};var openfl_display_OpenGLRenderer=function(e,t){openfl_display_DisplayObjectRenderer.call(this);this.__context3D=e;this.__context=e.__context;this.gl=e.__context.webgl;this.__gl=this.gl;this.__defaultRenderTarget=t;this.__flipped=this.__defaultRenderTarget==null;if(openfl_display_Graphics.maxTextureWidth==null){openfl_display_Graphics.maxTextureWidth=openfl_display_Graphics.maxTextureHeight=this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE)}this.__matrix=lime_math__$Matrix4_Matrix4_$Impl_$._new();this.__values=[];this.__softwareRenderer=new openfl_display_CanvasRenderer(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(true);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=lime_math__$Matrix4_Matrix4_$Impl_$._new();this.__projectionFlipped=lime_math__$Matrix4_Matrix4_$Impl_$._new();this.__stencilReference=0;this.__tempRect=new openfl_geom_Rectangle;this.__defaultDisplayShader=new openfl_display_DisplayObjectShader;this.__defaultGraphicsShader=new openfl_display_GraphicsShader;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new lime_utils_ObjectPool(function(){return new openfl_display_Shape});this.__maskShader=new openfl__$internal_renderer_context3D_Context3DMaskShader};$hxClasses["openfl.display.OpenGLRenderer"]=openfl_display_OpenGLRenderer;openfl_display_OpenGLRenderer.__name__=["openfl","display","OpenGLRenderer"];openfl_display_OpenGLRenderer.__super__=openfl_display_DisplayObjectRenderer;openfl_display_OpenGLRenderer.prototype=$extend(openfl_display_DisplayObjectRenderer.prototype,{gl:null,__context3D:null,__clipRects:null,__currentDisplayShader:null,__currentGraphicsShader:null,__currentShader:null,__currentShaderBuffer:null,__defaultDisplayShader:null,__defaultGraphicsShader:null,__defaultRenderTarget:null,__defaultShader:null,__displayHeight:null,__displayWidth:null,__flipped:null,__gl:null,__height:null,__maskShader:null,__matrix:null,__maskObjects:null,__numClipRects:null,__offsetX:null,__offsetY:null,__projection:null,__projectionFlipped:null,__scrollRectMasks:null,__softwareRenderer:null,__stencilReference:null,__tempRect:null,__updatedStencil:null,__upscaled:null,__values:null,__width:null,applyAlpha:function(e){openfl_display_OpenGLRenderer.__alphaValue[0]=e;if(this.__currentShaderBuffer!=null){this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",openfl_display_OpenGLRenderer.__alphaValue)}else if(this.__currentShader!=null){if(this.__currentShader.__alpha!=null){this.__currentShader.__alpha.value=openfl_display_OpenGLRenderer.__alphaValue}}},applyBitmapData:function(e,t,i){if(i==null){i=false}if(this.__currentShaderBuffer!=null){if(e!=null){openfl_display_OpenGLRenderer.__textureSizeValue[0]=e.__textureWidth;openfl_display_OpenGLRenderer.__textureSizeValue[1]=e.__textureHeight;this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",openfl_display_OpenGLRenderer.__textureSizeValue)}}else if(this.__currentShader!=null){if(this.__currentShader.__bitmap!=null){this.__currentShader.__bitmap.input=e;this.__currentShader.__bitmap.filter=t&&this.__allowSmoothing?4:5;this.__currentShader.__bitmap.mipFilter=2;this.__currentShader.__bitmap.wrap=i?2:0}if(this.__currentShader.__texture!=null){this.__currentShader.__texture.input=e;this.__currentShader.__texture.filter=t&&this.__allowSmoothing?4:5;this.__currentShader.__texture.mipFilter=2;this.__currentShader.__texture.wrap=i?2:0}if(this.__currentShader.__textureSize!=null){if(e!=null){openfl_display_OpenGLRenderer.__textureSizeValue[0]=e.__textureWidth;openfl_display_OpenGLRenderer.__textureSizeValue[1]=e.__textureHeight;this.__currentShader.__textureSize.value=openfl_display_OpenGLRenderer.__textureSizeValue}else{this.__currentShader.__textureSize.value=null}}}},applyColorTransform:function(e){var t=e!=null&&!e.__isDefault(true);this.applyHasColorTransform(t);if(t){e.__setArrays(openfl_display_OpenGLRenderer.__colorMultipliersValue,openfl_display_OpenGLRenderer.__colorOffsetsValue);if(this.__currentShaderBuffer!=null){this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",openfl_display_OpenGLRenderer.__colorMultipliersValue);this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",openfl_display_OpenGLRenderer.__colorOffsetsValue)}else if(this.__currentShader!=null){if(this.__currentShader.__colorMultiplier!=null){this.__currentShader.__colorMultiplier.value=openfl_display_OpenGLRenderer.__colorMultipliersValue}if(this.__currentShader.__colorOffset!=null){this.__currentShader.__colorOffset.value=openfl_display_OpenGLRenderer.__colorOffsetsValue}}}else if(this.__currentShaderBuffer!=null){this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",openfl_display_OpenGLRenderer.__emptyColorValue);this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",openfl_display_OpenGLRenderer.__emptyColorValue)}else if(this.__currentShader!=null){if(this.__currentShader.__colorMultiplier!=null){this.__currentShader.__colorMultiplier.value=openfl_display_OpenGLRenderer.__emptyColorValue}if(this.__currentShader.__colorOffset!=null){this.__currentShader.__colorOffset.value=openfl_display_OpenGLRenderer.__emptyColorValue}}},applyHasColorTransform:function(e){openfl_display_OpenGLRenderer.__hasColorTransformValue[0]=e;if(this.__currentShaderBuffer!=null){this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",openfl_display_OpenGLRenderer.__hasColorTransformValue)}else if(this.__currentShader!=null){if(this.__currentShader.__hasColorTransform!=null){this.__currentShader.__hasColorTransform.value=openfl_display_OpenGLRenderer.__hasColorTransformValue}}},applyMatrix:function(e){if(this.__currentShaderBuffer!=null){this.__currentShaderBuffer.addFloatOverride("openfl_Matrix",e)}else if(this.__currentShader!=null){if(this.__currentShader.__matrix!=null){this.__currentShader.__matrix.value=e}}},setShader:function(e){this.__currentShaderBuffer=null;if(this.__currentShader==e){return}var t=this.__currentShader!=null;if(e==null){this.__currentShader=null;this.__context3D.setProgram(null);return}else{this.__currentShader=e;this.__initShader(e);this.__context3D.setProgram(e.program);this.__context3D.__flushGLProgram();this.__currentShader.__enable();this.__context3D.__state.shader=e}},setViewport:function(){this.__gl.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight)},updateShader:function(){if(this.__currentShader!=null){if(this.__currentShader.__position!=null){this.__currentShader.__position.__useArray=true}if(this.__currentShader.__textureCoord!=null){this.__currentShader.__textureCoord.__useArray=true}this.__context3D.setProgram(this.__currentShader.program);this.__context3D.__flushGLProgram();this.__context3D.__flushGLTextures();this.__currentShader.__update()}},__clear:function(){if(this.__stage==null||this.__stage.__transparent){this.__context3D.clear(0,0,0,0,0,0,1)}else{this.__context3D.clear(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2],1,0,0,1)}this.__cleared=true},__clearShader:function(){if(this.__currentShader!=null){if(this.__currentShaderBuffer==null){if(this.__currentShader.__bitmap!=null){this.__currentShader.__bitmap.input=null}}else{this.__currentShaderBuffer.clearOverride()}if(this.__currentShader.__texture!=null){this.__currentShader.__texture.input=null}if(this.__currentShader.__textureSize!=null){this.__currentShader.__textureSize.value=null}if(this.__currentShader.__hasColorTransform!=null){this.__currentShader.__hasColorTransform.value=null}if(this.__currentShader.__position!=null){this.__currentShader.__position.value=null}if(this.__currentShader.__matrix!=null){this.__currentShader.__matrix.value=null}this.__currentShader.__clearUseArray()}},__copyShader:function(e){this.__currentShader=e.__currentShader;this.__currentShaderBuffer=e.__currentShaderBuffer;this.__currentDisplayShader=e.__currentDisplayShader;this.__currentGraphicsShader=e.__currentGraphicsShader},__getMatrix:function(e,t){var i=openfl_geom_Matrix.__pool.get();i.copyFrom(e);i.concat(this.__worldTransform);if(t==0||t==1&&i.b==0&&i.c==0&&(i.a<1.001&&i.a>.999)&&(i.d<1.001&&i.d>.999)){i.tx=Math.round(i.tx);i.ty=Math.round(i.ty)}lime_math__$Matrix4_Matrix4_$Impl_$.identity(this.__matrix);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,0,i.a);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,1,i.b);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,4,i.c);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,5,i.d);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,12,i.tx);lime_math__$Matrix4_Matrix4_$Impl_$.set(this.__matrix,13,i.ty);lime_math__$Matrix4_Matrix4_$Impl_$.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);var s=0;while(s<16){var a=s++;this.__values[a]=lime_math__$Matrix4_Matrix4_$Impl_$.get(this.__matrix,a)}openfl_geom_Matrix.__pool.release(i);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 i=this.__scrollRectMasks.get();i.get_graphics().clear();i.get_graphics().beginFill(65280);i.get_graphics().drawRect(e.__scrollRect.x,e.__scrollRect.y,e.__scrollRect.width,e.__scrollRect.height);i.__renderTransform.copyFrom(e.__renderTransform);this.__pushMask(i)}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 i=openfl_geom_Matrix.__pool.get();i.copyFrom(t);i.concat(this.__worldTransform);var s=this.__clipRects[this.__numClipRects];e.__transform(s,i);if(this.__numClipRects>0){var a=this.__clipRects[this.__numClipRects-1];s.__contract(a.x,a.y,a.width,a.height)}if(s.height<0){s.height=0}if(s.width<0){s.width=0}openfl_geom_Matrix.__pool.release(i);this.__scissorRect(s);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 i=e.__scrollRect;e.__mask=null;e.__scrollRect=null;e.__renderGL(this);e.__mask=t;e.__scrollRect=i}this.__context3D.present()},__renderFilterPass:function(e,t,i,s){if(s==null){s=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 n=this.__context3D.__state.renderToTextureAntiAlias;var _=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),false);if(s){this.__context3D.clear(0,0,0,0,0,0,1)}var o=this.__initShader(t);this.setShader(o);this.applyAlpha(1);this.applyBitmapData(e,i);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 i=this.__defaultRenderTarget==null?this.__stage.stageWidth:this.__defaultRenderTarget.width;var s=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 n;if(this.__defaultRenderTarget==null){var _=this.__worldTransform;n=Math.round(0*_.b+0*_.d+_.ty)}else{n=0}this.__offsetY=n;var o;if(this.__defaultRenderTarget==null){var l=this.__worldTransform;o=Math.round(i*l.a+0*l.c+l.tx-this.__offsetX)}else{o=i}this.__displayWidth=o;var h;if(this.__defaultRenderTarget==null){var c=this.__worldTransform;h=Math.round(0*c.b+s*c.d+c.ty-this.__offsetY)}else{h=s}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 i=Math.floor(e.y);var s=e.width>0?Math.ceil(e.get_right())-t:0;var a=e.height>0?Math.ceil(e.get_bottom())-i:0;if(s<0){s=0}if(a<0){a=0}openfl_display_OpenGLRenderer.__scissorRectangle.setTo(t,i,s,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 i=e>>8&255;var s=e&255;var a=.299*t+.587*i+.114*s;var r=0;if(a<70){r=16777215}var n=30;var _=7;var o=this.getHeight()/2-_/2;var l=this.getWidth()-n*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,_);this.outline.set_x(n);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,_-h*2);this.progress.set_x(n+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 i=0;if(t>0){i=e/t;if(i>1){i=1}}this.progress.set_scaleX(i)},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 i=this.endAnimation-this.startAnimation;var s=t/i;if(s<0){s=0}if(s>1){s=1}this.outline.set_alpha(s);this.progress.set_alpha(s)},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 i=e.gl;e.setTextureAt(t,null)},__updateGL:function(e,t,i,s,a,r){var n=e.gl;var _=i!=null?i:this.input;var o=s!=null?s:this.filter;var l=a!=null?a:this.mipFilter;var h=r!=null?r:this.wrap;if(_!=null){var c=_;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 i=0;var s=this.__arrayLength;while(i<s){var a=i++;t.disableVertexAttribArray(this.index+a)}}},__updateGL:function(e,t){var i=e.gl;var s=t!=null?t:this.value;var a=this.__isBool?s:null;var r=this.__isFloat?s:null;var n=this.__isInt?s:null;if(this.__isUniform){if(s!=null&&s.length>=this.__length){var _=this.type;switch(_){case 0:i.uniform1i(this.index,a[0]?1:0);break;case 1:i.uniform2i(this.index,a[0]?1:0,a[1]?1:0);break;case 2:i.uniform3i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0);break;case 3:i.uniform4i(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0,a[3]?1:0);break;case 4:i.uniform1f(this.index,r[0]);break;case 5:i.uniform2f(this.index,r[0],r[1]);break;case 6:i.uniform3f(this.index,r[0],r[1],r[2]);break;case 7:i.uniform4f(this.index,r[0],r[1],r[2],r[3]);break;case 8:i.uniform1i(this.index,n[0]);break;case 9:i.uniform2i(this.index,n[0],n[1]);break;case 10:i.uniform3i(this.index,n[0],n[1],n[2]);break;case 11:i.uniform4i(this.index,n[0],n[1],n[2],n[3]);break;case 12:var o=0;while(o<4){var l=o++;this.__uniformMatrix[l]=r[l]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix2fv(i,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(i,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(i,this.index,false,this.__uniformMatrix);break;default:}}else{var p=this.type;switch(p){case 1:case 9:i.uniform2i(this.index,0,0);break;case 3:case 11:i.uniform4i(this.index,0,0,0,0);break;case 4:i.uniform1f(this.index,0);break;case 5:i.uniform2f(this.index,0,0);break;case 6:i.uniform3f(this.index,0,0,0);break;case 7:i.uniform4f(this.index,0,0,0,0);break;case 0:case 8:i.uniform1i(this.index,0);break;case 2:case 10:i.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(i,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(i,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(i,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__useArray&&(s==null||s.length==this.__length)){var x=0;var w=this.__arrayLength;while(x<w){var k=x++;i.disableVertexAttribArray(this.index+k)}if(s!=null){var P=this.type;switch(P){case 0:i.vertexAttrib1f(this.index,a[0]?1:0);break;case 1:i.vertexAttrib2f(this.index,a[0]?1:0,a[1]?1:0);break;case 2:i.vertexAttrib3f(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0);break;case 3:i.vertexAttrib4f(this.index,a[0]?1:0,a[1]?1:0,a[2]?1:0,a[3]?1:0);break;case 4:i.vertexAttrib1f(this.index,r[0]);break;case 5:i.vertexAttrib2f(this.index,r[0],r[1]);break;case 6:i.vertexAttrib3f(this.index,r[0],r[1],r[2]);break;case 7:i.vertexAttrib4f(this.index,r[0],r[1],r[2],r[3]);break;case 8:i.vertexAttrib1f(this.index,n[0]);break;case 9:i.vertexAttrib2f(this.index,n[0],n[1]);break;case 10:i.vertexAttrib3f(this.index,n[0],n[1],n[2]);break;case 11:i.vertexAttrib4f(this.index,n[0],n[1],n[2],n[3]);break;case 12:var C=0;while(C<2){var T=C++;i.vertexAttrib2f(this.index+T,r[T*2],r[T*2+1])}break;case 16:var M=0;while(M<3){var S=M++;i.vertexAttrib3f(this.index+S,r[S*3],r[S*3+1],r[S*3+2])}break;case 20:var $=0;while($<4){var E=$++;i.vertexAttrib4f(this.index+E,r[E*4],r[E*4+1],r[E*4+2],r[E*4+3])}break;default:}}else{var B=this.type;switch(B){case 1:case 5:case 9:i.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:i.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:i.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:i.vertexAttrib3f(this.index,0,0,0);break;case 12:var L=0;while(L<2){var R=L++;i.vertexAttrib2f(this.index+R,0,0)}break;case 16:var A=0;while(A<3){var I=A++;i.vertexAttrib3f(this.index+I,0,0,0)}break;case 20:var D=0;while(D<4){var F=D++;i.vertexAttrib4f(this.index+F,0,0,0,0)}break;default:}}}else{var O=0;var j=this.__arrayLength;while(O<j){var G=O++;i.enableVertexAttribArray(this.index+G)}}},__updateGLFromBuffer:function(e,t,i,s,a){var r=e.gl;if(this.__isUniform){if(s>=this.__length){var n=this.type;switch(n){case 1:case 9:r.uniform2i(this.index,t[i]|0,t[i+1]|0);break;case 3:case 11:r.uniform4i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0,t[i+3]|0);break;case 4:r.uniform1f(this.index,t[i]);break;case 5:r.uniform2f(this.index,t[i],t[i+1]);break;case 6:r.uniform3f(this.index,t[i],t[i+1],t[i+2]);break;case 7:r.uniform4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 8:r.uniform1i(this.index,t[i]|0);break;case 2:case 10:r.uniform3i(this.index,t[i]|0,t[i+1]|0,t[i+2]|0);break;case 12:var _=0;while(_<4){var o=_++;this.__uniformMatrix[o]=t[i+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[i+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[i+u]}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(r,this.index,false,this.__uniformMatrix);break;default:}}}else if(!this.__internal&&(s==0||s==this.__length)){var f=0;var p=this.__arrayLength;while(f<p){var d=f++;r.disableVertexAttribArray(this.index+d)}if(s>0){var g=this.type;switch(g){case 1:case 5:case 9:r.vertexAttrib2f(this.index,t[i],t[i+1]);break;case 3:case 7:case 11:r.vertexAttrib4f(this.index,t[i],t[i+1],t[i+2],t[i+3]);break;case 0:case 4:case 8:r.vertexAttrib1f(this.index,t[i]);break;case 2:case 6:case 10:r.vertexAttrib3f(this.index,t[i],t[i+1],t[i+2]);break;case 12:var m=0;while(m<2){var v=m++;r.vertexAttrib2f(this.index+v,t[i+v*2],t[i+v*2+1])}break;case 16:var b=0;while(b<3){var y=b++;r.vertexAttrib3f(this.index+y,t[i+y*3],t[i+y*3+1],t[i+y*3+2])}break;case 20:var x=0;while(x<4){var w=x++;r.vertexAttrib4f(this.index+w,t[i+w*4],t[i+w*4+1],t[i+w*4+2],t[i+w*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 P=0;while(P<2){var C=P++;r.vertexAttrib2f(this.index+C,0,0)}break;case 16:var T=0;while(T<3){var M=T++;r.vertexAttrib3f(this.index+M,0,0,0)}break;case 20:var S=0;while(S<4){var $=S++;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(B<L){var R=B++;r.enableVertexAttribArray(this.index+R)}if(s>0){var A=0;var I=this.__arrayLength;while(A<I){var D=A++;r.vertexAttribPointer(this.index+D,this.__length,E,false,this.__length*4,(i+a*this.__length+D*this.__arrayLength)*4)}}}},set_name:function(e){this.__internal=StringTools.startsWith(e,"openfl_");return this.name=e},__class__:openfl_display_ShaderParameter,__properties__:{set_name:"set_name"}};var openfl_display_Shape=function(){openfl_display_DisplayObject.call(this)};$hxClasses["openfl.display.Shape"]=openfl_display_Shape;openfl_display_Shape.__name__=["openfl","display","Shape"];openfl_display_Shape.__super__=openfl_display_DisplayObject;openfl_display_Shape.prototype=$extend(openfl_display_DisplayObject.prototype,{get_graphics:function(){if(this.__graphics==null){this.__graphics=new openfl_display_Graphics(this)}return this.__graphics},__class__:openfl_display_Shape,__properties__:$extend(openfl_display_DisplayObject.prototype.__properties__,{get_graphics:"get_graphics"})});var openfl_display_SimpleButton=function(e,t,i,s){openfl_display_InteractiveObject.call(this);this.enabled=true;this.trackAsMenu=false;this.useHandCursor=true;this.__upState=e!=null?e:new openfl_display_DisplayObject;this.__overState=t;this.__downState=i;this.set_hitTestState(s!=null?s:new openfl_display_DisplayObject);this.addEventListener("mouseDown",$bind(this,this.__this_onMouseDown));this.addEventListener("mouseOut",$bind(this,this.__this_onMouseOut));this.addEventListener("mouseOver",$bind(this,this.__this_onMouseOver));this.addEventListener("mouseUp",$bind(this,this.__this_onMouseUp));this.__tabEnabled=true;this.set___currentState(this.__upState);if(openfl_display_SimpleButton.__initSymbol!=null){var a=openfl_display_SimpleButton.__initSWF;this.__symbol=openfl_display_SimpleButton.__initSymbol;openfl_display_SimpleButton.__initSWF=null;openfl_display_SimpleButton.__initSymbol=null;this.__fromSymbol(a,this.__symbol)}};$hxClasses["openfl.display.SimpleButton"]=openfl_display_SimpleButton;openfl_display_SimpleButton.__name__=["openfl","display","SimpleButton"];openfl_display_SimpleButton.__super__=openfl_display_InteractiveObject;openfl_display_SimpleButton.prototype=$extend(openfl_display_InteractiveObject.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,__overState:null,__previousStates:null,__symbol:null,__upState:null,__fromSymbol:function(e,t){this.__symbol=t;if(t.downState!=null){this.set_downState(t.downState.__createObject(e))}if(t.hitState!=null){this.set_hitTestState(t.hitState.__createObject(e))}if(t.overState!=null){this.set_overState(t.overState.__createObject(e))}if(t.upState!=null){this.set_upState(t.upState.__createObject(e))}},__getBounds:function(e,t){openfl_display_InteractiveObject.prototype.__getBounds.call(this,e,t);var i=openfl_geom_Matrix.__pool.get();var s=this.__currentState.__transform;i.a=s.a*t.a+s.b*t.c;i.b=s.a*t.b+s.b*t.d;i.c=s.c*t.a+s.d*t.c;i.d=s.c*t.b+s.d*t.d;i.tx=s.tx*t.a+s.ty*t.c+t.tx;i.ty=s.tx*t.b+s.ty*t.d+t.ty;this.__currentState.__getBounds(e,i);openfl_geom_Matrix.__pool.release(i)},__getRenderBounds:function(e,t){if(this.__scrollRect!=null){openfl_display_InteractiveObject.prototype.__getRenderBounds.call(this,e,t);return}else{openfl_display_InteractiveObject.prototype.__getBounds.call(this,e,t)}var i=openfl_geom_Matrix.__pool.get();var s=this.__currentState.__transform;i.a=s.a*t.a+s.b*t.c;i.b=s.a*t.b+s.b*t.d;i.c=s.c*t.a+s.d*t.c;i.d=s.c*t.b+s.d*t.d;i.tx=s.tx*t.a+s.ty*t.c+t.tx;i.ty=s.tx*t.b+s.ty*t.d+t.ty;this.__currentState.__getRenderBounds(e,i);openfl_geom_Matrix.__pool.release(i)},__getCursor:function(){if(this.useHandCursor&&!this.__ignoreEvent&&this.enabled){return"button"}else{return null}},__hitTest:function(e,t,i,s,a,r){var n=false;if(this.get_hitTestState()!=null){if(this.get_hitTestState().__hitTest(e,t,i,s,a,r)){if(s!=null){if(s.length==0){s[0]=r}else{s[s.length-1]=r}}if(!!a){n=this.mouseEnabled}else{n=true}}}else if(this.__currentState!=null){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}if(this.__currentState.__hitTest(e,t,i,s,a,r)){n=a}}if(s!=null){while(s.length>1&&s[s.length-1]==s[s.length-2])s.pop()}return n},__hitTestMask:function(e,t){var i=false;if(this.__currentState.__hitTestMask(e,t)){i=true}return i},__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 i=this.__previousStates;while(t<i.get_length()){var s=i.get(t);++t;s.__renderDOM(e)}this.__previousStates.set_length(0);if(this.__currentState!=null){if(this.__currentState.stage!=this.stage){this.__currentState.__setStageReference(this.stage)}this.__currentState.__renderDOM(e)}e.__popMaskObject(this);this.__renderEvent(e)},__renderGL:function(e){if(!this.__renderable||this.__worldAlpha<=0||this.__currentState==null){return}e.__pushMaskObject(this);this.__currentState.__renderGL(e);e.__popMaskObject(this);this.__renderEvent(e)},__renderGLMask:function(e){if(this.__currentState==null){return}this.__currentState.__renderGLMask(e)},__setStageReference:function(e){openfl_display_InteractiveObject.prototype.__setStageReference.call(this,e);if(this.__currentState!=null){this.__currentState.__setStageReference(e)}if(this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState){this.get_hitTestState().__setStageReference(e)}},__setTransformDirty:function(){openfl_display_InteractiveObject.prototype.__setTransformDirty.call(this);if(this.__currentState!=null){this.__currentState.__setTransformDirty()}if(this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState){this.get_hitTestState().__setTransformDirty()}},__update:function(e,t){openfl_display_InteractiveObject.prototype.__update.call(this,e,t);if(t){if(this.__currentState!=null){this.__currentState.__update(e,true)}if(this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState){this.get_hitTestState().__update(e,true)}}},__updateTransforms:function(e){openfl_display_InteractiveObject.prototype.__updateTransforms.call(this,e);if(this.__currentState!=null){this.__currentState.__updateTransforms()}if(this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState){this.get_hitTestState().__updateTransforms()}},get_downState:function(){return this.__downState},set_downState:function(e){if(this.__downState!=null&&this.__currentState==this.__downState){this.set___currentState(this.__downState)}return this.__downState=e},get_hitTestState:function(){return this.__hitTestState},set_hitTestState:function(e){if(this.__hitTestState!=null&&this.__hitTestState!=e){if(this.__hitTestState!=this.get_downState()&&this.__hitTestState!=this.get_upState()&&this.__hitTestState!=this.get_overState()){this.__hitTestState.__renderParent=null}}if(e!=null){e.__renderParent=this;if(!e.__renderDirty){e.__renderDirty=true;e.__setParentRenderDirty()}}return this.__hitTestState=e},get_overState:function(){return this.__overState},set_overState:function(e){if(this.__overState!=null&&this.__currentState==this.__overState){this.set___currentState(e)}return this.__overState=e},get_upState:function(){return this.__upState},set_upState:function(e){if(this.__upState!=null&&this.__currentState==this.__upState){this.set___currentState(e)}return this.__upState=e},set___currentState:function(e){if(this.__currentState!=null&&this.__currentState!=this.get_hitTestState()){this.__currentState.__renderParent=null}if(e!=null&&e.parent!=null){e.parent.removeChild(e)}if(openfl_display_DisplayObject.__supportDOM&&this.__previousStates==null){this.__previousStates=openfl__$Vector_Vector_$Impl_$.toObjectVector(null)}if(e!=this.__currentState){if(openfl_display_DisplayObject.__supportDOM){if(this.__currentState!=null){this.__currentState.__setStageReference(null);this.__previousStates.push(this.__currentState)}var t=this.__previousStates.indexOf(e,0);if(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 i=0;while(i<4){var s=i++;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()},__broadcastEvent:function(e){var t=e.type;var i=openfl_display_DisplayObject.__broadcastEvents;if(__map_reserved[t]!=null?i.existsReserved(t):i.h.hasOwnProperty(t)){var s=e.type;var a=openfl_display_DisplayObject.__broadcastEvents;var r=__map_reserved[s]!=null?a.getReserved(s):a.h[s];var n=0;while(n<r.length){var _=r[n];++n;if(_.stage==this||_.stage==null){try{_.__dispatch(e)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}}}}},__createRenderer:function(){var e=1;if(this.window.__scale>1){if(!this.window.devicePixelRatio){e=1}else{e=true}}var t=this.window.__width*this.window.__scale|0;var i=this.window.__height*this.window.__scale|0;var s=this.window.context.type;switch(s){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,i)}},__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 i;var s=t.length;if(s==0){e.eventPhase=2;i=e.target;i.__dispatch(e)}else{e.eventPhase=1;e.target=t[t.length-1];var a=0;var r=s-1;while(a<r){var n=a++;t[n].__dispatch(e);if(e.__isCanceled){return}}e.eventPhase=2;i=e.target;i.__dispatch(e);if(e.__isCanceled){return}if(e.bubbles){e.eventPhase=3;var _=s-2;while(_>=0){t[_].__dispatch(e);if(e.__isCanceled){return}--_}}}}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 i=t.__getWorldTransform();var s=i.a*i.d-i.b*i.c;if(s==0){e.x=-i.tx;e.y=-i.ty}else{var a=1/s*(i.c*(i.ty-e.y)+i.d*(e.x-i.tx));e.y=1/s*(i.a*(e.y-i.ty)+i.b*(i.tx-e.x));e.x=a}}var r=e.x+this.__dragOffsetX;var n=e.y+this.__dragOffsetY;if(this.__dragBounds!=null){if(r<this.__dragBounds.x){r=this.__dragBounds.x}else if(r>this.__dragBounds.get_right()){r=this.__dragBounds.get_right()}if(n<this.__dragBounds.y){n=this.__dragBounds.y}else if(n>this.__dragBounds.get_bottom()){n=this.__dragBounds.get_bottom()}}this.__dragObject.set_x(r);this.__dragObject.set_y(n)},__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 i=haxe_CallStack.lastException;if(i!=null&&Object.prototype.hasOwnProperty.call(i,"stack")&&i.stack!=null&&i.stack!=""){console.log(i.stack);e.stack=i.stack}else{var s=haxe_CallStack.toString(haxe_CallStack.callStack());console.log(s)}}catch(e){haxe_CallStack.lastException=e}throw e}},__onKey:function(e,t,i){this.__dispatchPendingMouseEvent();openfl_events_MouseEvent.__altKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(i);openfl_events_MouseEvent.__commandKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i);openfl_events_MouseEvent.__ctrlKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i);openfl_events_MouseEvent.__shiftKey=lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i);var s=[];if(this.__focus==null){this.__getInteractive(s)}else{this.__focus.__getInteractive(s)}if(s.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 n=openfl_ui_Keyboard.__getCharCode(r,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i));var _=new openfl_events_KeyboardEvent(e,true,true,n,r,a,this.__macKeyboard?lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i)||lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i):lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(i),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(i));s.reverse();this.__dispatchStack(_,s);if(_.__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(i)?-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<o.length){if(o[u].get_tabIndex()>-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(i),0);s=[];this.get_focus().__getInteractive(s);s.reverse();this.__dispatchStack(p,s)}if(p==null||!p.isDefaultPrevented()){this.__currentTabOrderIndex=l;if(h!=null){this.set_focus(h)}}}}},__onLimeCreateWindow:function(e){if(this.window!=e){return}var t=$bind(this,this.__onLimeWindowActivate);var i=e;var s=function(){t(i)};e.onActivate.add(s);var a=$bind(this,this.__onLimeWindowClose);var r=e;var n=function(){a(r)};e.onClose.add(n,false,-9e3);var _=$bind(this,this.__onLimeWindowDeactivate);var o=e;var l=function(){_(o)};e.onDeactivate.add(l);var h=$bind(this,this.__onLimeWindowDropFile);var c=e;var u=function(e){h(c,e)};e.onDropFile.add(u);var f=$bind(this,this.__onLimeWindowEnter);var p=e;var d=function(){f(p)};e.onEnter.add(d);var g=$bind(this,this.__onLimeWindowExpose);var m=e;var v=function(){g(m)};e.onExpose.add(v);var b=$bind(this,this.__onLimeWindowFocusIn);var y=e;var x=function(){b(y)};e.onFocusIn.add(x);var w=$bind(this,this.__onLimeWindowFocusOut);var k=e;var P=function(){w(k)};e.onFocusOut.add(P);var C=$bind(this,this.__onLimeWindowFullscreen);var T=e;var M=function(){C(T)};e.onFullscreen.add(M);var S=$bind(this,this.__onLimeKeyDown);var $=e;var E=function(e,t){S($,e,t)};e.onKeyDown.add(E);var B=$bind(this,this.__onLimeKeyUp);var L=e;var R=function(e,t){B(L,e,t)};e.onKeyUp.add(R);var A=$bind(this,this.__onLimeWindowLeave);var I=e;var D=function(){A(I)};e.onLeave.add(D);var F=$bind(this,this.__onLimeWindowMinimize);var O=e;var j=function(){F(O)};e.onMinimize.add(j);var G=$bind(this,this.__onLimeMouseDown);var H=e;var U=function(e,t,i){G(H,e,t,i)};e.onMouseDown.add(U);var N=$bind(this,this.__onLimeMouseMove);var W=e;var V=function(e,t){N(W,e,t)};e.onMouseMove.add(V);var z=$bind(this,this.__onLimeMouseMoveRelative);var X=e;var Y=function(e,t){z(X,e,t)};e.onMouseMoveRelative.add(Y);var J=$bind(this,this.__onLimeMouseUp);var K=e;var q=function(e,t,i){J(K,e,t,i)};e.onMouseUp.add(q);var Z=$bind(this,this.__onLimeMouseWheel);var Q=e;var ee=function(e,t,i){Z(Q,e,t,i)};e.onMouseWheel.add(ee);var te=$bind(this,this.__onLimeWindowMove);var ie=e;var se=function(e,t){te(ie,e,t)};e.onMove.add(se);e.onRender.add($bind(this,this.__onLimeRender));e.onRenderContextLost.add($bind(this,this.__onLimeRenderContextLost));e.onRenderContextRestored.add($bind(this,this.__onLimeRenderContextRestored));var ae=$bind(this,this.__onLimeWindowResize);var re=e;var ne=function(e,t){ae(re,e,t)};e.onResize.add(ne);var _e=$bind(this,this.__onLimeWindowRestore);var oe=e;var le=function(){_e(oe)};e.onRestore.add(le);var he=$bind(this,this.__onLimeTextEdit);var ce=e;var ue=function(e,t,i){he(ce,e,t,i)};e.onTextEdit.add(ue);var fe=$bind(this,this.__onLimeTextInput);var pe=e;var de=function(e){fe(pe,e)};e.onTextInput.add(de);this.__onLimeWindowCreate(e)},__onLimeGamepadAxisMove:function(e,t,i){try{openfl_ui_GameInput.__onGamepadAxisMove(e,t,i)}catch(e){haxe_CallStack.lastException=e;if(e instanceof js__$Boot_HaxeError)e=e.val;this.__handleError(e)}},__onLimeGamepadButtonDown: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)}},__onLimeGamepadButtonUp: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)}},__onLimeGamepadConnect: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)}var i=$bind(this,this.__onLimeGamepadAxisMove);var s=e;var t=function(e,t){i(s,e,t)};e.onAxisMove.add(t);var a=$bind(this,this.__onLimeGamepadButtonDown);var r=e;var n=function(e){a(r,e)};e.onButtonDown.add(n);var _=$bind(this,this.__onLimeGamepadButtonUp);var o=e;var l=function(e){_(o,e)};e.onButtonUp.add(l);var h=$bind(this,this.__onLimeGamepadDisconnect);var c=e;var u=function(){h(c)};e.onDisconnect.add(u)},__onLimeGamepadDisconnect: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)}},__onLimeKeyDown:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyDown",t,i)},__onLimeKeyUp:function(e,t,i){if(this.window==null||this.window!=e){return}this.__onKey("keyUp",t,i)},__onLimeModuleExit:function(e){if(this.window!=null){var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t)}},__onLimeMouseDown:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(s){case 1:a="middleMouseDown";break;case 2:a="rightMouseDown";break;default:a="mouseDown"}this.__onMouse(a,t*e.__scale|0,i*e.__scale|0,s);if(!this.showDefaultContextMenu&&s==2){e.onMouseDown.cancel()}},__onLimeMouseMove:function(e,t,i){if(this.window==null||this.window!=e){return}this.__pendingMouseEvent=true;this.__pendingMouseX=t*e.__scale|0;this.__pendingMouseY=i*e.__scale|0},__onLimeMouseMoveRelative:function(e,t,i){},__onLimeMouseUp:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();var a;switch(s){case 1:a="middleMouseUp";break;case 2:a="rightMouseUp";break;default:a="mouseUp"}this.__onMouse(a,t*e.__scale|0,i*e.__scale|0,s);if(!this.showDefaultContextMenu&&s==2){e.onMouseUp.cancel()}},__onLimeMouseWheel:function(e,t,i,s){if(this.window==null||this.window!=e){return}this.__dispatchPendingMouseEvent();if(s==lime_ui_MouseWheelMode.PIXELS){this.__onMouseWheel(t*e.__scale|0,i*e.__scale|0,s)}else{this.__onMouseWheel(t|0,i|0,s)}},__onLimeRender:function(e){if(this.__rendering){return}this.__rendering=true;var t=null;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 i=this.__renderer!=null&&(this.__renderDirty||this.__forceRender);if(this.__invalidated&&i){this.__invalidated=false;t=new openfl_events_Event("render");this.__broadcastEvent(t)}this.__update(false,true);if(this.__renderer!=null){if(this.context3D!=null){var s=0;var a=this.stage3Ds;while(s<a.get_length()){var r=a.get(s);++s;this.context3D.__renderStage3D(r)}if(this.context3D.__present){i=true}}if(i){var n=this.__renderer.__type=="cairo";if(this.context3D==null){this.__renderer.__clear()}this.__renderer.__render(this)}else if(this.context3D==null){this.window.onRender.cancel()}if(this.context3D!=null){if(!this.context3D.__present){this.window.onRender.cancel()}else{if(!this.__renderer.__cleared){this.__renderer.__clear()}this.context3D.__present=false;this.context3D.__cleared=false}}this.__renderer.__cleared=false}this.__rendering=false},__onLimeRenderContextLost:function(){this.__renderer=null;this.context3D=null;var e=0;var t=this.stage3Ds;while(e<t.get_length()){var i=t.get(e);++e;i.__lostContext()}},__onLimeRenderContextRestored:function(e){this.__createRenderer();var t=0;var i=this.stage3Ds;while(t<i.get_length()){var s=i.get(t);++t;s.__restoreContext()}},__onLimeTextEdit:function(e,t,i,s){},__onLimeTextInput:function(e,t){if(this.window==null||this.window!=e){return}var i=[];if(this.__focus==null){this.__getInteractive(i)}else{this.__focus.__getInteractive(i)}var s=new openfl_events_TextEvent("textInput",true,true,t);if(i.length>0){i.reverse();this.__dispatchStack(s,i)}else{this.__dispatchEvent(s)}if(s.isDefaultPrevented()){e.onTextInput.cancel()}},__onLimeTouchCancel:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},__onLimeTouchMove:function(e){this.__onTouch("touchMove",e)},__onLimeTouchEnd:function(e){if(this.__primaryTouch==e){this.__primaryTouch=null}this.__onTouch("touchEnd",e)},__onLimeTouchStart:function(e){if(this.__primaryTouch==null){this.__primaryTouch=e}this.__onTouch("touchBegin",e)},__onLimeUpdate:function(e){this.__deltaTime=e;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowClose:function(e){if(this.window==e){this.window=null}this.__primaryTouch=null;var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t)},__onLimeWindowCreate:function(e){if(this.window==null||this.window!=e){return}if(e.context!=null){this.__createRenderer()}},__onLimeWindowDeactivate:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowDropFile:function(e,t){},__onLimeWindowEnter:function(e){},__onLimeWindowExpose:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true},__onLimeWindowFocusIn:function(e){if(this.window==null||this.window!=e){return}this.__renderDirty=true;var t=null;t=new openfl_events_Event("activate");this.__broadcastEvent(t);this.set_focus(this.__cacheFocus)},__onLimeWindowFocusOut:function(e){if(this.window==null||this.window!=e){return}this.__primaryTouch=null;var t=null;t=new openfl_events_Event("deactivate");this.__broadcastEvent(t);var i=this.get_focus();this.set_focus(null);this.__cacheFocus=i},__onLimeWindowFullscreen: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))}},__onLimeWindowLeave:function(e){if(this.window==null||this.window!=e||openfl_events_MouseEvent.__buttonDown){return}this.__dispatchPendingMouseEvent();var t=null;t=new openfl_events_Event("mouseLeave");this.__dispatchEvent(t)},__onLimeWindowMinimize:function(e){if(this.window==null||this.window!=e){return}},__onLimeWindowMove:function(e,t,i){},__onLimeWindowResize:function(e,t,i){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))}},__onLimeWindowRestore: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))}},__onMouse:function(e,t,i,s){if(s>2){return}var a=openfl_geom_Point.__pool.get();a.setTo(t,i);var r=this.__displayMatrix;var n=r.a*r.d-r.b*r.c;if(n==0){a.x=-r.tx;a.y=-r.ty}else{var _=1/n*(r.c*(r.ty-a.y)+r.d*(a.x-r.tx));a.y=1/n*(r.a*(a.y-r.ty)+r.b*(r.tx-a.x));a.x=_}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{var u=null;u=openfl_events_MouseEvent.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new openfl_geom_Point(this.__mouseX,this.__mouseY),this);this.__mouseDownLeft.dispatchEvent(u)}this.__mouseDownLeft=null}break;case"rightMouseDown":this.__mouseDownRight=l;break;case"rightMouseUp":if(this.__mouseDownRight==l){h="rightClick"}this.__mouseDownRight=null;break;default:}var f=openfl_geom_Point.__pool.get();var p=null;p=openfl_events_MouseEvent.__create(e,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);if(h!=null){p=openfl_events_MouseEvent.__create(h,s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);if(e=="mouseUp"&&js_Boot.__cast(l,openfl_display_InteractiveObject).doubleClickEnabled){var d=openfl_Lib.getTimer();if(d-this.__lastClickTime<500){p=openfl_events_MouseEvent.__create("doubleClick",s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(p,o);this.__lastClickTime=0}else{this.__lastClickTime=d}}}if(openfl_ui_Mouse.__cursor=="auto"&&!openfl_ui_Mouse.__hidden){var g=null;if(this.__mouseDownLeft!=null){g=this.__mouseDownLeft.__getCursor()}else{var m=0;while(m<o.length){var v=o[m];++m;g=v.__getCursor();if(g!=null){this.window.set_cursor(openfl_ui__$MouseCursor_MouseCursor_$Impl_$.toLimeCursor(g));break}}}if(g==null){this.window.set_cursor(lime_ui_MouseCursor.ARROW)}}var b;if(l!=this.__mouseOverTarget){if(this.__mouseOverTarget!=null){b=openfl_events_MouseEvent.__create("mouseOut",s,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(a,f),this.__mouseOverTarget);this.__dispatchStack(b,this.__mouseOutStack)}}var y=0;var x=this.__rollOutStack;while(y<x.length){var w=x[y];++y;if(o.indexOf(w)==-1){HxOverrides.remove(this.__rollOutStack,w);b=openfl_events_MouseEvent.__create("rollOut",s,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(a,f),this.__mouseOverTarget);b.bubbles=false;this.__dispatchTarget(w,b)}}var k=0;while(k<o.length){var P=o[k];++k;if(this.__rollOutStack.indexOf(P)==-1&&this.__mouseOverTarget!=null){if(P.hasEventListener("rollOver")){b=openfl_events_MouseEvent.__create("rollOver",s,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(a,f),P);b.bubbles=false;this.__dispatchTarget(P,b)}if(P.hasEventListener("rollOut")||P.hasEventListener("rollOver")){this.__rollOutStack.push(P)}}}if(l!=this.__mouseOverTarget){if(l!=null){b=openfl_events_MouseEvent.__create("mouseOver",s,this.__mouseX,this.__mouseY,l.__globalToLocal(a,f),l);this.__dispatchStack(b,o)}this.__mouseOverTarget=l;this.__mouseOutStack=o}if(this.__dragObject!=null){this.__drag(a);var C=null;if(this.__mouseOverTarget==this.__dragObject){var T=this.__dragObject.mouseEnabled;var M=this.__dragObject.mouseChildren;this.__dragObject.mouseEnabled=false;this.__dragObject.mouseChildren=false;var S=[];if(this.__hitTest(this.__mouseX,this.__mouseY,true,S,true,this)){C=S[S.length-1]}this.__dragObject.mouseEnabled=T;this.__dragObject.mouseChildren=M}else if(this.__mouseOverTarget!=this){C=this.__mouseOverTarget}this.__dragObject.dropTarget=C}openfl_geom_Point.__pool.release(a);openfl_geom_Point.__pool.release(f)},__onMouseWheel:function(e,t,i){var s=this.__mouseX;var a=this.__mouseY;var r=[];var n=null;if(this.__hitTest(this.__mouseX,this.__mouseY,true,r,true,this)){n=r[r.length-1]}else{n=this;r=[this]}if(n==null){n=this}var _=openfl_geom_Point.__pool.get();_.setTo(s,a);var o=this.__displayMatrix;var l=o.a*o.d-o.b*o.c;if(l==0){_.x=-o.tx;_.y=-o.ty}else{var h=1/l*(o.c*(o.ty-_.y)+o.d*(_.x-o.tx));_.y=1/l*(o.a*(_.y-o.ty)+o.b*(o.tx-_.x));_.x=h}var c=t|0;this.__dispatchStack(openfl_events_MouseEvent.__create("mouseWheel",0,this.__mouseX,this.__mouseY,n.__globalToLocal(_,_),n,c),r);openfl_geom_Point.__pool.release(_)},__onTouch:function(e,t){var i=openfl_geom_Point.__pool.get();i.setTo(Math.round(t.x*this.window.__width*this.window.__scale),Math.round(t.y*this.window.__height*this.window.__scale));var s=this.__displayMatrix;var a=s.a*s.d-s.b*s.c;if(a==0){i.x=-s.tx;i.y=-s.ty}else{var r=1/a*(s.c*(s.ty-i.y)+s.d*(i.x-s.tx));i.y=1/a*(s.a*(i.y-s.ty)+s.b*(s.tx-i.x));i.x=r}var n=i.x;var _=i.y;var o=[];var l=null;if(this.__hitTest(n,_,false,o,true,this)){l=o[o.length-1]}else{l=this;o=[this]}if(l==null){l=this}var h=t.id;var c=null;if(this.__touchData.h.hasOwnProperty(h)){c=this.__touchData.h[h]}else{c=openfl__$internal_utils_TouchData.__pool.get();c.reset();c.touch=t;this.__touchData.h[h]=c}var u=null;var f=false;switch(e){case"touchBegin":c.touchDownTarget=l;break;case"touchEnd":if(c.touchDownTarget==l){u="touchTap"}c.touchDownTarget=null;f=true;break;default:}var p=openfl_geom_Point.__pool.get();var d=this.__primaryTouch==t;var g=openfl_events_TouchEvent.__create(e,null,n,_,l.__globalToLocal(i,p),l);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.pressure=t.pressure;this.__dispatchStack(g,o);if(u!=null){g=openfl_events_TouchEvent.__create(u,null,n,_,l.__globalToLocal(i,p),l);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.pressure=t.pressure;this.__dispatchStack(g,o)}var m=c.touchOverTarget;if(l!=m&&m!=null){g=openfl_events_TouchEvent.__create("touchOut",null,n,_,m.__globalToLocal(i,p),m);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.pressure=t.pressure;this.__dispatchTarget(m,g)}var v=c.rollOutStack;var b=0;while(b<v.length){var y=v[b];++b;if(o.indexOf(y)==-1){HxOverrides.remove(v,y);g=openfl_events_TouchEvent.__create("touchRollOut",null,n,_,m.__globalToLocal(i,p),m);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.bubbles=false;g.pressure=t.pressure;this.__dispatchTarget(y,g)}}var x=0;while(x<o.length){var w=o[x];++x;if(v.indexOf(w)==-1){if(w.hasEventListener("touchRollOver")){g=openfl_events_TouchEvent.__create("touchRollOver",null,n,_,m.__globalToLocal(i,p),w);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.bubbles=false;g.pressure=t.pressure;this.__dispatchTarget(w,g)}if(w.hasEventListener("touchRollOut")){v.push(w)}}}if(l!=m){if(l!=null){g=openfl_events_TouchEvent.__create("touchOver",null,n,_,l.__globalToLocal(i,p),l);g.touchPointID=h;g.isPrimaryTouchPoint=d;g.bubbles=true;g.pressure=t.pressure;this.__dispatchTarget(l,g)}c.touchOverTarget=l}openfl_geom_Point.__pool.release(i);openfl_geom_Point.__pool.release(p);if(f){this.__touchData.remove(h);c.reset();openfl__$internal_utils_TouchData.__pool.release(c)}},__registerLimeModule:function(e){e.onCreateWindow.add($bind(this,this.__onLimeCreateWindow));e.onUpdate.add($bind(this,this.__onLimeUpdate));e.onExit.add($bind(this,this.__onLimeModuleExit),false,0);var t=lime_ui_Gamepad.devices.iterator();while(t.hasNext()){var i=t.next();this.__onLimeGamepadConnect(i)}lime_ui_Gamepad.onConnect.add($bind(this,this.__onLimeGamepadConnect));lime_ui_Touch.onStart.add($bind(this,this.__onLimeTouchStart));lime_ui_Touch.onMove.add($bind(this,this.__onLimeTouchMove));lime_ui_Touch.onEnd.add($bind(this,this.__onLimeTouchEnd));lime_ui_Touch.onCancel.add($bind(this,this.__onLimeTouchCancel))},__resize:function(){var e=this.stageWidth;var t=this.stageHeight;var i=this.window.__width*this.window.__scale|0;var s=this.window.__height*this.window.__scale|0;this.__logicalWidth=i;this.__logicalHeight=s;this.__displayMatrix.identity();if(this.get_fullScreenSourceRect()!=null&&this.window.__fullscreen){this.stageWidth=this.get_fullScreenSourceRect().width|0;this.stageHeight=this.get_fullScreenSourceRect().height|0;var a=i/this.stageWidth;var r=s/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(a,r);this.__displayRect.setTo(this.get_fullScreenSourceRect().get_left(),this.get_fullScreenSourceRect().get_right(),this.get_fullScreenSourceRect().get_top(),this.get_fullScreenSourceRect().get_bottom())}else{if(this.__logicalWidth==0&&this.__logicalHeight==0){this.stageWidth=i;this.stageHeight=s}else{this.stageWidth=this.__logicalWidth;this.stageHeight=this.__logicalHeight;var n=i/this.stageWidth;var _=s/this.stageHeight;var o=Math.min(n,_);var l=Math.round((i-this.stageWidth*o)/2);var h=Math.round((s-this.stageHeight*o)/2);this.__displayMatrix.scale(o,o);this.__displayMatrix.translate(l,h)}this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight)}if(this.context3D!=null){this.context3D.configureBackBuffer(i,s,0,true,true,true)}var c=0;var u=this.stage3Ds;while(c<u.get_length()){var f=u.get(c);++c;f.__resize(i,s)}if(this.__renderer!=null){this.__renderer.__resize(i,s)}if(this.stageWidth!=e||this.stageHeight!=t){this.__renderDirty=true;this.__setTransformDirty();var p=null;p=new openfl_events_Event("resize");this.__dispatchEvent(p)}},__setLogicalSize:function(e,t){this.__logicalWidth=e;this.__logicalHeight=t;this.__resize()},__startDrag:function(e,t,i){if(i==null){this.__dragBounds=null}else{this.__dragBounds=new openfl_geom_Rectangle;var s=i.get_right();var a=i.get_bottom();this.__dragBounds.x=s<i.x?s:i.x;this.__dragBounds.y=a<i.y?a:i.y;this.__dragBounds.width=Math.abs(i.width);this.__dragBounds.height=Math.abs(i.height)}this.__dragObject=e;if(this.__dragObject!=null){if(t){this.__dragOffsetX=0;this.__dragOffsetY=0}else{var r=openfl_geom_Point.__pool.get();r.setTo(this.get_mouseX(),this.get_mouseY());var n=this.__dragObject.parent;if(n!=null){var _=n.__getWorldTransform();var o=_.a*_.d-_.b*_.c;if(o==0){r.x=-_.tx;r.y=-_.ty}else{var l=1/o*(_.c*(_.ty-r.y)+_.d*(r.x-_.tx));r.y=1/o*(_.a*(r.y-_.ty)+_.b*(_.tx-r.x));r.x=l}}this.__dragOffsetX=this.__dragObject.get_x()-r.x;this.__dragOffsetY=this.__dragObject.get_y()-r.y;openfl_geom_Point.__pool.release(r)}}},__stopDrag:function(e){this.__dragBounds=null;this.__dragObject=null},__update:function(e,t){if(e){if(this.__transformDirty){openfl_display_DisplayObjectContainer.prototype.__update.call(this,true,t);if(t){this.__transformDirty=false}}}else if(this.__transformDirty||this.__renderDirty){openfl_display_DisplayObjectContainer.prototype.__update.call(this,false,t);if(t){if(openfl_display_DisplayObject.__supportDOM){this.__wasDirty=true}}}else if(!this.__renderDirty&&this.__wasDirty){openfl_display_DisplayObjectContainer.prototype.__update.call(this,false,t);if(t){this.__wasDirty=false}}},set_color:function(e){if(e==null){this.__transparent=true;e=0}else{this.__transparent=false}if(this.__color!=e){var t=(e&16711680)>>>16;var i=(e&65280)>>>8;var s=e&255;this.__colorSplit[0]=t/255;this.__colorSplit[1]=i/255;this.__colorSplit[2]=s/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 i=new openfl_events_FocusEvent("focusOut",true,false,e,false,0);var s=[];t.__getInteractive(s);s.reverse();this.__dispatchStack(i,s)}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 i=e.window;var s=t.__context.attributes;var a=Object.prototype.hasOwnProperty.call(s,"background")&&s.background==null;var r=Object.prototype.hasOwnProperty.call(s,"colorDepth")?s.colorDepth:32;var n={alpha:a||r>16,antialias:Object.prototype.hasOwnProperty.call(s,"antialiasing")&&s.antialiasing>0,depth:true,premultipliedAlpha:true,stencil:true,preserveDrawingBuffer:false};this.__webgl=js_html__$CanvasElement_CanvasUtil.getContextWebGL(this.__canvas,n);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,i){this.driverInfo="OpenGL (Direct blitting)";this.backBufferWidth=0;this.backBufferHeight=0;openfl_events_EventDispatcher.call(this);this.__stage=e;this.__contextState=t;this.__stage3D=i;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 s=new Float32Array(512);this.__vertexConstants=s;var a=new Float32Array(512);this.__fragmentConstants=a;var r=[1,1,1,1];var n;if(r!=null){n=new Float32Array(r)}else{n=null}this.__positionScale=n;this.__programs=new haxe_ds_StringMap;if(openfl_display3D_Context3D.__glMaxViewportDims==-1){openfl_display3D_Context3D.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS)}this.maxBackBufferWidth=openfl_display3D_Context3D.__glMaxViewportDims;this.maxBackBufferHeight=openfl_display3D_Context3D.__glMaxViewportDims;if(openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy==-1){var _=this.gl.getExtension("EXT_texture_filter_anisotropic");if(_==null||!Object.prototype.hasOwnProperty.call(_,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){_=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")}if(_==null||!Object.prototype.hasOwnProperty.call(_,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")){_=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")}if(_!=null){openfl_display3D_Context3D.__glTextureMaxAnisotropy=_.TEXTURE_MAX_ANISOTROPY_EXT;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=this.gl.getParameter(_.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{openfl_display3D_Context3D.__glTextureMaxAnisotropy=0;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=0}}if(openfl_display3D_Context3D.__glDepthStencil==-1){openfl_display3D_Context3D.__glDepthStencil=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(m<v){var b=m++;p[d]=g;p[d+1]=g+1;p[d+2]=g+2;p[d+3]=g+2;p[d+4]=g+1;p[d+5]=g+3;d=d+6;g=g+4}this.__quadIndexBuffer=this.createIndexBuffer(this.__quadIndexBufferCount);this.__quadIndexBuffer.uploadFromTypedArray(p)};$hxClasses["openfl.display3D.Context3D"]=openfl_display3D_Context3D;openfl_display3D_Context3D.__name__=["openfl","display3D","Context3D"];openfl_display3D_Context3D.__super__=openfl_events_EventDispatcher;openfl_display3D_Context3D.prototype=$extend(openfl_events_EventDispatcher.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,gl:null,__backBufferAntiAlias:null,__backBufferTexture:null,__backBufferWantsBestResolution:null,__backBufferWantsBestResolutionOnBrowserZoom:null,__cleared:null,__context:null,__contextState:null,__renderStage3DProgram:null,__enableErrorChecking:null,__fragmentConstants:null,__frontBufferTexture:null,__positionScale:null,__present:null,__programs:null,__quadIndexBuffer:null,__quadIndexBufferCount:null,__quadIndexBufferElements:null,__stage:null,__stage3D:null,__state:null,__vertexConstants:null,clear:function(e,t,i,s,a,r,n){if(n==null){n=7}if(r==null){r=0}if(a==null){a=1}if(s==null){s=1}if(i==null){i=0}if(t==null){t=0}if(e==null){e=0}this.__flushGLFramebuffer();this.__flushGLViewport();var _=0;if((n&1)!=0){if(this.__state.renderToTexture==null){if(this.__stage.context3D==this&&!this.__stage.__renderer.__cleared){this.__stage.__renderer.__cleared=true}this.__cleared=true}_|=this.gl.COLOR_BUFFER_BIT;if(this.__contextState.colorMaskRed!=true||this.__contextState.colorMaskGreen!=true||this.__contextState.colorMaskBlue!=true||this.__contextState.colorMaskAlpha!=true){this.gl.colorMask(true,true,true,true);this.__contextState.colorMaskRed=true;this.__contextState.colorMaskGreen=true;this.__contextState.colorMaskBlue=true;this.__contextState.colorMaskAlpha=true}this.gl.clearColor(e,t,i,s)}if((n&2)!=0){_|=this.gl.DEPTH_BUFFER_BIT;if(this.__contextState.depthMask!=true){this.gl.depthMask(true);this.__contextState.depthMask=true}this.gl.clearDepth(a)}if((n&4)!=0){_|=this.gl.STENCIL_BUFFER_BIT;if(this.__contextState.stencilWriteMask!=255){this.gl.stencilMask(255);this.__contextState.stencilWriteMask=255}this.gl.clearStencil(r);this.__contextState.stencilWriteMask=255}if(_==0){return}this.__setGLScissorTest(false);this.gl.clear(_)},configureBackBuffer:function(e,t,i,s,a,r){if(r==null){r=false}if(a==null){a=false}if(s==null){s=true}if(this.__stage3D==null){this.backBufferWidth=e;this.backBufferHeight=t;this.__backBufferAntiAlias=i;this.__state.backBufferEnableDepthAndStencil=s;this.__backBufferWantsBestResolution=a;this.__backBufferWantsBestResolutionOnBrowserZoom=r}else{if(this.__backBufferTexture==null||this.backBufferWidth!=e||this.backBufferHeight!=t){this.__backBufferTexture=this.createRectangleTexture(e,t,1,true);this.__frontBufferTexture=this.createRectangleTexture(e,t,1,true);if(this.__stage3D.__vertexBuffer==null){this.__stage3D.__vertexBuffer=this.createVertexBuffer(4,5)}var n=openfl__$Vector_Vector_$Impl_$.toFloatVector(null,null,null,[e,t,0,1,1,0,t,0,0,1,e,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(n,0,20);if(this.__stage3D.__indexBuffer==null){this.__stage3D.__indexBuffer=this.createIndexBuffer(6);var _=openfl__$Vector_Vector_$Impl_$.toIntVector(null,null,null,[0,1,2,2,1,3]);this.__stage3D.__indexBuffer.uploadFromVector(_,0,6)}}this.backBufferWidth=e;this.backBufferHeight=t;this.__backBufferAntiAlias=i;this.__state.backBufferEnableDepthAndStencil=s;this.__backBufferWantsBestResolution=a;this.__backBufferWantsBestResolutionOnBrowserZoom=r;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(s,i,0);this.__frontBufferTexture.__getGLFramebuffer(s,i,0)}},createIndexBuffer:function(e,t){if(t==null){t=1}return new openfl_display3D_IndexBuffer3D(this,e,t)},createProgram:function(e){if(e==null){e=0}return new openfl_display3D_Program3D(this,e)},createRectangleTexture:function(e,t,i,s){return new openfl_display3D_textures_RectangleTexture(this,e,t,openfl_display3D__$Context3DTextureFormat_Context3DTextureFormat_$Impl_$.toString(i),s)},createVertexBuffer:function(e,t,i){if(i==null){i=1}return new openfl_display3D_VertexBuffer3D(this,e,t,openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.toString(i))},drawTriangles:function(e,t,i){if(i==null){i=-1}if(t==null){t=0}if(this.__state.renderToTexture==null){if(this.__stage.context3D==this&&!this.__stage.__renderer.__cleared){this.__stage.__renderer.__clear()}else if(!this.__cleared){this.clear(0,0,0,0,1,0,1)}}this.__flushGL();if(this.__state.program!=null){this.__state.program.__flush()}var s=i==-1?e.__numIndices:i*3;this.__bindGLElementArrayBuffer(e.__id);this.gl.drawElements(this.gl.TRIANGLES,s,this.gl.UNSIGNED_SHORT,t*2)},present:function(){this.setRenderToBackBuffer();if(this.__stage3D!=null&&this.__backBufferTexture!=null){if(!this.__cleared){this.clear(0,0,0,0,1,0,1)}var e=this.__backBufferTexture;this.__backBufferTexture=this.__frontBufferTexture;this.__frontBufferTexture=e;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(this.__state.backBufferEnableDepthAndStencil,this.__backBufferAntiAlias,0);this.__cleared=false}this.__present=true},setBlendFactors:function(e,t){this.setBlendFactorsSeparate(e,t,e,t)},setBlendFactorsSeparate:function(e,t,i,s){this.__state.blendSourceRGBFactor=e;this.__state.blendDestinationRGBFactor=t;this.__state.blendSourceAlphaFactor=i;this.__state.blendDestinationAlphaFactor=s;this.__setGLBlendEquation(this.gl.FUNC_ADD)},setColorMask:function(e,t,i,s){this.__state.colorMaskRed=e;this.__state.colorMaskGreen=t;this.__state.colorMaskBlue=i;this.__state.colorMaskAlpha=s},setCulling:function(e){this.__state.culling=e},setDepthTest:function(e,t){this.__state.depthMask=e;this.__state.depthCompareMode=t},setProgram:function(e){this.__state.program=e;this.__state.shader=null;if(e!=null){var t=0;var i=e.__samplerStates.length;while(t<i){var s=t++;if(this.__state.samplerStates[s]==null){this.__state.samplerStates[s]=e.__samplerStates[s].clone()}else{this.__state.samplerStates[s].copyFrom(e.__samplerStates[s])}}}},setProgramConstantsFromMatrix:function(e,t,i,s){if(s==null){s=false}if(this.__state.program!=null&&this.__state.program.__format==1){this.__flushGLProgram();var a=new Float32Array(16);var r=a;var n=0;while(n<16){var _=n++;r[_]=i.rawData.get(_)}lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.uniformMatrix4fv(this.gl,t,s,r)}else{var o=e==1;var l=o?this.__vertexConstants:this.__fragmentConstants;var h=i.rawData;var c=t*4;if(s){l[c++]=h.get(0);l[c++]=h.get(4);l[c++]=h.get(8);l[c++]=h.get(12);l[c++]=h.get(1);l[c++]=h.get(5);l[c++]=h.get(9);l[c++]=h.get(13);l[c++]=h.get(2);l[c++]=h.get(6);l[c++]=h.get(10);l[c++]=h.get(14);l[c++]=h.get(3);l[c++]=h.get(7);l[c++]=h.get(11);l[c++]=h.get(15)}else{l[c++]=h.get(0);l[c++]=h.get(1);l[c++]=h.get(2);l[c++]=h.get(3);l[c++]=h.get(4);l[c++]=h.get(5);l[c++]=h.get(6);l[c++]=h.get(7);l[c++]=h.get(8);l[c++]=h.get(9);l[c++]=h.get(10);l[c++]=h.get(11);l[c++]=h.get(12);l[c++]=h.get(13);l[c++]=h.get(14);l[c++]=h.get(15)}if(this.__state.program!=null){this.__state.program.__markDirty(o,t,4)}}},setRenderToBackBuffer:function(){this.__state.renderToTexture=null},setRenderToTexture:function(e,t,i,s){if(s==null){s=0}if(i==null){i=0}if(t==null){t=false}this.__state.renderToTexture=e;this.__state.renderToTextureDepthStencil=t;this.__state.renderToTextureAntiAlias=i;this.__state.renderToTextureSurfaceSelector=s},setSamplerStateAt:function(e,t,i,s){if(this.__state.samplerStates[e]==null){this.__state.samplerStates[e]=new openfl__$internal_renderer_SamplerState}var a=this.__state.samplerStates[e];a.wrap=t;a.filter=i;a.mipfilter=s},setScissorRectangle:function(e){if(e!=null){this.__state.scissorEnabled=true;this.__state.scissorRectangle.copyFrom(e)}else{this.__state.scissorEnabled=false}},setStencilActions:function(e,t,i,s,a){if(a==null){a=5}if(s==null){s=5}if(i==null){i=5}if(t==null){t=0}if(e==null){e=2}this.__state.stencilTriangleFace=e;this.__state.stencilCompareMode=t;this.__state.stencilPass=i;this.__state.stencilDepthFail=s;this.__state.stencilFail=a},setStencilReferenceValue:function(e,t,i){if(i==null){i=255}if(t==null){t=255}this.__state.stencilReferenceValue=e;this.__state.stencilReadMask=t;this.__state.stencilWriteMask=i},setTextureAt:function(e,t){this.__state.textures[e]=t},setVertexBufferAt:function(e,t,i,s){if(s==null){s=4}if(i==null){i=0}if(t==null){this.gl.disableVertexAttribArray(e);this.__bindGLArrayBuffer(null);return}this.__bindGLArrayBuffer(t.__id);this.gl.enableVertexAttribArray(e);var a=i*4;switch(s){case 0:this.gl.vertexAttribPointer(e,4,this.gl.UNSIGNED_BYTE,true,t.__stride,a);break;case 1:this.gl.vertexAttribPointer(e,1,this.gl.FLOAT,false,t.__stride,a);break;case 2:this.gl.vertexAttribPointer(e,2,this.gl.FLOAT,false,t.__stride,a);break;case 3:this.gl.vertexAttribPointer(e,3,this.gl.FLOAT,false,t.__stride,a);break;case 4:this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,false,t.__stride,a);break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}},__bindGLArrayBuffer:function(e){if(this.__contextState.__currentGLArrayBuffer!=e){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,e);this.__contextState.__currentGLArrayBuffer=e}},__bindGLElementArrayBuffer:function(e){if(this.__contextState.__currentGLElementArrayBuffer!=e){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,e);this.__contextState.__currentGLElementArrayBuffer=e}},__bindGLFramebuffer:function(e){if(this.__contextState.__currentGLFramebuffer!=e){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e);this.__contextState.__currentGLFramebuffer=e}},__bindGLTexture2D:function(e){this.gl.bindTexture(this.gl.TEXTURE_2D,e);this.__contextState.__currentGLTexture2D=e},__bindGLTextureCubeMap:function(e){this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP,e);this.__contextState.__currentGLTextureCubeMap=e},__dispose:function(){this.driverInfo+=" (Disposed)";if(this.__stage3D!=null){this.__stage3D.__indexBuffer=null;this.__stage3D.__vertexBuffer=null;this.__stage3D.context3D=null;this.__stage3D=null}this.__backBufferTexture=null;this.__context=null;this.__renderStage3DProgram=null;this.__fragmentConstants=null;this.__frontBufferTexture=null;this.__positionScale=null;this.__present=false;this.__quadIndexBuffer=null;this.__stage=null;this.__vertexConstants=null},__drawTriangles:function(e,t){if(e==null){e=0}if(this.__state.renderToTexture==null){if(this.__stage.context3D==this&&!this.__stage.__renderer.__cleared){this.__stage.__renderer.__clear()}else if(!this.__cleared){this.clear(0,0,0,0,1,0,1)}}this.__flushGL();if(this.__state.program!=null){this.__state.program.__flush()}this.gl.drawArrays(this.gl.TRIANGLES,e,t)},__flushGL:function(){this.__flushGLProgram();this.__flushGLFramebuffer();this.__flushGLViewport();this.__flushGLBlend();if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha){this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha);this.__contextState.colorMaskRed=this.__state.colorMaskRed;this.__contextState.colorMaskGreen=this.__state.colorMaskGreen;this.__contextState.colorMaskBlue=this.__state.colorMaskBlue;this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha}this.__flushGLCulling();this.__flushGLDepth();this.__flushGLScissor();this.__flushGLStencil();this.__flushGLTextures()},__flushGLBlend:function(){if(this.__contextState.blendDestinationRGBFactor!=this.__state.blendDestinationRGBFactor||this.__contextState.blendSourceRGBFactor!=this.__state.blendSourceRGBFactor||this.__contextState.blendDestinationAlphaFactor!=this.__state.blendDestinationAlphaFactor||this.__contextState.blendSourceAlphaFactor!=this.__state.blendSourceAlphaFactor){this.__setGLBlend(true);if(this.__state.blendDestinationRGBFactor==this.__state.blendDestinationAlphaFactor&&this.__state.blendSourceRGBFactor==this.__state.blendSourceAlphaFactor){this.gl.blendFunc(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor))}else{this.gl.blendFuncSeparate(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor),this.__getGLBlend(this.__state.blendSourceAlphaFactor),this.__getGLBlend(this.__state.blendDestinationAlphaFactor))}this.__contextState.blendDestinationRGBFactor=this.__state.blendDestinationRGBFactor;this.__contextState.blendSourceRGBFactor=this.__state.blendSourceRGBFactor;this.__contextState.blendDestinationAlphaFactor=this.__state.blendDestinationAlphaFactor;this.__contextState.blendSourceAlphaFactor=this.__state.blendSourceAlphaFactor}},__flushGLCulling:function(){if(this.__contextState.culling!=this.__state.culling){if(this.__state.culling==3){this.__setGLCullFace(false)}else{this.__setGLCullFace(true);var e=this.__state.culling;switch(e){case 0:this.gl.cullFace(this.gl.BACK);break;case 1:this.gl.cullFace(this.gl.FRONT);break;case 2:this.gl.cullFace(this.gl.FRONT_AND_BACK);break;case 3:break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}}this.__contextState.culling=this.__state.culling}},__flushGLDepth:function(){var e=this.__state.depthMask&&(this.__state.renderToTexture!=null?this.__state.renderToTextureDepthStencil:this.__state.backBufferEnableDepthAndStencil);if(this.__contextState.depthMask!=e){this.gl.depthMask(e);this.__contextState.depthMask=e}if(this.__contextState.depthCompareMode!=this.__state.depthCompareMode){var t=this.__state.depthCompareMode;switch(t){case 0:this.gl.depthFunc(this.gl.ALWAYS);break;case 1:this.gl.depthFunc(this.gl.EQUAL);break;case 2:this.gl.depthFunc(this.gl.GREATER);break;case 3:this.gl.depthFunc(this.gl.GEQUAL);break;case 4:this.gl.depthFunc(this.gl.LESS);break;case 5:this.gl.depthFunc(this.gl.LEQUAL);break;case 6:this.gl.depthFunc(this.gl.NEVER);break;case 7:this.gl.depthFunc(this.gl.NOTEQUAL);break;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}this.__contextState.depthCompareMode=this.__state.depthCompareMode}},__flushGLFramebuffer:function(){if(this.__state.renderToTexture!=null){if(this.__contextState.renderToTexture!=this.__state.renderToTexture||this.__contextState.renderToTextureSurfaceSelector!=this.__state.renderToTextureSurfaceSelector){var e=this.__state.renderToTexture.__getGLFramebuffer(this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector);this.__bindGLFramebuffer(e);this.__contextState.renderToTexture=this.__state.renderToTexture;this.__contextState.renderToTextureAntiAlias=this.__state.renderToTextureAntiAlias;this.__contextState.renderToTextureDepthStencil=this.__state.renderToTextureDepthStencil;this.__contextState.renderToTextureSurfaceSelector=this.__state.renderToTextureSurfaceSelector}this.__setGLDepthTest(this.__state.renderToTextureDepthStencil);this.__setGLStencilTest(this.__state.renderToTextureDepthStencil);this.__setGLFrontFace(true)}else{if(this.__stage==null&&this.backBufferWidth==0&&this.backBufferHeight==0){throw new js__$Boot_HaxeError(new openfl_errors_Error("Context3D backbuffer has not been configured"))}if(this.__contextState.renderToTexture!=null||this.__contextState.__currentGLFramebuffer!=this.__state.__primaryGLFramebuffer||this.__contextState.backBufferEnableDepthAndStencil!=this.__state.backBufferEnableDepthAndStencil){this.__bindGLFramebuffer(this.__state.__primaryGLFramebuffer);this.__contextState.renderToTexture=null;this.__contextState.backBufferEnableDepthAndStencil=this.__state.backBufferEnableDepthAndStencil}this.__setGLDepthTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLStencilTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLFrontFace(this.__stage.context3D!=this)}},__flushGLProgram:function(){var e=this.__state.shader;var t=this.__state.program;if(this.__contextState.shader!=e){if(this.__contextState.shader!=null){this.__contextState.shader.__disable()}if(e!=null){e.__enable()}this.__contextState.shader=e}if(this.__contextState.program!=t){if(this.__contextState.program!=null){this.__contextState.program.__disable()}if(t!=null){t.__enable()}this.__contextState.program=t}if(t!=null&&t.__format==0){this.__positionScale[1]=this.__stage.context3D==this&&this.__state.renderToTexture==null?1:-1;t.__setPositionScale(this.__positionScale)}},__flushGLScissor:function(){if(!this.__state.scissorEnabled){if(this.__contextState.scissorEnabled!=this.__state.scissorEnabled){this.__setGLScissorTest(false);this.__contextState.scissorEnabled=false}}else{this.__setGLScissorTest(true);this.__contextState.scissorEnabled=true;var e=this.__state.scissorRectangle.x|0;var t=this.__state.scissorRectangle.y|0;var i=this.__state.scissorRectangle.width|0;var s=this.__state.scissorRectangle.height|0;if(this.__state.renderToTexture==null&&this.__stage3D==null){var a=this.__stage.window.__height*this.__stage.window.__scale|0;t=a-(this.__state.scissorRectangle.height|0)-t}if(this.__contextState.scissorRectangle.x!=e||this.__contextState.scissorRectangle.y!=t||this.__contextState.scissorRectangle.width!=i||this.__contextState.scissorRectangle.height!=s){this.gl.scissor(e,t,i,s);this.__contextState.scissorRectangle.setTo(e,t,i,s)}}},__flushGLStencil:function(){if(this.__contextState.stencilTriangleFace!=this.__state.stencilTriangleFace||this.__contextState.stencilPass!=this.__state.stencilPass||this.__contextState.stencilDepthFail!=this.__state.stencilDepthFail||this.__contextState.stencilFail!=this.__state.stencilFail){this.gl.stencilOpSeparate(this.__getGLTriangleFace(this.__state.stencilTriangleFace),this.__getGLStencilAction(this.__state.stencilFail),this.__getGLStencilAction(this.__state.stencilDepthFail),this.__getGLStencilAction(this.__state.stencilPass));this.__contextState.stencilTriangleFace=this.__state.stencilTriangleFace;this.__contextState.stencilPass=this.__state.stencilPass;this.__contextState.stencilDepthFail=this.__state.stencilDepthFail;this.__contextState.stencilFail=this.__state.stencilFail}if(this.__contextState.stencilWriteMask!=this.__state.stencilWriteMask){this.gl.stencilMask(this.__state.stencilWriteMask);this.__contextState.stencilWriteMask=this.__state.stencilWriteMask}if(this.__contextState.stencilCompareMode!=this.__state.stencilCompareMode||this.__contextState.stencilReferenceValue!=this.__state.stencilReferenceValue||this.__contextState.stencilReadMask!=this.__state.stencilReadMask){this.gl.stencilFunc(this.__getGLCompareMode(this.__state.stencilCompareMode),this.__state.stencilReferenceValue,this.__state.stencilReadMask);this.__contextState.stencilCompareMode=this.__state.stencilCompareMode;this.__contextState.stencilReferenceValue=this.__state.stencilReferenceValue;this.__contextState.stencilReadMask=this.__state.stencilReadMask}},__flushGLTextures:function(){var e=0;var t;var i;var s=0;var a=this.__state.textures.length;while(s<a){var r=s++;t=this.__state.textures[r];i=this.__state.samplerStates[r];if(i==null){this.__state.samplerStates[r]=new openfl__$internal_renderer_SamplerState;i=this.__state.samplerStates[r]}this.gl.activeTexture(this.gl.TEXTURE0+e);if(t!=null){if(t.__textureTarget==this.gl.TEXTURE_2D){this.__bindGLTexture2D(t.__getTexture())}else{this.__bindGLTextureCubeMap(t.__getTexture())}this.__contextState.textures[r]=t;t.__setSamplerState(i)}else{this.__bindGLTexture2D(null)}if(this.__state.program!=null&&this.__state.program.__format==0&&i.textureAlpha){this.gl.activeTexture(this.gl.TEXTURE0+e+4);if(t!=null&&t.__alphaTexture!=null){if(t.__alphaTexture.__textureTarget==this.gl.TEXTURE_2D){this.__bindGLTexture2D(t.__alphaTexture.__getTexture())}else{this.__bindGLTextureCubeMap(t.__alphaTexture.__getTexture())}t.__alphaTexture.__setSamplerState(i);this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[e].location,1)}else{this.__bindGLTexture2D(null);this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[e].location,0)}}++e}},__flushGLViewport:function(){if(this.__state.renderToTexture==null){if(this.__stage.context3D==this){var e=this.__stage3D==null?0:this.__stage3D.get_x()|0;var t=this.__stage.window.__height*this.__stage.window.__scale-this.backBufferHeight-(this.__stage3D==null?0:this.__stage3D.get_y())|0;this.gl.viewport(e,t,this.backBufferWidth,this.backBufferHeight)}else{this.gl.viewport(0,0,this.backBufferWidth,this.backBufferHeight)}}else{var i=0;var s=0;if(js_Boot.__instanceof(this.__state.renderToTexture,openfl_display3D_textures_Texture)){var a=this.__state.renderToTexture;i=a.__width;s=a.__height}else if(js_Boot.__instanceof(this.__state.renderToTexture,openfl_display3D_textures_RectangleTexture)){var r=this.__state.renderToTexture;i=r.__width;s=r.__height}else if(js_Boot.__instanceof(this.__state.renderToTexture,openfl_display3D_textures_CubeTexture)){var n=this.__state.renderToTexture;i=n.__size;s=n.__size}this.gl.viewport(0,0,i,s)}},__getGLBlend:function(e){switch(e){case 0:return this.gl.DST_ALPHA;case 1:return this.gl.DST_COLOR;case 2:return this.gl.ONE;case 3:return this.gl.ONE_MINUS_DST_ALPHA;case 4:return this.gl.ONE_MINUS_DST_COLOR;case 5:return this.gl.ONE_MINUS_SRC_ALPHA;case 6:return this.gl.ONE_MINUS_SRC_COLOR;case 7:return this.gl.SRC_ALPHA;case 8:return this.gl.SRC_COLOR;case 9:return this.gl.ZERO;default:throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError)}},__getGLCompareMode:function(e){switch(e){case 0:return this.gl.ALWAYS;case 1:return this.gl.EQUAL;case 2:return this.gl.GREATER;case 3:return this.gl.GEQUAL;case 4:return this.gl.LESS;case 5:return this.gl.LEQUAL;case 6:return this.gl.NEVER;case 7:return this.gl.NOTEQUAL;default:return this.gl.EQUAL}},__getGLStencilAction:function(e){switch(e){case 0:return this.gl.DECR;case 1:return this.gl.DECR_WRAP;case 2:return this.gl.INCR;case 3:return this.gl.INCR_WRAP;case 4:return this.gl.INVERT;case 5:return this.gl.KEEP;case 6:return this.gl.REPLACE;case 7:return this.gl.ZERO;default:return this.gl.KEEP}},__getGLTriangleFace:function(e){switch(e){case 0:return this.gl.BACK;case 1:return this.gl.FRONT;case 2:return this.gl.FRONT_AND_BACK;case 3:return this.gl.NONE;default:return this.gl.FRONT_AND_BACK}},__renderStage3D:function(e){var t=e.context3D;if(t!=null&&t!=this&&t.__frontBufferTexture!=null&&e.visible&&this.backBufferHeight>0&&this.backBufferWidth>0){if(this.__renderStage3DProgram==null){var i=new openfl_utils_AGALMiniAssembler;i.assemble(openfl_display3D__$Context3DProgramType_Context3DProgramType_$Impl_$.toString(1),"m44 op, va0, vc0\n"+"mov v0, va1");var s=new openfl_utils_AGALMiniAssembler;s.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(i.agalcode,s.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,i){this.__context=e;this.__numIndices=t;var s=this.__context.gl;this.__id=s.createBuffer();this.__usage=i==0?s.DYNAMIC_DRAW:s.STATIC_DRAW};$hxClasses["openfl.display3D.IndexBuffer3D"]=openfl_display3D_IndexBuffer3D;openfl_display3D_IndexBuffer3D.__name__=["openfl","display3D","IndexBuffer3D"];openfl_display3D_IndexBuffer3D.prototype={__context:null,__id:null,__numIndices:null,__tempUInt16Array:null,__usage:null,uploadFromTypedArray:function(e,t){if(t==null){t=-1}if(e==null){return}var i=this.__context.gl;this.__context.__bindGLElementArrayBuffer(this.__id);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(i,i.ELEMENT_ARRAY_BUFFER,e,this.__usage)},uploadFromVector:function(e,t,i){if(e==null){return}var s=this.__context.gl;var a=t+i;var r=this.__tempUInt16Array;if(this.__tempUInt16Array==null||this.__tempUInt16Array.length<i){var n;if(i!=null){n=new Uint16Array(i)}else{n=null}this.__tempUInt16Array=n;if(r!=null){this.__tempUInt16Array.set(r)}}var _=t;var o=a;while(_<o){var l=_++;this.__tempUInt16Array[l-t]=e.get(l)}this.uploadFromTypedArray(this.__tempUInt16Array)},__class__:openfl_display3D_IndexBuffer3D};var openfl_display3D_Program3D=function(e,t){this.__context=e;this.__format=t;if(this.__format==0){this.__agalSamplerUsageMask=0;this.__agalUniforms=new List;this.__agalSamplerUniforms=new List;this.__agalAlphaSamplerUniforms=new List;this.__agalAlphaSamplerEnabled=[]}else{this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslSamplerNames=[];this.__glslUniformLocations=[];this.__glslUniformNames=[];this.__glslUniformTypes=[]}this.__samplerStates=[]};$hxClasses["openfl.display3D.Program3D"]=openfl_display3D_Program3D;openfl_display3D_Program3D.__name__=["openfl","display3D","Program3D"];openfl_display3D_Program3D.prototype={__agalAlphaSamplerEnabled:null,__agalAlphaSamplerUniforms:null,__agalFragmentUniformMap:null,__agalPositionScale:null,__agalSamplerUniforms:null,__agalSamplerUsageMask:null,__agalUniforms:null,__agalVertexUniformMap:null,__context:null,__format:null,__glFragmentShader:null,__glFragmentSource:null,__glProgram:null,__glslAttribNames:null,__glslAttribTypes:null,__glslSamplerNames:null,__glslUniformLocations:null,__glslUniformNames:null,__glslUniformTypes:null,__glVertexShader:null,__glVertexSource:null,__samplerStates:null,upload:function(e,t){if(this.__format!=0){return}var i=[];var s=openfl__$internal_formats_agal_AGALConverter.convertToGLSL(e,null);var a=openfl__$internal_formats_agal_AGALConverter.convertToGLSL(t,i);if(lime_utils_Log.level==5){lime_utils_Log.info(s,{fileName:"Program3D.hx",lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"});lime_utils_Log.info(a,{fileName:"Program3D.hx",lineNumber:400,className:"openfl.display3D.Program3D",methodName:"upload"})}this.__deleteShaders();this.__uploadFromGLSL(s,a);this.__buildAGALUniformList();var r=0;var n=i.length;while(r<n){var _=r++;this.__samplerStates[_]=i[_]}},__buildAGALUniformList:function(){if(this.__format==1){return}var e=this.__context.gl;this.__agalUniforms.clear();this.__agalSamplerUniforms.clear();this.__agalAlphaSamplerUniforms.clear();this.__agalAlphaSamplerEnabled=[];this.__agalSamplerUsageMask=0;var t=0;t=e.getProgramParameter(this.__glProgram,e.ACTIVE_UNIFORMS);var i=new List;var s=new List;var a=0;var r=t;while(a<r){var n=a++;var _=e.getActiveUniform(this.__glProgram,n);var o=_.name;var l=_.size;var h=_.type;var c=new openfl_display3D_Uniform(this.__context);c.name=o;c.size=l;c.type=h;c.location=e.getUniformLocation(this.__glProgram,c.name);var u=c.name.indexOf("[");if(u>=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;i.add(c)}else if(StringTools.startsWith(c.name,"fc")){c.regIndex=Std.parseInt(c.name.substring(2));c.regData=this.__context.__fragmentConstants;s.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<d){var g=p++;this.__agalSamplerUsageMask|=1<<c.regIndex+g}}else if(StringTools.startsWith(c.name,"sampler")&&StringTools.endsWith(c.name,"_alpha")){var m=c.name.indexOf("_")-7;c.regIndex=Std.parseInt(c.name.substring(7,7+m))+4;this.__agalAlphaSamplerUniforms.add(c)}else if(StringTools.startsWith(c.name,"sampler")&&StringTools.endsWith(c.name,"_alphaEnabled")){c.regIndex=Std.parseInt(c.name.substring(7));this.__agalAlphaSamplerEnabled[c.regIndex]=c}if(lime_utils_Log.level==5){lime_utils_Log.verbose(""+n+" name:"+c.name+" type:"+c.type+" size:"+c.size+" location:"+Std.string(c.location),{fileName:"Program3D.hx",lineNumber:580,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}}this.__agalVertexUniformMap=new openfl_display3D_UniformMap(Lambda.array(i));this.__agalFragmentUniformMap=new openfl_display3D_UniformMap(Lambda.array(s))},__deleteShaders:function(){var e=this.__context.gl;if(this.__glProgram!=null){this.__glProgram=null}if(this.__glVertexShader!=null){e.deleteShader(this.__glVertexShader);this.__glVertexShader=null}if(this.__glFragmentShader!=null){e.deleteShader(this.__glFragmentShader);this.__glFragmentShader=null}},__disable:function(){var e=this.__format==1},__enable:function(){var e=this.__context.gl;e.useProgram(this.__glProgram);if(this.__format==0){this.__agalVertexUniformMap.markAllDirty();this.__agalFragmentUniformMap.markAllDirty();var t=this.__agalSamplerUniforms.h;while(t!=null){var i=t.item;t=t.next;var s=i;if(s.regCount==1){e.uniform1i(s.location,s.regIndex)}else{throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("!!! TODO: uniform location on webgl"))}}var a=this.__agalAlphaSamplerUniforms.h;while(a!=null){var r=a.item;a=a.next;var n=r;if(n.regCount==1){e.uniform1i(n.location,n.regIndex)}else{throw new js__$Boot_HaxeError(new openfl_errors_IllegalOperationError("!!! TODO: uniform location on webgl"))}}}},__flush:function(){if(this.__format==0){this.__agalVertexUniformMap.flush();this.__agalFragmentUniformMap.flush()}else{return}},__markDirty:function(e,t,i){if(this.__format==1){return}if(e){this.__agalVertexUniformMap.markDirty(t,i)}else{this.__agalFragmentUniformMap.markDirty(t,i)}},__setPositionScale:function(e){if(this.__format==1){return}if(this.__agalPositionScale!=null){var t=this.__context.gl;var i=this.__agalPositionScale.location;t.uniform4fv(i,e)}},__uploadFromGLSL:function(e,t){var i=this.__context.gl;this.__glVertexSource=e;this.__glFragmentSource=t;this.__glVertexShader=i.createShader(i.VERTEX_SHADER);i.shaderSource(this.__glVertexShader,e);i.compileShader(this.__glVertexShader);if(i.getShaderParameter(this.__glVertexShader,i.COMPILE_STATUS)==0){var s="Error compiling vertex shader";s+="\n"+i.getShaderInfoLog(this.__glVertexShader);s+="\n"+e;lime_utils_Log.error(s,{fileName:"Program3D.hx",lineNumber:872,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}this.__glFragmentShader=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(this.__glFragmentShader,t);i.compileShader(this.__glFragmentShader);if(i.getShaderParameter(this.__glFragmentShader,i.COMPILE_STATUS)==0){var a="Error compiling fragment shader";a+="\n"+i.getShaderInfoLog(this.__glFragmentShader);a+="\n"+t;lime_utils_Log.error(a,{fileName:"Program3D.hx",lineNumber:884,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}this.__glProgram=i.createProgram();if(this.__format==0){var r=0;while(r<16){var n=r++;var _="va"+n;if(e.indexOf(" "+_)!=-1){i.bindAttribLocation(this.__glProgram,n,_)}}}else{var o=0;var l=this.__glslAttribNames;while(o<l.length){var h=l[o];++o;if(h.indexOf("Position")>-1&&StringTools.startsWith(h,"openfl_")){i.bindAttribLocation(this.__glProgram,0,h);break}}}i.attachShader(this.__glProgram,this.__glVertexShader);i.attachShader(this.__glProgram,this.__glFragmentShader);i.linkProgram(this.__glProgram);if(i.getProgramParameter(this.__glProgram,i.LINK_STATUS)==0){var c="Unable to initialize the shader program";c+="\n"+i.getProgramInfoLog(this.__glProgram);lime_utils_Log.error(c,{fileName:"Program3D.hx",lineNumber:925,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 i=this.type;switch(i){case 35664:lime_graphics__$WebGL2RenderContext_WebGL2RenderContext_$Impl_$.uniform2fv(e,this.location,this.regData.subarray(t,t+this.regCount*2));break;case 35665:var s=this.location;var a=this.regData.subarray(t,t+this.regCount*3);e.uniform3fv(s,a);break;case 35666:var r=this.location;var n=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(r,n);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 _=this.location;var o=this.regData.subarray(t,t+this.regCount*4);e.uniform4fv(_,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 i=0;var s=this.__uniforms;while(i<s.length){var a=s[i];++i;if(a.regIndex+a.regCount>t){t=a.regIndex+a.regCount}}this.__registerLookup=openfl__$Vector_Vector_$Impl_$.toObjectVector(null,t);var r=0;var n=this.__uniforms;while(r<n.length){var _=n[r];++r;var o=0;var l=_.regCount;while(o<l){var h=o++;this.__registerLookup.set(_.regIndex+h,_)}}this.__anyDirty=this.__allDirty=true};$hxClasses["openfl.display3D.UniformMap"]=openfl_display3D_UniformMap;openfl_display3D_UniformMap.__name__=["openfl","display3D","UniformMap"];openfl_display3D_UniformMap.prototype={__allDirty:null,__anyDirty:null,__registerLookup:null,__uniforms:null,flush:function(){if(this.__anyDirty){var e=0;var t=this.__uniforms;while(e<t.length){var i=t[e];++e;if(this.__allDirty||i.isDirty){i.flush();i.isDirty=false}}this.__anyDirty=this.__allDirty=false}},markAllDirty:function(){this.__allDirty=true;this.__anyDirty=true},markDirty:function(e,t){if(this.__allDirty){return}var i=e+t;if(i>this.__registerLookup.get_length()){i=this.__registerLookup.get_length()}var s=e;while(s<i){var a=this.__registerLookup.get(s);if(a!=null){a.isDirty=true;this.__anyDirty=true;s=a.regIndex+a.regCount}else{++s}}},__class__:openfl_display3D_UniformMap};var openfl_display3D_VertexBuffer3D=function(e,t,i,s){this.__context=e;this.__numVertices=t;this.__vertexSize=i;var a=this.__context.gl;this.__id=a.createBuffer();this.__stride=this.__vertexSize*4;this.__usage=openfl_display3D__$Context3DBufferUsage_Context3DBufferUsage_$Impl_$.fromString(s)==0?a.DYNAMIC_DRAW:a.STATIC_DRAW};$hxClasses["openfl.display3D.VertexBuffer3D"]=openfl_display3D_VertexBuffer3D;openfl_display3D_VertexBuffer3D.__name__=["openfl","display3D","VertexBuffer3D"];openfl_display3D_VertexBuffer3D.prototype={__context:null,__id:null,__numVertices:null,__stride:null,__tempFloat32Array:null,__usage:null,__vertexSize:null,uploadFromTypedArray:function(e,t){if(t==null){t=-1}if(e==null){return}var i=this.__context.gl;this.__context.__bindGLArrayBuffer(this.__id);lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.bufferData(i,i.ARRAY_BUFFER,e,this.__usage)},uploadFromVector:function(e,t,i){if(e==null){return}var s=this.__context.gl;var a=t*this.__vertexSize;var r=i*this.__vertexSize;var n=a+r;var _=this.__tempFloat32Array;if(this.__tempFloat32Array==null||this.__tempFloat32Array.length<r){var o;if(r!=null){o=new Float32Array(r)}else{o=null}this.__tempFloat32Array=o;if(_!=null){this.__tempFloat32Array.set(_)}}var l=a;var h=n;while(l<h){var c=l++;this.__tempFloat32Array[c-a]=e.get(c)}this.uploadFromTypedArray(this.__tempFloat32Array)},__class__:openfl_display3D_VertexBuffer3D};var openfl_display3D_textures_TextureBase=function(e){openfl_events_EventDispatcher.call(this);this.__context=e;var t=this.__context.gl;this.__textureID=t.createTexture();this.__textureContext=this.__context.__context;if(openfl_display3D_textures_TextureBase.__supportsBGRA==null){openfl_display3D_textures_TextureBase.__textureInternalFormat=t.RGBA;var i=null;if(i!=null){openfl_display3D_textures_TextureBase.__supportsBGRA=true;openfl_display3D_textures_TextureBase.__textureFormat=i.BGRA_EXT;if(e.__context.type=="opengles"){openfl_display3D_textures_TextureBase.__textureInternalFormat=i.BGRA_EXT}}else{openfl_display3D_textures_TextureBase.__supportsBGRA=false;openfl_display3D_textures_TextureBase.__textureFormat=t.RGBA}openfl_display3D_textures_TextureBase.__compressedFormats=new haxe_ds_IntMap;openfl_display3D_textures_TextureBase.__compressedFormatsAlpha=new haxe_ds_IntMap;var s=t.getExtension("WEBGL_compressed_texture_s3tc");var a=t.getExtension("WEBGL_compressed_texture_etc1");var r=t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");if(s!=null){var n=s.COMPRESSED_RGBA_S3TC_DXT1_EXT;openfl_display3D_textures_TextureBase.__compressedFormats.h[0]=n;var _=s.COMPRESSED_RGBA_S3TC_DXT5_EXT;openfl_display3D_textures_TextureBase.__compressedFormatsAlpha.h[0]=_}if(a!=null){var o=a.COMPRESSED_RGB_ETC1_WEBGL;openfl_display3D_textures_TextureBase.__compressedFormats.h[2]=o;var l=a.COMPRESSED_RGB_ETC1_WEBGL;openfl_display3D_textures_TextureBase.__compressedFormatsAlpha.h[2]=l}if(r!=null){var h=r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;openfl_display3D_textures_TextureBase.__compressedFormats.h[1]=h;var c=r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;openfl_display3D_textures_TextureBase.__compressedFormatsAlpha.h[1]=c}}this.__internalFormat=openfl_display3D_textures_TextureBase.__textureInternalFormat;this.__format=openfl_display3D_textures_TextureBase.__textureFormat};$hxClasses["openfl.display3D.textures.TextureBase"]=openfl_display3D_textures_TextureBase;openfl_display3D_textures_TextureBase.__name__=["openfl","display3D","textures","TextureBase"];openfl_display3D_textures_TextureBase.__super__=openfl_events_EventDispatcher;openfl_display3D_textures_TextureBase.prototype=$extend(openfl_events_EventDispatcher.prototype,{__alphaTexture:null,__context:null,__format:null,__glDepthRenderbuffer:null,__glFramebuffer:null,__glStencilRenderbuffer:null,__height:null,__internalFormat:null,__optimizeForRenderToTexture:null,__samplerState:null,__textureContext:null,__textureID:null,__textureTarget:null,__width:null,__getGLFramebuffer:function(e,t,i){var s=this.__context.gl;if(this.__glFramebuffer==null){this.__glFramebuffer=s.createFramebuffer();this.__context.__bindGLFramebuffer(this.__glFramebuffer);s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,this.__textureID,0);if(this.__context.__enableErrorChecking){var a=s.checkFramebufferStatus(s.FRAMEBUFFER);if(a!=s.FRAMEBUFFER_COMPLETE){lime_utils_Log.warn("Error: Context3D.setRenderToTexture status:"+a+" width:"+this.__width+" height:"+this.__height,{fileName:"TextureBase.hx",lineNumber:193,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})}}}if(e&&this.__glDepthRenderbuffer==null){this.__context.__bindGLFramebuffer(this.__glFramebuffer);if(openfl_display3D_Context3D.__glDepthStencil!=0){this.__glDepthRenderbuffer=s.createRenderbuffer();this.__glStencilRenderbuffer=this.__glDepthRenderbuffer;s.bindRenderbuffer(s.RENDERBUFFER,this.__glDepthRenderbuffer);s.renderbufferStorage(s.RENDERBUFFER,openfl_display3D_Context3D.__glDepthStencil,this.__width,this.__height);s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,this.__glDepthRenderbuffer)}else{this.__glDepthRenderbuffer=s.createRenderbuffer();this.__glStencilRenderbuffer=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,this.__glDepthRenderbuffer);s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_COMPONENT16,this.__width,this.__height);s.bindRenderbuffer(s.RENDERBUFFER,this.__glStencilRenderbuffer);s.renderbufferStorage(s.RENDERBUFFER,s.STENCIL_INDEX8,this.__width,this.__height);s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,this.__glDepthRenderbuffer);s.framebufferRenderbuffer(s.FRAMEBUFFER,s.STENCIL_ATTACHMENT,s.RENDERBUFFER,this.__glStencilRenderbuffer)}if(this.__context.__enableErrorChecking){var r=s.checkFramebufferStatus(s.FRAMEBUFFER);if(r!=s.FRAMEBUFFER_COMPLETE){lime_utils_Log.warn("Error: Context3D.setRenderToTexture status:"+r+" width:"+this.__width+" height:"+this.__height,{fileName:"TextureBase.hx",lineNumber:231,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})}}s.bindRenderbuffer(s.RENDERBUFFER,null)}return this.__glFramebuffer},__getTexture:function(){return this.__textureID},__setSamplerState:function(e){if(!e.equals(this.__samplerState)){var t=this.__context.gl;if(this.__textureTarget==this.__context.gl.TEXTURE_CUBE_MAP){this.__context.__bindGLTextureCubeMap(this.__textureID)}else{this.__context.__bindGLTexture2D(this.__textureID)}var i=0;var s=0;var a=e.wrap;switch(a){case 0:i=t.CLAMP_TO_EDGE;s=t.CLAMP_TO_EDGE;break;case 1:i=t.CLAMP_TO_EDGE;s=t.REPEAT;break;case 2:i=t.REPEAT;s=t.REPEAT;break;case 3:i=t.REPEAT;s=t.CLAMP_TO_EDGE;break;default:throw new js__$Boot_HaxeError(new openfl_errors_Error("wrap bad enum"))}var r=0;var n=0;var _=e.filter;if(_==5){r=t.NEAREST}else{r=t.LINEAR}var o=e.mipfilter;switch(o){case 0:if(e.filter==5){n=t.NEAREST_MIPMAP_LINEAR}else{n=t.LINEAR_MIPMAP_LINEAR}break;case 1:if(e.filter==5){n=t.NEAREST_MIPMAP_NEAREST}else{n=t.LINEAR_MIPMAP_NEAREST}break;case 2:if(e.filter==5){n=t.NEAREST}else{n=t.LINEAR}break;default:throw new js__$Boot_HaxeError(new openfl_errors_Error("mipfiter bad enum"))}t.texParameteri(this.__textureTarget,t.TEXTURE_MIN_FILTER,n);t.texParameteri(this.__textureTarget,t.TEXTURE_MAG_FILTER,r);t.texParameteri(this.__textureTarget,t.TEXTURE_WRAP_S,i);t.texParameteri(this.__textureTarget,t.TEXTURE_WRAP_T,s);var l=e.lodBias!=0;if(this.__samplerState==null){this.__samplerState=e.clone()}this.__samplerState.copyFrom(e);return true}return false},__class__:openfl_display3D_textures_TextureBase});var openfl_display3D_textures_CubeTexture=function(){};$hxClasses["openfl.display3D.textures.CubeTexture"]=openfl_display3D_textures_CubeTexture;openfl_display3D_textures_CubeTexture.__name__=["openfl","display3D","textures","CubeTexture"];openfl_display3D_textures_CubeTexture.__super__=openfl_display3D_textures_TextureBase;openfl_display3D_textures_CubeTexture.prototype=$extend(openfl_display3D_textures_TextureBase.prototype,{__framebufferSurface:null,__size:null,__getGLFramebuffer:function(e,t,i){var s=this.__context.gl;if(this.__glFramebuffer==null){this.__glFramebuffer=s.createFramebuffer();this.__framebufferSurface=-1}if(this.__framebufferSurface!=i){this.__framebufferSurface=i;this.__context.__bindGLFramebuffer(this.__glFramebuffer);s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+i,this.__textureID,0);if(this.__context.__enableErrorChecking){var a=s.checkFramebufferStatus(s.FRAMEBUFFER);if(a!=s.FRAMEBUFFER_COMPLETE){lime_utils_Log.error("Error: Context3D.setRenderToTexture status:"+a+" width:"+this.__width+" height:"+this.__height,{fileName:"CubeTexture.hx",lineNumber:279,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"})}}}return openfl_display3D_textures_TextureBase.prototype.__getGLFramebuffer.call(this,e,t,i)},__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_CUBE_MAP);this.__samplerState.mipmapGenerated=true}if(openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy!=0){var i;var s=e.filter;switch(s){case 0:i=16;break;case 1:i=2;break;case 2:i=4;break;case 3:i=8;break;default:i=1}if(i>openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_CUBE_MAP,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}return true}return false},__class__:openfl_display3D_textures_CubeTexture});var openfl_display3D_textures_RectangleTexture=function(e,t,i,s,a){openfl_display3D_textures_TextureBase.call(this,e);this.__width=t;this.__height=i;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.__glMaxTextureMaxAnisotropy!=0){var i;var s=e.filter;switch(s){case 0:i=16;break;case 1:i=2;break;case 2:i=4;break;case 3:i=8;break;default:i=1}if(i>openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}return true}return false},__uploadFromImage:function(e){var t=this.__context.gl;var i;var s;if(e.buffer.bitsPerPixel==1){i=t.ALPHA;s=t.ALPHA}else{i=openfl_display3D_textures_TextureBase.__textureInternalFormat;s=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,i,e.buffer.width,e.buffer.height,0,s,t.UNSIGNED_BYTE,e.get_data())}else{lime_graphics__$WebGLRenderContext_WebGLRenderContext_$Impl_$.texImage2D(t,t.TEXTURE_2D,0,i,s,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.__glMaxTextureMaxAnisotropy!=0){var i;var s=e.filter;switch(s){case 0:i=16;break;case 1:i=2;break;case 2:i=4;break;case 3:i=8;break;default:i=1}if(i>openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy){i=openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy}t.texParameterf(t.TEXTURE_2D,openfl_display3D_Context3D.__glTextureMaxAnisotropy,i)}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,i,s){if(s==null){s=false}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.activating=s};$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,i,s){if(s==null){s=""}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.text=s};$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,i,s,a){if(a==null){a=0}if(s==null){s=""}if(i==null){i=false}if(t==null){t=false}openfl_events_TextEvent.call(this,e,t,i,s);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.index<this.list.length},next:function(){return this.list[this.index++]},remove:function(e,t){if(this.active){if(!this.isCopy){if(t<this.index){this.index--}}else{var i=this.index;var s=this.list.length;while(i<s){var a=i++;if(this.list[a]==e){this.list.splice(a,1);break}}}}},reset:function(e){this.list=e;this.isCopy=false;this.index=0},start:function(){this.active=true},stop:function(){this.active=false},__class__:openfl_events__$EventDispatcher_DispatchIterator};var openfl_events__$EventDispatcher_Listener=function(e,t,i){this.callback=e;this.useCapture=t;this.priority=i};$hxClasses["openfl.events._EventDispatcher.Listener"]=openfl_events__$EventDispatcher_Listener;openfl_events__$EventDispatcher_Listener.__name__=["openfl","events","_EventDispatcher","Listener"];openfl_events__$EventDispatcher_Listener.prototype={callback:null,priority:null,useCapture:null,match:function(e,t){if(Reflect.compareMethods(this.callback,e)){return this.useCapture==t}else{return false}},__class__:openfl_events__$EventDispatcher_Listener};var openfl_events_FocusEvent=function(e,t,i,s,a,r){if(r==null){r=0}if(a==null){a=false}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.keyCode=r;this.shiftKey=a;this.relatedObject=s};$hxClasses["openfl.events.FocusEvent"]=openfl_events_FocusEvent;openfl_events_FocusEvent.__name__=["openfl","events","FocusEvent"];openfl_events_FocusEvent.__super__=openfl_events_Event;openfl_events_FocusEvent.prototype=$extend(openfl_events_Event.prototype,{keyCode:null,relatedObject:null,shiftKey:null,__class__:openfl_events_FocusEvent});var openfl_events_FullScreenEvent=function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=false}if(i==null){i=false}if(t==null){t=false}openfl_events_ActivityEvent.call(this,e,t,i);this.fullScreen=s;this.interactive=a};$hxClasses["openfl.events.FullScreenEvent"]=openfl_events_FullScreenEvent;openfl_events_FullScreenEvent.__name__=["openfl","events","FullScreenEvent"];openfl_events_FullScreenEvent.__super__=openfl_events_ActivityEvent;openfl_events_FullScreenEvent.prototype=$extend(openfl_events_ActivityEvent.prototype,{fullScreen:null,interactive:null,__class__:openfl_events_FullScreenEvent});var openfl_events_GameInputEvent=function(e,t,i,s){if(i==null){i=false}if(t==null){t=true}openfl_events_Event.call(this,e,t,i);this.device=s};$hxClasses["openfl.events.GameInputEvent"]=openfl_events_GameInputEvent;openfl_events_GameInputEvent.__name__=["openfl","events","GameInputEvent"];openfl_events_GameInputEvent.__super__=openfl_events_Event;openfl_events_GameInputEvent.prototype=$extend(openfl_events_Event.prototype,{device:null,__class__:openfl_events_GameInputEvent});var openfl_events_HTTPStatusEvent=function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=0}if(i==null){i=false}if(t==null){t=false}this.status=s;this.redirected=a;openfl_events_Event.call(this,e,t,i)};$hxClasses["openfl.events.HTTPStatusEvent"]=openfl_events_HTTPStatusEvent;openfl_events_HTTPStatusEvent.__name__=["openfl","events","HTTPStatusEvent"];openfl_events_HTTPStatusEvent.__super__=openfl_events_Event;openfl_events_HTTPStatusEvent.prototype=$extend(openfl_events_Event.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,__class__:openfl_events_HTTPStatusEvent});var openfl_events_IOErrorEvent=function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=""}if(i==null){i=false}if(t==null){t=true}openfl_events_ErrorEvent.call(this,e,t,i,s,a)};$hxClasses["openfl.events.IOErrorEvent"]=openfl_events_IOErrorEvent;openfl_events_IOErrorEvent.__name__=["openfl","events","IOErrorEvent"];openfl_events_IOErrorEvent.__super__=openfl_events_ErrorEvent;openfl_events_IOErrorEvent.prototype=$extend(openfl_events_ErrorEvent.prototype,{__class__:openfl_events_IOErrorEvent});var openfl_events_KeyboardEvent=function(e,t,i,s,a,r,n,_,o,l,h){if(h==null){h=false}if(l==null){l=false}if(o==null){o=false}if(_==null){_=false}if(n==null){n=false}if(a==null){a=0}if(s==null){s=0}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.charCode=s;this.keyCode=a;this.keyLocation=r!=null?r:0;this.ctrlKey=n;this.altKey=_;this.shiftKey=o;this.controlKey=l;this.commandKey=h};$hxClasses["openfl.events.KeyboardEvent"]=openfl_events_KeyboardEvent;openfl_events_KeyboardEvent.__name__=["openfl","events","KeyboardEvent"];openfl_events_KeyboardEvent.__super__=openfl_events_Event;openfl_events_KeyboardEvent.prototype=$extend(openfl_events_Event.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__class__:openfl_events_KeyboardEvent});var openfl_events_MouseEvent=function(e,t,i,s,a,r,n,_,o,l,h,c,u){if(u==null){u=0}if(c==null){c=false}if(h==null){h=0}if(l==null){l=false}if(o==null){o=false}if(_==null){_=false}if(n==null){n=false}if(a==null){a=0}if(s==null){s=0}if(i==null){i=false}if(t==null){t=true}openfl_events_Event.call(this,e,t,i);this.shiftKey=o;this.altKey=_;this.ctrlKey=n;this.bubbles=t;this.relatedObject=r;this.delta=h;this.localX=s;this.localY=a;this.buttonDown=l;this.commandKey=c;this.clickCount=u;this.isRelatedObjectInaccessible=false;this.stageX=NaN;this.stageY=NaN};$hxClasses["openfl.events.MouseEvent"]=openfl_events_MouseEvent;openfl_events_MouseEvent.__name__=["openfl","events","MouseEvent"];openfl_events_MouseEvent.__create=function(e,t,i,s,a,r,n){if(n==null){n=0}var _=new openfl_events_MouseEvent(e,true,false,a.x,a.y,null,openfl_events_MouseEvent.__ctrlKey,openfl_events_MouseEvent.__altKey,openfl_events_MouseEvent.__shiftKey,openfl_events_MouseEvent.__buttonDown,n,openfl_events_MouseEvent.__commandKey);_.stageX=i;_.stageY=s;_.target=r;return _};openfl_events_MouseEvent.__super__=openfl_events_Event;openfl_events_MouseEvent.prototype=$extend(openfl_events_Event.prototype,{altKey:null,buttonDown:null,commandKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,__class__:openfl_events_MouseEvent});var openfl_events_NetStatusEvent=function(e,t,i,s){if(i==null){i=false}if(t==null){t=false}this.info=s;openfl_events_Event.call(this,e,t,i)};$hxClasses["openfl.events.NetStatusEvent"]=openfl_events_NetStatusEvent;openfl_events_NetStatusEvent.__name__=["openfl","events","NetStatusEvent"];openfl_events_NetStatusEvent.__super__=openfl_events_Event;openfl_events_NetStatusEvent.prototype=$extend(openfl_events_Event.prototype,{info:null,__class__:openfl_events_NetStatusEvent});var openfl_events_ProgressEvent=function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=0}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.bytesLoaded=s;this.bytesTotal=a};$hxClasses["openfl.events.ProgressEvent"]=openfl_events_ProgressEvent;openfl_events_ProgressEvent.__name__=["openfl","events","ProgressEvent"];openfl_events_ProgressEvent.__super__=openfl_events_Event;openfl_events_ProgressEvent.prototype=$extend(openfl_events_Event.prototype,{bytesLoaded:null,bytesTotal:null,__class__:openfl_events_ProgressEvent});var openfl_events_RenderEvent=function(e,t,i,s,a,r){if(r==null){r=true}if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i);this.objectMatrix=s;this.objectColorTransform=a;this.allowSmoothing=r};$hxClasses["openfl.events.RenderEvent"]=openfl_events_RenderEvent;openfl_events_RenderEvent.__name__=["openfl","events","RenderEvent"];openfl_events_RenderEvent.__super__=openfl_events_Event;openfl_events_RenderEvent.prototype=$extend(openfl_events_Event.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,__class__:openfl_events_RenderEvent});var openfl_events_SecurityErrorEvent=function(e,t,i,s,a){if(a==null){a=0}if(s==null){s=""}if(i==null){i=false}if(t==null){t=false}openfl_events_ErrorEvent.call(this,e,t,i,s,a)};$hxClasses["openfl.events.SecurityErrorEvent"]=openfl_events_SecurityErrorEvent;openfl_events_SecurityErrorEvent.__name__=["openfl","events","SecurityErrorEvent"];openfl_events_SecurityErrorEvent.__super__=openfl_events_ErrorEvent;openfl_events_SecurityErrorEvent.prototype=$extend(openfl_events_ErrorEvent.prototype,{__class__:openfl_events_SecurityErrorEvent});var openfl_events_TimerEvent=function(e,t,i){if(i==null){i=false}if(t==null){t=false}openfl_events_Event.call(this,e,t,i)};$hxClasses["openfl.events.TimerEvent"]=openfl_events_TimerEvent;openfl_events_TimerEvent.__name__=["openfl","events","TimerEvent"];openfl_events_TimerEvent.__super__=openfl_events_Event;openfl_events_TimerEvent.prototype=$extend(openfl_events_Event.prototype,{__class__:openfl_events_TimerEvent});var openfl_events_TouchEvent=function(e,t,i,s,a,r,n,_,o,l,h,c,u,f,p,d,g,m,v,b){if(b==null){b=false}if(g==null){g=0}if(d==null){d=false}if(p==null){p=false}if(f==null){f=false}if(u==null){u=false}if(c==null){c=false}if(l==null){l=0}if(o==null){o=0}if(_==null){_=0}if(n==null){n=0}if(r==null){r=0}if(a==null){a=false}if(s==null){s=0}if(i==null){i=false}if(t==null){t=true}openfl_events_Event.call(this,e,t,i);this.touchPointID=s;this.isPrimaryTouchPoint=a;this.localX=r;this.localY=n;this.sizeX=_;this.sizeY=o;this.pressure=l;this.relatedObject=h;this.ctrlKey=c;this.altKey=u;this.shiftKey=f;this.commandKey=p;this.controlKey=d;this.stageX=NaN;this.stageY=NaN};$hxClasses["openfl.events.TouchEvent"]=openfl_events_TouchEvent;openfl_events_TouchEvent.__name__=["openfl","events","TouchEvent"];openfl_events_TouchEvent.__create=function(e,t,i,s,a,r){var n=new openfl_events_TouchEvent(e,true,false,0,true,a.x,a.y,1,1,1);n.stageX=i;n.stageY=s;n.target=r;return n};openfl_events_TouchEvent.__super__=openfl_events_Event;openfl_events_TouchEvent.prototype=$extend(openfl_events_Event.prototype,{altKey:null,commandKey:null,controlKey:null,ctrlKey:null,isPrimaryTouchPoint:null,localX:null,localY:null,pressure:null,relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,__class__:openfl_events_TouchEvent});var openfl_events_UncaughtErrorEvent=function(e,t,i,s){if(i==null){i=true}if(t==null){t=true}openfl_events_ErrorEvent.call(this,e,t,i);this.error=s};$hxClasses["openfl.events.UncaughtErrorEvent"]=openfl_events_UncaughtErrorEvent;openfl_events_UncaughtErrorEvent.__name__=["openfl","events","UncaughtErrorEvent"];openfl_events_UncaughtErrorEvent.__super__=openfl_events_ErrorEvent;openfl_events_UncaughtErrorEvent.prototype=$extend(openfl_events_ErrorEvent.prototype,{error:null,__class__:openfl_events_UncaughtErrorEvent});var openfl_events_UncaughtErrorEvents=function(){openfl_events_EventDispatcher.call(this)};$hxClasses["openfl.events.UncaughtErrorEvents"]=openfl_events_UncaughtErrorEvents;openfl_events_UncaughtErrorEvents.__name__=["openfl","events","UncaughtErrorEvents"];openfl_events_UncaughtErrorEvents.__super__=openfl_events_EventDispatcher;openfl_events_UncaughtErrorEvents.prototype=$extend(openfl_events_EventDispatcher.prototype,{__class__:openfl_events_UncaughtErrorEvents});var openfl_external_ExternalInterface=function(){};$hxClasses["openfl.external.ExternalInterface"]=openfl_external_ExternalInterface;openfl_external_ExternalInterface.__name__=["openfl","external","ExternalInterface"];openfl_external_ExternalInterface.call=function(functionName,p1,p2,p3,p4,p5){var callResponse=null;if(!new EReg("^\\(.+\\)$","").match(functionName)){var thisArg=functionName.split(".").slice(0,-1).join(".");if(thisArg.length>0){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,i,s){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\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\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,i){if(i==null){i=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(i);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,i,s){var a=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);if(a==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var i=Math.pow(.5,t>>1);openfl_filters_BlurFilter.__blurShader.uRadius.value[0]=this.get_blurX()*i;openfl_filters_BlurFilter.__blurShader.uRadius.value[1]=0}else{var s=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()*s}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\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t\tif (color.a == 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t} else {\n\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a, color.a);\n\n\t\t\t}\n\n\t\t}"}if(this.__glVertexSource==null){this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\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 i=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];i[0]=e[4]/255;i[1]=e[9]/255;i[2]=e[14]/255;i[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,i,s){var a=t.image;var r=e.image;lime__$internal_graphics_ImageCanvasUtil.convertToData(a);lime__$internal_graphics_ImageCanvasUtil.convertToData(r);var n=a.get_data();var _=r.get_data();var o=s.x-i.x|0;var l=s.y-i.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=i.y|0;var x=i.height|0;while(y<x){var w=y++;var k=i.x|0;var P=i.width|0;while(k<P){var C=k++;v=w*h+C*4;b=(w+o)*c+(C+l)*4;switch(u){case 0:g=(n[v]&255)<<24|(n[v+1]&255)<<16|(n[v+2]&255)<<8|n[v+3]&255;break;case 1:g=(n[v+1]&255)<<24|(n[v+2]&255)<<16|(n[v+3]&255)<<8|n[v]&255;break;case 2:g=(n[v+2]&255)<<24|(n[v+1]&255)<<16|(n[v]&255)<<8|n[v+3]&255;break}if(p){if((g&255)!=0&&(g&255)!=255){lime_math__$RGBA_RGBA_$Impl_$.unmult=255/(g&255);g=(lime_math__$RGBA_RGBA_$Impl_$.__clamp[Math.round((g>>>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 M=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|(M&255)<<16|(m>>>8&255&255)<<8|m&255&255;var S=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|(S&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:_[b]=m>>>24&255;_[b+1]=m>>>16&255;_[b+2]=m>>>8&255;_[b+3]=m&255;break;case 1:_[b]=m&255;_[b+1]=m>>>24&255;_[b+2]=m>>>16&255;_[b+3]=m>>>8&255;break;case 2:_[b]=m>>>8&255;_[b+1]=m>>>16&255;_[b+2]=m>>>24&255;_[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__$ConvolutionFilter_ConvolutionShader=function(){};$hxClasses["openfl.filters._ConvolutionFilter.ConvolutionShader"]=openfl_filters__$ConvolutionFilter_ConvolutionShader;openfl_filters__$ConvolutionFilter_ConvolutionShader.__name__=["openfl","filters","_ConvolutionFilter","ConvolutionShader"];openfl_filters__$ConvolutionFilter_ConvolutionShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$ConvolutionFilter_ConvolutionShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{uBias:null,uConvoMatrix:null,uDivisor:null,uPreserveAlpha:null,__class__:openfl_filters__$ConvolutionFilter_ConvolutionShader});var openfl_filters__$DisplacementMapFilter_DisplacementMapShader=function(){};$hxClasses["openfl.filters._DisplacementMapFilter.DisplacementMapShader"]=openfl_filters__$DisplacementMapFilter_DisplacementMapShader;openfl_filters__$DisplacementMapFilter_DisplacementMapShader.__name__=["openfl","filters","_DisplacementMapFilter","DisplacementMapShader"];openfl_filters__$DisplacementMapFilter_DisplacementMapShader.__super__=openfl_filters_BitmapFilterShader;openfl_filters__$DisplacementMapFilter_DisplacementMapShader.prototype=$extend(openfl_filters_BitmapFilterShader.prototype,{mapTextureCoordsOffset:null,mapTexture:null,uOffsets:null,uDisplacements:null,__class__:openfl_filters__$DisplacementMapFilter_DisplacementMapShader});var openfl_filters_DropShadowFilter=function(e,t,i,s,a,r,n,_,o,l,h){if(h==null){h=false}if(l==null){l=false}if(o==null){o=false}if(_==null){_=1}if(n==null){n=1}if(r==null){r=4}if(a==null){a=4}if(s==null){s=1}if(i==null){i=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=i;this.__alpha=s;this.__blurX=a;this.__blurY=r;this.__strength=n;this.__quality=_;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,i,s){var a=this.__color>>16&255;var r=this.__color>>8&255;var n=this.__color&255;var _=new openfl_geom_Point(s.x+this.__offsetX,s.y+this.__offsetY);var o=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),_.__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,n,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,i,s,a,r,n,_){if(_==null){_=false}if(n==null){n=false}if(r==null){r=1}if(a==null){a=2}if(s==null){s=6}if(i==null){i=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(i);this.set_blurY(s);this.__strength=a;this.set_quality(r);this.__inner=n;this.__knockout=_;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,i,s){var a=this.__color>>16&255;var r=this.__color>>8&255;var n=this.__color&255;var _=lime__$internal_graphics_ImageDataUtil.gaussianBlur(e.image,t.image,i.__toLimeRectangle(),s.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);_.colorTransform(_.get_rect(),new openfl_geom_ColorTransform(0,0,0,this.__alpha,a,r,n,0).__toLimeColorMatrix());if(_==e.image){return e}return t},__initShader:function(e,t){if(t<=this.__horizontalPasses){var i=Math.pow(.5,t>>1);openfl_filters_GlowFilter.__glowShader.uRadius.value[0]=this.get_blurX()*i;openfl_filters_GlowFilter.__glowShader.uRadius.value[1]=0}else{var s=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()*s}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 i=this.rawData.get(4);var s=this.rawData.get(8);var a=this.rawData.get(12);var r=this.rawData.get(1);var n=this.rawData.get(5);var _=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 w=e.rawData.get(5);var k=e.rawData.get(9);var P=e.rawData.get(13);var C=e.rawData.get(2);var T=e.rawData.get(6);var M=e.rawData.get(10);var S=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*w+l*k+f*P);this.rawData.set(2,t*C+r*T+l*M+f*S);this.rawData.set(3,t*$+r*E+l*B+f*L);this.rawData.set(4,i*m+n*v+h*b+p*y);this.rawData.set(5,i*x+n*w+h*k+p*P);this.rawData.set(6,i*C+n*T+h*M+p*S);this.rawData.set(7,i*$+n*E+h*B+p*L);this.rawData.set(8,s*m+_*v+c*b+d*y);this.rawData.set(9,s*x+_*w+c*k+d*P);this.rawData.set(10,s*C+_*T+c*M+d*S);this.rawData.set(11,s*$+_*E+c*B+d*L);this.rawData.set(12,a*m+o*v+u*b+g*y);this.rawData.set(13,a*x+o*w+u*k+g*P);this.rawData.set(14,a*C+o*T+u*M+g*S);this.rawData.set(15,a*$+o*E+u*B+g*L)},appendTranslation:function(e,t,i){var s=this.rawData;s.set(12,s.get(12)+e);var a=this.rawData;a.set(13,a.get(13)+t);var r=this.rawData;r.set(14,r.get(14)+i)},copyRawDataFrom:function(e,t,i){if(i==null){i=false}if(t==null){t=0}if(i){this.transpose()}var s=e.get_length()-t;var a=0;var r=s;while(a<r){var n=a++;this.rawData.set(n,e.get(n+t))}if(i){this.transpose()}},identity:function(){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])},transpose:function(){var e=this.rawData.copy();this.rawData.set(1,e.get(4));this.rawData.set(2,e.get(8));this.rawData.set(3,e.get(12));this.rawData.set(4,e.get(1));this.rawData.set(6,e.get(9));this.rawData.set(7,e.get(13));this.rawData.set(8,e.get(2));this.rawData.set(9,e.get(6));this.rawData.set(11,e.get(14));this.rawData.set(12,e.get(3));this.rawData.set(13,e.get(7));this.rawData.set(14,e.get(11))},__class__:openfl_geom_Matrix3D};var openfl_geom_Point=function(e,t){if(t==null){t=0}if(e==null){e=0}this.x=e;this.y=t};$hxClasses["openfl.geom.Point"]=openfl_geom_Point;openfl_geom_Point.__name__=["openfl","geom","Point"];openfl_geom_Point.distance=function(e,t){var i=e.x-t.x;var s=e.y-t.y;return Math.sqrt(i*i+s*s)};openfl_geom_Point.interpolate=function(e,t,i){return new openfl_geom_Point(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))};openfl_geom_Point.polar=function(e,t){return new openfl_geom_Point(e*Math.cos(t),e*Math.sin(t))};openfl_geom_Point.prototype={x:null,y:null,clone:function(){return new openfl_geom_Point(this.x,this.y)},copyFrom:function(e){this.x=e.x;this.y=e.y},setTo:function(e,t){this.x=e;this.y=t},__toLimeVector2:function(){if(openfl_geom_Point.__limeVector2==null){openfl_geom_Point.__limeVector2=new lime_math_Vector2}var e=openfl_geom_Point.__limeVector2;e.x=this.x;e.y=this.y;return openfl_geom_Point.__limeVector2},__class__:openfl_geom_Point};var openfl_geom_Transform=function(e){this.__colorTransform=new openfl_geom_ColorTransform;this.concatenatedColorTransform=new openfl_geom_ColorTransform;this.pixelBounds=new openfl_geom_Rectangle;this.__displayObject=e;this.__hasMatrix=true};$hxClasses["openfl.geom.Transform"]=openfl_geom_Transform;openfl_geom_Transform.__name__=["openfl","geom","Transform"];openfl_geom_Transform.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(e){if(!this.__colorTransform.__equals(e,false)){this.__colorTransform.__copyFrom(e);if(e!=null){this.__displayObject.set_alpha(e.alphaMultiplier)}var t=this.__displayObject;if(!t.__renderDirty){t.__renderDirty=true;t.__setParentRenderDirty()}}return this.__colorTransform},get_matrix:function(){if(this.__hasMatrix){return this.__displayObject.__transform.clone()}return null},set_matrix:function(e){if(e==null){this.__hasMatrix=false;return null}this.__hasMatrix=true;this.__hasMatrix3D=false;if(this.__displayObject!=null){this.__setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty)}return e},__setTransform:function(e,t,i,s,a,r){if(this.__displayObject!=null){var n=0;var _=0;if(t==0){n=e}else{n=Math.sqrt(e*e+t*t)}if(i==0){_=e}else{_=Math.sqrt(i*i+s*s)}this.__displayObject.__scaleX=n;this.__displayObject.__scaleY=_;var o=180/Math.PI*Math.atan2(s,i)-90;if(o!=this.__displayObject.__rotation){this.__displayObject.__rotation=o;var l=o*(Math.PI/180);this.__displayObject.__rotationSine=Math.sin(l);this.__displayObject.__rotationCosine=Math.cos(l)}this.__displayObject.__transform.a=e;this.__displayObject.__transform.b=t;this.__displayObject.__transform.c=i;this.__displayObject.__transform.d=s;this.__displayObject.__transform.tx=a;this.__displayObject.__transform.ty=r;this.__displayObject.__setTransformDirty()}},__class__:openfl_geom_Transform,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var openfl_geom_Vector3D=function(){};$hxClasses["openfl.geom.Vector3D"]=openfl_geom_Vector3D;openfl_geom_Vector3D.__name__=["openfl","geom","Vector3D"];openfl_geom_Vector3D.prototype={__class__:openfl_geom_Vector3D};var openfl_media_ID3Info=function(){};$hxClasses["openfl.media.ID3Info"]=openfl_media_ID3Info;openfl_media_ID3Info.__name__=["openfl","media","ID3Info"];openfl_media_ID3Info.prototype={__class__:openfl_media_ID3Info};var openfl_media_Sound=function(e,t){openfl_events_EventDispatcher.call(this,this);this.bytesLoaded=0;this.bytesTotal=0;this.isBuffering=false;this.url=null;if(e!=null){this.load(e,t)}};$hxClasses["openfl.media.Sound"]=openfl_media_Sound;openfl_media_Sound.__name__=["openfl","media","Sound"];openfl_media_Sound.__super__=openfl_events_EventDispatcher;openfl_media_Sound.prototype=$extend(openfl_events_EventDispatcher.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__buffer:null,close:function(){if(this.__buffer!=null){this.__buffer.dispose();this.__buffer=null}},load:function(e,t){var i=this;this.url=e.url;var s=lime_utils_Assets.getLibrary("default");var a;if(s!=null){var r=this.url;var n=s.cachedAudioBuffers;if(__map_reserved[r]!=null){a=n.existsReserved(r)}else{a=n.h.hasOwnProperty(r)}}else{a=false}if(a){var _=this.url;var o=s.cachedAudioBuffers;this.AudioBuffer_onURLLoad(__map_reserved[_]!=null?o.getReserved(_):o.h[_])}else{lime_media_AudioBuffer.loadFromFile(this.url).onComplete($bind(this,this.AudioBuffer_onURLLoad)).onError(function(e){i.AudioBuffer_onURLLoad(null)})}},play:function(e,t,i){if(t==null){t=0}if(e==null){e=0}if(this.__buffer==null||openfl_media_SoundMixer.__soundChannels.length>=32){return null}if(i==null){i=new openfl_media_SoundTransform}else{i=i.clone()}var s=openfl_media_SoundMixer.__soundTransform.pan+i.pan;if(s>1){s=1}if(s<-1){s=-1}var a=openfl_media_SoundMixer.__soundTransform.volume*i.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 n=r.get_position();n.x=s;n.z=-1*Math.sqrt(1-Math.pow(s,2));r.set_position(n);return new openfl_media_SoundChannel(r,i)},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.__source=null;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 i=openfl_media_SoundMixer.__soundTransform.volume*this.__soundTransform.volume;if(this.__isValid){this.__source.set_gain(i);var s=this.__source.get_position();s.x=t;s.z=-1*Math.sqrt(1-Math.pow(t,2));this.__source.set_position(s);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,i,s,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,i){if(i==null){i=false}var s=[" ","~","%","&","\\",";",":",'"',"'",",","<",">","?","#"];var a=true;if(e==null||e==""){a=false}else{var r=0;while(r<s.length){var n=s[r];++r;if(e.indexOf(n)>-1){a=false;break}}}if(!a){throw new js__$Boot_HaxeError(new openfl_errors_Error("Error #2134: Cannot create SharedObject."))}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 _=t+"/"+e;var o=openfl_net_SharedObject.__sharedObjects;if(!(__map_reserved[_]!=null?o.existsReserved(_):o.h.hasOwnProperty(_))){var l=null;try{var h=js_Browser.getLocalStorage();if(t==null){if(h!=null){l=h.getItem(window.location.href+":"+e);h.removeItem(window.location.href+":"+e)}t=window.location.pathname}if(h!=null&&l==null){l=h.getItem(t+":"+e)}}catch(e){haxe_CallStack.lastException=e}var c=new openfl_net_SharedObject;c.data={};c.__localPath=t;c.__name=e;if(l!=null&&l!=""){try{var u=new haxe_Unserializer(l);u.setResolver({resolveEnum:Type.resolveEnum,resolveClass:openfl_net_SharedObject.__resolveClass});c.data=u.unserialize()}catch(e){haxe_CallStack.lastException=e}}var f=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[_]!=null){f.setReserved(_,c)}else{f.h[_]=c}}var p=openfl_net_SharedObject.__sharedObjects;if(__map_reserved[_]!=null){return p.getReserved(_)}else{return p.h[_]}};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 i=new haxe_ds__$StringMap_StringMapIterator(t,t.arrayKeys());while(i.hasNext()){var s=i.next();s.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 i=js_Browser.getLocalStorage();if(i!=null){i.removeItem(this.__localPath+":"+this.__name);i.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 i=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){i.__dispatchStatus();i.data=e;var t=new openfl_events_Event("complete");i.dispatchEvent(t)})}else{var s=new lime_net__$HTTPRequest_$String;this.__prepareRequest(s,e);s.load().onProgress($bind(this,this.httpRequest_onProgress)).onError($bind(this,this.httpRequest_onError)).onComplete(function(e){i.__dispatchStatus();i.data=e;var t=new openfl_events_Event("complete");i.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 i=0;var s=this.__httpRequest.responseHeaders;while(i<s.length){var a=s[i];++i;t.push(new openfl_net_URLRequestHeader(a.name,a.value))}}e.responseHeaders=t;this.dispatchEvent(e)},__prepareRequest:function(e,t){this.__httpRequest=e;this.__httpRequest.uri=t.url;this.__httpRequest.method=t.method;if(t.data!=null){if(Type["typeof"](t.data)==ValueType.TObject){var i=Reflect.fields(t.data);var s=0;while(s<i.length){var a=i[s];++s;var r=this.__httpRequest.formData;var n=Reflect.field(t.data,a);if(__map_reserved[a]!=null){r.setReserved(a,n)}else{r.h[a]=n}}}else if(js_Boot.__instanceof(t.data,haxe_io_Bytes)){this.__httpRequest.data=t.data}else{this.__httpRequest.data=haxe_io_Bytes.ofString(Std.string(t.data))}}this.__httpRequest.contentType=t.contentType;if(t.requestHeaders!=null){var _=0;var o=t.requestHeaders;while(_<o.length){var l=o[_];++_;this.__httpRequest.headers.push(new lime_net_HTTPRequestHeader(l.name,l.value))}}this.__httpRequest.followRedirects=t.followRedirects;this.__httpRequest.timeout=t.idleTimeout|0;this.__httpRequest.withCredentials=t.manageCookies;var h=t.userAgent;if(h==null){h="Mozilla/5.0 (Windows; U; en) AppleWebKit/420+ (KHTML, like Gecko) OpenFL/1.0"}this.__httpRequest.userAgent=t.userAgent;this.__httpRequest.enableResponseHeaders=true},httpRequest_onError:function(e){this.__dispatchStatus();if(e==403){var t=new openfl_events_SecurityErrorEvent("securityError");t.text=Std.string(e);this.dispatchEvent(t)}else{var i=new openfl_events_IOErrorEvent("ioError");i.text=Std.string(e);this.dispatchEvent(i)}},httpRequest_onProgress:function(e,t){var i=new openfl_events_ProgressEvent("progress");i.bytesLoaded=e;i.bytesTotal=t;this.dispatchEvent(i)},__class__:openfl_net_URLLoader});var openfl_net_URLRequest=function(e){if(e!=null){this.url=e}this.contentType=null;this.followRedirects=openfl_net_URLRequestDefaults.followRedirects;if(openfl_net_URLRequestDefaults.idleTimeout>0){this.idleTimeout=openfl_net_URLRequestDefaults.idleTimeout}else{this.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 i=e.window.get_display();if(i!=null){t=Math.ceil(i.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 i=e.window.get_display();if(i!=null){t=Math.ceil(i.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,i,s,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 i=this.__textEngine.layoutGroups;while(t<i.get_length()){var s=i.get(t);++t;if(s.startIndex<=e&&s.endIndex>=e){return s.lineIndex}}return-1},getLineOffset:function(e){this.__updateLayout();if(e<0||e>this.__textEngine.numLines-1){return-1}var t=0;var i=this.__textEngine.layoutGroups;while(t<i.get_length()){var s=i.get(t);++t;if(s.lineIndex==e){return s.startIndex}}return 0},replaceSelectedText:function(e){this.__replaceSelectedText(e,false)},replaceText:function(e,t,i){this.__replaceText(e,t,i,false)},setSelection:function(e,t){this.__selectionIndex=e;this.__caretIndex=t;this.__stopCursorTimer();this.__startCursorTimer()},setTextFormat:function(e,t,i){if(i==null){i=0}if(t==null){t=0}var s=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.get_text());var a;if(t<0){t=0}if(i<0){i=0}if(i==0){if(t==0){i=s}else{i=t+1}}if(i<t){return}if(t==0&&i>=s){this.__textFormat.__merge(e);var r=0;var n=this.__textEngine.textFormatRanges.get_length();while(r<n){var _=r++;a=this.__textEngine.textFormatRanges.get(_);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==i){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<=i){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<f){var p=u++;a=this.__textEngine.textFormatRanges.get(p);if(a.end>=t){h=a;break}}}if(i<s){var d=this.__textEngine.textFormatRanges.get_length();while(--d>=0){a=this.__textEngine.textFormatRanges.get(d);if(a.start<=i){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=i}var g=this.__textFormat.clone();g.__merge(e);this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(g,t,i));this.__textEngine.textFormatRanges.sort(function(e,t){if(e.start<t.start||e.end<t.end){return-1}else if(e.start>t.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.__caretIndex<this.__selectionIndex){this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))}else{this.__selectionIndex=this.getLineOffset(this.getLineIndexOfChar(this.__selectionIndex))}},__caretEndOfLine:function(){var e;if(this.__selectionIndex==this.__caretIndex){e=this.getLineIndexOfChar(this.__caretIndex)}else{e=this.getLineIndexOfChar(Math.max(this.__caretIndex,this.__selectionIndex)|0)}if(e<this.__textEngine.numLines-1){this.__caretIndex=this.getLineOffset(e+1)-1}else{this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}},__caretNextCharacter:function(){if(this.__caretIndex<lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){this.__caretIndex++}},__caretNextLine:function(e,t){if(e==null){e=this.getLineIndexOfChar(this.__caretIndex)}if(e<this.__textEngine.numLines-1){if(t==null){t=this.__caretIndex}this.__caretIndex=this.__getCharIndexOnDifferentLine(t,e+1)}else{this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}},__caretPreviousCharacter:function(){if(this.__caretIndex>0){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 i=this.__getGroup(this.get_mouseX(),this.get_mouseY(),true);if(i!=null){var s=i.format.url;if(s!=null&&s!=""){if(StringTools.startsWith(s,"event:")){this.dispatchEvent(new openfl_events_TextEvent("link",false,false,HxOverrides.substr(s,6,null)))}else{openfl_Lib.getURL(new openfl_net_URLRequest(s))}}}}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 i=new openfl_text_TextFormat;if(t.color!=null){i.color=t.color&16777215}i.size=Math.round(t.fontHeight/20);var s=e.symbols.h[t.fontID];if(s!=null){i.__ascent=s.ascent/20/1024;i.__descent=s.descent/20/1024}i.font=t.fontName;var a=false;var r=i.font;if(r==null){a=true}else{switch(r){case"":case"_sans":case"_serif":case"_typewriter":a=true;break;default:var n=0;var _=openfl_text_Font.enumerateFonts();while(n<_.length){var o=_[n];++n;if(o.name==i.font){a=true;break}}}}if(!a){var l=new RegExp("[^a-zA-Z]+","g".split("u").join(""));var h=0;var c=openfl_text_Font.enumerateFonts();while(h<c.length){var u=c[h];++h;if(HxOverrides.substr(u.name.replace(l,""),0,t.fontName.length)==t.fontName){i.font=u.name;a=true;break}}}if(a){this.set_embedFonts(true)}else{var f=i.font;var p=openfl_text_TextField.__missingFontWarning;if(!(__map_reserved[f]!=null?p.existsReserved(f):p.h.hasOwnProperty(f))){var d=i.font;var g=openfl_text_TextField.__missingFontWarning;if(__map_reserved[d]!=null){g.setReserved(d,true)}else{g.h[d]=true}lime_utils_Log.warn('Could not find required font "'+i.font+'", it has not been embedded',{fileName:"TextField.hx",lineNumber:1771,className:"openfl.text.TextField",methodName:"__fromSymbol"})}}if(t.align!=null){if(t.align=="center"){i.align=0}else if(t.align=="right"){i.align=4}else if(t.align=="justify"){i.align=2}i.leftMargin=t.leftMargin/20|0;i.rightMargin=t.rightMargin/20|0;i.indent=t.indent/20|0;i.leading=t.leading/20|0}this.set_defaultTextFormat(i);if(t.text!=null){if(t.html){this.set_htmlText(t.text)}else{this.set_text(t.text)}}},__getBounds:function(e,t){this.__updateLayout();var i=openfl_geom_Rectangle.__pool.get();i.copyFrom(this.__textEngine.bounds);t.tx+=this.__offsetX;t.ty+=this.__offsetY;i.__transform(i,t);e.__expand(i.x,i.y,i.width,i.height);openfl_geom_Rectangle.__pool.release(i)},__getCharBoundaries:function(e,t){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)-1){return false}this.__updateLayout();var i=0;var s=this.__textEngine.layoutGroups;while(i<s.get_length()){var a=s.get(i);++i;if(e>=a.startIndex&&e<=a.endIndex){try{var r=a.offsetX;var n=0;var _=e-a.startIndex;while(n<_){var o=n++;r+=a.positions[o]}var l=a.positions[e-a.startIndex];t.setTo(r,a.offsetY,l,a.ascent+a.descent);return true}catch(e){haxe_CallStack.lastException=e}}}return false},__getCharIndexOnDifferentLine:function(e,t){if(e<0||e>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){return-1}if(t<0||t>this.__textEngine.numLines-1){return-1}var i=null;var s=null;var a=0;var r=this.__textEngine.layoutGroups;while(a<r.get_length()){var n=r.get(a);++a;if(e>=n.startIndex&&e<=n.endIndex){i=n.offsetX;var _=0;var o=e-n.startIndex;while(_<o){var l=_++;i+=n.positions[l]}if(s!=null){return this.__getPosition(i,s)}}if(n.lineIndex==t){s=n.offsetY+n.height/2;var h=0;var c=this.get_scrollV()-1;while(h<c){var u=h++;s-=this.__textEngine.lineHeights.get(u)}if(i!=null){return this.__getPosition(i,s)}}}return-1},__getCursor:function(){var e=this.__getGroup(this.get_mouseX(),this.get_mouseY(),true);if(e!=null&&e.format.url!=""){return"button"}else if(this.__textEngine.selectable){return"ibeam"}return null},__getGroup:function(e,t,i){if(i==null){i=false}this.__updateLayout();e+=this.get_scrollH();var s=0;var a=this.get_scrollV()-1;while(s<a){var r=s++;t+=this.__textEngine.lineHeights.get(r)}if(!i&&t>this.__textEngine.textHeight){t=this.__textEngine.textHeight}var n=true;var _;var o;var l=0;var h=this.__textEngine.layoutGroups.get_length();while(l<h){var c=l++;_=this.__textEngine.layoutGroups.get(c);if(c<this.__textEngine.layoutGroups.get_length()-1){o=this.__textEngine.layoutGroups.get(c+1)}else{o=null}if(n){if(t<_.offsetY){t=_.offsetY}if(e<_.offsetX){e=_.offsetX}n=false}if(t>=_.offsetY&&t<=_.offsetY+_.height||!i&&o==null){if(e>=_.offsetX&&e<=_.offsetX+_.width||!i&&(o==null||o.lineIndex!=_.lineIndex)){return _}}}return null},__getPosition:function(e,t){var i=this.__getGroup(e,t);if(i==null){return lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var s=0;var a=0;var r=i.positions.length;while(a<r){var n=a++;s+=i.positions[n];if(e<=i.offsetX+s){if(e<=i.offsetX+(s-i.positions[n])+i.positions[n]/2){return i.startIndex+n}else if(i.startIndex+n<i.endIndex){return i.startIndex+n+1}else{return i.endIndex}}}return i.endIndex},__hitTest:function(e,t,i,s,a,r){if(!r.get_visible()||this.__isMask||a&&!this.mouseEnabled){return false}if(this.get_mask()!=null&&!this.get_mask().__hitTestMask(e,t)){return false}this.__getRenderTransform();this.__updateLayout();var n=this.__renderTransform;var _=n.a*n.d-n.b*n.c;var o=_==0?-n.tx:1/_*(n.c*(n.ty-t)+n.d*(e-n.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(this.__textEngine.bounds.contains(o,c)){if(s!=null){s.push(r)}return true}return false},__hitTestMask:function(e,t){this.__getRenderTransform();this.__updateLayout();var i=this.__renderTransform;var s=i.a*i.d-i.b*i.c;var a=s==0?-i.tx:1/s*(i.c*(i.ty-t)+i.d*(e-i.tx));var r=this.__renderTransform;var n=r.a*r.d-r.b*r.c;var _=n==0?-r.ty:1/n*(r.a*(t-r.ty)+r.b*(r.tx-e));if(this.__textEngine.bounds.contains(a,_)){return true}return false},__renderCanvas:function(e){if(e.__isDOM&&!this.__renderedOnCanvasWhileOnDOM){this.__renderedOnCanvasWhileOnDOM=true;if(this.get_type()==1){this.replaceText(0,lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text),this.__text)}if(this.__isHTML){this.__updateText(openfl__$internal_formats_html_HTMLParser.parse(this.__text,this.__textFormat,this.__textEngine.textFormatRanges))}this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}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 i=e.__getAlpha(t.__worldAlpha);if(i>0&&t.__bitmapData!=null&&t.__bitmapData.__isValid&&t.__bitmapData.readable){var s=e.context;e.__setBlendMode(t.__worldBlendMode);e.__pushMaskObject(t,false);lime__$internal_graphics_ImageCanvasUtil.convertToCanvas(t.__bitmapData.image);s.globalAlpha=i;var a=t.__scrollRect;e.setTransform(t.__renderTransform,s);if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=false}if(a==null){s.drawImage(t.__bitmapData.image.get_src(),0,0,t.__bitmapData.image.width,t.__bitmapData.image.height)}else{s.drawImage(t.__bitmapData.image.get_src(),a.x,a.y,a.width,a.height)}if(!e.__allowSmoothing||!t.smoothing){s.imageSmoothingEnabled=true}e.__popMaskObject(t,false)}}}else{var r=this.__worldTransform;var n=this.__textEngine;var _=n.background||n.border?n.bounds:n.textBounds;var o=this.__graphics;if(this.__dirty){this.__updateLayout();if(o.__bounds==null){o.__bounds=new openfl_geom_Rectangle}o.__bounds.copyFrom(_)}o.__update(e.__worldTransform);if(this.__dirty||o.__softwareDirty){var l=o.__width;var h=o.__height;if((n.text==null||lime_text__$UTF8String_UTF8String_$Impl_$.equals(n.text,""))&&!n.background&&!n.border&&!n.__hasFocus&&(n.type!=1||!n.selectable)||(n.width<=0||n.height<=0)&&n.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(n.text!=null&&n.text!=""||n.__hasFocus){var p=n.text;if(!e.__allowSmoothing||n.antiAliasType==0&&n.sharpness==400){o.__context.imageSmoothingEnabled=false}else{o.__context.imageSmoothingEnabled=true}if(n.border||n.background){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,_.width-1,_.height-1);if(n.background){var d=StringTools.hex(n.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+d;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;var g=StringTools.hex(n.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(b<y){var x=b++;v-=n.lineHeights.get(x)}var w;var k=0;var P=n.layoutGroups;while(k<P.get_length()){var C=P.get(k);++k;if(C.lineIndex<this.get_scrollV()-1){continue}if(C.lineIndex>this.get_scrollV()+n.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-_.x,C.offsetY+C.ascent+v-_.y);if(this.__caretIndex>-1&&n.selectable){if(this.__selectionIndex==this.__caretIndex){if(this.__showCursor&&C.startIndex<=this.__caretIndex&&C.endIndex>=this.__caretIndex){w=0;var M=0;var S=this.__caretIndex-C.startIndex;while(M<S){var $=M++;if(C.positions.length<=$){break}w+=C.positions[$]}var E=0;var B=this.get_scrollV();var L=C.lineIndex+1;while(B<L){var R=B++;E+=n.lineHeights.get(R-1)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var A=StringTools.hex(C.format.color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+A;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(C.offsetX+w-this.get_scrollH()-_.x,E+2-_.y);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(C.offsetX+w-this.get_scrollH()-_.x,E+openfl__$internal_text_TextEngine.getFormatHeight(this.get_defaultTextFormat())-1-_.y);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}else if(C.startIndex<=this.__caretIndex&&C.endIndex>=this.__caretIndex||C.startIndex<=this.__selectionIndex&&C.endIndex>=this.__selectionIndex||C.startIndex>this.__caretIndex&&C.endIndex<this.__selectionIndex||C.startIndex>this.__selectionIndex&&C.endIndex<this.__caretIndex){var I=Math.min(this.__selectionIndex,this.__caretIndex)|0;var D=Math.max(this.__selectionIndex,this.__caretIndex)|0;if(C.startIndex>I){I=C.startIndex}if(C.endIndex<D){D=C.endIndex}var F;var O;F=this.getCharBoundaries(I);if(D>=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(n.text)){O=this.getCharBoundaries(lime_text__$UTF8String_UTF8String_$Impl_$.get_length(n.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 j=C.offsetX+m-_.x;var G=Math.floor(C.offsetY+v+C.ascent-_.y)+.5;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(j,G);openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(j+C.width,G);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}}else{if(n.border||n.background){if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.rect(.5,.5,_.width-1,_.height-1)}else{openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,_.width,_.height)}if(n.background){var H=StringTools.hex(n.backgroundColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle="#"+H;openfl__$internal_renderer_canvas_CanvasTextField.context.fill()}if(n.border){openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap="square";var U=StringTools.hex(n.borderColor&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+U;openfl__$internal_renderer_canvas_CanvasTextField.context.stroke()}}if(this.__caretIndex>-1&&n.selectable&&this.__showCursor){var N=-this.get_scrollH();var W=0;var V=0;var z=this.get_scrollV()-1;while(V<z){var X=V++;W+=n.lineHeights.get(X)}openfl__$internal_renderer_canvas_CanvasTextField.context.beginPath();var Y=StringTools.hex(this.get_defaultTextFormat().color&16777215,6);openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle="#"+Y;openfl__$internal_renderer_canvas_CanvasTextField.context.moveTo(N+2.5,W+2.5);openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth=1;openfl__$internal_renderer_canvas_CanvasTextField.context.lineTo(N+2.5,W+openfl__$internal_text_TextEngine.getFormatHeight(this.get_defaultTextFormat())-1);openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();openfl__$internal_renderer_canvas_CanvasTextField.context.closePath()}}o.__bitmap=openfl_display_BitmapData.fromCanvas(this.__graphics.__canvas);o.__visible=true;this.__dirty=false;o.__softwareDirty=false;o.set___dirty(false)}}var J=false;if(this.__textEngine.antiAliasType==0&&this.__textEngine.gridFitType==1){J=e.context.imageSmoothingEnabled;if(J){e.context.imageSmoothingEnabled=false}}if(!(this.opaqueBackground==null&&this.__graphics==null)){if(!!this.__renderable){var K=e.__getAlpha(this.__worldAlpha);if(!(K<=0)){if(this.opaqueBackground!=null&&!this.__isCacheBitmapRender&&this.get_width()>0&&this.get_height()>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);var q=e.context;e.setTransform(this.__renderTransform,q);var Z=this.opaqueBackground;q.fillStyle="rgb("+(Z>>>16&255)+","+(Z>>>8&255)+","+(Z&255)+")";q.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.__width;var ie=ee.__height;var se=ee.__canvas;if(se!=null&&ee.__visible&&te>=1&&ie>=1){var ae=ee.__worldTransform;var re=e.context;var ne=this.__scrollRect;var _e=this.__worldScale9Grid;if(ne==null||ne.width>0&&ne.height>0){e.__setBlendMode(this.__worldBlendMode);e.__pushMaskObject(this);re.globalAlpha=Q;if(_e!=null&&ae.b==0&&ae.c==0){re.setTransform(1,0,0,1,ae.tx,ae.ty);var oe=ee.__bounds;var le=ee.__renderTransform.a;var he=ee.__renderTransform.d;var ce=ae.a;var ue=ae.d;var fe=Math.round(_e.x*le);var pe=Math.round(_e.y*he);var de=Math.round((oe.get_right()-_e.get_right())*le);var ge=Math.round((oe.get_bottom()-_e.get_bottom())*he);var me=Math.round(_e.width*le);var ve=Math.round(_e.height*he);var be=Math.round(_e.x*ce);var ye=Math.round(_e.y*ue);var xe=Math.round((oe.get_right()-_e.get_right())*ce);var we=Math.round((oe.get_bottom()-_e.get_bottom())*ue);var ke=Math.round(te*ce)-be-xe;var Pe=Math.round(ie*ue)-ye-we;e.applySmoothing(re,false);if(me!=0&&ve!=0){re.drawImage(se,0,0,fe,pe,0,0,be,ye);re.drawImage(se,fe,0,me,pe,be,0,ke,ye);re.drawImage(se,fe+me,0,de,pe,be+ke,0,xe,ye);re.drawImage(se,0,pe,fe,ve,0,ye,be,Pe);re.drawImage(se,fe,pe,me,ve,be,ye,ke,Pe);re.drawImage(se,fe+me,pe,de,ve,be+ke,ye,xe,Pe);re.drawImage(se,0,pe+ve,fe,ge,0,ye+Pe,be,we);re.drawImage(se,fe,pe+ve,me,ge,be,ye+Pe,ke,we);re.drawImage(se,fe+me,pe+ve,de,ge,be+ke,ye+Pe,xe,we)}else if(me==0&&ve!=0){var Ce=be+ke+xe;re.drawImage(se,0,0,te,pe,0,0,Ce,ye);re.drawImage(se,0,pe,te,ve,0,ye,Ce,Pe);re.drawImage(se,0,pe+ve,te,ge,0,ye+Pe,Ce,we)}else if(ve==0&&me!=0){var Te=ye+Pe+we;re.drawImage(se,0,0,fe,ie,0,0,be,Te);re.drawImage(se,fe,0,me,ie,be,0,ke,Te);re.drawImage(se,fe+me,0,de,ie,be+ke,0,xe,Te)}}else{e.setTransform(ae,re);if(e.__isDOM){var Me=1/e.pixelRatio;re.scale(Me,Me)}re.drawImage(se,0,0,te,ie)}e.__popMaskObject(this)}}}}}}}}}if(J){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 i=this;var s=i.__textEngine;if(i.stage!=null&&i.__worldVisible&&i.__renderable){if(i.__dirty||i.__renderTransformChanged||i.__div==null){if(s.text!=""||s.background||s.border||s.type==1){if(i.__div==null){i.__div=window.document.createElement("div");e.__initializeElement(i,i.__div);i.__style.setProperty("outline","none",null);i.__div.addEventListener("input",function(e){e.preventDefault();if(i.get_htmlText()!=i.__div.innerHTML){i.set_htmlText(i.__div.innerHTML);var t=i.__displayAsPassword;i.__dirty=false}},true)}if(!s.wordWrap){i.__style.setProperty("white-space","nowrap",null)}else{i.__style.setProperty("word-wrap","break-word",null)}i.__style.setProperty("overflow","hidden",null);if(s.selectable){i.__style.setProperty("cursor","text",null);i.__style.setProperty("-webkit-user-select","text",null);i.__style.setProperty("-moz-user-select","text",null);i.__style.setProperty("-ms-user-select","text",null);i.__style.setProperty("-o-user-select","text",null)}else{i.__style.setProperty("cursor","inherit",null)}var a=i.__div;a.contentEditable=s.type==1;var r=i.__style;if(s.background){r.setProperty("background-color","#"+StringTools.hex(s.backgroundColor&16777215,6),null)}else{r.removeProperty("background-color")}var n=s.width;var _=s.height;var o=1;var l=i.__textFormat.size;var h=l;var c=i.__renderTransform;if(c.a!=1||c.d!=1){if(c.a==c.d){o=c.a;c.a=c.d=1}else if(c.a>c.d){o=c.a;c.d/=c.a;c.a=1}else{o=c.d;c.a/=c.d;c.d=1}h*=o;n=Math.ceil(n*o);_=Math.ceil(_*o)}i.__textFormat.size=h;var u=s.text;var f=0;if(!i.__isHTML){u=StringTools.htmlEscape(u)}else{var p=u;while(openfl__$internal_renderer_dom_DOMTextField.__regexFont.match(p)){var d=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matched(0);var g="";if(openfl__$internal_renderer_dom_DOMTextField.__regexFace.match(d)){g+="font-family:'"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexFace)+"';"}if(openfl__$internal_renderer_dom_DOMTextField.__regexColor.match(d)){g+="color:#"+openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexColor)+";"}if(openfl__$internal_renderer_dom_DOMTextField.__regexSize.match(d)){var m=openfl__$internal_renderer_dom_DOMTextField.__getAttributeMatch(openfl__$internal_renderer_dom_DOMTextField.__regexSize);var v=HxOverrides.cca(m,0);var b;f=parseFloat(m)*o;if(v==43||v==45){b=h+f}else{b=f}g+="font-size:"+b+"px;"}u=StringTools.replace(u,d,"<span style='"+g+"'>");p=openfl__$internal_renderer_dom_DOMTextField.__regexFont.matchedRight()}u=u.replace(openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont.r,"</span>")}u=StringTools.replace(u,"<p ","<p style='margin-top:0; margin-bottom:0;' ");var y=i.__textFormat.leading;i.__textFormat.leading+=f|0;var x=new RegExp("\r\n","g".split("u").join(""));var w=u.replace(x,"<br>");i.__div.innerHTML=w;var k=new RegExp("\n","g".split("u").join(""));var P=i.__div.innerHTML.replace(k,"<br>");i.__div.innerHTML=P;var C=new RegExp("\r","g".split("u").join(""));var T=i.__div.innerHTML.replace(C,"<br>");i.__div.innerHTML=T;r.setProperty("font",openfl__$internal_text_TextEngine.getFont(i.__textFormat),null);i.__textFormat.size=l;i.__textFormat.leading=y;r.setProperty("top","3px",null);if(s.border){r.setProperty("border","solid 1px #"+StringTools.hex(s.borderColor&16777215,6),null);i.__renderTransform.translate(-1,-1);i.__renderTransformChanged=true;i.__transformDirty=true}else if(r.border!=""){r.removeProperty("border");i.__renderTransformChanged=true}r.setProperty("color","#"+StringTools.hex(i.__textFormat.color&16777215,6),null);r.setProperty("width",n+"px",null);r.setProperty("height",_+"px",null);var M=i.__textFormat.align;switch(M){case 0:r.setProperty("text-align","center",null);break;case 4:r.setProperty("text-align","right",null);break;default:r.setProperty("text-align","left",null)}i.__dirty=false}else if(i.__div!=null){e.element.removeChild(i.__div);i.__div=null}}if(i.__div!=null){var S=e.__roundPixels;e.__roundPixels=true;e.__updateClip(i);e.__applyStyle(i,true,true,true);e.__roundPixels=S}}else{openfl__$internal_renderer_dom_DOMTextField.clear(i,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{openfl__$internal_renderer_context3D_Context3DTextField.render(this,e);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 i=openfl_geom_Rectangle.__pool.get();i.setTo(0,0,this.get_width(),this.get_height());e.__pushMaskRect(i,this.__renderTransform);var s=this.opaqueBackground;t.clear((s>>>16&255)/255,(s>>>8&255)/255,(s&255)/255,1,0,0,1);e.__popMaskRect();e.__popMaskObject(this);openfl_geom_Rectangle.__pool.release(i)}if(this.__graphics!=null){openfl__$internal_renderer_context3D_Context3DShape.render(this,e)}}}}this.__renderEvent(e)},__renderGLMask:function(e){openfl__$internal_renderer_context3D_Context3DTextField.renderMask(this,e);openfl_display_InteractiveObject.prototype.__renderGLMask.call(this,e)},__replaceSelectedText:function(e,t){if(t==null){t=true}if(e==null){e=""}if(e==""&&this.__selectionIndex==this.__caretIndex){return}var i=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex;var s=this.__caretIndex>this.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(i==s&&this.__textEngine.maxChars>0&&lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)==this.__textEngine.maxChars){return}if(i>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){i=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(s>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){s=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(s<i){var a=s;s=i;i=a}if(i<0){i=0}this.__replaceText(i,s,e,t);var r=i+lime_text__$UTF8String_UTF8String_$Impl_$.get_length(js_Boot.__cast(e,String));if(r>lime_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,i,s){if(t<e||e<0||t>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)||i==null){return}if(s){i=this.__textEngine.restrictText(i);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){i=""}else if(r<i.length){i=HxOverrides.substr(i,0,r)}}}this.__updateText(lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,0,e)+i+lime_text__$UTF8String_UTF8String_$Impl_$.substring(this.__text,t));if(t>lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){t=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}var n=i.length-(t-e);var _=0;var o;while(_<this.__textEngine.textFormatRanges.get_length()){o=this.__textEngine.textFormatRanges.get(_);if(o.start<=e&&o.end>=t){o.end+=n;++_}else if(o.start>=e&&o.end<=t){if(_>0){this.__textEngine.textFormatRanges.splice(_,1)}else{o.start=0;o.end=e+i.length;++_}n-=o.end-o.start}else if(o.start>e&&o.start<=t){o.start+=n;++_}else{++_}}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;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=e){var t=this.__textEngine.autoSize;switch(t){case 0:var i=this;i.set_x(i.get_x()+(e-this.__textEngine.width)/2);break;case 3:var s=this;s.set_x(s.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.x<this.get_scrollH()){this.set_scrollH(Math.floor(t.x-2))}else if(t.x>this.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)<this.__caretIndex){this.__selectionIndex=this.__caretIndex=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)}if(!this.__displayAsPassword||openfl_display_DisplayObject.__supportDOM&&!this.__renderedOnCanvasWhileOnDOM){this.__textEngine.set_text(this.__text)}else{var t=lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.get_text());var i="";var s=0;var a=t;while(s<a){var r=s++;i+="*"}this.__textEngine.set_text(i)}},__updateTransforms:function(e){openfl_display_InteractiveObject.prototype.__updateTransforms.call(this,e);var t=this.__renderTransform;var i=this.__offsetX;var s=this.__offsetY;t.tx=i*t.a+s*t.c+t.tx;t.ty=i*t.b+s*t.d+t.ty},set_antiAliasType:function(e){var t=e!=this.__textEngine.antiAliasType;return this.__textEngine.antiAliasType=e},set_autoSize:function(e){if(e!=this.__textEngine.autoSize){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.autoSize=e},set_background:function(e){if(e!=this.__textEngine.background){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.background=e},set_backgroundColor:function(e){if(e!=this.__textEngine.backgroundColor){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.backgroundColor=e},set_border:function(e){if(e!=this.__textEngine.border){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.border=e},set_borderColor:function(e){if(e!=this.__textEngine.borderColor){this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.borderColor=e},get_defaultTextFormat:function(){return this.__textFormat.clone()},set_defaultTextFormat:function(e){this.__textFormat.__merge(e);this.__layoutDirty=true;this.__dirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}return e},set_displayAsPassword:function(e){if(e!=this.__displayAsPassword){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.__displayAsPassword=e;this.__updateText(this.__text)}return e},set_embedFonts:function(e){return this.__textEngine.embedFonts=e},get_height:function(){this.__updateLayout();return this.__textEngine.height*Math.abs(this.get_scaleY())},set_height:function(e){if(e!=this.__textEngine.height){this.__setTransformDirty();this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.__textEngine.height=e}return this.__textEngine.height*Math.abs(this.get_scaleY())},get_htmlText:function(){if(this.__isHTML){return this.__rawHtmlText}else{return this.__text}},set_htmlText:function(e){if(!this.__isHTML||this.__text!=e){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}this.__isHTML=true;this.__rawHtmlText=e;e=openfl__$internal_formats_html_HTMLParser.parse(e,this.__textFormat,this.__textEngine.textFormatRanges);if(openfl_display_DisplayObject.__supportDOM){if(this.__textEngine.textFormatRanges.get_length()>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 i=this.__textEngine.textFormatRanges.get(0);i.format=this.__textFormat;i.start=0;i.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 i=this.__textEngine.textFormatRanges;while(t<i.get_length()){var s=i.get(t);++t;s.format.color=e}return this.__textFormat.color=e},get_textWidth:function(){this.__updateLayout();return this.__textEngine.textWidth},get_textHeight:function(){this.__updateLayout();return this.__textEngine.textHeight},get_type:function(){return this.__textEngine.type},set_type:function(e){if(e!=this.__textEngine.type){if(e==1){this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage));this.this_onFocusIn(null);this.__textEngine.__useIntAdvances=true}else{this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));this.__stopTextInput();this.__textEngine.__useIntAdvances=null}this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.type=e},get_width:function(){this.__updateLayout();return this.__textEngine.width*Math.abs(this.__scaleX)},set_width:function(e){if(e!=this.__textEngine.width){this.__setTransformDirty();this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}this.__textEngine.width=e}return this.__textEngine.width*Math.abs(this.__scaleX)},set_wordWrap:function(e){if(e!=this.__textEngine.wordWrap){this.__dirty=true;this.__layoutDirty=true;if(!this.__renderDirty){this.__renderDirty=true;this.__setParentRenderDirty()}}return this.__textEngine.wordWrap=e},get_x:function(){return this.__transform.tx+this.__offsetX},set_x:function(e){if(e!=this.__transform.tx+this.__offsetX){this.__setTransformDirty()}return this.__transform.tx=e-this.__offsetX},get_y:function(){return this.__transform.ty+this.__offsetY},set_y:function(e){if(e!=this.__transform.ty+this.__offsetY){this.__setTransformDirty()}return this.__transform.ty=e-this.__offsetY},stage_onMouseMove:function(e){if(this.stage==null){return}if(this.__textEngine.selectable&&this.__selectionIndex>=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.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var i;var s;i=Math.min(this.__selectionIndex,t)|0;s=Math.max(this.__selectionIndex,t)|0;this.__selectionIndex=i;this.__caretIndex=s;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<lime_text__$UTF8String_UTF8String_$Impl_$.get_length(this.__text)){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 1073741898:if(this.get_selectable()){this.__caretBeginningOfLine();this.__stopCursorTimer();this.__startCursorTimer()}break;case 1073741901:if(this.get_selectable()){this.__caretEndOfLine();this.__stopCursorTimer();this.__startCursorTimer()}break;case 1073741903:if(this.get_selectable()){if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)){this.__caretEndOfLine();if(!lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__selectionIndex=this.__caretIndex}}else if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__caretNextCharacter()}else{if(this.__selectionIndex==this.__caretIndex){this.__caretNextCharacter()}else{this.__caretIndex=Math.max(this.__caretIndex,this.__selectionIndex)|0}this.__selectionIndex=this.__caretIndex}this.__updateScrollH();this.__stopCursorTimer();this.__startCursorTimer()}break;case 1073741904:if(this.get_selectable()){if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(t)){this.__caretBeginningOfLine();if(!lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__selectionIndex=this.__caretIndex}}else if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__caretPreviousCharacter()}else{if(this.__selectionIndex==this.__caretIndex){this.__caretPreviousCharacter()}else{this.__caretIndex=Math.min(this.__caretIndex,this.__selectionIndex)|0}this.__selectionIndex=this.__caretIndex}this.__updateScrollH();this.__stopCursorTimer();this.__startCursorTimer()}break;case 1073741905:if(this.get_selectable()){if(!this.__textEngine.multiline){return}if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__caretNextLine()}else{if(this.__selectionIndex==this.__caretIndex){this.__caretNextLine()}else{var i=this.getLineIndexOfChar(Math.max(this.__caretIndex,this.__selectionIndex)|0);this.__caretNextLine(i,Math.min(this.__caretIndex,this.__selectionIndex)|0)}this.__selectionIndex=this.__caretIndex}this.__stopCursorTimer();this.__startCursorTimer()}break;case 1073741906:if(this.get_selectable()){if(!this.__textEngine.multiline){return}if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(t)){this.__caretPreviousLine()}else{if(this.__selectionIndex==this.__caretIndex){this.__caretPreviousLine()}else{var s=this.getLineIndexOfChar(Math.min(this.__caretIndex,this.__selectionIndex)|0);this.__caretPreviousLine(s,Math.min(this.__caretIndex,this.__selectionIndex)|0)}this.__selectionIndex=this.__caretIndex}this.__stopCursorTimer();this.__startCursorTimer()}break;case 13:case 1073741912:if(this.__textEngine.multiline){var a=new openfl_events_TextEvent("textInput",true,true,"\n");this.dispatchEvent(a);if(!a.isDefaultPrevented()){this.__replaceSelectedText("\n",true);this.dispatchEvent(new openfl_events_Event("change",true))}}break;default:}},window_onTextInput:function(e){this.__replaceSelectedText(e,true);this.dispatchEvent(new openfl_events_Event("change",true))},__class__:openfl_text_TextField,__properties__:$extend(openfl_display_InteractiveObject.prototype.__properties__,{set_wordWrap:"set_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",set_text:"set_text",get_text:"get_text",set_sharpness:"set_sharpness",set_selectable:"set_selectable",get_selectable:"get_selectable",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_multiline:"set_multiline",get_multiline:"get_multiline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_embedFonts:"set_embedFonts",set_displayAsPassword:"set_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",set_borderColor:"set_borderColor",set_border:"set_border",set_backgroundColor:"set_backgroundColor",set_background:"set_background",set_autoSize:"set_autoSize",set_antiAliasType:"set_antiAliasType"})});var openfl_text_TextFormat=function(e,t,i,s,a,r,n,_,o,l,h,c,u){this.font=e;this.size=t;this.color=i;this.bold=s;this.italic=a;this.underline=r;this.url=n;this.target=_;this.align=o;this.leftMargin=l;this.rightMargin=h;this.indent=c;this.leading=u};$hxClasses["openfl.text.TextFormat"]=openfl_text_TextFormat;openfl_text_TextFormat.__name__=["openfl","text","TextFormat"];openfl_text_TextFormat.prototype={align:null,blockIndent:null,bold:null,bullet:null,color:null,font:null,indent:null,italic:null,kerning:null,leading:null,leftMargin:null,letterSpacing:null,rightMargin:null,size:null,tabStops:null,target:null,underline:null,url:null,__ascent:null,__descent:null,clone:function(){var e=new openfl_text_TextFormat(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);e.align=this.align;e.leftMargin=this.leftMargin;e.rightMargin=this.rightMargin;e.indent=this.indent;e.leading=this.leading;e.blockIndent=this.blockIndent;e.bullet=this.bullet;e.kerning=this.kerning;e.letterSpacing=this.letterSpacing;e.tabStops=this.tabStops;e.__ascent=this.__ascent;e.__descent=this.__descent;return e},__merge:function(e){if(e.font!=null){this.font=e.font}if(e.size!=null){this.size=e.size}if(e.color!=null){this.color=e.color}if(e.bold!=null){this.bold=e.bold}if(e.italic!=null){this.italic=e.italic}if(e.underline!=null){this.underline=e.underline}if(e.url!=null&&e.url!=""){this.url=e.url}if(e.url==""&&this.url==null){this.url=""}if(e.target!=null){this.target=e.target}if(e.align!=null){this.align=e.align}if(e.leftMargin!=null){this.leftMargin=e.leftMargin}if(e.rightMargin!=null){this.rightMargin=e.rightMargin}if(e.indent!=null){this.indent=e.indent}if(e.leading!=null){this.leading=e.leading}if(e.blockIndent!=null){this.blockIndent=e.blockIndent}if(e.bullet!=null){this.bullet=e.bullet}if(e.kerning!=null){this.kerning=e.kerning}if(e.letterSpacing!=null){this.letterSpacing=e.letterSpacing}if(e.tabStops!=null){this.tabStops=e.tabStops}if(e.__ascent!=null){this.__ascent=e.__ascent}if(e.__descent!=null){this.__descent=e.__descent}},__class__:openfl_text_TextFormat};var openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$={};$hxClasses["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"]=openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$;openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.__name__=["openfl","text","_TextFormatAlign","TextFormatAlign_Impl_"];openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString=function(e){switch(e){case"center":return 0;case"end":return 1;case"justify":return 2;case"left":return 3;case"right":return 4;case"start":return 5;default:return null}};var openfl_ui_GameInput=function(){};$hxClasses["openfl.ui.GameInput"]=openfl_ui_GameInput;openfl_ui_GameInput.__name__=["openfl","ui","GameInput"];openfl_ui_GameInput.__getDevice=function(e){if(e==null){return null}if(openfl_ui_GameInput.__devices.h.__keys__[e.__id__]==null){var t=lime_ui_Joystick.__getDeviceData();var i=t[e.id].id;var s=lime_ui_Joystick.__getDeviceData();var a=new openfl_ui_GameInputDevice(i,s[e.id].id);openfl_ui_GameInput.__deviceList.push(a);openfl_ui_GameInput.__devices.set(e,a);openfl_ui_GameInput.numDevices=openfl_ui_GameInput.__deviceList.length}return openfl_ui_GameInput.__devices.h[e.__id__]};openfl_ui_GameInput.__onGamepadAxisMove=function(e,t,i){var s=openfl_ui_GameInput.__getDevice(e);if(s==null){return}if(s.enabled){if(!s.__axis.h.hasOwnProperty(t)){var a;switch(t){case 0:a="LEFT_X";break;case 1:a="LEFT_Y";break;case 2:a="RIGHT_X";break;case 3:a="RIGHT_Y";break;case 4:a="TRIGGER_LEFT";break;case 5:a="TRIGGER_RIGHT";break;default:a="UNKNOWN ("+t+")"}var r=new openfl_ui_GameInputControl(s,"AXIS_"+a,-1,1);s.__axis.h[t]=r;s.__controls.push(r)}var n=s.__axis.h[t];n.value=i;n.dispatchEvent(new openfl_events_Event("change"))}};openfl_ui_GameInput.__onGamepadButtonDown=function(e,t){var i=openfl_ui_GameInput.__getDevice(e);if(i==null){return}if(i.enabled){if(!i.__button.h.hasOwnProperty(t)){var s;switch(t){case 0:s="A";break;case 1:s="B";break;case 2:s="X";break;case 3:s="Y";break;case 4:s="BACK";break;case 5:s="GUIDE";break;case 6:s="START";break;case 7:s="LEFT_STICK";break;case 8:s="RIGHT_STICK";break;case 9:s="LEFT_SHOULDER";break;case 10:s="RIGHT_SHOULDER";break;case 11:s="DPAD_UP";break;case 12:s="DPAD_DOWN";break;case 13:s="DPAD_LEFT";break;case 14:s="DPAD_RIGHT";break;default:s="UNKNOWN ("+t+")"}var a=new openfl_ui_GameInputControl(i,"BUTTON_"+s,0,1);i.__button.h[t]=a;i.__controls.push(a)}var r=i.__button.h[t];r.value=1;r.dispatchEvent(new openfl_events_Event("change"))}};openfl_ui_GameInput.__onGamepadButtonUp=function(e,t){var i=openfl_ui_GameInput.__getDevice(e);if(i==null){return}if(i.enabled){if(!i.__button.h.hasOwnProperty(t)){var s;switch(t){case 0:s="A";break;case 1:s="B";break;case 2:s="X";break;case 3:s="Y";break;case 4:s="BACK";break;case 5:s="GUIDE";break;case 6:s="START";break;case 7:s="LEFT_STICK";break;case 8:s="RIGHT_STICK";break;case 9:s="LEFT_SHOULDER";break;case 10:s="RIGHT_SHOULDER";break;case 11:s="DPAD_UP";break;case 12:s="DPAD_DOWN";break;case 13:s="DPAD_LEFT";break;case 14:s="DPAD_RIGHT";break;default:s="UNKNOWN ("+t+")"}var a=new openfl_ui_GameInputControl(i,"BUTTON_"+s,0,1);i.__button.h[t]=a;i.__controls.push(a)}var r=i.__button.h[t];r.value=0;r.dispatchEvent(new openfl_events_Event("change"))}};openfl_ui_GameInput.__onGamepadConnect=function(e){var t=openfl_ui_GameInput.__getDevice(e);if(t==null){return}var i=0;var s=openfl_ui_GameInput.__instances;while(i<s.length){var a=s[i];++i;a.dispatchEvent(new openfl_events_GameInputEvent("deviceAdded",true,false,t))}};openfl_ui_GameInput.__onGamepadDisconnect=function(e){var t=openfl_ui_GameInput.__devices.h[e.__id__];if(t!=null){if(openfl_ui_GameInput.__devices.h.__keys__[e.__id__]!=null){HxOverrides.remove(openfl_ui_GameInput.__deviceList,openfl_ui_GameInput.__devices.h[e.__id__]);openfl_ui_GameInput.__devices.remove(e)}openfl_ui_GameInput.numDevices=openfl_ui_GameInput.__deviceList.length;var i=0;var s=openfl_ui_GameInput.__instances;while(i<s.length){var a=s[i];++i;a.dispatchEvent(new openfl_events_GameInputEvent("deviceRemoved",true,false,t))}}};openfl_ui_GameInput.__super__=openfl_events_EventDispatcher;openfl_ui_GameInput.prototype=$extend(openfl_events_EventDispatcher.prototype,{addEventListener:function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=0}if(i==null){i=false}openfl_events_EventDispatcher.prototype.addEventListener.call(this,e,t,i,s,a);if(e=="deviceAdded"){var r=0;var n=openfl_ui_GameInput.__deviceList;while(r<n.length){var _=n[r];++r;this.dispatchEvent(new openfl_events_GameInputEvent("deviceAdded",true,false,_))}}},__class__:openfl_ui_GameInput});var openfl_ui_GameInputControl=function(e,t,i,s,a){if(a==null){a=0}openfl_events_EventDispatcher.call(this);this.device=e;this.id=t;this.minValue=i;this.maxValue=s;this.value=a};$hxClasses["openfl.ui.GameInputControl"]=openfl_ui_GameInputControl;openfl_ui_GameInputControl.__name__=["openfl","ui","GameInputControl"];openfl_ui_GameInputControl.__super__=openfl_events_EventDispatcher;openfl_ui_GameInputControl.prototype=$extend(openfl_events_EventDispatcher.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:openfl_ui_GameInputControl});var openfl_ui_GameInputDevice=function(e,t){this.__controls=[];this.__button=new haxe_ds_IntMap;this.__axis=new haxe_ds_IntMap;this.id=e;this.name=t;var i;var s=0;while(s<6){var a=s++;i=new openfl_ui_GameInputControl(this,"AXIS_"+a,-1,1);this.__axis.h[a]=i;this.__controls.push(i)}var r=0;while(r<15){var n=r++;i=new openfl_ui_GameInputControl(this,"BUTTON_"+n,0,1);this.__button.h[n]=i;this.__controls.push(i)}};$hxClasses["openfl.ui.GameInputDevice"]=openfl_ui_GameInputDevice;openfl_ui_GameInputDevice.__name__=["openfl","ui","GameInputDevice"];openfl_ui_GameInputDevice.prototype={enabled:null,id:null,name:null,__axis:null,__button:null,__controls:null,__class__:openfl_ui_GameInputDevice};var openfl_ui_Keyboard=function(){};$hxClasses["openfl.ui.Keyboard"]=openfl_ui_Keyboard;openfl_ui_Keyboard.__name__=["openfl","ui","Keyboard"];openfl_ui_Keyboard.__getCharCode=function(e,t){if(t==null){t=false}if(!t){switch(e){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;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 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39}if(e>=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<t.length){var i=t[e];++e;i.set_cursor(null)}};openfl_ui_Mouse.show=function(){openfl_ui_Mouse.__hidden=false;var e=openfl_ui_Mouse.__cursor;openfl_ui_Mouse.__cursor=null;openfl_ui_Mouse.set_cursor(e)};openfl_ui_Mouse.set_cursor=function(e){if(e==null){e="auto"}var t=null;switch(e){case"arrow":t=lime_ui_MouseCursor.ARROW;break;case"button":t=lime_ui_MouseCursor.POINTER;break;case"crosshair":t=lime_ui_MouseCursor.CROSSHAIR;break;case"custom":t=lime_ui_MouseCursor.CUSTOM;break;case"hand":t=lime_ui_MouseCursor.MOVE;break;case"ibeam":t=lime_ui_MouseCursor.TEXT;break;case"resize_nesw":t=lime_ui_MouseCursor.RESIZE_NESW;break;case"resize_ns":t=lime_ui_MouseCursor.RESIZE_NS;break;case"resize_nwse":t=lime_ui_MouseCursor.RESIZE_NWSE;break;case"resize_we":t=lime_ui_MouseCursor.RESIZE_WE;break;case"wait":t=lime_ui_MouseCursor.WAIT;break;case"waitarrow":t=lime_ui_MouseCursor.WAIT_ARROW;break;default:}if(t!=null&&!openfl_ui_Mouse.__hidden){var i=0;var s=lime_app_Application.current.__windows;while(i<s.length){var a=s[i];++i;a.set_cursor(t)}}return openfl_ui_Mouse.__cursor=e};var openfl_ui__$MouseCursor_MouseCursor_$Impl_$={};$hxClasses["openfl.ui._MouseCursor.MouseCursor_Impl_"]=openfl_ui__$MouseCursor_MouseCursor_$Impl_$;openfl_ui__$MouseCursor_MouseCursor_$Impl_$.__name__=["openfl","ui","_MouseCursor","MouseCursor_Impl_"];openfl_ui__$MouseCursor_MouseCursor_$Impl_$.toLimeCursor=function(e){switch(e){case"arrow":return lime_ui_MouseCursor.ARROW;case"auto":return lime_ui_MouseCursor.DEFAULT;case"button":return lime_ui_MouseCursor.POINTER;case"crosshair":return lime_ui_MouseCursor.CROSSHAIR;case"custom":return lime_ui_MouseCursor.CUSTOM;case"hand":return lime_ui_MouseCursor.MOVE;case"ibeam":return lime_ui_MouseCursor.TEXT;case"resize_nesw":return lime_ui_MouseCursor.RESIZE_NESW;case"resize_ns":return lime_ui_MouseCursor.RESIZE_NS;case"resize_nwse":return lime_ui_MouseCursor.RESIZE_NWSE;case"resize_we":return lime_ui_MouseCursor.RESIZE_WE;case"wait":return lime_ui_MouseCursor.WAIT;case"waitarrow":return lime_ui_MouseCursor.WAIT_ARROW;default:return lime_ui_MouseCursor.DEFAULT}};var openfl_utils_AGALMiniAssembler=function(e){if(e==null){e=false}this.debugEnabled=false;this.debugEnabled=e;if(!openfl_utils_AGALMiniAssembler.initialized){openfl_utils_AGALMiniAssembler.init()}};$hxClasses["openfl.utils.AGALMiniAssembler"]=openfl_utils_AGALMiniAssembler;openfl_utils_AGALMiniAssembler.__name__=["openfl","utils","AGALMiniAssembler"];openfl_utils_AGALMiniAssembler.init=function(){openfl_utils_AGALMiniAssembler.initialized=true;var e=openfl_utils_AGALMiniAssembler.OPMAP;var t=new openfl_utils__$AGALMiniAssembler_OpCode("mov",2,0,0);var i=e;if(__map_reserved["mov"]!=null){i.setReserved("mov",t)}else{i.h["mov"]=t}var s=openfl_utils_AGALMiniAssembler.OPMAP;var a=new openfl_utils__$AGALMiniAssembler_OpCode("add",3,1,0);var r=s;if(__map_reserved["add"]!=null){r.setReserved("add",a)}else{r.h["add"]=a}var n=openfl_utils_AGALMiniAssembler.OPMAP;var _=new openfl_utils__$AGALMiniAssembler_OpCode("sub",3,2,0);var o=n;if(__map_reserved["sub"]!=null){o.setReserved("sub",_)}else{o.h["sub"]=_}var l=openfl_utils_AGALMiniAssembler.OPMAP;var h=new openfl_utils__$AGALMiniAssembler_OpCode("mul",3,3,0);var c=l;if(__map_reserved["mul"]!=null){c.setReserved("mul",h)}else{c.h["mul"]=h}var u=openfl_utils_AGALMiniAssembler.OPMAP;var f=new openfl_utils__$AGALMiniAssembler_OpCode("div",3,4,0);var p=u;if(__map_reserved["div"]!=null){p.setReserved("div",f)}else{p.h["div"]=f}var d=openfl_utils_AGALMiniAssembler.OPMAP;var g=new openfl_utils__$AGALMiniAssembler_OpCode("rcp",2,5,0);var m=d;if(__map_reserved["rcp"]!=null){m.setReserved("rcp",g)}else{m.h["rcp"]=g}var v=openfl_utils_AGALMiniAssembler.OPMAP;var b=new openfl_utils__$AGALMiniAssembler_OpCode("min",3,6,0);var y=v;if(__map_reserved["min"]!=null){y.setReserved("min",b)}else{y.h["min"]=b}var x=openfl_utils_AGALMiniAssembler.OPMAP;var w=new openfl_utils__$AGALMiniAssembler_OpCode("max",3,7,0);var k=x;if(__map_reserved["max"]!=null){k.setReserved("max",w)}else{k.h["max"]=w}var P=openfl_utils_AGALMiniAssembler.OPMAP;var C=new openfl_utils__$AGALMiniAssembler_OpCode("frc",2,8,0);var T=P;if(__map_reserved["frc"]!=null){T.setReserved("frc",C)}else{T.h["frc"]=C}var M=openfl_utils_AGALMiniAssembler.OPMAP;var S=new openfl_utils__$AGALMiniAssembler_OpCode("sqt",2,9,0);var $=M;if(__map_reserved["sqt"]!=null){$.setReserved("sqt",S)}else{$.h["sqt"]=S}var E=openfl_utils_AGALMiniAssembler.OPMAP;var B=new openfl_utils__$AGALMiniAssembler_OpCode("rsq",2,10,0);var L=E;if(__map_reserved["rsq"]!=null){L.setReserved("rsq",B)}else{L.h["rsq"]=B}var R=openfl_utils_AGALMiniAssembler.OPMAP;var A=new openfl_utils__$AGALMiniAssembler_OpCode("pow",3,11,0);var I=R;if(__map_reserved["pow"]!=null){I.setReserved("pow",A)}else{I.h["pow"]=A}var D=openfl_utils_AGALMiniAssembler.OPMAP;var F=new openfl_utils__$AGALMiniAssembler_OpCode("log",2,12,0);var O=D;if(__map_reserved["log"]!=null){O.setReserved("log",F)}else{O.h["log"]=F}var j=openfl_utils_AGALMiniAssembler.OPMAP;var G=new openfl_utils__$AGALMiniAssembler_OpCode("exp",2,13,0);var H=j;if(__map_reserved["exp"]!=null){H.setReserved("exp",G)}else{H.h["exp"]=G}var U=openfl_utils_AGALMiniAssembler.OPMAP;var N=new openfl_utils__$AGALMiniAssembler_OpCode("nrm",2,14,0);var W=U;if(__map_reserved["nrm"]!=null){W.setReserved("nrm",N)}else{W.h["nrm"]=N}var V=openfl_utils_AGALMiniAssembler.OPMAP;var z=new openfl_utils__$AGALMiniAssembler_OpCode("sin",2,15,0);var X=V;if(__map_reserved["sin"]!=null){X.setReserved("sin",z)}else{X.h["sin"]=z}var Y=openfl_utils_AGALMiniAssembler.OPMAP;var J=new openfl_utils__$AGALMiniAssembler_OpCode("cos",2,16,0);var K=Y;if(__map_reserved["cos"]!=null){K.setReserved("cos",J)}else{K.h["cos"]=J}var q=openfl_utils_AGALMiniAssembler.OPMAP;var Z=new openfl_utils__$AGALMiniAssembler_OpCode("crs",3,17,0);var Q=q;if(__map_reserved["crs"]!=null){Q.setReserved("crs",Z)}else{Q.h["crs"]=Z}var ee=openfl_utils_AGALMiniAssembler.OPMAP;var te=new openfl_utils__$AGALMiniAssembler_OpCode("dp3",3,18,0);var ie=ee;if(__map_reserved["dp3"]!=null){ie.setReserved("dp3",te)}else{ie.h["dp3"]=te}var se=openfl_utils_AGALMiniAssembler.OPMAP;var ae=new openfl_utils__$AGALMiniAssembler_OpCode("dp4",3,19,0);var re=se;if(__map_reserved["dp4"]!=null){re.setReserved("dp4",ae)}else{re.h["dp4"]=ae}var ne=openfl_utils_AGALMiniAssembler.OPMAP;var _e=new openfl_utils__$AGALMiniAssembler_OpCode("abs",2,20,0);var oe=ne;if(__map_reserved["abs"]!=null){oe.setReserved("abs",_e)}else{oe.h["abs"]=_e}var le=openfl_utils_AGALMiniAssembler.OPMAP;var he=new openfl_utils__$AGALMiniAssembler_OpCode("neg",2,21,0);var ce=le;if(__map_reserved["neg"]!=null){ce.setReserved("neg",he)}else{ce.h["neg"]=he}var ue=openfl_utils_AGALMiniAssembler.OPMAP;var fe=new openfl_utils__$AGALMiniAssembler_OpCode("sat",2,22,0);var pe=ue;if(__map_reserved["sat"]!=null){pe.setReserved("sat",fe)}else{pe.h["sat"]=fe}var de=openfl_utils_AGALMiniAssembler.OPMAP;var ge=new openfl_utils__$AGALMiniAssembler_OpCode("m33",3,23,16);var me=de;if(__map_reserved["m33"]!=null){me.setReserved("m33",ge)}else{me.h["m33"]=ge}var ve=openfl_utils_AGALMiniAssembler.OPMAP;var be=new openfl_utils__$AGALMiniAssembler_OpCode("m44",3,24,16);var ye=ve;if(__map_reserved["m44"]!=null){ye.setReserved("m44",be)}else{ye.h["m44"]=be}var xe=openfl_utils_AGALMiniAssembler.OPMAP;var we=new openfl_utils__$AGALMiniAssembler_OpCode("m34",3,25,16);var ke=xe;if(__map_reserved["m34"]!=null){ke.setReserved("m34",we)}else{ke.h["m34"]=we}var Pe=openfl_utils_AGALMiniAssembler.OPMAP;var Ce=new openfl_utils__$AGALMiniAssembler_OpCode("ddx",2,26,288);var Te=Pe;if(__map_reserved["ddx"]!=null){Te.setReserved("ddx",Ce)}else{Te.h["ddx"]=Ce}var Me=openfl_utils_AGALMiniAssembler.OPMAP;var Se=new openfl_utils__$AGALMiniAssembler_OpCode("ddy",2,27,288);var $e=Me;if(__map_reserved["ddy"]!=null){$e.setReserved("ddy",Se)}else{$e.h["ddy"]=Se}var Ee=openfl_utils_AGALMiniAssembler.OPMAP;var Be=new openfl_utils__$AGALMiniAssembler_OpCode("ife",2,28,897);var Le=Ee;if(__map_reserved["ife"]!=null){Le.setReserved("ife",Be)}else{Le.h["ife"]=Be}var Re=openfl_utils_AGALMiniAssembler.OPMAP;var Ae=new openfl_utils__$AGALMiniAssembler_OpCode("ine",2,29,897);var Ie=Re;if(__map_reserved["ine"]!=null){Ie.setReserved("ine",Ae)}else{Ie.h["ine"]=Ae}var De=openfl_utils_AGALMiniAssembler.OPMAP;var Fe=new openfl_utils__$AGALMiniAssembler_OpCode("ifg",2,30,897);var Oe=De;if(__map_reserved["ifg"]!=null){Oe.setReserved("ifg",Fe)}else{Oe.h["ifg"]=Fe}var je=openfl_utils_AGALMiniAssembler.OPMAP;var Ge=new openfl_utils__$AGALMiniAssembler_OpCode("ifl",2,31,897);var He=je;if(__map_reserved["ifl"]!=null){He.setReserved("ifl",Ge)}else{He.h["ifl"]=Ge}var Ue=openfl_utils_AGALMiniAssembler.OPMAP;var Ne=new openfl_utils__$AGALMiniAssembler_OpCode("els",0,32,1921);var We=Ue;if(__map_reserved["els"]!=null){We.setReserved("els",Ne)}else{We.h["els"]=Ne}var Ve=openfl_utils_AGALMiniAssembler.OPMAP;var ze=new openfl_utils__$AGALMiniAssembler_OpCode("eif",0,33,1409);var Xe=Ve;if(__map_reserved["eif"]!=null){Xe.setReserved("eif",ze)}else{Xe.h["eif"]=ze}var Ye=openfl_utils_AGALMiniAssembler.OPMAP;var Je=new openfl_utils__$AGALMiniAssembler_OpCode("kil",1,39,160);var Ke=Ye;if(__map_reserved["kil"]!=null){Ke.setReserved("kil",Je)}else{Ke.h["kil"]=Je}var qe=openfl_utils_AGALMiniAssembler.OPMAP;var Ze=new openfl_utils__$AGALMiniAssembler_OpCode("tex",3,40,40);var Qe=qe;if(__map_reserved["tex"]!=null){Qe.setReserved("tex",Ze)}else{Qe.h["tex"]=Ze}var et=openfl_utils_AGALMiniAssembler.OPMAP;var tt=new openfl_utils__$AGALMiniAssembler_OpCode("sge",3,41,0);var it=et;if(__map_reserved["sge"]!=null){it.setReserved("sge",tt)}else{it.h["sge"]=tt}var st=openfl_utils_AGALMiniAssembler.OPMAP;var at=new openfl_utils__$AGALMiniAssembler_OpCode("slt",3,42,0);var rt=st;if(__map_reserved["slt"]!=null){rt.setReserved("slt",at)}else{rt.h["slt"]=at}var nt=openfl_utils_AGALMiniAssembler.OPMAP;var _t=new openfl_utils__$AGALMiniAssembler_OpCode("sgn",2,43,0);var ot=nt;if(__map_reserved["sgn"]!=null){ot.setReserved("sgn",_t)}else{ot.h["sgn"]=_t}var lt=openfl_utils_AGALMiniAssembler.OPMAP;var ht=new openfl_utils__$AGALMiniAssembler_OpCode("seq",3,44,0);var ct=lt;if(__map_reserved["seq"]!=null){ct.setReserved("seq",ht)}else{ct.h["seq"]=ht}var ut=openfl_utils_AGALMiniAssembler.OPMAP;var ft=new openfl_utils__$AGALMiniAssembler_OpCode("sne",3,45,0);var pt=ut;if(__map_reserved["sne"]!=null){pt.setReserved("sne",ft)}else{pt.h["sne"]=ft}var dt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var gt=new openfl_utils__$AGALMiniAssembler_Sampler("rgba",8,0);var mt=dt;if(__map_reserved["rgba"]!=null){mt.setReserved("rgba",gt)}else{mt.h["rgba"]=gt}var vt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var bt=new openfl_utils__$AGALMiniAssembler_Sampler("compressed",8,1);var yt=vt;if(__map_reserved["compressed"]!=null){yt.setReserved("compressed",bt)}else{yt.h["compressed"]=bt}var xt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var wt=new openfl_utils__$AGALMiniAssembler_Sampler("compressedalpha",8,2);var kt=xt;if(__map_reserved["compressedalpha"]!=null){kt.setReserved("compressedalpha",wt)}else{kt.h["compressedalpha"]=wt}var Pt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Ct=new openfl_utils__$AGALMiniAssembler_Sampler("dxt1",8,1);var Tt=Pt;if(__map_reserved["dxt1"]!=null){Tt.setReserved("dxt1",Ct)}else{Tt.h["dxt1"]=Ct}var Mt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var St=new openfl_utils__$AGALMiniAssembler_Sampler("dxt5",8,2);var $t=Mt;if(__map_reserved["dxt5"]!=null){$t.setReserved("dxt5",St)}else{$t.h["dxt5"]=St}var Et=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Bt=new openfl_utils__$AGALMiniAssembler_Sampler("video",8,3);var Lt=Et;if(__map_reserved["video"]!=null){Lt.setReserved("video",Bt)}else{Lt.h["video"]=Bt}var Rt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var At=new openfl_utils__$AGALMiniAssembler_Sampler("2d",12,0);var It=Rt;if(__map_reserved["2d"]!=null){It.setReserved("2d",At)}else{It.h["2d"]=At}var Dt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Ft=new openfl_utils__$AGALMiniAssembler_Sampler("3d",12,2);var Ot=Dt;if(__map_reserved["3d"]!=null){Ot.setReserved("3d",Ft)}else{Ot.h["3d"]=Ft}var jt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Gt=new openfl_utils__$AGALMiniAssembler_Sampler("cube",12,1);var Ht=jt;if(__map_reserved["cube"]!=null){Ht.setReserved("cube",Gt)}else{Ht.h["cube"]=Gt}var Ut=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Nt=new openfl_utils__$AGALMiniAssembler_Sampler("mipnearest",24,1);var Wt=Ut;if(__map_reserved["mipnearest"]!=null){Wt.setReserved("mipnearest",Nt)}else{Wt.h["mipnearest"]=Nt}var Vt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var zt=new openfl_utils__$AGALMiniAssembler_Sampler("miplinear",24,2);var Xt=Vt;if(__map_reserved["miplinear"]!=null){Xt.setReserved("miplinear",zt)}else{Xt.h["miplinear"]=zt}var Yt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Jt=new openfl_utils__$AGALMiniAssembler_Sampler("mipnone",24,0);var Kt=Yt;if(__map_reserved["mipnone"]!=null){Kt.setReserved("mipnone",Jt)}else{Kt.h["mipnone"]=Jt}var qt=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Zt=new openfl_utils__$AGALMiniAssembler_Sampler("nomip",24,0);var Qt=qt;if(__map_reserved["nomip"]!=null){Qt.setReserved("nomip",Zt)}else{Qt.h["nomip"]=Zt}var ei=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var ti=new openfl_utils__$AGALMiniAssembler_Sampler("nearest",28,0);var ii=ei;if(__map_reserved["nearest"]!=null){ii.setReserved("nearest",ti)}else{ii.h["nearest"]=ti}var si=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var ai=new openfl_utils__$AGALMiniAssembler_Sampler("linear",28,1);var ri=si;if(__map_reserved["linear"]!=null){ri.setReserved("linear",ai)}else{ri.h["linear"]=ai}var ni=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var _i=new openfl_utils__$AGALMiniAssembler_Sampler("anisotropic2x",28,2);var oi=ni;if(__map_reserved["anisotropic2x"]!=null){oi.setReserved("anisotropic2x",_i)}else{oi.h["anisotropic2x"]=_i}var li=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var hi=new openfl_utils__$AGALMiniAssembler_Sampler("anisotropic4x",28,3);var ci=li;if(__map_reserved["anisotropic4x"]!=null){ci.setReserved("anisotropic4x",hi)}else{ci.h["anisotropic4x"]=hi}var ui=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var fi=new openfl_utils__$AGALMiniAssembler_Sampler("anisotropic8x",28,4);var pi=ui;if(__map_reserved["anisotropic8x"]!=null){pi.setReserved("anisotropic8x",fi)}else{pi.h["anisotropic8x"]=fi}var di=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var gi=new openfl_utils__$AGALMiniAssembler_Sampler("anisotropic16x",28,5);var mi=di;if(__map_reserved["anisotropic16x"]!=null){mi.setReserved("anisotropic16x",gi)}else{mi.h["anisotropic16x"]=gi}var vi=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var bi=new openfl_utils__$AGALMiniAssembler_Sampler("centroid",16,1);var yi=vi;if(__map_reserved["centroid"]!=null){yi.setReserved("centroid",bi)}else{yi.h["centroid"]=bi}var xi=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var wi=new openfl_utils__$AGALMiniAssembler_Sampler("single",16,2);var ki=xi;if(__map_reserved["single"]!=null){ki.setReserved("single",wi)}else{ki.h["single"]=wi}var Pi=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Ci=new openfl_utils__$AGALMiniAssembler_Sampler("ignoresampler",16,4);var Ti=Pi;if(__map_reserved["ignoresampler"]!=null){Ti.setReserved("ignoresampler",Ci)}else{Ti.h["ignoresampler"]=Ci}var Mi=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Si=new openfl_utils__$AGALMiniAssembler_Sampler("repeat",20,1);var $i=Mi;if(__map_reserved["repeat"]!=null){$i.setReserved("repeat",Si)}else{$i.h["repeat"]=Si}var Ei=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Bi=new openfl_utils__$AGALMiniAssembler_Sampler("wrap",20,1);var Li=Ei;if(__map_reserved["wrap"]!=null){Li.setReserved("wrap",Bi)}else{Li.h["wrap"]=Bi}var Ri=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Ai=new openfl_utils__$AGALMiniAssembler_Sampler("clamp",20,0);var Ii=Ri;if(__map_reserved["clamp"]!=null){Ii.setReserved("clamp",Ai)}else{Ii.h["clamp"]=Ai}var Di=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Fi=new openfl_utils__$AGALMiniAssembler_Sampler("clamp_u_repeat_v",20,2);var Oi=Di;if(__map_reserved["clamp_u_repeat_v"]!=null){Oi.setReserved("clamp_u_repeat_v",Fi)}else{Oi.h["clamp_u_repeat_v"]=Fi}var ji=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var Gi=new openfl_utils__$AGALMiniAssembler_Sampler("repeat_u_clamp_v",20,3);var Hi=ji;if(__map_reserved["repeat_u_clamp_v"]!=null){Hi.setReserved("repeat_u_clamp_v",Gi)}else{Hi.h["repeat_u_clamp_v"]=Gi}};openfl_utils_AGALMiniAssembler.prototype={agalcode:null,error:null,verbose:null,debugEnabled:null,assemble:function(e,t,i,s){if(s==null){s=false}if(i==null){i=1}var a=openfl_Lib.getTimer();var r=new openfl_utils_ByteArrayData(0);this.agalcode=r;this.error="";var n=false;if(e=="fragment"){n=true}else if(e!="vertex"){this.error='ERROR: mode needs to be "'+"fragment"+'" or "'+"vertex"+'" but is "'+e+'".'}this.agalcode.__endian=1;this.agalcode.writeByte(160);this.agalcode.writeUnsignedInt(i);this.agalcode.writeByte(161);this.agalcode.writeByte(n?1:0);this.initregmap(i,s);var _=StringTools.replace(t,"\r","\n").split("\n");var o=0;var l=_.length;var h=new EReg("<.*>","g");var c=new EReg("([\\w\\.\\-\\+]+)","gi");var u=new EReg("^\\w{3}","ig");var f=new EReg("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?","gi");var p=new EReg("\\[.*\\]","ig");var d=new EReg("^\\b[A-Za-z]{1,3}","ig");var g=new EReg("\\d+","");var m=new EReg("(\\.[xyzw]{1,4})","");var v=new EReg("[A-Za-z]{1,3}","ig");var b=new EReg("(\\.[xyzw]{1,1})","");var y=new EReg("\\+\\d{1,3}","ig");var x=0;while(x<l&&this.error==""){var w=StringTools.trim(_[x]);var k=w.indexOf("//");if(k!=-1){w=HxOverrides.substr(w,0,k)}var P=h.match(w)?h.matchedPos().pos:-1;var C=null;if(P!=-1){C=this.match(HxOverrides.substr(w,P,null),c);w=HxOverrides.substr(w,0,P)}var T=null;var M=null;if(u.match(w)){T=u.matched(0);var S=openfl_utils_AGALMiniAssembler.OPMAP;if(__map_reserved[T]!=null){M=S.getReserved(T)}else{M=S.h[T]}}if(M==null){if(w.length>=3){lime_utils_Log.warn("warning: bad line "+x+": "+_[x],{fileName:"AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}++x;continue}if(this.debugEnabled){lime_utils_Log.info(M,{fileName:"AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(M==null){if(w.length>=3){lime_utils_Log.warn("warning: bad line "+x+": "+_[x],{fileName:"AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}++x;continue}w=HxOverrides.substr(w,w.indexOf(M.name)+M.name.length,null);if((M.flags&256)!=0&&i<2){this.error="error: opcode requires version 2.";break}if((M.flags&64)!=0&&n){this.error="error: opcode is only allowed in vertex programs.";break}if((M.flags&32)!=0&&!n){this.error="error: opcode is only allowed in fragment programs.";break}if(this.verbose){lime_utils_Log.info("emit opcode="+Std.string(M),{fileName:"AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.agalcode.writeUnsignedInt(M.emitCode);++o;if(o>4096){this.error="error: too many opcodes. maximum is "+4096+".";break}var $=this.match(w,f);if($.length!=M.numRegister){this.error="error: wrong number of operands. found "+$.length+" but expected "+M.numRegister+".";break}var E=false;var B=160;var L=$.length;var R=0;var A=L;while(R<A){var I=R++;var D=false;var F=this.match($[I],p);if(F.length>0){$[I]=StringTools.replace($[I],F[0],"0");if(this.verbose){lime_utils_Log.info("IS REL",{fileName:"AGALMiniAssembler.hx",lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}D=true}var O=this.match($[I],d);if(O.length==0){this.error="error: could not parse operand "+I+" ("+$[I]+").";E=true;break}var j=openfl_utils_AGALMiniAssembler.REGMAP;var G=O[0];var H=__map_reserved[G]!=null?j.getReserved(G):j.h[G];if(this.debugEnabled){lime_utils_Log.info(H,{fileName:"AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(H==null){this.error="error: could not find register name for operand "+I+" ("+$[I]+").";E=true;break}if(n){if((H.flags&32)==0){this.error="error: register operand "+I+" ("+$[I]+") only allowed in vertex programs.";E=true;break}if(D){this.error="error: register operand "+I+" ("+$[I]+") relative adressing not allowed in fragment programs.";E=true;break}}else if((H.flags&64)==0){this.error="error: register operand "+I+" ("+$[I]+") only allowed in fragment programs.";E=true;break}var U=$[I].indexOf(H.name)+H.name.length;$[I]=HxOverrides.substr($[I],U,null);var N=D?this.match(F[0],g):this.match($[I],g);var W=0;if(N.length>0){W=Std.parseInt(N[0])}if(_$UInt_UInt_$Impl_$.gt(W,H.range)){this.error="error: register operand "+I+" ("+$[I]+") index exceeds limit of "+Std.string(_$UInt_UInt_$Impl_$.toFloat(H.range+1))+".";E=true;break}var V=0;var z=this.match($[I],m);var X=I==0&&(M.flags&128)==0;var Y=I==2&&(M.flags&8)!=0;var J=0;var K=0;var q=0;if(X&&D){this.error="error: relative can not be destination";E=true;break}if(z.length>0){V=0;var Z=0;var Q=z[0].length;var ee=1;while(ee<Q){Z=HxOverrides.cca(z[0],ee)-120;if(_$UInt_UInt_$Impl_$.gt(Z,2)){Z=3}if(X){V|=1<<Z}else{V=V|Z<<(ee-1<<1)}++ee}if(!X){while(ee<=4){V=V|Z<<(ee-1<<1);++ee}}}else if(X){V=15}else{V=228}if(D){var te=this.match(F[0],v);var ie=openfl_utils_AGALMiniAssembler.REGMAP;var se=te[0];var ae=__map_reserved[se]!=null?ie.getReserved(se):ie.h[se];if(ae==null){this.error="error: bad index register";E=true;break}J=ae.emitCode;var re=this.match(F[0],b);if(re.length==0){this.error="error: bad index register select";E=true;break}K=HxOverrides.cca(re[0],1)-120;if(_$UInt_UInt_$Impl_$.gt(K,2)){K=3}var ne=this.match(F[0],y);if(ne.length>0){q=Std.parseInt(ne[0])}if(q<0||q>255){this.error="error: index offset "+q+" out of bounds. [0..255]";E=true;break}if(this.verbose){lime_utils_Log.info("RELATIVE: type="+J+"=="+te[0]+" sel="+Std.string(_$UInt_UInt_$Impl_$.toFloat(K))+"=="+re[0]+" idx="+Std.string(_$UInt_UInt_$Impl_$.toFloat(W))+" offset="+q,{fileName:"AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}}if(this.verbose){lime_utils_Log.info("  emit argcode="+Std.string(H)+"["+Std.string(_$UInt_UInt_$Impl_$.toFloat(W))+"]["+V+"]",{fileName:"AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(X){this.agalcode.writeShort(W);this.agalcode.writeByte(V);this.agalcode.writeByte(H.emitCode);B-=32}else if(Y){if(this.verbose){lime_utils_Log.info("  emit sampler",{fileName:"AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}var _e=5;var oe=C==null?0:C.length;var le=0;var he=0;var ce=oe;while(he<ce){var ue=he++;if(this.verbose){lime_utils_Log.info("    opt: "+C[ue],{fileName:"AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}var fe=openfl_utils_AGALMiniAssembler.SAMPLEMAP;var pe=C[ue];var de=__map_reserved[pe]!=null?fe.getReserved(pe):fe.h[pe];if(de==null){le=parseFloat(C[ue]);if(this.verbose){lime_utils_Log.info("    bias: "+le,{fileName:"AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}}else{if(de.flag!=16){_e&=~(15<<de.flag)}_e=_e|de.mask<<de.flag}}this.agalcode.writeShort(W);this.agalcode.writeByte(le*8|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(_e);if(this.verbose){lime_utils_Log.info("    bits: "+(_e-5),{fileName:"AGALMiniAssembler.hx",lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}B-=64}else{if(I==0){this.agalcode.writeUnsignedInt(0);B-=32}this.agalcode.writeShort(W);this.agalcode.writeByte(q);this.agalcode.writeByte(V);this.agalcode.writeByte(H.emitCode);this.agalcode.writeByte(J);this.agalcode.writeShort(D?K|32768:0);B-=64}}var ge=0;while(ge<B){this.agalcode.writeByte(0);ge+=8}if(E){break}++x}if(this.error!=""){this.error+="\n  at line "+x+" "+_[x];openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length(this.agalcode,0);lime_utils_Log.info(this.error,{fileName:"AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(this.debugEnabled){var me="generated bytecode:";var ve=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(this.agalcode);var be=0;var ye=ve;while(be<ye){var xe=be++;if(xe%16==0){me+="\n"}if(xe%4==0){me+=" "}var we=StringTools.hex(this.agalcode.b[xe],2);if(we.length<2){we="0"+we}me+=we}lime_utils_Log.info(me,{fileName:"AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}if(this.verbose){lime_utils_Log.info("AGALMiniAssembler.assemble time: "+(openfl_Lib.getTimer()-a)/1e3+"s",{fileName:"AGALMiniAssembler.hx",lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}return this.agalcode},initregmap:function(e,t){var i=openfl_utils_AGALMiniAssembler.REGMAP;var s=new openfl_utils__$AGALMiniAssembler_Register("va","vertex attribute",0,t?1024:e==1||e==2?7:15,66);var a=i;if(__map_reserved["va"]!=null){a.setReserved("va",s)}else{a.h["va"]=s}var r=openfl_utils_AGALMiniAssembler.REGMAP;var n=new openfl_utils__$AGALMiniAssembler_Register("vc","vertex constant",1,t?1024:e==1?127:249,66);var _=r;if(__map_reserved["vc"]!=null){_.setReserved("vc",n)}else{_.h["vc"]=n}var o=openfl_utils_AGALMiniAssembler.REGMAP;var l=new openfl_utils__$AGALMiniAssembler_Register("vt","vertex temporary",2,t?1024:e==1?7:25,67);var h=o;if(__map_reserved["vt"]!=null){h.setReserved("vt",l)}else{h.h["vt"]=l}var c=openfl_utils_AGALMiniAssembler.REGMAP;var u=new openfl_utils__$AGALMiniAssembler_Register("vo","vertex output",3,t?1024:0,65);var f=c;if(__map_reserved["vo"]!=null){f.setReserved("vo",u)}else{f.h["vo"]=u}var p=openfl_utils_AGALMiniAssembler.REGMAP;var d=new openfl_utils__$AGALMiniAssembler_Register("vi","varying",4,t?1024:e==1?7:9,99);var g=p;if(__map_reserved["vi"]!=null){g.setReserved("vi",d)}else{g.h["vi"]=d}var m=openfl_utils_AGALMiniAssembler.REGMAP;var v=new openfl_utils__$AGALMiniAssembler_Register("fc","fragment constant",1,t?1024:e==1?27:e==2?63:199,34);var b=m;if(__map_reserved["fc"]!=null){b.setReserved("fc",v)}else{b.h["fc"]=v}var y=openfl_utils_AGALMiniAssembler.REGMAP;var x=new openfl_utils__$AGALMiniAssembler_Register("ft","fragment temporary",2,t?1024:e==1?7:25,35);var w=y;if(__map_reserved["ft"]!=null){w.setReserved("ft",x)}else{w.h["ft"]=x}var k=openfl_utils_AGALMiniAssembler.REGMAP;var P=new openfl_utils__$AGALMiniAssembler_Register("fs","texture sampler",5,t?1024:7,34);var C=k;if(__map_reserved["fs"]!=null){C.setReserved("fs",P)}else{C.h["fs"]=P}var T=openfl_utils_AGALMiniAssembler.REGMAP;var M=new openfl_utils__$AGALMiniAssembler_Register("fo","fragment output",3,t?1024:e==1?0:3,33);var S=T;if(__map_reserved["fo"]!=null){S.setReserved("fo",M)}else{S.h["fo"]=M}var $=openfl_utils_AGALMiniAssembler.REGMAP;var E=new openfl_utils__$AGALMiniAssembler_Register("fd","fragment depth output",6,t?1024:e==1?-1:0,33);var B=$;if(__map_reserved["fd"]!=null){B.setReserved("fd",E)}else{B.h["fd"]=E}var L=openfl_utils_AGALMiniAssembler.REGMAP;var R=new openfl_utils__$AGALMiniAssembler_Register("iid","instance id",7,t?1024:0,66);var A=L;if(__map_reserved["iid"]!=null){A.setReserved("iid",R)}else{A.h["iid"]=R}var I=openfl_utils_AGALMiniAssembler.REGMAP;var D=openfl_utils_AGALMiniAssembler.REGMAP;var F=__map_reserved["vo"]!=null?D.getReserved("vo"):D.h["vo"];var O=I;if(__map_reserved["op"]!=null){O.setReserved("op",F)}else{O.h["op"]=F}var j=openfl_utils_AGALMiniAssembler.REGMAP;var G=openfl_utils_AGALMiniAssembler.REGMAP;var H=__map_reserved["vi"]!=null?G.getReserved("vi"):G.h["vi"];var U=j;if(__map_reserved["i"]!=null){U.setReserved("i",H)}else{U.h["i"]=H}var N=openfl_utils_AGALMiniAssembler.REGMAP;var W=openfl_utils_AGALMiniAssembler.REGMAP;var V=__map_reserved["vi"]!=null?W.getReserved("vi"):W.h["vi"];var z=N;if(__map_reserved["v"]!=null){z.setReserved("v",V)}else{z.h["v"]=V}var X=openfl_utils_AGALMiniAssembler.REGMAP;var Y=openfl_utils_AGALMiniAssembler.REGMAP;var J=__map_reserved["fo"]!=null?Y.getReserved("fo"):Y.h["fo"];var K=X;if(__map_reserved["oc"]!=null){K.setReserved("oc",J)}else{K.h["oc"]=J}var q=openfl_utils_AGALMiniAssembler.REGMAP;var Z=openfl_utils_AGALMiniAssembler.REGMAP;var Q=__map_reserved["fd"]!=null?Z.getReserved("fd"):Z.h["fd"];var ee=q;if(__map_reserved["od"]!=null){ee.setReserved("od",Q)}else{ee.h["od"]=Q}var te=openfl_utils_AGALMiniAssembler.REGMAP;var ie=openfl_utils_AGALMiniAssembler.REGMAP;var se=__map_reserved["vi"]!=null?ie.getReserved("vi"):ie.h["vi"];var ae=te;if(__map_reserved["fi"]!=null){ae.setReserved("fi",se)}else{ae.h["fi"]=se}},match:function(e,t){var i=[];var s=0;var a;while(t.matchSub(e,s)){a=t.matched(0);i.push(a);s=t.matchedPos().pos+a.length}return i},__class__:openfl_utils_AGALMiniAssembler};var openfl_utils__$AGALMiniAssembler_OpCode=function(e,t,i,s){this.name=e;this.numRegister=t;this.emitCode=i;this.flags=s};$hxClasses["openfl.utils._AGALMiniAssembler.OpCode"]=openfl_utils__$AGALMiniAssembler_OpCode;openfl_utils__$AGALMiniAssembler_OpCode.__name__=["openfl","utils","_AGALMiniAssembler","OpCode"];openfl_utils__$AGALMiniAssembler_OpCode.prototype={emitCode:null,flags:null,name:null,numRegister:null,toString:function(){return'[OpCode name="'+this.name+'", numRegister='+this.numRegister+", emitCode="+this.emitCode+", flags="+this.flags+"]"},__class__:openfl_utils__$AGALMiniAssembler_OpCode};var openfl_utils__$AGALMiniAssembler_Register=function(e,t,i,s,a){this.name=e;this.longName=t;this.emitCode=i;this.range=s;this.flags=a};$hxClasses["openfl.utils._AGALMiniAssembler.Register"]=openfl_utils__$AGALMiniAssembler_Register;openfl_utils__$AGALMiniAssembler_Register.__name__=["openfl","utils","_AGALMiniAssembler","Register"];openfl_utils__$AGALMiniAssembler_Register.prototype={emitCode:null,name:null,longName:null,flags:null,range:null,toString:function(){return'[Register name="'+this.name+'", longName="'+this.longName+'", emitCode='+Std.string(_$UInt_UInt_$Impl_$.toFloat(this.emitCode))+", range="+Std.string(_$UInt_UInt_$Impl_$.toFloat(this.range))+", flags="+Std.string(_$UInt_UInt_$Impl_$.toFloat(this.flags))+"]"},__class__:openfl_utils__$AGALMiniAssembler_Register};var openfl_utils__$AGALMiniAssembler_Sampler=function(e,t,i){this.name=e;this.flag=t;this.mask=i};$hxClasses["openfl.utils._AGALMiniAssembler.Sampler"]=openfl_utils__$AGALMiniAssembler_Sampler;openfl_utils__$AGALMiniAssembler_Sampler.__name__=["openfl","utils","_AGALMiniAssembler","Sampler"];openfl_utils__$AGALMiniAssembler_Sampler.prototype={flag:null,mask:null,name:null,__class__:openfl_utils__$AGALMiniAssembler_Sampler};var openfl_utils_IAssetCache=function(){};$hxClasses["openfl.utils.IAssetCache"]=openfl_utils_IAssetCache;openfl_utils_IAssetCache.__name__=["openfl","utils","IAssetCache"];openfl_utils_IAssetCache.prototype={get_enabled:null,getBitmapData:null,hasBitmapData:null,removeBitmapData:null,setBitmapData:null,__class__:openfl_utils_IAssetCache,__properties__:{get_enabled:"get_enabled"}};var openfl_utils_AssetCache=function(){this.__enabled=true;this.bitmapData=new haxe_ds_StringMap;this.font=new haxe_ds_StringMap;this.sound=new haxe_ds_StringMap};$hxClasses["openfl.utils.AssetCache"]=openfl_utils_AssetCache;openfl_utils_AssetCache.__name__=["openfl","utils","AssetCache"];openfl_utils_AssetCache.__interfaces__=[openfl_utils_IAssetCache];openfl_utils_AssetCache.prototype={bitmapData:null,font:null,sound:null,__enabled:null,getBitmapData:function(e){var t=this.bitmapData;if(__map_reserved[e]!=null){return t.getReserved(e)}else{return t.h[e]}},hasBitmapData:function(e){var t=this.bitmapData;if(__map_reserved[e]!=null){return t.existsReserved(e)}else{return t.h.hasOwnProperty(e)}},removeBitmapData:function(e){lime_utils_Assets.cache.image.remove(e);return this.bitmapData.remove(e)},setBitmapData:function(e,t){var i=this.bitmapData;if(__map_reserved[e]!=null){i.setReserved(e,t)}else{i.h[e]=t}},get_enabled:function(){return this.__enabled},__class__:openfl_utils_AssetCache,__properties__:{get_enabled:"get_enabled"}};var openfl_utils_Assets=function(){};$hxClasses["openfl.utils.Assets"]=openfl_utils_Assets;openfl_utils_Assets.__name__=["openfl","utils","Assets"];openfl_utils_Assets.exists=function(e,t){return lime_utils_Assets.exists(e,t)};openfl_utils_Assets.getBitmapData=function(e,t){if(t==null){t=true}if(t&&openfl_utils_Assets.cache.get_enabled()&&openfl_utils_Assets.cache.hasBitmapData(e)){var i=openfl_utils_Assets.cache.getBitmapData(e);if(openfl_utils_Assets.isValidBitmapData(i)){return i}}var s=lime_utils_Assets.getImage(e,false);if(s!=null){var a=openfl_display_BitmapData.fromImage(s);if(t&&openfl_utils_Assets.cache.get_enabled()){openfl_utils_Assets.cache.setBitmapData(e,a)}return a}return null};openfl_utils_Assets.hasLibrary=function(e){return lime_utils_Assets.hasLibrary(e)};openfl_utils_Assets.isValidBitmapData=function(e){return e!=null&&e.image!=null};openfl_utils_Assets.registerLibrary=function(e,t){lime_utils_Assets.registerLibrary(e,t)};openfl_utils_Assets.unloadLibrary=function(e){lime_utils_Assets.unloadLibrary(e)};var openfl_utils__$ByteArray_ByteArray_$Impl_$={};$hxClasses["openfl.utils._ByteArray.ByteArray_Impl_"]=openfl_utils__$ByteArray_ByteArray_$Impl_$;openfl_utils__$ByteArray_ByteArray_$Impl_$.__name__=["openfl","utils","_ByteArray","ByteArray_Impl_"];openfl_utils__$ByteArray_ByteArray_$Impl_$.__properties__={set_length:"set_length",get_length:"get_length"};openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes=function(e){if(e==null){return null}if(js_Boot.__instanceof(e,openfl_utils_ByteArrayData)){return e}else{return openfl_utils_ByteArrayData.fromBytes(e)}};openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes=function(e){return e};openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length=function(e){if(e==null){return 0}else{return e.length}};openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length=function(e,t){if(t>0){e.__resize(t);if(t<e.position){e.position=t}}e.length=t;return t};var openfl_utils_IDataOutput=function(){};$hxClasses["openfl.utils.IDataOutput"]=openfl_utils_IDataOutput;openfl_utils_IDataOutput.__name__=["openfl","utils","IDataOutput"];openfl_utils_IDataOutput.prototype={__class__:openfl_utils_IDataOutput};var openfl_utils_IDataInput=function(){};$hxClasses["openfl.utils.IDataInput"]=openfl_utils_IDataInput;openfl_utils_IDataInput.__name__=["openfl","utils","IDataInput"];openfl_utils_IDataInput.prototype={__class__:openfl_utils_IDataInput};var openfl_utils_ByteArrayData=function(e){if(e==null){e=0}var t=new haxe_io_Bytes(new ArrayBuffer(e));haxe_io_Bytes.call(this,t.b.buffer);this.__length=e;if(openfl_utils_ByteArrayData.__defaultEndian==null){if(lime_system_System.get_endianness()==lime_system_Endian.LITTLE_ENDIAN){openfl_utils_ByteArrayData.__defaultEndian=1}else{openfl_utils_ByteArrayData.__defaultEndian=0}}this.__endian=openfl_utils_ByteArrayData.__defaultEndian;this.objectEncoding=openfl_utils_ByteArrayData.defaultObjectEncoding;this.position=0};$hxClasses["openfl.utils.ByteArrayData"]=openfl_utils_ByteArrayData;openfl_utils_ByteArrayData.__name__=["openfl","utils","ByteArrayData"];openfl_utils_ByteArrayData.__interfaces__=[openfl_utils_IDataOutput,openfl_utils_IDataInput];openfl_utils_ByteArrayData.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};openfl_utils_ByteArrayData.fromBytes=function(e){var t=new openfl_utils_ByteArrayData;t.__fromBytes(e);return t};openfl_utils_ByteArrayData.get_defaultEndian=function(){if(openfl_utils_ByteArrayData.__defaultEndian==null){if(lime_system_System.get_endianness()==lime_system_Endian.LITTLE_ENDIAN){openfl_utils_ByteArrayData.__defaultEndian=1}else{openfl_utils_ByteArrayData.__defaultEndian=0}}return openfl_utils_ByteArrayData.__defaultEndian};openfl_utils_ByteArrayData.set_defaultEndian=function(e){return openfl_utils_ByteArrayData.__defaultEndian=e};openfl_utils_ByteArrayData.__super__=haxe_io_Bytes;openfl_utils_ByteArrayData.prototype=$extend(haxe_io_Bytes.prototype,{objectEncoding:null,position:null,__endian:null,__length:null,readByte:function(){var e=this.readUnsignedByte();if((e&128)!=0){return e-256}else{return e}},readBytes:function(e,t,i){if(i==null){i=0}if(t==null){t=0}if(i==0){i=this.length-this.position}if(this.position+i>this.length){throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}if(e.length<t+i){e.__resize(t+i)}e.blit(t,this,this.position,i);this.position+=i},readInt:function(){var e=this.readUnsignedByte();var t=this.readUnsignedByte();var i=this.readUnsignedByte();var s=this.readUnsignedByte();if(this.__endian==1){return s<<24|i<<16|t<<8|e}else{return e<<24|t<<16|i<<8|s}},readUnsignedByte:function(){if(this.position<this.length){return this.b[this.position++]}else{throw new js__$Boot_HaxeError(new openfl_errors_EOFError)}},readUnsignedInt:function(){var e=this.readUnsignedByte();var t=this.readUnsignedByte();var i=this.readUnsignedByte();var s=this.readUnsignedByte();if(this.__endian==1){return s<<24|i<<16|t<<8|e}else{return e<<24|t<<16|i<<8|s}},readUnsignedShort:function(){var e=this.readUnsignedByte();var t=this.readUnsignedByte();if(this.__endian==1){return(t<<8)+e}else{return e<<8|t}},readUTF:function(){var e=this.readUnsignedShort();return this.readUTFBytes(e)},readUTFBytes:function(e){if(this.position+e>this.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,i){if(i==null){i=0}if(t==null){t=0}if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)==0){return}if(i==0){i=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(e)-t}this.__resize(this.position+i);this.blit(this.position,e,t,i);this.position=this.position+i},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(t))},__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 i=this.length;this.length=this.__length;t.blit(0,this,0,this.__length);this.length=i}this.b=t.b;this.__length=t.length;this.data=t.data}if(this.length<e){this.length=e}},__class__:openfl_utils_ByteArrayData});var openfl_utils__$Object_Object_$Impl_$={};$hxClasses["openfl.utils._Object.Object_Impl_"]=openfl_utils__$Object_Object_$Impl_$;openfl_utils__$Object_Object_$Impl_$.__name__=["openfl","utils","_Object","Object_Impl_"];openfl_utils__$Object_Object_$Impl_$.iterator=function(e){var t=Reflect.fields(e);if(t==null){t=[]}return HxOverrides.iter(t)};var haxe_lang_Iterator=function(){};$hxClasses["haxe.lang.Iterator"]=haxe_lang_Iterator;haxe_lang_Iterator.__name__=["haxe","lang","Iterator"];haxe_lang_Iterator.prototype={hasNext:null,next:null,__class__:haxe_lang_Iterator};var haxe_lang_Iterable=function(){};$hxClasses["haxe.lang.Iterable"]=haxe_lang_Iterable;haxe_lang_Iterable.__name__=["haxe","lang","Iterable"];haxe_lang_Iterable.prototype={iterator:null,__class__:haxe_lang_Iterable};var openfl_utils_Timer=function(e,t){if(t==null){t=0}if(isNaN(e)||e<0){throw new js__$Boot_HaxeError(new openfl_errors_Error("The delay specified is negative or not a finite number"))}openfl_events_EventDispatcher.call(this);this.__delay=e;this.__repeatCount=t;this.running=false;this.currentCount=0};$hxClasses["openfl.utils.Timer"]=openfl_utils_Timer;openfl_utils_Timer.__name__=["openfl","utils","Timer"];openfl_utils_Timer.__super__=openfl_events_EventDispatcher;openfl_utils_Timer.prototype=$extend(openfl_events_EventDispatcher.prototype,{currentCount:null,running:null,__delay:null,__repeatCount:null,__timerID:null,start:function(){if(!this.running){this.running=true;this.__timerID=window.setInterval($bind(this,this.timer_onTimer),this.__delay|0)}},stop:function(){this.running=false;if(this.__timerID!=null){window.clearInterval(this.__timerID);this.__timerID=null}},set_delay:function(e){this.__delay=e;if(this.running){this.stop();this.start()}return this.__delay},timer_onTimer:function(){this.currentCount++;if(this.__repeatCount>0&&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 i=new openfl_text_TextFormat;i.color=0;i.font="Courier";i.size=10;i.align=3;t.setTextFormat(i);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 i="Open Flash Chart\n\n";i+="JSON Parse Error ["+t.message+"]\n";var s=e.indexOf("\n",t.errorID);var a=HxOverrides.substr(e,0,s);var r=a.split("\n");i+="Error at character "+t.errorID+", line "+r.length+":\n\n";var n=3;while(n>0){if(r.length-n>-1){i+=Std.string(r.length-n)+": "+r[r.length-n]}--n}trcharts_ErrorMsg.call(this,i)};$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 i=0;while(i<t.length){if(Reflect.field(t[i],"type")=="pie"){return true}++i}return false};trcharts_JsonInspector.is_radar=function(e){if(Reflect.field(e,"radar_axis")!=null){return true}return false};var trcharts_NumberFormat=function(e,t,i,s){this.isThousandSeparatorDisabled=false;this.isDecimalSeparatorComma=false;this.isFixedNumDecimalsForced=false;this.numDecimals=trcharts_NumberFormat.DEFAULT_NUM_DECIMALS;this.numDecimals=trcharts_Parser.getNumberValue(e,trcharts_NumberFormat.DEFAULT_NUM_DECIMALS,true,false);this.isFixedNumDecimalsForced=trcharts_Parser.getBooleanValue(t,false);this.isDecimalSeparatorComma=trcharts_Parser.getBooleanValue(i,false);this.isThousandSeparatorDisabled=trcharts_Parser.getBooleanValue(s,false)};$hxClasses["trcharts.NumberFormat"]=trcharts_NumberFormat;trcharts_NumberFormat.__name__=["trcharts","NumberFormat"];trcharts_NumberFormat.getInstance=function(e){if(trcharts_NumberFormat._instance==null){var t={num_decimals:2,is_fixed_num_decimals_forced:0,is_decimal_separator_comma:0,is_thousand_separator_disabled:0};trcharts_Object_$helper.merge_2(e,t);trcharts_NumberFormat._instance=new trcharts_NumberFormat(t.num_decimals,t.is_fixed_num_decimals_forced==1,t.is_decimal_separator_comma==1,t.is_thousand_separator_disabled==1)}return trcharts_NumberFormat._instance};trcharts_NumberFormat.getInstanceY2=function(e){if(trcharts_NumberFormat._instanceY2==null){var t={num_decimals:2,is_fixed_num_decimals_forced:0,is_decimal_separator_comma:0,is_thousand_separator_disabled:0};trcharts_Object_$helper.merge_2(e,t);trcharts_NumberFormat._instanceY2=new trcharts_NumberFormat(t.num_decimals,t.is_fixed_num_decimals_forced==1,t.is_decimal_separator_comma==1,t.is_thousand_separator_disabled==1)}return trcharts_NumberFormat._instanceY2};trcharts_NumberFormat.prototype={numDecimals:null,isFixedNumDecimalsForced:null,isDecimalSeparatorComma:null,isThousandSeparatorDisabled:null,__class__:trcharts_NumberFormat};var trcharts_NumberUtils=function(){};$hxClasses["trcharts.NumberUtils"]=trcharts_NumberUtils;trcharts_NumberUtils.__name__=["trcharts","NumberUtils"];trcharts_NumberUtils.formatNumber=function(e){var t=trcharts_NumberFormat.getInstance(null);return trcharts_NumberUtils.format(e,t.numDecimals,t.isFixedNumDecimalsForced,t.isDecimalSeparatorComma,t.isThousandSeparatorDisabled)};trcharts_NumberUtils.format=function(e,t,i,s,a){if(isNaN(t)){t=4}e=Math.round(e*Math.pow(10,t))/Math.pow(10,t);var r="";var n;if(e<0){n=Std.string(-e).split(".")}else{n=(e==null?"null":""+e).split(".")}var _=n[0];var o=0;var l=0;l=_.length-1;while(l>-1){if(o%3==0&&r.length>0){r=","+r;o=0}++o;r=HxOverrides.substr(_,l,1)+r;--l}if(n[1]!=null){if(i){n[1]+="0000000000000000"}r+="."+Std.string(n[1].substr(0,t))}else if(i&&t>0){n[1]="0000000000000000";r+="."+Std.string(n[1].substr(0,t))}if(e<0){r="-"+r}if(a){r=StringTools.replace(r,",","")}if(s){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 i=Reflect.fields(t);var s=0;while(s<i.length){var a=i[s];++s;if(Reflect.field(e,a)==null){e[a]=Reflect.field(t,a)}}return e};trcharts_Object_$helper.merge_2=function(e,t){var i=e;var s=Reflect.fields(e);if(s!=null){var a=0;while(a<s.length){var r=s[a];++a;t[r]=Reflect.field(e,r)}}};var trcharts_Parser=function(){};$hxClasses["trcharts.Parser"]=trcharts_Parser;trcharts_Parser.__name__=["trcharts","Parser"];trcharts_Parser.isEmptyValue=function(e){return false};trcharts_Parser.getStringValue=function(e,t,i){if(trcharts_Parser.isEmptyValue(t)){t=""}if(trcharts_Parser.isEmptyValue(e)){return t}if(!i&&e==null){return t}return Std.string(e)};trcharts_Parser.getNumberValue=function(e,t,i,s){if(trcharts_Parser.isEmptyValue(t)||isNaN(t)){t=0}if(trcharts_Parser.isEmptyValue(e)){return t}var a=parseFloat(e);if(isNaN(a)){return t}if(!i&&a==0){return t}if(!s&&a<0){return t}return a};trcharts_Parser.getBooleanValue=function(e,t){if(trcharts_Parser.isEmptyValue(e)){return t}var i=parseFloat(e);if(!isNaN(i)){if(i==0){return false}else{return true}}var s=trcharts_Parser.getStringValue(e,"false",false);s=s.toLowerCase();if(s.indexOf("true")!=-1){return true}else{return false}};var trcharts_Dictionary=function(e){if(e==null){e=false}};$hxClasses["trcharts.Dictionary"]=trcharts_Dictionary;trcharts_Dictionary.__name__=["trcharts","Dictionary"];trcharts_Dictionary.prototype={__class__:trcharts_Dictionary};var trcharts_Properties=function(e,t){this._props=new trcharts_Dictionary;this._parent=t;var i=Reflect.fields(e);var s=0;while(s<i.length){var a=i[s];++s;this._props[a]=Reflect.field(e,a)}};$hxClasses["trcharts.Properties"]=trcharts_Properties;trcharts_Properties.__name__=["trcharts","Properties"];trcharts_Properties.prototype={_props:null,_parent:null,get:function(e){if(Object.prototype.hasOwnProperty.call(this._props,e)){return Reflect.field(this._props,e)}if(this._parent!=null){return this._parent.get(e)}var t=new openfl_errors_Error;var i=t.getStackTrace();return-Infinity},get_colour:function(e){return trcharts_string_Utils.get_colour(this.get(e))},set:function(e,t){this._props[e]=t},has:function(e){if(Reflect.field(this._props,e)==null){if(this._parent!=null){return this._parent.has(e)}else{return false}}else{return true}},set_parent:function(e){if(this._parent!=null){e.set_parent(this._parent)}this._parent=e},die:function(){if(this._parent!=null){this._parent.die()}var e=this._props;var t=0;while(t<e.length){var i=e[t];++t;this._props[i]=null}this._parent=null},__class__:trcharts_Properties};var trcharts_Range=function(e,t,i,s){this.min=e;this.max=t;this.step=i;this.offset=s};$hxClasses["trcharts.Range"]=trcharts_Range;trcharts_Range.__name__=["trcharts","Range"];trcharts_Range.prototype={min:null,max:null,step:null,offset:null,count:function(){if(this.offset){return this.max-this.min+1}else{return this.max-this.min}},__class__:trcharts_Range};var trcharts_ScreenCoordsBase=function(e,t,i,s){this.top=e;this.left=t;this.right=i;this.bottom=s;this.width=this.right-this.left;this.height=s-e};$hxClasses["trcharts.ScreenCoordsBase"]=trcharts_ScreenCoordsBase;trcharts_ScreenCoordsBase.__name__=["trcharts","ScreenCoordsBase"];trcharts_ScreenCoordsBase.prototype={top:null,left:null,right:null,bottom:null,width:null,height:null,get_center_x:function(){return this.width/2+this.left},get_center_y:function(){return this.height/2+this.top},get_y_from_val:function(e,t){if(t==null){t=false}return-1},get_x_from_val:function(e){return-1},get_get_x_from_pos_and_y_from_val:function(e,t,i){if(i==null){i=false}return null},get_y_bottom:function(e){if(e==null){e=false}return-1},__class__:trcharts_ScreenCoordsBase};var trcharts_ScreenCoords=function(e,t,i,s,a,r,n,_,o,l){trcharts_ScreenCoordsBase.call(this,e,t,i,s);var h=t;this.x_range=n;this.y_range=a;this.y_right_range=r;if(this.x_range!=null){i=this.jiggle(t,i,o,n.count());h=this.shrink_left(t,i,_,n.count())}this.top=e;this.left=Math.max(t,h);this.right=Math.floor(i);this.bottom=s;this.width=this.right-this.left;this.height=s-e;if(l){this.tick_offset=12}else{this.tick_offset=0}if(n!=null){this.x_offset=n.offset}if(a!=null){this.y_offset=a.offset}this.bar_groups=1};$hxClasses["trcharts.ScreenCoords"]=trcharts_ScreenCoords;trcharts_ScreenCoords.__name__=["trcharts","ScreenCoords"];trcharts_ScreenCoords.__super__=trcharts_ScreenCoordsBase;trcharts_ScreenCoords.prototype=$extend(trcharts_ScreenCoordsBase.prototype,{x_range:null,y_range:null,y_right_range:null,tick_offset:null,x_offset:null,y_offset:null,bar_groups:null,jiggle:function(e,t,i,s){return t-i/2},shrink_left:function(e,t,i,s){var a=0;if(i!=0){var r=(t-e)/s;a=e+r/2;var n=e;while(a-i/2<0){++n;r=(t-n)/s;a=n+r/2}e=n}return e},get_y_bottom:function(e){if(e==null){e=false}var t=e?this.y_right_range:this.y_range;var i=t.min;var s=t.max;i=Math.min(i,s);return this.get_y_from_val(Math.max(0,i),e)},get_y_from_val:function(e,t){if(t==null){t=false}var i=t?this.y_right_range:this.y_range;var s=this.height/i.count();var a=0;if(this.y_offset){a=s/2}return this.bottom-a-(i.min-e)*s*-1},get_get_x_from_pos_and_y_from_val:function(e,t,i){if(i==null){i=false}return new openfl_geom_Point(this.get_x_from_pos(e),this.get_y_from_val(t,i))},width_:function(){return this.right-this.left_()},left_:function(){var e=this.tick_offset;return this.left+e},get_x_from_val:function(e){var t=this.x_range.min>this.x_range.max;var i=this.x_range.count();i+=t&&this.x_range.offset?-2:0;var s=this.width_()/i;var a=e-this.x_range.min;var r=0;if(this.x_offset){r=Math.abs(s/2)}return this.left_()+r+a*s},get_x_from_pos:function(e){var t=this.x_range.min>this.x_range.max;var i=this.x_range.count();i+=t&&this.x_range.offset?-2:0;var s=Math.abs(this.width_()/i);var a=0;if(this.x_offset){a=s/2}return this.left_()+a+e*s},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 i=this.width_()/this.x_range.count();var s=i*.8;var a=0;if(this.x_offset){a=i}var r=s/this.bar_groups;var n=this.left_()+(a-s)/2;var _=n+e*i;_+=r*t;return{x:_,width:r}},get_horiz_bar_coords:function(e,t){var i=this.height/this.y_range.count();var s=i*.8;var a=s/this.bar_groups;var r=this.top+(i-s)/2;var n=r+e*i;n+=a*t;return{y:n,width:a}},__class__:trcharts_ScreenCoords});var trcharts_ScreenCoordsRadar=function(e,t,i,s){this.TO_RADIANS=Math.PI/180;trcharts_ScreenCoordsBase.call(this,e,t,i,s);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 i=(e-90)*this.TO_RADIANS;var s=this.get_radius()*t;var a=new openfl_geom_Point(s*Math.cos(i),s*Math.sin(i));return a},get_get_x_from_pos_and_y_from_val:function(e,t,i){if(i==null){i=false}var s=this.get_pos(this.angle*e,t/this.range.count());s.x+=this.get_center_x();s.y+=this.get_center_y();return s},get_y_from_val:function(e,t){if(t==null){t=false}var i=this.get_pos(0,e/this.range.count());i.y+=this.get_center_y();return i.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 i=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 i=this._realHeight;i-=this.x_legend.get_height()+this.x_axis.get_height();var s=this._realWidth;s-=this.y_legend_2.get_width();s-=this.y_axis_right.get_width();this.sc=new trcharts_ScreenCoords(t,e,s,i,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 i=false;try{e=JSON.parse(t);i=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(i){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 i=0;var s=this.obs.sets;while(i<s.length){var a=s[i];++i;this.addChild(a)}this.addChild(this.tooltip);if(Reflect.field(e,"menu")!=null){this.menu=new trcharts_elements_menu_Menu("99",Reflect.field(e,"menu"));this.addChild(this.menu)}this.ok=true;this.resize()},build_chart_background:function(e){this.obs=trcharts_charts_Factory.MakeChart(e,this);this.x_legend=new trcharts_elements_labels_XLegend(e.x_legend,this);this.y_legend=new trcharts_elements_labels_YLegendLeft(e);this.y_legend_2=new trcharts_elements_labels_YLegendRight(e);this.x_axis=new trcharts_elements_axis_XAxis(e,this.obs.get_min_x(),this.obs.get_max_x());this.y_axis=new trcharts_elements_axis_YAxisLeft;this.y_axis_right=new trcharts_elements_axis_YAxisRight;var t=this._g;t.x_labels=this.x_axis.labels;t.x_legend=this.x_legend;this.obs.tooltip_replace_labels(this.x_axis.labels);this.keys=new trcharts_elements_labels_Keys(this.obs);this.addChild(this.x_legend);this.addChild(this.y_legend);this.addChild(this.y_legend_2);this.addChild(this.y_axis);this.addChild(this.y_axis_right);this.addChild(this.x_axis);this.addChild(this.keys);this.y_axis.init(e);this.y_axis_right.init(e)},die:function(){this.obs.die();this.obs=null;if(this.tooltip!=null){this.tooltip.die()}if(this.x_legend!=null){this.x_legend.die()}if(this.y_legend!=null){this.y_legend.die()}if(this.y_legend_2!=null){this.y_legend_2.die()}if(this.y_axis!=null){this.y_axis.die()}if(this.y_axis_right!=null){this.y_axis_right.die()}if(this.x_axis!=null){this.x_axis.die()}if(this.keys!=null){this.keys.die()}if(this.title!=null){this.title.die()}if(this.radar_axis!=null){this.radar_axis.die()}if(this.background!=null){this.background.die()}this.tooltip=null;this.x_legend=null;this.y_legend=null;this.y_legend_2=null;this.y_axis=null;this.y_axis_right=null;this.x_axis=null;this.keys=null;this.title=null;this.radar_axis=null;this.background=null;while(this.get_numChildren()>0)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 i=5;var s=0;while(s<e.length){var a=e[s];++s;var r=this.make_one_tip(a,i);t=Math.max(t,r.height);i+=r.width+2}this.get_graphics().lineStyle(this.style.stroke,this.style.colour,1);this.get_graphics().beginFill(this.style.background,1);this.get_graphics().drawRoundRect(0,0,this.get_width()+10,t+5,this.style.rounded,this.style.rounded)},make_one_tip:function(e,t){var i=e.get_tooltip();var s=i.split("<br>");var a=5;var r=0;if(s.length>1){var n=this.make_title(s.shift());n.mouseEnabled=false;n.set_selectable(false);n.set_x(t);n.set_y(a);a+=n.get_height();r=n.get_width();this.addChild(n)}var _=this.make_body(s.join("\n"));_.mouseEnabled=false;_.set_selectable(false);_.set_x(t);_.set_y(a);r=Math.max(r,_.get_width());this.addChild(_);a+=_.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 i=new openfl_text_TextFormat;i.color=this.style.title.color;i.font="Verdana";i.bold=this.style.title.font_weight=="bold";i.size=this.style.title.font_size;t.setTextFormat(i);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 i=new openfl_text_TextFormat;i.color=this.style.body.color;i.font="Verdana";i.bold=this.style.body.font_weight=="bold";i.size=this.style.body.font_size;i.align=3;t.setTextFormat(i);t.set_autoSize(1);return t},get_pos:function(e){var t=e.get_tip_pos();var i=t.x+this.get_width()+16>this.stage.stageWidth?this.stage.stageWidth-this.get_width()-16:t.x;var s=t.y;s-=4;s-=this.get_height()+10;if(s<0){s=0}return new openfl_geom_Point(i,s)},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(t<e.length){var i=e[t];++t;if(this.cached_elements.indexOf(i)==-1){return false}}return true},untip:function(){var e=0;var t=this.cached_elements;while(e<t.length){var i=t[e];++e;i.set_tip(false)}},tip:function(){var e=0;var t=this.cached_elements;while(e<t.length){var i=t[e];++e;i.set_tip(true)}},hideAway:function(){this.set_visible(false);this.untip();this.cached_elements=[];this.set_alpha(1)},hide:function(){this.tip_showing=false;motion_Actuate.tween(this,1,{alpha:0}).ease(motion_easing_Expo.get_easeOut()).onComplete($bind(this,this.hideAway))},get_tip_style:function(){return this.tip_style},set_tip_style:function(e){this.tip_style=e},die:function(){this.set_filters([]);this.get_graphics().clear();while(this.get_numChildren()>0)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 i=this.get_numChildren();while(t<i){var s=t++;if(js_Boot.__instanceof(this.getChildAt(s),trcharts_charts_series_Element)){var a=js_Boot.__cast(this.getChildAt(s),trcharts_charts_series_Element);e=Math.max(e,a.get_x())}}return e},get_min_x:function(){var e=1e6;var t=0;var i=this.get_numChildren();while(t<i){var s=t++;if(js_Boot.__instanceof(this.getChildAt(s),trcharts_charts_series_Element)){var a=js_Boot.__cast(this.getChildAt(s),trcharts_charts_series_Element);e=Math.min(e,a.get_x())}}return e},resize:function(e){},closest_2:function(e,t){var i=this.closest_x(e);var s=this.get_all_at_this_x_pos(i);var a=this.get_closest_y(s,t);return a},closest_x:function(e){var t=179e306;var i;var s=0;var a;var r=0;var n=this.get_numChildren();while(r<n){var _=r++;if(js_Boot.__instanceof(this.getChildAt(_),trcharts_charts_series_Element)){var o=js_Boot.__cast(this.getChildAt(_),trcharts_charts_series_Element);i=o.get_mid_point();a=Math.abs(e-i.x);if(a<t){t=a;s=i.x}}}return s},get_all_at_this_x_pos:function(e){var t=[];var i;var s;var a=0;var r=this.get_numChildren();while(a<r){var n=a++;if(js_Boot.__instanceof(this.getChildAt(n),trcharts_charts_series_Element)){s=js_Boot.__cast(this.getChildAt(n),trcharts_charts_series_Element);i=s.get_mid_point();if(i.x==e){t.push(s)}}}return t},get_closest_y:function(e,t){var i=179e306;var s;var a=[];var r;var n;var _=0;while(_<e.length){var o=e[_];++_;r=o.get_mid_point();s=Math.abs(t-r.y);i=Math.min(s,i)}var l=0;while(l<e.length){var h=e[l];++l;r=h.get_mid_point();s=Math.abs(t-r.y);if(s==i){a.push(h)}}return a},mouse_proximity:function(e,t){var i=179e306;var s;var a;var r;var n=new openfl_geom_Point(e,t);var _=0;var o=this.get_numChildren();while(_<o){var l=_++;if(js_Boot.__instanceof(this.getChildAt(l),trcharts_charts_series_Element)){r=js_Boot.__cast(this.getChildAt(l),trcharts_charts_series_Element);i=Math.min(openfl_geom_Point.distance(r.get_mid_point(),n),i)}}var h=[];var c=0;var u=this.get_numChildren();while(c<u){var f=c++;if(js_Boot.__instanceof(this.getChildAt(f),trcharts_charts_series_Element)){r=js_Boot.__cast(this.getChildAt(f),trcharts_charts_series_Element);if(openfl_geom_Point.distance(r.get_mid_point(),n)==i){h.push(r)}}}return h},mouse_out:function(){var e=0;var t=this.get_numChildren();while(e<t){var i=e++;if(js_Boot.__instanceof(this.getChildAt(i),trcharts_charts_series_Element)){var s=js_Boot.__cast(this.getChildAt(i),trcharts_charts_series_Element);s.set_tip(false)}}},get_element:function(e,t){return null},add_values:function(){var e=0;var t=0;var i=this.values;while(t<i.length){var s=i[t];++t;var a;if(s!=null){a=this.get_element(e,s);if(a!=null&&a.line_mask!=null){this.addChild(a.line_mask)}this.addChild(a)}++e}},tooltip_replace_labels:function(e){var t=0;var i=this.get_numChildren();while(t<i){var s=t++;if(js_Boot.__instanceof(this.getChildAt(s),trcharts_charts_series_Element)){var a=js_Boot.__cast(this.getChildAt(s),trcharts_charts_series_Element);a.tooltip_replace_labels(e)}}},die:function(){var e=0;var t=this.get_numChildren();while(e<t){var i=e++;if(js_Boot.__instanceof(this.getChildAt(i),trcharts_charts_series_Element)){var s=js_Boot.__cast(this.getChildAt(i),trcharts_charts_series_Element);s.die()}}while(this.get_numChildren()>0)this.removeChildAt(0)},__class__:trcharts_charts_Base});var trcharts_charts_Line=function(e,t){trcharts_charts_Base.call(this,t);var i=new trcharts_Properties({values:[],width:2,colour:"#3030d0",text:"","font-size":12,tip:"#val#",loop:false,axis:"left"});this.props=new trcharts_Properties(e,i);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 s=new trcharts_Properties({type:"none",cascade:.5,delay:0});this.on_show=new trcharts_Properties(Reflect.field(e,"on-show"),s);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 i=new trcharts_Properties(t,this.dot_style);i.set("tip",i.get("tip").replace("#key#",this.key));i.set("on-show",this.on_show);return trcharts_charts_series_dots_Dot_$factory.make(e,i)},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<this.get_numChildren()){t=js_Boot.__cast(this.getChildAt(e),openfl_display_Sprite);if(js_Boot.__instanceof(t,trcharts_charts_series_dots_PointDotBase)){var i=js_Boot.__cast(t,trcharts_charts_series_dots_PointDotBase);if(i.is_tweening()){return true}}++e}return false},draw:function(){this.get_graphics().clear();this.draw_line()},draw_line:function(){var e=this.props.get_colour("width");var t=this.props.get_colour("colour");this.get_graphics().lineStyle(e,t);if(this.line_style.style!="solid"){this.dash_line()}else{this.solid_line()}},move_dots:function(e){var t;var i;t=0;while(t<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(t),openfl_display_Sprite);if(js_Boot.__instanceof(i,trcharts_charts_series_Element)){var s=js_Boot.__cast(i,trcharts_charts_series_Element);s.resize(e)}++t}},solid_line:function(){var e=true;var t=0;var i;var s=0;var a=0;t=0;while(t<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(t),openfl_display_Sprite);if(js_Boot.__instanceof(i,trcharts_charts_series_Element)){var r=js_Boot.__cast(i,trcharts_charts_series_Element);if(e){this.get_graphics().moveTo(r.get_x(),r.get_y());s=r.get_x();a=r.get_y();e=false}else{this.get_graphics().lineTo(r.get_x(),r.get_y())}}++t}if(this.props.get("loop")){this.get_graphics().lineTo(s,a)}},dash_line:function(){var e=true;var t=0;var i=0;var s=0;var a=0;var r=this.line_style.on;var n=this.line_style.off;var _=true;var o=0;var l=0;var h=0;var c=0;var u=0;var f=this.get_numChildren();while(u<f){var p=u++;var d=js_Boot.__cast(this.getChildAt(p),openfl_display_Sprite);if(js_Boot.__instanceof(d,trcharts_charts_series_Element)){var g=js_Boot.__cast(d,trcharts_charts_series_Element);if(e){this.get_graphics().moveTo(g.get_x(),g.get_y());s=r;a=n;_=true;e=false;t=g.get_x();i=g.get_y();o=t;h=i}else{var m=Math.sqrt((g.get_x()-t)*(g.get_x()-t)+(g.get_y()-i)*(g.get_y()-i));var v=(g.get_y()-i)*.1/(m*.1);var b=(g.get_x()-t)*.1/(m*.1);var y=m;var x=true;while(x)if(_){if(s<y){l=o+s*b;c=h+s*v;o=l;h=c;y-=s;_=false;a=n}else{l=g.get_x();c=g.get_y();o=l;h=c;s-=y;x=false}this.get_graphics().lineTo(l,c)}else{if(a<y){l=o+a*b;c=h+a*v;o=l;h=c;y-=a;_=true;s=r}else{l=g.get_x();c=g.get_y();o=l;h=c;a-=y;x=false}this.get_graphics().moveTo(l,c)}}t=g.get_x();i=g.get_y()}}},get_colour:function(){return this.props.get_colour("colour")},__class__:trcharts_charts_Line});var trcharts_charts_Area=function(e,t){trcharts_charts_Line.call(this,e,t);var i;if(e.fill){i=e.fill}else{i=e.colour}this.fill_colour=trcharts_string_Utils.get_colour(i)};$hxClasses["trcharts.charts.Area"]=trcharts_charts_Area;trcharts_charts_Area.__name__=["trcharts","charts","Area"];trcharts_charts_Area.__super__=trcharts_charts_Line;trcharts_charts_Area.prototype=$extend(trcharts_charts_Line.prototype,{fill_colour:null,area_base:null,resize:function(e){var t=false;if(this.props.has("axis")){if(this.props.get("axis")=="right"){t=true}}this.area_base=e.get_y_bottom(t);trcharts_charts_Line.prototype.resize.call(this,e)},draw:function(){this.get_graphics().clear();this.fill_area();this.draw_line()},fill_area:function(){var e=0;var t=null;var i=true;var s;var a=0;while(a<this.get_numChildren()){s=js_Boot.__cast(this.getChildAt(a),openfl_display_Sprite);if(js_Boot.__instanceof(s,trcharts_charts_series_Element)){var r=js_Boot.__cast(s,trcharts_charts_series_Element);if(i){i=false;e=r.get_x();if(this.props.get("loop")){this.get_graphics().moveTo(r.get_x(),r.get_y())}else{this.get_graphics().moveTo(r.get_x(),this.area_base)}this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(this.fill_colour,this.props.get("fill-alpha"));if(!this.props.get("loop")){this.get_graphics().lineTo(r.get_x(),r.get_y())}}else{this.get_graphics().lineTo(r.get_x(),r.get_y());t=r}}++a}if(t!=null){if(!this.props.get("loop")){this.get_graphics().lineTo(t.get_x(),this.area_base);this.get_graphics().lineTo(e,this.area_base)}}this.get_graphics().endFill()},__class__:trcharts_charts_Area});var trcharts_charts_Arrow=function(e,t){trcharts_charts_Base.call(this,t);this.style={start:[],end:[],colour:"#808080",alpha:.5,"barb-length":20};trcharts_Object_$helper.merge_2(e,this.style);this.style.colour=trcharts_string_Utils.get_colour(this.style.colour)};$hxClasses["trcharts.charts.Arrow"]=trcharts_charts_Arrow;trcharts_charts_Arrow.__name__=["trcharts","charts","Arrow"];trcharts_charts_Arrow.__super__=trcharts_charts_Base;trcharts_charts_Arrow.prototype=$extend(trcharts_charts_Base.prototype,{style:null,resize:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(1,this.style.colour,1);this.get_graphics().moveTo(e.get_x_from_val(this.style.start.x),e.get_y_from_val(this.style.start.y));var t=e.get_x_from_val(this.style.end.x);var i=e.get_y_from_val(this.style.end.y);this.get_graphics().lineTo(t,i);var s=Math.atan2(e.get_y_from_val(this.style.start.y)-i,e.get_x_from_val(this.style.start.x)-t);var a=Reflect.field(this.style,"barb-length");var r=.34;var n=t+a*Math.cos(s-r);var _=i+a*Math.sin(s-r);var o=t+a*Math.cos(s+r);var l=i+a*Math.sin(s+r);this.get_graphics().moveTo(t,i);this.get_graphics().lineTo(n,_);this.get_graphics().moveTo(t,i);this.get_graphics().lineTo(o,l)},__class__:trcharts_charts_Arrow});var trcharts_charts_BarBase=function(e,t,i){trcharts_charts_Base.call(this,i);var s=new trcharts_Properties({values:[],colour:"#3030d0",text:"","font-size":12,tip:"#val#<br>#x_label#",alpha:.6,"on-click":false,axis:"left"});this.props=new trcharts_Properties(e,s);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(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_Element);i.resize(e);++t}},get_max_x:function(){var e=2225e-311;var t=0;while(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_Element);e=Math.max(e,i.index);++t}return e},get_min_x:function(){return 0},get_element_helper_prop:function(e){var t=new trcharts_Properties({colour:this.props.get("colour"),tip:this.props.get("tip"),alpha:this.props.get("alpha"),"on-click":this.props.get("on-click"),axis:this.props.get("axis"),"on-show":this.on_show});var i;if(typeof e=="number"){i=new trcharts_Properties({top:e},t)}else{i=new trcharts_Properties(e,t)}return i},die:function(){trcharts_charts_Base.prototype.die.call(this);this.props.die()},__class__:trcharts_charts_BarBase});var trcharts_charts_Bar=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Bar"]=trcharts_charts_Bar;trcharts_charts_Bar.__name__=["trcharts","charts","Bar"];trcharts_charts_Bar.__super__=trcharts_charts_BarBase;trcharts_charts_Bar.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Bar(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_Bar});var trcharts_charts_Bar3D=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Bar3D"]=trcharts_charts_Bar3D;trcharts_charts_Bar3D.__name__=["trcharts","charts","Bar3D"];trcharts_charts_Bar3D.__super__=trcharts_charts_BarBase;trcharts_charts_Bar3D.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Bar3D(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_Bar3D});var trcharts_charts_BarCylinder=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarCylinder"]=trcharts_charts_BarCylinder;trcharts_charts_BarCylinder.__name__=["trcharts","charts","BarCylinder"];trcharts_charts_BarCylinder.__super__=trcharts_charts_BarBase;trcharts_charts_BarCylinder.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Cylinder(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarCylinder});var trcharts_charts_BarCylinderOutline=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarCylinderOutline"]=trcharts_charts_BarCylinderOutline;trcharts_charts_BarCylinderOutline.__name__=["trcharts","charts","BarCylinderOutline"];trcharts_charts_BarCylinderOutline.__super__=trcharts_charts_BarBase;trcharts_charts_BarCylinderOutline.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_CylinderOutline(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarCylinderOutline});var trcharts_charts_BarDome=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarDome"]=trcharts_charts_BarDome;trcharts_charts_BarDome.__name__=["trcharts","charts","BarDome"];trcharts_charts_BarDome.__super__=trcharts_charts_BarBase;trcharts_charts_BarDome.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Dome(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarDome});var trcharts_charts_BarFade=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarFade"]=trcharts_charts_BarFade;trcharts_charts_BarFade.__name__=["trcharts","charts","BarFade"];trcharts_charts_BarFade.__super__=trcharts_charts_BarBase;trcharts_charts_BarFade.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_PointBarFade(e,t,this.colour,this.group)},__class__:trcharts_charts_BarFade});var trcharts_charts_BarGlass=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarGlass"]=trcharts_charts_BarGlass;trcharts_charts_BarGlass.__name__=["trcharts","charts","BarGlass"];trcharts_charts_BarGlass.__super__=trcharts_charts_BarBase;trcharts_charts_BarGlass.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Glass(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarGlass});var trcharts_charts_BarOutline=function(e,t,i){this.style={"outline-colour":"#000000"};trcharts_Object_$helper.merge_2(e,this.style);trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarOutline"]=trcharts_charts_BarOutline;trcharts_charts_BarOutline.__name__=["trcharts","charts","BarOutline"];trcharts_charts_BarOutline.__super__=trcharts_charts_BarBase;trcharts_charts_BarOutline.prototype=$extend(trcharts_charts_BarBase.prototype,{style:null,get_element:function(e,t){var i=new trcharts_Properties({"outline-colour":Reflect.field(this.style,"outline-colour")});var s=this.get_element_helper_prop(t);s.set_parent(i);return new trcharts_charts_series_bars_Outline(e,s,this.group)},__class__:trcharts_charts_BarOutline});var trcharts_charts_BarPlastic=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarPlastic"]=trcharts_charts_BarPlastic;trcharts_charts_BarPlastic.__name__=["trcharts","charts","BarPlastic"];trcharts_charts_BarPlastic.__super__=trcharts_charts_BarBase;trcharts_charts_BarPlastic.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Plastic(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarPlastic});var trcharts_charts_BarPlasticFlat=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarPlasticFlat"]=trcharts_charts_BarPlasticFlat;trcharts_charts_BarPlasticFlat.__name__=["trcharts","charts","BarPlasticFlat"];trcharts_charts_BarPlasticFlat.__super__=trcharts_charts_BarBase;trcharts_charts_BarPlasticFlat.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_PlasticFlat(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarPlasticFlat});var trcharts_charts_BarRound=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRound"]=trcharts_charts_BarRound;trcharts_charts_BarRound.__name__=["trcharts","charts","BarRound"];trcharts_charts_BarRound.__super__=trcharts_charts_BarBase;trcharts_charts_BarRound.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Round(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRound});var trcharts_charts_BarRound3D=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRound3D"]=trcharts_charts_BarRound3D;trcharts_charts_BarRound3D.__name__=["trcharts","charts","BarRound3D"];trcharts_charts_BarRound3D.__super__=trcharts_charts_BarBase;trcharts_charts_BarRound3D.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_Round3D(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRound3D});var trcharts_charts_BarRoundGlass=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.BarRoundGlass"]=trcharts_charts_BarRoundGlass;trcharts_charts_BarRoundGlass.__name__=["trcharts","charts","BarRoundGlass"];trcharts_charts_BarRoundGlass.__super__=trcharts_charts_BarBase;trcharts_charts_BarRoundGlass.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){return new trcharts_charts_series_bars_RoundGlass(e,this.get_element_helper_prop(t),this.group)},__class__:trcharts_charts_BarRoundGlass});var trcharts_charts_BarSketch=function(e,t,i){this.style={"outline-colour":"#000000",offset:6};trcharts_Object_$helper.merge_2(e,this.style);trcharts_charts_BarBase.call(this,this.style,t,i)};$hxClasses["trcharts.charts.BarSketch"]=trcharts_charts_BarSketch;trcharts_charts_BarSketch.__name__=["trcharts","charts","BarSketch"];trcharts_charts_BarSketch.__super__=trcharts_charts_BarBase;trcharts_charts_BarSketch.prototype=$extend(trcharts_charts_BarBase.prototype,{style:null,get_element:function(e,t){var i=new trcharts_Properties({"outline-colour":Reflect.field(this.style,"outline-colour"),offset:this.style.offset});var s=this.get_element_helper_prop(t);s.set_parent(i);return new trcharts_charts_series_bars_Sketch(e,s,this.group)},__class__:trcharts_charts_BarSketch});var trcharts_charts_BarStack=function(e,t,i,s){trcharts_charts_BarBase.call(this,{},0,s);var a=new trcharts_Properties({values:[],keys:[],colours:["#FF0000","#00FF00"],text:"","font-size":12,tip:"#x_label# : #val#<br>Total: #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=i;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 i=0;while(i<t.length){var s=t[i];++i;if(s.text&&Reflect.field(s,"font-size")&&s.colour){var a=Reflect.field(s,"colour");s.colour=trcharts_string_Utils.get_colour(a);e.push(s)}}return e},get_element:function(e,t){var i=new trcharts_Properties({colours:this.props.get("colours"),tip:this.props.get("tip"),alpha:this.props.get("alpha"),"on-click":this.props.get("on-click"),axis:this.props.get("axis"),"on-show":this.on_show,values:t});return new trcharts_charts_series_bars_StackCollection(e,i,this.group)},get_all_at_this_x_pos:function(e){var t=[];var i;var s;var a=0;while(a<this.get_numChildren()){if(js_Boot.__instanceof(this.getChildAt(a),trcharts_charts_series_Element)){s=js_Boot.__cast(this.getChildAt(a),trcharts_charts_series_bars_StackCollection);i=s.get_mid_point();if(i.x==e){var r=s.get_children();var n=0;while(n<r.length){var _=r[n];++n;t.push(_)}}}++a}return t},__class__:trcharts_charts_BarStack});var trcharts_charts_Candle=function(e,t,i){trcharts_charts_BarBase.call(this,e,t,i)};$hxClasses["trcharts.charts.Candle"]=trcharts_charts_Candle;trcharts_charts_Candle.__name__=["trcharts","charts","Candle"];trcharts_charts_Candle.__super__=trcharts_charts_BarBase;trcharts_charts_Candle.prototype=$extend(trcharts_charts_BarBase.prototype,{get_element:function(e,t){var i=this.get_element_helper_prop(t);if(this.props.has("negative-colour")){i.set("negative-colour",this.props.get("negative-colour"))}return new trcharts_charts_series_bars_ECandle(e,i,this.group)},__class__:trcharts_charts_Candle});var trcharts_charts_Factory=function(){};$hxClasses["trcharts.charts.Factory"]=trcharts_charts_Factory;trcharts_charts_Factory.__name__=["trcharts","charts","Factory"];trcharts_charts_Factory.MakeChart=function(e,t){var i=new trcharts_charts_ObjectCollection;var s=0;var a="";var r=1;var n=Reflect.field(e,"elements");var _=0;while(_<n.length){var o=Reflect.field(n[_],"type");switch(o){case"area":i.add(new trcharts_charts_Area(n[_],t));break;case"arrow":i.add(new trcharts_charts_Arrow(n[_],t));break;case"bar":i.add(new trcharts_charts_Bar(n[_],s,t));++s;break;case"bar_3d":i.add(new trcharts_charts_Bar3D(n[_],s,t));++s;break;case"bar_cylinder":i.add(new trcharts_charts_BarCylinder(n[_],s,t));++s;break;case"bar_cylinder_outline":i.add(new trcharts_charts_BarCylinderOutline(n[_],s,t));++s;break;case"bar_dome":i.add(new trcharts_charts_BarDome(n[_],s,t));++s;break;case"bar_fade":i.add(new trcharts_charts_BarFade(n[_],s,t));++s;break;case"bar_filled":i.add(new trcharts_charts_BarOutline(n[_],s,t));++s;break;case"bar_glass":i.add(new trcharts_charts_BarGlass(n[_],s,t));++s;break;case"bar_plastic":i.add(new trcharts_charts_BarPlastic(n[_],s,t));++s;break;case"bar_plastic_flat":i.add(new trcharts_charts_BarPlasticFlat(n[_],s,t));++s;break;case"bar_round":i.add(new trcharts_charts_BarRound(n[_],s,t));++s;break;case"bar_round3d":i.add(new trcharts_charts_BarRound3D(n[_],s,t));++s;break;case"bar_round_glass":i.add(new trcharts_charts_BarRoundGlass(n[_],s,t));++s;break;case"bar_sketch":i.add(new trcharts_charts_BarSketch(n[_],s,t));++s;break;case"bar_stack":i.add(new trcharts_charts_BarStack(n[_],r,s,t));++s;break;case"candle":i.add(new trcharts_charts_Candle(n[_],s,t));++s;break;case"hbar":i.add(new trcharts_charts_HBar(n[_],t));++s;break;case"line":i.add(new trcharts_charts_Line(n[_],t));break;case"pie":i.add(new trcharts_charts_Pie(n[_],t));break;case"scatter":i.add(new trcharts_charts_Scatter(n[_],t));break;case"scatter_line":i.add(new trcharts_charts_ScatterLine(n[_],t));break;case"shape":i.add(new trcharts_charts_Shape(n[_],t));break;case"tags":i.add(new trcharts_charts_Tags(n[_],t));break}++_}var l=false;var h;i.groups=s;return i};var trcharts_charts_HBar=function(e,t){trcharts_charts_Base.call(this,t);this.style={values:[],colour:"#3030d0",text:"","font-size":12,tip:"#val#"};trcharts_Object_$helper.merge_2(e,this.style);this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.key=e.text;this.font_size=Reflect.field(e,"font-size");this.group=0;this.values=Reflect.field(e,"values");this.style["on-click"]=Reflect.field(e,"on-click");this.add_values()};$hxClasses["trcharts.charts.HBar"]=trcharts_charts_HBar;trcharts_charts_HBar.__name__=["trcharts","charts","HBar"];trcharts_charts_HBar.__super__=trcharts_charts_Base;trcharts_charts_HBar.prototype=$extend(trcharts_charts_Base.prototype,{group:null,style:null,get_element:function(e,t){var i={colour:this.style.colour,tip:this.style.tip,"on-click":Reflect.field(this.style,"on-click")};if(typeof t=="number"){i.top=t}else{trcharts_Object_$helper.merge_2(t,i)}if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}return new trcharts_charts_series_bars_Horizontal(e,i,this.group)},resize:function(e){var t=0;while(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_bars_Horizontal);i.resize(e);++t}},get_max_x:function(){var e=0;var t=0;while(t<this.get_numChildren()){if(js_Boot.__instanceof(this.getChildAt(t),trcharts_charts_series_bars_Horizontal)){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_bars_Horizontal);e=Math.max(e,i.get_max_x())}++t}return e},get_min_x:function(){return 0},__class__:trcharts_charts_HBar});var trcharts_charts_LineStyle=function(e){this.style="solid";this.on=1;this.off=5;trcharts_Object_$helper.merge_2(e,this)};$hxClasses["trcharts.charts.LineStyle"]=trcharts_charts_LineStyle;trcharts_charts_LineStyle.__name__=["trcharts","charts","LineStyle"];trcharts_charts_LineStyle.prototype={style:null,on:null,off:null,__class__:trcharts_charts_LineStyle};var trcharts_charts_ObjectCollection=function(){this.sets=[]};$hxClasses["trcharts.charts.ObjectCollection"]=trcharts_charts_ObjectCollection;trcharts_charts_ObjectCollection.__name__=["trcharts","charts","ObjectCollection"];trcharts_charts_ObjectCollection.prototype={sets:null,groups:null,add:function(e){this.sets.push(e)},get_max_x:function(){var e=2225e-311;var t=0;var i=this.sets;while(t<i.length){var s=i[t];++t;e=Math.max(e,s.get_max_x())}return e},get_min_x:function(){var e=1e6;var t=0;var i=this.sets;while(t<i.length){var s=i[t];++t;e=Math.min(e,s.get_min_x())}return e},resize:function(e){var t=0;var i=this.sets;while(t<i.length){var s=i[t];++t;s.resize(e)}},tooltip_replace_labels:function(e){var t=0;var i=this.sets;while(t<i.length){var s=i[t];++t;s.tooltip_replace_labels(e)}},mouse_out:function(){var e=0;var t=this.sets;while(e<t.length){var i=t[e];++e;i.mouse_out()}},closest_2:function(e,t){var i;var s;var a;var r=[];var n=0;var _=this.sets;while(n<_.length){var o=_[n];++n;var l=o.closest_2(e,t);var h=0;while(h<l.length){var c=l[h];++h;r.push(c)}}var u=1e6;var f=0;while(f<r.length){var p=r[f];++f;a=p.get_mid_point();u=Math.min(u,Math.abs(e-a.x))}var d=[];var g=0;while(g<r.length){var m=r[g];++g;a=m.get_mid_point();if(Math.abs(e-a.x)==u){d.push(m)}}var v=1e6;var b=0;while(b<d.length){var y=d[b];++b;a=y.get_mid_point();v=Math.min(v,Math.abs(t-a.y))}var x=[];var w=0;while(w<d.length){var k=d[w];++w;a=k.get_mid_point();if(Math.abs(t-a.y)==v){x.push(k)}}return x},mouse_move_proximity:function(e,t){var i;var s;var a;var r=[];var n=0;var _=this.sets;while(n<_.length){var o=_[n];++n;var l=o.mouse_proximity(e,t);var h=0;while(h<l.length){var c=l[h];++h;r.push(c)}}var u=1e6;var f=new openfl_geom_Point(e,t);var p=0;while(p<r.length){var d=r[p];++p;u=Math.min(openfl_geom_Point.distance(d.get_mid_point(),f),u)}var g=[];var m=0;while(m<r.length){var v=r[m];++m;if(openfl_geom_Point.distance(v.get_mid_point(),f)==u){g.push(v)}}return g},has_pie:function(){if(this.sets.length>0&&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<t.length){var i=t[e];++e;i.die()}},__class__:trcharts_charts_ObjectCollection};var trcharts_charts_Pie=function(e,t){this.total_value=0;trcharts_charts_Base.call(this,t);this.labels=[];this.links=[];this.colours=[];this.style={colours:["#900000","#009000"]};trcharts_Object_$helper.merge_2(e,this.style);var i=this.style.colours;var s=0;while(s<i.length){var a=i[s];++s;this.colours.push(trcharts_string_Utils.get_colour(a))}this.props=new trcharts_charts_series_pies_DefaultPieProperties(e);this.label_line=10;this.values=e.values;this.add_values()};$hxClasses["trcharts.charts.Pie"]=trcharts_charts_Pie;trcharts_charts_Pie.__name__=["trcharts","charts","Pie"];trcharts_charts_Pie.__super__=trcharts_charts_Base;trcharts_charts_Pie.prototype=$extend(trcharts_charts_Base.prototype,{labels:null,links:null,colours:null,label_line:null,style:null,total_value:null,props:null,add_values:function(){var e=this._trcharts._g;var t=0;var i=this.props.get("start-angle");var s;var a;var r=0;var n=this.values;while(r<n.length){var _=n[r];++r;if(typeof _=="number"){t+=_}else{t+=_.value}}this.total_value=t;s=0;var o=0;var l=this.values;while(o<l.length){var h=l[o];++o;var c=typeof h=="number"?js_Boot.__cast(h,Float):h.value;var u=c*360/t;if(u>=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(s,i,u,h,f,Std.string(this.colours[s%this.colours.length])))}++s;i+=u}},add_slice:function(e,t,i,s,a,r){var n=new trcharts_Properties({colour:r,tip:a,start:t,angle:i},this.props);var _={};if(typeof s=="number"){_.value=s}else{_=s}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 i;if(isNaN(t)){t=Math.min(e.width,e.height)/2;var s={top:0,right:0,bottom:0,left:0};var a=0;while(a<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(a),trcharts_charts_series_pies_PieSliceContainer);var r=i.get_radius_offsets();var n=Reflect.fields(s);var _=0;while(_<n.length){var o=n[_];++_;if(Reflect.field(r,o)>Reflect.field(s,o)){s[o]=Reflect.field(r,o)}}++a}var l=t;l-=Math.max(s.top,s.bottom);if(l+s.left>e.width/2){l=e.width/2-s.left}if(l+s.right>e.width/2){l=e.width/2-s.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<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(b),trcharts_charts_series_pies_PieSliceContainer);i.pie_resize(e,t);v=i.getTicAngle();if(v>=270){if(v<h||h<=90){h=v;c=b}if(u<0||u>90&&u<v){u=v;f=b}}else if(v<=90){if(v>u||u>90){u=v;f=b}if(h>360||h<=90&&v<u){h=v;c=b}}else if(v<=180){if(g<0||v<g){g=v;m=b}if(p>360||p<v){p=v;d=b}}else{if(p>360||v>p){p=v;d=b}if(g<0||g>v){g=v;m=b}}++b}var y=c;var x=e.top;var w=false;while(y>=0&&!w){i=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=i.getTicAngle();if(v>=270||v<=90){x=i.moveLabelDown(e,x);++y;if(y>=this.get_numChildren()){y=0}w=y==c}else{w=true}}y=f;x=e.bottom;w=false;while(y>=0&&!w){i=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=i.getTicAngle();if(v>=270||v<=90){x=i.moveLabelUp(e,x);--y;if(y<0){y=this.get_numChildren()-1}w=y==f}else{w=true}}y=m;x=e.bottom;w=false;while(y>=0&&!w){i=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=i.getTicAngle();if(v>90&&v<270){x=i.moveLabelUp(e,x);++y;if(y>=this.get_numChildren()){y=0}w=y==m}else{w=true}}y=d;x=e.top;w=false;while(y>=0&&!w){i=js_Boot.__cast(this.getChildAt(y),trcharts_charts_series_pies_PieSliceContainer);v=i.getTicAngle();if(v>90&&v<270){x=i.moveLabelDown(e,x);--y;if(y<0){y=this.get_numChildren()-1}w=y==d}else{w=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,i){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=i;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 i=e.get_y_from_val(this.top,this.right_axis);var s;if(this.bottom==2225e-311){s=e.get_y_bottom(this.right_axis)}else{s=e.get_y_from_val(this.bottom,this.right_axis)}var a;var r;var n=false;if(s<i){a=s;n=true}else{a=i}r=Math.abs(s-i);this.tip_pos=new openfl_geom_Point(t.x+t.width/2,a);if(this.on_show_animate){this.first_show(t.x,a,t.width,r)}else{this.set_y(a);this.set_x(t.x)}return{width:t.width,top:a,height:r,upside_down:n}},first_show:function(e,t,i,s){this.on_show_animate=false;motion_Actuate.stop(this);var a=e/this.stage.stageWidth;a*=this.on_show.get("cascade");a+=this.on_show.get("delay");var r=this.on_show.get("type");switch(r){case"drop":this.set_x(e);this.set_y(-s-10);motion_Actuate.tween(this,1,{y:t}).delay(a).ease(motion_easing_Bounce.get_easeOut());break;case"fade-in":this.set_x(e);this.set_y(t);this.set_alpha(0);motion_Actuate.tween(this,1,{alpha:this.mouse_out_alpha}).delay(a).ease(motion_easing_Quad.get_easeOut());break;case"grow-down":this.set_x(e);this.set_y(t);this.set_scaleY(.01);motion_Actuate.tween(this,1,{scaleY:1}).delay(a).ease(motion_easing_Quad.get_easeOut());break;case"grow-up":this.set_x(e);this.set_y(t+s);this.set_scaleY(.01);motion_Actuate.tween(this,1,{scaleY:1}).delay(a).ease(motion_easing_Quad.get_easeOut());motion_Actuate.tween(this,1,{y:t}).delay(a).ease(motion_easing_Quad.get_easeOut());break;case"pop":this.set_y(this.top);this.set_alpha(.2);motion_Actuate.tween(this,1,{alpha:this.mouse_out_alpha}).delay(a).ease(motion_easing_Quad.get_easeOut());this.set_x(e+i/2);this.set_y(t+s/2);this.set_width(3);this.set_height(3);motion_Actuate.tween(this,1,{x:e,y:t,width:i,height:s}).delay(a).ease(motion_easing_Elastic.get_easeOut());break;case"pop-up":this.set_x(e);this.set_y(this.stage.stageHeight+this.get_height()+3);motion_Actuate.tween(this,1,{y:t}).delay(a).ease(motion_easing_Bounce.get_easeOut());break;default:this.set_y(t);this.set_x(e)}},__class__:trcharts_charts_series_bars_Base});var trcharts_charts_PointBarFade=function(e,t,i,s){var a=new trcharts_Properties(t);trcharts_charts_series_bars_Base.call(this,e,a,s)};$hxClasses["trcharts.charts.PointBarFade"]=trcharts_charts_PointBarFade;trcharts_charts_PointBarFade.__name__=["trcharts","charts","PointBarFade"];trcharts_charts_PointBarFade.__super__=trcharts_charts_series_bars_Base;trcharts_charts_PointBarFade.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.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_PointBarFade});var trcharts_charts_ScatterBase=function(e,t){trcharts_charts_Base.call(this,t);var i=new trcharts_Properties({colour:"#3030d0",text:"","font-size":12,tip:"#val#",axis:"left"});this.props=new trcharts_Properties(e,i);this.dot_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.props.get("colour"),this.props.get("axis"));var s=new trcharts_Properties({type:"explode",cascade:0,delay:.3});this.on_show=new trcharts_Properties(Reflect.field(e,"on-show"),s)};$hxClasses["trcharts.charts.ScatterBase"]=trcharts_charts_ScatterBase;trcharts_charts_ScatterBase.__name__=["trcharts","charts","ScatterBase"];trcharts_charts_ScatterBase.__super__=trcharts_charts_Base;trcharts_charts_ScatterBase.prototype=$extend(trcharts_charts_Base.prototype,{props:null,style:null,on_show:null,dot_style:null,default_style:null,get_element:function(e,t){var i={width:this.style.width,colour:this.style.colour,tip:this.style.tip,"dot-size":10};trcharts_Object_$helper.merge_2(Reflect.field(this.style,"dot-style"),i);trcharts_Object_$helper.merge_2(t,i);if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}var s=new trcharts_Properties(t,this.dot_style);s.set("on-show",this.on_show);return trcharts_charts_series_dots_Dot_$factory.make(e,s)},resize:function(e){var t;var i=0;while(i<this.get_numChildren()){t=js_Boot.__cast(this.getChildAt(i),openfl_display_Sprite);if(js_Boot.__instanceof(t,trcharts_charts_series_Element)){var s=js_Boot.__cast(t,trcharts_charts_series_Element);s.resize(e)}++i}},__class__:trcharts_charts_ScatterBase});var trcharts_charts_Scatter=function(e,t){trcharts_charts_ScatterBase.call(this,e,t);this.style={values:[],width:2,colour:"#3030d0",text:"","font-size":12,tip:"[#x#,#y#] #size#",axis:"left"};var i=Reflect.field(e,"dot-style");trcharts_Object_$helper.merge_2(e,this.style);this.default_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.style.colour,this.style.axis);this.line_width=this.style.width;this.colour=trcharts_string_Utils.get_colour(this.style.colour);this.key=this.style.text;this.font_size=Reflect.field(this.style,"font-size");this.circle_size=Reflect.field(this.style,"dot-size");this.values=this.style.values;this.add_values()};$hxClasses["trcharts.charts.Scatter"]=trcharts_charts_Scatter;trcharts_charts_Scatter.__name__=["trcharts","charts","Scatter"];trcharts_charts_Scatter.__super__=trcharts_charts_ScatterBase;trcharts_charts_Scatter.prototype=$extend(trcharts_charts_ScatterBase.prototype,{__class__:trcharts_charts_Scatter});var trcharts_charts_ScatterLine=function(e,t){this.stepgraph=0;trcharts_charts_ScatterBase.call(this,e,t);this.set_blendMode(7);this.style={values:[],width:2,colour:"#3030d0",text:"","font-size":12,stepgraph:0,axis:"left"};var i=Reflect.field(e,"dot-style");trcharts_Object_$helper.merge_2(e,this.style);this.default_style=new trcharts_charts_series_dots_DefaultDotProperties(Reflect.field(e,"dot-style"),this.style.colour,this.style.axis);this.style.colour=trcharts_string_Utils.get_colour(this.style.colour);this.line_width=this.style.width;this.colour=this.style.colour;this.key=this.style.text;this.font_size=Reflect.field(this.style,"font-size");var s=Reflect.field(this.style,"stepgraph");switch(s){case"horizontal":this.stepgraph=trcharts_charts_ScatterLine.STEP_HORIZONTAL;break;case"vertical":this.stepgraph=trcharts_charts_ScatterLine.STEP_VERTICAL;break}this.values=this.style.values;this.add_values()};$hxClasses["trcharts.charts.ScatterLine"]=trcharts_charts_ScatterLine;trcharts_charts_ScatterLine.__name__=["trcharts","charts","ScatterLine"];trcharts_charts_ScatterLine.__super__=trcharts_charts_ScatterBase;trcharts_charts_ScatterLine.prototype=$extend(trcharts_charts_ScatterBase.prototype,{stepgraph:null,resize:function(e){trcharts_charts_ScatterBase.prototype.resize.call(this,e);this.get_graphics().clear();this.get_graphics().lineStyle(this.style.width,this.style.colour);this.solid_line(e)},solid_line:function(e){var t=true;var i=0;var s=0;var a=true;var r=false;var n=NaN;var _=NaN;var o=this.colour;var l=.4;var h=Reflect.field(this.style,"area-style");if(h!=null){r=true;if(h.x!=null){n=h.x}if(h.y!=null){_=h.y}if(h.colour!=null){o=trcharts_string_Utils.get_colour(h.colour)}if(h.alpha!=null){l=h.alpha}if(!isNaN(n)){n=e.get_x_from_val(n)}if(!isNaN(_)){_=e.get_y_from_val(_)}}var c=0;while(c<this.get_numChildren()){var u=js_Boot.__cast(this.getChildAt(c),openfl_display_Sprite);if(js_Boot.__instanceof(u,trcharts_charts_series_Element)){var f=js_Boot.__cast(u,trcharts_charts_series_Element);f.resize(e);if(!f.get_visible()){if(r&&c>0){var p=isNaN(n)?i:n;var d=isNaN(_)?s:_;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(n)?f.get_x():n;var m=isNaN(_)?f.get_y():_;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(),s)}else if(this.stepgraph==trcharts_charts_ScatterLine.STEP_VERTICAL){this.get_graphics().lineTo(i,f.get_y())}this.get_graphics().lineTo(f.get_x(),f.get_y())}i=f.get_x();s=f.get_y()}++c}if(r&&!a){var v=isNaN(n)?i:n;var b=isNaN(_)?s:_;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 i=e.values;var s=0;while(s<i.length){var a=i[s];++s;this.style.points.push(new openfl_geom_Point(a.x,a.y))}};$hxClasses["trcharts.charts.Shape"]=trcharts_charts_Shape;trcharts_charts_Shape.__name__=["trcharts","charts","Shape"];trcharts_charts_Shape.__super__=trcharts_charts_Base;trcharts_charts_Shape.prototype=$extend(trcharts_charts_Base.prototype,{style:null,resize:function(e){this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(this.style.colour,this.style.alpha);var t=false;var i=this.style.points;var s=0;while(s<i.length){var a=i[s];++s;if(!t){this.get_graphics().moveTo(e.get_x_from_val(a.x),e.get_y_from_val(a.y))}else{this.get_graphics().lineTo(e.get_x_from_val(a.x),e.get_y_from_val(a.y))}t=true}this.get_graphics().endFill()},__class__:trcharts_charts_Shape});var trcharts_charts_Tags=function(e,t){trcharts_charts_Base.call(this,t);this.style={values:[],colour:"#000000",text:"[#x#, #y#]","align-x":"center","align-y":"above","pad-x":4,"pad-y":4,font:"Verdana",bold:false,"on-click":null,rotate:0,"font-size":12,border:false,underline:false,alpha:1};trcharts_Object_$helper.merge_2(e,this.style);var i=this.style.values;var s=0;while(s<i.length){var a=i[s];++s;var r=this.make_tag(a);this.addChild(r)}};$hxClasses["trcharts.charts.Tags"]=trcharts_charts_Tags;trcharts_charts_Tags.__name__=["trcharts","charts","Tags"];trcharts_charts_Tags.__super__=trcharts_charts_Base;trcharts_charts_Tags.prototype=$extend(trcharts_charts_Base.prototype,{style:null,make_tag:function(e){var t={};trcharts_Object_$helper.merge_2(this.style,t);trcharts_Object_$helper.merge_2(e,t);t.colour=trcharts_string_Utils.get_colour(t.colour);return new trcharts_charts_series_tags_Tag(t)},resize:function(e){var t=0;while(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_tags_Tag);i.resize(e);++t}},__class__:trcharts_charts_Tags});var trcharts_charts_series_bars_Bar=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i)};$hxClasses["trcharts.charts.series.bars.Bar"]=trcharts_charts_series_bars_Bar;trcharts_charts_series_bars_Bar.__name__=["trcharts","charts","series","bars","Bar"];trcharts_charts_series_bars_Bar.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Bar.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.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_Bar});var trcharts_charts_series_bars_Bar3D=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$hxClasses["trcharts.charts.series.bars.Bar3D"]=trcharts_charts_series_bars_Bar3D;trcharts_charts_series_bars_Bar3D.__name__=["trcharts","charts","series","bars","Bar3D"];trcharts_charts_series_bars_Bar3D.Lighten=function(e){var t=e;var i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;i+=i/r;if(i>255){i=255}s+=s/r;if(s>255){s=255}a+=a/r;if(a>255){a=255}return i<<16|s<<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 i=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var s=[this.colour,i];var a=[1,1];var r=[0,255];var n=new openfl_geom_Matrix;n.createGradientBox(e+12,12,1.5*Math.PI);this.get_graphics().beginGradientFill(0,s,a,r,n,0);var _=0;if(t<0){_=t}this.get_graphics().moveTo(0,_);this.get_graphics().lineTo(e,_);this.get_graphics().lineTo(e-12,_+12);this.get_graphics().lineTo(-12,_+12);this.get_graphics().endFill()},draw_front:function(e,t){var i=7;var s=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var a=[s,this.colour];var r=[1,1];var n=[0,127];var _=new openfl_geom_Matrix;_.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 i=7;var s=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var a=[this.colour,s];var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;_.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,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;var n=e;var _=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(i+i/r>255||s+s/r>255||a+a/r>255){o=i-i/r;l=s-s/r;h=a-a/r}c=o+i/r;f=h+a/r;u=l+s/r;n=(o|0)<<16|(l|0)<<8|(h|0);_=(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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Cylinder.GetColours(this.colour);var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;var o;var l;var h;var c;_.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,n,_,0);h=e/2;c=t;o=e/2;l=s/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=s/2;this.Ellipse(h,c,o,l,100);this.get_graphics().endFill()},glass:function(e,t,i){this.get_graphics().lineStyle(0,0,0);var s=[16777215,16777215];var a=[0,.5];var r=[150,255];var n;var _;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,s,a,r,h,0);var c=e/3;o=e/2;l=t;n=e/2;_=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;n=e/2;_=c/2;this.Ellipse(o,l,n,_,100);this.get_graphics().beginGradientFill(0,s,a,[25,255],h,0);o=e/2;l=0;n=e/2;_=c/2;this.Ellipse(o,l,n,_,100);this.get_graphics().endFill()},Ellipse:function(e,t,i,s,a){this.get_graphics().moveTo(e+i,t);var r=0;while(r<=a){var n=r/a;var _=trcharts_charts_series_bars_Cylinder.magicTrigFunctionX(n);var o=trcharts_charts_series_bars_Cylinder.magicTrigFunctionY(n);var l=e+_*i;var h=t+o*s;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,i,s,a){this.get_graphics().moveTo(e+i,t);var r=0;while(r<=a/2){var n=r/a;var _=trcharts_charts_series_bars_Cylinder.magicTrigFunctionX(n);var o=trcharts_charts_series_bars_Cylinder.magicTrigFunctionY(n);var l=e+_*i;var h=t+o*s;this.get_graphics().lineTo(l,h);++r}return 1},__class__:trcharts_charts_series_bars_Cylinder});var trcharts_charts_series_bars_CylinderOutline=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;var n=e;var _=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(i+i/r>255||s+s/r>255||a+a/r>255){o=i-i/r;l=s-s/r;h=a-a/r}c=o+i/r;f=h+a/r;u=l+s/r;n=(o|0)<<16|(l|0)<<8|(h|0);_=(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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_CylinderOutline.GetColours(this.colour);var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;var o;var l;var h;var c;_.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,n,_,0);h=e/2;c=t;o=e/2;l=s/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=s/2;this.Ellipse(h,c,o,l,100);this.get_graphics().endFill()},glass:function(e,t,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_CylinderOutline.GetColours(this.colour);var a=[1,1];var r=[0,255];var n=new openfl_geom_Matrix;var _=[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,_,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,s,a,r,n,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,_,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,i,s,a){this.get_graphics().moveTo(e+i,t);var r=0;while(r<=a){var n=r/a;var _=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionX(n);var o=trcharts_charts_series_bars_CylinderOutline.magicTrigFunctionY(n);var l=e+_*i;var h=t+o*s;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,i,s,a,r){var n;var _;if(r==true){n=a/2;_=a}else{n=0;_=a/2}this.get_graphics().moveTo(e+i,t);var o=n;while(o<=_){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*i;var f=t+c*s;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_CylinderOutline});var trcharts_charts_series_bars_Dome=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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,i){trcharts_charts_series_bars_Base.call(this,e,t,i);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 i=e.get_y_from_val(Math.max(this.top,this.bottom),this.right_axis);var s=e.get_y_from_val(this.high,this.right_axis)-i;var a=0;var r=e.get_y_from_val(this.bottom,this.right_axis)-i;var n=e.get_y_from_val(this.low,this.right_axis)-i;this.tip_pos=new openfl_geom_Point(this.get_x()+t.width/2,this.get_y());var _=t.width/2;this.get_graphics().clear();var o=this.colour;if(t.upside_down){o=this.negative_colour}this.top_line(o,_,s);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,_,t.height,n);this.tip_pos=new openfl_geom_Point(this.get_x()+t.width/2,this.get_y()+s)},top_line:function(e,t,i){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,i);this.get_graphics().lineTo(t-1,i);this.get_graphics().endFill()},bottom_line:function(e,t,i,s){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(t-1,i);this.get_graphics().lineTo(t+1,i);this.get_graphics().lineTo(t+1,s);this.get_graphics().lineTo(t-1,s);this.get_graphics().endFill()},draw_doji:function(e,t,i){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(0,i-1);this.get_graphics().lineTo(t,i-1);this.get_graphics().lineTo(t,i+1);this.get_graphics().lineTo(0,i+1);this.get_graphics().endFill()},draw_box:function(e,t,i,s,a){this.get_graphics().beginFill(e,1);this.get_graphics().moveTo(0,t);this.get_graphics().lineTo(s,t);this.get_graphics().lineTo(s,i);this.get_graphics().lineTo(0,i);this.get_graphics().lineTo(0,t);if(a){this.get_graphics().moveTo(2,t+2);this.get_graphics().lineTo(s-2,t+2);this.get_graphics().lineTo(s-2,i-2);this.get_graphics().lineTo(2,i-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(s-2,t-2);this.get_graphics().lineTo(s-2,i-2);this.get_graphics().lineTo(2,i-2);this.get_graphics().endFill()}},__class__:trcharts_charts_series_bars_ECandle});var trcharts_charts_series_bars_Glass=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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,i){var s=7;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(this.colour,1);if(!i){this.get_graphics().moveTo(s,0);this.get_graphics().lineTo(e-s,0);this.get_graphics().curveTo(e,0,e,s);this.get_graphics().lineTo(e,t);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(0,s);this.get_graphics().curveTo(0,0,s,0)}else{this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(e,0);this.get_graphics().lineTo(e,t-s);this.get_graphics().curveTo(e,t,e-s,t);this.get_graphics().lineTo(s,t);this.get_graphics().curveTo(0,t,0,t-s);this.get_graphics().lineTo(0,0)}this.get_graphics().endFill()},glass:function(e,t,i){var s=2;var a=s;var r=e/2-s;if(i){a-=s}t-=s;this.get_graphics().lineStyle(0,0,0);var n=[16777215,16777215];var _=[.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(!i){this.get_graphics().moveTo(s+h,a);this.get_graphics().lineTo(s+c,a);this.get_graphics().lineTo(s+c,a+t);this.get_graphics().lineTo(s,a+t);this.get_graphics().lineTo(s,a+h);this.get_graphics().curveTo(s,a,s+h,a)}else{this.get_graphics().moveTo(s,a);this.get_graphics().lineTo(s+c,a);this.get_graphics().lineTo(s+c,a+t);this.get_graphics().lineTo(s+h,a+t);this.get_graphics().curveTo(s,a+t,s,a+t-h)}this.get_graphics().endFill()},__class__:trcharts_charts_series_bars_Glass});var trcharts_charts_series_bars_Horizontal=function(e,t,i){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=i;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 i=t.get_horiz_bar_coords(this.index,this.group);var s=e.get_x_from_val(this.left);var a=e.get_x_from_val(this.right);var r=a-s;this.get_graphics().clear();this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(0,0,r,i.width);this.get_graphics().endFill();this.set_x(s);this.set_y(i.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,i){this.outline=0;trcharts_charts_series_bars_Base.call(this,e,t,i);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,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=.15;var n=1.75;var _=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(i+i*r<255&&i-n*i*r>0){h=i}else if(i+i*r<255){h=i+i/r}else{h=i-n*i*r}if(a+a*r<255&&a-n*a*r>0){u=a}else if(a+a*r<255){u=a+a*r}else{u=a-n*a*r}if(s+s*r<255&&s-n*s*r>0){c=s}else if(s+s*r<255){c=s+s*r}else{c=s-n*s*r}g=h+i*r;f=h-n*(i*r);v=u+a*r;d=u-n*(a*r);m=c+s*r;p=c-n*(s*r);_=(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,_,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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Plastic.GetColours(this.colour);var r=a[2];var n=a[0];var _=[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,_,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(n,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,_,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(n,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,_,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,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_Plastic.GetColours(this.colour);var a=new openfl_geom_Matrix;var r=1;var n=1;var _=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,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=.15;var n=1.75;var _=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(i+i*r<255&&i-n*i*r>0){h=i}else if(i+i*r<255){h=i+i/r}else{h=i-n*i*r}if(a+a*r<255&&a-n*a*r>0){u=a}else if(a+a*r<255){u=a+a*r}else{u=a-n*a*r}if(s+s*r<255&&s-n*s*r>0){c=s}else if(s+s*r<255){c=s+s*r}else{c=s-n*s*r}g=h+i*r;f=h-n*(i*r);v=u+a*r;d=u-n*(a*r);m=c+s*r;p=c-n*(s*r);_=(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,_,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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_PlasticFlat.GetColours(this.colour);var r=a[2];var n=a[0];var _=[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,_,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(n,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,_,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(n,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,_,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,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_PlasticFlat.GetColours(this.colour);var a=s[2];var r=s[0];var n=[s[1],s[2],s[2]];var _=[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&&!i){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,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;var n=e;var _=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(i+i/r>255||s+s/r>255||a+a/r>255){o=i-i/r;l=s-s/r;h=a-a/r}c=o+i/r;f=h+a/r;u=l+s/r;n=(o|0)<<16|(l|0)<<8|(h|0);_=(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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Round.GetColours(this.colour);var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;var o;var l;var h;var c;_.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=s/4;this.Ellipse(h,c,o,l,100)}this.get_graphics().endFill()},glass:function(e,t,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_Round.GetColours(this.colour);var a=1;var r=1;var n=0;var _=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,i,s,a){this.get_graphics().moveTo(e+i,t);var r=0;while(r<=a){var n=r/a;var _=trcharts_charts_series_bars_Round.magicTrigFunctionX(n);var o=trcharts_charts_series_bars_Round.magicTrigFunctionY(n);var l=e+_*i;var h=t+o*s;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,i,s,a,r){var n;var _;if(r==true){n=a/2;_=a}else{n=0;_=a/2}this.get_graphics().moveTo(e+i,t);var o=n;while(o<=_){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*i;var f=t+c*s;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_Round});var trcharts_charts_series_bars_Round3D=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;var n=e;var _=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(i+i/r>255||s+s/r>255||a+a/r>255){o=i-i/r;l=s-s/r;h=a-a/r}c=o+i/r;f=h+a/r;u=l+s/r;n=(o|0)<<16|(l|0)<<8|(h|0);_=(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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_Round3D.GetColours(this.colour);var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;var o;var l;var h;var c;_.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,n,_,0);if(!i&&t>0){if(t>=e/2){h=e/2;c=t;o=e/2;l=s/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=s/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=s/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=s/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=s/4;this.Ellipse(h,c,o,l,100)}this.get_graphics().endFill()},glass:function(e,t,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_Round3D.GetColours(this.colour);var a=[1,1];var r=[0,255];var n=new openfl_geom_Matrix;n.createGradientBox(e,t,Math.PI);var _=[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,_,o,l,p,0);var d=e/3;if(!i&&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,s,a,r,n,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,_,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,_,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,s,a,r,n,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,_,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,s,a,r,n,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,_,[.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,_,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,s,a,r,n,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,_,[.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,s,a,r,n,0);u=e/2;f=0;h=e/2;c=d/2;this.Ellipse(u,f,h,c,100);this.get_graphics().beginGradientFill(0,_,[.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,i,s,a){this.get_graphics().moveTo(e+i,t);var r=0;while(r<=a){var n=r/a;var _=trcharts_charts_series_bars_Round3D.magicTrigFunctionX(n);var o=trcharts_charts_series_bars_Round3D.magicTrigFunctionY(n);var l=e+_*i;var h=t+o*s;this.get_graphics().lineTo(l,h);++r}return 1},halfEllipse:function(e,t,i,s,a,r){var n;var _;if(r==true){n=a/2;_=a}else{n=0;_=a/2}this.get_graphics().moveTo(e+i,t);var o=n;while(o<=_){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*i;var f=t+c*s;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_Round3D});var trcharts_charts_series_bars_RoundGlass=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);var s=new openfl_filters_DropShadowFilter;s.set_blurX(5);s.set_blurY(5);s.set_distance(3);s.set_angle(45);s.set_quality(2);s.set_alpha(.4);this.set_filters([s])};$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 i=(t&16711680)>>16;var s=(t&65280)>>8;var a=t&255;var r=2;var n=e;var _=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(i+i/r>255||s+s/r>255||a+a/r>255){o=i-i/r;l=s-s/r;h=a-a/r}c=o+i/r;f=h+a/r;u=l+s/r;n=(o|0)<<16|(l|0)<<8|(h|0);_=(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,i){var s=e/3;if(s>e/2){s=e/2}this.get_graphics().lineStyle(0,0,0);var a=trcharts_charts_series_bars_RoundGlass.GetColours(this.colour);var r=[1,1];var n=[0,255];var _=new openfl_geom_Matrix;var o;var l;var h;var c;_.createGradientBox(e,t,Math.PI);this.get_graphics().beginGradientFill(0,a,r,n,_,0);if(!i&&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,i){this.get_graphics().lineStyle(0,0,0);var s=trcharts_charts_series_bars_RoundGlass.GetColours(this.colour);var a=[1,1];var r=[0,255];var n=new openfl_geom_Matrix;n.createGradientBox(e,t,Math.PI);var _=[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,_,o,l,p,0);var d=e/3;if(!i&&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,s,a,r,n,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,_,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,_,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,s,a,r,n,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,_,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,_,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,i,s,a,r){var n;var _;if(r==true){n=a/2;_=a}else{n=0;_=a/2}this.get_graphics().moveTo(e+i,t);var o=n;while(o<=_){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*i;var f=t+c*s;this.get_graphics().lineTo(u,f);++o}return 1},__class__:trcharts_charts_series_bars_RoundGlass});var trcharts_charts_series_bars_Sketch=function(e,t,i){trcharts_charts_series_bars_Base.call(this,e,t,i);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 i=this.offset;var s=i/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 n=0;while(n<a){this.get_graphics().moveTo(r*n+r/2+(Math.random()*i-s),2+(Math.random()*i-s));this.get_graphics().lineTo(r*n+r/2+(Math.random()*i-s),t.height-2+(Math.random()*i-s));++n}this.get_graphics().lineStyle(2,this.outline,1);this.get_graphics().moveTo(Math.random()*i-s,Math.random()*i-s);this.get_graphics().lineTo(Math.random()*i-s,t.height+Math.random()*i-s);this.get_graphics().moveTo(Math.random()*i-s,Math.random()*i-s);this.get_graphics().lineTo(t.width+(Math.random()*i-s),Math.random()*i-s);this.get_graphics().moveTo(t.width+(Math.random()*i-s),Math.random()*i-s);this.get_graphics().lineTo(t.width+(Math.random()*i-s),t.height+(Math.random()*i-s));this.get_graphics().moveTo(Math.random()*i-s,t.height+(Math.random()*i-s));this.get_graphics().lineTo(t.width+(Math.random()*i-s),t.height+(Math.random()*i-s))},__class__:trcharts_charts_series_bars_Sketch});var trcharts_charts_series_bars_Stack=function(e,t,i){this.total=t.get("total");trcharts_charts_series_bars_Base.call(this,e,t,i)};$hxClasses["trcharts.charts.series.bars.Stack"]=trcharts_charts_series_bars_Stack;trcharts_charts_series_bars_Stack.__name__=["trcharts","charts","series","bars","Stack"];trcharts_charts_series_bars_Stack.__super__=trcharts_charts_series_bars_Base;trcharts_charts_series_bars_Stack.prototype=$extend(trcharts_charts_series_bars_Base.prototype,{total:null,replace_magic_values:function(e){e=trcharts_charts_series_bars_Base.prototype.replace_magic_values.call(this,e);e=StringTools.replace(e,"#total#",trcharts_NumberUtils.formatNumber(this.total));return e},replace_x_axis_label:function(e){this.tooltip=StringTools.replace(this.tooltip,"#x_label#",e)},resize:function(e){var t=this.resize_helper(js_Boot.__cast(e,trcharts_ScreenCoords));this.get_graphics().clear();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_Stack});var trcharts_charts_series_bars_StackCollection=function(e,t,i){trcharts_charts_series_Element.call(this);this.tooltip=t.get("tip");this.index=e;var s;this.vals=js_Boot.__cast(t.get("values"),Array);this.total=0;var a=0;var r=this.vals;while(a<r.length){var n=r[a];++a;if(n!=null){if(typeof n=="number"){this.total+=n}else{this.total+=n.val}}}this.colours=[];var _=t.get("colours");var o=0;while(o<_.length){var l=_[o];++o;this.colours.push(trcharts_string_Utils.get_colour(l))}this.group=i;this.set_visible(true);var h;var c;var u=0;var f=0;var p;var d=0;var g=0;var m=this.vals;while(g<m.length){var v=m[g];++g;if(v!=null){p=Reflect.field(this.colours,Std.string(d%this.colours.length));var b=new trcharts_Properties({bottom:u,colour:p,total:this.total},t);if(typeof v=="number"){v={val:v}}if(v==null){v={val:null}}f+=v.val;v.top=f;var y=new trcharts_Properties(v,b);var x=new trcharts_charts_series_bars_Stack(e,y,i);this.addChild(x);u=f;++d}}};$hxClasses["trcharts.charts.series.bars.StackCollection"]=trcharts_charts_series_bars_StackCollection;trcharts_charts_series_bars_StackCollection.__name__=["trcharts","charts","series","bars","StackCollection"];trcharts_charts_series_bars_StackCollection.__super__=trcharts_charts_series_Element;trcharts_charts_series_bars_StackCollection.prototype=$extend(trcharts_charts_series_Element.prototype,{vals:null,colours:null,group:null,total:null,resize:function(e){var t=0;while(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_Element);i.resize(e);++t}},get_mid_point:function(){var e=js_Boot.__cast(this.getChildAt(0),trcharts_charts_series_Element);return e.get_mid_point()},get_children:function(){var e=[];var t=0;while(t<this.get_numChildren()){e.push(this.getChildAt(t));++t}return e},get_tip_pos:function(){var e=js_Boot.__cast(this.getChildAt(this.get_numChildren()-1),trcharts_charts_series_Element);return e.get_tip_pos()},get_tooltip:function(){var e=0;while(e<this.get_numChildren()){var t=js_Boot.__cast(this.getChildAt(e),trcharts_charts_series_Element);if(t.is_tip){return t.get_tooltip()}++e}return this.tooltip},tooltip_replace_labels:function(e){var t=0;while(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_charts_series_bars_Stack);i.replace_x_axis_label(e.get(this.index));++t}},__class__:trcharts_charts_series_bars_StackCollection});var trcharts_charts_series_dots_PointDotBase=function(e,t){trcharts_charts_series_Element.call(this);this.is_tip=false;this.set_visible(true);this.on_show_animate=true;this.on_show=t.get("on-show");if(!t.has("y")){t.set("y",t.get("value"))}this._y=t.get("y");if(!t.has("x")){this.index=this._x=e}else{this._x=t.get("x");this.index=2225e-311}this.radius=t.get("dot-size");this.tooltip=this.replace_magic_values(t.get("tip"));if(t.has("on-click")){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.dots.PointDotBase"]=trcharts_charts_series_dots_PointDotBase;trcharts_charts_series_dots_PointDotBase.__name__=["trcharts","charts","series","dots","PointDotBase"];trcharts_charts_series_dots_PointDotBase.__super__=trcharts_charts_series_Element;trcharts_charts_series_dots_PointDotBase.prototype=$extend(trcharts_charts_series_Element.prototype,{radius:null,on_show_animate:null,on_show:null,resize:function(e){var t;var i;if(this.index!=2225e-311){var s=e.get_get_x_from_pos_and_y_from_val(this.index,this._y,this.right_axis);t=s.x;i=s.y}else{t=e.get_x_from_val(this._x);i=e.get_y_from_val(this._y,this.right_axis)}if(this.line_mask!=null){this.line_mask.set_x(t);this.line_mask.set_y(i)}if(this.on_show_animate){this.first_show(t,i,e)}else{this.set_y(i);this.set_x(t)}},is_tweening:function(){return false},first_show:function(e,t,i){this.on_show_animate=false;motion_Actuate.stop(this);var s=e/this.stage.stageWidth;s*=this.on_show.get("cascade");s+=this.on_show.get("delay");var a=this.on_show.get("type");switch(a){case"drop":this.set_x(e);this.set_y(-this.get_height()-10);motion_Actuate.tween(this,1,{y:t}).delay(s).ease(motion_easing_Bounce.get_easeOut());if(this.line_mask!=null){this.line_mask.set_x(e);this.line_mask.set_y(-this.get_height()-10);motion_Actuate.tween(this.line_mask,1,{y:t}).delay(s).ease(motion_easing_Quad.get_easeOut())}break;case"explode":this.set_x(this.stage.stageWidth/2);this.set_y(this.stage.stageHeight/2);motion_Actuate.tween(this,1,{y:t,x:e}).delay(s).ease(motion_easing_Quad.get_easeOut());if(this.line_mask!=null){this.line_mask.set_x(this.stage.stageWidth/2);this.line_mask.set_y(this.stage.stageHeight/2);motion_Actuate.tween(this.line_mask,1,{y:t,x:e}).delay(s).ease(motion_easing_Quad.get_easeOut())}break;case"fade-in":this.set_x(e);this.set_y(t);this.set_alpha(0);motion_Actuate.tween(this,1,{alpha:1}).delay(s).ease(motion_easing_Quad.get_easeOut());break;case"mid-slide":this.set_x(e);this.set_y(this.stage.stageHeight/2);this.set_alpha(.2);motion_Actuate.tween(this,1,{alpha:1,y:t}).delay(s).ease(motion_easing_Quad.get_easeOut());if(this.line_mask!=null){this.line_mask.set_x(e);this.line_mask.set_y(this.stage.stageHeight/2);motion_Actuate.tween(this.line_mask,1,{y:t}).delay(s).ease(motion_easing_Quad.get_easeOut())}break;case"pop-up":this.set_x(e);this.set_y(i.get_y_bottom(this.right_axis));motion_Actuate.tween(this,1,{y:t}).delay(s).ease(motion_easing_Quad.get_easeOut());if(this.line_mask!=null){this.line_mask.set_x(e);this.line_mask.set_y(i.get_y_bottom(this.right_axis));motion_Actuate.tween(this.line_mask,1,{y:t}).delay(s).ease(motion_easing_Quad.get_easeOut())}break;case"shrink-in":this.set_x(e);this.set_y(t);this.set_scaleX(this.set_scaleY(5));this.set_alpha(0);motion_Actuate.tween(this,1,{scaleX:1,scaleY:1,alpha:1}).delay(s).ease(motion_easing_Quad.get_easeOut());break;default:this.set_y(t);this.set_x(e)}},set_tip:function(e){if(e){this.set_scaleY(this.set_scaleX(1.3));this.line_mask.set_scaleY(this.line_mask.set_scaleX(1.3))}else{this.set_scaleY(this.set_scaleX(1));this.line_mask.set_scaleY(this.line_mask.set_scaleX(1))}},replace_magic_values:function(e){e=StringTools.replace(e,"#val#",trcharts_NumberUtils.formatNumber(this._y));e=StringTools.replace(e,"#x#",trcharts_NumberUtils.formatNumber(this._x));e=StringTools.replace(e,"#y#",trcharts_NumberUtils.formatNumber(this._y));e=StringTools.replace(e,"#size#",trcharts_NumberUtils.formatNumber(this.radius));e=trcharts_string_DateUtils.replace_magic_values(e,this._x);return e},calcXOnCircle:function(e,t){return e*Math.cos(t/180*Math.PI)},calcYOnCircle:function(e,t){return e*Math.sin(t/180*Math.PI)},__class__:trcharts_charts_series_dots_PointDotBase});var trcharts_charts_series_dots_Anchor=function(e,t){var i=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 s;if(t.get("hollow")){if(t.has("background-colour")){s=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{s=i}this.get_graphics().beginFill(s,t.get("background-alpha"))}else{this.get_graphics().beginFill(i,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),i,t.get("alpha"));this.drawAnchor(this.get_graphics(),this.radius,t.get("sides"),this.get_rotation());if(t.get("halo-size")>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,i,s){if(i<3){i=3}if(i>360){i=360}var a=360/i;var r=0;while(r<=i){var n=-90+s+r%i*a;var _=this.calcXOnCircle(t,n);var o=this.calcYOnCircle(t,n);if(r==0){e.moveTo(_,o)}else{e.lineTo(_,o)}++r}},__class__:trcharts_charts_series_dots_Anchor});var trcharts_charts_series_dots_Bow=function(e,t){var i=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 s;if(t.get("hollow")){if(t.get("background-colour")!=null){s=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{s=i}this.get_graphics().beginFill(s,t.get("background-alpha"))}else{this.get_graphics().beginFill(i,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),i,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,i){var s=60;e.moveTo(0,0);var a=-90+i+s;var r=this.calcXOnCircle(t,a);var n=this.calcYOnCircle(t,a);e.lineTo(r,n);a+=s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);e.lineTo(r,n);a=-90+i-s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);a-=s;r=this.calcXOnCircle(t,a);n=this.calcYOnCircle(t,a);e.lineTo(r,n);e.lineTo(r,n)},__class__:trcharts_charts_series_dots_Bow});var trcharts_charts_series_dots_DefaultDotProperties=function(e,t,i){var s=new trcharts_Properties({axis:i,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,s)};$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 i=t.get("type");switch(i){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 i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().clear();this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,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 s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);this.line_mask=s;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 i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.set_visible(false);this.attach_events();var s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);s.set_visible(false);this.line_mask=s};$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 i=trcharts_string_Utils.get_colour(t.get("colour"));this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(i,1);this.get_graphics().drawCircle(0,0,t.get("dot-size"));this.get_graphics().endFill();var s=new openfl_display_Sprite;s.get_graphics().lineStyle(0,0,0);s.get_graphics().beginFill(0,1);s.get_graphics().drawCircle(0,0,t.get("dot-size")+t.get("halo-size"));s.set_blendMode(4);this.line_mask=s;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 i=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 s;if(t.has("background-colour")){s=trcharts_string_Utils.get_colour(t.get("background-colour"))}else{s=i}this.get_graphics().beginFill(s,t.get("background-alpha"))}else{this.get_graphics().beginFill(i,t.get("alpha"))}this.get_graphics().lineStyle(t.get("width"),i,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,i){var s=36;var a=-90+i;var r=0;while(r<11){var n=r++;var _=n%2==0?t:t/2;var o=this.calcXOnCircle(_,a);var l=this.calcYOnCircle(_,a);if(n==0){e.moveTo(o,l)}else{e.lineTo(o,l)}a+=s}},__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 i=10;this.get_graphics().clear();this.get_graphics().lineStyle(this.border_width,this.colour,1);if(this.gradientFill){var s=[this.colour,this.colour];var a=[1,.5];var r=[100,255];var n=new openfl_geom_Matrix;n.createGradientBox(t*2,t*2,0,-t,-t);this.get_graphics().beginGradientFill(1,s,a,r,n)}else{this.get_graphics().beginFill(this.colour,1)}this.get_graphics().moveTo(0,0);this.get_graphics().lineTo(t,0);var _=4;var o=Math.tan(_/2*this.TO_RADIANS);var l=0;var h;var c;var u;var f;l=0;while(l+_<this.slice_angle){h=t*Math.cos((l+_)*this.TO_RADIANS);c=t*Math.sin((l+_)*this.TO_RADIANS);u=h+t*o*Math.cos((l+_-90)*this.TO_RADIANS);f=c+t*o*Math.sin((l+_-90)*this.TO_RADIANS);this.get_graphics().curveTo(u,f,h,c);l+=_}_=.08;o=Math.tan(_/2*this.TO_RADIANS);while(l+_<this.slice_angle){h=t*Math.cos((l+_)*this.TO_RADIANS);c=t*Math.sin((l+_)*this.TO_RADIANS);u=h+t*o*Math.cos((l+_-90)*this.TO_RADIANS);f=c+t*o*Math.sin((l+_-90)*this.TO_RADIANS);this.get_graphics().curveTo(u,f,h,c);l+=_}this.get_graphics().endFill();this.get_graphics().lineTo(0,0);if(!this.nolabels){this.draw_label_line(t,i,this.slice_angle)}if(this.animate){if(!this.finished_animating){this.finished_animating=true;motion_Actuate.tween(this,1,{rotation:this.angle}).ease(motion_easing_Quart.get_easeOut()).onComplete($bind(this,this.done_animating))}}else{this.done_animating()}},done_animating:function(){this.set_rotation(this.angle);this.finished_animating=true},draw_label_line:function(e,t,i){},getTicAngle:function(){return this.angle+this.slice_angle/2},isRightSide:function(){if(!(this.getTicAngle()>=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 i=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 s=t.get("no-labels")?"":t.get("label");this.pieLabel=new trcharts_charts_series_pies_PieLabel({label:s,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 i=this.getTicAngle();this.saveX=this.get_x();this.saveY=this.get_y();this.moveToX=this.get_x()+this.animationOffset*Math.cos(i*this.TO_RADIANS);this.moveToY=this.get_y()+this.animationOffset*Math.sin(i*this.TO_RADIANS);if(this.pieLabel.get_visible()){var s=t+this.tick_size;var a=i*this.TO_RADIANS;this.pieLabel.set_x(this.pieSlice.get_x()+s*Math.cos(a));this.pieLabel.set_y(this.pieSlice.get_y()+s*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 n=this.pieLabel;n.set_y(n.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 i=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 s=0;while(s<i.length){var a=i[s];++s;var r=a.type;if(r=="bounce"){this.addEventListener("mouseOver",$bind(this,this.mouseOver_bounce_out),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut_bounce_out),false,0,true);this.animationOffset=a.distance;break}else{this.addEventListener("mouseOver",$bind(this,this.mouseOver_alpha),false,0,true);this.addEventListener("mouseOut",$bind(this,this.mouseOut_alpha),false,0,true);break}}},mouseOver_first:function(e){if(this.animating){return}this.animating=true;motion_Actuate.stop(this)},mouseOut_first:function(e){motion_Actuate.stop(this);this.animating=false},mouseOver_bounce_out:function(e){motion_Actuate.tween(this,1,{x:this.moveToX,y:this.moveToY}).ease(motion_easing_Bounce.get_easeOut())},mouseOut_bounce_out:function(e){motion_Actuate.tween(this,1,{x:this.saveX,y:this.saveY}).ease(motion_easing_Bounce.get_easeOut())},mouseOver_alpha:function(e){motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Elastic.get_easeOut())},mouseOut_alpha:function(e){motion_Actuate.tween(this,1,{alpha:this.original_alpha}).ease(motion_easing_Elastic.get_easeOut())},getLabelTopY:function(){return this.pieLabel.get_y()},getLabelBottomY:function(){return this.pieLabel.get_y()+this.pieLabel.get_height()},moveLabelDown:function(e,t){if(this.pieLabel.get_visible()){var i=false;var s=this.getLabelTopY();if(s<t){var a=t-s;if(this.pieLabel.get_height()+t>e.bottom-1){a=e.bottom-this.pieLabel.get_height()-s;i=true}var r=this.pieLabel;r.set_y(r.get_y()+a);if(!i){var n=this.pieRadius+this.tick_size;var _=(this.pieLabel.get_y()+this.pieLabel.get_height()/2-this.pieSlice.get_y())/n;_=Math.max(-1,Math.min(1,_));var o=Math.asin(_)/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()+n*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 i=1;var s=false;var a=this.getLabelBottomY();if(a>t){var r=t-a;if(t-this.pieLabel.get_height()<e.top+1){r=e.top-this.getLabelTopY();s=true}var n=this.pieLabel;n.set_y(n.get_y()+r);if(!s){var _=this.pieRadius+this.tick_size;var o=(this.pieLabel.get_y()+this.pieLabel.get_height()/2-this.pieSlice.get_y())/_;o=Math.max(-1,Math.min(1,o));var l=Math.asin(o)/this.TO_RADIANS;if(this.getTicAngle()>90&&this.getTicAngle()<270){l=180-l;i=-1}else if(this.getTicAngle()>=270){l=360+l}var h=this.pieSlice.get_x()+_*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 i=20;var s=this.tick_size;if(t>=0&&t<=90){e.bottom=t/90*s+this.pieLabel.get_height()/2+1;e.right=(90-t)/90*s+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()}else if(t>90&&t<=180){e.bottom=(180-t)/90*s+this.pieLabel.get_height()/2+1;e.left=(t-90)/90*s+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()+4}else if(t>180&&t<270){e.top=(t-180)/90*s+this.pieLabel.get_height()/2+1;e.left=(270-t)/90*s+this.tick_extension_size+this.label_margin+this.pieLabel.get_width()+4}else{e.top=(360-t)/90*s+this.pieLabel.get_height()/2+1;e.right=(t-270)/90*s+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 i=e*this.TO_RADIANS;var s;var a;if(this.pieSlice.isRightSide()){s=this.pieLabel.get_x()-this.label_margin}else{s=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(i);var n=this.pieSlice.get_y()+this.pieRadius*Math.sin(i);this.get_graphics().clear();var _=this.pieSlice.get_colour();this.get_graphics().lineStyle(1,_,1);this.get_graphics().moveTo(s,a);if(this.pieSlice.isRightSide()){this.get_graphics().lineTo(s-this.tick_extension_size,a)}else{this.get_graphics().lineTo(s+this.tick_extension_size,a)}this.get_graphics().lineTo(r,n)}},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,i,s,a){e%=360;if(e<0){e+=360}this.set_rotation(e);var r=this.get_width()*Math.cos(e*Math.PI/180);var n=this.get_height()*Math.cos((90-e)*Math.PI/180);var _=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+=s}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-=s}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(i=="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(i=="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,i){e%=360;if(e<0){e+=360}var s=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 n=this.get_width()*Math.sin(e*Math.PI/180);if(e%90==0||t=="center"){this.xAdj=(a-s)/2}else{this.xAdj=e<180?a/2:-s+a/2}if(e>90){this.yAdj=-r}if(e>180){this.yAdj=-r-n}if(e>270){this.yAdj=-n}this.set_rotation(e);var _=this.getBounds(i);this.leftOverhang=Math.abs(_.x+this.xAdj);this.rightOverhang=Math.abs(_.x+_.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 i=0;while(i<t){var s=e.get_get_x_from_pos_and_y_from_val(i,0);this.get_graphics().moveTo(s.x,s.y);var a=e.get_get_x_from_pos_and_y_from_val(i,e.get_max());this.get_graphics().lineTo(a.x,a.y);++i}},draw_grid:function(e,t){this.get_graphics().lineStyle(1,this.grid_colour,1,true);var i=e.get_max()+1e-5;var s=this.style.steps;var a;var r=s;while(r<=i){a=e.get_get_x_from_pos_and_y_from_val(0,r);this.get_graphics().moveTo(a.x,a.y);var n=1;while(n<t+1){a=e.get_get_x_from_pos_and_y_from_val(n,r);this.get_graphics().lineTo(a.x,a.y);++n}r+=s}},die:function(){this.style=null;this.labels.die();this.spoke_labels.die();this.get_graphics().clear();while(this.get_numChildren()>0)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 i=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var s=this.style.labels;var a=0;while(a<s.length){var r=s[a];++a;this.add(r,this.style)}}};$hxClasses["trcharts.elements.axis.RadarAxisLabels"]=trcharts_elements_axis_RadarAxisLabels;trcharts_elements_axis_RadarAxisLabels.__name__=["trcharts","elements","axis","RadarAxisLabels"];trcharts_elements_axis_RadarAxisLabels.__super__=openfl_display_Sprite;trcharts_elements_axis_RadarAxisLabels.prototype=$extend(openfl_display_Sprite.prototype,{style:null,labels:null,add:function(e,t){var i={colour:t.colour,text:"",size:t.size,visible:true};if(typeof e=="string"){i.text=js_Boot.__cast(e,String)}else{trcharts_Object_$helper.merge_2(e,i)}if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}this.labels.push(i.text);if(i.visible==null){if((this.labels.length-1)%t.steps==0){i.visible=true}else{i.visible=false}}var s=this.make_label(i);this.addChild(s)},make_label:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);t.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(e.text));var i=new openfl_text_TextFormat;i.color=e.colour;i.font="Verdana";i.size=e.size;t.setTextFormat(i);t.set_autoSize(1);t.set_visible(e.visible);return t},resize:function(e){var t;var i;var s=e.get_center_x();t=0;while(t<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(t),openfl_text_TextField);i.set_x(s-i.get_width());++t}t=0;while(t<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(t),openfl_text_TextField);i.set_y(e.get_y_from_val(t,false)-i.get_height()/2);++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_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 i=false;if(this.style.labels instanceof Array&&this.style.labels.__enum__==null&&this.style.labels.length>0){var s=this.style.labels;var a=0;while(a<s.length){var r=s[a];++a;this.add(r,this.style)}}};$hxClasses["trcharts.elements.axis.RadarSpokeLabels"]=trcharts_elements_axis_RadarSpokeLabels;trcharts_elements_axis_RadarSpokeLabels.__name__=["trcharts","elements","axis","RadarSpokeLabels"];trcharts_elements_axis_RadarSpokeLabels.__super__=openfl_display_Sprite;trcharts_elements_axis_RadarSpokeLabels.prototype=$extend(openfl_display_Sprite.prototype,{style:null,labels:null,add:function(e,t){var i={colour:t.colour,text:"",size:11};if(typeof e=="string"){i.text=js_Boot.__cast(e,String)}else{trcharts_Object_$helper.merge_2(e,i)}if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}this.labels.push(i.text);var s=this.make_label(i);this.addChild(s)},make_label:function(e){var t=new openfl_text_TextField;t.set_x(0);t.set_y(0);var i=Reflect.field(e,"text");var s=i.split("<br>");var a=s.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 i=0;var s;while(true){s=false;this.resize_2(e);i=0;while(i<this.get_numChildren()){t=js_Boot.__cast(this.getChildAt(i),openfl_text_TextField);if(t.get_x()<e.left||t.get_y()<e.top||t.get_y()+t.get_height()>e.bottom||t.get_x()+t.get_width()>e.right){s=true}++i}e.reduce_radius();if(!(s&&e.get_radius()>10)){break}}},resize_2:function(e){var t;var i;var s=e.get_center_x();t=0;while(t<this.get_numChildren()){i=js_Boot.__cast(this.getChildAt(t),openfl_text_TextField);var a=e.get_get_x_from_pos_and_y_from_val(t,e.get_max());if(a.x>s){i.set_x(a.x)}else{i.set_x(a.x-i.get_width())}if(t==0){i.set_y(a.y-i.get_height());i.set_x(a.x)}else{i.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,i){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,i)}else if(this.labels.count()>i){this.set_range(0,this.labels.count())}else{this.set_range(t,i)}}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<e.length){var i=e[t];++t;if(typeof i!="string"){if(i.x!=null){var s={x:i.x};if(Reflect.field(i,"grid-colour")){s["grid-colour"]=trcharts_string_Utils.get_colour(Reflect.field(i,"grid-colour"))}else{s["grid-colour"]=this.grid_colour}this.user_ticks=true;this.user_labels.push(s)}}}}},calcSteps:function(){if(this.style.max==null){this.steps=1}else{var e=this.style.max-this.style.min;var t=this.style.min>=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 i=0;var s=this.user_labels;while(i<s.length){var a=s[i];++i;this.get_graphics().beginFill(Reflect.field(a,"grid-colour"),1);var r=e.get_x_from_val(a.x);this.get_graphics().drawRect(r,e.top,1,e.height);this.get_graphics().endFill()}}else if(this.grid_visible){var n=this.style.min>=this.style.max;var _=this.style.max;var o=this.style.min;while(n?o>=_:o<=_){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 i=12;var s=t+i;var a=e.width/this.style.max;this.get_graphics().lineStyle(0,0,0);var r=1;if(this.user_ticks){var n=0;var _=this.user_labels;while(n<_.length){var o=_[n];++n;var l=e.get_x_from_val(o.x);this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(l,e.bottom+s,r,this.tick_height);this.get_graphics().endFill()}}else{var h=0;while(h<this.style.max){var c=e.get_x_tick_pos(h);this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(c,e.bottom+s,r,this.tick_height);this.get_graphics().endFill();h+=this.steps}}var u=trcharts_charts_series_bars_Bar3D.Lighten(this.colour);var f=[js_Boot.__cast(this.colour,Int),js_Boot.__cast(u,Int)];var p=[100,100];var d=[0,255];var g=new openfl_geom_Matrix;g.createGradientBox(e.width_(),i,1.5*Math.PI,e.left-i,e.bottom);this.get_graphics().beginGradientFill(0,f,p,d,g,0);this.get_graphics().moveTo(e.left,e.bottom);this.get_graphics().lineTo(e.right,e.bottom);this.get_graphics().lineTo(e.right-i,e.bottom+i);this.get_graphics().lineTo(e.left-i,e.bottom+i);this.get_graphics().endFill();f=[this.colour,u];p=[100,100];d=[0,255];g.createGradientBox(e.width_(),t,1.5*Math.PI,e.left-i,e.bottom+i);this.get_graphics().beginGradientFill(0,f,p,d,g);this.get_graphics().moveTo(e.left-i,e.bottom+i);this.get_graphics().lineTo(e.right-i,e.bottom+i);this.get_graphics().lineTo(e.right-i,e.bottom+i+t);this.get_graphics().lineTo(e.left-i,e.bottom+i+t);this.get_graphics().endFill();f=[this.colour,u];p=[100,100];d=[0,255];g.createGradientBox(e.width_(),t,1.25*Math.PI,e.left-i,e.bottom+i);this.get_graphics().beginGradientFill(0,f,p,d,g);this.get_graphics().moveTo(e.right,e.bottom);this.get_graphics().lineTo(e.right,e.bottom+t);this.get_graphics().lineTo(e.right-i,e.bottom+i+t);this.get_graphics().lineTo(e.right-i,e.bottom+i);this.get_graphics().endFill()},two_d_axis:function(e){var t=e.width/this.style.max;var i=e.left+t/2;this.get_graphics().lineStyle(0,0,0);this.get_graphics().beginFill(this.colour);this.get_graphics().drawRect(e.left,e.bottom,e.width,this.stroke);this.get_graphics().endFill();if(this.user_ticks){var s=0;var a=this.user_labels;while(s<a.length){var r=a[s];++s;var n=e.get_x_from_val(r.x);this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(n-this.stroke/2,e.bottom+this.stroke,this.stroke,this.tick_height);this.get_graphics().endFill()}}else{var _=this.style.min;while(_<this.style.max){var o=e.get_x_from_val(_);this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(o-this.stroke/2,e.bottom+this.stroke,this.stroke,this.tick_height);this.get_graphics().endFill();_+=this.steps}}},get_height:function(){if(this.three_d){return this.three_d_height+12+this.tick_height+this.labels.get_height()}else{return this.stroke+this.tick_height+this.labels.get_height()}},first_label_width:function(){return this.labels.first_label_width()},last_label_width:function(){return this.labels.last_label_width()},die:function(){this.style=null;this.get_graphics().clear();while(this.get_numChildren()>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 i=0;var s=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<a.length){var n=a[r];++r;var _={};trcharts_Object_$helper.merge_2(this.style,_);_.visible=i%s==0;_.x=t;this.add(n,_);++t;++i}}};$hxClasses["trcharts.elements.axis.XAxisLabels"]=trcharts_elements_axis_XAxisLabels;trcharts_elements_axis_XAxisLabels.__name__=["trcharts","elements","axis","XAxisLabels"];trcharts_elements_axis_XAxisLabels.__super__=openfl_display_Sprite;trcharts_elements_axis_XAxisLabels.prototype=$extend(openfl_display_Sprite.prototype,{need_labels:null,axis_labels:null,style:null,userSpecifiedVisible:null,auto_label:function(e,t){if(this.need_labels){var i=e.min>=e.max;var s=1;if(this.style.steps!=null){s=this.style.steps}if(Math.abs(e.count()/s)>250){s=e.count()/250}if(i){s=-Math.abs(s)}else{s=Math.abs(s)}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 n=0;var _=e.min;while(i?_>=e.max:_<=e.max){r.x=_;if(this.userSpecifiedVisible==null){r.visible=n%a==0;++n}else{r.visible=this.userSpecifiedVisible}this.add(null,r);_+=s}}},add:function(e,t){var i={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"){i.text=js_Boot.__cast(e,String)}else{trcharts_Object_$helper.merge_2(e,i)}if(i.x!=null){i.text=this.replace_magic_values(i.text,i.x)}var s=Reflect.field(i,"text");var a=s.split("<br>");s+="\n";i["text"]=s;this.axis_labels[i.x]=i.text;if(i.visible){if(typeof i.colour=="string"){i.colour=trcharts_string_Utils.get_colour(i.colour)}var r=this.make_label(i);this.addChild(r)}},get:function(e){if(e<this.axis_labels.length){return this.axis_labels[e]}else{return""}},make_label:function(e){var t=new trcharts_elements_axis_AxisLabel;t.set_x(0);t.set_y(0);t.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(e.text));t.set_selectable(false);var i=new openfl_text_TextFormat;i.color=e.colour;if(e.rotate!=0){i.font="spArial";t.set_embedFonts(true)}else{i.font="Verdana"}i.size=e.size;i.align=3;t.setTextFormat(i);t.set_autoSize(1);t.rotate_and_align(e.rotate,e.align,this);t.set_visible(e.visible);if(e.x!=null){t.xVal=e.x}return t},count:function(){return this.axis_labels.length-1},get_height:function(){var e=0;var t=0;while(t<this.get_numChildren()){var i=this.getChildAt(t);e=Math.max(e,i.get_height());++t}return e},resize:function(e,t){this.get_graphics().clear();var i=0;var s=0;while(s<this.get_numChildren()){var a=this.getChildAt(s);if(isNaN(a.xVal)){a.set_x(e.get_x_tick_pos(s)+a.xAdj)}else{a.set_x(e.get_x_from_val(a.xVal)+a.xAdj)}a.set_y(t+a.yAdj);++s}},last_label_width:function(){if(this.get_numChildren()>0){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,i){this.style=i;if(Reflect.field(e,t)){trcharts_Object_$helper.merge_2(Reflect.field(e,t),this.style)}this.colour=trcharts_string_Utils.get_colour(i.colour);this.grid_colour=trcharts_string_Utils.get_colour(Reflect.field(i,"grid-colour"));this.stroke=i.stroke;this.tick_length=Reflect.field(i,"tick-length");if(this.style.max==null){this.style.max=this.labels.y_max}var s=Math.min(this.style.min,this.style.max);var a=Math.max(this.style.min,this.style.max);this.style.steps=this.get_steps(s,a,this.stage.stageHeight);if(this.labels.i_need_labels){this.labels.make_labels(s,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 n=0;while(n<r.length){var _=r[n];++n;if(typeof _!="string"){if(_.y!=null){var o={y:_.y};if(Reflect.field(_,"grid-colour")){o["grid-colour"]=trcharts_string_Utils.get_colour(Reflect.field(_,"grid-colour"))}else{o["grid-colour"]=this.grid_colour}this.user_ticks=true;this.user_labels.push(o)}}}}},get_range:function(){return new trcharts_Range(this.style.min,this.style.max,this.style.steps,this.style.offset)},get_width:function(){return this.stroke+this.tick_length+this.labels.get_width()},die:function(){this.style=null;if(this.labels!=null){this.labels.die()}this.labels=null;this.get_graphics().clear();while(this.get_numChildren()>0)this.removeChildAt(0)},get_steps:function(e,t,i){if(this.style.steps==0){this.style.steps=1}if(this.style.steps<0){this.style.steps*=-1}var s=(t-e)/this.style.steps;if(s>i/2){return(t-e)/5}return this.style.steps},resize:function(e,t){},resize_helper:function(e,t,i){var s=0;var a;var r;var n;var _=Math.min(this.style.min,this.style.max);var o=Math.max(this.style.min,this.style.max);if(!i){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,_,o,i,t)}var l;if(!i){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(c<u.length){var f=u[c];++c;r=t.get_y_from_val(f.y,i);var p;if(!i){p=t.left-this.stroke-this.tick_length}else{p=t.right+this.stroke}this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(p,r-this.stroke/2,this.tick_length,this.stroke);this.get_graphics().endFill()}}else{a=_;while(a<=o){r=t.get_y_from_val(a,i);var d;if(!i){d=t.left-this.stroke-this.tick_length}else{d=t.right+this.stroke}this.get_graphics().beginFill(this.colour,1);this.get_graphics().drawRect(d,r-this.stroke/2,this.tick_length,this.stroke);this.get_graphics().endFill();a+=this.style.steps}}},draw_grid_lines:function(e,t,i,s,a){var r;var n;if(this.user_ticks){var _=0;var o=this.user_labels;while(_<o.length){var l=o[_];++_;r=a.get_y_from_val(l.y,s);this.get_graphics().beginFill(Reflect.field(l,"grid-colour"),1);this.get_graphics().drawRect(a.left,r,a.width,1);this.get_graphics().endFill()}}else{i+=4e-6;var h=t;while(h<=i){r=a.get_y_from_val(h,s);this.get_graphics().beginFill(this.grid_colour,1);this.get_graphics().drawRect(a.left|0,r|0,a.width,1);this.get_graphics().endFill();h+=e}}},__class__:trcharts_elements_axis_YAxisBase});var trcharts_elements_axis_YAxisLabelsBase=function(e,t){openfl_display_Sprite.call(this);var i=0;var s="";var a=[];var r=0;this.y_max=10;if(Reflect.field(e,t)){if(Reflect.field(Reflect.field(e,t),"labels")instanceof Array&&Reflect.field(Reflect.field(e,t),"labels").__enum__==null){a=[];if(Reflect.field(e,t)&&Reflect.field(e,t).min){i=Reflect.field(e,t).min}else{i=0}var n=Reflect.field(e,t).labels;var _=0;while(_<n.length){var o=n[_];++_;a.push({val:o,pos:i});++i}this.y_max=Reflect.field(e,t)&&Reflect.field(e,t).max?Reflect.field(e,t).max:a.length-1;this.i_need_labels=false}}if(Reflect.field(e,t)){if(js_Boot.__instanceof(Reflect.field(e,t).labels,Dynamic)){if(typeof Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"text")=="string"){this.lblText=Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"text")}var l=1;if(typeof Reflect.field(Reflect.field(e,t),"steps")=="number"){l=Reflect.field(Reflect.field(e,t),"steps")}if(typeof Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"steps")=="number"){l=Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"steps")}if(Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"labels")instanceof Array&&Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"labels").__enum__==null){var h=Reflect.field(e,t)&&Reflect.field(e,t).min?Reflect.field(e,t).min:0;var c=Reflect.field(Reflect.field(Reflect.field(e,t),"labels"),"labels");var u=0;while(u<c.length){var f=c[u];++u;if(typeof f=="number"){a.push({val:this.lblText,pos:f})}else if(typeof f=="string"){a.push({val:f,pos:h,visible:h%l==0})}else if(typeof f.y=="number"){if(typeof f.text=="string"){s=f.text}else{s=this.lblText}var p={val:s,pos:f.y};if(f.colour!=null){p.colour=f.colour}if(f.size!=null){p.size=f.size}if(f.rotate!=null){p.rotate=f.rotate}a.push(p)}++h}this.i_need_labels=false}}}this.steps=r;var d=new trcharts_elements_axis_YLabelStyle(e,this.get_name());this.style=d.style;if(!Reflect.field(e,t)&&t!="y_axis"){this.style.show_labels=false}if(Reflect.field(e,t)&&Reflect.field(Reflect.field(e,t),"rotate")){var g=Reflect.field(e,t);this.style.rotate=Reflect.field(g,"rotate")}if(Reflect.field(e,t)!=null&&Reflect.field(Reflect.field(e,t),"labels")!=null){trcharts_Object_$helper.merge_2(Reflect.field(Reflect.field(e,t),"labels"),this.style)}this.add_labels(a)};$hxClasses["trcharts.elements.axis.YAxisLabelsBase"]=trcharts_elements_axis_YAxisLabelsBase;trcharts_elements_axis_YAxisLabelsBase.__name__=["trcharts","elements","axis","YAxisLabelsBase"];trcharts_elements_axis_YAxisLabelsBase.__super__=openfl_display_Sprite;trcharts_elements_axis_YAxisLabelsBase.prototype=$extend(openfl_display_Sprite.prototype,{steps:null,style:null,i_need_labels:null,lblText:null,y_max:null,add_labels:function(e){if(this.style!=null&&!Object.prototype.hasOwnProperty.call(this.style,"show_labels")){return}var t=0;var i=0;while(i<e.length){var s=e[i];++i;var a={};trcharts_Object_$helper.merge_2(this.style,a);trcharts_Object_$helper.merge_2(s,a);if(a.visible){var r=this.make_label(a);r.y_val=s.pos;this.addChild(r);++t}}},make_labels:function(e,t,i){if(!this.i_need_labels){return}this.i_need_labels=false;this.make_labels_(e,t,false,i,this.lblText)},make_labels_:function(e,t,i,s,a){var r=[];var n=Math.min(e,t);var _=Math.max(e,t);_+=4e-6;var o=0;var l=n;while(l<=_){r.push({val:a,pos:l});if(o++>250){break}l+=s}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 i=new openfl_text_TextFormat;i.color=e.colour;i.font=e.rotate=="vertical"?"spArial":"Verdana";i.size=e.size;t.setTextFormat(i);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(t<this.get_numChildren()){var i=js_Boot.__cast(this.getChildAt(t),trcharts_elements_axis_YTextField);e=Math.max(e,i.get_width());++t}return e},die:function(){while(this.get_numChildren()>0)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 i=this.get_width();var s;var a;s=0;while(s<this.get_numChildren()){a=js_Boot.__cast(this.getChildAt(s),trcharts_elements_axis_YTextField);a.set_x(e-a.get_width()+i);++s}s=0;while(s<this.get_numChildren()){a=js_Boot.__cast(this.getChildAt(s),trcharts_elements_axis_YTextField);if(a.get_rotation()!=0){a.set_y(t.get_y_from_val(a.y_val,false)+a.get_height()/2)}else{a.set_y(t.get_y_from_val(a.y_val,false)-a.get_height()/2)}if(a.get_y()<0&&t.top==0){a.set_y(a.get_rotation()!=0?a.get_height():a.get_textHeight()-a.get_height())}++s}},__class__:trcharts_elements_axis_YAxisLabelsLeft});var trcharts_elements_axis_YAxisLabelsRight=function(e){trcharts_elements_axis_YAxisLabelsBase.call(this,e,"y_axis_right");this.lblText="#val#";this.i_need_labels=false};$hxClasses["trcharts.elements.axis.YAxisLabelsRight"]=trcharts_elements_axis_YAxisLabelsRight;trcharts_elements_axis_YAxisLabelsRight.__name__=["trcharts","elements","axis","YAxisLabelsRight"];trcharts_elements_axis_YAxisLabelsRight.__super__=trcharts_elements_axis_YAxisLabelsBase;trcharts_elements_axis_YAxisLabelsRight.prototype=$extend(trcharts_elements_axis_YAxisLabelsBase.prototype,{resize:function(e,t){var i=this.get_width();var s;var a;s=0;while(s<this.get_numChildren()){a=js_Boot.__cast(this.getChildAt(s),trcharts_elements_axis_YTextField);a.set_x(e);++s}s=0;while(s<this.get_numChildren()){a=js_Boot.__cast(this.getChildAt(s),trcharts_elements_axis_YTextField);if(a.get_rotation()!=0){a.set_y(t.get_y_from_val(a.y_val,true)+a.get_height()/2)}else{a.set_y(t.get_y_from_val(a.y_val,true)-a.get_height()/2)}if(a.get_y()<0&&t.top==0){a.set_y(a.get_rotation()!=0?a.get_height():a.get_textHeight()-a.get_height())}++s}},__class__:trcharts_elements_axis_YAxisLabelsRight});var trcharts_elements_axis_YAxisLeft=function(){trcharts_elements_axis_YAxisBase.call(this)};$hxClasses["trcharts.elements.axis.YAxisLeft"]=trcharts_elements_axis_YAxisLeft;trcharts_elements_axis_YAxisLeft.__name__=["trcharts","elements","axis","YAxisLeft"];trcharts_elements_axis_YAxisLeft.__super__=trcharts_elements_axis_YAxisBase;trcharts_elements_axis_YAxisLeft.prototype=$extend(trcharts_elements_axis_YAxisBase.prototype,{init:function(e){this.labels=new trcharts_elements_axis_YAxisLabelsLeft(e);this.addChild(this.labels);var t={stroke:2,"tick-length":3,colour:"#784016",offset:false,"grid-colour":"#F5E1AA","grid-visible":true,"3d":0,steps:1,visible:true,min:0,max:null};trcharts_elements_axis_YAxisBase.prototype._init.call(this,e,"y_axis",t)},resize:function(e,t){trcharts_elements_axis_YAxisBase.prototype.resize_helper.call(this,e,t,false)},__class__:trcharts_elements_axis_YAxisLeft});var trcharts_elements_axis_YAxisRight=function(){trcharts_elements_axis_YAxisBase.call(this)};$hxClasses["trcharts.elements.axis.YAxisRight"]=trcharts_elements_axis_YAxisRight;trcharts_elements_axis_YAxisRight.__name__=["trcharts","elements","axis","YAxisRight"];trcharts_elements_axis_YAxisRight.__super__=trcharts_elements_axis_YAxisBase;trcharts_elements_axis_YAxisRight.prototype=$extend(trcharts_elements_axis_YAxisBase.prototype,{init:function(e){this.labels=new trcharts_elements_axis_YAxisLabelsRight(e);this.addChild(this.labels);var t={stroke:2,"tick-length":3,colour:"#784016",offset:false,"grid-colour":"#F5E1AA","grid-visible":false,"3d":0,steps:1,visible:false,min:0,max:10};if(e.y_axis_right){t.visible=true}trcharts_elements_axis_YAxisBase.prototype._init.call(this,e,"y_axis_right",t)},resize:function(e,t){trcharts_elements_axis_YAxisBase.prototype.resize_helper.call(this,e,t,true)},__class__:trcharts_elements_axis_YAxisRight});var trcharts_elements_axis_YLabelStyle=function(e,t){this.style={size:10,colour:0,show_labels:true,visible:true};var i;var s;var a;if(!Object.prototype.hasOwnProperty.call(e,t+"_label_style")){if(Reflect.field(e,t+"_label_style")==null){return}}i=Reflect.field(e,t+"_label_style").lastIndexOf(",");if(i<0){s=Reflect.field(e,t+"_label_style").lastIndexOf("none",0);if(s>-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 i=new openfl_text_TextFormat;i.color=this.css.color;i.font="Verdana";i.bold=this.css.font_weight=="bold";i.size=this.css.font_size|0;t.setTextFormat(i);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 i=0;var s=e.sets;while(i<s.length){var a=s[i];++i;var r=a.get_keys();var n=0;while(n<r.length){var _=r[n];++n;this.make_key(_.text,Reflect.field(_,"font-size"),_.colour);this.colours.push(_.colour);++t}}this.count=t};$hxClasses["trcharts.elements.labels.Keys"]=trcharts_elements_labels_Keys;trcharts_elements_labels_Keys.__name__=["trcharts","elements","labels","Keys"];trcharts_elements_labels_Keys.__super__=openfl_display_Sprite;trcharts_elements_labels_Keys.prototype=$extend(openfl_display_Sprite.prototype,{_height:null,count:null,colours:null,make_key:function(e,t,i){var s=new openfl_text_TextField;s.set_text(e);s.set_selectable(false);var a=new openfl_text_TextFormat;a.color=i;a.font="Verdana";a.size=t|0;s.setTextFormat(a);s.set_autoSize(1);this.addChild(s)},draw_line:function(e,t,i,s){t+=i/2;this.get_graphics().beginFill(s,100);this.get_graphics().drawRect(e,t-1,10,2);this.get_graphics().endFill();return e+12},resize:function(e,t){if(this.count==0){return}this.set_x(e);this.set_y(t);var i=0;var s=0;var a=0;this.get_graphics().clear();var r=0;while(r<this.get_numChildren()){var n=this.getChildAt(r).get_width();if(this.get_x()+s+n+12>this.stage.stageWidth){s=0;a+=this.getChildAt(r).get_height();i+=this.getChildAt(r).get_height()}this.draw_line(s,a,this.getChildAt(r).get_height(),this.colours[r]);s+=12;this.getChildAt(r).set_x(s);this.getChildAt(r).set_y(a);s+=n+10;++r}i+=this.getChildAt(0).get_height();this._height=i},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 i=new openfl_text_TextFormat;i.color=this.css.color;i.font="spArial";i.size=this.css.font_size|0;i.align=0;t.set_htmlText(e);t.setTextFormat(i);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 i=this.add_elements();this.draw_bg(i+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 i=new openfl_text_TextField;i.set_x(t);i.set_y(0);i.set_selectable(false);i.set_htmlText(e);var s=new openfl_text_TextFormat;s.color=trcharts_string_Utils.get_colour(this.props.get("text-colour"));s.font="Verdana";s.size=10;s.underline=true;i.setTextFormat(s);i.set_autoSize(1);i.mouseEnabled=false;i.set_selectable(false);this.addChild(i);return i.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 i=[];i.push(t);this.set_filters(i)},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 i=5;var s=0;this.first_showing=true;var a=t.values;var r=0;while(r<a.length){var n=a[r];++r;var _=new trcharts_elements_menu_DefaultCameraIconProperties(n);var o=trcharts_elements_menu_Menu_$item_$factory.make(e,_);o.set_x(5);o.set_y(i);this.addChild(o);s=o.get_y()+o.get_height()+5;i+=o.get_height()+5}var l=0;var h=0;while(h<this.get_numChildren()){l=Math.max(l,this.getChildAt(h).get_width());++h}this.draw(l+10,s);this.hidden_pos=s;this.addEventListener("mouseOver",$bind(this,this.mouseOverHandler));this.addEventListener("mouseOut",$bind(this,this.mouseOutHandler))};$hxClasses["trcharts.elements.menu.Menu"]=trcharts_elements_menu_Menu;trcharts_elements_menu_Menu.__name__=["trcharts","elements","menu","Menu"];trcharts_elements_menu_Menu.__super__=openfl_display_Sprite;trcharts_elements_menu_Menu.prototype=$extend(openfl_display_Sprite.prototype,{original_alpha:null,props:null,first_showing:null,hidden_pos:null,draw:function(e,t){this.get_graphics().clear();var i=trcharts_string_Utils.get_colour(this.props.get("colour"));var s=trcharts_string_Utils.get_colour(this.props.get("outline-colour"));this.get_graphics().lineStyle(1,s);this.get_graphics().beginFill(i,1);this.get_graphics().moveTo(0,-2);this.get_graphics().lineTo(0,t);this.get_graphics().lineTo(e-25,t);this.get_graphics().lineTo(e-20,t+10);this.get_graphics().lineTo(e,t+10);this.get_graphics().lineTo(e,-2);this.get_graphics().endFill();this.get_graphics().lineStyle(1,s);this.get_graphics().moveTo(e-15,t+3);this.get_graphics().lineTo(e-10,t+8);this.get_graphics().lineTo(e-5,t+3);this.get_graphics().moveTo(e-15,t);this.get_graphics().lineTo(e-10,t+5);this.get_graphics().lineTo(e-5,t)},mouseOverHandler:function(e){motion_Actuate.stop(this);motion_Actuate.tween(this,1,{y:0}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this,1,{alpha:1}).ease(motion_easing_Bounce.get_easeOut())},mouseOutHandler:function(e){this.hide_menu()},hide_menu:function(){motion_Actuate.stop(this);motion_Actuate.tween(this,1,{y:-this.hidden_pos}).ease(motion_easing_Bounce.get_easeOut());motion_Actuate.tween(this,1,{alpha:this.original_alpha}).ease(motion_easing_Bounce.get_easeOut())},resize:function(){if(this.first_showing){this.set_y(0);this.first_showing=false;motion_Actuate.stop(this);motion_Actuate.tween(this,1,{}).onComplete($bind(this,this.hide_menu))}else{this.set_y(-this.get_height()+10)}this.set_x(this.stage.stageWidth-this.get_width()-5)},__class__:trcharts_elements_menu_Menu});var trcharts_elements_menu_Menu_$item_$factory=function(){};$hxClasses["trcharts.elements.menu.Menu_item_factory"]=trcharts_elements_menu_Menu_$item_$factory;trcharts_elements_menu_Menu_$item_$factory.__name__=["trcharts","elements","menu","Menu_item_factory"];trcharts_elements_menu_Menu_$item_$factory.make=function(e,t){var i=t.get("type");if(i=="camera-icon"){return new trcharts_elements_menu_CameraIcon(e,t)}else{return new trcharts_elements_menu_MenuItem(e,t)}};var trcharts_global_Global=function(){};$hxClasses["trcharts.global.Global"]=trcharts_global_Global;trcharts_global_Global.__name__=["trcharts","global","Global"];trcharts_global_Global.prototype={x_labels:null,x_legend:null,tooltip:null,set_tooltip_string:function(e){this.tooltip=e},__class__:trcharts_global_Global};var trcharts_string_Css=function(e){this.padding_right=0;this.padding_left=0;this.padding_bottom=0;this.padding_top=0;e.toLowerCase();e=StringTools.replace(e,"{","");e=StringTools.replace(e,"}","");this.margin_top=0;this.margin_bottom=0;this.margin_left=0;this.margin_right=0;this.padding_top=0;this.padding_bottom=0;this.padding_left=0;this.padding_right=0;this.color=0;this.background_colour_set=false;this.font_size=9;var t=e.split(";");var i=0;var s=t.length;while(i<s){var a=i++;this.getAttribute(t[a])}};$hxClasses["trcharts.string.Css"]=trcharts_string_Css;trcharts_string_Css.__name__=["trcharts","string","Css"];trcharts_string_Css.prototype={text_align:null,font_size:null,text_decoration:null,margin_top:null,margin_bottom:null,margin_left:null,margin_right:null,padding_top:null,padding_bottom:null,padding_left:null,padding_right:null,font_weight:null,font_style:null,font_family:null,color:null,stop_process:null,background_colour:null,background_colour_set:null,display:null,trim:function(e){var t=0;var i=e.length-1;while(e.charAt(t)==" "||e.charAt(t)=="\t")++t;while(e.charAt(i)==" "||e.charAt(i)=="\t")--i;return e.substring(t,i+1)},ToNumber:function(e){e=StringTools.replace(e,"px","");if(isNaN(parseFloat(e))){return 0}else{return parseFloat(e)}},getAttribute:function(e){var t=e.split(":");if(t.length==2){this.stop_process=1;this.set(t[0],this.trim(t[1]))}},set:function(e,t){e=this.trim(e);switch(e){case"background-color":this.background_colour=trcharts_string_Utils.get_colour(t);this.background_colour_set=true;break;case"color":this.set_color(t);break;case"display":this.display=t;break;case"font-family":this.font_family=t;break;case"font-size":this.set_font_size(t);break;case"font-style":this.font_style=t;break;case"font-weight":this.font_weight=t;break;case"margin":this.setMargin(t);break;case"margin-bottom":this.margin_bottom=this.ToNumber(t);break;case"margin-left":this.margin_left=this.ToNumber(t);break;case"margin-right":this.margin_right=this.ToNumber(t);break;case"margin-top":this.margin_top=this.ToNumber(t);break;case"padding":this.setPadding(t);break;case"padding-bottom":this.padding_bottom=this.ToNumber(t);break;case"padding-left":this.padding_left=this.ToNumber(t);break;case"padding-right":this.padding_right=this.ToNumber(t);break;case"padding-top":this.padding_top=this.ToNumber(t);break;case"text-align":this.text_align=t;break;case"text-decoration":this.text_decoration=t;break}},set_color:function(e){this.color=trcharts_string_Utils.get_colour(e)},set_font_size:function(e){this.font_size=this.ToNumber(e)},setPadding:function(e){e=this.trim(e);var t=e.split(" ");var i=t.length;switch(i){case 1:this.padding_top=this.ToNumber(t[0]);this.padding_right=this.ToNumber(t[0]);this.padding_bottom=this.ToNumber(t[0]);this.padding_left=this.ToNumber(t[0]);break;case 2:this.padding_top=this.ToNumber(t[0]);this.padding_right=this.ToNumber(t[1]);this.padding_bottom=this.ToNumber(t[0]);this.padding_left=this.ToNumber(t[1]);break;case 3:this.padding_top=this.ToNumber(t[0]);this.padding_right=this.ToNumber(t[1]);this.padding_bottom=this.ToNumber(t[2]);this.padding_left=this.ToNumber(t[1]);break;default:this.padding_top=this.ToNumber(t[0]);this.padding_right=this.ToNumber(t[1]);this.padding_bottom=this.ToNumber(t[2]);this.padding_left=this.ToNumber(t[3])}},setMargin:function(e){e=this.trim(e);var t=e.split(" ");var i=t.length;switch(i){case 1:this.margin_top=this.ToNumber(t[0]);this.margin_right=this.ToNumber(t[0]);this.margin_bottom=this.ToNumber(t[0]);this.margin_left=this.ToNumber(t[0]);break;case 2:this.margin_top=this.ToNumber(t[0]);this.margin_right=this.ToNumber(t[1]);this.margin_bottom=this.ToNumber(t[0]);this.margin_left=this.ToNumber(t[1]);break;case 3:this.margin_top=this.ToNumber(t[0]);this.margin_right=this.ToNumber(t[1]);this.margin_bottom=this.ToNumber(t[2]);this.margin_left=this.ToNumber(t[1]);break;default:this.margin_top=this.ToNumber(t[0]);this.margin_right=this.ToNumber(t[1]);this.margin_bottom=this.ToNumber(t[2]);this.margin_left=this.ToNumber(t[3])}},__class__:trcharts_string_Css};var trcharts_string_DateUtils=function(){};$hxClasses["trcharts.string.DateUtils"]=trcharts_string_DateUtils;trcharts_string_DateUtils.__name__=["trcharts","string","DateUtils"];trcharts_string_DateUtils.replace_magic_values=function(e,t){var i=new Date(t*1e3);e=StringTools.replace(e,"#date#",trcharts_string_DateUtils.formatDate(i,"Y-m-d"));var s=e.indexOf("#date:");var a=0;var r="";var n="";var _="";while(s>=0){a=e.indexOf("#",s+1)+1;r=HxOverrides.substr(r,6,r.length-7);_=trcharts_string_DateUtils.formatDate(i,n);e=StringTools.replace(e,r,_);s=e.indexOf("#date:")}s=e.indexOf("#gmdate:");while(s>=0){a=e.indexOf("#",s+1)+1;r=HxOverrides.substr(e,s,a-s);n=HxOverrides.substr(r,8,r.length-9);_=trcharts_string_DateUtils.formatUTCDate(i,n);e=StringTools.replace(e,r,_);s=e.indexOf("#gmdate:")}return e};trcharts_string_DateUtils.formatDate=function(e,t){var i="";var s=0;try{while(s<t.length){var a=t.charAt(s);switch(a){case"A":i+=e.getHours()<12?"AM":"PM";throw"__break__";break;case"D":i+=trcharts_string_DateUtils.dateConsts.shortDays[e.getDate()];break;case"F":i+=trcharts_string_DateUtils.dateConsts.longMonths[e.getMonth()];throw"__break__";break;case"G":i+=e.getHours();throw"__break__";break;case"H":i+=(e.getHours()<10?"0":"")+e.getHours();throw"__break__";break;case"M":i+=trcharts_string_DateUtils.dateConsts.shortMonths[e.getMonth()];throw"__break__";break;case"N":i+=e.getDay()+1;break;case"O":throw"__break__";break;case"S":i+=e.getDate()%10==1&&e.getDate()!=11?"st":e.getDate()%10==2&&e.getDate()!=12?"nd":e.getDate()%10==3&&e.getDate()!=13?"rd":"th";break;case"U":i+=e.getTime()/1e3;throw"__break__";break;case"Y":i+=e.getFullYear();throw"__break__";break;case"Z":throw"__break__";break;case"a":i+=e.getHours()<12?"am":"pm";throw"__break__";break;case"d":i+=(e.getDate()<10?"0":"")+e.getDate();break;case"g":i+=e.getHours()==0?12:e.getHours()>12?e.getHours()-12:e.getHours();throw"__break__";break;case"h":break;case"i":i+=(e.getMinutes()<10?"0":"")+e.getMinutes();throw"__break__";break;case"j":i+=e.getDate();break;case"l":i+=trcharts_string_DateUtils.dateConsts.longDays[e.getDay()];break;case"m":i+=(e.getMonth()<9?"0":"")+(e.getMonth()+1);throw"__break__";break;case"n":i+=e.getMonth()+1;throw"__break__";break;case"r":i+=HxOverrides.dateStr(e);throw"__break__";break;case"s":i+=(e.getSeconds()<10?"0":"")+e.getSeconds();throw"__break__";break;case"w":i+=e.getDay();break;case"y":i+=HxOverrides.substr(""+e.getFullYear(),2,null);throw"__break__";break;default:i+=a}++s}}catch(e){if(e!="__break__")throw e}return i};trcharts_string_DateUtils.formatUTCDate=function(e,t){var i="not supper has remove!";return i};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 i=this._actionType.get_invoketype();switch(i){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 s=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(s,"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 i=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(i,"pageindex")){this.action_gotoPage(this._actionType.get_params().pageindex)}break;case"openLink":var s=this._actionType.get_params();if(Object.prototype.hasOwnProperty.call(s,"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,i,s,a){if(a==null){a=false}if(s==null){s=2263244}if(i==null){i=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,i,s,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 i=0;var s=Reflect.fields(e);while(i<s.length){var a=s[i];++i;this._parameters[a]=Reflect.field(e,a)}var r=0;var n=Reflect.fields(this._parameters);while(r<n.length){var _=n[r];++r;if(_!="fontsize"&&_!="bkColor"&&_!="isflat"){t[_]=Reflect.field(this._parameters,_)}}this._player=new xeditor_objects_FFAudioPlayerJS(this._realWidth,this._realHeight,this._parameters.fontsize,this._parameters.bkColor,this._parameters.isflat);this._container.addChild(this._player);this._player.set_params(t);this._parameters=this._player.get_params();this._realHeight=this._player.get_realHeight();this.render();return null},render:function(){this._container.get_graphics().clear();this._container.get_graphics().lineStyle(null);this._container.get_graphics().beginFill(0,1);this._container.get_graphics().endFill()},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},ff_active:function(){if(this._parameters.autoStart){this._player.setPlay()}},ff_deactive:function(){this._player.setPause()},__class__:xeditor_objects_AudioPlayerObject,__properties__:$extend(xeditor_objects_TrObjectEx.prototype.__properties__,{set_params:"set_params"})});var xeditor_objects_BKAudioObject=function(e,t,i,s,a){if(a==null){a=-1}if(s==null){s=100}this._sound=null;this._Playing=false;xeditor_objects_TrObjectEx.call(this,e,t);this._url=i;this._vol=s;this._rePlay=a;this._container=new openfl_display_Sprite;this._container.set_name("bkaudio_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this._orgbounds=this._container.getBounds(this)};$hxClasses["xeditor.objects.BKAudioObject"]=xeditor_objects_BKAudioObject;xeditor_objects_BKAudioObject.__name__=["xeditor","objects","BKAudioObject"];xeditor_objects_BKAudioObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_BKAudioObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_Playing:null,_sound:null,_url:null,_vol:null,_rePlay:null,set_url:function(e){this._url=e;this.Stop();if(this._sound!=null){this._sound.destroyMe()}this._sound=null;this._sound=new xeditor_objects_PlayMusicJS(e);return this._url},Play:function(){if(this._sound!=null){if(this._Playing==false){this._sound.play(this._rePlay)}else{this._sound.ContinuePlay()}this._Playing=true}},Stop:function(){if(this._sound!=null){if(this._Playing){this._sound.stop()}this._Playing=false}},ff_active:function(){if(this._sound==null){this.set_url(this._url)}},ff_deactive:function(){if(this._sound!=null){this._sound.destroyMe();this._sound=null}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},ff_active_BK_music:function(){this.Play()},ff_deactive_BK_music:function(){this.Stop()},__class__:xeditor_objects_BKAudioObject,__properties__:$extend(xeditor_objects_TrObjectEx.prototype.__properties__,{set_url:"set_url"})});var xeditor_objects__$CalloutObject_ControlLocal=$hxClasses["xeditor.objects._CalloutObject.ControlLocal"]={__ename__:["xeditor","objects","_CalloutObject","ControlLocal"],__constructs__:["top_lef","top_right","bottom_left","bottom_right","left_top","left_bottom","right_top","right_bottom"]};xeditor_objects__$CalloutObject_ControlLocal.top_lef=["top_lef",0];xeditor_objects__$CalloutObject_ControlLocal.top_lef.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.top_lef.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.top_right=["top_right",1];xeditor_objects__$CalloutObject_ControlLocal.top_right.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.top_right.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.bottom_left=["bottom_left",2];xeditor_objects__$CalloutObject_ControlLocal.bottom_left.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.bottom_left.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.bottom_right=["bottom_right",3];xeditor_objects__$CalloutObject_ControlLocal.bottom_right.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.bottom_right.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.left_top=["left_top",4];xeditor_objects__$CalloutObject_ControlLocal.left_top.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.left_top.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.left_bottom=["left_bottom",5];xeditor_objects__$CalloutObject_ControlLocal.left_bottom.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.left_bottom.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.right_top=["right_top",6];xeditor_objects__$CalloutObject_ControlLocal.right_top.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.right_top.__enum__=xeditor_objects__$CalloutObject_ControlLocal;xeditor_objects__$CalloutObject_ControlLocal.right_bottom=["right_bottom",7];xeditor_objects__$CalloutObject_ControlLocal.right_bottom.toString=$estr;xeditor_objects__$CalloutObject_ControlLocal.right_bottom.__enum__=xeditor_objects__$CalloutObject_ControlLocal;var xeditor_objects_CalloutObject=function(e,t,i,s,a){this._controlPoint_org_parent=new openfl_geom_Point;this._bottomcornerPoint=new openfl_geom_Point;this._topcornerPoint=new openfl_geom_Point;this._controlPoint=new openfl_geom_Point;var r=i.x-t.x;var n=i.y-t.y;xeditor_objects_TrObjectEx.call(this,r,n);this._type=e;this._params=a;if(!Object.prototype.hasOwnProperty.call(this._params,"textformat")){this._params["textformat"]=new openfl_text_TextFormat("Arial",12,16711680)}this._topcornerPoint=t;this._bottomcornerPoint=i;this._controlPoint=s;this._container=new openfl_display_Sprite;this._container.set_name("callout_container");this.addChild(this._container);this._textField=new openfl_text_TextField;this._textField.set_autoSize(0);this._textField.set_defaultTextFormat(this._params.textformat);this._textField.set_type(1);this._textField.set_text(lime_text__$UTF8String_UTF8String_$Impl_$.fromDynamic(this._params.text));this._container.addChild(this._textField);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._orgbounds=this.getObjectBounds();this._controlPoint_org_parent=this.pointToParent(s);this._textField.set_x(this._orgbounds.x+(this._orgbounds.width-this._textField.get_width())*.5);this._textField.set_y(this._orgbounds.y+(this._orgbounds.height-this._textField.get_height())*.5)};$hxClasses["xeditor.objects.CalloutObject"]=xeditor_objects_CalloutObject;xeditor_objects_CalloutObject.__name__=["xeditor","objects","CalloutObject"];xeditor_objects_CalloutObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_CalloutObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_type:null,_params:null,_textField:null,_controlPoint:null,_topcornerPoint:null,_bottomcornerPoint:null,_controlPoint_org_parent:null,pointToParent:function(e){var t=this._container.localToGlobal(e);return this.globalToLocal(t)},get_controlAt:function(e,t){var i=e.x+e.width/2;var s=e.y+e.height/2;if(t.y<e.get_top()){if(t.x<=i){return xeditor_objects__$CalloutObject_ControlLocal.top_lef}else{return xeditor_objects__$CalloutObject_ControlLocal.top_right}}else if(t.y>e.get_bottom()){if(t.x<=i){return xeditor_objects__$CalloutObject_ControlLocal.bottom_left}else{return xeditor_objects__$CalloutObject_ControlLocal.bottom_right}}else if(t.x<=i){if(t.y<=s){return xeditor_objects__$CalloutObject_ControlLocal.left_top}else{return xeditor_objects__$CalloutObject_ControlLocal.left_bottom}}else if(t.y<=s){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 i=this._container.localToGlobal(this._bottomcornerPoint);var s=this.globalToLocal(i);var a=new openfl_geom_Rectangle(t.x,t.y,s.x-t.x,s.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 i=t.x-e.x;var s=t.y-e.y;var a=Math.atan2(s,i);a=(a>0?a:2*Math.PI+a)*360/(2*Math.PI);return a},drawRectCallout:function(e,t,i){var s=new openfl_geom_Point;var a=new openfl_geom_Point;var r=this.get_controlAt(t,i);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);s.x=a.x-.45*(t.width/2)}else{s.x=t.x+t.width/2+.2*(t.width/2);a.x=s.x+.45*(t.width/2)}e.lineTo(s.x,t.get_top());e.lineTo(i.x,i.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);s.y=a.y-.45*(t.height/2)}else{s.y=t.get_top()+t.height/2+.2*(t.height/2);a.y=s.y+.45*(t.height/2)}e.lineTo(t.get_right(),s.y);e.lineTo(i.x,i.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){s.x=t.x+t.width/2-.2*(t.width/2);a.x=s.x-.45*(t.width/2)}else{a.x=t.x+t.width/2+.2*(t.width/2);s.x=a.x+.45*(t.width/2)}e.lineTo(s.x,t.get_bottom());e.lineTo(i.x,i.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){s.y=t.get_top()+t.height/2-.2*(t.height/2);a.y=s.y-.45*(t.height/2)}else{a.y=t.get_top()+t.height/2+.2*(t.height/2);s.y=a.y+.45*(t.height/2)}e.lineTo(t.get_left(),s.y);e.lineTo(i.x,i.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,i){var s=t.width<=t.height?.15*t.width:.15*t.height;var a=new openfl_geom_Point;var r=new openfl_geom_Point;var n=this.get_controlAt(t,i);e.moveTo(t.x+s,t.y);if(n==xeditor_objects__$CalloutObject_ControlLocal.top_lef||n==xeditor_objects__$CalloutObject_ControlLocal.top_right){if(n==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(i.x,i.y);e.lineTo(r.x,t.get_top());e.lineTo(t.x+t.width-s,t.get_top())}else{e.lineTo(t.x+t.width-s,t.y)}e.curveTo(t.x+t.width,t.y,t.x+t.width,t.y+s);if(n==xeditor_objects__$CalloutObject_ControlLocal.right_top||n==xeditor_objects__$CalloutObject_ControlLocal.right_bottom){if(n==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(i.x,i.y);e.lineTo(t.get_right(),r.y);e.lineTo(t.get_right(),t.get_bottom()-s)}else{e.lineTo(t.get_right(),t.get_bottom()-s)}e.curveTo(t.x+t.width,t.y+t.height,t.x+t.width-s,t.y+t.height);if(n==xeditor_objects__$CalloutObject_ControlLocal.bottom_left||n==xeditor_objects__$CalloutObject_ControlLocal.bottom_right){if(n==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(i.x,i.y);e.lineTo(r.x,t.get_bottom());e.lineTo(t.x+s,t.get_bottom())}else{e.lineTo(t.x+s,t.get_bottom())}e.curveTo(t.x,t.y+t.height,t.x,t.y+t.height-s);if(n==xeditor_objects__$CalloutObject_ControlLocal.left_top||n==xeditor_objects__$CalloutObject_ControlLocal.left_bottom){if(n==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(i.x,i.y);e.lineTo(t.get_left(),r.y);e.lineTo(t.get_left(),t.get_top()+s)}else{e.lineTo(t.get_left(),t.get_top()+s)}e.curveTo(t.x,t.y,t.x+s,t.y)},drawOvalCallout:function(e,t,i){var s;var a;var r;var n;var _;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,i)|0;y-=10;y=Math.ceil(y/20)*20;if(y>=360){y=0}e.moveTo(d.x+l,d.y);s=o/2|0;var x=0;while(s<361){f=xeditor_utils_Conversions.radians(s);p=xeditor_utils_Conversions.radians(s+o/2);a=c*Math.cos(f);r=u*Math.sin(f);n=l*Math.cos(p);_=h*Math.sin(p);if(s>=y&&s<y+20){x=s;x-=20;f=xeditor_utils_Conversions.radians(x);p=xeditor_utils_Conversions.radians(x+o/2);a=c*Math.cos(f);r=u*Math.sin(f);n=l*Math.cos(p);_=h*Math.sin(p);g.x=d.x+n;g.y=d.y+_;e.lineTo(i.x,i.y);f=xeditor_utils_Conversions.radians(x+20);p=xeditor_utils_Conversions.radians(x+20+o/2);a=c*Math.cos(f);r=u*Math.sin(f);n=l*Math.cos(p);_=h*Math.sin(p);m.x=d.x+n;m.y=d.y+_;e.lineTo(m.x,m.y);s+=20;continue}e.curveTo(d.x+a,d.y+r,d.x+n,d.y+_);s=s+o|0}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_CalloutObject});var xeditor_objects_TAudiooSpinButton=function(e,t,i){if(i==null){i=-1}if(t==null){t=-1}var s=this;openfl_display_Sprite.call(this);var a=new base_baseLoad_LoadDataStringJs(e,function(e){s._svg=new format_SVG(e);s._realWidth=t;s._realHeight=i;s._timesCalled=0;s._timer=new openfl_utils_Timer(200);s._timer.addEventListener("timer",$bind(s,s.checkTimer));s.render()})};$hxClasses["xeditor.objects.TAudiooSpinButton"]=xeditor_objects_TAudiooSpinButton;xeditor_objects_TAudiooSpinButton.__name__=["xeditor","objects","TAudiooSpinButton"];xeditor_objects_TAudiooSpinButton.__super__=openfl_display_Sprite;xeditor_objects_TAudiooSpinButton.prototype=$extend(openfl_display_Sprite.prototype,{_svg:null,_realWidth:null,_realHeight:null,_timer:null,_timesCalled:null,checkTimer:function(e){var t=this._timesCalled*10;this._timesCalled++},start:function(){this._timer.start();this.set_visible(true)},Stop:function(){this._timer.stop();this.set_visible(false)},render:function(){this.get_graphics().clear();if(this._svg!=null){this._svg.render(this.get_graphics(),0,0,this._realWidth,this._realHeight)}},set_size:function(e,t){this._realWidth=e;this._realHeight=t;this.render()},__class__:xeditor_objects_TAudiooSpinButton});var xeditor_objects_TAudiooPlayerButton=function(e,t,i,s){if(s==null){s=true}if(i==null){i=-1}if(t==null){t=-1}var a=this;openfl_display_Sprite.call(this);var r=new base_baseLoad_LoadDataStringJs(e,function(e){a._svg=new format_SVG(e);a._realWidth=t;a._realHeight=i;if(s){a.render()}});this.addEventListener("mouseDown",$bind(this,this.onMouseClick));this.addEventListener("mouseUp",$bind(this,this.onMouseUp));this.addEventListener("rollOut",$bind(this,this.onMouseOut));this.addEventListener("mouseOut",$bind(this,this.onMouseOut));this.addEventListener("rollOver",$bind(this,this.onMouseOver))};$hxClasses["xeditor.objects.TAudiooPlayerButton"]=xeditor_objects_TAudiooPlayerButton;xeditor_objects_TAudiooPlayerButton.__name__=["xeditor","objects","TAudiooPlayerButton"];xeditor_objects_TAudiooPlayerButton.__super__=openfl_display_Sprite;xeditor_objects_TAudiooPlayerButton.prototype=$extend(openfl_display_Sprite.prototype,{_svg:null,_realWidth:null,_realHeight:null,OnClick:null,onMouseUp:function(e){this.render();e.stopPropagation()},onMouseClick:function(e){this.render(0,.5);if(this.OnClick!=null){this.OnClick()}e.stopPropagation()},onMouseOver:function(e){this.render(0,.2);e.stopPropagation()},onMouseOut:function(e){this.render();e.stopPropagation()},render:function(e,t){if(t==null){t=1}if(e==null){e=-1}this.get_graphics().clear();if(e!=-1){this.get_graphics().beginFill(e,t);this.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}if(this._svg!=null){this._svg.render(this.get_graphics(),0,0,this._realWidth,this._realHeight)}if(e!=-1){this.get_graphics().endFill()}},set_size:function(e,t){this._realWidth=e;this._realHeight=t;this.render()},__class__:xeditor_objects_TAudiooPlayerButton});var xeditor_objects_TAudioVolumeButton=function(e,t,i,s){if(s==null){s=-1}if(i==null){i=-1}this._vol=100;var a=this;xeditor_objects_TAudiooPlayerButton.call(this,e,i,s,false);var r=new base_baseLoad_LoadDataStringJs(e,function(e){a._svgShade=new format_SVG(e);a._shape=new openfl_display_Sprite;a._volmask=new openfl_display_Sprite;a._shape.addChild(a._volmask);a._shape.set_mask(a._volmask);a.addChild(a._shape);a.render()})};$hxClasses["xeditor.objects.TAudioVolumeButton"]=xeditor_objects_TAudioVolumeButton;xeditor_objects_TAudioVolumeButton.__name__=["xeditor","objects","TAudioVolumeButton"];xeditor_objects_TAudioVolumeButton.__super__=xeditor_objects_TAudiooPlayerButton;xeditor_objects_TAudioVolumeButton.prototype=$extend(xeditor_objects_TAudiooPlayerButton.prototype,{_svgShade:null,_shape:null,_vol:null,_volmask:null,onVolChanged:null,onMouseUp:function(e){this._vol=Math.round(this.get_mouseX()/this.get_width()*100);if(this.onVolChanged!=null){this.onVolChanged(this._vol)}this.render();e.stopPropagation()},render:function(e,t){if(t==null){t=1}if(e==null){e=-1}this._shape.get_graphics().clear();this.get_graphics().clear();if(e!=-1){this.get_graphics().beginFill(e,t);this.get_graphics().drawRect(0,0,this._realWidth,this._realHeight)}if(this._svgShade!=null){this._svgShade.render(this.get_graphics(),0,0,this._realWidth,this._realHeight)}this._volmask.get_graphics().clear();this._volmask.get_graphics().beginFill(16711680);this._volmask.get_graphics().drawRect(0,0,this._realWidth*this._vol/100,this._realHeight);this._volmask.get_graphics().endFill();if(this._svgShade!=null){this._svg.render(this._shape.get_graphics(),0,0,this._realWidth,this._realHeight)}if(e!=-1){this.get_graphics().endFill()}},__class__:xeditor_objects_TAudioVolumeButton});var xeditor_objects_TAudioTrack_$bar=function(e,t){if(t==null){t=1}openfl_display_Sprite.call(this);this._bkColor=e;this._alpha=t};$hxClasses["xeditor.objects.TAudioTrack_bar"]=xeditor_objects_TAudioTrack_$bar;xeditor_objects_TAudioTrack_$bar.__name__=["xeditor","objects","TAudioTrack_bar"];xeditor_objects_TAudioTrack_$bar.__super__=openfl_display_Sprite;xeditor_objects_TAudioTrack_$bar.prototype=$extend(openfl_display_Sprite.prototype,{_realWidth:null,_realHeight:null,_bkColor:null,_alpha:null,set_size:function(e,t){this._realWidth=e;this._realHeight=t;this.render(this._bkColor,this._alpha)},render:function(e,t){if(t==null){t=1}if(e==null){e=-1}this.get_graphics().clear();var i=this._realHeight;if(e!=-1){this.get_graphics().beginFill(e,t);this.get_graphics().drawRoundRect(0,0,this._realWidth,this._realHeight,i)}if(e!=-1){this.get_graphics().endFill()}},__class__:xeditor_objects_TAudioTrack_$bar});var xeditor_objects_TAudioTrack_$Ball=function(e,t,i,s){if(s==null){s=1}openfl_display_Sprite.call(this);this._realWidth=e;this._realHeight=t;this._bkColor=i;this._alpha=s;this.render(this._bkColor,this._alpha)};$hxClasses["xeditor.objects.TAudioTrack_Ball"]=xeditor_objects_TAudioTrack_$Ball;xeditor_objects_TAudioTrack_$Ball.__name__=["xeditor","objects","TAudioTrack_Ball"];xeditor_objects_TAudioTrack_$Ball.__super__=openfl_display_Sprite;xeditor_objects_TAudioTrack_$Ball.prototype=$extend(openfl_display_Sprite.prototype,{_realWidth:null,_realHeight:null,_bkColor:null,_alpha:null,set_size:function(e,t){this._realWidth=e;this._realHeight=t;this.render(this._bkColor,this._alpha)},render:function(e,t){if(t==null){t=1}if(e==null){e=-1}this.get_graphics().clear();var i=this._realHeight/2;if(e!=-1){this.get_graphics().beginFill(e,t);this.get_graphics().drawEllipse(0,0,this._realWidth,this._realHeight)}if(e!=-1){this.get_graphics().endFill()}},__class__:xeditor_objects_TAudioTrack_$Ball});var xeditor_objects_FFAudioPlayerJS=function(e,t,i,s,a){if(a==null){a=false}if(s==null){s=2263244}if(i==null){i=14}this._trackRect=new openfl_geom_Rectangle;this._songName="My Song";this._saveTime=0;this.bIsIpad=false;this._sound=null;this._mediaSource="";this._sound_loop=false;openfl_display_Sprite.call(this);this._realWidth=e;this._realHeight=t;this._container=new openfl_display_Sprite;this._container.set_name("ffaudioplayer_container");this.addChild(this._container);var r=window.navigator.userAgent.toLowerCase();this.bIsIpad=-1!=r.indexOf("ipad");this._soundMuted=false;this._volume=1;this._mediaLoaded=false;this._startTime=0;this._firstLoad=true;this._stopped=false;this._isPlaying=false;this._isSeeking=false;this._bkColor=s;this._isflat=a;this._sound=window.document.createElement("audio");this._sound.oncanplay=$bind(this,this.onCanplay);this._sound.ontimeupdate=$bind(this,this.onTimeUpdate);this._sound.onended=$bind(this,this.onEnded);this._sound.onwaiting=$bind(this,this.onWaiting);this._fontsize=i;this.cal_em();this._realWidth=e;this._realHeight=2.8*this._em;this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this.create_control();this._trackball.addEventListener("mouseDown",$bind(this,this.onTrackBallMouseClick));this.re_pos()};$hxClasses["xeditor.objects.FFAudioPlayerJS"]=xeditor_objects_FFAudioPlayerJS;xeditor_objects_FFAudioPlayerJS.__name__=["xeditor","objects","FFAudioPlayerJS"];xeditor_objects_FFAudioPlayerJS.__super__=openfl_display_Sprite;xeditor_objects_FFAudioPlayerJS.prototype=$extend(openfl_display_Sprite.prototype,{_container:null,_sound_loop:null,_mediaSource:null,_sound:null,bIsIpad:null,_saveTime:null,_firstLoad:null,_stopped:null,_mediaLoaded:null,_mediaDuration:null,_startTime:null,_isPlaying:null,_soundMuted:null,_volume:null,_isSeeking:null,_isWaiting:null,_isflat:null,_autoStart:null,_autoRewind:null,_bkColor:null,_em:null,_fontsize:null,_songName:null,_realWidth:null,_realHeight:null,_playButton:null,_pauseButton:null,_spinButton:null,_volButton:null,_playlistformat:null,_textFieldPlaylist:null,_tmformat:null,_textStartTM:null,_textEndTM:null,_track:null,_trackball:null,_trackRect:null,get_realHeight:function(){return this._realHeight},create_control:function(){var t=this;this._pauseButton=new xeditor_objects_TAudiooPlayerButton("img/audioplayer1/pause.svg",.675*this._realHeight|0,.675*this._realHeight|0);this._pauseButton.OnClick=$bind(this,this.togglePlay);this._container.addChild(this._pauseButton);this._pauseButton.set_visible(false);this._playButton=new xeditor_objects_TAudiooPlayerButton("img/audioplayer1/play.svg",.675*this._realHeight|0,.675*this._realHeight|0);this._playButton.OnClick=$bind(this,this.togglePlay);this._container.addChild(this._playButton);this._spinButton=new xeditor_objects_TAudiooSpinButton("img/audioplayer1/spinner.svg",.675*this._realHeight|0,.675*this._realHeight|0);this._container.addChild(this._spinButton);this._spinButton.set_visible(false);if(!this.bIsIpad){this._volButton=new xeditor_objects_TAudioVolumeButton("img/audioplayer1/volume.svg","img/audioplayer1/volume_shade.svg",.56*this._realHeight|0,.56*this._realHeight|0);this._container.addChild(this._volButton);this._volButton.onVolChanged=function(e){t.setVolume(e/100)}}this._playlistformat=new openfl_text_TextFormat("Arial",this._fontsize*1.2|0,16777215);this._playlistformat.bold=true;this._textFieldPlaylist=new openfl_text_TextField;this._textFieldPlaylist.set_defaultTextFormat(this._playlistformat);this._textFieldPlaylist.set_text(this._songName);this._textFieldPlaylist.set_antiAliasType(0);this._textFieldPlaylist.set_sharpness(100);this._textFieldPlaylist.set_autoSize(1);this._container.addChild(this._textFieldPlaylist);this._tmformat=new openfl_text_TextFormat("Arial",this._fontsize*.8|0,16777215);this._textStartTM=new openfl_text_TextField;this._textStartTM.set_defaultTextFormat(this._tmformat);this._textStartTM.set_text("00:00:00");this._textStartTM.set_antiAliasType(0);this._textStartTM.set_autoSize(1);this._container.addChild(this._textStartTM);this._textEndTM=new openfl_text_TextField;this._textEndTM.set_defaultTextFormat(this._tmformat);this._textEndTM.set_text("00:00:00");this._textEndTM.set_antiAliasType(0);this._textEndTM.set_sharpness(100);this._textEndTM.set_autoSize(1);this._container.addChild(this._textEndTM);this._track=new xeditor_objects_TAudioTrack_$bar(xeditor_utils_TRUtil.rgb(0,0,0),.4);this._container.addChild(this._track);this._trackball=new xeditor_objects_TAudioTrack_$Ball(.934*this._em|0,.934*this._em|0,16777215,1);this._container.addChild(this._trackball)},onTimeUpdate:function(){if(this.getDuration()>0){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(t<this._trackRect.x){this.seek(0)}else if(t>this._trackRect.x+this._trackRect.width-this._trackball.get_width()){this.seek(this.getDuration())}else{var i=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());var s=i*this.getDuration();this.seek(s)}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(t<this._trackRect.x||t>this._trackRect.x+this._trackRect.width-this._trackball.get_width()){return}this._trackball.set_x(t);var i=(t-this._trackRect.x)/(this._trackRect.width-this._trackball.get_width());this._textStartTM.set_text(xeditor_utils_TRUtil.formatTime(this.getDuration()*i))},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 i=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(i.x);this._track.set_y(i.y+.15*this._em);this._track.set_size(i.width,.65*this._em);this._trackRect=i;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 i=[12,114,127,127,242];var s=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){s.createGradientBox(this._realWidth-2,this._realHeight,90*Math.PI/180,0,0);this._container.get_graphics().beginGradientFill(0,e,t,i,s);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,i){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(i);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 i=new openfl_net_URLRequest(e);t.addEventListener("complete",function(e){var t=js_Boot.__cast(e.target,openfl_net_URLLoader).data;var i=new haxe_io_BytesBuffer;var s=0;var a=openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(t);while(s<a){var r=s++;var n=t.readUnsignedByte();i.b.push(n)}var _=i.getBytes();o._gif=new gif_AnimatedGif(_);o._gif.play();o._imgContainer.addChild(o._gif);o.render()});t.load(i)},load_image:function(e){var t=this;this._imgLoader.contentLoaderInfo.addEventListener("complete",function(e){t._imgContainer.addChild(t._imgLoader);t.render()});this._imgLoader.load(new openfl_net_URLRequest(e))},set_params_i:function(e,t){if(t==null){t=false}if(Object.prototype.hasOwnProperty.call(e,"url")){if(t){if(this._tmpBitmap!=null){this._imgContainer.removeChild(this._tmpBitmap);this._tmpBitmap=null}if(this._imgContainer.get_numChildren()>0){this._imgContainer.removeChildAt(0)}this._imgLoader.unload();this._gif.stop();this._gif=null}var i=Reflect.field(e,"url");if(i.length>0){var s=i;var a=s.lastIndexOf(".");var r=a>0?HxOverrides.substr(s,a+1,null).toLowerCase():"";if(r.indexOf("?")!=-1){r=r.split("?")[0]}if(r=="gif"){this._contentType="gif";this.load_gif(i)}else{this._contentType="image";this.load_image(i)}}else{var n=openfl_utils_Assets.getBitmapData("img/imgdefault.png");this._tmpBitmap=new openfl_display_Bitmap(n);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,i){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(i!=null){this._endPoint=i}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,i){var s=js_Boot.__cast(e,openfl_display_Sprite);s.get_graphics().clear();var a=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));var r=Math.atan2(i.y-t.y,i.x-t.x);var n;if(i!=null){s.get_graphics().moveTo(t.x,t.y);if(this._lineDefinition.type=="solid"){s.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha);s.get_graphics().lineTo(i.x,i.y)}else if(this._lineDefinition.type=="dashed"){s.get_graphics().lineStyle(this._lineDefinition.strokeSize,this._lineDefinition.strokeColor,this._lineDefinition.strokeAlpha,false,2,2,1);var _=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/(_+o));var h=new openfl_geom_Point;var c=new openfl_geom_Point;n=0;while(n<=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)*((n+1)*(_+o)-o);c.y=t.y+Math.sin(r)*((n+1)*(_+o)-o);if(n==l){var u=Math.sqrt(Math.pow(i.x-h.x,2)+Math.pow(i.y-h.y,2));if(u<=_){c.x=i.x;c.y=i.y}}s.get_graphics().moveTo(h.x,h.y);s.get_graphics().lineTo(c.x,c.y);++n}}else if(this._lineDefinition.type=="dotted"){s.get_graphics().lineStyle(0,16711680,0);s.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;n=0;while(n<=a){y.x=t.x+Math.cos(r)*n;y.y=t.y+Math.sin(r)*n;s.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);s.get_graphics().curveTo(y.x+p,y.y+d,y.x+g,y.y+m);f=f+this.THETA|0}n+=this._dotSpacing|0}s.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,i){this._params={};this._status="normal";xeditor_objects_TrObjectEx.call(this,e,t);this._params=Reflect.copy(i);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,i){xeditor_objects_TrObjectEx.call(this,e,t);this._params=i;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 i=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,i)}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,i,s,a,r,n){if(n==null){n=.001}xeditor_objects_TrObjectEx.call(this,t,i);this._stepType=e;this._title=s;this._bkgrColor=a;this._titleColor=r;this._fontsize=n;this._container=new openfl_display_Sprite;this._container.set_name("step_container");this.addChild(this._container);if(n<.1){var _=this._stepType;switch(_){case"circle":n=this.cal_font_size(this._realWidth,this._realHeight);break;case"circle-pointer":n=this.cal_font_size(this._realWidth*.7,this._realHeight);break;case"square":n=this.cal_font_size(this._realWidth,this._realHeight);break;case"square-pointer":n=this.cal_font_size(this._realWidth,this._realHeight);break}this._fontsize=n}var o=new openfl_text_TextFormat("Arial",n|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 i=new openfl_text_TextField;i.set_defaultTextFormat(t);i.set_text(e);return new openfl_geom_Rectangle(0,0,i.get_textWidth(),i.get_textHeight())},cal_font_size:function(e,t){var i;if(e>t){i=.75*t}else{i=.75*e}var s=new openfl_text_TextFormat("Arial",i|0,this._titleColor,true);var a=this.measureString(this._title,s);var r=1;if(a.width>e){r=a.width/e}if(a.height>t){if(a.height/t>r){r=a.height/t}}i/=r;while(true){var n=new openfl_text_TextFormat("Arial",i|0,this._titleColor,true);var _=this.measureString(this._title,n);if(_.width>.9*e||_.height>.9*t){--i}else{break}}return i},draw_title:function(e,t,i,s,a){var r=js_Boot.__cast(e,openfl_display_Sprite);var n=r.get_graphics();var _=new openfl_text_TextFormat("Arial",this._fontsize|0,this._titleColor,true);this._textField.set_autoSize(1);this._textField.set_defaultTextFormat(_);this._textField.set_text(this._title);this._textField.set_x((s-this._textField.get_width())*.5);this._textField.set_y((a-this._textField.get_height())*.5)},drawRoundRectComplex:function(e,t,i,s,a,r,n,_,o){var l=t+s;var h=i+a;var c=s<a?s*2:a*2;if(r<c){r=r}else{r=c}if(n<c){n=n}else{n=c}if(_<c){_=_}else{_=c}if(o<c){o=o}else{o=c}var u=o*.292893218813453;var f=o*.585786437626905;e.moveTo(l,h-o);e.curveTo(l,h-f,l-u,h-u);e.curveTo(l-f,h,l-o,h);u=_*.292893218813453;f=_*.585786437626905;e.lineTo(t+_,h);e.curveTo(t+f,h,t+u,h-u);e.curveTo(t,h-f,t,h-_);u=r*.292893218813453;f=r*.585786437626905;e.lineTo(t,i+r);e.curveTo(t,i+f,t+u,i+u);e.curveTo(t+f,i,t+r,i);u=n*.292893218813453;f=n*.585786437626905;e.lineTo(l-n,i);e.curveTo(l-f,i,l-u,i+u);e.curveTo(l,i+f,l,i+n);e.lineTo(l,h-o)},draw_square:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/42;var l=a/42;var h=o>=l?l:o;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);this.drawRoundRectComplex(_,t,i,s,a,h*2,h*2,h*2,h*2);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_square_pointer:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/42;var l=a/42;_.lineStyle(1,0,1);_.beginFill(this._bkgrColor,1);_.moveTo(13*o,l);_.lineTo(39*o,l);_.curveTo(40*o,l,41*o,3*l);_.lineTo(41*o,29*l);_.curveTo(41*o,35*l,27*o,41*l);_.lineTo(13*o,41*l);_.curveTo(7*o,41*l,o,29*l);_.lineTo(o,15*l);_.curveTo(o,8*l,13*o,l);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/42;var l=a/42;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);_.drawEllipse(t,i,s,a);_.endFill();n.set_filters([xeditor_objects_StepObject.createDropShadowFilter(r)])},draw_Circle_Pointer:function(e,t,i,s,a){var r=["1","90","0","0.6","1","1","1","1","false","false","false"];var n=js_Boot.__cast(e,openfl_display_Sprite);var _=n.get_graphics();var o=s/64;var l=a/42;_.lineStyle(.5,0,1);_.beginFill(this._bkgrColor,1);_.moveTo(63*o,21*l);_.curveTo(63*o,21*l,21*o,41*l);_.curveTo(5*o,41*l,o,21*l);_.curveTo(o,10*l,21*o,l);_.curveTo(20*o,l,63*o,21*l);_.endFill();n.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,i,s,a){if(a==null){a=0}if(s==null){s=0}if(i==null){i=-1}if(t==null){t=-1}xeditor_objects_TrObject.call(this,s,a);this._textFormat=e;this._backgroundColor=t;this._borderColor=i;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(i!=-1);this._textfield.set_borderColor(i!=-1?i: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,i,s,a,r,n){if(n==null){n=""}if(r==null){r="normal"}if(a==null){a=14}if(s==null){s="Arial"}this._props=[];this._draw_type="roundrect";this._status="normal";this._text="";xeditor_objects_TrObjectEx.call(this,t,i);this._container=new openfl_display_Sprite;this._container.set_name("button_container");this.addChild(this._container);this._realWidth=t;this._realHeight=i;this._fontname=s;this._fontsize=a;this._font_weight=r;this._text=n;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,i,s,a,r){var n=new openfl_geom_Point(0,0);var _=new openfl_geom_Point(s,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,i==null?"null":""+i,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,i,s,a){if(a==null){a=1}var r=new openfl_geom_Point(0,0);var n=new openfl_geom_Point(t,i);var _=xeditor_utils_TRUtil.cal_twopoint_angle(r,n);var o=Std.string(openfl_geom_Point.distance(r,n));var l=Std.string(_$UInt_UInt_$Impl_$.toFloat(e));return[o,_==null?"null":""+_,l,a==null?"null":""+a,Std.string(Math.abs(Math.cos(_)*s)),Std.string(Math.abs(Math.sin(_)*s)),"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 i=this._props.length;if(t=="normal"){var s=i;while(s>0){if(Object.prototype.hasOwnProperty.call(this._props[s-1].normal,e)){return Reflect.field(this._props[s-1].normal,e)}--s}}else{var a=i;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=i;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,i){this._props.push({normal:e,hover:t,active:i})},pre_init:function(){var e=xeditor_utils_TRUtil.rgb(102,102,102);var t=xeditor_utils_TRUtil.rgb(238,238,238);var i={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 s=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:i,text_shadow:s};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 n={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 _=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:n,text_shadow:_};this.register_prop(a,r,o)},create_textformat:function(e,t,i){this._tf_normal=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","normal"));this._tf_normal.bold=i=="bold";this._tf_hover=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","hover"));this._tf_hover.bold=i=="bold";this._tf_active=new openfl_text_TextFormat(e,t|0,this.get_prop_field("color","active"));this._tf_active.bold=i=="bold";this._fontname=e;this._fontsize=t;this._font_weight=i},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 i=this._props.length;while(i>1){this._props.pop();--i}}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,i,s,a,r,n,_,o){var l=t+s;var h=i+a;var c=s<a?s*2:a*2;if(r<c){r=r}else{r=c}if(n<c){n=n}else{n=c}if(_<c){_=_}else{_=c}if(o<c){o=o}else{o=c}var u=o*.292893218813453;var f=o*.585786437626905;e.moveTo(l,h-o);e.curveTo(l,h-f,l-u,h-u);e.curveTo(l-f,h,l-o,h);u=_*.292893218813453;f=_*.585786437626905;e.lineTo(t+_,h);e.curveTo(t+f,h,t+u,h-u);e.curveTo(t,h-f,t,h-_);u=r*.292893218813453;f=r*.585786437626905;e.lineTo(t,i+r);e.curveTo(t,i+f,t+u,i+u);e.curveTo(t+f,i,t+r,i);u=n*.292893218813453;f=n*.585786437626905;e.lineTo(l-n,i);e.curveTo(l-f,i,l-u,i+u);e.curveTo(l,i+f,l,i+n);e.lineTo(l,h-o)},render:function(){if(this._status=="normal"){this._textField.set_defaultTextFormat(this._tf_normal);this._textField.setTextFormat(this._tf_normal)}else if(this._status=="hover"){this._textField.set_defaultTextFormat(this._tf_hover);this._textField.setTextFormat(this._tf_hover)}else{this._textField.set_defaultTextFormat(this._tf_active);this._textField.setTextFormat(this._tf_active)}var e=this.get_prop_field("text_shadow",this._status);if(Reflect.isObject(e)){this._textField.set_filters([xeditor_objects_TrButtonObject.createDropShadowFilter(this.get_prop_field("text_shadow",this._status))])}else{this._textField.set_filters(null)}this.re_pos();this._container.get_graphics().clear();this._container.get_graphics().lineStyle(this.get_prop_field("border_width",this._status),this.get_prop_field("border_color",this._status),1,true,2,1,1);this._container.get_graphics().beginFill(this.get_prop_field("background_color",this._status),1);if(this._draw_type=="roundrect"){this.drawRoundRectComplex(this._container.get_graphics(),0,0,this._realWidth,this._realHeight,this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status))}else if(this._draw_type=="circle"){this._container.get_graphics().drawCircle(this._realWidth/2,this._realHeight/2,this._realWidth/2)}var t=this.get_prop_field("background",this._status);if(t!=null){if(Reflect.isObject(t)){var i=new openfl_geom_Matrix;var s=[this.get_prop_field("background",this._status).color1,this.get_prop_field("background",this._status).color2];var a=[this.get_prop_field("background",this._status).alpha1,this.get_prop_field("background",this._status).alpha2];var r=[this.get_prop_field("background",this._status).ratio1,this.get_prop_field("background",this._status).ratio2];i.createGradientBox(this._realWidth,this._realHeight,90*Math.PI/180,0,0);this._container.get_graphics().beginGradientFill(0,s,a,r,i);if(this._draw_type=="roundrect"){this.drawRoundRectComplex(this._container.get_graphics(),0,0,this._realWidth,this._realHeight,this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status))}else if(this._draw_type=="circle"){this._container.get_graphics().drawCircle(this._realWidth/2,this._realHeight/2,this._realWidth/2)}}else{this._container.get_graphics().beginFill(t,1);if(this._draw_type=="roundrect"){this.drawRoundRectComplex(this._container.get_graphics(),0,0,this._realWidth,this._realHeight,this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status),this.get_prop_field("border_radius",this._status))}else if(this._draw_type=="circle"){this._container.get_graphics().drawCircle(this._realWidth/2,this._realHeight/2,this._realWidth/2)}}}this._container.get_graphics().endFill();this.set_filters(null);if(this.get_prop_field("box_shadow",this._status)){var n=[];var _=0;var o=Reflect.fields(this.get_prop_field("box_shadow",this._status));while(_<o.length){var l=o[_];++_;var h=l.split("_");if(h.length<=0){continue}var c=h[0];if(c=="dropShadow"){n.push(xeditor_objects_TrButtonObject.createDropShadowFilter(Reflect.field(this.get_prop_field("box_shadow",this._status),l)))}else if(c=="blur"){n.push(xeditor_objects_TrButtonObject.createBlurFilter(Reflect.field(this.get_prop_field("box_shadow",this._status),l)))}}this.set_filters(n)}},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_TrButtonObject});var xeditor_objects_TrVideoPlayerObject=function(e,t,i,s){this._player=null;this._parameters={};this.ytPlayer=null;this.ytManager=xeditor_objects_VideoHtmlManage.getInstance();xeditor_objects_TrObjectEx.call(this,e,t);this._container=new openfl_display_Sprite;this._container.set_name("player_container");this.addChild(this._container);var a=0;var r=Reflect.fields(i);while(a<r.length){var n=r[a];++a;this._parameters[n]=Reflect.field(i,n)}this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();if(xeditor_objects_TrVideoPlayerObject.YoutubeType==i.streamtype){if(s!=null){this.set_uid(s)}}else{this._player=new jaris_TPlayer(i,e,t);this._container.addChild(this._player)}};$hxClasses["xeditor.objects.TrVideoPlayerObject"]=xeditor_objects_TrVideoPlayerObject;xeditor_objects_TrVideoPlayerObject.__name__=["xeditor","objects","TrVideoPlayerObject"];xeditor_objects_TrVideoPlayerObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_TrVideoPlayerObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{ytManager:null,ytPlayer:null,_parameters:null,_player:null,set_uid:function(e){xeditor_objects_TrObjectEx.prototype.set_uid.call(this,e);if(xeditor_objects_TrVideoPlayerObject.YoutubeType==this._parameters.streamtype){this.ytPlayer=null;this.ytPlayer=this.ytManager.getYoutubeVideo(this.get_uid());this.ytPlayer.setInitPara(this.get_realWidth(),this.get_realHeight(),this._parameters.loop,this._parameters.autostart);this._container.addChild(this.ytPlayer)}return e},render:function(){},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},ff_active:function(){if(xeditor_objects_TrVideoPlayerObject.YoutubeType==this._parameters.streamtype){if(null!=this.ytPlayer){this.ytPlayer.triggerPlay()}}else if(this._player.get_parameters().autostart=="true"){this._player.setPlay()}},ff_deactive:function(){if(xeditor_objects_TrVideoPlayerObject.YoutubeType==this._parameters.streamtype){if(this.ytPlayer!=null){this.ytPlayer.triggerPause()}}else{this._player.setPause()}},__class__:xeditor_objects_TrVideoPlayerObject});var xeditor_objects_VideoHtmlManage=function(){this.vimeoList=null;this.youtubeList=null;this.init()};$hxClasses["xeditor.objects.VideoHtmlManage"]=xeditor_objects_VideoHtmlManage;xeditor_objects_VideoHtmlManage.__name__=["xeditor","objects","VideoHtmlManage"];xeditor_objects_VideoHtmlManage.getInstance=function(){if(xeditor_objects_VideoHtmlManage.instance==null){xeditor_objects_VideoHtmlManage.instance=new xeditor_objects_VideoHtmlManage}return xeditor_objects_VideoHtmlManage.instance};xeditor_objects_VideoHtmlManage.prototype={youtubeList:null,vimeoList:null,youtubeVideoList:null,vimeoVideoList:null,init:function(){this.youtubeList=new haxe_ds_StringMap;this.vimeoList=new haxe_ds_StringMap},parseVideoXml:function(e){if(e==null){return}var t=new haxe_xml_Fast(e);var i=t.get_elements();while(i.hasNext()){var s=i.next();if(s.get_elements()!=null){var a=s.get_elements();while(a.hasNext()){var r=a.next();if(r.get_innerHTML()!=null){if(r.get_name()=="ffobjects"){var n=r.get_elements();while(n.hasNext()){var _=n.next();if(_.get_name()=="TrVideoPlayerObject"){var o=new haxe_xml_Fast(_.node.resolve("params").x);if(o.node.resolve("streamtype").get_innerHTML()=="youtube"){var l=o.node.resolve("url").get_innerHTML();var h=StringTools.replace(l,"http://www.youtube.com/watch?v=","");if(_.has.resolve("uid")){var c=this.youtubeList;var u=_.att.resolve("uid");var f=c;if(__map_reserved[u]!=null){f.setReserved(u,h)}else{f.h[u]=h}}else{var p=Std.string(_.att.resolve("x"))+Std.string(_.att.resolve("y"))+Std.string(_.att.resolve("realWidth"))+Std.string(_.att.resolve("realHeight"));var d=this.youtubeList;if(__map_reserved[p]!=null){d.setReserved(p,h)}else{d.h[p]=h}}}}else if(_.get_name()=="VimeoPlayerObject"){var g=new haxe_xml_Fast(_.node.resolve("params").x);var m=g.node.resolve("url").get_innerHTML();var v=this.vimeoList;var b=_.att.resolve("uid");var y=v;if(__map_reserved[b]!=null){y.setReserved(b,m)}else{y.h[b]=m}}}}}}}}},videoLoad:function(){if(base_baseUtils_MapUtil.strLength(this.youtubeList)>0){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 i=window.document.getElementsByTagName("script")[0];i.parentNode.insertBefore(e,i);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 i=new xeditor_objects_YoutubeVideoJs(100,100,t);var s=this.youtubeVideoList;if(__map_reserved[t]!=null){s.setReserved(t,i)}else{s.h[t]=i}}},youtubeStart:function(){var e=this.youtubeVideoList.keys();while(e.hasNext()){var t=e.next();var i=this.youtubeVideoList;var s=__map_reserved[t]!=null?i.getReserved(t):i.h[t];var a=this.youtubeList;s.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 i=window.document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i);t.onload=function(){e.vimeoStart()}},vimeoStart:function(){var e=this.vimeoVideoList.keys();while(e.hasNext()){var t=e.next();var i=this.vimeoVideoList;var s=__map_reserved[t]!=null?i.getReserved(t):i.h[t];var a=this.vimeoList;s.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 i=new xeditor_objects_VimeoPlayerJs(100,100,t);var s=this.vimeoVideoList;if(__map_reserved[t]!=null){s.setReserved(t,i)}else{s.h[t]=i}}},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,i){this.video=null;this.player=null;var a=this;xeditor_objects_TrObjectEx.call(this,e,t);this.vid=i;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 i=a.get_y();var s=a.localToGlobal(new openfl_geom_Point(t,i));if(a.lastPositon.x!=s.x||a.lastPositon.y!=s.y){a.updateVideo(true);a.lastPositon.x=s.x;a.lastPositon.y=s.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,i,s){this.set_realWidth(e);this.set_realHeight(t);if(i=="false"){this.isloop=false}else{this.isloop=true}if(s=="false"){this.isAutoPlay=false}else{this.isAutoPlay=true}this.render()},load:function(e,t){var i=this;this.video.src="https://player.vimeo.com/video/"+t;this.player=new Vimeo.Player(e);this.player.on("play",function(){});this.player.ready().then(function(){i.isReady=true;i.play()});this.player.on("ended",function(){if(i.isloop){i.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 i=this.get_width()*this.getScaleX(this)/window.devicePixelRatio;this.video.style.width=i+"px";var s=this.get_height()*this.getScaleY(this)/window.devicePixelRatio;this.video.style.height=s+"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,i){this._parameters={};xeditor_objects_TrObjectEx.call(this,e,t);this.init_parameters();this.set_parameters(i)};$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 i=Reflect.fields(e);while(t<i.length){var s=i[t];++t;this._parameters[s]=Reflect.field(e,s)}},ff_active:function(){if(this.vimeo!=null){this.vimeo.triggerPlay()}},ff_deactive:function(){if(this.vimeo!=null){this.vimeo.triggerPause()}},__class__:xeditor_objects_VimeoVideoPlayerObject});var xeditor_objects_XChartsObject=function(e,t,i,s){this._charts=null;xeditor_objects_TrObjectEx.call(this,e,t);this._chartsType=i;this._url=s;this._container=new openfl_display_Sprite;this._container.set_name("charts_container");this.addChild(this._container);this.addEventListener("removedFromStage",$bind(this,this.removeEventHandler));this.render();this._charts=new trcharts_TRCharts(e,t);this._container.addChild(this._charts);this._charts.addEventListener("addedToStage",$bind(this,this.chartsAddToStageFun))};$hxClasses["xeditor.objects.XChartsObject"]=xeditor_objects_XChartsObject;xeditor_objects_XChartsObject.__name__=["xeditor","objects","XChartsObject"];xeditor_objects_XChartsObject.__super__=xeditor_objects_TrObjectEx;xeditor_objects_XChartsObject.prototype=$extend(xeditor_objects_TrObjectEx.prototype,{_chartsType:null,_url:null,_charts:null,chartsAddToStageFun:function(e){this._charts.reload(this._url);this._charts.removeEventListener("addedToStage",$bind(this,this.chartsAddToStageFun))},render:function(){this._container.get_graphics().clear();this._container.get_graphics().lineStyle(null);this._container.get_graphics().beginFill(16777215,1);this._container.get_graphics().endFill()},removeEventHandler:function(e){this.removeEventListener("removedFromStage",$bind(this,this.removeEventHandler))},__class__:xeditor_objects_XChartsObject});var xeditor_objects_YoutubeVideoJs=function(e,t,i){this.video=null;this.player=null;var a=this;xeditor_objects_TrObjectEx.call(this,e,t);this.vid=i;this.isReady=false;this.isloop=false;this.isAutoPlay=false;this.istrigger=false;this.video=window.document.createElement("div");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";flipbookMM_global_GetDivJs.getInstance().youtube.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 i=a.get_y();var s=a.localToGlobal(new openfl_geom_Point(t,i));if(a.lastPositon.x!=s.x||a.lastPositon.y!=s.y){a.updateVideo(true);a.lastPositon.x=s.x;a.lastPositon.y=s.y}}})};$hxClasses["xeditor.objects.YoutubeVideoJs"]=xeditor_objects_YoutubeVideoJs;xeditor_objects_YoutubeVideoJs.__name__=["xeditor","objects","YoutubeVideoJs"];xeditor_objects_YoutubeVideoJs.__super__=xeditor_objects_TrObjectEx;xeditor_objects_YoutubeVideoJs.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,i,s){this.set_realWidth(e);this.set_realHeight(t);if(i=="false"){this.isloop=false}else{this.isloop=true}if(s=="false"){this.isAutoPlay=false}else{this.isAutoPlay=true}this.render()},load:function(e,t){this.player=new YT.Player(e,{width:this.get_width(),height:this.get_height(),videoId:t,events:{onReady:$bind(this,this.onPlayerReady),onStateChange:$bind(this,this.onPlayerStateChange),onError:$bind(this,this.onError)}})},onPlayerReady:function(e){this.isReady=true;this.play()},onPlayerStateChange:function(e){if(this.player.getPlayerState()==0){if(this.isloop){this.play()}}},onError:function(e){},triggerPlay:function(){this.istrigger=true;this.play()},triggerPause:function(){this.istrigger=false;this.pause()},play:function(){if(this.istrigger){this.updateVideo(true)}if(this.isAutoPlay&&this.isReady&&this.istrigger){this.player.playVideo()}},pause:function(){this.updateVideo(false);if(this.isReady){this.player.pauseVideo()}},updateVideo:function(e){this.video=window.document.getElementById(this.vid);if(e){var t=this.localToGlobal(new openfl_geom_Point(this.get_x(),this.get_y()));var i=this.get_width()*this.getScaleX(this)/window.devicePixelRatio;this.video.style.width=i+"px";var s=this.get_height()*this.getScaleY(this)/window.devicePixelRatio;this.video.style.height=s+"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_YoutubeVideoJs});var xeditor_serial_TRSerialUtil=function(){};$hxClasses["xeditor.serial.TRSerialUtil"]=xeditor_serial_TRSerialUtil;xeditor_serial_TRSerialUtil.__name__=["xeditor","serial","TRSerialUtil"];xeditor_serial_TRSerialUtil.unserial_color=function(e){if(e=="#-1"||e==""){return-1}else{var t=new RegExp("#","i".split("u").join(""));var i=Std.parseInt(e.replace(t,"0x"));return i}};xeditor_serial_TRSerialUtil.helper_Str_TextFormatAlign=function(e){switch(e){case"center":return 0;case"justify":return 2;case"left":return 3;case"right":return 4}return 3};xeditor_serial_TRSerialUtil.str_value_type=function(e,t){switch(t){case"Bool":if(e=="true"){return true}else{return false}break;case"Float":return parseFloat(e);case"Int":return Std.parseInt(e);case"String":return e;case"UInt":return Std.parseInt(e);default:return e}};var xeditor_serial_TRUnSerialConverter=function(){};$hxClasses["xeditor.serial.TRUnSerialConverter"]=xeditor_serial_TRUnSerialConverter;xeditor_serial_TRUnSerialConverter.__name__=["xeditor","serial","TRUnSerialConverter"];xeditor_serial_TRUnSerialConverter.Xml_actionTyp=function(e){if(e.get_name()!="action"){return null}if(!e.has.resolve("invoketype")||!e.has.resolve("actiontype")){return null}var t={};var i=e.get_elements();while(i.hasNext()){var s=i.next();var a=s.get_innerHTML();a=StringTools.htmlUnescape(a);t[s.get_name()]=xeditor_serial_TRSerialUtil.str_value_type(a,s.att.resolve("type"))}return new xeditor_type_TrActionType(e.att.resolve("invoketype"),e.att.resolve("actiontype"),t)};xeditor_serial_TRUnSerialConverter.xml_to_LineObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("type")||!t.has.resolve("x1")||!t.has.resolve("y1")||!t.has.resolve("x2")||!t.has.resolve("y2")||!t.has.resolve("strokeSize")||!t.has.resolve("strokeColor")||!t.has.resolve("strokeAlpha")){return null}var i=new RegExp("#","i".split("u").join(""));var s=Std.parseInt(t.att.resolve("strokeColor").replace(i,"0x"));var a=parseFloat(t.att.resolve("strokeSize"));var r=parseFloat(t.att.resolve("strokeAlpha"));var n=new openfl_geom_Point(parseFloat(t.att.resolve("x1")),parseFloat(t.att.resolve("y1")));var _=new openfl_geom_Point(parseFloat(t.att.resolve("x2")),parseFloat(t.att.resolve("y2")));var o=new xeditor_objects_LineObject({type:t.att.resolve("type"),strokeSize:a,strokeColor:s,strokeAlpha:r,realWidth:Math.abs(_.x-n.x),realHeight:Math.abs(_.y-n.y)},n,_);o.set_x(parseFloat(t.att.resolve("x")));o.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){o.set_uid(t.att.resolve("uid"))}return o};xeditor_serial_TRUnSerialConverter.xml_to_Shape2Object=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("type")||!t.has.resolve("strokeWidth")||!t.has.resolve("strokeColor")||!t.has.resolve("strokeAlpha")||!t.has.resolve("fillColor")||!t.has.resolve("fillAlpha")){return null}var i=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("strokeColor"));var s=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("fillColor"));var a=new xeditor_objects_Shape2Object(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),{type:t.att.resolve("type"),strokeWidth:parseFloat(t.att.resolve("strokeWidth")),strokeColor:i,strokeAlpha:parseFloat(t.att.resolve("strokeAlpha")),fillColor:s,fillAlpha:parseFloat(t.att.resolve("fillAlpha"))});a.set_x(parseFloat(t.att.resolve("x")));a.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){a.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var r=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(r!=null){a.set_actionType(r)}}return a};xeditor_serial_TRUnSerialConverter.xml_to_TextObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("text")||!t.has.resolve("backgroundColor")||!t.has.resolve("borderColor")){return null}if(!t.hasNode.resolve("textformat")){return null}var i=t.node.resolve("textformat");if(!i.has.resolve("font")||!i.has.resolve("color")||!i.has.resolve("size")||!i.has.resolve("bold")||!i.has.resolve("italic")||!i.has.resolve("underline")||!i.has.resolve("align")){return null}var s=xeditor_serial_TRSerialUtil.unserial_color(i.att.resolve("color"));var a=i.att.resolve("bold")=="true";var r=i.att.resolve("italic")=="true";var n=i.att.resolve("underline")=="true";var _=xeditor_serial_TRSerialUtil.helper_Str_TextFormatAlign(i.att.resolve("align"));var o=new openfl_text_TextFormat(i.att.resolve("font"),parseFloat(i.att.resolve("size"))|0);o.color=s;o.bold=a;o.italic=r;o.underline=n;o.align=_;var l=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("backgroundColor"));var h=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("borderColor"));var c=new xeditor_objects_TextObject(o,l,h,parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")));c.set_htmltext(StringTools.htmlUnescape(t.att.resolve("text")));c.set_x(parseFloat(t.att.resolve("x")));c.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){c.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var u=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(u!=null){c.set_actionType(u)}}return c};xeditor_serial_TRUnSerialConverter.xml_to_StepObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("stepType")||!t.has.resolve("title")||!t.has.resolve("bkgrColor")||!t.has.resolve("titleColor")||!t.has.resolve("fontsize")){return null}var i=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("bkgrColor"));var s=xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("titleColor"));var a=new xeditor_objects_StepObject(t.att.resolve("stepType"),parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),StringTools.htmlUnescape(t.att.resolve("title")),i,s,parseFloat(t.att.resolve("fontsize")));a.set_x(parseFloat(t.att.resolve("x")));a.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){a.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var r=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(r!=null){a.set_actionType(r)}}return a};xeditor_serial_TRUnSerialConverter.xml_to_CalloutObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("type")||!t.has.resolve("text")||!t.has.resolve("strokeWidth")||!t.has.resolve("strokeColor")||!t.has.resolve("strokeAlpha")||!t.has.resolve("fillColor")||!t.has.resolve("fillAlpha")||!t.has.resolve("topcornerPoint")||!t.has.resolve("bottomcornerPoint")||!t.has.resolve("controlPoint")){return null}if(!t.hasNode.resolve("textformat")){return null}var i=t.node.resolve("textformat");if(!i.has.resolve("font")||!i.has.resolve("color")||!i.has.resolve("size")||!i.has.resolve("bold")||!i.has.resolve("italic")||!i.has.resolve("underline")||!i.has.resolve("align")){return null}var s=new openfl_text_TextFormat(i.att.resolve("font"),parseFloat(i.att.resolve("size"))|0);s.color=xeditor_utils_TRTypeParser.parseColor(i.att.resolve("color"));s.bold=xeditor_utils_TRTypeParser.parseBool(i.att.resolve("bold"));s.italic=xeditor_utils_TRTypeParser.parseBool(i.att.resolve("italic"));s.underline=xeditor_utils_TRTypeParser.parseBool(i.att.resolve("underline"));s.align=xeditor_serial_TRSerialUtil.helper_Str_TextFormatAlign(i.att.resolve("align"));var a=new xeditor_objects_CalloutObject(t.att.resolve("type"),xeditor_utils_TRTypeParser.parsePoint(t.att.resolve("topcornerPoint")),xeditor_utils_TRTypeParser.parsePoint(t.att.resolve("bottomcornerPoint")),xeditor_utils_TRTypeParser.parsePoint(t.att.resolve("controlPoint")),{strokeWidth:parseFloat(t.att.resolve("strokeWidth")),strokeColor:xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("strokeColor")),strokeAlpha:parseFloat(t.att.resolve("strokeAlpha")),fillColor:xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("fillColor")),fillAlpha:parseFloat(t.att.resolve("fillAlpha")),text:StringTools.htmlUnescape(t.att.resolve("text")),textformat:s});a.set_x(parseFloat(t.att.resolve("x")));a.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){a.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var r=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(r!=null){a.set_actionType(r)}}return a};xeditor_serial_TRUnSerialConverter.xml_to_TrButtonObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("button_type")||!t.has.resolve("fontname")||!t.has.resolve("fontsize")||!t.has.resolve("font_weight")||!t.has.resolve("text")){return null}var i=new xeditor_objects_TrButtonObject(t.att.resolve("button_type"),parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),t.att.resolve("fontname"),parseFloat(t.att.resolve("fontsize")),t.att.resolve("font_weight"),StringTools.htmlUnescape(t.att.resolve("text")));i.set_x(parseFloat(t.att.resolve("x")));i.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){i.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var s=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(s!=null){i.set_actionType(s)}}return i};xeditor_serial_TRUnSerialConverter.xml_to_ImageObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("url")||!t.has.resolve("hasborder")||!t.has.resolve("strokeWidth")||!t.has.resolve("strokeColor")||!t.has.resolve("alpha")){return null}var i=parseFloat(t.att.resolve("realWidth"));var s=parseFloat(t.att.resolve("realHeight"));var a=t.att.resolve("url");var r=new xeditor_objects_ImageObject(i,s,{url:decodeURIComponent(a.split("+").join(" ")),hasborder:xeditor_utils_TRTypeParser.parseBool(t.att.resolve("hasborder")),strokeWidth:parseFloat(t.att.resolve("strokeWidth")),strokeColor:xeditor_serial_TRSerialUtil.unserial_color(t.att.resolve("strokeColor")),alpha:parseFloat(t.att.resolve("alpha"))});r.set_x(parseFloat(t.att.resolve("x")));r.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){r.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var n=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(n!=null){r.set_actionType(n)}}return r};xeditor_serial_TRUnSerialConverter.xml_to_TrVideoPlayerObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")){return null}if(!t.hasNode.resolve("params")){return null}var i={};var s=t.node.resolve("params");var a=s.get_elements();while(a.hasNext()){var r=a.next();i[r.get_name()]=StringTools.htmlUnescape(r.get_innerHTML())}if(!t.has.resolve("uid")){var n=new xeditor_objects_TrVideoPlayerObject(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),i,Std.string(t.att.resolve("x"))+Std.string(t.att.resolve("y"))+Std.string(t.att.resolve("realWidth"))+Std.string(t.att.resolve("realHeight")));n.set_x(parseFloat(t.att.resolve("x")));n.set_y(parseFloat(t.att.resolve("y")));return n}else{var _=new xeditor_objects_TrVideoPlayerObject(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),i);_.set_x(parseFloat(t.att.resolve("x")));_.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){_.set_uid(t.att.resolve("uid"))}return _}};xeditor_serial_TRUnSerialConverter.xml_to_VimeoPlayerObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")){return null}if(!t.hasNode.resolve("params")){return null}var i={};var s=t.node.resolve("params");var a=s.get_elements();while(a.hasNext()){var r=a.next();i[r.get_name()]=StringTools.htmlUnescape(r.get_innerHTML())}var n=new xeditor_objects_VimeoVideoPlayerObject(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),i);n.set_x(parseFloat(t.att.resolve("x")));n.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){n.set_uid(t.att.resolve("uid"))}return n};xeditor_serial_TRUnSerialConverter.xml_to_AudioPlayerObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("fontsize")||!t.has.resolve("bkColor")||!t.has.resolve("isFlat")||!t.has.resolve("url")||!t.has.resolve("songname")||!t.has.resolve("duration")){return null}var i=new xeditor_objects_AudioPlayerObject(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),parseFloat(t.att.resolve("fontsize")),xeditor_utils_TRTypeParser.parseColor(t.att.resolve("bkColor")),xeditor_utils_TRTypeParser.parseBool(t.att.resolve("isFlat")));i.set_x(parseFloat(t.att.resolve("x")));i.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){i.set_uid(t.att.resolve("uid"))}var s=t.att.resolve("url");i.set_params({url:decodeURIComponent(s.split("+").join(" ")),songname:StringTools.htmlUnescape(t.att.resolve("songname")),duration:parseFloat(t.att.resolve("duration"))});return i};xeditor_serial_TRUnSerialConverter.xml_to_XChartsObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("chartsType")||!t.has.resolve("url")){return null}var i=parseFloat(t.att.resolve("realWidth"));var s=parseFloat(t.att.resolve("realHeight"));var a=t.att.resolve("chartsType");var r=t.att.resolve("url");var n=new xeditor_objects_XChartsObject(i,s,a,decodeURIComponent(r.split("+").join(" ")));n.set_x(parseFloat(t.att.resolve("x")));n.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){n.set_uid(t.att.resolve("uid"))}return n};xeditor_serial_TRUnSerialConverter.xml_to_LinkObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")){return null}if(!t.hasNode.resolve("params")){return null}var i={};var s=t.node.resolve("params");var a=s.get_elements();while(a.hasNext()){var r=a.next();if(r.get_name()=="normalColor"||r.get_name()=="overColor"||r.get_name()=="downColor"||r.get_name()=="overBorderColor"){i[r.get_name()]=xeditor_serial_TRSerialUtil.unserial_color(r.get_innerHTML())}else if(r.get_name()=="normalApha"||r.get_name()=="overAhpa"||r.get_name()=="downAhpa"){i[r.get_name()]=parseFloat(r.get_innerHTML())}else if(r.get_name()=="overBorder"){i[r.get_name()]=xeditor_utils_TRTypeParser.parseBool(r.get_innerHTML())}}var n=new xeditor_objects_LinkObject(parseFloat(t.att.resolve("realWidth")),parseFloat(t.att.resolve("realHeight")),i);n.set_x(parseFloat(t.att.resolve("x")));n.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){n.set_uid(t.att.resolve("uid"))}if(t.hasNode.resolve("action")){var _=xeditor_serial_TRUnSerialConverter.Xml_actionTyp(t.node.resolve("action"));if(_!=null){n.set_actionType(_)}}return n};xeditor_serial_TRUnSerialConverter.xml_to_BKAudioObject=function(e){var t=new haxe_xml_Fast(e);if(!t.has.resolve("x")||!t.has.resolve("y")||!t.has.resolve("realWidth")||!t.has.resolve("realHeight")||!t.has.resolve("url")||!t.has.resolve("vol")||!t.has.resolve("rePlay")){return null}var i=parseFloat(t.att.resolve("realWidth"));var s=parseFloat(t.att.resolve("realHeight"));var a=t.att.resolve("url");var r=new xeditor_objects_BKAudioObject(i,s,decodeURIComponent(a.split("+").join(" ")),Std.parseInt(t.att.resolve("vol")),Std.parseInt(t.att.resolve("rePlay")));r.set_x(parseFloat(t.att.resolve("x")));r.set_y(parseFloat(t.att.resolve("y")));if(t.has.resolve("uid")){r.set_uid(t.att.resolve("uid"))}return r};xeditor_serial_TRUnSerialConverter.from=function(e,t){if(t==null){t=0}var i=[];var s=e.elements();while(s.hasNext()){var a=s.next();if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="LineObject"){var r=xeditor_serial_TRUnSerialConverter.xml_to_LineObject(a);if(r!=null){i.push(r)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="Shape2Object"){var n=xeditor_serial_TRUnSerialConverter.xml_to_Shape2Object(a);if(n!=null){i.push(n)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="TextObject"){var _=xeditor_serial_TRUnSerialConverter.xml_to_TextObject(a);if(_!=null){i.push(_)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="StepObject"){var o=xeditor_serial_TRUnSerialConverter.xml_to_StepObject(a);if(o!=null){i.push(o)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="CalloutObject"){var l=xeditor_serial_TRUnSerialConverter.xml_to_CalloutObject(a);if(l!=null){i.push(l)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="TrButtonObject"){var h=xeditor_serial_TRUnSerialConverter.xml_to_TrButtonObject(a);if(h!=null){i.push(h)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="ImageObject"){var c=xeditor_serial_TRUnSerialConverter.xml_to_ImageObject(a);if(c!=null){i.push(c)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="TrVideoPlayerObject"){var u=xeditor_serial_TRUnSerialConverter.xml_to_TrVideoPlayerObject(a);if(u!=null){i.push(u)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="VimeoPlayerObject"){var f=xeditor_serial_TRUnSerialConverter.xml_to_VimeoPlayerObject(a);if(f!=null){i.push(f)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="AudioPlayerObject"){var p=xeditor_serial_TRUnSerialConverter.xml_to_AudioPlayerObject(a);if(p!=null){i.push(p)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="XChartsObject"){var d=xeditor_serial_TRUnSerialConverter.xml_to_XChartsObject(a);if(d!=null){i.push(d)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="LinkObject"){var g=xeditor_serial_TRUnSerialConverter.xml_to_LinkObject(a);if(g!=null){i.push(g)}}else{if(a.nodeType!=Xml.Element){throw new js__$Boot_HaxeError("Bad node type, expected Element but found "+a.nodeType)}if(a.nodeName=="BKAudioObject"){var m=xeditor_serial_TRUnSerialConverter.xml_to_BKAudioObject(a);if(m!=null){i.push(m)}}}}}}}}}}}}}}}return i};var xeditor_type_TrActionType=function(e,t,i){this._invoketype=e;this._actiontype=t;this._params=i};$hxClasses["xeditor.type.TrActionType"]=xeditor_type_TrActionType;xeditor_type_TrActionType.__name__=["xeditor","type","TrActionType"];xeditor_type_TrActionType.prototype={_invoketype:null,_actiontype:null,_params:null,get_invoketype:function(){return this._invoketype},get_actiontype:function(){return this._actiontype},get_params:function(){return this._params},__class__:xeditor_type_TrActionType,__properties__:{get_params:"get_params",get_actiontype:"get_actiontype",get_invoketype:"get_invoketype"}};var xeditor_utils_TRcssUtil=function(){};$hxClasses["xeditor.utils.TRcssUtil"]=xeditor_utils_TRcssUtil;xeditor_utils_TRcssUtil.__name__=["xeditor","utils","TRcssUtil"];xeditor_utils_TRcssUtil.color_calculatePartial=function(e){var t=Std.parseInt("0x"+e.substring(0,1)+e.substring(0,1));var i=Std.parseInt("0x"+e.substring(1,2)+e.substring(1,2));var s=Std.parseInt("0x"+e.substring(2,3)+e.substring(2,3));return xeditor_utils_TRUtil.rgb(t,i,s)};xeditor_utils_TRcssUtil.color_calculateFull=function(e){var t=HxOverrides.substr(e,1,null);return Std.parseInt("0x"+t)};xeditor_utils_TRcssUtil.color_cal=function(e){var t=0;var i=1;if(e.charAt(0)=="#"){var s=HxOverrides.substr(e,1,null);if(s.length==6){t=Std.parseInt("0x"+s)}else{t=xeditor_utils_TRcssUtil.color_calculatePartial(s)}}else{var a=new EReg("^[a-z]+$","");var r=new EReg("^rgb\\(([0-9]+),([0-9]+),([0-9]+)\\)","");var n=new EReg("^rgba\\(([0-9]+),([0-9]+),([0-9]+),(\\.[0-9]+)\\)","");if(a.match(e)){t=xeditor_utils_TRcssUtil.color_calculateFull(Reflect.field(xeditor_utils_TRcssUtil.css_colors,a.matched(0)))}else if(r.match(e)){t=xeditor_utils_TRUtil.rgb(Std.parseInt(r.matched(1)),Std.parseInt(r.matched(2)),Std.parseInt(r.matched(3)))}else if(n.match(e)){t=xeditor_utils_TRUtil.rgb(Std.parseInt(n.matched(1)),Std.parseInt(n.matched(2)),Std.parseInt(n.matched(3)));i=parseFloat(n.matched(4))}}return{color:t,alpha:i}};xeditor_utils_TRcssUtil.parse_css_box_shadow=function(e){if(e=="none"){return null}var t={};var i=e.split(" ");if(i.length<3){return null}if(i[0]=="inset"){if(i.length<=3){return null}if(i.length==4){return{inner:true,offset_x:parseFloat(StringTools.replace(i[1],"px","")),offset_y:parseFloat(StringTools.replace(i[2],"px","")),color:xeditor_utils_TRcssUtil.color_cal(i[3]).color,alpha:xeditor_utils_TRcssUtil.color_cal(i[3]).alpha}}else if(i.length==5){return{inner:true,offset_x:parseFloat(StringTools.replace(i[1],"px","")),offset_y:parseFloat(StringTools.replace(i[2],"px","")),blur_radius:parseFloat(StringTools.replace(i[3],"px","")),color:xeditor_utils_TRcssUtil.color_cal(i[4]).color,alpha:xeditor_utils_TRcssUtil.color_cal(i[4]).alpha}}}else if(i.length==3){return{inner:false,offset_x:parseFloat(StringTools.replace(i[0],"px","")),offset_y:parseFloat(StringTools.replace(i[1],"px","")),color:xeditor_utils_TRcssUtil.color_cal(i[2]).color,alpha:xeditor_utils_TRcssUtil.color_cal(i[2]).alpha}}else if(i.length==4){return{inner:false,offset_x:parseFloat(StringTools.replace(i[0],"px","")),offset_y:parseFloat(StringTools.replace(i[1],"px","")),blur_radius:parseFloat(StringTools.replace(i[2],"px","")),color:xeditor_utils_TRcssUtil.color_cal(i[3]).color,alpha:xeditor_utils_TRcssUtil.color_cal(i[3]).alpha}}return null};xeditor_utils_TRcssUtil.parse_css_text_shadow=function(e){return xeditor_utils_TRcssUtil.parse_css_box_shadow(e)};xeditor_utils_TRcssUtil.parse_css_linear_gradient=function(e){var t=e.split(",");if(t.length!=3){return null}var i=90;var s;var a;if(t[0].charAt(0)=="t"){if(t[0].indexOf("bottom")!=-1){i=90}else if(t[0].indexOf("top")!=-1){i=270}else if(t[0].indexOf("left")!=-1){i=180}else if(t[0].indexOf("right")!=-1){i=0}}else{i=parseFloat(StringTools.replace(t[0],"deg",""))}return{angle:i,color1:xeditor_utils_TRcssUtil.color_cal(t[1]).color,color2:xeditor_utils_TRcssUtil.color_cal(t[2]).color,alpha1:1,alpha2:1,ratio1:0,ratio2:255}};var xeditor_utils_TRUtil=function(){};$hxClasses["xeditor.utils.TRUtil"]=xeditor_utils_TRUtil;xeditor_utils_TRUtil.__name__=["xeditor","utils","TRUtil"];xeditor_utils_TRUtil.rgb=function(e,t,i){return e<<16|t<<8|i};xeditor_utils_TRUtil.cal_twopoint_angle=function(e,t){var i=t.x-e.x;var s=t.y-e.y;var a=Math.atan2(s,i);a=(a>0?a:2*Math.PI+a)*360/(2*Math.PI);return a};xeditor_utils_TRUtil.measureString=function(e,t){var i=new openfl_text_TextField;i.set_defaultTextFormat(t);i.set_text(e);return new openfl_geom_Rectangle(0,0,i.get_textWidth(),i.get_textHeight())};xeditor_utils_TRUtil.formatTime=function(e){var t="";var i="";var s="";var a="";if(e/60/60>=1){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%60)<10){i="0"+Math.floor(e/60%60)+":"}else{i=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){s="00:";if(Math.floor(e/60)<10){i="0"+Math.floor(e/60)+":"}else{i=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{s="00:";i="00:";if(Math.floor(e)<10){t="0"+Math.floor(e)}else{t=Std.string(Math.floor(e))}}a+=s+i+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 i=new openfl_geom_Point(t.x,t.y);var s=new openfl_geom_Point(t.x,t.get_bottom());var a=new openfl_geom_Point(t.get_right(),t.get_bottom());e.moveTo(i.x,i.y);e.lineTo(s.x,s.y);e.lineTo(a.x,a.y);e.lineTo(i.x,i.y)};xeditor_utils_DrawingShapes.drawTriangle=function(e,t){var i=new openfl_geom_Point(t.x,t.get_bottom());var s=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(i.x,i.y);e.lineTo(s.x,s.y);e.lineTo(a.x,a.y);e.lineTo(i.x,i.y)};xeditor_utils_DrawingShapes.drawStarEx_inRect=function(e,t,i,s,a){if(a==null){a=0}if(i.width<=0||i.height<=0){return}var r=i.x+i.width/2;var n=i.y+i.height/2;var _=i.width<=i.height?i.width/2:i.height/2;var o=i.width<=i.height?1:i.width/i.height;var l=i.height<=i.width?1:i.height/i.width;xeditor_utils_DrawingShapes.drawStarEx(e,r,n,t,s,_,a,o,l)};xeditor_utils_DrawingShapes.drawStarEx=function(e,t,i,s,a,r,n,_,o){if(o==null){o=1}if(_==null){_=1}if(n==null){n=0}var l=t;var h=i;i=0;t=i;if(_$UInt_UInt_$Impl_$.gte(2,s)){return}if(_$UInt_UInt_$Impl_$.gt(s,2)){var c;var u;var f;var p;var d;var g;c=Math.PI*2/_$UInt_UInt_$Impl_$.toFloat(s);u=c/2;f=n/180*Math.PI;e.moveTo((t+Math.cos(f)*r)*_+l,(i-Math.sin(f)*r)*o+h);var m=1;var v=s+1;while(m<v){var b=m++;d=t+Math.cos(f+c*b-u)*a;g=i-Math.sin(f+c*b-u)*a;e.lineTo(d*_+l,g*o+h);d=t+Math.cos(f+c*b)*r;g=i-Math.sin(f+c*b)*r;e.lineTo(d*_+l,g*o+h)}}};xeditor_utils_DrawingShapes.radians=function(e){return Math.PI/180*e};xeditor_utils_DrawingShapes.drawPolygon2Ex_inRect=function(e,t,i,s){if(s==null){s=0}if(i.width<=0||i.height<=0){return}var a=i.x+i.width/2;var r=i.y+i.height/2;var n=i.width<=i.height?i.width/2:i.height/2;var _=i.width<=i.height?1:i.width/i.height;var o=i.height<=i.width?1:i.height/i.width;xeditor_utils_DrawingShapes.drawPolygon2Ex(e,n,t,a,r,s,_,o)};xeditor_utils_DrawingShapes.drawPolygon2Ex=function(e,t,i,s,a,r,n,_){if(_==null){_=1}if(n==null){n=1}var o=s;var l=a;a=0;s=a;var h=0;var c=[];var u=360/i;var f=a-t;var p=r;while((p|0)<=360+r){var d=s+Math.sin(xeditor_utils_DrawingShapes.radians(p))*t;var g=f+(t-Math.cos(xeditor_utils_DrawingShapes.radians(p))*t);c[h]=new openfl_geom_Point(d,g);switch(h){case 0:break;case 1:e.moveTo(c[h-1].x*n+o,c[h-1].y*_+l);e.lineTo(c[h].x*n+o,c[h].y*_+l);break;default:e.lineTo(c[h].x*n+o,c[h].y*_+l)}++h;p+=u}h=0};var xeditor_utils_TRTypeParser=function(){};$hxClasses["xeditor.utils.TRTypeParser"]=xeditor_utils_TRTypeParser;xeditor_utils_TRTypeParser.__name__=["xeditor","utils","TRTypeParser"];xeditor_utils_TRTypeParser.parseBool=function(e){var t=false;if(e!=null){e=StringTools.trim(e);e=e.toLowerCase();if(e=="true"||e=="yes"||e=="1"){t=true}}return t};xeditor_utils_TRTypeParser.parseColor=function(e){var t=0;if(e!=null){e=StringTools.trim(e);if(StringTools.startsWith(e,"#")){e="0x"+HxOverrides.substr(e,1,e.length-1)}t=Std.parseInt(e)}return t};xeditor_utils_TRTypeParser.parsePoint=function(e){var t=new openfl_geom_Point(0,0);if(e!=null){e=StringTools.trim(e);var i=e.split(",");if(i.length==2){t.x=Std.parseInt(i[0]);t.y=Std.parseInt(i[1])}}return t};var xeditor_utils_TRUID=function(){};$hxClasses["xeditor.utils.TRUID"]=xeditor_utils_TRUID;xeditor_utils_TRUID.__name__=["xeditor","utils","TRUID"];xeditor_utils_TRUID.getUID=function(){var e=(new Date).getTime();if(e<=xeditor_utils_TRUID._lastUID){e=xeditor_utils_TRUID._lastUID+1}xeditor_utils_TRUID._lastUID=e;return e};function $iterator(e){if(e instanceof Array)return function(){return HxOverrides.iter(e)};return typeof e.iterator=="function"?$bind(e,e.iterator):e.iterator}var $_,$fid=0;function $bind(e,t){if(t==null)return null;if(t.__id__==null)t.__id__=$fid++;var i;if(e.hx__closures__==null)e.hx__closures__={};else i=e.hx__closures__[t.__id__];if(i==null){i=function(){return i.method.apply(i.scope,arguments)};i.scope=e;i.method=t;e.hx__closures__[t.__id__]=i}return i}var init=lime__$internal_backend_html5_HTML5Application;var init=lime_app_Application;$hxClasses["Math"]=Math;String.prototype.__class__=$hxClasses["String"]=String;String.__name__=["String"];$hxClasses["Array"]=Array;Array.__name__=["Array"];Date.prototype.__class__=$hxClasses["Date"]=Date;Date.__name__=["Date"];var Int=$hxClasses["Int"]={__name__:["Int"]};var Dynamic=$hxClasses["Dynamic"]={__name__:["Dynamic"]};var Float=$hxClasses["Float"]=Number;Float.__name__=["Float"];var Bool=$hxClasses["Bool"]=Boolean;Bool.__ename__=["Bool"];var Class=$hxClasses["Class"]={__name__:["Class"]};var Enum={};var __map_reserved={};var ArrayBuffer=$global.ArrayBuffer||js_html_compat_ArrayBuffer;if(ArrayBuffer.prototype.slice==null){ArrayBuffer.prototype.slice=js_html_compat_ArrayBuffer.sliceImpl}var DataView=$global.DataView||js_html_compat_DataView;var Float32Array=$global.Float32Array||js_html_compat_Float32Array._new;var Uint8Array=$global.Uint8Array||js_html_compat_Uint8Array._new;var this1=new Uint32Array(256);lime_math__$RGBA_RGBA_$Impl_$.__alpha16=this1;var _g=0;while(_g<256){var i=_g++;lime_math__$RGBA_RGBA_$Impl_$.__alpha16[i]=Math.ceil(i*257.00392156862745)}var this2=new Uint8Array(511);lime_math__$RGBA_RGBA_$Impl_$.__clamp=this2;var _g1=0;while(_g1<255){var i1=_g1++;lime_math__$RGBA_RGBA_$Impl_$.__clamp[i1]=i1}var _g11=255;var _g2=511;while(_g11<_g2){var i2=_g11++;lime_math__$RGBA_RGBA_$Impl_$.__clamp[i2]=255}lime_utils_Log.level=0;if(typeof console=="undefined"){console={}}if(console.log==null){console.log=function(){}}openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas=typeof window!="undefined"?window.document.createElement("canvas"):null;openfl__$internal_renderer_canvas_CanvasGraphics.hitTestContext=typeof window!="undefined"?openfl__$internal_renderer_canvas_CanvasGraphics.hitTestCanvas.getContext("2d"):null;haxe_ds_ObjectMap.count=0;openfl_display_DisplayObject.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_DisplayObject.__broadcastEvents=new haxe_ds_StringMap;openfl_display_DisplayObject.__instanceCount=0;openfl_display_DisplayObject.__tempStack=new lime_utils_ObjectPool(function(){return openfl__$Vector_Vector_$Impl_$.toObjectVector(null)},function(e){e.set_length(0)});Xml.Element=0;Xml.PCData=1;Xml.CData=2;Xml.Comment=3;Xml.DocType=4;Xml.ProcessingInstruction=5;Xml.Document=6;base_baseEvent_TouchCustomEvent.TOUCH_DRAG="touchDrag";base_baseEvent_TouchCustomEvent.TOUCH_ZOOM="touchZoom";base_baseEvent_TouchCustomEvent.TOUCH_LEFT_SLIDE="touchLeftSlide";base_baseEvent_TouchCustomEvent.TOUCH_RIGHT_SLIDE="touchLEftSlide";base_baseEvent_TouchCustomEvent.TOUCH_UP_SLIDE="touchUpSlide";base_baseEvent_TouchCustomEvent.TOUCH_DOWN_SLIDE="touchDownSlide";base_baseEvent_TouchCustomEvent.TOUCH_DRAG_END="touchDragEnd";base_baseEvent_TouchCustomEvent.TOUCH_ZOOM_END="touchZoomEnd";ffcrypt_codes_FFDecrypt.ERROR_KEY="Invalid key size.\n";ffcrypt_codes_FFDecrypt.ERROR_BLOCK="Invalid block size.\n";ffcrypt_samples_TSBookBinParse.BinTestKey="Description";flipbookMM_config_ConfigKey.PageCount="pageCount";flipbookMM_config_ConfigKey.PageWidth="PageWidth";flipbookMM_config_ConfigKey.PageHeight="PageHeight";flipbookMM_config_ConfigKey.AppRegister="appRegister";flipbookMM_config_ConfigKey.AppShowName="appAppName";flipbookMM_config_ConfigKey.AppLinkWebsite="appWebsite";flipbookMM_config_ConfigKey.AutoFlipInterval="AutoFlipInterval";flipbookMM_config_ConfigKey.AutoFlipLoops="AutoFlipLoops";flipbookMM_config_ConfigKey.IsRightToLeft="isRightToLeft";flipbookMM_config_ConfigKey.IsHardCoverStyle="isHardCoverStyle";flipbookMM_config_ConfigKey.PageBackgroundColor="pageBackgroundColor";flipbookMM_config_ConfigKey.ControlBarColor="controlBarColor";flipbookMM_config_ConfigKey.BackgroundAlpha="backgroundAlpha";flipbookMM_config_ConfigKey.LinkOverColor="linkOverFill";flipbookMM_config_ConfigKey.LinkOverAlpha="linkOverAlpha";flipbookMM_config_ConfigKey.SecurityMode="securityMode";flipbookMM_config_ConfigKey.StageBackgroundColor="StageBackgroundColor";flipbookMM_config_ConfigKey.StageBackgroundScene="StageBackgroundScene";flipbookMM_config_ConfigKey.StageBackgroundImg="StageBackgroundImg";flipbookMM_config_ConfigKey.StageBackgroundMusicEnable="StageBackgroundMusicEnable";flipbookMM_config_ConfigKey.StageBackgroundMusicUrl="StageBackgroundMusicUrl";flipbookMM_config_ConfigKey.MusicLoopCount="MusicLoopCount";flipbookMM_config_ConfigKey.MusicAutoStart="MusicAutoStart";flipbookMM_config_ConfigKey.DefaultBookStyle="DefaultBookStyle";flipbookMM_config_ConfigKey.FLipStyleHardEnable="isHardCoverStyle";flipbookMM_config_ConfigKey.PageSwitchSoundEnable="PageSwitchSoundEnable";flipbookMM_config_ConfigKey.JS_mobile="IsMobile";flipbookMM_config_ConfigKey.BookMarkButtonEnable="BookMarkButtonEnable";flipbookMM_config_ConfigKey.BookMarkBgColor="BookMarkBgColor";flipbookMM_config_ConfigKey.BookMarkBgAlpha="BookMarkBgAlpha";flipbookMM_config_ConfigKey.ThumbnailButtonEnable="ThumbnailButtonEnable";flipbookMM_config_ConfigKey.ThumbnailBgColor="ThumbnailBgColor";flipbookMM_config_ConfigKey.ThumbnailBgAlpha="ThumbnailBgAlpha";flipbookMM_config_ConfigKey.SearchTextButtonEnable="SearchTextButtonEnable";flipbookMM_config_ConfigKey.SearchTextBgColor="SearchTextBgColor";flipbookMM_config_ConfigKey.SearchTextBgAlpha="SearchTextBgAlpha";flipbookMM_config_ConfigKey.SoundButtonEnable="SoundButtonEnable";flipbookMM_config_ConfigKey.SocialShareButtonEnable="SocialShareButtonEnable";flipbookMM_config_ConfigKey.ZoomButtonEnable="ZoomButtonEnable";flipbookMM_config_ConfigKey.TxtViewButtionEnable="TxtViewButtionEnable";flipbookMM_config_ConfigKey.NavigateFlipButtonEnable="NavigateFlipButtonEnable";flipbookMM_config_ConfigKey.AutoFlipButtonEnable="AutoFlipButtonEnable";flipbookMM_config_ConfigKey.AutoFlipAutoStart="AutoFlipAutoStart";flipbookMM_config_ConfigKey.TopToolbarBgColor="TopToolbarBgColor";flipbookMM_config_ConfigKey.TopToolbarBgAlpha="TopToolbarBgAlpha";flipbookMM_config_ConfigKey.TopToolBarHeight="TopToolBarHeight";flipbookMM_config_ConfigKey.BottomToolbarBgColor="BottomToolbarBgColor";flipbookMM_config_ConfigKey.BottomToolbarBgAlpha="BottomToolbarBgAlpha";flipbookMM_config_ConfigKey.BottomSlideDefaultColor="BottomSlideDefaultColor";flipbookMM_config_ConfigKey.BottomSlideActionColor="BottomSlideActionColor";flipbookMM_config_ConfigKey.BottomToolbarHeight="BottomToolbarHeight";flipbookMM_config_ConfigKey.ButtonDefaultColor="ButtonDefaultColor";flipbookMM_config_ConfigKey.ButtonResponsiveColor="ButtonResponsiveColor";flipbookMM_config_ConfigKey.TextDefaultColor="TextDefaultColor";flipbookMM_config_ConfigKey.TextResponsivColor="TextResponsivColor";flipbookMM_config_ConfigKey.LogoEnable="LogoEnable";flipbookMM_config_ConfigKey.LogoImgUrl="LogoImgUrl";flipbookMM_config_ConfigKey.LogoLinkUrl="LogoLinkUrl";flipbookMM_config_ConfigKey.LogoWidth="LogoWidth";flipbookMM_config_ConfigKey.LogoHeight="LogoHeight";flipbookMM_config_ConfigKey.LogoLeftMargin="LogoLeftMargin";flipbookMM_config_ConfigKey.LogoTopMargin="LogoTopMargin";flipbookMM_config_ConfigKey.DownloadEnable="DownloadEnable";flipbookMM_config_ConfigKey.DownloadFileUrl="DownloadFileUrl";flipbookMM_config_ConfigKey.FullscreenEnable="enableFullButton";flipbookMM_config_ConfigKey.PrintEnable="enablePrintButton";flipbookMM_config_ConfigKey.ContentDisplayMarginTop="ContentDisplayMarginTop";flipbookMM_config_ConfigKey.ContentDisplayMarginBot="ContentDisplayMarginBot";flipbookMM_config_ConfigKey.PdfjsRenderEnable="PdfjsRenderEnable";flipbookMM_config_ConfigKey.MixRenderEnable="mixRenderEnable";flipbookMM_config_ConfigKey.PageObjectEnable="PageObjectEnable";flipbookMM_config_ConfigKey.PageObjectConfigJs="PageObjectConfigJs";flipbookMM_config_ConfigKey.PageObjectConfigJson="PageObjectConfigJson";flipbookMM_config_Resource.FLIPBOOKXML_PATH="./files/mobile.xml";flipbookMM_config_Resource.FLIPBOOKXML_PATH_BIN="./files/mobile.bin";flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH="./files/book.xml";flipbookMM_config_Resource.FLIPBOOKXML_PC_PATH_BIN="./files/book.bin";flipbookMM_config_Resource.FLIPBOOKTEXT_FILENAME="./files/texts/bookText.xml";flipbookMM_events_EventConst.GO_TO_PAGE_NEXT="goToPageNext";flipbookMM_events_EventConst.GO_TO_PAGE_PREVIOUS="gotoPagePrevious";flipbookMM_events_EventConst.GO_TO_PAGE_NUM="goToPageNum";flipbookMM_events_EventConst.PAGE_CURRENT="pageCurrent";flipbookMM_events_EventConst.PAGE_ZOOM="pageZoom";flipbookMM_events_EventConst.PAGE_ZOOM_END="pageZoomEnd";flipbookMM_events_EventConst.PAGE_ZOOM_CURRENT="pageZoomCURRENT";flipbookMM_events_EventConst.TOOL_BAR_ON_OFF="toolbarOnOff";flipbookMM_events_EventConst.UPDATE_BOOK_MARK="updateBookMark";flipbookMM_events_EventConst.SEARCH_TEXT_FINISHED="searchTextFinished";flipbookMM_events_EventConst.SEARCH_TEXT_CANCEL="searchTextCancel";flipbookMM_events_EventConst.THUMBNAIL_DISPLAY="thumbnailDisplay";flipbookMM_events_EventConst.THUMBNAIL_HIDE="thumbnailHide";flipbookMM_events_EventConst.SHARE_ON_OFF="shareOnOff";flipbookMM_events_EventConst.ZOOM_ON_OFF="zoomOnOff";flipbookMM_events_EventConst.SOUNDBTN_ON_OFF="soundBtnOnOff";flipbookMM_events_EventConst.SWITCH_BAR_ON_OFF="switchBarOnOff";flipbookMM_events_EventConst.AUTO_FLIP_PAGE_ON_OFF="autoFlipPage";flipbookMM_events_EventConst.TOP_RIGHT_EXP_ON_OFF="topRightExpOnOff";flipbookMM_events_EventConst.YOUTUBE_SHOW_HIDE="youtubeShowHide";flipbookMM_events_EventConst.PAGE_MOVE_START="pageMoveStart";flipbookMM_events_EventConst.PAGE_MOVE_END="pageMoveEnd";flipbookMM_events_EventConst.SECURITY_WINDOW_ON="securityWindowOn";flipbookMM_events_EventConst.SECURITY_WINDOW_OFF="securityWindowOff";flipbookMM_events_EventConst.SECURITY_PASS_OK="securityPassOk";flipbookMM_global_GetDivJs.OpenflId="openfl-content";flipbookMM_global_GetDivJs.pdfTxtId="pdf-txt";flipbookMM_global_GetDivJs.noOpenflId="openfl-menu";flipbookMM_global_GetDivJs.toolId="tool";flipbookMM_global_GetDivJs.fObjectId="fobject";flipbookMM_toolbar_bar_AutoLayout.LOGO_WIDTH=200;flipbookMM_toolbar_bar_AutoLayout.Button_Width=36;flipbookMM_toolbar_bar_AutoLayout.Button_Height=36;flipbookMM_toolbar_bar_AutoLayout.Button_margin_X=9;flipbookMM_toolbar_bar_AutoLayout.Button_margin_Y=7;format_svg_SVGData.mStyleSplit=new EReg(";","g");format_svg_SVGData.mStyleValue=new EReg("\\s*(.*)\\s*:\\s*(.*)\\s*","");format_svg_SVGData.mTranslateMatch=new EReg("translate\\((.*)[, ](.*)\\)","");format_svg_SVGData.mScaleMatch=new EReg("scale\\((.*)\\)","");format_svg_SVGData.mMatrixMatch=new EReg("matrix\\((.*?)[, ]+(.*?)[, ]+(.*?)[, ]+(.*?)[, ]+(.*?)[, ]+(.*?)\\)","");format_svg_SVGData.mRotationMatch=new EReg("rotate\\(([0-9\\.]+)(\\s+([0-9\\.]+)\\s*[, ]\\s*([0-9\\.]+))?\\)","");format_svg_SVGData.mURLMatch=new EReg("url\\(#(.*)\\)","");format_svg_SVGData.mRGBMatch=new EReg("rgb\\s*\\(\\s*(\\d+)\\s*(%)?\\s*,\\s*(\\d+)\\s*(%)?\\s*,\\s*(\\d+)\\s*(%)?\\s*\\)","");format_svg_SVGData.defaultFill=format_svg_FillType.FillSolid(0);format_svg_SVGRenderer.SQRT2=Math.sqrt(2);haxe_Serializer.USE_CACHE=false;haxe_Serializer.USE_ENUM_INDEX=false;haxe_Serializer.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";haxe_Unserializer.DEFAULT_RESOLVER=new haxe__$Unserializer_DefaultResolver;haxe_Unserializer.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";haxe_crypto_Base64.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";haxe_crypto_Base64.BYTES=haxe_io_Bytes.ofString(haxe_crypto_Base64.CHARS);haxe_io_FPHelper.i64tmp=function(e){var t;var i=new haxe__$Int64__$_$_$Int64(0,0);t=i;return t}(this);haxe_xml_Parser.escapes=function(e){var t;var i=new haxe_ds_StringMap;if(__map_reserved["lt"]!=null){i.setReserved("lt","<")}else{i.h["lt"]="<"}if(__map_reserved["gt"]!=null){i.setReserved("gt",">")}else{i.h["gt"]=">"}if(__map_reserved["amp"]!=null){i.setReserved("amp","&")}else{i.h["amp"]="&"}if(__map_reserved["quot"]!=null){i.setReserved("quot",'"')}else{i.h["quot"]='"'}if(__map_reserved["apos"]!=null){i.setReserved("apos","'")}else{i.h["apos"]="'"}t=i;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";openfl_net_NetStream.__meta__={fields:{speed:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};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__$Vector_IVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$Vector_BoolVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$Vector_FloatVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$Vector_FunctionVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$Vector_IntVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$Vector_ObjectVector.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_Lib.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_agal_AGALConverter.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_agal_AGALConverter.limitedProfile=true;openfl__$internal_formats_agal__$AGALConverter_DestRegister.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_agal_RegisterMap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_agal__$AGALConverter_SamplerRegister.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_agal__$AGALConverter_SourceRegister.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_html_HTMLParser.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_formats_html_HTMLParser.__regexAlign=new EReg("align=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_formats_html_HTMLParser.__regexBreakTag=new EReg("<br\\s*/?>","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("&quot;","g"),new EReg("&apos;","g"),new EReg("&amp;","g"),new EReg("&lt;","g"),new EReg("&gt;","g"),new EReg("&nbsp;","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.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{resolveClass:{SuppressWarnings:["checkstyle:Dynamic"]},resolveEnum:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_formats_swf_SWFLite.instances=new haxe_ds_StringMap;openfl__$internal_formats_swf_SWFLiteLibrary.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_DrawCommandBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_DrawCommandBuffer.empty=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_DrawCommandReader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_SamplerState.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_ShaderBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_canvas_CanvasGraphics.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands=new openfl__$internal_renderer_DrawCommandBuffer;openfl__$internal_renderer_canvas_CanvasTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_canvas_CanvasVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DBitmap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DBuffer.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_BitmapData.__meta__={fields:{image:{SuppressWarnings:["checkstyle:Dynamic"]},__framebufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__indexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__surface:{SuppressWarnings:["checkstyle:Dynamic"]},__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__vertexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_BitmapData.VERTEX_BUFFER_STRIDE=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.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};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.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};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_display_Shader.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_renderer_context3D_Context3DMaskShader.opaqueBitmapData=new openfl_display_BitmapData(1,1,false,0);openfl__$internal_renderer_context3D_Context3DShape.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DState.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_context3D_Context3DVideo.__textureSizeValue=[0,0];openfl__$internal_renderer_dom_DOMBitmap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMDisplayObject.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMShape.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_renderer_dom_DOMTextField.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};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("<font ([^>]+)>","gi");openfl__$internal_renderer_dom_DOMTextField.__regexCloseFont=new EReg("</font>","gi");openfl__$internal_renderer_dom_DOMTextField.__regexSize=new EReg("size=(\"([^\"]+)\"|'([^']+)')","i");openfl__$internal_renderer_dom_DOMVideo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_text_TextEngine.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_text_TextLayoutGroup.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl__$internal_utils_TouchData.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl__$internal_utils_TouchData.__pool=new lime_utils_ObjectPool(function(){return new openfl__$internal_utils_TouchData},function(e){e.reset()});openfl_display_Application.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_DisplayObjectRenderer.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_CanvasRenderer.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_DOMRenderer.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_Loader.__meta__={fields:{BitmapData_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_LoaderInfo.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_LoaderInfo.__rootURL=typeof window!="undefined"?window.document.URL:"";openfl_display_OpenGLRenderer.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]}}};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_display_Preloader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_DefaultPreloader.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display_ShaderInput.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_display_ShaderParameter.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_display_Stage.__meta__={fields:{__broadcastEvent:{SuppressWarnings:["checkstyle:Dynamic"]},__dispatchEvent:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchStack:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchTarget:{SuppressWarnings:["checkstyle:Dynamic"]},__handleError:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display_Window.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display3D_Context3D.__glDepthStencil=-1;openfl_display3D_Context3D.__glMaxTextureMaxAnisotropy=-1;openfl_display3D_Context3D.__glMaxViewportDims=-1;openfl_display3D_Context3D.__glTextureMaxAnisotropy=-1;openfl_display3D_Uniform.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display3D_UniformMap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_display3D_textures_TextureBase.__meta__={fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};openfl_display3D_textures_Texture.__lowMemoryMode=false;openfl_events__$EventDispatcher_DispatchIterator.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_events__$EventDispatcher_Listener.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_events_KeyboardEvent.KEY_DOWN="keyDown";openfl_events_KeyboardEvent.KEY_UP="keyUp";openfl_events_MouseEvent.__pool=new lime_utils_ObjectPool(null,null,20);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.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};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_SoundTransform.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};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_text_TextFormat.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};openfl_ui_GameInput.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};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.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};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__$AGALMiniAssembler_OpCode.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils__$AGALMiniAssembler_Register.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils__$AGALMiniAssembler_Sampler.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils_Assets.cache=new openfl_utils_AssetCache;openfl_utils_ByteArrayData.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};openfl_utils_ByteArrayData.defaultObjectEncoding=10;openfl_utils__$Object_Object_$Impl_$.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};haxe_lang_Iterator.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};haxe_lang_Iterable.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};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)};$hx_exports.lime=$hx_exports.lime||{};$hx_exports.lime.$scripts=$hx_exports.lime.$scripts||{};$hx_exports.lime.$scripts["flipbookMobile"]=$hx_script;$hx_exports.lime.embed=function(e){var t={};$hx_exports.lime.$scripts[e](t,$global);for(var i in t)$hx_exports[i]=$hx_exports[i]||t[i];t.lime.embed.apply(t.lime,arguments);return t}})(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);!function(){"use strict";var e=function(){this.init()};e.prototype={init:function(){var e=this||y;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||y;if(e=parseFloat(e),t.ctx||c(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,y.ctx.currentTime);for(var i=0;i<t._howls.length;i++)if(!t._howls[i]._webAudio)for(var s=t._howls[i]._getSoundIds(),a=0;a<s.length;a++){var r=t._howls[i]._soundById(s[a]);r&&r._node&&(r._node.volume=r._volume*e)}return t}return t._volume},mute:function(e){var t=this||y;t.ctx||c(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,y.ctx.currentTime);for(var i=0;i<t._howls.length;i++)if(!t._howls[i]._webAudio)for(var s=t._howls[i]._getSoundIds(),a=0;a<s.length;a++){var r=t._howls[i]._soundById(s[a]);r&&r._node&&(r._node.muted=!!e||r._muted)}return t},unload:function(){for(var e=this||y,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,c()),e},codecs:function(e){return(this||y)._codecs[e.replace(/^x-/,"")]},_setup:function(){var t=this||y;if(t.state=t.ctx?t.ctx.state||"suspended":"suspended",t._autoSuspend(),!t.usingWebAudio)if("undefined"!=typeof Audio)try{var e=new Audio;void 0===e.oncanplaythrough&&(t._canPlayEvent="canplay")}catch(e){t.noAudio=!0}else t.noAudio=!0;try{var e=new Audio;e.muted&&(t.noAudio=!0)}catch(t){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||y,e=null;try{e="undefined"!=typeof Audio?new Audio:null}catch(e){return t}if(!e||"function"!=typeof e.canPlayType)return t;var i=e.canPlayType("audio/mpeg;").replace(/^no$/,""),s=t._navigator&&t._navigator.userAgent.match(/OPR\/([0-6].)/g),a=s&&parseInt(s[0].split("/")[1],10)<33;return t._codecs={mp3:!(a||!i&&!e.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!i,opus:!!e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!e.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!e.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(e.canPlayType("audio/x-mp4;")||e.canPlayType("audio/mp4;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(e.canPlayType("audio/x-flac;")||e.canPlayType("audio/flac;")).replace(/^no$/,"")},t},_unlockAudio:function(){var _=this||y,e=/iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome|Safari/i.test(_._navigator&&_._navigator.userAgent);if(!_._audioUnlocked&&_.ctx&&e){_._audioUnlocked=!1,_.autoUnlock=!1,_._mobileUnloaded||44100===_.ctx.sampleRate||(_._mobileUnloaded=!0,_.unload()),_._scratchBuffer=_.ctx.createBuffer(1,1,22050);var o=function(e){for(var t=0;t<_.html5PoolSize;t++){var i=new Audio;i._unlocked=!0,_._releaseHtml5Audio(i)}for(var t=0;t<_._howls.length;t++)if(!_._howls[t]._webAudio)for(var s=_._howls[t]._getSoundIds(),a=0;a<s.length;a++){var r=_._howls[t]._soundById(s[a]);r&&r._node&&!r._node._unlocked&&(r._node._unlocked=!0,r._node.load())}_._autoResume();var n=_.ctx.createBufferSource();n.buffer=_._scratchBuffer,n.connect(_.ctx.destination),void 0===n.start?n.noteOn(0):n.start(0),"function"==typeof _.ctx.resume&&_.ctx.resume(),n.onended=function(){n.disconnect(0),_._audioUnlocked=!0,document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",o,!0),document.removeEventListener("click",o,!0);for(var e=0;e<_._howls.length;e++)_._howls[e]._emit("unlock")}};return document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",o,!0),document.addEventListener("click",o,!0),_}},_obtainHtml5Audio:function(){var e=this||y;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(e){var t=this||y;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&y.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio)for(var i=0;i<e._howls[t]._sounds.length;i++)if(!e._howls[t]._sounds[i]._paused)return e;return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){e.autoSuspend&&(e._suspendTimer=null,e.state="suspending",e.ctx.suspend().then(function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())}))},3e4),e}},_autoResume:function(){var t=this;if(t.ctx&&void 0!==t.ctx.resume&&y.usingWebAudio)return"running"===t.state&&t._suspendTimer?(clearTimeout(t._suspendTimer),t._suspendTimer=null):"suspended"===t.state?(t.ctx.resume().then(function(){t.state="running";for(var e=0;e<t._howls.length;e++)t._howls[e]._emit("resume")}),t._suspendTimer&&(clearTimeout(t._suspendTimer),t._suspendTimer=null)):"suspending"===t.state&&(t._resumeAfterSuspend=!0),t}};var y=new e,t=function(e){var t=this;if(!e.src||0===e.src.length)return void console.error("An array of source files must be passed with any new Howl.");t.init(e)};t.prototype={init:function(e){var t=this;return y.ctx||c(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhrWithCredentials=e.xhrWithCredentials||!1,t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=y.usingWebAudio&&!t._html5,void 0!==y.ctx&&y.ctx&&y.autoUnlock&&y._unlockAudio(),y._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&t.load(),t},load:function(){var e=this,t=null;if(y.noAudio)return void e._emit("loaderror",null,"No audio support.");"string"==typeof e._src&&(e._src=[e._src]);for(var i=0;i<e._src.length;i++){var s,a;if(e._format&&e._format[i])s=e._format[i];else{if("string"!=typeof(a=e._src[i])){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}s=/^data:audio\/([^;,]+);/i.exec(a),s||(s=/\.([^.]+)$/.exec(a.split("?",1)[0])),s&&(s=s[1].toLowerCase())}if(s||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),s&&y.codecs(s)){t=e._src[i];break}}return t?(e._src=t,e._state="loading","https:"===window.location.protocol&&"http:"===t.slice(0,5)&&(e._html5=!0,e._webAudio=!1),new r(e),e._webAudio&&_(e),e):void e._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(t,i){var s=this,e=null;if("number"==typeof t)e=t,t=null;else{if("string"==typeof t&&"loaded"===s._state&&!s._sprite[t])return null;if(void 0===t&&(t="__default",!s._playLock)){for(var a=0,r=0;r<s._sounds.length;r++)s._sounds[r]._paused&&!s._sounds[r]._ended&&(a++,e=s._sounds[r]._id);1===a?t=null:e=null}}var n=e?s._soundById(e):s._inactiveSound();if(!n)return null;if(e&&!t&&(t=n._sprite||"__default"),"loaded"!==s._state){n._sprite=t,n._ended=!1;var _=n._id;return s._queue.push({event:"play",action:function(){s.play(_)}}),_}if(e&&!n._paused)return i||s._loadQueue("play"),n._id;s._webAudio&&y._autoResume();var o=Math.max(0,n._seek>0?n._seek:s._sprite[t][0]/1e3),l=Math.max(0,(s._sprite[t][0]+s._sprite[t][1])/1e3-o),h=1e3*l/Math.abs(n._rate),c=s._sprite[t][0]/1e3,u=(s._sprite[t][0]+s._sprite[t][1])/1e3,f=!(!n._loop&&!s._sprite[t][2]);n._sprite=t,n._ended=!1;var p=function(){n._paused=!1,n._seek=o,n._start=c,n._stop=u,n._loop=f};if(o>=u)return void s._ended(n);var d=n._node;if(s._webAudio){var g=function(){s._playLock=!1,p(),s._refreshBuffer(n);var e=n._muted||s._muted?0:n._volume;d.gain.setValueAtTime(e,y.ctx.currentTime),n._playStart=y.ctx.currentTime,void 0===d.bufferSource.start?n._loop?d.bufferSource.noteGrainOn(0,o,86400):d.bufferSource.noteGrainOn(0,o,l):n._loop?d.bufferSource.start(0,o,86400):d.bufferSource.start(0,o,l),h!==1/0&&(s._endTimers[n._id]=setTimeout(s._ended.bind(s,n),h)),i||setTimeout(function(){s._emit("play",n._id),s._loadQueue()},0)};"running"===y.state?g():(s._playLock=!0,s.once("resume",g),s._clearTimer(n._id))}else{var m=function(){d.currentTime=o,d.muted=n._muted||s._muted||y._muted||d.muted,d.volume=n._volume*y.volume(),d.playbackRate=n._rate;try{var e=d.play();if(e&&"undefined"!=typeof Promise&&(e instanceof Promise||"function"==typeof e.then)?(s._playLock=!0,p(),e.then(function(){s._playLock=!1,d._unlocked=!0,i||(s._emit("play",n._id),s._loadQueue())}).catch(function(){s._playLock=!1,s._emit("playerror",n._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),n._ended=!0,n._paused=!0})):i||(s._playLock=!1,p(),s._emit("play",n._id),s._loadQueue()),d.playbackRate=n._rate,d.paused)return void s._emit("playerror",n._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==t||n._loop?s._endTimers[n._id]=setTimeout(s._ended.bind(s,n),h):(s._endTimers[n._id]=function(){s._ended(n),d.removeEventListener("ended",s._endTimers[n._id],!1)},d.addEventListener("ended",s._endTimers[n._id],!1))}catch(e){s._emit("playerror",n._id,e)}},v=window&&window.ejecta||!d.readyState&&y._navigator.isCocoonJS;if(d.readyState>=3||v)m();else{s._playLock=!0;var b=function(){m(),d.removeEventListener(y._canPlayEvent,b,!1)};d.addEventListener(y._canPlayEvent,b,!1),s._clearTimer(n._id)}}return n._id},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var i=t._getSoundIds(e),s=0;s<i.length;s++){t._clearTimer(i[s]);var a=t._soundById(i[s]);if(a&&!a._paused&&(a._seek=t.seek(i[s]),a._rateSeek=0,a._paused=!0,t._stopFade(i[s]),a._node))if(t._webAudio){if(!a._node.bufferSource)continue;void 0===a._node.bufferSource.stop?a._node.bufferSource.noteOff(0):a._node.bufferSource.stop(0),t._cleanBuffer(a._node)}else isNaN(a._node.duration)&&a._node.duration!==1/0||a._node.pause();arguments[1]||t._emit("pause",a?a._id:null)}return t},stop:function(e,t){var i=this;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"stop",action:function(){i.stop(e)}}),i;for(var s=i._getSoundIds(e),a=0;a<s.length;a++){i._clearTimer(s[a]);var r=i._soundById(s[a]);r&&(r._seek=r._start||0,r._rateSeek=0,r._paused=!0,r._ended=!0,i._stopFade(s[a]),r._node&&(i._webAudio?r._node.bufferSource&&(void 0===r._node.bufferSource.stop?r._node.bufferSource.noteOff(0):r._node.bufferSource.stop(0),i._cleanBuffer(r._node)):isNaN(r._node.duration)&&r._node.duration!==1/0||(r._node.currentTime=r._start||0,r._node.pause())),t||i._emit("stop",r._id))}return i},mute:function(e,t){var i=this;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"mute",action:function(){i.mute(e,t)}}),i;if(void 0===t){if("boolean"!=typeof e)return i._muted;i._muted=e}for(var s=i._getSoundIds(t),a=0;a<s.length;a++){var r=i._soundById(s[a]);r&&(r._muted=e,r._interval&&i._stopFade(r._id),i._webAudio&&r._node?r._node.gain.setValueAtTime(e?0:r._volume,y.ctx.currentTime):r._node&&(r._node.muted=!!y._muted||e),i._emit("mute",r._id))}return i},volume:function(){var e,t,i=this,s=arguments;if(0===s.length)return i._volume;if(1===s.length||2===s.length&&void 0===s[1]){i._getSoundIds().indexOf(s[0])>=0?t=parseInt(s[0],10):e=parseFloat(s[0])}else s.length>=2&&(e=parseFloat(s[0]),t=parseInt(s[1],10));var a;if(!(void 0!==e&&e>=0&&e<=1))return a=t?i._soundById(t):i._sounds[0],a?a._volume:0;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"volume",action:function(){i.volume.apply(i,s)}}),i;void 0===t&&(i._volume=e),t=i._getSoundIds(t);for(var r=0;r<t.length;r++)(a=i._soundById(t[r]))&&(a._volume=e,s[2]||i._stopFade(t[r]),i._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(e,y.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=e*y.volume()),i._emit("volume",a._id));return i},fade:function(e,t,i,s){var a=this;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"fade",action:function(){a.fade(e,t,i,s)}}),a;e=parseFloat(e),t=parseFloat(t),i=parseFloat(i),a.volume(e,s);for(var r=a._getSoundIds(s),n=0;n<r.length;n++){var _=a._soundById(r[n]);if(_){if(s||a._stopFade(r[n]),a._webAudio&&!_._muted){var o=y.ctx.currentTime,l=o+i/1e3;_._volume=e,_._node.gain.setValueAtTime(e,o),_._node.gain.linearRampToValueAtTime(t,l)}a._startFadeInterval(_,e,t,i,r[n],void 0===s)}}return a},_startFadeInterval:function(t,i,s,a,e,r){var n=this,_=i,o=s-i,l=Math.abs(o/.01),h=Math.max(4,l>0?a/l:a),c=Date.now();t._fadeTo=s,t._interval=setInterval(function(){var e=(Date.now()-c)/a;c=Date.now(),_+=o*e,_=Math.max(0,_),_=Math.min(1,_),_=Math.round(100*_)/100,n._webAudio?t._volume=_:n.volume(_,t._id,!0),r&&(n._volume=_),(s<i&&_<=s||s>i&&_>=s)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,n.volume(s,t._id),n._emit("fade",t._id))},h)},_stopFade:function(e){var t=this,i=t._soundById(e);return i&&i._interval&&(t._webAudio&&i._node.gain.cancelScheduledValues(y.ctx.currentTime),clearInterval(i._interval),i._interval=null,t.volume(i._fadeTo,e),i._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,i,s=this,a=arguments;if(0===a.length)return s._loop;if(1===a.length){if("boolean"!=typeof a[0])return!!(i=s._soundById(parseInt(a[0],10)))&&i._loop;e=a[0],s._loop=e}else 2===a.length&&(e=a[0],t=parseInt(a[1],10));for(var r=s._getSoundIds(t),n=0;n<r.length;n++)(i=s._soundById(r[n]))&&(i._loop=e,s._webAudio&&i._node&&i._node.bufferSource&&(i._node.bufferSource.loop=e,e&&(i._node.bufferSource.loopStart=i._start||0,i._node.bufferSource.loopEnd=i._stop)));return s},rate:function(){var e,t,i=this,s=arguments;if(0===s.length)t=i._sounds[0]._id;else if(1===s.length){var a=i._getSoundIds(),r=a.indexOf(s[0]);r>=0?t=parseInt(s[0],10):e=parseFloat(s[0])}else 2===s.length&&(e=parseFloat(s[0]),t=parseInt(s[1],10));var n;if("number"!=typeof e)return n=i._soundById(t),n?n._rate:i._rate;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"rate",action:function(){i.rate.apply(i,s)}}),i;void 0===t&&(i._rate=e),t=i._getSoundIds(t);for(var _=0;_<t.length;_++)if(n=i._soundById(t[_])){i.playing(t[_])&&(n._rateSeek=i.seek(t[_]),n._playStart=i._webAudio?y.ctx.currentTime:n._playStart),n._rate=e,i._webAudio&&n._node&&n._node.bufferSource?n._node.bufferSource.playbackRate.setValueAtTime(e,y.ctx.currentTime):n._node&&(n._node.playbackRate=e);var o=i.seek(t[_]),l=(i._sprite[n._sprite][0]+i._sprite[n._sprite][1])/1e3-o,h=1e3*l/Math.abs(n._rate);!i._endTimers[t[_]]&&n._paused||(i._clearTimer(t[_]),i._endTimers[t[_]]=setTimeout(i._ended.bind(i,n),h)),i._emit("rate",n._id)}return i},seek:function(){var e,t,i=this,s=arguments;if(0===s.length)t=i._sounds[0]._id;else if(1===s.length){var a=i._getSoundIds(),r=a.indexOf(s[0]);r>=0?t=parseInt(s[0],10):i._sounds.length&&(t=i._sounds[0]._id,e=parseFloat(s[0]))}else 2===s.length&&(e=parseFloat(s[0]),t=parseInt(s[1],10));if(void 0===t)return i;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"seek",action:function(){i.seek.apply(i,s)}}),i;var n=i._soundById(t);if(n){if(!("number"==typeof e&&e>=0)){if(i._webAudio){var _=i.playing(t)?y.ctx.currentTime-n._playStart:0,o=n._rateSeek?n._rateSeek-n._seek:0;return n._seek+(o+_*Math.abs(n._rate))}return n._node.currentTime}var l=i.playing(t);l&&i.pause(t,!0),n._seek=e,n._ended=!1,i._clearTimer(t),i._webAudio||!n._node||isNaN(n._node.duration)||(n._node.currentTime=e);var h=function(){i._emit("seek",t),l&&i.play(t,!0)};if(l&&!i._webAudio){var c=function(){i._playLock?setTimeout(c,0):h()};setTimeout(c,0)}else h()}return i},playing:function(e){var t=this;if("number"==typeof e){var i=t._soundById(e);return!!i&&!i._paused}for(var s=0;s<t._sounds.length;s++)if(!t._sounds[s]._paused)return!0;return!1},duration:function(e){var t=this,i=t._duration,s=t._soundById(e);return s&&(i=t._sprite[s._sprite][1]/1e3),i},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,i=0;i<t.length;i++){if(t[i]._paused||e.stop(t[i]._id),!e._webAudio){/MSIE |Trident\//.test(y._navigator&&y._navigator.userAgent)||(t[i]._node.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"),t[i]._node.removeEventListener("error",t[i]._errorFn,!1),t[i]._node.removeEventListener(y._canPlayEvent,t[i]._loadFn,!1),y._releaseHtml5Audio(t[i]._node)}delete t[i]._node,e._clearTimer(t[i]._id)}var s=y._howls.indexOf(e);s>=0&&y._howls.splice(s,1);var a=!0;for(i=0;i<y._howls.length;i++)if(y._howls[i]._src===e._src||e._src.indexOf(y._howls[i]._src)>=0){a=!1;break}return n&&a&&delete n[e._src],y.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,i,s){var a=this,r=a["_on"+e];return"function"==typeof t&&r.push(s?{id:i,fn:t,once:s}:{id:i,fn:t}),a},off:function(e,t,i){var s=this,a=s["_on"+e],r=0;if("number"==typeof t&&(i=t,t=null),t||i)for(r=0;r<a.length;r++){var n=i===a[r].id;if(t===a[r].fn&&n||!t&&n){a.splice(r,1);break}}else if(e)s["_on"+e]=[];else{var _=Object.keys(s);for(r=0;r<_.length;r++)0===_[r].indexOf("_on")&&Array.isArray(s[_[r]])&&(s[_[r]]=[])}return s},once:function(e,t,i){var s=this;return s.on(e,t,i,1),s},_emit:function(e,t,i){for(var s=this,a=s["_on"+e],r=a.length-1;r>=0;r--)a[r].id&&a[r].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,i)}.bind(s,a[r].fn),0),a[r].once&&s.off(e,a[r].fn,a[r].id));return s._loadQueue(e),s},_loadQueue:function(e){var t=this;if(t._queue.length>0){var i=t._queue[0];i.event===e&&(t._queue.shift(),t._loadQueue()),e||i.action()}return t},_ended:function(e){var t=this,i=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var s=!(!e._loop&&!t._sprite[i][2]);if(t._emit("end",e._id),!t._webAudio&&s&&t.stop(e._id,!0).play(e._id),t._webAudio&&s){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=y.ctx.currentTime;var a=1e3*(e._stop-e._start)/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),a)}return t._webAudio&&!s&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),y._autoSuspend()),t._webAudio||s||t.stop(e._id,!0),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if("function"!=typeof t._endTimers[e])clearTimeout(t._endTimers[e]);else{var i=t._soundById(e);i&&i._node&&i._node.removeEventListener("ended",t._endTimers[e],!1)}delete t._endTimers[e]}return t},_soundById:function(e){for(var t=this,i=0;i<t._sounds.length;i++)if(e===t._sounds[i]._id)return t._sounds[i];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new r(e)},_drain:function(){var e=this,t=e._pool,i=0,s=0;if(!(e._sounds.length<t)){for(s=0;s<e._sounds.length;s++)e._sounds[s]._ended&&i++;for(s=e._sounds.length-1;s>=0;s--){if(i<=t)return;e._sounds[s]._ended&&(e._webAudio&&e._sounds[s]._node&&e._sounds[s]._node.disconnect(0),e._sounds.splice(s,1),i--)}}},_getSoundIds:function(e){var t=this;if(void 0===e){for(var i=[],s=0;s<t._sounds.length;s++)i.push(t._sounds[s]._id);return i}return[e]},_refreshBuffer:function(e){var t=this;return e._node.bufferSource=y.ctx.createBufferSource(),e._node.bufferSource.buffer=n[t._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,y.ctx.currentTime),t},_cleanBuffer:function(e){var t=this,i=y._navigator&&y._navigator.vendor.indexOf("Apple")>=0;if(y._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),i))try{e.bufferSource.buffer=y._scratchBuffer}catch(e){}return e.bufferSource=null,t}};var r=function(e){this._parent=e,this.init()};r.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++y._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,i=y._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),e._node.gain.setValueAtTime(i,y.ctx.currentTime),e._node.paused=!0,e._node.connect(y.masterGain)):(e._node=y._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(y._canPlayEvent,e._loadFn,!1),e._node.src=t._src,e._node.preload="auto",e._node.volume=i*y.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++y._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(y._canPlayEvent,e._loadFn,!1)}};var n={},_=function(t){var e=t._src;if(n[e])return t._duration=n[e].duration,void h(t);if(/^data:[^;]+;base64,/.test(e)){for(var i=atob(e.split(",")[1]),s=new Uint8Array(i.length),a=0;a<i.length;++a)s[a]=i.charCodeAt(a);l(s.buffer,t)}else{var r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=t._xhrWithCredentials,r.responseType="arraybuffer",r.onload=function(){var e=(r.status+"")[0];if("0"!==e&&"2"!==e&&"3"!==e)return void t._emit("loaderror",null,"Failed loading audio file with status: "+r.status+".");l(r.response,t)},r.onerror=function(){t._webAudio&&(t._html5=!0,t._webAudio=!1,t._sounds=[],delete n[e],t.load())},o(r)}},o=function(t){try{t.send()}catch(e){t.onerror()}},l=function(e,t){var i=function(){t._emit("loaderror",null,"Decoding audio data failed.")},s=function(e){e&&t._sounds.length>0?(n[t._src]=e,h(t,e)):i()};"undefined"!=typeof Promise&&1===y.ctx.decodeAudioData.length?y.ctx.decodeAudioData(e).then(s).catch(i):y.ctx.decodeAudioData(e,s,i)},h=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},c=function(){if(y.usingWebAudio){try{"undefined"!=typeof AudioContext?y.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?y.ctx=new webkitAudioContext:y.usingWebAudio=!1}catch(e){y.usingWebAudio=!1}y.ctx||(y.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(y._navigator&&y._navigator.platform),t=y._navigator&&y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),i=t?parseInt(t[1],10):null;if(e&&i&&i<9){var s=/safari/.test(y._navigator&&y._navigator.userAgent.toLowerCase());(y._navigator&&y._navigator.standalone&&!s||y._navigator&&!y._navigator.standalone&&!s)&&(y.usingWebAudio=!1)}y.usingWebAudio&&(y.masterGain=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),y.masterGain.gain.setValueAtTime(y._muted?0:1,y.ctx.currentTime),y.masterGain.connect(y.ctx.destination)),y._setup()}};"function"==typeof define&&define.amd&&define([],function(){return{Howler:y,Howl:t}}),"undefined"!=typeof exports&&(exports.Howler=y,exports.Howl=t),"undefined"!=typeof window?(window.HowlerGlobal=e,window.Howler=y,window.Howl=t,window.Sound=r):"undefined"!=typeof global&&(global.HowlerGlobal=e,global.Howler=y,global.Howl=t,global.Sound=r)}();!function(){"use strict";HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var i=t._howls.length-1;i>=0;i--)t._howls[i].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,i){var s=this;return s.ctx&&s.ctx.listener?(t="number"!=typeof t?s._pos[1]:t,i="number"!=typeof i?s._pos[2]:i,"number"!=typeof e?s._pos:(s._pos=[e,t,i],void 0!==s.ctx.listener.positionX?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]),s)):s},HowlerGlobal.prototype.orientation=function(e,t,i,s,a,r){var n=this;if(!n.ctx||!n.ctx.listener)return n;var _=n._orientation;return t="number"!=typeof t?_[1]:t,i="number"!=typeof i?_[2]:i,s="number"!=typeof s?_[3]:s,a="number"!=typeof a?_[4]:a,r="number"!=typeof r?_[5]:r,"number"!=typeof e?_:(n._orientation=[e,t,i,s,a,r],void 0!==n.ctx.listener.forwardX?(n.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),n.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),n.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),n.ctx.listener.upX.setTargetAtTime(e,Howler.ctx.currentTime,.1),n.ctx.listener.upY.setTargetAtTime(t,Howler.ctx.currentTime,.1),n.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):n.ctx.listener.setOrientation(e,t,i,s,a,r),n)},Howl.prototype.init=function(i){return function(e){var t=this;return t._orientation=e.orientation||[1,0,0],t._stereo=e.stereo||null,t._pos=e.pos||null,t._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},t._onstereo=e.onstereo?[{fn:e.onstereo}]:[],t._onpos=e.onpos?[{fn:e.onpos}]:[],t._onorientation=e.onorientation?[{fn:e.onorientation}]:[],i.call(this,e)}}(Howl.prototype.init),Howl.prototype.stereo=function(e,t){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"stereo",action:function(){i.stereo(e,t)}}),i;var s=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===t){if("number"!=typeof e)return i._stereo;i._stereo=e,i._pos=[e,0,0]}for(var a=i._getSoundIds(t),r=0;r<a.length;r++){var n=i._soundById(a[r]);if(n){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0],n._node&&(n._pannerAttr.panningModel="equalpower",n._panner&&n._panner.pan||l(n,s),"spatial"===s?void 0!==n._panner.positionX?(n._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),n._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),n._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):n._panner.setPosition(e,0,0):n._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),i._emit("stereo",n._id)}}return i},Howl.prototype.pos=function(e,t,i,s){var a=this;if(!a._webAudio)return a;if("loaded"!==a._state)return a._queue.push({event:"pos",action:function(){a.pos(e,t,i,s)}}),a;if(t="number"!=typeof t?0:t,i="number"!=typeof i?-.5:i,void 0===s){if("number"!=typeof e)return a._pos;a._pos=[e,t,i]}for(var r=a._getSoundIds(s),n=0;n<r.length;n++){var _=a._soundById(r[n]);if(_){if("number"!=typeof e)return _._pos;_._pos=[e,t,i],_._node&&(_._panner&&!_._panner.pan||l(_,"spatial"),void 0!==_._panner.positionX?(_._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),_._panner.positionY.setValueAtTime(t,Howler.ctx.currentTime),_._panner.positionZ.setValueAtTime(i,Howler.ctx.currentTime)):_._panner.setPosition(e,t,i)),a._emit("pos",_._id)}}return a},Howl.prototype.orientation=function(e,t,i,s){var a=this;if(!a._webAudio)return a;if("loaded"!==a._state)return a._queue.push({event:"orientation",action:function(){a.orientation(e,t,i,s)}}),a;if(t="number"!=typeof t?a._orientation[1]:t,i="number"!=typeof i?a._orientation[2]:i,void 0===s){if("number"!=typeof e)return a._orientation;a._orientation=[e,t,i]}for(var r=a._getSoundIds(s),n=0;n<r.length;n++){var _=a._soundById(r[n]);if(_){if("number"!=typeof e)return _._orientation;_._orientation=[e,t,i],_._node&&(_._panner||(_._pos||(_._pos=a._pos||[0,0,-.5]),l(_,"spatial")),void 0!==_._panner.orientationX?(_._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),_._panner.orientationY.setValueAtTime(t,Howler.ctx.currentTime),_._panner.orientationZ.setValueAtTime(i,Howler.ctx.currentTime)):_._panner.setOrientation(e,t,i)),a._emit("orientation",_._id)}}return a},Howl.prototype.pannerAttr=function(){var e,t,i,s=this,a=arguments;if(!s._webAudio)return s;if(0===a.length)return s._pannerAttr;if(1===a.length){if("object"!=typeof a[0])return i=s._soundById(parseInt(a[0],10)),i?i._pannerAttr:s._pannerAttr;e=a[0],void 0===t&&(e.pannerAttr||(e.pannerAttr={coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor,panningModel:e.panningModel}),s._pannerAttr={coneInnerAngle:void 0!==e.pannerAttr.coneInnerAngle?e.pannerAttr.coneInnerAngle:s._coneInnerAngle,coneOuterAngle:void 0!==e.pannerAttr.coneOuterAngle?e.pannerAttr.coneOuterAngle:s._coneOuterAngle,coneOuterGain:void 0!==e.pannerAttr.coneOuterGain?e.pannerAttr.coneOuterGain:s._coneOuterGain,distanceModel:void 0!==e.pannerAttr.distanceModel?e.pannerAttr.distanceModel:s._distanceModel,maxDistance:void 0!==e.pannerAttr.maxDistance?e.pannerAttr.maxDistance:s._maxDistance,refDistance:void 0!==e.pannerAttr.refDistance?e.pannerAttr.refDistance:s._refDistance,rolloffFactor:void 0!==e.pannerAttr.rolloffFactor?e.pannerAttr.rolloffFactor:s._rolloffFactor,panningModel:void 0!==e.pannerAttr.panningModel?e.pannerAttr.panningModel:s._panningModel})}else 2===a.length&&(e=a[0],t=parseInt(a[1],10));for(var r=s._getSoundIds(t),n=0;n<r.length;n++)if(i=s._soundById(r[n])){var _=i._pannerAttr;_={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:_.coneInnerAngle,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:_.coneOuterAngle,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:_.coneOuterGain,distanceModel:void 0!==e.distanceModel?e.distanceModel:_.distanceModel,maxDistance:void 0!==e.maxDistance?e.maxDistance:_.maxDistance,refDistance:void 0!==e.refDistance?e.refDistance:_.refDistance,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:_.rolloffFactor,panningModel:void 0!==e.panningModel?e.panningModel:_.panningModel};var o=i._panner;o?(o.coneInnerAngle=_.coneInnerAngle,o.coneOuterAngle=_.coneOuterAngle,o.coneOuterGain=_.coneOuterGain,o.distanceModel=_.distanceModel,o.maxDistance=_.maxDistance,o.refDistance=_.refDistance,o.rolloffFactor=_.rolloffFactor,o.panningModel=_.panningModel):(i._pos||(i._pos=s._pos||[0,0,-.5]),l(i,"spatial"))}return s},Sound.prototype.init=function(i){return function(){var e=this,t=e._parent;e._orientation=t._orientation,e._stereo=t._stereo,e._pos=t._pos,e._pannerAttr=t._pannerAttr,i.call(this),e._stereo?t.stereo(e._stereo):e._pos&&t.pos(e._pos[0],e._pos[1],e._pos[2],e._id)}}(Sound.prototype.init),Sound.prototype.reset=function(i){return function(){var e=this,t=e._parent;return e._orientation=t._orientation,e._stereo=t._stereo,e._pos=t._pos,e._pannerAttr=t._pannerAttr,e._stereo?t.stereo(e._stereo):e._pos?t.pos(e._pos[0],e._pos[1],e._pos[2],e._id):e._panner&&(e._panner.disconnect(0),e._panner=void 0,t._refreshBuffer(e)),i.call(this)}}(Sound.prototype.reset);var l=function(e,t){t=t||"spatial","spatial"===t?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}();!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pako=e()}}(function(){return function r(n,_,o){function l(i,e){if(!_[i]){if(!n[i]){var t="function"==typeof require&&require;if(!e&&t)return t(i,!0);if(h)return h(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var a=_[i]={exports:{}};n[i][0].call(a.exports,function(e){var t=n[i][1][e];return l(t?t:e)},a,a.exports,r,n,_,o)}return _[i].exports}for(var h="function"==typeof require&&require,e=0;e<o.length;e++)l(o[e]);return l}({1:[function(e,t,i){"use strict";function a(e){if(!(this instanceof a))return new a(e);this.options=o.assign({level:v,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var i=_.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==d)throw new Error(h[i]);if(t.header&&_.deflateSetHeader(this.strm,t.header),t.dictionary){var s;if(s="string"==typeof t.dictionary?l.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=_.deflateSetDictionary(this.strm,s),i!==d)throw new Error(h[i]);this._dict_set=!0}}function s(e,t){var i=new a(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,s(e,t)}function n(e,t){return t=t||{},t.gzip=!0,s(e,t)}var _=e("./zlib/deflate"),o=e("./utils/common"),l=e("./utils/strings"),h=e("./zlib/messages"),c=e("./zlib/zstream"),u=Object.prototype.toString,f=0,p=4,d=0,g=1,m=2,v=-1,b=0,y=8;a.prototype.push=function(e,t){var i,s,a=this.strm,r=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:t===!0?p:f,"string"==typeof e?a.input=l.string2buf(e):"[object ArrayBuffer]"===u.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new o.Buf8(r),a.next_out=0,a.avail_out=r),i=_.deflate(a,s),i!==g&&i!==d)return this.onEnd(i),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||s!==p&&s!==m)||("string"===this.options.to?this.onData(l.buf2binstring(o.shrinkBuf(a.output,a.next_out))):this.onData(o.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&i!==g);return s===p?(i=_.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===d):s!==m||(this.onEnd(d),a.avail_out=0,!0)},a.prototype.onData=function(e){this.chunks.push(e)},a.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Deflate=a,i.deflate=s,i.deflateRaw=r,i.gzip=n},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(e,t,i){"use strict";function s(e){if(!(this instanceof s))return new s(e);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var i=u.inflateInit2(this.strm,t.windowBits);if(i!==d.Z_OK)throw new Error(n[i]);this.header=new o,u.inflateGetHeader(this.strm,this.header)}function a(e,t){var i=new s(t);if(i.push(e,!0),i.err)throw i.msg;return i.result}function r(e,t){return t=t||{},t.raw=!0,a(e,t)}var u=e("./zlib/inflate"),f=e("./utils/common"),p=e("./utils/strings"),d=e("./zlib/constants"),n=e("./zlib/messages"),_=e("./zlib/zstream"),o=e("./zlib/gzheader"),g=Object.prototype.toString;s.prototype.push=function(e,t){var i,s,a,r,n,_,o=this.strm,l=this.options.chunkSize,h=this.options.dictionary,c=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?d.Z_FINISH:d.Z_NO_FLUSH,"string"==typeof e?o.input=p.binstring2buf(e):"[object ArrayBuffer]"===g.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new f.Buf8(l),o.next_out=0,o.avail_out=l),i=u.inflate(o,d.Z_NO_FLUSH),i===d.Z_NEED_DICT&&h&&(_="string"==typeof h?p.string2buf(h):"[object ArrayBuffer]"===g.call(h)?new Uint8Array(h):h,i=u.inflateSetDictionary(this.strm,_)),i===d.Z_BUF_ERROR&&c===!0&&(i=d.Z_OK,c=!1),i!==d.Z_STREAM_END&&i!==d.Z_OK)return this.onEnd(i),this.ended=!0,!1;o.next_out&&(0!==o.avail_out&&i!==d.Z_STREAM_END&&(0!==o.avail_in||s!==d.Z_FINISH&&s!==d.Z_SYNC_FLUSH)||("string"===this.options.to?(a=p.utf8border(o.output,o.next_out),r=o.next_out-a,n=p.buf2string(o.output,a),o.next_out=r,o.avail_out=l-r,r&&f.arraySet(o.output,o.output,a,r,0),this.onData(n)):this.onData(f.shrinkBuf(o.output,o.next_out)))),0===o.avail_in&&0===o.avail_out&&(c=!0)}while((o.avail_in>0||0===o.avail_out)&&i!==d.Z_STREAM_END);return i===d.Z_STREAM_END&&(s=d.Z_FINISH),s===d.Z_FINISH?(i=u.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===d.Z_OK):s!==d.Z_SYNC_FLUSH||(this.onEnd(d.Z_OK),o.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){e===d.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=s,i.inflate=a,i.inflateRaw=r,i.ungzip=a},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(e,t,i){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,s,a){if(t.subarray&&e.subarray)return void e.set(t.subarray(i,i+s),a);for(var r=0;r<s;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,s,a,r,n;for(s=0,t=0,i=e.length;t<i;t++)s+=e[t].length;for(n=new Uint8Array(s),a=0,t=0,i=e.length;t<i;t++)r=e[t],n.set(r,a),a+=r.length;return n}},r={arraySet:function(e,t,i,s,a){for(var r=0;r<s;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,r))},i.setTyped(s)},{}],4:[function(e,t,i){"use strict";function o(e,t){if(t<65537&&(e.subarray&&r||!e.subarray&&a))return String.fromCharCode.apply(null,l.shrinkBuf(e,t));for(var i="",s=0;s<t;s++)i+=String.fromCharCode(e[s]);return i}var l=e("./common"),a=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var h=new l.Buf8(256),s=0;s<256;s++)h[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;h[254]=h[254]=1,i.string2buf=function(e){var t,i,s,a,r,n=e.length,_=0;for(a=0;a<n;a++)i=e.charCodeAt(a),55296===(64512&i)&&a+1<n&&(s=e.charCodeAt(a+1),56320===(64512&s)&&(i=65536+(i-55296<<10)+(s-56320),a++)),_+=i<128?1:i<2048?2:i<65536?3:4;for(t=new l.Buf8(_),r=0,a=0;r<_;a++)i=e.charCodeAt(a),55296===(64512&i)&&a+1<n&&(s=e.charCodeAt(a+1),56320===(64512&s)&&(i=65536+(i-55296<<10)+(s-56320),a++)),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},i.buf2binstring=function(e){return o(e,e.length)},i.binstring2buf=function(e){for(var t=new l.Buf8(e.length),i=0,s=t.length;i<s;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,s,a,r,n=t||e.length,_=new Array(2*n);for(s=0,i=0;i<n;)if(a=e[i++],a<128)_[s++]=a;else if(r=h[a],r>4)_[s++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;r>1&&i<n;)a=a<<6|63&e[i++],r--;r>1?_[s++]=65533:a<65536?_[s++]=a:(a-=65536,_[s++]=55296|a>>10&1023,_[s++]=56320|1023&a)}return o(_,s)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return i<0?t:0===i?t:i+h[e[i]]>t?i:t}},{"./common":3}],5:[function(e,t,i){"use strict";function s(e,t,i,s){for(var a=65535&e|0,r=e>>>16&65535|0,n=0;0!==i;){n=i>2e3?2e3:i,i-=n;do{a=a+t[s++]|0,r=r+a|0}while(--n);a%=65521,r%=65521}return a|r<<16|0}t.exports=s},{}],6:[function(e,t,i){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(e,t,i){"use strict";function s(){for(var e,t=[],i=0;i<256;i++){e=i;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,s){var a=_,r=s+i;e^=-1;for(var n=s;n<r;n++)e=e>>>8^a[255&(e^t[n])];return e^-1}var _=s();t.exports=a},{}],8:[function(e,t,i){"use strict";function l(e,t){return e.msg=A[t],t}function h(e){return(e<<1)-(e>4?9:0)}function c(e){for(var t=e.length;--t>=0;)e[t]=0}function u(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(E.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))}function _(e,t){B._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,u(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function o(e,t,i,s){var a=e.avail_in;return a>s&&(a=s),0===a?0:(e.avail_in-=a,E.arraySet(t,e.input,e.next_in,a,i),1===e.state.wrap?e.adler=L(e.adler,t,a,i):2===e.state.wrap&&(e.adler=R(e.adler,t,a,i)),e.next_in+=a,e.total_in+=a,a)}function r(e,t){var i,s,a=e.max_chain_length,r=e.strstart,n=e.prev_length,_=e.nice_match,o=e.strstart>e.w_size-ce?e.strstart-(e.w_size-ce):0,l=e.window,h=e.w_mask,c=e.prev,u=e.strstart+he,f=l[r+n-1],p=l[r+n];e.prev_length>=e.good_match&&(a>>=2),_>e.lookahead&&(_=e.lookahead);do{if(i=t,l[i+n]===p&&l[i+n-1]===f&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<u);if(s=he-(u-r),r=u-he,s>n){if(e.match_start=t,n=s,s>=_)break;f=l[r+n-1],p=l[r+n]}}}while((t=c[t&h])>o&&0!==--a);return n<=e.lookahead?n:e.lookahead}function d(e){var t,i,s,a,r,n=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-ce)){E.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,i=e.hash_size,t=i;do{s=e.head[--t],e.head[t]=s>=n?s-n:0}while(--i);i=n,t=i;do{s=e.prev[--t],e.prev[t]=s>=n?s-n:0}while(--i);a+=n}if(0===e.strm.avail_in)break;if(i=o(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=le)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=(e.ins_h<<e.hash_shift^e.window[r+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[r+le-1])&e.hash_mask,e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<le)););}while(e.lookahead<ce&&0!==e.strm.avail_in)}function s(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(d(e),0===e.lookahead&&t===I)return ye;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var s=e.block_start+i;if((0===e.strstart||e.strstart>=s)&&(e.lookahead=e.strstart-s,e.strstart=s,_(e,!1),0===e.strm.avail_out))return ye;if(e.strstart-e.block_start>=e.w_size-ce&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.strstart>e.block_start&&(_(e,!1),0===e.strm.avail_out)?ye:ye}function a(e,t){for(var i,s;;){if(e.lookahead<ce){if(d(e),e.lookahead<ce&&t===I)return ye;if(0===e.lookahead)break}if(i=0,e.lookahead>=le&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+le-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-ce&&(e.match_length=r(e,i)),e.match_length>=le)if(s=B._tr_tally(e,e.strstart-e.match_start,e.match_length-le),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=le){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+le-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else s=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(s&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=e.strstart<le-1?e.strstart:le-1,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function n(e,t){for(var i,s,a;;){if(e.lookahead<ce){if(d(e),e.lookahead<ce&&t===I)return ye;if(0===e.lookahead)break}if(i=0,e.lookahead>=le&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+le-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=le-1,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-ce&&(e.match_length=r(e,i),e.match_length<=5&&(e.strategy===z||e.match_length===le&&e.strstart-e.match_start>4096)&&(e.match_length=le-1)),e.prev_length>=le&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-le,s=B._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-le),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+le-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=le-1,e.strstart++,s&&(_(e,!1),0===e.strm.avail_out))return ye}else if(e.match_available){if(s=B._tr_tally(e,0,e.window[e.strstart-1]),s&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return ye}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(s=B._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<le-1?e.strstart:le-1,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function g(e,t){for(var i,s,a,r,n=e.window;;){if(e.lookahead<=he){if(d(e),e.lookahead<=he&&t===I)return ye;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=le&&e.strstart>0&&(a=e.strstart-1,s=n[a],s===n[++a]&&s===n[++a]&&s===n[++a])){r=e.strstart+he;do{}while(s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&s===n[++a]&&a<r);e.match_length=he-(r-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=le?(i=B._tr_tally(e,1,e.match_length-le),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function m(e,t){for(var i;;){if(0===e.lookahead&&(d(e),0===e.lookahead)){if(t===I)return ye;break}if(e.match_length=0,i=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(_(e,!1),0===e.strm.avail_out))return ye}return e.insert=0,t===O?(_(e,!0),0===e.strm.avail_out?we:ke):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?ye:xe}function v(e,t,i,s,a){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=s,this.func=a}function b(e){e.window_size=2*e.w_size,c(e.head),e.max_lazy_match=$[e.level].max_lazy,e.good_match=$[e.level].good_length,e.nice_match=$[e.level].nice_length,e.max_chain_length=$[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=le-1,e.match_available=0,e.ins_h=0}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*_e),this.dyn_dtree=new E.Buf16(2*(2*re+1)),this.bl_tree=new E.Buf16(2*(2*ne+1)),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(oe+1),this.heap=new E.Buf16(2*ae+1),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ae+1),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=q,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fe:ve,e.adler=2===t.wrap?0:1,t.last_flush=I,B._tr_init(t),G):l(e,U)}function w(e){var t=x(e);return t===G&&b(e.state),t}function k(e,t){return e&&e.state?2!==e.state.wrap?U:(e.state.gzhead=t,G):U}function P(e,t,i,s,a,r){if(!e)return U;var n=1;if(t===V&&(t=6),s<0?(n=0,s=-s):s>15&&(n=2,s-=16),a<1||a>Q||i!==Z||s<8||s>15||t<0||t>9||r<0||r>J)return l(e,U);8===s&&(s=9);var _=new y;return e.state=_,_.strm=e,_.wrap=n,_.gzhead=null,_.w_bits=s,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=a+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+le-1)/le),_.window=new E.Buf8(2*_.w_size),_.head=new E.Buf16(_.hash_size),_.prev=new E.Buf16(_.w_size),_.lit_bufsize=1<<a+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new E.Buf8(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=t,_.strategy=r,_.method=i,w(e)}function C(e,t){return P(e,t,Z,ee,te,K)}function T(e,t){var i,s,a,r;if(!e||!e.state||t>j||t<0)return e?l(e,U):U;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===be&&t!==O)return l(e,0===e.avail_out?W:U);if(s.strm=e,i=s.last_flush,s.last_flush=t,s.status===fe)if(2===s.wrap)e.adler=0,f(s,31),f(s,139),f(s,8),s.gzhead?(f(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),f(s,255&s.gzhead.time),f(s,s.gzhead.time>>8&255),f(s,s.gzhead.time>>16&255),f(s,s.gzhead.time>>24&255),f(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),f(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(f(s,255&s.gzhead.extra.length),f(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=R(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=pe):(f(s,0),f(s,0),f(s,0),f(s,0),f(s,0),f(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),f(s,Pe),s.status=ve);else{var n=Z+(s.w_bits-8<<4)<<8,_=-1;_=s.strategy>=X||s.level<2?0:s.level<6?1:6===s.level?2:3,n|=_<<6,0!==s.strstart&&(n|=ue),n+=31-n%31,s.status=ve,p(s,n),0!==s.strstart&&(p(s,e.adler>>>16),p(s,65535&e.adler)),e.adler=1}if(s.status===pe)if(s.gzhead.extra){for(a=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending!==s.pending_buf_size));)f(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=de)}else s.status=de;if(s.status===de)if(s.gzhead.name){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending===s.pending_buf_size)){r=1;break}r=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,f(s,r)}while(0!==r);s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),0===r&&(s.gzindex=0,s.status=ge)}else s.status=ge;if(s.status===ge)if(s.gzhead.comment){a=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),u(e),a=s.pending,s.pending===s.pending_buf_size)){r=1;break}r=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,f(s,r)}while(0!==r);s.gzhead.hcrc&&s.pending>a&&(e.adler=R(e.adler,s.pending_buf,s.pending-a,a)),0===r&&(s.status=me)}else s.status=me;if(s.status===me&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&u(e),s.pending+2<=s.pending_buf_size&&(f(s,255&e.adler),f(s,e.adler>>8&255),e.adler=0,s.status=ve)):s.status=ve),0!==s.pending){if(u(e),0===e.avail_out)return s.last_flush=-1,G}else if(0===e.avail_in&&h(t)<=h(i)&&t!==O)return l(e,W);if(s.status===be&&0!==e.avail_in)return l(e,W);if(0!==e.avail_in||0!==s.lookahead||t!==I&&s.status!==be){var o=s.strategy===X?m(s,t):s.strategy===Y?g(s,t):$[s.level].func(s,t);if(o!==we&&o!==ke||(s.status=be),o===ye||o===we)return 0===e.avail_out&&(s.last_flush=-1),G;if(o===xe&&(t===D?B._tr_align(s):t!==j&&(B._tr_stored_block(s,0,0,!1),t===F&&(c(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),u(e),0===e.avail_out))return s.last_flush=-1,G}return t!==O?G:s.wrap<=0?H:(2===s.wrap?(f(s,255&e.adler),f(s,e.adler>>8&255),f(s,e.adler>>16&255),f(s,e.adler>>24&255),f(s,255&e.total_in),f(s,e.total_in>>8&255),f(s,e.total_in>>16&255),f(s,e.total_in>>24&255)):(p(s,e.adler>>>16),p(s,65535&e.adler)),u(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?G:H)}function M(e){var t;return e&&e.state?(t=e.state.status,t!==fe&&t!==pe&&t!==de&&t!==ge&&t!==me&&t!==ve&&t!==be?l(e,U):(e.state=null,t===ve?l(e,N):G)):U}function S(e,t){var i,s,a,r,n,_,o,l,h=t.length;if(!e||!e.state)return U;if(i=e.state,r=i.wrap,2===r||1===r&&i.status!==fe||i.lookahead)return U;for(1===r&&(e.adler=L(e.adler,t,h,0)),i.wrap=0,h>=i.w_size&&(0===r&&(c(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new E.Buf8(i.w_size),E.arraySet(l,t,h-i.w_size,i.w_size,0),t=l,h=i.w_size),n=e.avail_in,_=e.next_in,o=e.input,e.avail_in=h,e.next_in=0,e.input=t,d(i);i.lookahead>=le;){s=i.strstart,a=i.lookahead-(le-1);do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[s+le-1])&i.hash_mask,i.prev[s&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=s,s++}while(--a);i.strstart=s,i.lookahead=le-1,d(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=le-1,i.match_available=0,e.next_in=_,e.input=o,e.avail_in=n,i.wrap=r,G}var $,E=e("../utils/common"),B=e("./trees"),L=e("./adler32"),R=e("./crc32"),A=e("./messages"),I=0,D=1,F=3,O=4,j=5,G=0,H=1,U=-2,N=-3,W=-5,V=-1,z=1,X=2,Y=3,J=4,K=0,q=2,Z=8,Q=9,ee=15,te=8,ie=29,se=256,ae=se+1+ie,re=30,ne=19,_e=2*ae+1,oe=15,le=3,he=258,ce=he+le+1,ue=32,fe=42,pe=69,de=73,ge=91,me=103,ve=113,be=666,ye=1,xe=2,we=3,ke=4,Pe=3;$=[new v(0,0,0,0,s),new v(4,4,8,4,a),new v(4,5,16,8,a),new v(4,6,32,32,a),new v(4,4,16,16,n),new v(8,16,32,32,n),new v(8,16,128,128,n),new v(8,32,128,256,n),new v(32,128,258,1024,n),new v(32,258,258,4096,n)],i.deflateInit=C,i.deflateInit2=P,i.deflateReset=w,i.deflateResetKeep=x,i.deflateSetHeader=k,i.deflate=T,i.deflateEnd=M,i.deflateSetDictionary=S,i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(e,t,i){"use strict";function s(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=s},{}],10:[function(e,t,i){"use strict";var M=30,S=12;t.exports=function(e,t){var i,s,a,r,n,_,o,l,h,c,u,f,p,d,g,m,v,b,y,x,w,k,P,C,T;i=e.state,s=e.next_in,C=e.input,a=s+(e.avail_in-5),r=e.next_out,T=e.output,n=r-(t-e.avail_out),_=r+(e.avail_out-257),o=i.dmax,l=i.wsize,h=i.whave,c=i.wnext,u=i.window,f=i.hold,p=i.bits,d=i.lencode,g=i.distcode,m=(1<<i.lenbits)-1,v=(1<<i.distbits)-1;e:do{p<15&&(f+=C[s++]<<p,p+=8,f+=C[s++]<<p,p+=8),b=d[f&m];t:for(;;){if(y=b>>>24,f>>>=y,p-=y,y=b>>>16&255,0===y)T[r++]=65535&b;else{if(!(16&y)){if(0===(64&y)){b=d[(65535&b)+(f&(1<<y)-1)];continue t}if(32&y){i.mode=S;break e}e.msg="invalid literal/length code",i.mode=M;break e}x=65535&b,y&=15,y&&(p<y&&(f+=C[s++]<<p,p+=8),x+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=C[s++]<<p,p+=8,f+=C[s++]<<p,p+=8),b=g[f&v];i:for(;;){if(y=b>>>24,f>>>=y,p-=y,y=b>>>16&255,!(16&y)){if(0===(64&y)){b=g[(65535&b)+(f&(1<<y)-1)];continue i}e.msg="invalid distance code",i.mode=M;break e}if(w=65535&b,y&=15,p<y&&(f+=C[s++]<<p,p+=8,p<y&&(f+=C[s++]<<p,p+=8)),w+=f&(1<<y)-1,w>o){e.msg="invalid distance too far back",i.mode=M;break e}if(f>>>=y,p-=y,y=r-n,w>y){if(y=w-y,y>h&&i.sane){e.msg="invalid distance too far back",i.mode=M;break e}if(k=0,P=u,0===c){if(k+=l-y,y<x){x-=y;do{T[r++]=u[k++]}while(--y);k=r-w,P=T}}else if(c<y){if(k+=l+c-y,y-=c,y<x){x-=y;do{T[r++]=u[k++]}while(--y);if(k=0,c<x){y=c,x-=y;do{T[r++]=u[k++]}while(--y);k=r-w,P=T}}}else if(k+=c-y,y<x){x-=y;do{T[r++]=u[k++]}while(--y);k=r-w,P=T}for(;x>2;)T[r++]=P[k++],T[r++]=P[k++],T[r++]=P[k++],x-=3;x&&(T[r++]=P[k++],x>1&&(T[r++]=P[k++]))}else{k=r-w;do{T[r++]=T[k++],T[r++]=T[k++],T[r++]=T[k++],x-=3}while(x>2);x&&(T[r++]=T[k++],x>1&&(T[r++]=T[k++]))}break}}break}}while(s<a&&r<_);x=p>>3,s-=x,p-=x<<3,f&=(1<<p)-1,e.next_in=s,e.next_out=r,e.avail_in=s<a?5+(a-s):5-(s-a),e.avail_out=r<_?257+(_-r):257-(r-_),i.hold=f,i.bits=p}},{}],11:[function(e,t,i){"use strict";function $(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new L.Buf16(320),this.work=new L.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=q,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new L.Buf32(d),t.distcode=t.distdyn=new L.Buf32(g),t.sane=1,t.back=-1,N):z}function r(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,s(e)):z}function n(e,t){var i,s;return e&&e.state?(s=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?z:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=i,s.wbits=t,r(e))):z}function _(e,t){var i,s;return e?(s=new a,e.state=s,s.window=null,i=n(e,t),i!==N&&(e.state=null),i):z}function o(e){return _(e,v)}function E(e){if(b){var t;for(f=new L.Buf32(512),p=new L.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(D(O,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;D(j,e.lens,0,32,p,0,e.work,{bits:5}),b=!1}e.lencode=f,e.lenbits=9,e.distcode=p,e.distbits=5}function B(e,t,i,s){var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new L.Buf8(r.wsize)),s>=r.wsize?(L.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>s&&(a=s),L.arraySet(r.window,t,i-s,a,r.wnext),s-=a,s?(L.arraySet(r.window,t,i-s,s,0),r.wnext=s,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0}function l(e,t){var i,s,a,r,n,_,o,l,h,c,u,f,p,d,g,m,v,b,y,x,w,k,P,C,T=0,M=new L.Buf8(4),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return z;i=e.state,i.mode===oe&&(i.mode=le),n=e.next_out,a=e.output,o=e.avail_out,r=e.next_in,s=e.input,_=e.avail_in,l=i.hold,h=i.bits,c=_,u=o,k=N;e:for(;;)switch(i.mode){case q:if(0===i.wrap){i.mode=le;break}for(;h<16;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(2&i.wrap&&35615===l){i.check=0,M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0),l=0,h=0,i.mode=Z;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=Te;break}if((15&l)!==K){e.msg="unknown compression method",i.mode=Te;break}if(l>>>=4,h-=4,w=(15&l)+8,0===i.wbits)i.wbits=w;else if(w>i.wbits){e.msg="invalid window size",i.mode=Te;break}i.dmax=1<<w,e.adler=i.check=1,i.mode=512&l?ne:oe,l=0,h=0;break;case Z:for(;h<16;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(i.flags=l,(255&i.flags)!==K){e.msg="unknown compression method",i.mode=Te;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Te;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0,i.mode=Q;case Q:for(;h<32;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.head&&(i.head.time=l),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,i.check=A(i.check,M,4,0)),l=0,h=0,i.mode=ee;case ee:for(;h<16;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0,i.mode=te;case te:if(1024&i.flags){for(;h<16;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&(M[0]=255&l,M[1]=l>>>8&255,i.check=A(i.check,M,2,0)),l=0,h=0}else i.head&&(i.head.extra=null);i.mode=ie;case ie:if(1024&i.flags&&(f=i.length,f>_&&(f=_),f&&(i.head&&(w=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),L.arraySet(i.head.extra,s,r,f,w)),512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,i.length-=f),i.length))break e;i.length=0,i.mode=se;case se:if(2048&i.flags){if(0===_)break e;f=0;do{w=s[r+f++],i.head&&w&&i.length<65536&&(i.head.name+=String.fromCharCode(w))}while(w&&f<_);if(512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,w)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=ae;case ae:if(4096&i.flags){if(0===_)break e;f=0;do{w=s[r+f++],i.head&&w&&i.length<65536&&(i.head.comment+=String.fromCharCode(w))}while(w&&f<_);if(512&i.flags&&(i.check=A(i.check,s,f,r)),_-=f,r+=f,w)break e}else i.head&&(i.head.comment=null);i.mode=re;case re:if(512&i.flags){for(;h<16;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Te;break}l=0,h=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=oe;break;case ne:for(;h<32;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}e.adler=i.check=$(l),l=0,h=0,i.mode=_e;case _e:if(0===i.havedict)return e.next_out=n,e.avail_out=o,e.next_in=r,e.avail_in=_,i.hold=l,i.bits=h,V;e.adler=i.check=1,i.mode=oe;case oe:if(t===H||t===U)break e;case le:if(i.last){l>>>=7&h,h-=7&h,i.mode=ke;break}for(;h<3;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}switch(i.last=1&l,l>>>=1,h-=1,3&l){case 0:i.mode=he;break;case 1:if(E(i),i.mode=ge,t===U){l>>>=2,h-=2;break e}break;case 2:i.mode=fe;break;case 3:e.msg="invalid block type",i.mode=Te}l>>>=2,h-=2;break;case he:for(l>>>=7&h,h-=7&h;h<32;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if((65535&l)!==(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Te;break}if(i.length=65535&l,l=0,h=0,i.mode=ce,t===U)break e;case ce:i.mode=ue;case ue:if(f=i.length){if(f>_&&(f=_),f>o&&(f=o),0===f)break e;L.arraySet(a,s,r,f,n),_-=f,r+=f,o-=f,n+=f,i.length-=f;break}i.mode=oe;break;case fe:for(;h<14;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(i.nlen=(31&l)+257,l>>>=5,h-=5,i.ndist=(31&l)+1,l>>>=5,h-=5,i.ncode=(15&l)+4,l>>>=4,h-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Te;break}i.have=0,i.mode=pe;case pe:for(;i.have<i.ncode;){for(;h<3;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.lens[S[i.have++]]=7&l,l>>>=3,h-=3}for(;i.have<19;)i.lens[S[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,P={bits:i.lenbits},k=D(F,i.lens,0,19,i.lencode,0,i.work,P),i.lenbits=P.bits,k){e.msg="invalid code lengths set",i.mode=Te;break}i.have=0,i.mode=de;case de:for(;i.have<i.nlen+i.ndist;){for(;T=i.lencode[l&(1<<i.lenbits)-1],g=T>>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(v<16)l>>>=g,h-=g,i.lens[i.have++]=v;else{if(16===v){for(C=g+2;h<C;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(l>>>=g,h-=g,0===i.have){e.msg="invalid bit length repeat",i.mode=Te;break}w=i.lens[i.have-1],f=3+(3&l),l>>>=2,h-=2}else if(17===v){for(C=g+3;h<C;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}l>>>=g,h-=g,w=0,f=3+(7&l),l>>>=3,h-=3}else{for(C=g+7;h<C;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}l>>>=g,h-=g,w=0,f=11+(127&l),l>>>=7,h-=7}if(i.have+f>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Te;break}for(;f--;)i.lens[i.have++]=w}}if(i.mode===Te)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Te;break}if(i.lenbits=9,P={bits:i.lenbits},k=D(O,i.lens,0,i.nlen,i.lencode,0,i.work,P),i.lenbits=P.bits,k){e.msg="invalid literal/lengths set",i.mode=Te;break}if(i.distbits=6,i.distcode=i.distdyn,P={bits:i.distbits},k=D(j,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,P),i.distbits=P.bits,k){e.msg="invalid distances set",i.mode=Te;break}if(i.mode=ge,t===U)break e;case ge:i.mode=me;case me:if(_>=6&&o>=258){e.next_out=n,e.avail_out=o,e.next_in=r,e.avail_in=_,i.hold=l,i.bits=h,I(e,u),n=e.next_out,a=e.output,o=e.avail_out,r=e.next_in,s=e.input,_=e.avail_in,l=i.hold,h=i.bits,i.mode===oe&&(i.back=-1);break}for(i.back=0;T=i.lencode[l&(1<<i.lenbits)-1],g=T>>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(m&&0===(240&m)){for(b=g,y=m,x=v;T=i.lencode[x+((l&(1<<b+y)-1)>>b)],g=T>>>24,m=T>>>16&255,v=65535&T,!(b+g<=h);){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}l>>>=b,h-=b,i.back+=b}if(l>>>=g,h-=g,i.back+=g,i.length=v,0===m){i.mode=we;break}if(32&m){i.back=-1,i.mode=oe;break}if(64&m){e.msg="invalid literal/length code",i.mode=Te;break}i.extra=15&m,i.mode=ve;case ve:if(i.extra){for(C=i.extra;h<C;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,h-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=be;case be:for(;T=i.distcode[l&(1<<i.distbits)-1],g=T>>>24,m=T>>>16&255,v=65535&T,!(g<=h);){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(0===(240&m)){for(b=g,y=m,x=v;T=i.distcode[x+((l&(1<<b+y)-1)>>b)],g=T>>>24,m=T>>>16&255,v=65535&T,!(b+g<=h);){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}l>>>=b,h-=b,i.back+=b}if(l>>>=g,h-=g,i.back+=g,64&m){e.msg="invalid distance code",i.mode=Te;break}i.offset=v,i.extra=15&m,i.mode=ye;case ye:if(i.extra){for(C=i.extra;h<C;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,h-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Te;break}i.mode=xe;case xe:if(0===o)break e;if(f=u-o,i.offset>f){if(f=i.offset-f,f>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Te;break}f>i.wnext?(f-=i.wnext,p=i.wsize-f):p=i.wnext-f,f>i.length&&(f=i.length),d=i.window}else d=a,p=n-i.offset,f=i.length;f>o&&(f=o),o-=f,i.length-=f;do{a[n++]=d[p++]}while(--f);0===i.length&&(i.mode=me);break;case we:if(0===o)break e;a[n++]=i.length,o--,i.mode=me;break;case ke:if(i.wrap){for(;h<32;){if(0===_)break e;_--,l|=s[r++]<<h,h+=8}if(u-=o,e.total_out+=u,i.total+=u,u&&(e.adler=i.check=i.flags?A(i.check,a,u,n-u):R(i.check,a,u,n-u)),u=o,(i.flags?l:$(l))!==i.check){e.msg="incorrect data check",i.mode=Te;break}l=0,h=0}i.mode=Pe;case Pe:if(i.wrap&&i.flags){for(;h<32;){if(0===_)break e;_--,l+=s[r++]<<h,h+=8}if(l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Te;break}l=0,h=0}i.mode=Ce;case Ce:k=W;break e;case Te:k=X;break e;case Me:return Y;case Se:default:return z}return e.next_out=n,e.avail_out=o,e.next_in=r,e.avail_in=_,i.hold=l,i.bits=h,(i.wsize||u!==e.avail_out&&i.mode<Te&&(i.mode<ke||t!==G))&&B(e,e.output,e.next_out,u-e.avail_out)?(i.mode=Me,Y):(c-=e.avail_in,u-=e.avail_out,e.total_in+=c,e.total_out+=u,i.total+=u,i.wrap&&u&&(e.adler=i.check=i.flags?A(i.check,a,u,e.next_out-u):R(i.check,a,u,e.next_out-u)),e.data_type=i.bits+(i.last?64:0)+(i.mode===oe?128:0)+(i.mode===ge||i.mode===ce?256:0),(0===c&&0===u||t===G)&&k===N&&(k=J),k)}function h(e){if(!e||!e.state)return z;var t=e.state;return t.window&&(t.window=null),e.state=null,N}function c(e,t){var i;return e&&e.state?(i=e.state,0===(2&i.wrap)?z:(i.head=t,t.done=!1,N)):z}function u(e,t){var i,s,a,r=t.length;return e&&e.state?(i=e.state,0!==i.wrap&&i.mode!==_e?z:i.mode===_e&&(s=1,s=R(s,t,r,0),s!==i.check)?X:(a=B(e,t,r,r))?(i.mode=Me,Y):(i.havedict=1,N)):z}var f,p,L=e("../utils/common"),R=e("./adler32"),A=e("./crc32"),I=e("./inffast"),D=e("./inftrees"),F=0,O=1,j=2,G=4,H=5,U=6,N=0,W=1,V=2,z=-2,X=-3,Y=-4,J=-5,K=8,q=1,Z=2,Q=3,ee=4,te=5,ie=6,se=7,ae=8,re=9,ne=10,_e=11,oe=12,le=13,he=14,ce=15,ue=16,fe=17,pe=18,de=19,ge=20,me=21,ve=22,be=23,ye=24,xe=25,we=26,ke=27,Pe=28,Ce=29,Te=30,Me=31,Se=32,d=852,g=592,m=15,v=m,b=!0;i.inflateReset=r,i.inflateReset2=n,i.inflateResetKeep=s,i.inflateInit=o,i.inflateInit2=_,i.inflate=l,i.inflateEnd=h,i.inflateGetHeader=c,i.inflateSetDictionary=u,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(e,t,i){"use strict";var I=e("../utils/common"),D=15,F=852,O=592,j=0,G=1,H=2,U=[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,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],W=[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,0,0],V=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,s,a,r,n,_){var o,l,h,c,u,f,p,d,g,m=_.bits,v=0,b=0,y=0,x=0,w=0,k=0,P=0,C=0,T=0,M=0,S=null,$=0,E=new I.Buf16(D+1),B=new I.Buf16(D+1),L=null,R=0;for(v=0;v<=D;v++)E[v]=0;for(b=0;b<s;b++)E[t[i+b]]++;for(w=m,x=D;x>=1&&0===E[x];x--);if(w>x&&(w=x),0===x)return a[r++]=20971520,a[r++]=20971520,_.bits=1,0;for(y=1;y<x&&0===E[y];y++);for(w<y&&(w=y),C=1,v=1;v<=D;v++)if(C<<=1,C-=E[v],C<0)return-1;if(C>0&&(e===j||1!==x))return-1;for(B[1]=0,v=1;v<D;v++)B[v+1]=B[v]+E[v];for(b=0;b<s;b++)0!==t[i+b]&&(n[B[t[i+b]]++]=b);if(e===j?(S=L=n,f=19):e===G?(S=U,$-=257,L=N,R-=257,f=256):(S=W,L=V,f=-1),M=0,b=0,v=y,u=r,k=w,P=0,h=-1,T=1<<w,c=T-1,e===G&&T>F||e===H&&T>O)return 1;for(var A=0;;){A++,p=v-P,n[b]<f?(d=0,g=n[b]):n[b]>f?(d=L[R+n[b]],g=S[$+n[b]]):(d=96,g=0),o=1<<v-P,l=1<<k,y=l;do{l-=o,a[u+(M>>P)+l]=p<<24|d<<16|g|0}while(0!==l);for(o=1<<v-1;M&o;)o>>=1;if(0!==o?(M&=o-1,M+=o):M=0,b++,0===--E[v]){if(v===x)break;v=t[i+n[b]]}if(v>w&&(M&c)!==h){for(0===P&&(P=w),u+=y,k=v-P,C=1<<k;k+P<x&&(C-=E[k+P],!(C<=0));)k++,C<<=1;if(T+=1<<k,e===G&&T>F||e===H&&T>O)return 1;h=M&c,a[h]=w<<24|k<<16|u-r|0}}return 0!==M&&(a[u+M]=v-P<<24|64<<16|0),_.bits=w,0}},{"../utils/common":3}],13:[function(e,t,i){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(e,t,i){"use strict";function s(e){for(var t=e.length;--t>=0;)e[t]=0}function n(e,t,i,s,a){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=s,this.max_length=a,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?oe[e]:oe[256+(e>>>7)]}function r(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function h(e,t,i){e.bi_valid>J-i?(e.bi_buf|=t<<e.bi_valid&65535,r(e,e.bi_buf),e.bi_buf=t>>J-e.bi_valid,e.bi_valid+=i-J):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function c(e,t,i){h(e,i[2*t],i[2*t+1])}function l(e,t){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1}function _(e){16===e.bi_valid?(r(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function u(e,t){var i,s,a,r,n,_,o=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,u=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,d=0;for(r=0;r<=Y;r++)e.bl_count[r]=0;for(o[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<X;i++)s=e.heap[i],r=o[2*o[2*s+1]+1]+1,r>p&&(r=p,d++),o[2*s+1]=r,s>l||(e.bl_count[r]++,n=0,s>=f&&(n=u[s-f]),_=o[2*s],e.opt_len+=_*(r+n),c&&(e.static_len+=_*(h[2*s+1]+n)));if(0!==d){do{for(r=p-1;0===e.bl_count[r];)r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[p]--,d-=2}while(d>0);for(r=p;0!==r;r--)for(s=e.bl_count[r];0!==s;)a=e.heap[--i],a>l||(o[2*a+1]!==r&&(e.opt_len+=(r-o[2*a+1])*o[2*a],o[2*a+1]=r),s--)}}function f(e,t,i){var s,a,r=new Array(Y+1),n=0;for(s=1;s<=Y;s++)r[s]=n=n+i[s-1]<<1;for(a=0;a<=t;a++){var _=e[2*a+1];0!==_&&(e[2*a]=l(r[_]++,_))}}function p(){var e,t,i,s,a,r=new Array(Y+1);for(i=0,s=0;s<U-1;s++)for(he[s]=i,e=0;e<1<<te[s];e++)le[i++]=s;for(le[i-1]=s,a=0,s=0;s<16;s++)for(ce[s]=a,e=0;e<1<<ie[s];e++)oe[a++]=s;for(a>>=7;s<V;s++)for(ce[s]=a<<7,e=0;e<1<<ie[s]-7;e++)oe[256+a++]=s;for(t=0;t<=Y;t++)r[t]=0;for(e=0;e<=143;)ne[2*e+1]=8,e++,r[8]++;for(;e<=255;)ne[2*e+1]=9,e++,r[9]++;for(;e<=279;)ne[2*e+1]=7,e++,r[7]++;for(;e<=287;)ne[2*e+1]=8,e++,r[8]++;for(f(ne,W+1,r),e=0;e<V;e++)_e[2*e+1]=5,_e[2*e]=l(e,5);ue=new n(ne,te,N+1,W,Y),fe=new n(_e,ie,0,V,Y),pe=new n(new Array(0),se,0,z,K)}function d(e){var t;for(t=0;t<W;t++)e.dyn_ltree[2*t]=0;for(t=0;t<V;t++)e.dyn_dtree[2*t]=0;for(t=0;t<z;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*q]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function g(e){e.bi_valid>8?r(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function m(e,t,i,s){g(e),s&&(r(e,i),r(e,~i)),L.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}function v(e,t,i,s){var a=2*t,r=2*i;return e[a]<e[r]||e[a]===e[r]&&s[t]<=s[i]}function b(e,t,i){for(var s=e.heap[i],a=i<<1;a<=e.heap_len&&(a<e.heap_len&&v(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!v(t,s,e.heap[a],e.depth));)e.heap[i]=e.heap[a],i=a,a<<=1;e.heap[i]=s}function y(e,t,i){var s,a,r,n,_=0;if(0!==e.last_lit)do{s=e.pending_buf[e.d_buf+2*_]<<8|e.pending_buf[e.d_buf+2*_+1],a=e.pending_buf[e.l_buf+_],_++,0===s?c(e,a,t):(r=le[a],c(e,r+N+1,t),n=te[r],0!==n&&(a-=he[r],h(e,a,n)),s--,r=o(s),c(e,r,i),n=ie[r],0!==n&&(s-=ce[r],h(e,s,n)))}while(_<e.last_lit);c(e,q,t)}function x(e,t){var i,s,a,r=t.dyn_tree,n=t.stat_desc.static_tree,_=t.stat_desc.has_stree,o=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=X,i=0;i<o;i++)0!==r[2*i]?(e.heap[++e.heap_len]=l=i,e.depth[i]=0):r[2*i+1]=0;for(;e.heap_len<2;)a=e.heap[++e.heap_len]=l<2?++l:0,r[2*a]=1,e.depth[a]=0,e.opt_len--,_&&(e.static_len-=n[2*a+1]);for(t.max_code=l,i=e.heap_len>>1;i>=1;i--)b(e,r,i);a=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],b(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,r[2*a]=r[2*i]+r[2*s],e.depth[a]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,r[2*i+1]=r[2*s+1]=a,e.heap[1]=a++,b(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],u(e,t),f(r,l,e.bl_count)}function w(e,t,i){var s,a,r=-1,n=t[1],_=0,o=7,l=4;for(0===n&&(o=138,l=3),t[2*(i+1)+1]=65535,s=0;s<=i;s++)a=n,n=t[2*(s+1)+1],++_<o&&a===n||(_<l?e.bl_tree[2*a]+=_:0!==a?(a!==r&&e.bl_tree[2*a]++,e.bl_tree[2*Z]++):_<=10?e.bl_tree[2*Q]++:e.bl_tree[2*ee]++,_=0,r=a,0===n?(o=138,l=3):a===n?(o=6,l=3):(o=7,l=4))}function k(e,t,i){var s,a,r=-1,n=t[1],_=0,o=7,l=4;for(0===n&&(o=138,l=3),s=0;s<=i;s++)if(a=n,n=t[2*(s+1)+1],!(++_<o&&a===n)){if(_<l){do{c(e,a,e.bl_tree)}while(0!==--_)}else 0!==a?(a!==r&&(c(e,a,e.bl_tree),_--),c(e,Z,e.bl_tree),h(e,_-3,2)):_<=10?(c(e,Q,e.bl_tree),h(e,_-3,3)):(c(e,ee,e.bl_tree),h(e,_-11,7));_=0,r=a,0===n?(o=138,l=3):a===n?(o=6,l=3):(o=7,l=4)}}function P(e){var t;for(w(e,e.dyn_ltree,e.l_desc.max_code),w(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=z-1;t>=3&&0===e.bl_tree[2*ae[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function C(e,t,i,s){var a;for(h(e,t-257,5),h(e,i-1,5),h(e,s-4,4),a=0;a<s;a++)h(e,e.bl_tree[2*ae[a]+1],3);k(e,e.dyn_ltree,t-1),k(e,e.dyn_dtree,i-1)}function T(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return A;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return I;for(t=32;t<N;t++)if(0!==e.dyn_ltree[2*t])return I;return A}function M(e){de||(p(),de=!0),e.l_desc=new a(e.dyn_ltree,ue),e.d_desc=new a(e.dyn_dtree,fe),e.bl_desc=new a(e.bl_tree,pe),e.bi_buf=0,e.bi_valid=0,d(e)}function S(e,t,i,s){h(e,(F<<1)+(s?1:0),3),m(e,t,i,!0)}function $(e){h(e,O<<1,3),c(e,q,ne),_(e)}function E(e,t,i,s){var a,r,n=0;e.level>0?(e.strm.data_type===D&&(e.strm.data_type=T(e)),x(e,e.l_desc),x(e,e.d_desc),n=P(e),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=i+5,i+4<=a&&t!==-1?S(e,t,i,s):e.strategy===R||r===a?(h(e,(O<<1)+(s?1:0),3),y(e,ne,_e)):(h(e,(j<<1)+(s?1:0),3),C(e,e.l_desc.max_code+1,e.d_desc.max_code+1,n+1),y(e,e.dyn_ltree,e.dyn_dtree)),d(e),s&&g(e)}function B(e,t,i){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(le[i]+N+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var L=e("../utils/common"),R=4,A=0,I=1,D=2,F=0,O=1,j=2,G=3,H=258,U=29,N=256,W=N+1+U,V=30,z=19,X=2*W+1,Y=15,J=16,K=7,q=256,Z=16,Q=17,ee=18,te=[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],ie=[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],se=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=512,ne=new Array(2*(W+2));s(ne);var _e=new Array(2*V);s(_e);var oe=new Array(re);s(oe);var le=new Array(H-G+1);s(le);var he=new Array(U);s(he);var ce=new Array(V);s(ce);var ue,fe,pe,de=!1;i._tr_init=M,i._tr_stored_block=S,i._tr_flush_block=E,i._tr_tally=B,i._tr_align=$},{"../utils/common":3}],15:[function(e,t,i){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=s},{}],"/":[function(e,t,i){"use strict";var s=e("./lib/utils/common").assign,a=e("./lib/deflate"),r=e("./lib/inflate"),n=e("./lib/zlib/constants"),_={};s(_,a,r,n),t.exports=_},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var saveAs=saveAs||function(l){"use strict";if(typeof l==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var e=l.document,h=function(){return l.URL||l.webkitURL||l},c=e.createElementNS("http://www.w3.org/1999/xhtml","a"),u="download"in c,f=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},p=/constructor/i.test(l.HTMLElement)||l.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent),r=function(e){(l.setImmediate||l.setTimeout)(function(){throw e},0)},g="application/octet-stream",i=1e3*40,m=function(e){var t=function(){if(typeof e==="string"){h().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,i)},v=function(e,t,i){t=[].concat(t);var s=t.length;while(s--){var a=e["on"+t[s]];if(typeof a==="function"){try{a.call(e,i||e)}catch(e){r(e)}}}},b=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},s=function(t,e,i){if(!i){t=b(t)}var s=this,a=t.type,r=a===g,n,_=function(){v(s,"writestart progress write writeend".split(" "))},o=function(){if((d||r&&p)&&l.FileReader){var i=new FileReader;i.onloadend=function(){var e=d?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");var t=l.open(e,"_blank");if(!t)l.location.href=e;e=undefined;s.readyState=s.DONE;_()};i.readAsDataURL(t);s.readyState=s.INIT;return}if(!n){n=h().createObjectURL(t)}if(r){l.location.href=n}else{var e=l.open(n,"_blank");if(!e){l.location.href=n}}s.readyState=s.DONE;_();m(n)};s.readyState=s.INIT;if(u){n=h().createObjectURL(t);setTimeout(function(){c.href=n;c.download=e;f(c);_();m(n);s.readyState=s.DONE});return}o()},t=s.prototype,a=function(e,t,i){return new s(e,t||e.name||"download",i)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,i){t=t||e.name||"download";if(!i){e=b(e)}return navigator.msSaveOrOpenBlob(e,t)}}t.abort=function(){};t.readyState=t.INIT=0;t.WRITING=1;t.DONE=2;t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null;return a}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})}

Youez - 2016 - github.com/yon3zu
LinuXploit