/*
 howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com  Spatial Plugin  @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var $lime_init=function(Eb,Y){var Za=function(Ma,Ja){(function(La,sa){function I(a,b){a=Object.create(a);for(var c in b)a[c]=b[c];b.toString!==Object.prototype.toString&&(a.toString=b.toString);return a}function Ga(a){return a instanceof Array?new zg(a):a.iterator()}function m(a,b){if(b==null)return null;b.__id__==null&&(b.__id__=sa.$haxeUID++);var c;a.hx__closures__==null?a.hx__closures__={}:c=a.hx__closures__[b.__id__];c==null&&(c=b.bind(a),a.hx__closures__[b.__id__]=c);return c}La.lime=La.lime||
{};var r={},D=function(){return u.__string_rec(this,"")},O=O||{},G,ma=function(){};r["lime.app.IModule"]=ma;ma.__name__="lime.app.IModule";ma.__isInterface__=!0;ma.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:ma};var qa=function(){this.onExit=new Ol};r["lime.app.Module"]=qa;qa.__name__="lime.app.Module";qa.__interfaces__=[ma];qa.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:qa};var ya=function(a){this.gameDeviceCache=
new we;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;F.init();this.accelerometer=Ni.registerSensor(Pw.ACCELEROMETER,0)};r["lime._internal.backend.html5.HTML5Application"]=ya;ya.__name__="lime._internal.backend.html5.HTML5Application";ya.prototype={accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,gameDeviceCache:null,hidden:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(a){if(a>=65&&a<=90)return a+32;switch(a){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 a},
exec:function(){window.addEventListener("keydown",m(this,this.handleKeyEvent),!1);window.addEventListener("keyup",m(this,this.handleKeyEvent),!1);window.addEventListener("focus",m(this,this.handleWindowEvent),!1);window.addEventListener("blur",m(this,this.handleWindowEvent),!1);window.addEventListener("resize",m(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",m(this,this.handleWindowEvent),!1);Object.prototype.hasOwnProperty.call(window,"Accelerometer")&&window.addEventListener("devicemotion",
m(this,this.handleSensorEvent),!1);CanvasRenderingContext2D.prototype.isPointInStroke||(CanvasRenderingContext2D.prototype.isPointInStroke=function(f,g,h){return!1});CanvasRenderingContext2D.prototype.isPointInPath||(CanvasRenderingContext2D.prototype.isPointInPath=function(f,g,h){return!1});"performance"in window==0&&(window.performance={});if("now"in window.performance==0){var a=Date.now();performance.timing&&performance.timing.navigationStart&&(a=performance.timing.navigationStart);window.performance.now=
function(){return Date.now()-a}}for(var b=0,c=["ms","moz","webkit","o"],d=0;d<c.length&&!window.requestAnimationFrame;++d)window.requestAnimationFrame=window[c[d]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[d]+"CancelAnimationFrame"]||window[c[d]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(f,g){var h=window.performance.now(),l=Math.max(0,16-(h-b));g=window.setTimeout(function(){f(h+l)},l);b=h+l;return g});window.cancelAnimationFrame||
(window.cancelAnimationFrame=function(f){clearTimeout(f)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=window.performance.now();this.handleApplicationEvent();return 0},exit:function(){},getDeviceOrientation:function(){if(window.screen.orientation!=null)switch(window.screen.orientation.type){case "landscape-primary":return 1;case "landscape-secondary":return 2;case "portrait-primary":return 3;case "portrait-secondary":return 4}return 0},handleApplicationEvent:function(a){a=
0;for(var b=this.parent.__windows;a<b.length;){var c=b[a];++a;c.__backend.updateSize()}this.updateGameDevices();this.currentUpdate=window.performance.now();if(this.currentUpdate>=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;a=0;for(b=this.parent.__windows;a<b.length;)c=b[a],++a,this.parent.onUpdate.dispatch(this.deltaTime|0),c.context!=null&&c.onRender.dispatch(c.context);this.nextUpdate=this.framePeriod<0?this.currentUpdate:this.currentUpdate-this.currentUpdate%this.framePeriod+
this.framePeriod;this.lastUpdate=this.currentUpdate}window.requestAnimationFrame(m(this,this.handleApplicationEvent))},handleKeyEvent:function(a){if(this.parent.__window!=null){var b=this.convertKeyCode(a.keyCode!=null?a.keyCode:a.which),c=(a.shiftKey?3:0)|(a.ctrlKey?192:0)|(a.altKey?768:0)|(a.metaKey?3072:0);a.type=="keydown"?(this.parent.__window.onKeyDown.dispatch(b,c),this.parent.__window.onKeyDown.canceled&&a.cancelable&&a.preventDefault()):(this.parent.__window.onKeyUp.dispatch(b,c),this.parent.__window.onKeyUp.canceled&&
a.cancelable&&a.preventDefault())}},handleSensorEvent:function(a){this.accelerometer.onUpdate.dispatch(a.accelerationIncludingGravity.x,a.accelerationIncludingGravity.y,a.accelerationIncludingGravity.z)},handleWindowEvent:function(a){if(this.parent.__window!=null)switch(a.type){case "blur":this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0);break;case "focus":this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),
this.hidden=!1);break;case "resize":this.parent.__window.__backend.handleResizeEvent(a);break;case "visibilitychange":window.document.hidden?this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0):this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1)}},updateGameDevices:function(){var a=Ce.__getDeviceData();if(a!=null)for(var b,c,d,f,g,h=0,l=a.length;h<l;)if(b=h++,f=a[b],f!=null){if(!this.gameDeviceCache.h.hasOwnProperty(b)){g=
new st;g.id=b;g.connected=f.connected;c=0;for(d=f.buttons.length;c<d;){var k=c++;g.buttons.push(f.buttons[k].value)}c=0;for(d=f.axes.length;c<d;)k=c++,g.axes.push(f.axes[k]);f.mapping=="standard"&&(g.isGamepad=!0);this.gameDeviceCache.h[b]=g;f.connected&&(Ce.__connect(b),g.isGamepad&&cf.__connect(b))}g=this.gameDeviceCache.h[b];d=Ce.devices.h[b];c=cf.devices.h[b];if(f.connected){for(var q=0,w=f.buttons.length;q<w;){var v=q++;k=f.buttons[v].value;if(k!=g.buttons[v]){if(v==6)d.onAxisMove.dispatch(f.axes.length,
k),c!=null&&c.onAxisMove.dispatch(4,k);else if(v==7)d.onAxisMove.dispatch(f.axes.length+1,k),c!=null&&c.onAxisMove.dispatch(5,k);else if(k>0?d.onButtonDown.dispatch(v):d.onButtonUp.dispatch(v),c!=null){switch(v){case 0:b=0;break;case 1:b=1;break;case 2:b=2;break;case 3:b=3;break;case 4:b=9;break;case 5:b=10;break;case 8:b=4;break;case 9:b=6;break;case 10:b=7;break;case 11:b=8;break;case 12:b=11;break;case 13:b=12;break;case 14:b=13;break;case 15:b=14;break;case 16:b=5;break;default:continue}k>0?c.onButtonDown.dispatch(b):
c.onButtonUp.dispatch(b)}g.buttons[v]=k}}b=0;for(k=f.axes.length;b<k;)q=b++,f.axes[q]!=g.axes[q]&&(d.onAxisMove.dispatch(q,f.axes[q]),c!=null&&c.onAxisMove.dispatch(q,f.axes[q]),g.axes[q]=f.axes[q])}else g.connected&&(g.connected=!1,Ce.__disconnect(b),cf.__disconnect(b))}},__class__:ya};var Ha=function(){this.onDeviceOrientationChange=new tt;this.onDisplayOrientationChange=new ut;this.onCreateWindow=new vt;this.onUpdate=new Ol;this.onExit=new Ol;Ha.current==null&&(Ha.current=this);this.meta=new aa;
this.modules=[];this.__windowByID=new we;this.__windows=[];this.__backend=new ya(this);this.__registerLimeModule(this);this.__preloader=new wt;this.__preloader.onProgress.add(m(this,this.onPreloadProgress));this.__preloader.onComplete.add(m(this,this.onPreloadComplete))};r["lime.app.Application"]=Ha;Ha.__name__="lime.app.Application";Ha.__super__=qa;Ha.prototype=I(qa.prototype,{meta:null,modules:null,onUpdate:null,onCreateWindow:null,onDisplayOrientationChange:null,onDeviceOrientationChange:null,
preloader:null,window:null,windows:null,__backend:null,__preloader:null,__window:null,__windowByID:null,__windows:null,addModule:function(a){a.__registerLimeModule(this);this.modules.push(a)},createWindow:function(a){a=this.__createWindow(a);this.__addWindow(a);return a},exec:function(){Ha.current=this;return this.__backend.exec()},onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){},onGamepadDisconnect:function(a){},
onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onKeyDown:function(a,b){},onKeyUp:function(a,b){},onModuleExit:function(a){},onMouseDown:function(a,b,c){},onMouseMove:function(a,b){},onMouseMoveRelative:function(a,b){},onMouseUp:function(a,b,c){},onMouseWheel:function(a,b,c){},onPreloadComplete:function(){},onPreloadProgress:function(a,
b){},onRenderContextLost:function(){},onRenderContextRestored:function(a){},onTextEdit:function(a,b,c){},onTextInput:function(a){},onTouchCancel:function(a){},onTouchEnd:function(a){},onTouchMove:function(a){},onTouchStart:function(a){},onWindowActivate:function(){},onWindowClose:function(){},onWindowCreate:function(){},onWindowDeactivate:function(){},onWindowDropFile:function(a){},onWindowEnter:function(){},onWindowExpose:function(){},onWindowFocusIn:function(){},onWindowFocusOut:function(){},onWindowFullscreen:function(){},
onWindowLeave:function(){},onWindowMove:function(a,b){},onWindowMinimize:function(){},onWindowResize:function(a,b){},onWindowRestore:function(){},removeModule:function(a){a!=null&&(a.__unregisterLimeModule(this),X.remove(this.modules,a))},render:function(a){},update:function(a){},__addWindow:function(a){if(a!=null){this.__windows.push(a);this.__windowByID.h[a.id]=a;var b=this;a.onClose.add(function(){b.__onWindowClose(a)},!1,-1E4);this.__window==null&&(this.__window=a,a.onActivate.add(m(this,this.onWindowActivate)),
a.onRenderContextLost.add(m(this,this.onRenderContextLost)),a.onRenderContextRestored.add(m(this,this.onRenderContextRestored)),a.onDeactivate.add(m(this,this.onWindowDeactivate)),a.onDropFile.add(m(this,this.onWindowDropFile)),a.onEnter.add(m(this,this.onWindowEnter)),a.onExpose.add(m(this,this.onWindowExpose)),a.onFocusIn.add(m(this,this.onWindowFocusIn)),a.onFocusOut.add(m(this,this.onWindowFocusOut)),a.onFullscreen.add(m(this,this.onWindowFullscreen)),a.onKeyDown.add(m(this,this.onKeyDown)),a.onKeyUp.add(m(this,
this.onKeyUp)),a.onLeave.add(m(this,this.onWindowLeave)),a.onMinimize.add(m(this,this.onWindowMinimize)),a.onMouseDown.add(m(this,this.onMouseDown)),a.onMouseMove.add(m(this,this.onMouseMove)),a.onMouseMoveRelative.add(m(this,this.onMouseMoveRelative)),a.onMouseUp.add(m(this,this.onMouseUp)),a.onMouseWheel.add(m(this,this.onMouseWheel)),a.onMove.add(m(this,this.onWindowMove)),a.onRender.add(m(this,this.render)),a.onResize.add(m(this,this.onWindowResize)),a.onRestore.add(m(this,this.onWindowRestore)),
a.onTextEdit.add(m(this,this.onTextEdit)),a.onTextInput.add(m(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(a)}},__createWindow:function(a){a=new Pl(this,a);return a.id==-1?null:a},__registerLimeModule:function(a){a.onUpdate.add(m(this,this.update));a.onExit.add(m(this,this.onModuleExit),!1,0);a.onExit.add(m(this,this.__onModuleExit),!1,-1E3);for(a=cf.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}cf.onConnect.add(m(this,this.__onGamepadConnect));
for(a=Ce.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);Ce.onConnect.add(m(this,this.__onJoystickConnect));De.onCancel.add(m(this,this.onTouchCancel));De.onStart.add(m(this,this.onTouchStart));De.onMove.add(m(this,this.onTouchMove));De.onEnd.add(m(this,this.onTouchEnd))},__removeWindow:function(a){a!=null&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),X.remove(this.__windows,a),this.__windowByID.remove(a.id),a.close(),this.__checkForAllWindowsClosed())},
__checkForAllWindowsClosed:function(){this.__windows.length==0&&Hb.exit(0)},__onGamepadConnect:function(a){this.onGamepadConnect(a);var b=this,c=function(h,l){b.onGamepadAxisMove(a,h,l)};a.onAxisMove.add(c);var d=this;c=function(h){d.onGamepadButtonDown(a,h)};a.onButtonDown.add(c);var f=this;c=function(h){f.onGamepadButtonUp(a,h)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onGamepadDisconnect(a)})},__onJoystickConnect:function(a){this.onJoystickConnect(a);var b=this,c=function(l,
k){b.onJoystickAxisMove(a,l,k)};a.onAxisMove.add(c);var d=this;c=function(l){d.onJoystickButtonDown(a,l)};a.onButtonDown.add(c);var f=this;c=function(l){f.onJoystickButtonUp(a,l)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onJoystickDisconnect(a)});var h=this;c=function(l,k){h.onJoystickHatMove(a,l,k)};a.onHatMove.add(c)},__onModuleExit:function(a){this.onExit.canceled||(this.__unregisterLimeModule(this),this.__backend.exit(),Ha.current==this&&(Ha.current=null))},__onWindowClose:function(a){if(this.__window==
a)this.onWindowClose();this.__removeWindow(a)},__unregisterLimeModule:function(a){a.onUpdate.remove(m(this,this.update));a.onExit.remove(m(this,this.__onModuleExit));a.onExit.remove(m(this,this.onModuleExit));cf.onConnect.remove(m(this,this.__onGamepadConnect));Ce.onConnect.remove(m(this,this.__onJoystickConnect));De.onCancel.remove(m(this,this.onTouchCancel));De.onStart.remove(m(this,this.onTouchStart));De.onMove.remove(m(this,this.onTouchMove));De.onEnd.remove(m(this,this.onTouchEnd))},get_preloader:function(){return this.__preloader},
get_window:function(){return this.__window},get_windows:function(){return this.__windows},get_deviceOrientation:function(){return this.__backend.getDeviceOrientation()},__class__:Ha,__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader",get_deviceOrientation:"get_deviceOrientation"}});var Yb=function(){};r.ApplicationMain=Yb;Yb.__name__="ApplicationMain";Yb.main=function(){Hb.__registerEntryPoint("TilBuci",Yb.create)};Yb.create=function(a){var b=new bo;b.meta.h.build=
"116";b.meta.h.company="TilBuci";b.meta.h.file="TilBuci";b.meta.h.name="TilBuci Runtime";b.meta.h.packageName="com.tilbuci.runtime";b.meta.h.version="20.0.0";var c={allowHighDPI:!0,alwaysOnTop:!1,borderless:!1,element:null,frameRate:60,height:0,hidden:!1,maximized:!1,minimized:!1,parameters:{},resizable:!0,title:"TilBuci Runtime",width:0,x:null,y:null,context:{antialiasing:0,background:0,colorDepth:32,depth:!0,hardware:!0,stencil:!0,type:null,vsync:!1}};if(b.__window==null&&a!=null)for(var d=0,f=
A.fields(a);d<f.length;){var g=f[d];++d;Object.prototype.hasOwnProperty.call(c,g)?c[g]=A.field(a,g):Object.prototype.hasOwnProperty.call(c.context,g)&&(c.context[g]=A.field(a,g))}b.createWindow(c);var h=new cq(new vd);b.__preloader.onProgress.add(function(k,q){h.update(k,q)});b.__preloader.onComplete.add(function(){h.start()});var l=b.__window.stage;h.onComplete.add(function(){Yb.start(l)});b.__preloader.load();b.exec()};Yb.start=function(a){if(a.__uncaughtErrorEvents.__enabled)try{var b=a.getChildAt(0);
b!=null&&b instanceof lb||(b=new Lj,a.addChild(b));new je(b);a.dispatchEvent(new ka("resize",!1,!1));a.window.__fullscreen&&a.dispatchEvent(new nj("fullScreen",!1,!1,!0,!0))}catch(c){Rb.lastError=c,b=la.caught(c).unwrap(),a.__handleError(b)}else b=a.getChildAt(0),b!=null&&b instanceof lb||(b=new Lj,a.addChild(b)),new je(b),a.dispatchEvent(new ka("resize",!1,!1)),a.window.__fullscreen&&a.dispatchEvent(new nj("fullScreen",!1,!1,!0,!0))};var qb=function(){};r["openfl.events.IEventDispatcher"]=qb;qb.__name__=
"openfl.events.IEventDispatcher";qb.__isInterface__=!0;qb.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:qb};var na=function(a){a!=null&&(this.__targetDispatcher=a)};r["openfl.events.EventDispatcher"]=na;na.__name__="openfl.events.EventDispatcher";na.__interfaces__=[qb];na.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=
!1);if(b!=null)if(this.__eventMap==null&&(this.__eventMap=new aa,this.__iterators=new aa),Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)){k=this.__eventMap.h[a];for(var g=0,h=k.length;g<h;){var l=g++;if(k[l].match(b,c))return}a=this.__iterators.h[a];for(g=0;g<a.length;)h=a[g],++g,h.active&&h.copy();this.__addListenerByPriority(k,new Ql(b,c,d,f))}else{var k=[];k.push(new Ql(b,c,d,f));h=new co(k);this.__eventMap.h[a]=k;this.__iterators.h[a]=[h]}},dispatchEvent:function(a){a.target=this.__targetDispatcher!=
null?this.__targetDispatcher:this;return this.__dispatchEvent(a)},hasEventListener:function(a){return this.__eventMap==null?!1:Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)},removeEventListener:function(a,b,c){c==null&&(c=!1);if(this.__eventMap!=null&&b!=null){var d=this.__eventMap.h[a];if(d!=null){for(var f=this.__iterators.h[a],g=0,h=d.length;g<h;){var l=g++;if(d[l].match(b,c)){for(b=0;b<f.length;)c=f[b],++b,c.remove(d[l],l);d.splice(l,1);break}}d.length==0&&(d=this.__eventMap,f=a,Object.prototype.hasOwnProperty.call(d.h,
f)&&delete d.h[f],d=this.__iterators,f=a,Object.prototype.hasOwnProperty.call(d.h,f)&&delete d.h[f]);0>=Object.keys(this.__eventMap.h).length&&(this.__iterators=this.__eventMap=null)}}},toString:function(){return"[object "+u.getClass(this).__name__.split(".").pop()+"]"},willTrigger:function(a){return this.hasEventListener(a)},__dispatchEvent:function(a){if(this.__eventMap==null||a==null)return!0;var b=a.type,c=this.__eventMap.h[b];if(c==null)return!0;a.target==null&&(a.target=this.__targetDispatcher!=
null?this.__targetDispatcher:this);a.currentTarget=this;var d=a.eventPhase==1;b=this.__iterators.h[b];var f=b[0];f.active&&(f=new co(c),b.push(f));f.start();for(var g=f;g.hasNext();){var h=g.next();if(h!=null&&h.useCapture==d){if(h.useWeakReference&&h.weakRefCallback!=null){var l=h.weakRefCallback.deref();if(l==null)l=f.index-1,c.splice(l,1),f.remove(h,l);else if(Oa.get_current()!=null&&Oa.get_current().stage!=null&&Oa.get_current().stage.__uncaughtErrorEvents.__enabled)try{l(a)}catch(k){Rb.lastError=
k,h=la.caught(k).unwrap(),a instanceof dl||Oa.get_current().stage.__handleError(h)}else l(a)}else if(Oa.get_current()!=null&&Oa.get_current().stage!=null&&Oa.get_current().stage.__uncaughtErrorEvents.__enabled)try{h.callback(a)}catch(k){Rb.lastError=k,h=la.caught(k).unwrap(),a instanceof dl||Oa.get_current().stage.__handleError(h)}else h.callback(a);if(a.__isCanceledNow)break}}f.stop();f!=b[0]?X.remove(b,f):f.reset(c);return!a.isDefaultPrevented()},__removeAllListeners:function(){this.__iterators=
this.__eventMap=null},__addListenerByPriority:function(a,b){for(var c=a.length,d=c,f=0;f<c;){var g=f++;if(a[g].priority<b.priority){d=g;break}}a.splice(d,0,b)},__class__:na};var $b=function(){};r["openfl.display.IBitmapDrawable"]=$b;$b.__name__="openfl.display.IBitmapDrawable";$b.__isInterface__=!0;$b.prototype={__blendMode:null,__drawableType:null,__isMask:null,__renderable:null,__renderTransform:null,__transform:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__getBounds:null,
__update:null,__updateTransforms:null,__mask:null,__scrollRect:null,__class__:$b};var gb={__properties__:{set_length:"set_length",get_length:"get_length",set_fixed:"set_fixed",get_fixed:"get_fixed"},concat:function(a,b){return a.concat(b)},copy:function(a){return a.copy()},every:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=g;if(c!=null){if(b.apply(c,[a.get(g),g,a])==0)break}else if(b(a.get(g),g,a)==0)break}return a.__tempIndex==a.get_length()-1},filter:function(a,b){return a.filter(b)},
get:function(a,b){return a.get(b)},indexOf:function(a,b,c){c==null&&(c=0);return a.indexOf(b,c)},insertAt:function(a,b,c){a.insertAt(b,c)},iterator:function(a){return a.iterator()},join:function(a,b){b==null&&(b=",");return a.join(b)},lastIndexOf:function(a,b,c){return a.lastIndexOf(b,c)},pop:function(a){return a.pop()},removeAt:function(a,b){return a.removeAt(b)},reverse:function(a){return a.reverse()},set:function(a,b,c){return a.set(b,c)},shift:function(a){return a.shift()},slice:function(a,b,
c){b==null&&(b=0);return a.slice(b,c)},some:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=g;if(c!=null){if(b.apply(c,[a.get(g),g,a])==1)break}else if(b(a.get(g),g,a))break;g==a.get_length()-1&&a.__tempIndex++}return a.__tempIndex<a.get_length()-1},sort:function(a,b){a.sort(b)},splice:function(a,b,c){for(var d=arguments.length,f=Array(d>3?d-3:0),g=3;g<d;++g)f[g-3]=arguments[g];a.__tempIndex=b;for(d=0;d<f.length;)g=f[d++],a.insertAt(a.__tempIndex,g),a.__tempIndex++;return a.splice(a.__tempIndex,
c)},toString:function(a){return a!=null?a.toString():null},ofValues:function(){for(var a=arguments.length,b=Array(a>0?a-0:0),c=0;c<a;++c)b[c-0]=arguments[c];a=gb.toNullVector(null);c=0;for(var d=b.length;c<d;){var f=c++;a.set(f,b[f])}return a},convert:function(a){return a},toBoolVector:function(a,b,c,d){return new Oi(b,c,d)},toIntVector:function(a,b,c,d){return new Pi(b,c,d)},toFloatVector:function(a,b,c,d){return new Qi(b,c,d,!0)},toFunctionVector:function(a,b,c,d){return new Ri(b,c,d)},toObjectVector:function(a,
b,c,d){return new xi(b,c,d,!0)},toNullVector:function(a,b,c,d){return new xi(b,c,d,!0)},fromBoolVector:function(a){return a},fromIntVector:function(a){return a},fromFloatVector:function(a){return a},fromFunctionVector:function(a){return a},fromObjectVector:function(a){return a},get_fixed:function(a){return a.fixed},set_fixed:function(a,b){return a.fixed=b},get_length:function(a){return a.get_length()},set_length:function(a,b){return a.set_length(b)}},Tb=function(a,b,c){this.__pool=new Na;this.inactiveObjects=
this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList=new Xa;a!=null&&(this.create=a);b!=null&&(this.clean=b);c!=null&&this.set_size(c)};r["lime.utils.ObjectPool"]=Tb;Tb.__name__="lime.utils.ObjectPool";Tb.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,__inactiveObjectList:null,__pool:null,__size:null,add:function(a){a==null||this.__pool.exists(a)||(this.__pool.set(a,!1),this.clean(a),this.__inactiveObject0==
null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++)},clean:function(a){},clear:function(){this.__pool=new Na;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList.clear()},create:function(){return null},get:function(){var a=null;if(this.inactiveObjects>0)this.__inactiveObject0!=null?(a=this.__inactiveObject0,this.__inactiveObject0=null):this.__inactiveObject1!=
null?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),this.__inactiveObjectList.length>0&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),this.__inactiveObjectList.length>0&&(this.__inactiveObject1=this.__inactiveObjectList.pop())),this.inactiveObjects--,this.activeObjects++;else if(this.__size==null||this.activeObjects<this.__size)a=this.create(),a!=null&&(this.__pool.set(a,!0),this.activeObjects++);return a},release:function(a){this.activeObjects--;
this.__size==null||this.activeObjects+this.inactiveObjects<this.__size?(this.clean(a),this.__inactiveObject0==null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++):this.__pool.remove(a)},remove:function(a){a!=null&&this.__pool.exists(a)&&(this.__pool.remove(a),this.__inactiveObject0==a?(this.__inactiveObject0=null,this.inactiveObjects--):this.__inactiveObject1==a?(this.__inactiveObject1=null,this.inactiveObjects--):
this.__inactiveObjectList.remove(a)?this.inactiveObjects--:this.activeObjects--)},__addInactive:function(a){this.__inactiveObject0==null?this.__inactiveObject0=a:this.__inactiveObject1==null?this.__inactiveObject1=a:this.__inactiveObjectList.add(a);this.inactiveObjects++},__getInactive:function(){if(this.__inactiveObject0!=null){var a=this.__inactiveObject0;this.__inactiveObject0=null}else this.__inactiveObject1!=null?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),
this.__inactiveObjectList.length>0&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),this.__inactiveObjectList.length>0&&(this.__inactiveObject1=this.__inactiveObjectList.pop()));this.inactiveObjects--;this.activeObjects++;return a},__removeInactive:function(a){if(!(a<=0||this.inactiveObjects==0)&&(this.__inactiveObject0!=null&&(this.__pool.remove(this.__inactiveObject0),this.__inactiveObject0=null,this.inactiveObjects--,--a),a!=0&&this.inactiveObjects!=0&&(this.__inactiveObject1!=null&&(this.__pool.remove(this.__inactiveObject1),
this.__inactiveObject1=null,this.inactiveObjects--,--a),a!=0&&this.inactiveObjects!=0)))for(var b=this.__inactiveObjectList.h;b!=null;){var c=b.item;b=b.next;this.__pool.remove(c);this.__inactiveObjectList.remove(c);this.inactiveObjects--;--a;if(a==0||this.inactiveObjects==0)break}},get_size:function(){return this.__size},set_size:function(a){if(a==null)this.__size=null;else{var b=this.inactiveObjects+this.activeObjects;this.__size=a;if(b>a)this.__removeInactive(b-a);else if(a>b)for(var c=0,d=a-b;c<
d;)if(c++,b=this.create(),b!=null)this.__pool.set(b,!1),this.__inactiveObjectList.add(b),this.inactiveObjects++;else break}return a},__class__:Tb,__properties__:{set_size:"set_size",get_size:"get_size"}};var ha=function(){};r["haxe.IMap"]=ha;ha.__name__="haxe.IMap";ha.__isInterface__=!0;ha.prototype={get:null,set:null,exists:null,remove:null,keys:null,iterator:null,keyValueIterator:null,__class__:ha};var Na=function(){this.h={__keys__:{}}};r["haxe.ds.ObjectMap"]=Na;Na.__name__="haxe.ds.ObjectMap";
Na.__interfaces__=[ha];Na.prototype={h:null,set:function(a,b){var c=a.__id__;c==null&&(c=a.__id__=sa.$haxeUID++);this.h[c]=b;this.h.__keys__[c]=a},get:function(a){return this.h[a.__id__]},exists:function(a){return this.h.__keys__[a.__id__]!=null},remove:function(a){a=a.__id__;if(this.h.__keys__[a]==null)return!1;delete this.h[a];delete this.h.__keys__[a];return!0},keys:function(){var a=[],b;for(b in this.h.__keys__)this.h.hasOwnProperty(b)&&a.push(this.h.__keys__[b]);return new zg(a)},iterator:function(){return{ref:this.h,
it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a.__id__]}}},keyValueIterator:function(){return new el(this)},toString:function(){var a="[";for(var b=this.keys();b.hasNext();){var c=b.next();a+=L.string(L.string(c));a+=" => ";a+=L.string(L.string(this.h[c.__id__]));b.hasNext()&&(a+=", ")}return a+"]"},__class__:Na};var Xa=function(){this.length=0};r["haxe.ds.List"]=Xa;Xa.__name__="haxe.ds.List";Xa.prototype={h:null,q:null,length:null,
add:function(a){a=new dq(a,null);this.h==null?this.h=a:this.q.next=a;this.q=a;this.length++},push:function(a){this.h=a=new dq(a,this.h);this.q==null&&(this.q=a);this.length++},pop:function(){if(this.h==null)return null;var a=this.h.item;this.h=this.h.next;this.h==null&&(this.q=null);this.length--;return a},isEmpty:function(){return this.h==null},clear:function(){this.q=this.h=null;this.length=0},remove:function(a){for(var b=null,c=this.h;c!=null;){if(c.item==a)return b==null?this.h=c.next:b.next=
c.next,this.q==c&&(this.q=b),this.length--,!0;b=c;c=c.next}return!1},iterator:function(){return new xt(this.h)},__class__:Xa};var ea=function(){this.__hasClippingLayer=!1;na.call(this);this.__alpha=this.__drawableType=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new S;this.__visible=!0;this.__rotationSine=this.__rotation=0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new S;this.__worldColorTransform=new ca;this.__renderTransform=
new S;this.__worldVisible=!0;this.set_name("instance"+ ++ea.__instanceCount);ea.__initStage!=null&&(this.stage=ea.__initStage,ea.__initStage=null,this.stage.addChild(this))};r["openfl.display.DisplayObject"]=ea;ea.__name__="openfl.display.DisplayObject";ea.__interfaces__=[$b];ea.__calculateAbsoluteTransform=function(a,b,c){c.a=a.a*b.a+a.b*b.c;c.b=a.a*b.b+a.b*b.d;c.c=a.c*b.a+a.d*b.c;c.d=a.c*b.b+a.d*b.d;c.tx=a.tx*b.a+a.ty*b.c+b.tx;c.ty=a.tx*b.b+a.ty*b.d+b.ty};ea.__super__=na;ea.prototype=I(na.prototype,
{__hasClippingLayer:null,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,__drawableType:null,__filters:null,__graphics:null,__interactive:null,
__isCacheBitmapRender:null,__isMask:null,__loaderInfo:null,__mask:null,__maskTarget:null,__metaData: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(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":Object.prototype.hasOwnProperty.call(ea.__broadcastEvents.h,
a)||(ea.__broadcastEvents.h[a]=[]);var g=ea.__broadcastEvents.h[a];g.indexOf(this)==-1&&g.push(this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.__customRenderEvent==null&&(this.__customRenderEvent=new Mj(null),this.__customRenderEvent.objectColorTransform=new ca,this.__customRenderEvent.objectMatrix=new S,this.__customRenderClear=!0)}na.prototype.addEventListener.call(this,a,b,c,d,f)},dispatchEvent:function(a){if(a instanceof Bc){var b=this.__getRenderTransform();
a.stageX=a.localX*b.a+a.localY*b.c+b.tx;b=this.__getRenderTransform();a.stageY=a.localX*b.b+a.localY*b.d+b.ty}else a instanceof Ef&&(b=this.__getRenderTransform(),a.stageX=a.localX*b.a+a.localY*b.c+b.tx,b=this.__getRenderTransform(),a.stageY=a.localX*b.b+a.localY*b.d+b.ty);a.target=this;return this.__dispatchWithCapture(a)},getBounds:function(a){var b=S.__pool.get();if(a!=null&&a!=this){b.copyFrom(this.__getWorldTransform());var c=S.__pool.get();c.copyFrom(a.__getWorldTransform());c.invert();b.concat(c);
S.__pool.release(c)}else b.identity();a=new Ea;this.__getBounds(a,b);S.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,new Qa)},hitTestObject:function(a){if(a!=null&&a.parent!=null&&this.parent!=null){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},hitTestPoint:function(a,b,c){c==null&&(c=!1);return this.stage!=null?this.__hitTest(a,b,c,null,!1,this):!1},invalidate:function(){this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty())},localToGlobal:function(a){return this.__getRenderTransform().transformPoint(a)},removeEventListener:function(a,b,c){c==null&&(c=!1);na.prototype.removeEventListener.call(this,a,b,c);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":this.hasEventListener(a)||Object.prototype.hasOwnProperty.call(ea.__broadcastEvents.h,a)&&X.remove(ea.__broadcastEvents.h[a],this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.hasEventListener("clearDOM")||
this.hasEventListener("renderCairo")||this.hasEventListener("renderCanvas")||this.hasEventListener("renderDOM")||this.hasEventListener("renderOpenGL")||(this.__customRenderEvent=null)}},__cleanup:function(){this.__cairo=null;this.__canvas!=null&&(this.__canvas.width=0,this.__canvas.height=0,this.__canvas=null);this.__context!=null&&(this.__context.clearRect(0,0,0,0),this.__context=null);this.__graphics!=null&&this.__graphics.__cleanup();this.__cacheBitmap!=null&&(this.__cacheBitmap.__cleanup(),this.__cacheBitmap=
null);this.__cacheBitmapData!=null&&(this.__cacheBitmapData.dispose(),this.__cacheBitmapData=null);this.__cacheBitmapData2!=null&&(this.__cacheBitmapData2.dispose(),this.__cacheBitmapData2=null);this.__cacheBitmapData3!=null&&(this.__cacheBitmapData3.dispose(),this.__cacheBitmapData3=null)},__dispatch:function(a){if(this.__eventMap!=null&&this.hasEventListener(a.type)){var b=na.prototype.__dispatchEvent.call(this,a);return a.__isCanceled?!0:b}return!0},__dispatchChildren:function(a){},__dispatchEvent:function(a){var b=
a.bubbles?this.parent:null,c=na.prototype.__dispatchEvent.call(this,a);if(a.__isCanceled)return!0;b!=null&&b!=this&&(a.eventPhase=3,a.target==null&&(a.target=this),b.__dispatchEvent(a));return c},__dispatchWithCapture:function(a){a.target==null&&(a.target=this);if(this.parent!=null)if(a.eventPhase=1,this.parent==this.stage)this.parent.__dispatch(a);else{for(var b=ea.__tempStack.get(),c=this.parent,d=0;c!=null;)b.set(d,c),c=c.parent,++d;c=0;for(var f=d;c<f;){var g=c++;b.get(d-g-1).__dispatch(a)}ea.__tempStack.release(b)}a.eventPhase=
2;return this.__dispatchEvent(a)},__enterFrame:function(a){},__getBounds:function(a,b){this.__graphics!=null&&this.__graphics.__getBounds(a,b)},__getCursor:function(){return null},__getFilterBounds:function(a,b){this.__getRenderBounds(a,b);if(this.__filters!=null){b=Ea.__pool.get();for(var c=0,d=this.__filters;c<d.length;){var f=d[c];++c;b.__expand(-f.__leftExtension,-f.__topExtension,f.__leftExtension+f.__rightExtension,f.__topExtension+f.__bottomExtension)}a.width+=b.width;a.height+=b.height;a.x+=
b.x;a.y+=b.y;Ea.__pool.release(b)}},__getInteractive:function(a){return!1},__getLocalBounds:function(a){this.__getBounds(a,this.__transform);a.x-=this.__transform.tx;a.y-=this.__transform.ty},__getRenderBounds:function(a,b){if(this.__scrollRect==null)this.__getBounds(a,b);else{var c=Ea.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)}},__getRenderTransform:function(){this.__getWorldTransform();return this.__renderTransform},__getWorldTransform:function(){if(this.__transformDirty||
this.__worldTransformInvalid){var a=[],b=this;if(this.parent==null)this.__update(!0,!1);else for(;b!=this.stage&&(a.push(b),b=b.parent,b!=null););for(var c=a.length;--c>=0;)b=a[c],b.__update(!0,!1)}return this.__worldTransform},__globalToLocal:function(a,b){this.__getRenderTransform();if(a==b){var c=this.__renderTransform,d=c.a*c.d-c.b*c.c;if(d==0)a.x=-c.tx,a.y=-c.ty;else{var f=1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx));a.y=1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));a.x=f}}else c=this.__renderTransform,d=c.a*c.d-
c.b*c.c,b.x=d==0?-c.tx:1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx)),c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.y=d==0?-c.ty:1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));return b},__hitTest:function(a,b,c,d,f,g){if(this.__graphics!=null){if(!g.__visible||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__graphics.__hitTest(a,b,c,this.__getRenderTransform()))return d==null||f||d.push(g),!0}return!1},__hitTestMask:function(a,b){return this.__graphics!=null&&this.__graphics.__hitTest(a,
b,!0,this.__getRenderTransform())?!0:!1},__readGraphicsData:function(a,b){this.__graphics!=null&&this.__graphics.__readGraphicsData(a)},__setParentRenderDirty:function(){var a=this.__renderParent!=null?this.__renderParent:this.parent;a==null||a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())},__setRenderDirty:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__setStageReference:function(a){this.stage=a},__setTransformDirty:function(){this.__transformDirty||
(this.__transformDirty=!0,this.__setWorldTransformInvalid(),this.__setParentRenderDirty())},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=!0},__stopAllMovieClips:function(){},__update:function(a,b){var c=this.__renderParent!=null?this.__renderParent:this.parent;this.__isMask&&c==null&&(c=this.__maskTarget);this.__renderable=this.__visible&&this.__scaleX!=0&&this.__scaleY!=0&&!this.__isMask&&(c==null||!c.__isMask);this.__updateTransforms();this.__worldTransformInvalid=this.__transformDirty=
!1;if(!a)if(ea.__supportDOM&&(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),this.__renderTransformCache==null?this.__renderTransformCache=this.__renderTransform.clone():this.__renderTransformCache.copyFrom(this.__renderTransform)),c!=null){if(ea.__supportDOM){var d=c.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=d;this.__worldVisible=d}d=this.get_alpha()*c.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=d;this.__worldAlpha=
d;this.__objectTransform!=null?(this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform),this.__worldColorTransform.__combine(c.__worldColorTransform)):this.__worldColorTransform.__copyFrom(c.__worldColorTransform);this.__worldBlendMode=this.__blendMode==null||this.__blendMode==10?c.__worldBlendMode:this.__blendMode;this.__worldShader=this.__shader==null?c.__shader:this.__shader;this.__worldScale9Grid=this.__scale9Grid==null?c.__scale9Grid:this.__scale9Grid}else this.__worldAlpha=
this.get_alpha(),ea.__supportDOM&&(this.__worldVisibleChanged=this.__worldVisible!=this.__visible,this.__worldVisible=this.__visible),this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha(),this.__objectTransform!=null?this.__worldColorTransform.__copyFrom(this.__objectTransform.__colorTransform):this.__worldColorTransform.__identity(),this.__worldBlendMode=this.__blendMode,this.__worldShader=this.__shader,this.__worldScale9Grid=this.__scale9Grid;b&&this.get_mask()!=null&&this.get_mask().__update(a,
!0)},__updateTransforms:function(a){var b=a!=null;a=b?a:this.__transform;this.__worldTransform==null&&(this.__worldTransform=new S);this.__renderTransform==null&&(this.__renderTransform=new S);var c=this.__renderParent!=null?this.__renderParent:this.parent;if(b||this.parent==null)this.__worldTransform.copyFrom(a);else{var d=this.parent.__worldTransform,f=this.__worldTransform;f.a=a.a*d.a+a.b*d.c;f.b=a.a*d.b+a.b*d.d;f.c=a.c*d.a+a.d*d.c;f.d=a.c*d.b+a.d*d.d;f.tx=a.tx*d.a+a.ty*d.c+d.tx;f.ty=a.tx*d.b+
a.ty*d.d+d.ty}b||c==null?this.__renderTransform.copyFrom(a):(d=c.__renderTransform,f=this.__renderTransform,f.a=a.a*d.a+a.b*d.c,f.b=a.a*d.b+a.b*d.d,f.c=a.c*d.a+a.d*d.c,f.d=a.c*d.b+a.d*d.d,f.tx=a.tx*d.a+a.ty*d.c+d.tx,f.ty=a.tx*d.b+a.ty*d.d+d.ty);this.__scrollRect!=null&&(b=this.__renderTransform,a=-this.__scrollRect.x,c=-this.__scrollRect.y,b.tx=a*b.a+c*b.c+b.tx,b.ty=a*b.b+c*b.d+b.ty)},__setMask:function(a){a!=this.__mask&&(this.__setTransformDirty(),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));
if(this.__mask!=null){this.__mask.__isMask=!1;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var b=this.__mask;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a!=null&&(a.__isMask=!0,a.__maskTarget=this,a.__setWorldTransformInvalid());this.__cacheBitmap!=null&&this.__cacheBitmap.get_clippingLayer()!=a&&this.__cacheBitmap.set_clippingLayer(a);this.__mask=a},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=a?a=0:a>1?a=1:a<0&&(a=0);a==this.__alpha||
this.get_cacheAsBitmap()||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__alpha=a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a==null&&(a=10);a==this.__blendMode||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__blendMode=a},get_cacheAsBitmap:function(){return this.__filters==null?this.__cacheAsBitmap:!0},set_cacheAsBitmap:function(a){a==this.__cacheAsBitmap||this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty());return this.__cacheAsBitmap=a},get_cacheAsBitmapMatrix:function(){return this.__cacheAsBitmapMatrix},set_cacheAsBitmapMatrix:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__cacheAsBitmapMatrix=a!=null?a.clone():a},get_filters:function(){return this.__filters==null?[]:this.__filters.slice()},set_filters:function(a){if(a!=null&&a.length>0){for(var b=[],c=0;c<a.length;){var d=a[c];++c;d=d.clone();d.__renderDirty=!0;
b.push(d)}this.__filters=b;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}else this.__filters!=null&&(this.__filters=null,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_height:function(){var a=Ea.__pool.get();this.__getLocalBounds(a);var b=a.height;Ea.__pool.release(a);return b},set_height:function(a){var b=Ea.__pool.get(),c=S.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);
Ea.__pool.release(b);S.__pool.release(c);return a},get_loaderInfo:function(){return this.stage!=null?fd.current.__loaderInfo:null},get_mask:function(){return this.__mask},set_mask:function(a){if(a==this.__mask)return a;a!=null&&a.__maskTarget!=null&&a.__maskTarget.set_mask(null);this.__setMask(a);return this.__mask},get_metaData:function(){return this.__metaData},set_metaData:function(a){return this.__metaData=a},get_clippingLayer:function(){return this.__hasClippingLayer?this.__mask:null},set_clippingLayer:function(a){this.__hasClippingLayer=
a!=null;this.__setMask(a);return this.__mask},get_mouseX:function(){var a=this.stage!=null?this.stage.__mouseX:fd.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:fd.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*c.c;return d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx))},get_mouseY:function(){var a=this.stage!=null?this.stage.__mouseX:fd.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:fd.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*
c.c;return d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a))},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},get_root:function(){return this.stage!=null?fd.current:null},get_rotation:function(){return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){a%=360;a>180?a-=360:a<-180&&(a+=360);this.__rotation=a;var b=Math.PI/180*this.__rotation;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);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 a},get_scale9Grid:function(){return this.__scale9Grid==null?null:this.__scale9Grid.clone()},set_scale9Grid:function(a){if(a==null&&this.__scale9Grid==null||a!=null&&this.__scale9Grid!=null&&this.__scale9Grid.equals(a))return a;a!=null?(this.__scale9Grid==null&&(this.__scale9Grid=new Ea),this.__scale9Grid.copyFrom(a)):
this.__scale9Grid=null;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_scaleX:function(){return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX)if(this.__scaleX=a,this.__rotation==0)a!=this.__transform.a&&this.__setTransformDirty(),this.__transform.a=a;else{var b=this.__rotationCosine*a,c=this.__rotationSine*a;this.__transform.a==b&&this.__transform.b==c||this.__setTransformDirty();this.__transform.a=b;this.__transform.b=c}return a},get_scaleY:function(){return this.__scaleY},
set_scaleY:function(a){if(a!=this.__scaleY)if(this.__scaleY=a,this.__rotation==0)a!=this.__transform.d&&this.__setTransformDirty(),this.__transform.d=a;else{var b=-this.__rotationSine*a,c=this.__rotationCosine*a;this.__transform.d==c&&this.__transform.c==b||this.__setTransformDirty();this.__transform.c=b;this.__transform.d=c}return a},get_scrollRect:function(){return this.__scrollRect==null?null:this.__scrollRect.clone()},set_scrollRect:function(a){if(a==null&&this.__scrollRect==null||a!=null&&this.__scrollRect!=
null&&this.__scrollRect.equals(a))return a;a!=null?(this.__scrollRect==null&&(this.__scrollRect=new Ea),this.__scrollRect.copyFrom(a),this.__scrollRect.width<0&&(this.__scrollRect.width=0),this.__scrollRect.height<0&&(this.__scrollRect.height=0)):this.__scrollRect=null;this.__setTransformDirty();ea.__supportDOM&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__scrollRect},get_shader:function(){return this.__shader},set_shader:function(a){this.__shader=a;this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_transform:function(){this.__objectTransform==null&&(this.__objectTransform=new eq(this));return this.__objectTransform},set_transform:function(a){if(a==null)throw new ne("Parameter transform must be non-null.");this.__objectTransform==null&&(this.__objectTransform=new eq(this));this.__setTransformDirty();if(a.__hasMatrix){var b=a.__displayObject.__transform;this.__objectTransform.__setTransform(b.a,b.b,b.c,b.d,b.tx,b.ty)}else this.__objectTransform.__hasMatrix=
!1;if(!this.__objectTransform.__colorTransform.__equals(a.__colorTransform,!0)||!this.get_cacheAsBitmap()&&this.__objectTransform.__colorTransform.alphaMultiplier!=a.__colorTransform.alphaMultiplier)this.__objectTransform.__colorTransform.__copyFrom(a.get_colorTransform()),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(a){a==this.__visible||this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty());return this.__visible=a},get_width:function(){var a=Ea.__pool.get();this.__getLocalBounds(a);var b=a.width;Ea.__pool.release(a);return b},set_width:function(a){var b=Ea.__pool.get(),c=S.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);Ea.__pool.release(b);S.__pool.release(c);return a},get_x:function(){return this.__transform.tx},set_x:function(a){a!=a&&(a=0);a!=this.__transform.tx&&this.__setTransformDirty();
return this.__transform.tx=a},get_y:function(){return this.__transform.ty},set_y:function(a){a!=a&&(a=0);a!=this.__transform.ty&&this.__setTransformDirty();return this.__transform.ty=a},__class__:ea,__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_shader:"set_shader",get_shader:"get_shader",set_scrollRect:"set_scrollRect",
get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_scale9Grid:"set_scale9Grid",get_scale9Grid:"get_scale9Grid",set_rotation:"set_rotation",get_rotation:"get_rotation",get_root:"get_root",set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_clippingLayer:"set_clippingLayer",get_clippingLayer:"get_clippingLayer",set_metaData:"set_metaData",get_metaData:"get_metaData",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_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Da=function(){ea.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=
!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=-1};r["openfl.display.InteractiveObject"]=Da;Da.__name__="openfl.display.InteractiveObject";Da.__super__=ea;Da.prototype=I(ea.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){fd.notImplemented({fileName:"openfl/display/InteractiveObject.hx",lineNumber:1255,className:"openfl.display.InteractiveObject",
methodName:"requestSoftKeyboard"});return!1},__allowMouseFocus:function(){return this.mouseEnabled?this.get_tabEnabled():!1},__getInteractive:function(a){a!=null&&(a.push(this),this.parent!=null&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,f,g){return!g.get_visible()||this.__isMask||f&&!this.mouseEnabled?!1:ea.prototype.__hitTest.call(this,a,b,c,d,f,g)},__tabTest:function(a){this.get_tabEnabled()&&a.push(this)},get_tabEnabled:function(){return this.__tabEnabled==1?!0:!1},
set_tabEnabled:function(a){this.__tabEnabled!=a&&(this.__tabEnabled=a,this.dispatchEvent(new ka("tabEnabledChange",!0,!1)));return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},set_tabIndex:function(a){if(this.__tabIndex!=a){if(a<-1)throw new oe("Parameter tabIndex must be a non-negative number; got "+a);this.__tabIndex=a;this.dispatchEvent(new ka("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:Da,__properties__:I(ea.prototype.__properties__,{set_tabIndex:"set_tabIndex",
get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var lb=function(){Da.call(this);this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=gb.toObjectVector(null)};r["openfl.display.DisplayObjectContainer"]=lb;lb.__name__="openfl.display.DisplayObjectContainer";lb.__super__=Da;lb.prototype=I(Da.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(a){return this.addChildAt(a,this.get_numChildren())},
addChildAt:function(a,b){if(a==null)throw a=new ne("Error #2007: Parameter child must be non-null."),a.errorID=2007,a;if(a==this)throw a=new rb("Error #2024: An object cannot be added as a child of itself."),a.errorID=2024,a;if(a.stage==a)throw a=new rb("Error #3783: A Stage object cannot be added as the child of another object."),a.errorID=3783,a;if(b>this.__children.length||b<0)throw la.thrown("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(X.remove(this.__children,a),this.__children.splice(b,
0,a),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));else{a.parent!=null&&a.parent.removeChild(a);this.__children.splice(b,0,a);a.parent=this;(b=this.stage!=null&&a.stage==null)&&a.__setStageReference(this.stage);a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var c=new ka("added");c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);b&&(c=new ka("addedToStage",
!1,!1),a.__dispatchWithCapture(c),a.__dispatchChildren(c))}return a},areInaccessibleObjectsUnderPoint:function(a){return!1},contains:function(a){for(;a!=this&&a!=null;)a=a.parent;return a==this},getChildAt:function(a){return a>=0&&a<this.__children.length?this.__children[a]:null},getChildByName:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},getChildIndex:function(a){for(var b=0,c=this.__children.length;b<c;){var d=b++;if(this.__children[d]==
a)return d}return-1},getObjectsUnderPoint:function(a){var b=[];this.__hitTest(a.x,a.y,!1,b,!1,this);b.reverse();return b},removeChild:function(a){if(a!=null&&a.parent==this){a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var b=new ka("removed",!0);a.__dispatchWithCapture(b);this.stage!=null&&(a.stage!=null&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new ka("removedFromStage",
!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;X.remove(this.__children,a);this.__removedChildren.push(a);a.__setTransformDirty()}return a},removeChildAt:function(a){return a>=0&&a<this.__children.length?this.removeChild(this.__children[a]):null},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(b==2147483647&&(b=this.__children.length-1,b<0))return;if(!(a>this.__children.length-1)){if(b<a||a<0||b>this.__children.length)throw new oe("The supplied index is out of bounds.");
for(b-=a;b>=0;)this.removeChildAt(a),--b}},resolve:function(a){if(this.__children==null)return null;for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},setChildIndex:function(a,b){b>=0&&b<=this.__children.length&&a.parent==this&&(X.remove(this.__children,a),this.__children.splice(b,0,a))},stopAllMovieClips:function(){this.__stopAllMovieClips()},swapChildren:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__children.indexOf(a),d=this.__children.indexOf(b);
this.__children[c]=b;this.__children[d]=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},swapChildrenAt:function(a,b){var c=this.__children[a];this.__children[a]=this.__children[b];this.__children[b]=c;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__cleanup:function(){Da.prototype.__cleanup.call(this);for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__cleanup()}for(a=this.__removedChildren.iterator();a.hasNext();)b=a.next(),b.stage==
null&&b.__cleanup();this.__removedChildren.set_length(0)},__cleanupRemovedChildren:function(){for(var a=this.__removedChildren.iterator();a.hasNext();){var b=a.next();b.stage==null&&b.__cleanup()}this.__removedChildren.set_length(0)},__dispatchChildren:function(a){if(this.__children!=null)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;a.target=d;if(!d.__dispatchWithCapture(a))break;d.__dispatchChildren(a)}},__enterFrame:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];
++b;d.__enterFrame(a)}},__getBounds:function(a,b){Da.prototype.__getBounds.call(this,a,b);if(this.__children.length!=0){for(var c=S.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0||g.__scaleY!=0){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;g.__getBounds(a,c)}}S.__pool.release(c)}},__getFilterBounds:function(a,b){Da.prototype.__getFilterBounds.call(this,a,
b);if(this.__scrollRect==null&&this.__children.length!=0){for(var c=S.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0&&g.__scaleY!=0&&!g.__isMask){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;h=Ea.__pool.get();g.__getFilterBounds(h,c);a.__expand(h.x,h.y,h.width,h.height);Ea.__pool.release(h)}}S.__pool.release(c)}},__getRenderBounds:function(a,b){if(this.__scrollRect!=
null)Da.prototype.__getRenderBounds.call(this,a,b);else if(Da.prototype.__getBounds.call(this,a,b),this.__children.length!=0){for(var c=S.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(g.__scaleX!=0&&g.__scaleY!=0&&!g.__isMask){var h=g.__transform;c.a=h.a*b.a+h.b*b.c;c.b=h.a*b.b+h.b*b.d;c.c=h.c*b.a+h.d*b.c;c.d=h.c*b.b+h.d*b.d;c.tx=h.tx*b.a+h.ty*b.c+b.tx;c.ty=h.tx*b.b+h.ty*b.d+b.ty;g.__getRenderBounds(a,c)}}S.__pool.release(c)}},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||
this.__isMask||f&&!this.mouseEnabled&&!this.mouseChildren||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__scrollRect!=null){var h=Qa.__pool.get();h.setTo(a,b);var l=this.__getRenderTransform(),k=l.a*l.d-l.b*l.c;if(k==0)h.x=-l.tx,h.y=-l.ty;else{var q=1/k*(l.c*(l.ty-h.y)+l.d*(h.x-l.tx));h.y=1/k*(l.a*(h.y-l.ty)+l.b*(l.tx-h.x));h.x=q}if(!this.__scrollRect.containsPoint(h))return Qa.__pool.release(h),!1;Qa.__pool.release(h)}h=this.__children.length;if(f)if(d==null||!this.mouseChildren)for(;--h>=
0;){if(this.__children[h].__hitTest(a,b,c,null,!0,this.__children[h]))return d!=null&&d.push(g),!0}else{if(d!=null){f=d.length;for(k=!1;--h>=0&&!(((l=this.__children[h].__getInteractive(null))||this.mouseEnabled&&!k)&&this.__children[h].__hitTest(a,b,c,d,!0,this.__children[h])&&(k=!0,l&&d.length>f)););if(k)return d.splice(f,0,g),!0}}else{for(k=!1;--h>=0&&(!this.__children[h].__hitTest(a,b,c,d,!1,this.__children[h])||(k=!0,d!=null)););return k}return!1},__hitTestMask:function(a,b){for(var c=this.__children.length;--c>=
0;)if(this.__children[c].__hitTestMask(a,b))return!0;return!1},__readGraphicsData:function(a,b){Da.prototype.__readGraphicsData.call(this,a,b);if(b)for(var c=0,d=this.__children;c<d.length;){var f=d[c];++c;f.__readGraphicsData(a,b)}},__setStageReference:function(a){Da.prototype.__setStageReference.call(this,a);if(this.__children!=null)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__setStageReference(a)}},__setWorldTransformInvalid:function(){if(!this.__worldTransformInvalid&&(this.__worldTransformInvalid=
!0,this.__children!=null))for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__setWorldTransformInvalid()}},__stopAllMovieClips:function(){for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__stopAllMovieClips()}},__tabTest:function(a){Da.prototype.__tabTest.call(this,a);if(this.get_tabChildren())for(var b,c=0,d=this.__children;c<d.length;){var f=d[c];++c;if(b=f.__getInteractive(null))b=f,b.__tabTest(a)}},__update:function(a,b){Da.prototype.__update.call(this,a,b);if(b){b=0;for(var c=
this.__children;b<c.length;){var d=c[b];++b;d.__update(a,!0)}}},get_numChildren:function(){return this.__children.length},get_tabChildren:function(){return this.__tabChildren},set_tabChildren:function(a){this.__tabChildren!=a&&(this.__tabChildren=a,this.dispatchEvent(new ka("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:lb,__properties__:I(Da.prototype.__properties__,{set_tabChildren:"set_tabChildren",get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var za=
function(){lb.call(this);this.__drawableType=4;this.__buttonMode=!1;this.useHandCursor=!0;if(this.__pendingBindLibrary!=null){var a=this.__pendingBindLibrary,b=this.__pendingBindClassName;this.__pendingBindClassName=this.__pendingBindLibrary=null;a.bind(b,this)}else za.__constructor!=null&&(a=za.__constructor,za.__constructor=null,a(this))};r["openfl.display.Sprite"]=za;za.__name__="openfl.display.Sprite";za.fromTimeline=function(a){var b=new za;a.initializeSprite(b);return b};za.__super__=lb;za.prototype=
I(lb.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,__pendingBindClassName:null,__pendingBindLibrary:null,startDrag:function(a,b){a==null&&(a=!1);this.stage!=null&&this.stage.__startDrag(this,a,b)},stopDrag:function(){this.stage!=null&&this.stage.__stopDrag(this)},__setStageReference:function(a){this.stage!=a&&this.stage!=null&&this.stage.__dragObject==this&&this.stopDrag();lb.prototype.__setStageReference.call(this,a)},__bind:function(a,b){this.__worldTransform==null?
(this.__pendingBindLibrary=a,this.__pendingBindClassName=b):a!=null&&b!=null&&a.bind(b,this)||Mb.error('Cannot bind class name "'+b+'"',{fileName:"openfl/display/Sprite.hx",lineNumber:297,className:"openfl.display.Sprite",methodName:"__bind"})},__getCursor:function(){return this.__buttonMode&&this.useHandCursor?"button":null},__hitTest:function(a,b,c,d,f,g){if(f&&!this.mouseEnabled&&!this.mouseChildren)return!1;if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,
b))return this.__hitTestHitArea(a,b,c,d,f,g);if(this.__scrollRect!=null){var h=Qa.__pool.get();h.setTo(a,b);var l=this.__getRenderTransform(),k=l.a*l.d-l.b*l.c;if(k==0)h.x=-l.tx,h.y=-l.ty;else{var q=1/k*(l.c*(l.ty-h.y)+l.d*(h.x-l.tx));h.y=1/k*(l.a*(h.y-l.ty)+l.b*(l.tx-h.x));h.x=q}if(!this.__scrollRect.containsPoint(h))return Qa.__pool.release(h),this.__hitTestHitArea(a,b,c,d,!0,g);Qa.__pool.release(h)}return lb.prototype.__hitTest.call(this,a,b,c,d,f,g)?d!=null?f:!0:this.hitArea==null&&this.__graphics!=
null&&this.__graphics.__hitTest(a,b,c,this.__getRenderTransform())?(d==null||f&&!this.mouseEnabled||d.push(g),!0):this.__hitTestHitArea(a,b,c,d,f,g)},__hitTestHitArea:function(a,b,c,d,f,g){return this.hitArea==null||this.hitArea.mouseEnabled?!1:(this.hitArea.mouseEnabled=!0,a=this.hitArea.__hitTest(a,b,c,null,!0,g),this.hitArea.mouseEnabled=!1,d!=null&&a&&(d[d.length]=g),a)},__hitTestMask:function(a,b){return lb.prototype.__hitTestMask.call(this,a,b)||this.__graphics!=null&&this.__graphics.__hitTest(a,
b,!0,this.__getRenderTransform())?!0:!1},get_graphics:function(){this.__graphics==null&&(this.__graphics=new Dh(this));return this.__graphics},get_tabEnabled:function(){return this.__tabEnabled==null?this.__buttonMode:this.__tabEnabled},get_buttonMode:function(){return this.__buttonMode},set_buttonMode:function(a){return this.__buttonMode=a},__class__:za,__properties__:I(lb.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var Fb=
function(){this._movie="";za.call(this);var a=this.get_loaderInfo().parameters;if(Object.prototype.hasOwnProperty.call(a,"fonts")){a=A.field(this.get_loaderInfo().parameters,"fonts");for(var b=0;b<a.length;){var c=a[b];++b;new ih(c[1],c[0])}}a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"movie")&&(this._movie=A.field(this.get_loaderInfo().parameters,"movie"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"scene")&&(Fb.scene=A.field(this.get_loaderInfo().parameters,
"scene"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"ws")&&(Fb.ws=A.field(this.get_loaderInfo().parameters,"ws"));a=this.get_loaderInfo().parameters;if(Object.prototype.hasOwnProperty.call(a,"vars")){try{var d=Xh.decode(A.field(this.get_loaderInfo().parameters,"vars")).toString()}catch(g){d=null}if(d!=null)for(d=mb.jsonAsMap(d),a=Object.keys(d.h),b=a.length,c=0;c<b;){var f=a[c++];Fb.iniVars.h[f]=d.h[f]}}a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,
"moviePath")&&(Fb.moviePath=A.field(this.get_loaderInfo().parameters,"moviePath"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"assets")&&(Fb.assetsPath=A.field(this.get_loaderInfo().parameters,"assets"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"decrypt")&&(kd.customDecrypt=A.field(this.get_loaderInfo().parameters,"decrypt"));if(this._movie!="")if(this.stage!=null)this.onStage();else this.addEventListener("addedToStage",m(this,this.onStage))};
r.Main=Fb;Fb.__name__="Main";Fb.__super__=za;Fb.prototype=I(za.prototype,{_movie:null,_tilbuci:null,onStage:function(a){this.hasEventListener("addedToStage")&&this.removeEventListener("addedToStage",m(this,this.onStage));this._tilbuci=new Gd;this._tilbuci.registerPlugin(new fq);this._tilbuci.registerPlugin(new gq);this._tilbuci.registerPlugin(new hq);this._tilbuci.registerPlugin(new iq);this._tilbuci.registerPlugin(new ee);this.addChild(this._tilbuci);this.stage.addEventListener("resize",m(this,this.onResize));
this.onResize();this._tilbuci.load(this._movie)},onResize:function(a){this._tilbuci.setSize(this.stage.stageWidth,this.stage.stageHeight)},__class__:Fb});var je=function(a){a.addChild(this);Fb.call(this);this.dispatchEvent(new ka("addedToStage",!1,!1))};r.DocumentClass=je;je.__name__="DocumentClass";je.__super__=Fb;je.prototype=I(Fb.prototype,{__class__:je});var oc=function(){};r.DateTools=oc;oc.__name__="DateTools";oc.__format_get=function(a,b){switch(b){case "%":return"%";case "A":return oc.DAY_NAMES[a.getDay()];
case "B":return oc.MONTH_NAMES[a.getMonth()];case "C":return Z.lpad(L.string(a.getFullYear()/100|0),"0",2);case "D":return oc.__format(a,"%m/%d/%y");case "F":return oc.__format(a,"%Y-%m-%d");case "M":return Z.lpad(L.string(a.getMinutes()),"0",2);case "R":return oc.__format(a,"%H:%M");case "S":return Z.lpad(L.string(a.getSeconds()),"0",2);case "T":return oc.__format(a,"%H:%M:%S");case "Y":return L.string(a.getFullYear());case "a":return oc.DAY_SHORT_NAMES[a.getDay()];case "d":return Z.lpad(L.string(a.getDate()),
"0",2);case "e":return L.string(a.getDate());case "b":case "h":return oc.MONTH_SHORT_NAMES[a.getMonth()];case "H":case "k":return Z.lpad(L.string(a.getHours()),b=="H"?"0":" ",2);case "I":case "l":return a=a.getHours()%12,Z.lpad(L.string(a==0?12:a),b=="I"?"0":" ",2);case "m":return Z.lpad(L.string(a.getMonth()+1),"0",2);case "n":return"\n";case "p":return a.getHours()>11?"PM":"AM";case "r":return oc.__format(a,"%I:%M:%S %p");case "s":return L.string(a.getTime()/1E3|0);case "t":return"\t";case "u":return b=
a.getDay(),b==0?"7":b==null?"null":""+b;case "w":return L.string(a.getDay());case "y":return Z.lpad(L.string(a.getFullYear()%100),"0",2);default:throw new Qm("Date.format %"+b+"- not implemented yet.",null,{fileName:"DateTools.hx",lineNumber:101,className:"DateTools",methodName:"__format_get"});}};oc.__format=function(a,b){for(var c="",d=0;;){var f=b.indexOf("%",d);if(f<0)break;var g=f-d;c+=g==null?X.substr(b,d,null):X.substr(b,d,g);c+=L.string(oc.__format_get(a,X.substr(b,f+1,1)));d=f+2}g=b.length-
d;return c+=g==null?X.substr(b,d,null):X.substr(b,d,g)};oc.format=function(a,b){return oc.__format(a,b)};var sb=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};r.EReg=sb;sb.__name__="EReg";sb.prototype={r:null,match:function(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return this.r.m!=null},matched:function(a){if(this.r.m!=null&&a>=0&&a<this.r.m.length)return this.r.m[a];throw la.thrown("EReg::matched");},matchedRight:function(){if(this.r.m==null)throw la.thrown("No string matched");
var a=this.r.m.index+this.r.m[0].length;return X.substr(this.r.s,a,this.r.s.length-a)},matchedPos:function(){if(this.r.m==null)throw la.thrown("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(a,b,c){c==null&&(c=-1);if(this.r.global){if(this.r.lastIndex=b,this.r.m=this.r.exec(c<0?a:X.substr(a,0,b+c)),c=this.r.m!=null)this.r.s=a}else if(c=this.match(c<0?X.substr(a,b,null):X.substr(a,b,c)))this.r.s=a,this.r.m.index+=b;return c},split:function(a){return a.replace(this.r,
"#__delim__#").split("#__delim__#")},map:function(a,b){var c=0,d="";do{if(c>=a.length)break;else if(!this.matchSub(a,c)){d+=L.string(X.substr(a,c,null));break}var f=this.matchedPos();d+=L.string(X.substr(a,c,f.pos-c));d+=L.string(b(this));f.len==0?(d+=L.string(X.substr(a,f.pos,1)),c=f.pos+1):c=f.pos+f.len}while(this.r.global);!this.r.global&&c>0&&c<a.length&&(d+=L.string(X.substr(a,c,null)));return d},__class__:sb};var X=function(){};r.HxOverrides=X;X.__name__="HxOverrides";X.dateStr=function(a){var b=
a.getMonth()+1,c=a.getDate(),d=a.getHours(),f=a.getMinutes(),g=a.getSeconds();return a.getFullYear()+"-"+(b<10?"0"+b:""+b)+"-"+(c<10?"0"+c:""+c)+" "+(d<10?"0"+d:""+d)+":"+(f<10?"0"+f:""+f)+":"+(g<10?"0"+g:""+g)};X.strDate=function(a){switch(a.length){case 8:a=a.split(":");var b=new Date;b.setTime(0);b.setUTCHours(a[0]);b.setUTCMinutes(a[1]);b.setUTCSeconds(a[2]);return b;case 10:return a=a.split("-"),new Date(a[0],a[1]-1,a[2],0,0,0);case 19:return a=a.split(" "),b=a[0].split("-"),a=a[1].split(":"),
new Date(b[0],b[1]-1,b[2],a[0],a[1],a[2]);default:throw la.thrown("Invalid date format : "+a);}};X.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};X.substr=function(a,b,c){if(c==null)c=a.length;else if(c<0)if(b==0)c=a.length+c;else return"";return a.substr(b,c)};X.remove=function(a,b){b=a.indexOf(b);if(b==-1)return!1;a.splice(b,1);return!0};X.now=function(){return Date.now()};var V=function(){};r.Lambda=V;V.__name__="Lambda";V.array=function(a){var b=[];for(a=Ga(a);a.hasNext();){var c=a.next();
b.push(c)}return b};V.count=function(a,b){var c=0;if(b==null)for(b=Ga(a);b.hasNext();)b.next(),++c;else for(a=Ga(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};Math.__name__="Math";var vd=function(){za.call(this);this._ast=new Sc;this._ast.addEventListener("change",m(this,this.onAstChange));this._ast.addEventListener("complete",m(this,this.onAstComplete));this.stage!=null&&(this.get_graphics().beginFill(6710886),this.get_graphics().drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight),this.get_graphics().endFill());
this.addEventListener("complete",m(this,this.onComplete));this.addEventListener("progress",m(this,this.onProgress))};r.Preloader=vd;vd.__name__="Preloader";vd.__super__=za;vd.prototype=I(za.prototype,{_ast:null,onProgress:function(a){},onComplete:function(a){a.stopImmediatePropagation();a.preventDefault()},onAstChange:function(a){if(this.stage!=null){this.get_graphics().clear();this.get_graphics().beginFill(6710886);this.get_graphics().drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight);this.get_graphics().endFill();
a=this._ast.complete/100*this.stage.stageWidth;var b=this._ast.complete/100*this.stage.stageHeight;this.get_graphics().beginFill(0);this.get_graphics().drawRect(this.stage.stageWidth/2-a/2,this.stage.stageHeight/2-b/2,a,b);this.get_graphics().endFill()}},onAstComplete:function(a){this._ast.removeEventListener("change",m(this,this.onAstChange));this._ast.removeEventListener("complete",m(this,this.onAstComplete));this._ast=null;this.get_graphics().clear();a.preventDefault();this.dispatchEvent(new ka("unload"))},
__class__:vd});var A=function(){};r.Reflect=A;A.__name__="Reflect";A.field=function(a,b){try{return a[b]}catch(c){return Rb.lastError=c,null}};A.getProperty=function(a,b){var c;if(a==null)return null;var d=a.__properties__?c=a.__properties__["get_"+b]:!1;return d?a[c]():a[b]};A.setProperty=function(a,b,c){var d;var f=a.__properties__?d=a.__properties__["set_"+b]:!1;if(f)a[d](c);else a[b]=c};A.fields=function(a){var b=[];if(a!=null){var c=Object.prototype.hasOwnProperty,d;for(d in a)d!="__id__"&&d!=
"hx__closures__"&&c.call(a,d)&&b.push(d)}return b};A.isFunction=function(a){return typeof a=="function"?!(a.__name__||a.__ename__):!1};A.compare=function(a,b){return a==b?0:a>b?1:-1};A.isEnumValue=function(a){return a!=null?a.__enum__!=null:!1};A.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};A.makeVarArgs=function(a){return function(){var b=arguments;b=Array.prototype.slice.call(b);return a(b)}};var L=function(){};r.Std=L;L.__name__="Std";L.string=
function(a){return u.__string_rec(a,"")};L.parseInt=function(a){a=parseInt(a);return isNaN(a)?null:a};L.random=function(a){return a<=0?0:Math.floor(Math.random()*a)};var ec=function(){this.b=""};r.StringBuf=ec;ec.__name__="StringBuf";ec.prototype={b:null,__class__:ec};var Z=function(){};r.StringTools=Z;Z.__name__="StringTools";Z.htmlEscape=function(a,b){for(var c="",d=0,f=a;d<f.length;){a=f;var g=d++,h=a.charCodeAt(g);h>=55296&&h<=56319&&(h=h-55232<<10|a.charCodeAt(g+1)&1023);a=h;a>=65536&&++d;switch(a){case 34:c=
b?c+"&quot;":c+String.fromCodePoint(a);break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(a);break;case 60:c+="&lt;";break;case 62:c+="&gt;";break;default:c+=String.fromCodePoint(a)}}return c};Z.htmlUnescape=function(a){return a.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").join("&")};Z.startsWith=function(a,b){return a.length>=b.length?a.lastIndexOf(b,0)==0:!1};Z.endsWith=function(a,b){var c=b.length,d=
a.length;return d>=c?a.indexOf(b,d-c)==d-c:!1};Z.isSpace=function(a,b){a=X.cca(a,b);return a>8&&a<14?!0:a==32};Z.ltrim=function(a){for(var b=a.length,c=0;c<b&&Z.isSpace(a,c);)++c;return c>0?X.substr(a,c,b-c):a};Z.rtrim=function(a){for(var b=a.length,c=0;c<b&&Z.isSpace(a,b-c-1);)++c;return c>0?X.substr(a,0,b-c):a};Z.trim=function(a){return Z.ltrim(Z.rtrim(a))};Z.lpad=function(a,b,c){if(b.length<=0)return a;var d="";for(c-=a.length;d.length<c;)d+=b==null?"null":""+b;return d+(a==null?"null":""+a)};
Z.replace=function(a,b,c){return a.split(b).join(c)};Z.hex=function(a,b){var c="";do c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4;while(a>0);if(b!=null)for(;c.length<b;)c="0"+c;return c};var nb=O.ValueType={__ename__:"ValueType",__constructs__:null,TNull:{_hx_name:"TNull",_hx_index:0,__enum__:"ValueType",toString:D},TInt:{_hx_name:"TInt",_hx_index:1,__enum__:"ValueType",toString:D},TFloat:{_hx_name:"TFloat",_hx_index:2,__enum__:"ValueType",toString:D},TBool:{_hx_name:"TBool",_hx_index:3,__enum__:"ValueType",
toString:D},TObject:{_hx_name:"TObject",_hx_index:4,__enum__:"ValueType",toString:D},TFunction:{_hx_name:"TFunction",_hx_index:5,__enum__:"ValueType",toString:D},TClass:(G=function(a){return{_hx_index:6,c:a,__enum__:"ValueType",toString:D}},G._hx_name="TClass",G.__params__=["c"],G),TEnum:(G=function(a){return{_hx_index:7,e:a,__enum__:"ValueType",toString:D}},G._hx_name="TEnum",G.__params__=["e"],G),TUnknown:{_hx_name:"TUnknown",_hx_index:8,__enum__:"ValueType",toString:D}};nb.__constructs__=[nb.TNull,
nb.TInt,nb.TFloat,nb.TBool,nb.TObject,nb.TFunction,nb.TClass,nb.TEnum,nb.TUnknown];var Aa=function(){};r.Type=Aa;Aa.__name__="Type";Aa.resolveEnum=function(a){return O[a]};Aa.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};Aa.createEnum=function(a,b,c){var d=A.field(a,b);if(d==null)throw la.thrown("No such constructor "+b);if(A.isFunction(d)){if(c==null)throw la.thrown("Constructor "+b+" need parameters");return d.apply(a,c)}if(c!=null&&c.length!=0)throw la.thrown("Constructor "+
b+" does not need parameters");return d};Aa.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);X.remove(b,"__class__");X.remove(b,"__properties__");return b};Aa.typeof=function(a){switch(typeof a){case "boolean":return nb.TBool;case "function":return a.__name__||a.__ename__?nb.TObject:nb.TFunction;case "number":return Math.ceil(a)==a%2147483648?nb.TInt:nb.TFloat;case "object":if(a==null)return nb.TNull;var b=a.__enum__;if(b!=null)return nb.TEnum(O[b]);a=u.getClass(a);return a!=
null?nb.TClass(a):nb.TObject;case "string":return nb.TClass(String);case "undefined":return nb.TNull;default:return nb.TUnknown}};Aa.enumEq=function(a,b){if(a==b)return!0;try{var c=a.__enum__;if(c==null||c!=b.__enum__||a._hx_index!=b._hx_index)return!1;var d=O[c].__constructs__[a._hx_index].__params__;for(c=0;c<d.length;){var f=d[c];++c;if(!Aa.enumEq(a[f],b[f]))return!1}}catch(g){return Rb.lastError=g,!1}return!0};Aa.enumParameters=function(a){var b=O[a.__enum__].__constructs__[a._hx_index].__params__;
if(b!=null){for(var c=[],d=0;d<b.length;){var f=b[d];++d;c.push(a[f])}return c}return[]};var ta={gt:function(a,b){var c=a<0;return c!=b<0?c:a>b},toFloat:function(a){return a<0?4294967296+a:a+0}},hd={toString:function(a){switch(a){case 0:return"Element";case 1:return"PCData";case 2:return"CData";case 3:return"Comment";case 4:return"DocType";case 5:return"ProcessingInstruction";case 6:return"Document"}}},cb=function(a){this.nodeType=a;this.children=[];this.attributeMap=new aa};r.Xml=cb;cb.__name__=
"Xml";cb.parse=function(a){return fl.parse(a)};cb.createElement=function(a){var b=new cb(cb.Element);if(b.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeName=a;return b};cb.createPCData=function(a){var b=new cb(cb.PCData);if(b.nodeType==cb.Document||b.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeValue=a;return b};cb.createCData=function(a){var b=
new cb(cb.CData);if(b.nodeType==cb.Document||b.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeValue=a;return b};cb.createComment=function(a){var b=new cb(cb.Comment);if(b.nodeType==cb.Document||b.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeValue=a;return b};cb.createDocType=function(a){var b=new cb(cb.DocType);if(b.nodeType==cb.Document||b.nodeType==
cb.Element)throw la.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeValue=a;return b};cb.createProcessingInstruction=function(a){var b=new cb(cb.ProcessingInstruction);if(b.nodeType==cb.Document||b.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":hd.toString(b.nodeType)));b.nodeValue=a;return b};cb.createDocument=function(){return new cb(cb.Document)};cb.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,
children:null,attributeMap:null,get:function(a){if(this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":hd.toString(this.nodeType)));return this.attributeMap.h[a]},set:function(a,b){if(this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":hd.toString(this.nodeType)));this.attributeMap.h[a]=b},exists:function(a){if(this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+
(this.nodeType==null?"null":hd.toString(this.nodeType)));return Object.prototype.hasOwnProperty.call(this.attributeMap.h,a)},attributes:function(){if(this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":hd.toString(this.nodeType)));return new jq(this.attributeMap.h)},addChild:function(a){if(this.nodeType!=cb.Document&&this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element or Document but found "+(this.nodeType==null?
"null":hd.toString(this.nodeType)));a.parent!=null&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=cb.Document&&this.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element or Document but found "+(this.nodeType==null?"null":hd.toString(this.nodeType)));return X.remove(this.children,a)?(a.parent=null,!0):!1},toString:function(){return Rm.print(this)},__class__:cb};var Gd=function(a,b,c,d,f){d==null&&(d=!0);this._touchDistance=this._touchDistanceCheck=
this._touchStartTime=this._lastmwheel=0;this._touchStart=new Qa;this._toggles=new aa;this._numerics=new aa;this._tareas=new aa;this._inputs=new aa;this.inputArea=null;this._frames=0;this._firstScene=!1;this._lastMovie="";this._firstMovie=!1;this._rWidth=this._rHeight=0;za.call(this);p.session=oc.format(new Date,"%Y-%m-%d_%H:%M:%S")+"_"+mb.random();p.session=X.substr(p.session,0,32);b==null&&(b="player");this.setMode(b);p.build=new Nj(b=="player"&&a!=null);p.nocache=d;p.callback=f;a==null?(p.nocache=
!1,this.onPlayerConf(!0,null,!0)):(b=null,d&&(d=new aa,d.h.rand=Math.ceil(Math.random()*1E4),b=d),new kd(!0,a,"GET",b,4,m(this,this.onPlayerConf)));if(this.stage==null)this.addEventListener("addedToStage",m(this,this.onStage));else this.onStage(null)};r["com.tilbuci.Player"]=Gd;Gd.__name__="com.tilbuci.Player";Gd.__super__=za;Gd.prototype=I(za.prototype,{label:null,rWidth:null,_rWidth:null,get_rWidth:function(){return this._rWidth},rHeight:null,_rHeight:null,get_rHeight:function(){return this._rHeight},
tHeight:null,get_tHeight:function(){p.area.setOverlay(!1);this.removeChild(this._uiArea);var a=this.get_height();p.area.setOverlay(!0);this.addChild(this._uiArea);return a},mWidth:null,get_mWidth:function(){return p.area.get_aWidth()},mHeight:null,get_mHeight:function(){return p.area.get_aHeight()},_bgarea:null,_firstMovie:null,_lastMovie:null,_firstScene:null,_display:null,_mask:null,_background:null,_scrOrient:null,_frames:null,_frameTimer:null,_fpsStart:null,_uiArea:null,inputArea:null,_inputs:null,
_tareas:null,_numerics:null,_toggles:null,_touchStart:null,_touchDistance:null,_touchDistanceCheck:null,_touchStartTime:null,_touchHoldTimer:null,_touchTimer:null,_lastmwheel:null,setMode:function(a){p.mode=a=="editor"?"editor":"player"},setSize:function(a,b){this._rWidth=a;this._rHeight=b;p.area!=null&&p.area.setArea()},load:function(a){this._lastMovie=p.movie.get_mvId();this._firstScene=!0;p.movie.loadMovie(a)},registerPlugin:function(a){var b=p.plugins,c=a.get_plname();b.h[c]=a;p.ready&&this.initializePlugins()},
removePlugin:function(a){if(Object.prototype.hasOwnProperty.call(p.plugins.h,a)){p.plugins.h[a].kill();var b=p.plugins;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];return!0}return!1},initializePlugins:function(){for(var a=p.plugins.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.get_ready()||f.initialize(new yt(p.parser.getVarRef("string"),p.parser.getVarRef("float"),p.parser.getVarRef("int"),p.parser.getVarRef("bool"),p.parser))}},halt:function(a){this.removeChildren();var b=
"System down :-(";switch(a){case "language":b="Error while loading the default language file.";break;case "noconf":b="Error while loading the basic system configuration.";break;case "nomovie":b=p.ln.get("player-nomovie");break;case "noscene":b=p.ln.get("player-noscene")}a=new yd;a.set_layout(new Sm);a.setPadding(10);var c=new bc;c.set_text(b);c.set_layoutData(Hd.center());a.addChild(c);Ub.addPopUp(a,this)},onPlayerConf:function(a,b,c){c==null&&(c=!1);if(c)p.ln=new Pa,p.base="./",p.font="./font/",
p.render="webgl",p.share="never",Fb.moviePath!=""&&(p.base=Fb.moviePath),p.fps="free",p.secret=Ia.ofHex(""),Object.prototype.hasOwnProperty.call(Fb,"ws")&&A.field(Fb,"ws")!=""?(p.ws=new Tm(A.field(Fb,"ws"),""),p.server=!0):(p.ws=new Tm("./ws/",""),p.server=!1),p.movie=new xb(m(this,this.onMovie),m(this,this.onScene)),p.parser=new yi,p.parser.eventSend=m(this,this.warnListeners),p.ready=!0,p.mode=="player"&&Fb.us!=""&&Fb.uk!=""&&p.ws.checkVisitorKey(Fb.us,Fb.uk,m(this,this.onKeyCheck)),this._bgarea=
new za,p.mode!="editor"&&this.addChild(this._bgarea),this._uiArea=new za,p.area=new gl(this,this._bgarea,this._uiArea),this.addChild(p.area),this.addChild(this._uiArea),this.initializePlugins(),new kq,p.mode=="player"&&(this._firstScene=this._firstMovie=!0);else if(a)if(p.ln=new Pa,p.ln.get_ok()){p.server=b.map.h.server;p.base=b.map.h.base;p.font=b.map.h.font;p.render=b.map.h.render;p.share=b.map.h.share;p.fps=b.map.h.fps;p.secret=Ia.ofHex(b.map.h.secret);p.ws=new Tm(b.map.h.ws,"");p.movie=new xb(m(this,
this.onMovie),m(this,this.onScene));p.parser=new yi;p.parser.eventSend=m(this,this.warnListeners);Fb.moviePath!=""&&(p.base=Fb.moviePath);if(p.mode=="player"){if(Object.prototype.hasOwnProperty.call(b.map.h,"systemfonts")){a=b.map.h.systemfonts;c=0;for(var d=a.length;c<d;){var f=c++;new ih(p.font+a[f].file,a[f].name)}}Fb.us!=""&&Fb.uk!=""&&p.ws.checkVisitorKey(Fb.us,Fb.uk,m(this,this.onKeyCheck))}new kq;p.ready=!0;this._bgarea=new za;p.mode!="editor"&&this.addChild(this._bgarea);this._uiArea=new za;
p.area=new gl(this,this._bgarea,this._uiArea);this.addChild(p.area);this.addChild(this._uiArea);this.initializePlugins();p.mode=="player"&&(this._firstScene=this._firstMovie=!0,a="",Object.prototype.hasOwnProperty.call(Fb,"movie")&&(a=A.field(Fb,"movie")),a==""?this.load(b.map.h.start):(this.load(a),Object.prototype.hasOwnProperty.call(Fb,"movie")&&(Fb.movie="")));p.fps!="free"&&p.fps!="calc"&&(b=L.parseInt(p.fps),this.stage.window.__backend.setFrameRate(b))}else this.halt("language");else this.halt("noconf")},
onKeyCheck:function(a,b){a&&b.map.h.e==0&&p.ws.setUser(Fb.us,b.map.h.key,b.map.h.groups)},onMovie:function(a){if(p.mode=="player"&&!a)this._firstMovie?this.halt("nomovie"):this._lastMovie!=""?(this._firstMovie=!0,this.load(this._lastMovie)):this.halt("nomovie");else if(a){p.area.hideTarget();p.area.clearTarget();p.area.setArea();p.mdata.key!=""&&p.mode=="player"&&p.mdata.key!=p.secretKey&&(a="Please type the access key.",Object.prototype.hasOwnProperty.call(p.mdata.texts.h,"secretkey")&&(a=p.mdata.texts.h.secretkey),
p.area.showSecretKeyInput(a));if(this._firstMovie){var b=Fb.iniVars.h;a=Object.keys(b);var c=a.length;for(b=0;b<c;){var d=a[b++];p.parser.setString(d,Fb.iniVars.h[d])}}a=[];c=b=p.plugins.h;b=Object.keys(b);d=b.length;for(var f=0;f<d;){var g=c[b[f++]];g.active&&(a.push(g.get_pltitle()+" ("+g.get_plname()+")"),g.info.onNewMovie(p.mdata.title,p.movie.get_mvId(),p.mdata.screen.big,p.mdata.screen.small))}p.callback!=null&&(c=p.callback,b=new aa,d=p.movie.get_mvId(),b.h.id=d,c("movieload",b));Me.trace(p.mdata.title+
" movie loaded.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:599,className:"com.tilbuci.Player",methodName:"onMovie"});a.length==0?Me.trace("No plugins used.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:600,className:"com.tilbuci.Player",methodName:"onMovie"}):Me.trace("Plugins used: "+a.join(", ")+".",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:601,className:"com.tilbuci.Player",methodName:"onMovie"});b=new aa;d=p.movie.get_mvId();b.h.id=d;b.h.title=p.mdata.title;this.dispatchEvent(new Ag("movie_loaded",
b))}},onScene:function(a){p.mode=="player"&&!a&&this._firstScene&&this.halt("noscene");p.area.noMouseOver();a=p.plugins.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];if(f.active&&f.get_ready())f.info.onNewScene(p.movie.scene.title,p.movie.get_scId(),p.movie.scene.keyframes.length)}p.mode=="player"&&(p.share=="scene"?window.TBB_setAddress(p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId(),p.mdata.title+" > "+p.movie.scene.title):p.share=="movie"?window.TBB_setAddress(p.base+
"app/?mv="+p.movie.get_mvId(),p.mdata.title):p.share=="website"&&(p.mdata.start==p.movie.get_scId()?window.TBB_setAddress(p.base,p.mdata.title):window.TBB_setAddress(p.base+p.movie.get_scId()+".html",p.mdata.title)));p.area.loadKeyframe(p.movie.scene.keyframes[0],0);this._firstScene&&p.mode!="editor"&&p.movie.data.acstart!=""&&p.parser.run(p.movie.data.acstart);p.movie.scene.acstart!=""&&p.mode!="editor"&&p.parser.run(p.movie.scene.acstart);if(p.mode=="player"&&p.fps=="calc"){if(this._frameTimer!=
null){try{this._frameTimer.stop()}catch(g){}this._frameTimer=null}this._fpsStart=new rd(2E3);this._fpsStart.run=m(this,this.fpsCount)}p.callback!=null&&(a=p.callback,b=new aa,c=p.movie.get_scId(),b.h.id=c,a("sceneload",b));b=new aa;c=p.movie.get_scId();b.h.id=c;b.h.title=p.movie.scene.title;this.dispatchEvent(new Ag("scene_loaded",b));this._firstScene=this._firstMovie=!1},fpsCount:function(){var a=this;if(p.mode=="player"&&p.fps=="calc"){if(this._fpsStart!=null){try{this._fpsStart.stop()}catch(c){}this._fpsStart=
null}this.stage.hasEventListener("enterFrame")&&this.removeEventListener("enterFrame",m(this,this.onFrame));if(this._fpsStart!=null){try{this._fpsStart.stop()}catch(c){}this._fpsStart=null}this.stage!=null&&(this.stage.window.__backend.setFrameRate(80),this._frames=0,this.addEventListener("enterFrame",m(this,this.onFrame)),this._frameTimer=new rd(2E3),this._frameTimer.run=function(){try{a._frameTimer.stop()}catch(d){}a._frameTimer=null;a.stage.hasEventListener("enterFrame")&&a.removeEventListener("enterFrame",
m(a,a.onFrame));var c=Math.round(a._frames/2);c<=29?a.stage.window.__backend.setFrameRate(20):c<=39?a.stage.window.__backend.setFrameRate(30):c<=49?a.stage.window.__backend.setFrameRate(40):c<=59?a.stage.window.__backend.setFrameRate(50):a.stage.window.__backend.setFrameRate(60)})}else if(p.fps!="free"){var b=L.parseInt(p.fps);this.stage.window.__backend.setFrameRate(b)}},onFrame:function(a){this._frames++},onStage:function(a){this.hasEventListener("addedToStage")&&this.removeEventListener("addedToStage",
m(this,this.onStage));p.mode=="player"&&(this.stage.addEventListener("touchBegin",m(this,this.onTouchBegin)),this.stage.addEventListener("touchEnd",m(this,this.onTouchEnd)),this.stage.addEventListener("keyDown",m(this,this.onKeyboard)),this.stage.addEventListener("mouseWheel",m(this,this.onMouseWheel)),this.stage.addEventListener("middleClick",m(this,this.onMouseMiddle)),this.stage.addEventListener("rightClick",m(this,this.onMouseRight)),this.stage.addEventListener("click",m(this,this.onLeftClick)))},
listenInput:function(){this.stage.addEventListener("touchBegin",m(this,this.onTouchBegin));this.stage.addEventListener("touchEnd",m(this,this.onTouchEnd));this.stage.addEventListener("keyDown",m(this,this.onKeyboard));this.stage.addEventListener("mouseWheel",m(this,this.onMouseWheel));this.stage.addEventListener("middleClick",m(this,this.onMouseMiddle));this.stage.addEventListener("rightClick",m(this,this.onMouseRight))},listenInputRemove:function(){this.stage.removeEventListener("touchBegin",m(this,
this.onTouchBegin));this.stage.removeEventListener("touchEnd",m(this,this.onTouchEnd));this.stage.removeEventListener("keyDown",m(this,this.onKeyboard));this.stage.removeEventListener("mouseWheel",m(this,this.onMouseWheel));this.stage.removeEventListener("middleClick",m(this,this.onMouseMiddle));this.stage.removeEventListener("rightClick",m(this,this.onMouseRight))},onTouchMove:function(a){a.touchPointID==1&&(new Date).getTime()-this._touchDistanceCheck>=250&&(a=Math.sqrt(Math.pow(a.stageX-this._touchStart.x,
2)+Math.pow(a.stageY-this._touchStart.y,2)),a-this._touchDistance>0?Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchopen"):Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchclose"),this._touchDistanceCheck=(new Date).getTime())},onTouchBegin:function(a){if(a.touchPointID==0)this._touchStart.x=a.stageX,this._touchStart.y=a.stageY,this._touchStartTime=(new Date).getTime();else if(a.touchPointID==1&&(this._touchDistance=Math.sqrt(Math.pow(a.stageX-
this._touchStart.x,2)+Math.pow(a.stageY-this._touchStart.y,2)),this._touchDistanceCheck=(new Date).getTime(),this.stage.addEventListener("touchMove",m(this,this.onTouchMove)),p.parser.onDrag!=null))p.parser.onDragMoveStop(null)},onTouchEnd:function(a){if(a.touchPointID==0){if((new Date).getTime()-this._touchStartTime<300){var b=this._touchStart.x-a.stageX,c=this._touchStart.y-a.stageY;if(Math.abs(b)>Math.abs(c)){if(Math.abs(b)>this.stage.stageWidth/15){p.canTrigger=!1;b>0?p.parser.runInput("swiperight"):
p.parser.runInput("swipeleft");if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new rd(300);this._touchTimer.run=m(this,this.endTouch)}}else if(Math.abs(c)>this.stage.stageHeight/15){p.canTrigger=!1;c>0?p.parser.runInput("swipebottom"):p.parser.runInput("swipetop");if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new rd(300);this._touchTimer.run=m(this,this.endTouch)}}else if((new Date).getTime()-
this._touchStartTime>1200&&(p.canTrigger=!1,p.parser.runInput("touchhold")||(p.canTrigger=!0),!p.canTrigger)){if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(d){}this._touchTimer=null}this._touchTimer=new rd(300);this._touchTimer.run=m(this,this.endTouch)}this._touchStart.x=a.stageX;this._touchStart.y=a.stageY}else a.touchPointID==1&&(a=Math.sqrt(Math.pow(a.stageX-this._touchStart.x,2)+Math.pow(a.stageY-this._touchStart.y,2)),a-this._touchDistance>0?Math.abs(a-this._touchDistance)>p.area.get_aWidth()/
20&&p.parser.runInput("pinchopen"):Math.abs(a-this._touchDistance)>p.area.get_aWidth()/20&&p.parser.runInput("pinchclose"),this.stage.hasEventListener("touchMove")&&this.stage.removeEventListener("touchMove",m(this,this.onTouchMove)))},endTouch:function(){if(this._touchTimer!=null){try{this._touchTimer.stop()}catch(a){}this._touchTimer=null}p.canTrigger=!0},onKeyboard:function(a){var b=p.parser.checkKeyboard(a.keyCode);if(!b)for(var c=p.plugins.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]];
h.active&&!b&&(b=h.checkKeyboard(a.keyCode))}},onMouseWheel:function(a){this.stage.get_focus()instanceof cd&&this._lastmwheel<(new Date).getTime()-750&&(this._lastmwheel=(new Date).getTime(),a.delta<0?p.parser.checkMouse("mousewheeldown"):a.delta>0&&p.parser.checkMouse("mousewheelup"))},onMouseMiddle:function(a){this.stage.get_focus()instanceof cd&&(p.parser.checkMouse("mousemiddle"),p.parser.hadInteraction=!0)},onMouseRight:function(a){this.stage.showDefaultContextMenu=!0;this.stage.get_focus()instanceof
cd&&p.parser.checkMouse("mouseright")&&(this.stage.showDefaultContextMenu=!1,p.parser.hadInteraction=!0)},onLeftClick:function(a){this.stage.removeEventListener("click",m(this,this.onLeftClick));p.parser.hadInteraction=!0},warnListeners:function(a){this.dispatchEvent(new Ag("event",a));p.callback!=null&&p.callback("custom",a)},getStringValue:function(a){return p.parser.getString(a)},getFloatValue:function(a){return p.parser.getFloat(a)},getIntValue:function(a){return p.parser.getInt(a)},getBoolValue:function(a){return p.parser.getBool(a)},
runAction:function(a){return p.parser.run(a)},addInput:function(a,b,c,d,f){f==null&&(f="");if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var g=this._inputs,h=new Wc;g.h[a]=h;f!=""&&this._inputs.h[a].set_prompt(f);this.inputArea.addChild(this._inputs.h[a])}this.placeInput(a,b,c,d)}},addTarea:function(a,b,c,d,f){if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._tareas.h,a)){var g=this._tareas,h=new df;g.h[a]=h;this.inputArea.addChild(this._tareas.h[a])}this.placeTarea(a,
b,c,d,f)}},placeInput:function(a,b,c,d){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&(this._inputs.h[a].set_x(b),this._inputs.h[a].set_y(c),this._inputs.h[a].set_width(d))},placeTarea:function(a,b,c,d,f){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._tareas.h,a)&&(this._tareas.h[a].set_x(b),this._tareas.h[a].set_y(c),this._tareas.h[a].set_width(d),this._tareas.h[a].set_height(f))},removeInput:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._inputs.h,
a)){this.inputArea.removeChild(this._inputs.h[a]);var b=this._inputs;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeTarea:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._tareas.h,a)){this.inputArea.removeChild(this._tareas.h[a]);var b=this._tareas;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllInputs:function(){if(this.inputArea!=null)for(var a=Object.keys(this._inputs.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeInput(d)}},
removeAllTareas:function(){if(this.inputArea!=null)for(var a=Object.keys(this._tareas.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeTarea(d)}},getInputText:function(a){return Object.prototype.hasOwnProperty.call(this._inputs.h,a)?this._inputs.h[a].get_text():""},getTareaText:function(a){return Object.prototype.hasOwnProperty.call(this._tareas.h,a)?this._tareas.h[a].get_text():""},setInputText:function(a,b){Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&this._inputs.h[a].set_text(b)},setTareaText:function(a,
b){Object.prototype.hasOwnProperty.call(this._tareas.h,a)&&this._tareas.h[a].set_text(b)},setInputPassword:function(a,b){Object.prototype.hasOwnProperty.call(this._inputs.h,a)&&this._inputs.h[a].set_displayAsPassword(b)},addNumeric:function(a,b,c,d,f){if(this.inputArea!=null&&!Object.prototype.hasOwnProperty.call(this._numerics.h,a)){var g=this._numerics;c=new id(b,c,d);g.h[a]=c;this._numerics.h[a].set_step(f);this._numerics.h[a].set_value(b);this.inputArea.addChild(this._numerics.h[a])}},placeNumeric:function(a,
b,c,d){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&(this._numerics.h[a].set_x(b),this._numerics.h[a].set_y(c),this._numerics.h[a].set_width(d))},removeNumeric:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._numerics.h,a)){this.inputArea.removeChild(this._numerics.h[a]);var b=this._numerics;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllNumerics:function(){if(this.inputArea!=null)for(var a=Object.keys(this._numerics.h),
b=a.length,c=0;c<b;){var d=a[c++];this.removeNumeric(d)}},getNumericValue:function(a){return Object.prototype.hasOwnProperty.call(this._numerics.h,a)?Math.round(this._numerics.h[a].get_value()):0},setNumericValue:function(a,b){Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&this._numerics.h[a].set_value(b)},setNumericBounds:function(a,b,c,d){Object.prototype.hasOwnProperty.call(this._numerics.h,a)&&(this._numerics.h[a].set_minimum(b),this._numerics.h[a].set_maximum(c),this._numerics.h[a].set_step(d))},
addToggle:function(a,b,c,d){if(this.inputArea!=null){if(!Object.prototype.hasOwnProperty.call(this._toggles.h,a)){var f=this._toggles;b=new uk(b);f.h[a]=b;this.inputArea.addChild(this._toggles.h[a])}this.placeToggle(a,c,d)}},placeToggle:function(a,b,c){this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._toggles.h,a)&&(this._toggles.h[a].set_x(b),this._toggles.h[a].set_y(c))},removeToggle:function(a){if(this.inputArea!=null&&Object.prototype.hasOwnProperty.call(this._toggles.h,a)){this.inputArea.removeChild(this._toggles.h[a]);
var b=this._toggles;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},removeAllToggles:function(){if(this.inputArea!=null)for(var a=Object.keys(this._toggles.h),b=a.length,c=0;c<b;){var d=a[c++];this.removeToggle(d)}},getToggleValue:function(a){return Object.prototype.hasOwnProperty.call(this._toggles.h,a)?this._toggles.h[a].get_selected():!1},setToggleValue:function(a,b){Object.prototype.hasOwnProperty.call(this._toggles.h,a)&&this._toggles.h[a].set_selected(b)},invertToggle:function(a){Object.prototype.hasOwnProperty.call(this._toggles.h,
a)&&this._toggles.h[a].set_selected(!this._toggles.h[a].get_selected())},__class__:Gd,__properties__:I(za.prototype.__properties__,{get_mHeight:"get_mHeight",get_mWidth:"get_mWidth",get_tHeight:"get_tHeight",get_rHeight:"get_rHeight",get_rWidth:"get_rWidth"})});var Xc=function(a){this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.BackgroundContraption"]=Xc;Xc.__name__="com.tilbuci.contraptions.BackgroundContraption";Xc.__super__=za;Xc.prototype=I(za.prototype,{ok:null,id:null,
landscape:null,portrait:null,_landscape:null,_portrait:null,create:function(a,b){this.ok&&this.removeChildren();return this},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new Xc(this.toObject())},getCover:function(){this.removeChildren();p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small),this.addChild(this._landscape)):(this._portrait.set_width(p.mdata.screen.big),
this._portrait.set_height(p.mdata.screen.small),this.addChild(this._portrait)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big),this.addChild(this._portrait)):(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big),this.addChild(this._landscape));return this},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,
"portrait")?(this.portrait=A.field(a,"portrait"),this.portrait!=""&&(this._portrait=new Vc(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",Object.prototype.hasOwnProperty.call(a,"landscape")?(this.landscape=A.field(a,"landscape"),this.landscape!=""&&(this._landscape=new Vc(m(this,this.onPicLoad)),this._landscape.set_visible(!0))):this.landscape="",this.portrait==null&&(this.portrait=""),this.landscape==null&&(this.landscape=""),this.landscape!=""||this.portrait!="")?(this._landscape!=
null&&this._landscape.load(this.landscape),this._portrait!=null&&this._portrait.load(this.portrait),this.mouseChildren=this.mouseEnabled=!1,!0):!1},onPicLoad:function(a){p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big)):
(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big))},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this._landscape!=null&&this._landscape.kill();this._portrait!=null&&this._portrait.kill();this.id=this.portrait=this.landscape=this._portrait=this._landscape=null},toObject:function(){return{id:this.id,landscape:this.landscape,portrait:this.portrait}},__class__:Xc});var K=function(){this._timerParam=0;this._won=!1;
this._onloose=this._onwin=null;this.attributes=[];this.horizontal=this.vertical=this.close=this.card=this.attrbg=this.soundpick=this.soundwin=this.soundloose=this.soundtie="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;za.call(this);this._playerData=new Ca;this._opponentData=new Ca};r["com.tilbuci.contraptions.BattleContraption"]=K;K.__name__="com.tilbuci.contraptions.BattleContraption";K.__super__=za;K.prototype=I(za.prototype,{ok:null,id:null,font:null,fontcolor:null,
fontsize:null,horizontal:null,vertical:null,close:null,card:null,attrbg:null,soundpick:null,soundwin:null,soundloose:null,soundtie:null,attributes:null,_hbitmap:null,_vbitmap:null,_cbitmap:null,_abitmap:null,_onloose:null,_onwin:null,_player:null,_playerCurent:null,_opponent:null,_opponentCurent:null,_pcards:null,_ocards:null,_cardsize:null,_playerData:null,_opponentData:null,_won:null,_timer:null,_timerParam:null,compare:function(a){this._timer==null&&(this._opponent.showAttrVal(a),this.soundpick!=
""&&p.contraptions.soundPlay(p.parser.parseString(this.soundpick)),this._player.pulse(a),this._opponent.pulse(a),this._timerParam=a,this._timer=new rd(500),this._timer.run=m(this,this.evaluateCompare))},evaluateCompare:function(){try{this._timer.stop()}catch(c){}this._timer=null;var a=this._playerData.getValue(this._timerParam),b=this._opponentData.getValue(this._timerParam);a<b?(this.soundloose!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundloose)),zi.shake(this._player,.5,10),zi.quickJump(this._opponent,
.5,30),this._timer=new rd(500),this._timer.run=m(this,this.onLoose)):a>b?(this.soundwin!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundwin)),zi.quickJump(this._player,.5,30),zi.shake(this._opponent,.5,10),this._timer=new rd(500),this._timer.run=m(this,this.onWin)):(this.soundtie!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundtie)),zi.shake(this._player,.5,5),zi.shake(this._opponent,.5,5))},onLoose:function(){try{this._timer.stop()}catch(b){}this._timer=null;var a=this._playerData.current+
1;this._playerCurent.updateDisplay(a);a>=this._pcards.length?(this._won=!1,this.onClose()):(this._playerData.loadCard(this._pcards[a],a),this._player.draw(this._pcards[a]))},onWin:function(){try{this._timer.stop()}catch(b){}this._timer=null;var a=this._opponentData.current+1;this._opponentCurent.updateDisplay(a);a>=this._ocards.length?(this._won=!0,this.onClose()):(this._opponentData.loadCard(this._ocards[a],a),this._opponent.draw(this._ocards[a]))},setAttributes:function(a,b,c,d,f){b<0&&(b=0);b>
4&&(b=4);a?this._playerData.setAttr(b,c,d,f):this._opponentData.setAttr(b,c,d,f)},create:function(a,b,c,d){this.removeChildren();this._cbitmap.set_visible(!0);this._hbitmap.set_visible(this._vbitmap.set_visible(!1));this.ok&&(this._player==null&&(this._player=new ab(m(this,this.draw),!0,m(this,this.compare),this._playerData)),this._opponent==null&&(this._opponent=new ab(m(this,this.draw),!1,null,this._opponentData)),this._pcards=c,this._ocards=d,this._playerData.loadCard(c[0],0),this._opponentData.loadCard(d[0],
0),this._player.draw(this._pcards[0]),this._opponent.draw(this._ocards[0]),this._playerCurent==null&&(this._playerCurent=new M(m(this,this.draw))),this._opponentCurent==null&&(this._opponentCurent=new M(m(this,this.draw))),this._playerCurent.draw(this._pcards),this._opponentCurent.draw(this._ocards),p.area.get_pOrientation()=="horizontal"?(this.addChild(this._hbitmap),this._hbitmap.set_x(this._hbitmap.set_y(0)),this._hbitmap.set_width(p.mdata.screen.big),this._hbitmap.set_height(p.mdata.screen.small),
this._cbitmap.set_x(this._hbitmap.get_width()-this._cbitmap.get_width()),this._hbitmap.set_visible(!0),this._player.set_x(this._cbitmap.get_width()),this._player.set_y(this._cbitmap.get_height()),this._opponent.set_x(this._hbitmap.get_width()/2+this._cbitmap.get_width()/2),this._opponent.set_y(this._cbitmap.get_height()),this._playerCurent.set_x(this._player.get_x()),this._opponentCurent.set_x(this._opponent.get_x()),this._playerCurent.set_y(p.mdata.screen.small-this.btAtrHeight()*1.5),this._opponentCurent.set_y(p.mdata.screen.small-
this.btAtrHeight()*1.5),this._cardsize=new Qa(p.mdata.screen.big/2-1.5*this._cbitmap.get_width(),p.mdata.screen.small-this._cbitmap.get_height()-this.btAtrHeight()*2),p.focusMode?this._hbitmap.set_filters([new pf(new Yh)]):this._hbitmap.set_filters([])):(this.addChild(this._vbitmap),this._vbitmap.set_x(this._vbitmap.set_y(0)),this._vbitmap.set_width(p.mdata.screen.small),this._vbitmap.set_height(p.mdata.screen.big),this._cbitmap.set_x(this._vbitmap.get_width()-this._cbitmap.get_width()),this._vbitmap.set_visible(!0),
this._player.set_x(this._cbitmap.get_width()),this._player.set_y(this._cbitmap.get_height()),this._opponent.set_x(this._cbitmap.get_width()),this._opponent.set_y(this._vbitmap.get_height()/2+this._cbitmap.get_height()/2),this._playerCurent.set_x(this._player.get_x()),this._opponentCurent.set_x(this._opponent.get_x()),this._playerCurent.set_y(this._vbitmap.get_height()/2-this.btAtrHeight()*.5),this._opponentCurent.set_y(this._vbitmap.get_height()-this.btAtrHeight()*1.5),this._cardsize=new Qa(this._vbitmap.get_width()-
2*this._cbitmap.get_width(),this._vbitmap.get_height()/2-this._cbitmap.get_height()/2-this.btAtrHeight()*2),p.focusMode?this._vbitmap.set_filters([new pf(new Yh)]):this._vbitmap.set_filters([])),this._cbitmap.set_y(0),this.addChild(this._cbitmap),this.addChild(this._player),this.addChild(this._opponent),this.addChild(this._playerCurent),this.addChild(this._opponentCurent),this._onloose=b,this._onwin=a,this._won=!1);return this},draw:function(){this._player.set_width(this._cardsize.x);this._player.set_scaleY(this._player.get_scaleX());
this._player.get_height()>this._cardsize.y&&(this._player.set_height(this._cardsize.y),this._player.set_scaleX(this._player.get_scaleY()));this._opponent.set_width(this._cardsize.x);this._opponent.set_scaleY(this._opponent.get_scaleX());this._opponent.get_height()>this._cardsize.y&&(this._opponent.set_height(this._cardsize.y),this._opponent.set_scaleX(this._opponent.get_scaleY()));p.area.get_pOrientation()=="horizontal"?(this._player.set_x(this._cbitmap.get_width()+(this._cardsize.x-this._player.get_width())/
2),this._player.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._player.get_height())/2),this._opponent.set_x(this._hbitmap.get_width()/2+this._cbitmap.get_width()/2+(this._cardsize.x-this._opponent.get_width())/2),this._opponent.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._opponent.get_height())/2)):(this._player.set_x(this._cbitmap.get_width()+(this._cardsize.x-this._player.get_width())/2),this._opponent.set_x(this._cbitmap.get_width()+(this._cardsize.x-this._opponent.get_width())/
2),this._player.set_y(this._cbitmap.get_height()+(this._cardsize.y-this._player.get_height())/2),this._opponent.set_y(this._vbitmap.get_height()/2+this._cbitmap.get_height()/2+(this._cardsize.y-this._opponent.get_height())/2));this._playerCurent.set_x(this._player.get_x()+(this._player.get_width()-this._playerCurent.get_width())/2);this._opponentCurent.set_x(this._opponent.get_x()+(this._opponent.get_width()-this._opponentCurent.get_width())/2)},checkCollision:function(a){var b=!1;if(this.ok)if(b=
this._cbitmap.hitTestObject(a))this.onClose();else b=this._player.checkCollision(a);return b},checkOver:function(a){var b=!1;this.ok&&((b=this._cbitmap.hitTestObject(a))||(b=this._player.checkOver(a)));return b},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new K;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,attrbg:this.attrbg,attributes:this.attributes,
card:this.card,soundpick:this.soundpick,soundwin:this.soundwin,soundloose:this.soundloose,soundtie:this.soundtie});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=A.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=A.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=A.field(a,"fontcolor"):this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=A.field(a,
"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=A.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=A.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,"close")?this.close=A.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,"attrbg")?this.attrbg=A.field(a,"attrbg"):this.attrbg="";Object.prototype.hasOwnProperty.call(a,"card")?this.card=A.field(a,"card"):
this.card="";Object.prototype.hasOwnProperty.call(a,"soundpick")?this.soundpick=A.field(a,"soundpick"):this.soundpick="";Object.prototype.hasOwnProperty.call(a,"soundwin")?this.soundwin=A.field(a,"soundwin"):this.soundwin="";Object.prototype.hasOwnProperty.call(a,"soundloose")?this.soundloose=A.field(a,"soundloose"):this.soundloose="";Object.prototype.hasOwnProperty.call(a,"soundtie")?this.soundtie=A.field(a,"soundtie"):this.soundtie="";Object.prototype.hasOwnProperty.call(a,"attributes")?(a=A.field(a,
"attributes"),this.attributes=a==null?[]:a):this.attributes=[];this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.horizontal==null&&(this.horizontal="");this.vertical==null&&(this.vertical="");this.close==null&&(this.close="");this.attrbg==null&&(this.attrbg="");this.card==null&&(this.card="");this.soundpick==null&&(this.soundpick="");this.soundwin==null&&(this.soundwin="");this.soundloose==null&&(this.soundloose="");
this.soundtie==null&&(this.soundtie="");this.fontcolor=mb.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new Vc(m(this,this.onBTLoad)));this._cbitmap.load(this.close);return!0}return!1},loadGraphics:function(){this.ok=!1;this.fontcolor=mb.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==
""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new Vc(m(this,this.onBTLoad)));this._cbitmap.load(this.close)},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.soundpick=this.soundwin=this.soundloose=this.soundtie=this.id=this.font=this.fontcolor=this.horizontal=this.vertical=this.close=null;this.parent!=null&&this.parent.removeChild(this);this._cbitmap!=null&&(this._cbitmap.hasEventListener("click")&&
(this._cbitmap.removeEventListener("click",m(this,this.onClose)),this._cbitmap.removeEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.removeEventListener("mouseOut",m(this,this.onCloseOut))),this._cbitmap.kill());this._cbitmap=null;this._hbitmap!=null&&this._hbitmap.kill();this._hbitmap=null;this._vbitmap!=null&&this._vbitmap.kill();this._vbitmap=null;this._abitmap!=null&&this._abitmap.kill();for(this._abitmap=null;this.attributes.length>0;)this.attributes.shift();this.attributes=
null;this._player!=null&&this._player.kill();this._player=null;this._opponent!=null&&this._opponent.kill();this._opponent=null;this._playerCurent!=null&&this._playerCurent.kill();this._playerCurent=null;this._opponentCurent!=null&&this._opponentCurent.kill();this._opponentCurent=null;if(this._pcards!=null)for(;this._pcards.length>0;)this._pcards.shift();this._pcards=null;if(this._ocards!=null)for(;this._ocards.length>0;)this._ocards.shift();this._onloose=this._onwin=this._ocards=null;this._playerData!=
null&&this._playerData.kill();this._opponentData!=null&&this._opponentData.kill();this._opponentData=this._playerData=null},toObject:function(){this.id="bs";return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,attrbg:this.attrbg,attributes:this.attributes,card:this.card,soundpick:this.soundpick,soundwin:this.soundwin,soundloose:this.soundloose,soundtie:this.soundtie}},bsClose:function(){this.onCloseOut(null);
this.removeChildren();this._won?(this._won=!1,this._onwin!=null&&p.parser.run(this._onwin,!0)):this._onloose!=null&&p.parser.run(this._onloose,!0);this._onwin=this._onloose=null},btAtrWidth:function(){return this.ok?this._abitmap.oWidth:0},btAtrHeight:function(){return this.ok?this._abitmap.oHeight:0},onBTLoad:function(a){if(this.ok=a)this._abitmap==null&&(this._abitmap=new Vc(m(this,this.onAttrLoad))),this._abitmap.load(this.attrbg)},onAttrLoad:function(a){if(this.ok=a)this._hbitmap==null&&(this._hbitmap=
new Vc(m(this,this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new Vc(m(this,this.onBgLoad))),this._vbitmap.load(this.vertical),this._cbitmap.addEventListener("click",m(this,this.onClose)),this._cbitmap.addEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.addEventListener("mouseOut",m(this,this.onCloseOut))},onBgLoad:function(a){a||(this.ok=!1)},onClose:function(a){p.parser.run('[ { "ac": "battle.close", "param": [ ] } ]')},onCloseOver:function(a){p.cursorVisible&&
(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this._cbitmap.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},__class__:K});var ab=function(a,b,c,d){this._totalAttr=5;this._player=!1;this.attributes=[];za.call(this);if(Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&p.contraptions.bs.h.bs.card!="")for(var f=this._totalAttr=0,g=p.contraptions.bs.h.bs.attributes;f<g.length;){var h=g[f];++f;h!=""&&this._totalAttr++}this._holder=
new za;this.graphic=new Vc(m(this,this.onPic));this.background=new Vc(m(this,this.onBg));this.attributes.push(new P(0,b,c));this.attributes.push(new P(1,b,c));this.attributes.push(new P(2,b,c));this.attributes.push(new P(3,b,c));this.attributes.push(new P(4,b,c));Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&p.contraptions.bs.h.bs.card!=""&&this.background.load(p.contraptions.bs.h.bs.card);this._draw=a;this._player=b;this._data=d};r["com.tilbuci.contraptions.BattleCard"]=ab;ab.__name__=
"com.tilbuci.contraptions.BattleCard";ab.__super__=za;ab.prototype=I(za.prototype,{graphic:null,attributes:null,background:null,_holder:null,_draw:null,_player:null,_data:null,_totalAttr:null,draw:function(a){this.removeChildren();if(Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a)){for(var b=0,c=this.attributes;b<c.length;){var d=c[b];++b;d.set_visible(!1)}b=0;for(c=p.contraptions.bs.h.bs.attributes.length;b<c;)d=b++,this.attributes[d].draw(d,this._data.getValue(d,!0),this._data.add[d],
this._data.rem[d]);this.graphic.load(p.narrative.cards.h[a].cardgraphic);this.background.get_lastMedia()!=p.contraptions.bs.h.bs.card&&this.background.load(p.contraptions.bs.h.bs.card)}p.focusMode?this.background.set_filters([new pf(new Yh)]):this.background.set_filters([])},showAttrVal:function(a){this.attributes[a].showValue(this._data.getValue(a,!0),this._data.add[a],this._data.rem[a])},kill:function(){this.removeChildren();this._holder.removeChildren();this.graphic.kill();this.graphic=null;this.background.kill();
for(this.background=null;this.attributes.length>0;)this.attributes.shift().kill();this._data=this._draw=this.attributes=null},checkOver:function(a){for(var b=!1,c=0,d=this.attributes;c<d.length;){var f=d[c];++c;b||a.hitTestObject(f)&&(b=!0)}return b},checkCollision:function(a){for(var b=!1,c=0,d=this.attributes;c<d.length;){var f=d[c];++c;!b&&a.hitTestObject(f)&&(b=!0,f.onClick())}return b},pulse:function(a){this._holder.removeChild(this.attributes[a]);this._holder.addChild(this.attributes[a]);zi.pulse(this.attributes[a],
.5,1.5,2)},onPic:function(a){this._holder.removeChildren();this.graphic.set_width(this.graphic.set_height(p.contraptions.bs.h.bs.btAtrHeight()*3));this.graphic.set_x((p.contraptions.bs.h.bs.btAtrWidth()-this.graphic.get_width())/2);this.graphic.set_y(0);this.graphic.set_visible(!0);this._holder.addChild(this.graphic);a=0;for(var b=this.attributes.length;a<b;){var c=a++;this.attributes[c].get_visible()&&(this.attributes[c].set_x(0),this.attributes[c].set_y(this.graphic.get_height()+p.contraptions.bs.h.bs.btAtrHeight()/
2+c*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr+c*p.contraptions.bs.h.bs.btAtrHeight()),this._holder.addChild(this.attributes[c]))}this.place()},onBg:function(a){this.background.set_width(this.background.oWidth);this.background.set_height(this.background.oHeight);this.background.set_visible(!0);this.place()},place:function(){this.removeChildren();this.background.set_width(this.background.oWidth);this.background.set_height(this.background.oHeight);this.background.set_x(this.background.set_y(0));
this._holder.set_width(this.background.get_width()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr);this._holder.set_scaleY(this._holder.get_scaleX());this._holder.get_height()>this.background.get_height()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr&&(this._holder.set_height(this.background.get_height()-2*p.contraptions.bs.h.bs.btAtrHeight()/this._totalAttr),this._holder.set_scaleX(this._holder.get_scaleY()));this._holder.set_x((this.background.get_width()-this._holder.get_width())/
2);this._holder.set_y((this.background.get_height()-this._holder.get_height())/2);this.addChild(this.background);this.addChild(this._holder);this._draw()},__class__:ab});var P=function(a,b,c){this._player=!1;za.call(this);this.id=a;this._player=b;this._compare=c;this.graphic=new Vc(m(this,this.onPic));this.text=new Jc;this.value=new Jc;this.addChild(this.graphic);this.addChild(this.text);this.addChild(this.value);this.mouseChildren=!1;Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")&&
p.contraptions.bs.h.bs.attrbg!=""&&this.graphic.load(p.contraptions.bs.h.bs.attrbg);b&&(this.addEventListener("click",m(this,this.onClick)),this.addEventListener("mouseOver",m(this,this.onOver)),this.addEventListener("mouseOut",m(this,this.onOut)))};r["com.tilbuci.contraptions.AttributeButton"]=P;P.__name__="com.tilbuci.contraptions.AttributeButton";P.__super__=za;P.prototype=I(za.prototype,{id:null,graphic:null,text:null,value:null,_player:null,_compare:null,showValue:function(a,b,c){b==0&&c==0?
this.value.set_text(a+""):(c!=0?this.value.set_text(a-c+" ... "):this.value.set_text(a+" ... "),b!=0?(c=this.value,c.set_text(c.get_text()+(a+b+""))):(c=this.value,c.set_text(c.get_text()+(a+""))))},draw:function(a,b,c,d){this.set_visible(!0);this.text.set_defaultTextFormat(new qf(p.contraptions.bs.h.bs.font,p.contraptions.bs.h.bs.fontsize,mb.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,vk.fromString("left")));this.value.set_defaultTextFormat(new qf(p.contraptions.bs.h.bs.font,
p.contraptions.bs.h.bs.fontsize,mb.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,vk.fromString("right")));this._player?(this.text.set_text(p.parser.parseString(p.contraptions.bs.h.bs.attributes[a])),c==0&&d==0?this.value.set_text(b+""):(d!=0?this.value.set_text(b-d+" ... "):this.value.set_text(b+" ... "),c!=0?(a=this.value,a.set_text(a.get_text()+(b+c+""))):(a=this.value,a.set_text(a.get_text()+(b+""))))):(this.text.set_text(p.parser.parseString(p.contraptions.bs.h.bs.attributes[a])),
this.value.set_text("?"));if(this.graphic.get_lastMedia()!=p.contraptions.bs.h.bs.attrbg)this.graphic.load(p.contraptions.bs.h.bs.attrbg);else this.onPic(!0)},kill:function(){this.removeChildren();this._player&&(this.removeEventListener("click",m(this,this.onClick)),this.removeEventListener("mouseOver",m(this,this.onOver)),this.removeEventListener("mouseOut",m(this,this.onOut)));this.value=this.text=null;this.graphic.kill();this._compare=this.graphic=null},onPic:function(a){this.graphic.set_visible(!0);
this.graphic.set_width(this.graphic.oWidth);this.graphic.set_height(this.graphic.oHeight);this.text.set_height(this.text.get_textHeight()+4);this.text.set_y((this.graphic.oHeight-this.text.get_height())/2);this.text.set_visible(!0);this.value.set_height(this.value.get_textHeight()+4);this.value.set_y((this.graphic.oHeight-this.value.get_height())/2);this.value.set_visible(!0);this.text.set_width(this.value.set_width(this.graphic.get_width()-this.graphic.get_height()));this.text.set_x(this.value.set_x(this.graphic.get_height()/
2))},onClick:function(a){this._compare(this.id)},onOver:function(a){p.cursorVisible&&(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onOut:function(a){this.set_filters([])},__class__:P});var M=function(a){this.cards=[];za.call(this);this.mouseEnabled=!1;this.cards.push(new Vc(m(this,this.onCard)));this.cards.push(new Vc(m(this,this.onCard)));this.cards.push(new Vc(m(this,this.onCard)));this.cards.push(new Vc(m(this,this.onCard)));
this.cards.push(new Vc(m(this,this.onCard)));this._draw=a};r["com.tilbuci.contraptions.CurrentCards"]=M;M.__name__="com.tilbuci.contraptions.CurrentCards";M.__super__=za;M.prototype=I(za.prototype,{cards:null,_draw:null,updateDisplay:function(a){for(var b=0,c=this.cards.length;b<c;){var d=b++;d>=a?this.cards[d].set_alpha(1):this.cards[d].set_alpha(.25)}},draw:function(a){this.removeChildren();for(var b=0,c=this.cards;b<c.length;){var d=c[b];++b;d.set_visible(!1);d.unload()}b=0;for(c=a.length;b<c;)d=
b++,d<this.cards.length&&Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a[d])&&(this.cards[d].load(p.narrative.cards.h[a[d]].cardgraphic),this.cards[d].set_alpha(1))},kill:function(){for(this.removeChildren();this.cards.length>0;)this.cards.shift().kill();this._draw=this.cards=null},onCard:function(a){this.removeChildren();a=0;for(var b=this.cards.length;a<b;){var c=a++;this.cards[c].get_mediaLoaded()&&(this.cards[c].set_width(this.cards[c].set_height(p.contraptions.bs.h.bs.btAtrHeight()/
2)),this.cards[c].set_y(0),this.cards[c].set_x(c*(p.contraptions.bs.h.bs.btAtrHeight()/2+.5*p.contraptions.bs.h.bs.btAtrHeight()/3)),this.cards[c].set_visible(!0),this.addChild(this.cards[c]))}this._draw()},__class__:M});var Ca=function(){this.rem=[0,0,0,0,0];this.add=[0,0,0,0,0];this.gain=[0,0,0,0,0];this.attr=[0,0,0,0,0];this.current=-1};r["com.tilbuci.contraptions.BattleData"]=Ca;Ca.__name__="com.tilbuci.contraptions.BattleData";Ca.prototype={current:null,attr:null,gain:null,add:null,rem:null,
clear:function(){this.current=0},loadCard:function(a,b){if(Object.prototype.hasOwnProperty.call(p.narrative.cards.h,a)){for(;this.attr.length>0;)this.attr.shift();var c=0;for(a=p.narrative.cards.h[a].cardattributes;c<a.length;){var d=a[c];++c;this.attr.push(d)}this.current=b}},setAttr:function(a,b,c,d){this.gain[a]=b;this.add[a]=c;this.rem[a]=d},getValue:function(a,b){b==null&&(b=!1);return b?this.attr[a]+this.gain[a]:this.attr[a]+this.gain[a]+(Math.random()*this.add[a]|0)-(Math.random()*this.rem[a]|
0)},kill:function(){for(;this.attr.length>0;)this.attr.shift();for(;this.gain.length>0;)this.gain.shift();for(;this.add.length>0;)this.add.shift();for(;this.rem.length>0;)this.rem.shift();this.rem=this.add=this.gain=this.attr=null},__class__:Ca};var Ta=function(a,b,c,d,f,g,h){za.call(this);this.value=a;this._ac=b;p.mdata.highlightInt==null||p.isMobile()||(this.addEventListener("mouseOver",m(this,this.onMouseOver)),this.addEventListener("mouseOut",m(this,this.onMouseOut)));this._img=new Vc(m(this,
this.onLoad));this._img.load(c);this.addChild(this._img);this._img.set_visible(!0);this._text=new Jc;this._text.set_defaultTextFormat(new qf(f,g,h,null,null,null,null,null,0));this._text.set_multiline(!1);this._text.set_wordWrap(!1);this._text.set_text(p.parser.parseString(d));this._text.set_visible(!1);this._text.set_selectable(!1);this.addChild(this._text);this.mouseChildren=!1;this.addEventListener("click",m(this,this.onClick))};r["com.tilbuci.contraptions.ContraptionButton"]=Ta;Ta.__name__="com.tilbuci.contraptions.ContraptionButton";
Ta.__super__=za;Ta.prototype=I(za.prototype,{_img:null,_text:null,value:null,_ac:null,kill:function(){this.removeChildren();this.hasEventListener("mouseOver")&&(this.removeEventListener("mouseOver",m(this,this.onMouseOver)),this.removeEventListener("mouseOut",m(this,this.onMouseOut)));this.removeEventListener("click",m(this,this.onClick));this._img.kill();this._ac=this.value=this._text=this._img=null},onLoad:function(a){a&&(this._text.set_width(this._img.oWidth),this._text.set_height(this._text.get_textHeight()+
4),this._text.set_y((this._img.oHeight-this._text.get_height())/2),this._text.set_visible(!0))},onMouseOver:function(a){p.cursorVisible&&this.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)])},onMouseOut:function(a){this.set_filters([])},onClick:function(a){this.set_filters([]);this._ac(this.value)},__class__:Ta});var eb=function(){this.interf=new aa;this._formcurrent="";this.forms=new aa;this.sounds=new aa;this.musics=new aa;this.backgrounds=new aa;this.targets=new aa;this.covers=new aa;
this.usingMessages=!1;this._messagesCurrent=null;this.messages=new aa;this.usingBs=!1;this._bsCurrent=null;this.bs=new aa;this.usingInv=!1;this._invCurrent=null;this.inv=new aa;this.usingDflow=!1;this._dflowCurrent=null;this.dflow=new aa;this.usingMenu=!1;this._menuCurrent=null;this.menus=new aa};r["com.tilbuci.contraptions.Contraptions"]=eb;eb.__name__="com.tilbuci.contraptions.Contraptions";eb.prototype={menus:null,_menusOverlay:null,_menuAction:null,_menuVariable:null,_menuCurrent:null,usingMenu:null,
dflow:null,_dflowOverlay:null,_dflowCurrent:null,usingDflow:null,inv:null,_invOverlay:null,_invCurrent:null,usingInv:null,bs:null,_bsOverlay:null,_bsCurrent:null,usingBs:null,messages:null,_messagesOverlay:null,_messagesAction:null,_messagesVariable:null,_messagesCurrent:null,usingMessages:null,covers:null,_coverOverlay:null,targets:null,backgrounds:null,_backgroundOverlay:null,_loadingOverlay:null,_loadingIc:null,_zoomOverlay:null,_zoomPicture:null,_zoomVideo:null,musics:null,sounds:null,forms:null,
_formsOverlay:null,_formcurrent:null,interf:null,_interfaceOverlay:null,getLayers:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));this._coverOverlay.mouseEnabled=!1;this._backgroundOverlay==null&&(this._backgroundOverlay=p.area.getOverlay("contraptions-background",!0));this._backgroundOverlay.mouseEnabled=!1;this._zoomOverlay==null&&(this._zoomOverlay=p.area.getOverlay("contraptions-zoom"));this._formsOverlay==null&&(this._formsOverlay=p.area.getOverlay("contraptions-forms"));
this._menusOverlay==null&&(this._menusOverlay=p.area.getOverlay("contraptions-menu"));this._interfaceOverlay==null&&(this._interfaceOverlay=p.area.getOverlay("contraptions-interface"));this._dflowOverlay==null&&(this._dflowOverlay=p.area.getOverlay("contraptions-dflow"));this._invOverlay==null&&(this._invOverlay=p.area.getOverlay("contraptions-inventory"));this._bsOverlay==null&&(this._bsOverlay=p.area.getOverlay("contraptions-battle"));this._messagesOverlay==null&&(this._messagesOverlay=p.area.getOverlay("contraptions-messages"));
this._loadingOverlay==null&&(this._loadingOverlay=p.area.getOverlay("contraptions-loading"));this._loadingOverlay.mouseEnabled=!1},clear:function(){this.getLayers();var a=this.covers.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.covers.h[d].kill();var f=this.covers;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._coverOverlay.get_graphics().clear();a=this.backgrounds.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.backgrounds.h[d].kill(),f=this.backgrounds,
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._backgroundOverlay.get_graphics().clear();a=this.menus.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.menus.h[d].kill(),f=this.menus,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._menusOverlay.get_graphics().clear();a=this.dflow.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dflow.h[d].kill(),f=this.dflow,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._dflowOverlay.get_graphics().clear();
a=this.inv.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.inv.h[d].kill(),f=this.inv,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._invOverlay.get_graphics().clear();a=this.bs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.bs.h[d].kill(),f=this.bs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._bsOverlay.get_graphics().clear();a=this.messages.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.messages.h[d].kill(),f=this.messages,Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d];this._messagesOverlay.get_graphics().clear();a=this.forms.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.forms.h[d].kill(),f=this.forms,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._formsOverlay.get_graphics().clear();a=this.interf.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.interf.h[d].kill(),f=this.interf,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._interfaceOverlay.get_graphics().clear()},removeAll:function(){var a=
this.menus.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.menus.h[d].kill();var f=this.menus;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this.dflow.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dflow.h[d].kill(),f=this.dflow,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.inv.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.inv.h[d].kill(),f=this.inv,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.bs.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;)d=a[c++],this.bs.h[d].kill(),f=this.bs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.messages.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.messages.h[d].kill(),f=this.messages,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.covers.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.covers.h[d].kill(),f=this.covers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.backgrounds.h;a=Object.keys(a);b=a.length;
for(c=0;c<b;)d=a[c++],this.backgrounds.h[d].kill(),f=this.backgrounds,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.musics.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.musics.h[d].kill(),f=this.musics,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.sounds.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.sounds.h[d].kill(),f=this.sounds,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.targets.h;a=Object.keys(a);b=a.length;for(c=
0;c<b;)d=a[c++],this.targets.h[d].kill(),f=this.targets,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.forms.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.forms.h[d].kill(),f=this.forms,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.interf.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.interf.h[d].kill(),f=this.interf,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]},getData:function(){var a=new aa,b=[];a.h.covers=b;var c=b=this.covers.h;
b=Object.keys(b);for(var d=b.length,f=0;f<d;){var g=c[b[f++]];a.h.covers.push(g.toObject())}b=[];a.h.backgrounds=b;c=b=this.backgrounds.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.backgrounds.push(g.toObject());b=[];a.h.menus=b;c=b=this.menus.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.menus.push(g.toObject());b=[];a.h.dflow=b;c=b=this.dflow.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.dflow.push(g.toObject());b=[];a.h.inv=b;c=b=this.inv.h;b=Object.keys(b);
d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.inv.push(g.toObject());b=[];a.h.bs=b;c=b=this.bs.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.bs.push(g.toObject());b=[];a.h.messages=b;c=b=this.messages.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.messages.push(g.toObject());b=[];a.h.musics=b;c=b=this.musics.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.musics.push(g.toObject());b=[];a.h.sounds=b;c=b=this.sounds.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],
a.h.sounds.push(g.toObject());b=[];a.h.forms=b;c=b=this.forms.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.forms.push(g.toObject());b=[];a.h.interf=b;c=b=this.interf.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.interf.push(g.toObject());b=[];a.h.targets=b;c=b=this.targets.h;b=Object.keys(b);d=b.length;for(f=0;f<d;)g=c[b[f++]],a.h.targets.push(g.toObject());return mb.jsonStringify(a)},menuShow:function(a,b,c,d,f,g,h){this.menuHide();if(Object.prototype.hasOwnProperty.call(this.menus.h,
a)&&p.mode!="editor"){this._menuCurrent=this.menus.h[a];if(this._menuCurrent.ok){this._menusOverlay.get_graphics().clear();this._menuCurrent.bgalpha>0&&(this._menusOverlay.get_graphics().beginFill(L.parseInt(Z.replace("#","0x",this._menuCurrent.bgcolor)),this._menuCurrent.bgalpha),this._menusOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._menusOverlay.get_graphics().endFill());this._menusOverlay.addChild(this._menuCurrent.create(b,m(this,this.onMenuSelect)));switch(f){case "absolute":this._menuCurrent.set_x(g);
this._menuCurrent.set_y(h);break;case "bottom":this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-h);break;case "bottomleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-h);break;case "bottomright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y(p.area.get_aHeight()-this._menuCurrent.get_height()-
h);break;case "centerleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2);break;case "centerright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2);break;case "top":this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2);this._menuCurrent.set_y(h);break;case "topleft":this._menuCurrent.set_x(g);this._menuCurrent.set_y(h);
break;case "topright":this._menuCurrent.set_x(p.area.get_aWidth()-this._menuCurrent.get_width()-g);this._menuCurrent.set_y(h);break;default:this._menuCurrent.set_x((p.area.get_aWidth()-this._menuCurrent.get_width())/2),this._menuCurrent.set_y((p.area.get_aHeight()-this._menuCurrent.get_height())/2)}this._menuAction=d;this._menuVariable=c;return this.usingMenu=!0}this._menuCurrent=null;return!1}this._menuCurrent=null;return!1},checkMenuCollision:function(a){return this._menuCurrent!=null?this._menuCurrent.checkCollision(a):
!1},checkMenuOver:function(a){return this._menuCurrent!=null?this._menuCurrent.hitTestObject(a)?!0:!1:!1},showingDflow:function(){return this._dflowOverlay.get_numChildren()>0},showingInventory:function(){return this._invOverlay.get_numChildren()>0},showingBattle:function(){return this._bsOverlay.get_numChildren()>0},dflowShow:function(a){this.dflowHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.dflow.h,"dflow")){this._dflowCurrent=this.dflow.h.dflow;if(this._dflowCurrent.ok){this._dflowOverlay.get_graphics().clear();
this._dflowOverlay.addChild(this._dflowCurrent.create(a));switch(this._dflowCurrent.position){case "bottom":this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/2);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "bottomleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "bottomright":this._dflowCurrent.set_x(p.area.get_aWidth()-
this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y(p.area.get_aHeight()-this._dflowCurrent.menuSize.y-this._dflowCurrent.gap);break;case "centerleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/2);break;case "centerright":this._dflowCurrent.set_x(p.area.get_aWidth()-this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/
2);break;case "top":this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/2);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;case "topleft":this._dflowCurrent.set_x(this._dflowCurrent.gap);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;case "topright":this._dflowCurrent.set_x(p.area.get_aWidth()-this._dflowCurrent.menuSize.x-this._dflowCurrent.gap);this._dflowCurrent.set_y(this._dflowCurrent.gap);break;default:this._dflowCurrent.set_x((p.area.get_aWidth()-this._dflowCurrent.menuSize.x)/
2),this._dflowCurrent.set_y((p.area.get_aHeight()-this._dflowCurrent.menuSize.y)/2)}return this.usingDflow=!0}this._dflowCurrent=null;return!1}this._dflowCurrent=null;return!1},inventoryShow:function(a){this.invHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.inv.h,"inv")){this._invCurrent=this.inv.h.inv;if(this._invCurrent.ok)return this._invOverlay.addChild(this._invCurrent.create(a)),this._invCurrent.draw(),this.usingInv=!0;this._invCurrent=null;return!1}this._invCurrent=null;
return!1},battleShow:function(a,b,c,d){this.bsHide();if(p.mode!="editor"&&Object.prototype.hasOwnProperty.call(this.bs.h,"bs")){this._bsCurrent=this.bs.h.bs;if(this._bsCurrent.ok)return this._bsOverlay.addChild(this._bsCurrent.create(a,b,c,d)),this.usingBs=!0;this._bsCurrent=null;return!1}this._bsCurrent=null;return!1},checkDflowCollision:function(a){return this._dflowCurrent!=null?this._dflowCurrent.checkCollision(a):!1},checkInvCollision:function(a){return this._invCurrent!=null?this._invCurrent.checkCollision(a):
!1},checkBsCollision:function(a){return this._bsCurrent!=null?this._bsCurrent.checkCollision(a):!1},checkDflowOver:function(a){return this._dflowCurrent!=null?this._dflowCurrent.hitTestObject(a)?!0:!1:!1},checkInvOver:function(a){return this._invCurrent!=null?this._invCurrent.checkOver(a):!1},checkBsOver:function(a){return this._bsCurrent!=null?this._bsCurrent.checkOver(a):!1},messagesShow:function(a,b,c,d,f){this.messagesHide();if(Object.prototype.hasOwnProperty.call(this.messages.h,a)){this._messagesCurrent=
this.messages.h[a];if(this._messagesCurrent.ok)return this._messagesOverlay.get_graphics().clear(),this._messagesOverlay.get_graphics().beginFill(0,.5),this._messagesOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._messagesOverlay.get_graphics().endFill(),this._messagesOverlay.addChild(this._messagesCurrent.create(b,c,m(this,this.onMessagesSelect))),this._messagesCurrent.set_x((p.area.get_aWidth()-this._messagesCurrent.get_width())/2),this._messagesCurrent.set_y((p.area.get_aHeight()-
this._messagesCurrent.get_height())/2),this._messagesAction=f,this._messagesVariable=d,this.usingMessages=!0;this._messagesCurrent=null;return!1}this._messagesCurrent=null;return!1},checkMessagesCollision:function(a){return this._messagesCurrent!=null?this._messagesCurrent.checkCollision(a):!1},checkMessagesOver:function(a){return this._messagesCurrent!=null?this._messagesCurrent.hitTestObject(a)?!0:!1:!1},changeDisplay:function(){this.getLayers();this._backgroundOverlay.get_visible()&&this._backgroundOverlay.get_numChildren()>
0&&this._backgroundOverlay.getChildAt(0).getCover();this._coverOverlay.get_visible()&&this._coverOverlay.get_numChildren()>0&&this._coverOverlay.getChildAt(0).getCover()},removeContraptions:function(a){a==null&&(a=!1);this.menuHide();this.messagesHide();this.dflowHide();this.invHide();this.bsHide();this.hideForm();this.hideLoadingIc();this.removeZoom();a&&(this.musicStop(),this.soundStop(),this.hideCover(),this.hideBackground(),this.hideAllInterfaces())},musicPlay:function(a){if(Object.prototype.hasOwnProperty.call(this.musics.h,
a)){for(var b=this.musics.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];g.id==a?g.play():g.pause()}return!0}return!1},soundPlay:function(a){if(Object.prototype.hasOwnProperty.call(this.sounds.h,a)){for(var b=this.sounds.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];g.id==a&&g.play()}return!0}return!1},musicPause:function(){for(var a=this.musics.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].pause()},soundPause:function(a){a==null&&(a="");if(a==""){var b=this.sounds.h,c=b;b=Object.keys(b);
for(var d=b.length,f=0;f<d;){var g=c[b[f++]];g.pause()}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,a))for(c=b=this.sounds.h,b=Object.keys(b),d=b.length,f=0;f<d;)g=c[b[f++]],g.id==a&&g.pause()},musicStop:function(){for(var a=this.musics.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].stop()},soundStop:function(a){a==null&&(a="");if(a==""){var b=this.sounds.h,c=b;b=Object.keys(b);for(var d=b.length,f=0;f<d;){var g=c[b[f++]];g.stop()}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,
a))for(c=b=this.sounds.h,b=Object.keys(b),d=b.length,f=0;f<d;)g=c[b[f++]],g.id==a&&g.stop()},musicVolume:function(a){for(var b=this.musics.h,c=Object.keys(b),d=c.length,f=0;f<d;)b[c[f++]].volume(a)},soundVolume:function(a,b){b==null&&(b="");if(b==""){var c=this.sounds.h,d=c;c=Object.keys(c);for(var f=c.length,g=0;g<f;){var h=d[c[g++]];h.volume(a)}}else if(Object.prototype.hasOwnProperty.call(this.sounds.h,b))for(d=c=this.sounds.h,c=Object.keys(c),f=c.length,g=0;g<f;)h=d[c[g++]],h.id==b&&h.volume(a)},
menuHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.menus.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._menusOverlay.get_graphics().clear();this._menusOverlay.removeChildren();this._menuCurrent=null;this.usingMenu=!1},dflowHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.dflow.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();
this.getLayers();this._dflowOverlay.get_graphics().clear();this._dflowCurrent=null;this.usingDflow=!1},invHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.inv.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._invOverlay.get_graphics().clear();this._invCurrent!=null&&this._invCurrent.invClose();this._invCurrent=null;this.usingInv=!1},bsHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));
for(var a=this.bs.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._bsOverlay.get_graphics().clear();this._bsCurrent!=null&&this._bsCurrent.bsClose();this._bsCurrent=null;this.usingBs=!1},messagesHide:function(){this._coverOverlay==null&&(this._coverOverlay=p.area.getOverlay("contraptions-cover"));for(var a=this.messages.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].remove();this.getLayers();this._messagesOverlay.get_graphics().clear();this._messagesCurrent=null;
this.usingMessages=!1},onMenuSelect:function(a){p.parser.setInt(this._menuVariable,a);this._menuAction!=null&&p.parser.run(this._menuAction,!0)},onMessagesSelect:function(a){p.parser.setInt(this._messagesVariable,a);this._messagesAction!=null&&p.parser.run(this._messagesAction,!0)},loadLoadingIc:function(){this._loadingOverlay==null?(this.getLayers(),this._loadingOverlay.set_visible(!1),this._loadingIc=new Oj(m(this,this.onLoadingIc)),this._loadingOverlay.addChild(this._loadingIc)):this._loadingIc==
null&&(this._loadingOverlay.set_visible(!1),this._loadingIc=new Oj(m(this,this.onLoadingIc)),this._loadingOverlay.addChild(this._loadingIc));this._loadingIc.set_visible(!1);this._loadingOverlay.set_visible(!1);this._loadingIc.unload();p.mdata.loadingic[0]!=""&&(this._loadingIc.frames=L.parseInt(p.mdata.loadingic[1]),this._loadingIc.frtime=L.parseInt(p.mdata.loadingic[2]),this._loadingIc.load(p.mdata.loadingic[0]))},showLoadingIc:function(){this._loadingIc.get_mediaLoaded()?(this._loadingIc.set_visible(!0),
this._loadingOverlay.set_visible(!0)):(this._loadingIc.set_visible(!1),this._loadingOverlay.set_visible(!1))},hideLoadingIc:function(){this._loadingIc.set_visible(!1);this._loadingOverlay.set_visible(!1)},onLoadingIc:function(a){a?(this._loadingIc.set_x((p.area.get_aWidth()-this._loadingIc.get_width())/2),this._loadingIc.set_y((p.area.get_aHeight()-this._loadingIc.get_height())/2)):(this._loadingIc.set_visible(!1),this._loadingOverlay.set_visible(!1))},zoomInstance:function(a){this._zoomOverlay==
null&&(this.getLayers(),this._zoomOverlay.set_visible(!1),this._zoomPicture=new Vc(m(this,this.onZoomPic)),this._zoomPicture.set_visible(!1),this._zoomOverlay.addChild(this._zoomPicture),this._zoomVideo=new Zh(m(this,this.onZoomVideo),m(this,this.onZoomVideoEnd)),this._zoomVideo.set_visible(!1),this._zoomOverlay.addChild(this._zoomVideo));a=p.area.pickInstance(a);if(a==null)return this._zoomOverlay.set_visible(!1),this._zoomPicture.set_visible(!1),this._zoomVideo.set_visible(!1),this._zoomPicture.unload(),
this._zoomVideo.unload(),!1;if(a.get_currentType()=="picture")return this._zoomPicture.load(a.get_currentMedia()),!0;if(a.get_currentType()=="video")return this._zoomVideo.load(a.get_currentMedia()),!0;this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();return!1},onZoomPic:function(a){this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);a?(this._zoomOverlay.get_graphics().clear(),
this._zoomOverlay.get_graphics().beginFill(0,.5),this._zoomOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._zoomOverlay.get_graphics().endFill(),p.area.pause(),this._zoomPicture.set_width(p.area.get_aWidth()-10),this._zoomPicture.set_height(this._zoomPicture.get_width()*(this._zoomPicture.oHeight/this._zoomPicture.oWidth)),this._zoomPicture.get_height()>p.area.get_aHeight()-10&&(this._zoomPicture.set_height(p.area.get_aHeight()-10),this._zoomPicture.set_width(this._zoomPicture.get_height()*
(this._zoomPicture.oWidth/this._zoomPicture.oHeight))),this._zoomPicture.set_visible(!0),this._zoomOverlay.set_visible(!0),this._zoomPicture.set_x((p.area.get_aWidth()-this._zoomPicture.get_width())/2),this._zoomPicture.set_y((p.area.get_aHeight()-this._zoomPicture.get_height())/2),this._zoomPicture.addEventListener("click",m(this,this.onZoomPClick))):(this._zoomPicture.unload(),this._zoomVideo.unload())},onZoomVideo:function(a){this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);
this._zoomVideo.set_visible(!1);a?(this._zoomOverlay.get_graphics().clear(),this._zoomOverlay.get_graphics().beginFill(0,.5),this._zoomOverlay.get_graphics().drawRect(0,0,p.area.get_aWidth(),p.area.get_aHeight()),this._zoomOverlay.get_graphics().endFill(),p.area.pause(),this._zoomVideo.set_width(p.area.get_aWidth()-10),this._zoomVideo.set_height(this._zoomVideo.get_width()*(this._zoomVideo.oHeight/this._zoomVideo.oWidth)),this._zoomVideo.get_height()>p.area.get_aHeight()-10&&(this._zoomVideo.set_height(p.area.get_aHeight()-
10),this._zoomVideo.set_width(this._zoomVideo.get_height()*(this._zoomVideo.oWidth/this._zoomVideo.oHeight))),this._zoomVideo.set_visible(!0),this._zoomOverlay.set_visible(!0),this._zoomVideo.play(),this._zoomVideo.addEventListener("click",m(this,this.onZoomVClick))):(this._zoomPicture.unload(),this._zoomVideo.unload())},onZoomVideoEnd:function(){this._zoomVideo.setTime(0);this._zoomVideo.play()},onZoomPClick:function(a){this._zoomPicture.removeEventListener("click",m(this,this.onZoomPClick));this._zoomOverlay.set_visible(!1);
this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();p.area.play()},onZoomVClick:function(a){this._zoomVideo.removeEventListener("click",m(this,this.onZoomVClick));this._zoomOverlay.set_visible(!1);this._zoomPicture.set_visible(!1);this._zoomVideo.set_visible(!1);this._zoomPicture.unload();this._zoomVideo.unload();p.area.play()},removeZoom:function(){this._zoomOverlay!=null&&(this._zoomPicture!=null&&(this._zoomPicture.hasEventListener("click")&&
this._zoomPicture.removeEventListener("click",m(this,this.onZoomPClick)),this._zoomPicture.set_visible(!1),this._zoomPicture.unload()),this._zoomVideo!=null&&(this._zoomVideo.hasEventListener("click")&&this._zoomVideo.removeEventListener("click",m(this,this.onZoomVClick)),this._zoomVideo.set_visible(!1),this._zoomVideo.unload()),this._zoomOverlay.set_visible(!1))},showCover:function(a){this.getLayers();return Object.prototype.hasOwnProperty.call(this.covers.h,a)?(this._coverOverlay.removeChildren(),
this._coverOverlay.addChild(this.covers.h[a].getCover()),this._coverOverlay.mouseEnabled=this.covers.h[a].holdClick,this._coverOverlay.set_visible(!0),p.focusMode?this._coverOverlay.set_filters([new pf(new Yh)]):this._coverOverlay.set_filters([]),!0):!1},hideCover:function(){this.getLayers();this._coverOverlay.removeChildren();this._coverOverlay.set_visible(!1);this._coverOverlay.mouseEnabled=!1},showBackground:function(a){this.getLayers();return Object.prototype.hasOwnProperty.call(this.backgrounds.h,
a)?(this._backgroundOverlay.removeChildren(),this._backgroundOverlay.addChild(this.backgrounds.h[a].getCover()),this._backgroundOverlay.set_visible(!0),p.focusMode?this._backgroundOverlay.set_filters([new pf(new Yh)]):this._backgroundOverlay.set_filters([]),!0):!1},hideBackground:function(){this.getLayers();this._backgroundOverlay.removeChildren();this._backgroundOverlay.set_visible(!1);this._backgroundOverlay.mouseEnabled=!1},setFocus:function(){p.focusMode?(this._backgroundOverlay.get_visible()&&
this._backgroundOverlay.set_filters([new pf(new Yh)]),this._coverOverlay.get_visible()&&this._coverOverlay.set_filters([new pf(new Yh)])):(this._backgroundOverlay.get_visible()&&this._backgroundOverlay.set_filters([]),this._coverOverlay.get_visible()&&this._coverOverlay.set_filters([]))},hideForm:function(){this._formsOverlay.removeChildren();this._formsOverlay.set_visible(!1)},showForm:function(a,b,c,d,f){this.hideForm();return Object.prototype.hasOwnProperty.call(this.forms.h,a)?(this.forms.h[a].start(d,
f),this.forms.h[a].set_x(b),this.forms.h[a].set_y(c),this._formsOverlay.addChild(this.forms.h[a]),this._formsOverlay.set_visible(!0),this._formcurrent=a,!0):!1},setFormValue:function(a,b){return this._formcurrent==""?!1:this.forms.h[this._formcurrent].setValue(a,b)},setFormStepper:function(a,b,c,d){return this._formcurrent==""?!1:this.forms.h[this._formcurrent].setStepper(a,b,c,d)},getFormValue:function(a){return this._formcurrent==""?"":this.forms.h[this._formcurrent].getValue(a)},hideAllInterfaces:function(){this._interfaceOverlay.removeChildren();
this._interfaceOverlay.set_visible(!1)},hideInterface:function(a){Object.prototype.hasOwnProperty.call(this.interf.h,a)&&this.interf.h[a].remove();this._interfaceOverlay.get_numChildren()==0&&this._interfaceOverlay.set_visible(!1)},showInterface:function(a,b,c){this.hideInterface(a);return Object.prototype.hasOwnProperty.call(this.interf.h,a)?(this.interf.h[a].start(),this.interf.h[a].set_x(b),this.interf.h[a].set_y(c),this._interfaceOverlay.addChild(this.interf.h[a]),this._interfaceOverlay.set_visible(!0),
!0):!1},checkInterfaceCollision:function(a){if(this._interfaceOverlay.get_visible()){for(var b=!1,c=0,d=this._interfaceOverlay.get_numChildren();c<d;){var f=c++;b||(f=this._interfaceOverlay.getChildAt(f),f!=null&&(b=f.checkCollision(a)))}return b}return!1},checkInterfaceOver:function(a){if(this._interfaceOverlay.get_visible()){for(var b=!1,c=0,d=this._interfaceOverlay.get_numChildren();c<d;){var f=c++;this._interfaceOverlay.getChildAt(f).hitTestObject(a)&&(b=!0)}return b}return!1},setInterfaceText:function(a,
b){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].setText(b):!1},setInterfaceFrame:function(a,b){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].setMapFrame(b):!1},pauseInterface:function(a){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].pauseMap():!1},playInterface:function(a){return Object.prototype.hasOwnProperty.call(this.interf.h,a)?this.interf.h[a].playMap():!1},__class__:eb};var Ya=function(a){this.ok=
!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.CoverContraption"]=Ya;Ya.__name__="com.tilbuci.contraptions.CoverContraption";Ya.__super__=za;Ya.prototype=I(za.prototype,{ok:null,id:null,holdClick:null,landscape:null,portrait:null,_landscape:null,_portrait:null,create:function(a,b){this.ok&&this.removeChildren();return this},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new Ya(this.toObject())},getCover:function(){this.removeChildren();
p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small),this.addChild(this._landscape)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small),this.addChild(this._portrait)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big),this.addChild(this._portrait)):(this._landscape.set_width(p.mdata.screen.small),
this._landscape.set_height(p.mdata.screen.big),this.addChild(this._landscape));return this},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"click")?this.holdClick=A.field(a,"click"):this.holdClick=!1,Object.prototype.hasOwnProperty.call(a,"portrait")?(this.portrait=A.field(a,"portrait"),this.portrait!=""&&(this._portrait=new Vc(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",
Object.prototype.hasOwnProperty.call(a,"landscape")?(this.landscape=A.field(a,"landscape"),this.landscape!=""&&(this._landscape=new Vc(m(this,this.onPicLoad)),this._landscape.set_visible(!0))):this.landscape="",this.holdClick==null&&(this.holdClick=!1),this.portrait==null&&(this.portrait=""),this.landscape==null&&(this.landscape=""),this.landscape!=""||this.portrait!="")?(this._landscape!=null&&this._landscape.load(this.landscape),this._portrait!=null&&this._portrait.load(this.portrait),this.holdClick?
(this.addEventListener("click",m(this,this.onClick)),this.mouseEnabled=!0):this.mouseEnabled=!1,this.mouseChildren=!1,!0):!1},onPicLoad:function(a){p.area.get_pOrientation()=="horizontal"?this._landscape!=null?(this._landscape.set_width(p.mdata.screen.big),this._landscape.set_height(p.mdata.screen.small)):(this._portrait.set_width(p.mdata.screen.big),this._portrait.set_height(p.mdata.screen.small)):this._portrait!=null?(this._portrait.set_width(p.mdata.screen.small),this._portrait.set_height(p.mdata.screen.big)):
(this._landscape.set_width(p.mdata.screen.small),this._landscape.set_height(p.mdata.screen.big))},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this._landscape!=null&&this._landscape.kill();this._portrait!=null&&this._portrait.kill();this.id=this.portrait=this.landscape=this._portrait=this._landscape=null;this.hasEventListener("click")&&this.removeEventListener("click",m(this,this.onClick))},toObject:function(){return{id:this.id,click:this.holdClick,landscape:this.landscape,
portrait:this.portrait}},onClick:function(a){},__class__:Ya});var Dc=function(){this._options=[];this._buttons=[];this.menuSize=new Qa;this.gap=10;this.position="center";this.buton="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;za.call(this)};r["com.tilbuci.contraptions.DflowContraption"]=Dc;Dc.__name__="com.tilbuci.contraptions.DflowContraption";Dc.__super__=za;Dc.prototype=I(za.prototype,{ok:null,id:null,font:null,fontcolor:null,fontsize:null,buton:null,position:null,
gap:null,menuSize:null,_btbitmap:null,_btsize:null,_buttons:null,_options:null,create:function(a){if(this.ok){for(this.removeChildren();this._buttons.length>0;)this._buttons.shift().kill();this._options=a;for(var b=0,c=0,d=a.length;c<d;){var f=c++;a[f][0]!=""&&a[f][1]!=""&&(f=new Ta(f==null?"null":""+f,m(this,this.onClick),this.buton,a[f][0],this.font,this.fontsize,mb.colorInt(this.fontcolor)),f.set_x(0),f.set_y((this.gap+this._btsize.y)*b),this._buttons.push(f),this.addChild(f),++b)}this.menuSize.x=
this._btsize.x;this.menuSize.y=this._buttons.length*this._btsize.y+this.gap*(this._buttons.length-1)}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&(b=!0,this.onClick(f.value))}return b},remove:function(){for(this.removeChildren();this._buttons.length>0;)this._buttons.shift().kill();this._options=[];this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new Dc;a.load({id:this.id,font:this.font,
fontcolor:this.fontcolor,fontsize:this.fontsize,buton:this.buton,position:this.position,gap:this.gap});return a},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")?(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=A.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=A.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=A.field(a,
"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=A.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=A.field(a,"gap"):this.gap=10,Object.prototype.hasOwnProperty.call(a,"position")?this.position=A.field(a,"position"):this.position="center",this.font==null&&(this.font="sans"),this.fontcolor==null&&(this.fontcolor="0xffffff"),this.fontsize==null&&(this.fontsize=20),this.buton==null&&(this.buton=""),this.gap==null&&(this.gap=
10),this.position==null&&(this.position="center"),this.fontcolor=mb.colorHex(this.fontcolor,"#FFFFFF"),this._btbitmap==null&&(this._btbitmap=new Vc(m(this,this.onBTLoad))),this._btbitmap.load(this.buton),!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=this.font=this.fontcolor=this.buton=this.position=null;this._buttons.length>0;)this._buttons.shift().kill();this.menuSize=this._options=this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},
toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,buton:this.buton,position:this.position,gap:this.gap}},onBTLoad:function(a){if(this.ok=a)this._btsize=new Qa(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._options[L.parseInt(a)][1]!=""&&p.parser.run('{"ac":"scene.load","param":["'+this._options[L.parseInt(a)][1]+'"]}');this.remove()},__class__:Dc});var Db=function(a){this._inputs=new aa;this._graphics=new aa;this._created=
!1;this.elem=[];this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.FormContraption"]=Db;Db.__name__="com.tilbuci.contraptions.FormContraption";Db.__super__=za;Db.prototype=I(za.prototype,{ok:null,id:null,elem:null,_created:null,_graphics:null,_ok:null,_cancel:null,_inputs:null,setValue:function(a,b){if(this._created&&Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var c=!1;if(this._inputs.h[a]instanceof Wc)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof
id)this._inputs.h[a].set_value(p.parser.parseInt(b)),c=!0;else if(this._inputs.h[a]instanceof Yc)this._inputs.h[a].set_selected(p.parser.parseBool(b)),c=!0;else if(this._inputs.h[a]instanceof df)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof Qd){a=this._inputs.h[a];c=0;for(var d=a.get_dataProvider().get_length();c<d;){var f=c++;a.get_dataProvider().get(f).text==p.parser.parseString(b)&&a.set_selectedIndex(f)}c=!0}return c}return!1},getValue:function(a){if(this._created&&
Object.prototype.hasOwnProperty.call(this._inputs.h,a)){var b="";this._inputs.h[a]instanceof Wc?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof id?b=L.string(this._inputs.h[a].get_value()):this._inputs.h[a]instanceof Yc?b=this._inputs.h[a].get_selected()?"true":"false":this._inputs.h[a]instanceof df?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof Qd&&(b=this._inputs.h[a].get_selectedItem().text);return b}return""},setStepper:function(a,b,c,d){return this._created&&Object.prototype.hasOwnProperty.call(this._inputs.h,
a)&&this._inputs.h[a]instanceof id?(a=this._inputs.h[a],a.set_minimum(b),a.set_maximum(c),a.set_step(d),!0):!1},start:function(a,b){if(this.ok){this._ok=a;this._cancel=b;if(!this._created){a=0;for(b=this.elem;a<b.length;){var c=b[a];++a;switch(c.type){case "background":if(c.file!=""){var d=this._graphics,f=new Vc;d.h.background=f;this._graphics.h.background.load(c.file);this._graphics.h.background.set_visible(!0)}break;case "btcancel":c.file!=""&&(d=this._graphics,f=new Vc,d.h.btcancel=f,this._graphics.h.btcancel.load(c.file),
this._graphics.h.btcancel.set_visible(!0),this._graphics.h.btcancel.set_x(c.x),this._graphics.h.btcancel.set_y(c.y),this._graphics.h.btcancel.addEventListener("click",m(this,this.onCancel)),this._graphics.h.btcancel.addEventListener("mouseOver",m(this,this.onCancelOver)),this._graphics.h.btcancel.addEventListener("mouseOut",m(this,this.onCancelOut)));break;case "btok":d=this._graphics;f=new Vc;d.h.btok=f;this._graphics.h.btok.load(c.file);this._graphics.h.btok.set_visible(!0);this._graphics.h.btok.set_x(c.x);
this._graphics.h.btok.set_y(c.y);this._graphics.h.btok.addEventListener("click",m(this,this.onOk));this._graphics.h.btok.addEventListener("mouseOver",m(this,this.onOkOver));this._graphics.h.btok.addEventListener("mouseOut",m(this,this.onOkOut));break;case "input":f=this._inputs;d=c.name;var g=new Wc;f.h[d]=g;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "numeric":d=new id;d.set_minimum(0);d.set_maximum(1E4);d.set_step(1);this._inputs.h[c.name]=
d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "password":d=new Wc;d.set_displayAsPassword(!0);this._inputs.h[c.name]=d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "select":d=new Qd;f=c.options.split(";");f.length==0&&f.push("?");g=[];for(var h=0;h<f.length;){var l=f[h];++h;g.push({text:l})}d.set_dataProvider(new mg(g));d.itemToText=function(k){return k.text};
this._inputs.h[c.name]=d;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "textarea":d=this._inputs;f=c.name;g=new df;d.h[f]=g;this._inputs.h[c.name].set_x(c.x);this._inputs.h[c.name].set_y(c.y);this._inputs.h[c.name].set_width(c.width);break;case "toggle":d=this._inputs,f=c.name,g=new Yc,d.h[f]=g,this._inputs.h[c.name].set_x(c.x),this._inputs.h[c.name].set_y(c.y)}}Object.prototype.hasOwnProperty.call(this._graphics.h,"background")&&
this.addChild(this._graphics.h.background);Object.prototype.hasOwnProperty.call(this._graphics.h,"btok")&&this.addChild(this._graphics.h.btok);Object.prototype.hasOwnProperty.call(this._graphics.h,"btcancel")&&this.addChild(this._graphics.h.btcancel);a=Object.keys(this._inputs.h);b=a.length;for(c=0;c<b;)d=a[c++],this.addChild(this._inputs.h[d])}return this._created=!0}return!1},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new Db(this.toObject())},
load:function(a){for(this.ok=!1;this.elem.length>0;)this.elem.shift();if(Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=A.field(a,"elem");for(var b=0,c=A.fields(a);b<c.length;){var d=c[b];++b;d=A.field(a,d);this.elem.push(d)}return this.ok=!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=null;this.elem.length>0;)this.elem.shift();this.elem=null;Object.prototype.hasOwnProperty.call(this._graphics.h,
"btok")&&(this._graphics.h.btok.removeEventListener("click",m(this,this.onOk)),this._graphics.h.btok.removeEventListener("mouseOver",m(this,this.onOkOver)),this._graphics.h.btok.removeEventListener("mouseOut",m(this,this.onOkOut)));Object.prototype.hasOwnProperty.call(this._graphics.h,"btcancel")&&(this._graphics.h.btcancel.removeEventListener("click",m(this,this.onCancel)),this._graphics.h.btcancel.removeEventListener("mouseOver",m(this,this.onCancelOver)),this._graphics.h.btcancel.removeEventListener("mouseOut",
m(this,this.onCancelOut)));var a=this._graphics.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._graphics.h[d].kill();var f=this._graphics;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._ok=this._cancel=this._graphics=null;a=this._inputs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._inputs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._inputs=null},toObject:function(){return{id:this.id,elem:this.elem}},onOk:function(a){this.onOkOut(null);
this.onCancelOut(null);this._ok!=null&&p.parser.run(this._ok,!0);this._ok=this._cancel=null;p.contraptions.hideForm()},onOkOver:function(a){p.cursorVisible&&p.mdata.highlight!=""&&this._graphics.h.btok.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)])},onOkOut:function(a){this._graphics.h.btok.set_filters([])},onCancel:function(a){this.onOkOut(null);this.onCancelOut(null);this._cancel!=null&&p.parser.run(this._cancel,!0);this._ok=this._cancel=null;p.contraptions.hideForm()},onCancelOver:function(a){p.cursorVisible&&
p.mdata.highlight!=""&&this._graphics.h.btcancel.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)])},onCancelOut:function(a){this._graphics.h.btcancel.set_filters([])},__class__:Db});var yc=function(a){this._graphics=new aa;this._created=!1;this.elem=[];this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.InterfaceContraption"]=yc;yc.__name__="com.tilbuci.contraptions.InterfaceContraption";yc.__super__=za;yc.prototype=I(za.prototype,{ok:null,id:null,elem:null,_created:null,
_graphics:null,_smap:null,_text:null,start:function(){if(this.ok){if(!this._created){for(var a=1,b=0,c=this.elem;b<c.length;){var d=c[b];++b;switch(d.type){case "background":if(d.file!=""){var f=new Vc;f.load(d.file);f.set_visible(!0);this._graphics.h.background=f}break;case "spritemap":f=d.options.split(";");f.length==2&&(this._smap=new Oj,this._smap.frames=L.parseInt(f[0]),this._smap.frtime=L.parseInt(f[1]),this._smap.playOnLoad=!1,this._smap.load(d.file),this._smap.set_visible(!0),this._smap.set_x(d.x),
this._smap.set_y(d.y),d.action!=""&&(this._smap.extraInfo.push(d.action),this._smap.addEventListener("click",m(this,this.onClick)),this._smap.addEventListener("mouseOver",m(this,this.onOver)),this._smap.addEventListener("mouseOut",m(this,this.onOut))),this._graphics.h.spritemap=this._smap);break;case "text":f=d.options.split(";");f.length==7&&(this._text=new Jc,this._text.set_selectable(!1),this._text.mouseEnabled=!1,this._text.set_x(d.x),this._text.set_y(d.y),this._text.set_width(L.parseInt(f[0])),
d=new qf(f[1],L.parseInt(f[2]),mb.colorInt(f[3]),f[4]=="true",f[5]=="true",null,null,null,vk.fromString(f[6])),this._text.set_defaultTextFormat(d),this._text.set_height(L.parseInt(f[2])+12));break;default:d.file!=""&&(f=new Vc,f.set_x(d.x),f.set_y(d.y),d.rot!=null&&f.set_rotation(d.rot),d.alpha!=null&&f.set_alpha(d.alpha/100),d.action!=""&&(f.extraInfo.push(d.action),f.addEventListener("click",m(this,this.onClick)),f.addEventListener("mouseOver",m(this,this.onOver)),f.addEventListener("mouseOut",
m(this,this.onOut))),f.load(d.file),f.set_visible(!0),this._graphics.h["im"+a]=f,++a)}}Object.prototype.hasOwnProperty.call(this._graphics.h,"background")&&this.addChild(this._graphics.h.background);a=Object.keys(this._graphics.h);b=a.length;for(c=0;c<b;)d=a[c++],d!="background"&&this.addChild(this._graphics.h[d]);this._text!=null&&this.addChild(this._text)}return this._created=!0}return!1},checkCollision:function(a){for(var b=!1,c=this._graphics.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]];
if(!b&&h.hasEventListener("click")&&h.extraInfo.length>0&&a.hitTestObject(h)){var l=p.mvActions,k=p.parser.parseString(h.extraInfo[0]);Object.prototype.hasOwnProperty.call(l.h,k)&&(b=p.parser,l=p.mvActions,h=p.parser.parseString(h.extraInfo[0]),b.run(l.h[h]),b=!0)}}return b},remove:function(){this.parent!=null&&this.parent.removeChild(this)},clone:function(){return new yc(this.toObject())},load:function(a){for(this.ok=!1;this.elem.length>0;)this.elem.shift();if(Object.prototype.hasOwnProperty.call(a,
"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=A.field(a,"elem");for(var b=0,c=A.fields(a);b<c.length;){var d=c[b];++b;d=A.field(a,d);this.elem.push(d)}return this.ok=!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=null;this.elem.length>0;)this.elem.shift();this._smap=this._text=this.elem=null;for(var a=Object.keys(this._graphics.h),b=a.length,c=0;c<b;){var d=a[c++];this._graphics.h[d].hasEventListener("click")&&
(this._graphics.h[d].removeEventListener("click",m(this,this.onClick)),this._graphics.h[d].removeEventListener("mouseOver",m(this,this.onOver)),this._graphics.h[d].removeEventListener("mouseOut",m(this,this.onOut)));this._graphics.h[d].kill();var f=this._graphics;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._graphics=null},toObject:function(){return{id:this.id,elem:this.elem}},setText:function(a){if(this._text==null)return!1;this._text.set_text(a);return!0},setMapFrame:function(a){return this._smap==
null?!1:this._smap.setFrame(a)},pauseMap:function(){if(this._smap==null)return!1;this._smap.pause();return!0},playMap:function(){if(this._smap==null)return!1;this._smap.play();return!0},onClick:function(a){this.onOut(a);a=a.target;if(a.extraInfo.length>0){var b=p.mvActions,c=p.parser.parseString(a.extraInfo[0]);if(Object.prototype.hasOwnProperty.call(b.h,c)){var d=p.parser;b=p.mvActions;c=p.parser.parseString(a.extraInfo[0]);d.run(b.h[c])}}},onOver:function(a){a=a.target;p.cursorVisible&&p.mdata.highlight!=
""&&a.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)])},onOut:function(a){a.target.set_filters([])},__class__:yc});var Ac=function(){this._rows=[];this._closeac=null;this.sound="";this.mode="a";this.horizontal=this.vertical=this.close="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;za.call(this);var a=new Pg(m(this,this.draw));this._rows.push(a);a=new Pg(m(this,this.draw));this._rows.push(a);a=new Pg(m(this,this.draw));this._rows.push(a)};r["com.tilbuci.contraptions.InventoryContraption"]=
Ac;Ac.__name__="com.tilbuci.contraptions.InventoryContraption";Ac.__super__=za;Ac.prototype=I(za.prototype,{ok:null,id:null,font:null,fontcolor:null,fontsize:null,horizontal:null,vertical:null,close:null,mode:null,sound:null,_hbitmap:null,_vbitmap:null,_cbitmap:null,_closeac:null,_rows:null,create:function(a){this.removeChildren();this._cbitmap.set_visible(!0);this._hbitmap.set_visible(this._vbitmap.set_visible(!1));if(this.ok){p.area.get_pOrientation()=="horizontal"?(this.addChild(this._hbitmap),
this._hbitmap.set_x(this._hbitmap.set_y(0)),this._hbitmap.set_width(p.mdata.screen.big),this._hbitmap.set_height(p.mdata.screen.small),this._cbitmap.set_x(this._hbitmap.get_width()-this._cbitmap.get_width()),this._hbitmap.set_visible(!0),p.focusMode?this._hbitmap.set_filters([new pf(new Yh)]):this._hbitmap.set_filters([])):(this.addChild(this._vbitmap),this._vbitmap.set_x(this._vbitmap.set_y(0)),this._vbitmap.set_width(p.mdata.screen.small),this._vbitmap.set_height(p.mdata.screen.big),this._cbitmap.set_x(this._vbitmap.get_width()-
this._cbitmap.get_width()),this._vbitmap.set_visible(!0),p.focusMode?this._vbitmap.set_filters([new pf(new Yh)]):this._vbitmap.set_filters([]));for(var b=0,c=this._rows;b<c.length;){var d=c[b];++b;this.addChild(d)}this._cbitmap.set_y(0);this.addChild(this._cbitmap);this._closeac=a}return this},draw:function(){for(var a=0,b=this._rows;a<b.length;){var c=b[a];++a;c.setText(this.font,this.fontsize,mb.colorInt(this.fontcolor))}this._rows[0].setData(p.narrative.keyItems);a=[];b=[];c=[];var d=[];p.narrative.consItNames.length>
0&&(p.narrative.consItNames.length>0&&(a.push(p.narrative.consItNames[0]),b.push(p.narrative.consItAmounts[0])),p.narrative.consItNames.length>1&&(a.push(p.narrative.consItNames[1]),b.push(p.narrative.consItAmounts[1])),p.narrative.consItNames.length>2&&(a.push(p.narrative.consItNames[2]),b.push(p.narrative.consItAmounts[2])),p.narrative.consItNames.length>3&&(a.push(p.narrative.consItNames[3]),b.push(p.narrative.consItAmounts[3])));p.narrative.consItNames.length>4&&(p.narrative.consItNames.length>
4&&(c.push(p.narrative.consItNames[4]),d.push(p.narrative.consItAmounts[4])),p.narrative.consItNames.length>5&&(c.push(p.narrative.consItNames[5]),d.push(p.narrative.consItAmounts[5])),p.narrative.consItNames.length>6&&(c.push(p.narrative.consItNames[6]),d.push(p.narrative.consItAmounts[6])),p.narrative.consItNames.length>7&&(c.push(p.narrative.consItNames[7]),d.push(p.narrative.consItAmounts[7])));this._rows[1].setData(a,b);this._rows[2].setData(c,d);if(this._hbitmap.get_visible()){d=this._hbitmap.get_width()-
2*this._cbitmap.get_width();var f=this._hbitmap.get_height()-2*this._cbitmap.get_height();var g=f/5;if(this.mode=="k")this._rows[0].set_x(this._cbitmap.get_width()),this._rows[0].set_y(this._cbitmap.get_height()+g*2),this._rows[0].draw("h",d,g),this._rows[1].set_visible(this._rows[2].set_visible(!1));else if(this.mode=="c")this._rows[1].set_x(this._rows[2].set_x(this._cbitmap.get_width())),this._rows[1].set_y(this._cbitmap.get_height()+g),this._rows[2].set_y(this._cbitmap.get_height()+g*3),this._rows[1].draw("h",
d,g),this._rows[2].draw("h",d,g),this._rows[0].set_visible(!1);else for(a=0,b=this._rows.length;a<b;)c=a++,this._rows[c].set_x(this._cbitmap.get_width()),this._rows[c].set_y(this._cbitmap.get_height()+c*g*2),this._rows[c].draw("h",d,g)}else if(d=this._vbitmap.get_width()-2*this._cbitmap.get_width(),f=this._vbitmap.get_height()-2*this._cbitmap.get_height(),g=d/5,this.mode=="k")this._rows[0].set_y(this._cbitmap.get_height()),this._rows[0].set_x(this._cbitmap.get_width()+g*2),this._rows[0].draw("v",
f,g),this._rows[1].set_visible(this._rows[2].set_visible(!1));else if(this.mode=="c")this._rows[1].set_y(this._rows[2].set_y(this._cbitmap.get_height())),this._rows[1].set_x(this._cbitmap.get_width()+g),this._rows[2].set_x(this._cbitmap.get_width()+g*3),this._rows[1].draw("v",f,g),this._rows[2].draw("v",f,g),this._rows[0].set_visible(!1);else for(a=0,b=this._rows.length;a<b;)c=a++,this._rows[c].set_y(this._cbitmap.get_height()),this._rows[c].set_x(this._cbitmap.get_width()+c*g*2),this._rows[c].draw("v",
f,g)},checkCollision:function(a){var b=!1;if(this.ok)if(b=this._cbitmap.hitTestObject(a))this.onClose();else b||=this._rows[0].checkCollision(a),b||=this._rows[1].checkCollision(a),b||=this._rows[2].checkCollision(a);return b},checkOver:function(a){var b=!1;this.ok&&((b=this._cbitmap.hitTestObject(a))||(b=this._rows[0].checkOver(a)),b||=this._rows[1].checkOver(a),b||=this._rows[2].checkOver(a));return b},remove:function(){this.removeChildren();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=
new Ac;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,mode:this.mode,sound:this.sound});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=A.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=A.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=A.field(a,"fontcolor"):this.fontcolor="0xffffff";
Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=A.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=A.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=A.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,"close")?this.close=A.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,"mode")?this.mode=A.field(a,"mode"):this.mode="a";
Object.prototype.hasOwnProperty.call(a,"sound")?this.sound=A.field(a,"sound"):this.sound="";this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.vertical==null&&(this.vertical="");this.horizontal==null&&(this.horizontal="");this.close==null&&(this.close="");this.mode==null&&(this.mode="a");this.sound==null&&(this.sound="");this.fontcolor=mb.colorHex(this.fontcolor,"#FFFFFF");if(this.horizontal!=""||this.vertical!="")this.horizontal==
""&&(this.horizontal=this.vertical),this.vertical==""&&(this.vertical=this.horizontal);this._cbitmap==null&&(this._cbitmap=new Vc(m(this,this.onBTLoad)));this.close!=""&&this._cbitmap.load(this.close);return!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=this.font=this.fontcolor=this.horizontal=this.vertical=this.close=this.sound=null;this.parent!=null&&this.parent.removeChild(this);this._cbitmap!=null&&(this._cbitmap.hasEventListener("click")&&
(this._cbitmap.removeEventListener("click",m(this,this.onClose)),this._cbitmap.removeEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.removeEventListener("mouseOut",m(this,this.onCloseOut))),this._cbitmap.kill());this._cbitmap=null;this._hbitmap!=null&&this._hbitmap.kill();this._hbitmap=null;this._vbitmap!=null&&this._vbitmap.kill();for(this._vbitmap=null;this._rows.length>0;)this._rows.shift().kill();this._rows=null},toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,
fontsize:this.fontsize,horizontal:this.horizontal,vertical:this.vertical,close:this.close,mode:this.mode,sound:this.sound}},invClose:function(){this.onCloseOut(null);this.removeChildren();this._closeac!=null&&(p.parser.run(this._closeac,!0),this._closeac=null)},onBTLoad:function(a){if(this.ok=a)this._hbitmap==null&&(this._hbitmap=new Vc(m(this,this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new Vc(m(this,this.onBgLoad))),this._vbitmap.load(this.vertical),this._cbitmap.addEventListener("click",
m(this,this.onClose)),this._cbitmap.addEventListener("mouseOver",m(this,this.onCloseOver)),this._cbitmap.addEventListener("mouseOut",m(this,this.onCloseOut))},onBgLoad:function(a){a||(this.ok=!1)},onClose:function(a){p.parser.run('[ { "ac": "inventory.close", "param": [ ] } ]')},onCloseOver:function(a){p.cursorVisible&&(p.mode=="editor"||p.mdata.highlightInt==null||p.isMobile()||this._cbitmap.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},
__class__:Ac});var Pg=function(a){this._draw=null;this._size=0;this._texts=[];this.boxes=[];za.call(this);this.set_visible(!1);this._draw=a;a=new Vc(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new Vc(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",
m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new Vc(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);
this.addChild(a);this._texts.push(a);a=new Vc(m(this,this.onBox));a.extraInfo.push("");a.addEventListener("click",m(this,this.onBoxClick));a.addEventListener("mouseOver",m(this,this.onBoxOver));a.addEventListener("mouseOut",m(this,this.onBoxOut));this.addChild(a);this.boxes.push(a);a=new Jc;a.set_visible(!1);this.addChild(a);this._texts.push(a)};r["com.tilbuci.contraptions.InvItemRow"]=Pg;Pg.__name__="com.tilbuci.contraptions.InvItemRow";Pg.__super__=za;Pg.prototype=I(za.prototype,{boxes:null,_texts:null,
_size:null,_draw:null,setData:function(a,b){this.set_visible(!1);b==null&&(b=[0,0,0,0]);for(var c=0,d=this.boxes.length;c<d;){var f=c++;this.boxes[f].set_visible(!1);this.boxes[f].extraInfo[0]="";this.boxes[f].extraInfo[1]=f==null?"null":""+f;this.boxes[f].unload();this._texts[f].set_visible(!1);this._texts[f].set_text("")}c=0;for(d=a.length;c<d;)f=c++,f<4&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,a[f])&&(this.boxes[f].extraInfo[0]=a[f],this.boxes[f].load(p.narrative.items.h[a[f]].itgraphic),
b[f]!=0&&this._texts[f].set_text(L.string(b[f])))},draw:function(a,b,c){this._size=c;b/=9;c=0;for(var d=this.boxes.length;c<d;){var f=c++;this.boxes[f].set_width(this.boxes[f].set_height(this._size));a=="h"?(this.boxes[f].set_y(0),this.boxes[f].set_x(b+f*2*b)):(this.boxes[f].set_x(0),this.boxes[f].set_y(b+f*2*b))}},onBox:function(a){a=0;for(var b=this.boxes.length;a<b;){var c=a++;this.boxes[c].set_visible(this.boxes[c].get_mediaLoaded());this.boxes[c].get_mediaLoaded()&&(this.set_visible(!0),this.boxes[c].set_width(this.boxes[c].set_height(this._size)),
this._texts[c].get_text()!=""&&(this._texts[c].set_width(this._size),this._texts[c].set_x(this.boxes[c].get_x()),this._texts[c].set_y(this.boxes[c].get_y()+this._size+5),this._texts[c].set_visible(!0)))}},kill:function(){for(this.removeChildren();this.boxes.length>0;)this.boxes[0].removeEventListener("click",m(this,this.onBoxClick)),this.boxes[0].removeEventListener("mouseOver",m(this,this.onBoxOver)),this.boxes[0].removeEventListener("mouseOut",m(this,this.onBoxOut)),this.boxes.shift().kill();for(this.boxes=
null;this._texts.length>0;)this._texts.shift();this._draw=this._texts=null},setText:function(a,b,c){for(var d=0,f=this._texts;d<f.length;){var g=f[d];++d;g.set_defaultTextFormat(new qf(a,b,c,null,null,null,null,null,vk.fromString("center")))}},checkCollision:function(a){for(var b=!1,c=0,d=this.boxes;c<d.length;){var f=d[c];++c;if(!b&&f.get_visible()&&f.hitTestObject(a)&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,f.extraInfo[0])&&p.narrative.items.h[f.extraInfo[0]].itaction!=""){b=!0;
var g=p.narrative.items.h[f.extraInfo[0]].itaction;this._texts[L.parseInt(f.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(f.extraInfo[0]),this._draw());zi.quickJump(f,.3,5);p.contraptions.inv.h.inv.sound!=""&&p.contraptions.soundPlay(p.parser.parseString(p.contraptions.inv.h.inv.sound));p.parser.run(g)}}return b},checkOver:function(a){for(var b=!1,c=0,d=this.boxes;c<d.length;){var f=d[c];++c;!b&&f.get_visible()&&f.hitTestObject(a)&&Object.prototype.hasOwnProperty.call(p.narrative.items.h,
f.extraInfo[0])&&p.narrative.items.h[f.extraInfo[0]].itaction!=""&&(b=!0)}return b},onBoxClick:function(a){a=a.target;if(Object.prototype.hasOwnProperty.call(p.narrative.items.h,a.extraInfo[0])&&p.narrative.items.h[a.extraInfo[0]].itaction!=""){var b=p.narrative.items.h[a.extraInfo[0]].itaction;this._texts[L.parseInt(a.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(a.extraInfo[0]),this._draw());zi.quickJump(a,.3,5);p.contraptions.inv.h.inv.sound!=""&&p.contraptions.soundPlay(p.parser.parseString(p.contraptions.inv.h.inv.sound));
p.parser.run(b)}},onBoxOver:function(a){p.cursorVisible&&p.mode!="editor"&&p.mdata.highlightInt!=null&&!p.isMobile()&&(a=a.target,Object.prototype.hasOwnProperty.call(p.narrative.items.h,a.extraInfo[0])&&p.narrative.items.h[a.extraInfo[0]].itaction!=""&&a.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onBoxOut:function(a){a.target.set_filters([])},__class__:Pg});var $h=function(){this._buttons=[];this.bgalpha=0;this.bgcolor="0x000000";this.background=this.buton="";this.fontsize=20;this.fontcolor=
"0xffffff";this.font="sans";this.mode="v";this.ok=!1;za.call(this)};r["com.tilbuci.contraptions.MenuContraption"]=$h;$h.__name__="com.tilbuci.contraptions.MenuContraption";$h.__super__=za;$h.prototype=I(za.prototype,{ok:null,id:null,mode:null,font:null,fontcolor:null,fontsize:null,background:null,buton:null,bgcolor:null,bgalpha:null,_bgbitmap:null,_btbitmap:null,_btsize:null,_buttons:null,_ac:null,create:function(a,b){if(this.ok){this.removeChildren();this._bgbitmap.set_visible(!0);for(this.addChild(this._bgbitmap);this._buttons.length>
0;)this._buttons.shift().kill();for(var c=0,d=a.length;c<d;){var f=c++;this._buttons.push(new Ta(L.string(f+1),m(this,this.onClick),this.buton,a[f],this.font,this.fontsize,mb.colorInt(this.fontcolor)))}a=(this._bgbitmap.oWidth-this._btsize.x)/2;var g=(this._bgbitmap.oHeight-this._btsize.y*this._buttons.length)/(this._buttons.length+1);g<0&&(g=5);c=0;for(d=this._buttons.length;c<d;)f=c++,this._buttons[f].set_x(a),this._buttons[f].set_y((f+1)*g+f*this._btsize.y),this.addChild(this._buttons[f]);this._ac=
b;p.focusMode?this._bgbitmap.set_filters([new pf(new Yh)]):this._bgbitmap.set_filters([])}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&(b=!0,this._ac(f.value))}return b},remove:function(){this.removeChildren();for(this._ac=null;this._buttons.length>0;)this._buttons.shift().kill();this.parent!=null&&this.parent.removeChild(this)},clone:function(){var a=new $h;a.load({id:this.id,mode:this.mode,font:this.font,
fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,buton:this.buton,bgcolor:this.bgcolor,bgalpha:this.bgalpha});return a},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")?(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=A.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=A.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?
this.fontsize=A.field(a,"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"background")?this.background=A.field(a,"background"):this.background="",Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=A.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"bgcolor")?this.bgcolor=A.field(a,"bgcolor"):this.bgcolor="0x000000",Object.prototype.hasOwnProperty.call(a,"bgalpha")?this.bgalpha=A.field(a,"bgalpha"):this.bgalpha=0,Object.prototype.hasOwnProperty.call(a,
"mode")?this.mode=A.field(a,"mode"):this.mode="v",this.font==null&&(this.font="sans"),this.fontcolor==null&&(this.fontcolor="0xffffff"),this.fontsize==null&&(this.fontsize=20),this.background==null&&(this.background=""),this.buton==null&&(this.buton=""),this.bgcolor==null&&(this.bgcolor="0x000000"),this.bgalpha==null&&(this.bgalpha=0),this.mode==null&&(this.mode="v"),this.fontcolor=mb.colorHex(this.fontcolor,"#FFFFFF"),this.bgcolor=mb.colorHex(this.bgcolor,"#000000"),this._bgbitmap==null&&(this._bgbitmap=
new Vc(m(this,this.onBGLoad))),this._bgbitmap.load(this.background),!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=this.font=this.fontcolor=this.background=this.buton=this.bgcolor=this.mode=null;this._bgbitmap!=null&&(this._bgbitmap.kill(),this._bgbitmap=null);for(this._ac=null;this._buttons.length>0;)this._buttons.shift().kill();this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},toObject:function(){return{id:this.id,mode:this.mode,
font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,buton:this.buton,bgcolor:this.bgcolor,bgalpha:this.bgalpha}},onBGLoad:function(a){a&&(this._btbitmap==null&&(this._btbitmap=new Vc(m(this,this.onBTLoad))),this._btbitmap.load(this.buton))},onBTLoad:function(a){if(this.ok=a)this._btsize=new Qa(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._ac(a)},__class__:$h});var jh=function(){this._buttons=[];this._btbitmap=[null,null,null];this._bgbitmap=
null;this.gap=10;this.buton=["","",""];this.background="";this.fontsize=20;this.fontcolor="0xffffff";this.font="sans";this.ok=!1;za.call(this)};r["com.tilbuci.contraptions.MessagesContraption"]=jh;jh.__name__="com.tilbuci.contraptions.MessagesContraption";jh.__super__=za;jh.prototype=I(za.prototype,{ok:null,id:null,font:null,fontcolor:null,fontsize:null,background:null,buton:null,gap:null,_bgbitmap:null,_btbitmap:null,_buttons:null,_text:null,_ac:null,create:function(a,b,c){if(this.ok){this.removeChildren();
this._bgbitmap.set_visible(!0);this.addChild(this._bgbitmap);Me.trace("adicionar texto",{fileName:"Source/com/tilbuci/contraptions/MessagesContraption.hx",lineNumber:58,className:"com.tilbuci.contraptions.MessagesContraption",methodName:"create",customParams:[a]});this._text=new Jc;this._text.set_width(this._bgbitmap.get_width()-this.gap*2);this._text.set_height(this._bgbitmap.get_height()-this.gap*2);this._text.set_x(this._text.set_y(this.gap));this._text.set_defaultTextFormat(new qf(this.font,this.fontsize,
mb.colorInt(this.fontcolor),null,null,null,null,null,0));this._text.set_multiline(!0);this._text.set_wordWrap(!0);this._text.set_text(a);this._text.set_visible(!0);this._text.set_selectable(!1);for(this.addChild(this._text);b.length>3;)b.pop();for(;this._buttons.length>0;)this._buttons.shift().kill();a=0;for(var d=b.length;a<d;){var f=a++,g=new Ta(f==null?"null":""+f,m(this,this.onClick),this.buton[f],b[f],this.font,this.fontsize,mb.colorInt(this.fontcolor));g.set_x((this._bgbitmap.get_width()-this._btbitmap[f].get_width())/
2);f==0?(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()),f=this._text,f.set_height(f.get_height()-(this.gap+this._btbitmap[0].get_height()))):f==1?(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()-this.gap-this._btbitmap[1].get_height()),f=this._text,f.set_height(f.get_height()-(this.gap+this._btbitmap[1].get_height()))):f==2&&(g.set_y(this._bgbitmap.get_height()-this.gap-this._btbitmap[0].get_height()-this.gap-this._btbitmap[1].get_height()-
this.gap-this._btbitmap[2].get_height()),f=this._text,f.set_height(f.get_height()-(this.gap+this._btbitmap[2].get_height())));this._buttons.push(g);this.addChild(g)}this._ac=c}return this},checkCollision:function(a){var b=!1;if(this.ok)for(var c=0,d=this._buttons;c<d.length;){var f=d[c];++c;f!=null&&a.hitTestObject(f)&&(b=!0,this._ac(f.value))}return b},remove:function(){this.removeChildren();for(this._ac=this._text=null;this._buttons.length>0;)this._buttons.shift().kill();this.parent!=null&&this.parent.removeChild(this)},
clone:function(){var a=new jh;a.load({id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,gap:this.gap,buton0:this.buton[0],buton1:this.buton[1],buton2:this.buton[2]});return a},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=A.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=A.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=A.field(a,"fontcolor"):
this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=A.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=A.field(a,"gap"):this.gap=10;Object.prototype.hasOwnProperty.call(a,"background")?this.background=A.field(a,"background"):this.background="";Object.prototype.hasOwnProperty.call(a,"buton0")&&Object.prototype.hasOwnProperty.call(a,"buton1")&&Object.prototype.hasOwnProperty.call(a,"buton2")?this.buton=[A.field(a,"buton0"),
A.field(a,"buton1"),A.field(a,"buton2")]:this.buton=["","",""];this.font==null&&(this.font="sans");this.fontcolor==null&&(this.fontcolor="0xffffff");this.fontsize==null&&(this.fontsize=20);this.gap==null&&(this.gap=10);this.background==null&&(this.background="");this.buton==null&&(this.buton=["","",""]);a=0;for(var b=this.buton.length;a<b;){var c=a++;this.buton[c]==null&&(this.buton[c]="")}this.buton[1]==""&&(this.buton[1]=this.buton[0]);this.buton[2]==""&&(this.buton[2]=this.buton[0]);this.fontcolor=
mb.colorHex(this.fontcolor,"#FFFFFF");this._bgbitmap==null&&(this._bgbitmap=new Vc(m(this,this.onBGLoad)));this._bgbitmap.load(this.background);return!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=this.font=this.fontcolor=this.background=null;this.buton.length>0;)this.buton.shift();this.buton=null;this._bgbitmap.kill();for(this._bgbitmap=null;this._btbitmap.length>0;)this._btbitmap.shift().kill();for(this._ac=this._btbitmap=null;this._buttons.length>
0;)this._buttons.shift().kill();this._buttons=null;this.parent!=null&&this.parent.removeChild(this)},toObject:function(){return{id:this.id,font:this.font,fontcolor:this.fontcolor,fontsize:this.fontsize,background:this.background,gap:this.gap,buton0:this.buton[0],buton1:this.buton[1],buton2:this.buton[2]}},onBGLoad:function(a){a?(this._btbitmap[0]==null&&(this._btbitmap[0]=new Vc(m(this,this.onBTLoad0))),this._btbitmap[0].load(this.buton[0])):this.ok=!1},onBTLoad0:function(a){a&&(this._btbitmap[0].set_width(this._btbitmap[0].oWidth),
this._btbitmap[0].set_height(this._btbitmap[0].oHeight),this.ok=!0,this._btbitmap[1]==null&&(this._btbitmap[1]=new Vc(m(this,this.onBTLoad1))),this._btbitmap[2]==null&&(this._btbitmap[2]=new Vc(m(this,this.onBTLoad2))),this._btbitmap[1].load(this.buton[1]),this._btbitmap[2].load(this.buton[2]))},onBTLoad1:function(a){a?(this._btbitmap[1].set_width(this._btbitmap[1].oWidth),this._btbitmap[1].set_height(this._btbitmap[1].oHeight)):this.ok=!1},onBTLoad2:function(a){a?(this._btbitmap[2].set_width(this._btbitmap[2].oWidth),
this._btbitmap[2].set_height(this._btbitmap[2].oHeight)):this.ok=!1},onClick:function(a){this._ac(a)},__class__:jh});var oj=function(a){this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.MusicContraption"]=oj;oj.__name__="com.tilbuci.contraptions.MusicContraption";oj.__super__=za;oj.prototype=I(za.prototype,{ok:null,id:null,media:null,_music:null,clone:function(){return new oj(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&
(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=A.field(a,"media"),this.media==null&&(this.media=""),this._music=new Pj(m(this,this.onLoad),m(this,this.onEnd)),this.ok=!0):!1},kill:function(){this._music!=null&&(this._music.stop(),this._music.kill());this.media=null},toObject:function(){return{id:this.id,media:this.media}},play:function(){this._music!=null&&(this._music.get_lastMedia()!=this.media?this._music.load(this.media):this._music.play())},pause:function(){this._music!=
null&&this._music.pause()},stop:function(){this._music!=null&&this._music.stop()},volume:function(a){a>100?a=100:a<0&&(a=0);this._music!=null&&this._music.iterateSound(a/100)},onLoad:function(a){this._music.play()},onEnd:function(){this._music.play()},__class__:oj});var ai=function(a){this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.contraptions.SoundContraption"]=ai;ai.__name__="com.tilbuci.contraptions.SoundContraption";ai.__super__=za;ai.prototype=I(za.prototype,{ok:null,id:null,
media:null,_sound:null,clone:function(){return new ai(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=A.field(a,"media"),this.media==null&&(this.media=""),this._sound=new Pj(m(this,this.onLoad),m(this,this.onEnd)),this.ok=!0):!1},kill:function(){this._sound!=null&&(this._sound.stop(),this._sound.kill());this.media=null},toObject:function(){return{id:this.id,media:this.media}},
play:function(){this._sound!=null&&(this._sound.get_lastMedia()!=this.media?this._sound.load(this.media):this._sound.play())},pause:function(){this._sound!=null&&this._sound.pause()},stop:function(){this._sound!=null&&this._sound.stop()},volume:function(a){a>100?a=100:a<0&&(a=0);this._sound!=null&&this._sound.iterateSound(a/100)},onLoad:function(a){this._sound.play()},onEnd:function(){},__class__:ai});var bi=function(a){this.id=this.defaultp=this.menus=this.interf=this.inst1=this.inst1name=this.inst2=
this.inst2name=this.inst3=this.inst3name="";this.ok=!1;a!=null&&this.load(a)};r["com.tilbuci.contraptions.TargetContraption"]=bi;bi.__name__="com.tilbuci.contraptions.TargetContraption";bi.prototype={ok:null,id:null,defaultp:null,menus:null,interf:null,inst1:null,inst1name:null,inst2:null,inst2name:null,inst3:null,inst3name:null,clone:function(){return new bi(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=A.field(a,"id"),Object.prototype.hasOwnProperty.call(a,
"defaultp"))?(this.defaultp=A.field(a,"defaultp"),Object.prototype.hasOwnProperty.call(a,"menus")&&(this.menus=A.field(a,"menus")),Object.prototype.hasOwnProperty.call(a,"interf")&&(this.interf=A.field(a,"interf")),Object.prototype.hasOwnProperty.call(a,"inst1")&&(this.inst1=A.field(a,"inst1")),Object.prototype.hasOwnProperty.call(a,"inst1name")&&(this.inst1name=A.field(a,"inst1name")),Object.prototype.hasOwnProperty.call(a,"inst2")&&(this.inst2=A.field(a,"inst2")),Object.prototype.hasOwnProperty.call(a,
"inst2name")&&(this.inst2name=A.field(a,"inst2name")),Object.prototype.hasOwnProperty.call(a,"inst3")&&(this.inst3=A.field(a,"inst3")),Object.prototype.hasOwnProperty.call(a,"inst3name")&&(this.inst3name=A.field(a,"inst3name")),this.menus==null&&(this.menus=""),this.interf==null&&(this.interf=""),this.inst1==null&&(this.inst1=""),this.inst1name==null&&(this.inst1name=""),this.inst2==null&&(this.inst2=""),this.inst2name==null&&(this.inst2name=""),this.inst3==null&&(this.inst3=""),this.inst3name==null&&
(this.inst3name=""),this.ok=!0):!1},kill:function(){this.ok=!1;this.inst3name=this.inst3=this.inst2name=this.inst2=this.inst1name=this.inst1=this.interf=this.menus=this.defaultp=this.id=null},toObject:function(){return{id:this.id,defaultp:this.defaultp,menus:this.menus,interf:this.interf,inst1:this.inst1,inst1name:this.inst1name,inst2:this.inst2,inst2name:this.inst2name,inst3:this.inst3,inst3name:this.inst3name}},__class__:bi};var Nj=function(a){a==null&&(a=!0);this._thanks=[];this._languages=new aa;
this._version=this._build="";if(a){if(a=Sc.getText("buildInfo"),a=mb.jsonParse(a),a!=0){this._version=A.field(a,"version");this._build=A.field(a,"build");for(var b=0,c=A.fields(A.field(a,"languages"));b<c.length;){var d=c[b];++b;var f=A.field(A.field(a,"languages"),d);this._languages.h[d]=f}b=0;for(c=A.fields(A.field(a,"thanks"));b<c.length;)d=c[b],++b,this._thanks.push(A.field(A.field(a,"thanks"),d));Me.trace("Tilbuci player "+this._version+" build "+this._build+".",{fileName:"Source/com/tilbuci/data/BuildInfo.hx",
lineNumber:62,className:"com.tilbuci.data.BuildInfo",methodName:"new"})}}else this._build=this._version="custom"};r["com.tilbuci.data.BuildInfo"]=Nj;Nj.__name__="com.tilbuci.data.BuildInfo";Nj.prototype={version:null,get_version:function(){return this._version},_version:null,build:null,get_build:function(){return this._build},_build:null,languages:null,get_languages:function(){return this._languages},_languages:null,thanks:null,get_thanks:function(){return this._thanks},_thanks:null,__class__:Nj,
__properties__:{get_thanks:"get_thanks",get_languages:"get_languages",get_build:"get_build",get_version:"get_version"}};var $f=function(){this._has=!1;this._instances=new aa;this._collections=new aa};r["com.tilbuci.data.CopyData"]=$f;$f.__name__="com.tilbuci.data.CopyData";$f.prototype={_collections:null,_instances:null,_has:null,updateDisplay:null,hasCopy:function(){return this._has},clear:function(){var a=this._collections.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._collections;
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._instances.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._instances,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._has=!1},addCollection:function(a){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,a)?(this._collections.h[a]=p.movie.collections.h[a],!0):!1},addInstance:function(a,b){this._instances.h[a]=b;this._has=!0},broadcast:function(){if(this._has){for(var a=new aa,b=this._collections.h,
c=Object.keys(b),d=c.length,f=0;f<d;){var g=c[f++];b=this._collections.h[g].toJson();a.h[g]=b}var h=new aa;b=this._instances.h;c=Object.keys(b);d=c.length;for(f=0;f<d;)g=c[f++],b=this._instances.h[g].toJson(),h.h[g]=b;c=new aa;b=p.movie.get_mvId();c.h.movie=b;b=p.movie.get_scId();c.h.scene=b;c.h.collections=a;c.h.instances=h;window.TBB_sendTabsMessage("copy",mb.jsonStringify(c));this.receiveMessage(mb.jsonStringify(c))}},receiveMessage:function(a){a=mb.jsonAsMap(a);if(Object.prototype.hasOwnProperty.call(a.h,
"movie")&&Object.prototype.hasOwnProperty.call(a.h,"collections")&&Object.prototype.hasOwnProperty.call(a.h,"instances")&&a.h.movie==p.movie.get_mvId()){this.clear();for(var b=0,c=A.fields(a.h.collections);b<c.length;){var d=c[b];++b;var f=new tb(d,null,!1);f.fromJson(A.field(a.h.collections,d))&&(this._collections.h[d]=f)}b=0;for(c=A.fields(a.h.instances);b<c.length;)d=c[b],++b,f=new Tc(mb.jsonParse(A.field(a.h.instances,d))),f.ok&&Object.prototype.hasOwnProperty.call(this._collections.h,f.collection)&&
(this._instances.h[d]=f,this._has=!0);this.updateDisplay!=null&&this.updateDisplay()}},pasteInstances:function(){if(this._has){var a=this._collections.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._collections.h[d];p.movie.collections.h[d]=f}a=this._instances.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];var g=p.movie.scene.keyframes[p.area.get_currentKf()];f=this._instances.h[d];g.h[d]=f}p.area.updateOrder();p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],
p.area.get_currentKf())}},__class__:$f};var kd=function(a,b,c,d,f,g,h,l,k,q,w,v){v==null&&(v=0);f==null&&(f=0);c==null&&(c="POST");a==null&&(a=!1);this.binary=this.rawtext=this.json=this.map=this.extra=null;this.url="";this._mode=0;na.call(this);this._loader=new Si;this._loader.addEventListener("complete",m(this,this.onLoaderComplete));this._loader.addEventListener("ioError",m(this,this.onLoaderIOError));this._loader.addEventListener("securityError",m(this,this.onLoaderSecurityError));this._loader.addEventListener("progress",
m(this,this.onLoaderProgress));this._single=a;b!=null&&this.load(b,c,d,f,g,h,l,k,q,w,v)};r["com.tilbuci.data.DataLoader"]=kd;kd.__name__="com.tilbuci.data.DataLoader";kd.__super__=na;kd.prototype=I(na.prototype,{_loader:null,_ac:null,_end:null,_pr:null,_single:null,_mode:null,url:null,binary:null,rawtext:null,json:null,map:null,extra:null,setAction:function(a){this._ac=a},load:function(a,b,c,d,f,g,h,l,k,q,w){w==null&&(w=0);d==null&&(d=0);b==null&&(b="POST");switch(d){case 1:this._mode=1;this._loader.dataFormat=
1;break;case 3:this._mode=3;this._loader.dataFormat=1;break;case 4:this._mode=4;this._loader.dataFormat=1;break;case 5:this._mode=5;this._loader.dataFormat=0;break;case 6:this._mode=6;this._loader.dataFormat=0;break;default:this._mode=0,this._loader.dataFormat=0}this._end=k;this._ac=f;this._pr=g;this.extra=q;d=Rl._new();if(c!=null)for(f=Object.keys(c.h),g=f.length,h=0;h<g;)l=f[h++],d[l]=c.h[l];c=new Ve(a);c.data=d;c.method=b;w>0&&(c.idleTimeout=w);this.url=a;this._loader.load(c)},cancel:function(){if(this._loader!=
null){try{this._loader.close()}catch(a){}this._end!=null&&this._end();this._single&&this.kill()}},kill:function(){this._loader.removeEventListener("complete",m(this,this.onLoaderComplete));this._loader.removeEventListener("ioError",m(this,this.onLoaderIOError));this._loader.removeEventListener("securityError",m(this,this.onLoaderSecurityError));this._loader.removeEventListener("progress",m(this,this.onLoaderProgress));try{this._loader.close()}catch(a){}this.extra=this._end=this.url=this.map=this.json=
this.rawtext=this.binary=this._pr=this._ac=this._loader=null},finalText:function(a){return kd.customDecrypt!=null?kd.customDecrypt(a):X.substr(a,0,2)=="TB"&&X.substr(a,-10,1)=="b"?mb.decrypt(a,mb.md5(p.loadingMovie+X.substr(p.loadingMovie,2,null)).toLowerCase()):a},onLoaderComplete:function(a){this.map=this.json=this.rawtext=this.binary=null;var b=!1;switch(this._mode){case 1:this.rawtext=this.finalText(this._loader.data);b=!0;break;case 3:this.rawtext=this.finalText(this._loader.data);b=mb.jsonParse(this.rawtext);
b==0?(b=!1,this.rawtext=null):(this.json=b,b=!0);break;case 4:this.rawtext=this.finalText(this._loader.data);b=mb.jsonParse(this.rawtext);if(b==0)b=!1,this.rawtext=null;else{this.json=b;this.map=new aa;for(var c=0,d=A.fields(b);c<d.length;){var f=d[c];++c;var g=A.field(b,f);this.map.h[f]=g}b=!0}break;case 5:this.binary=this._loader.data;this.rawtext=this.finalText(Xh.encode(cc.toBytes(this.binary)));break;case 6:this.binary=this._loader.data;this.rawtext=this.finalText(Xh.encode(cc.toBytes(this.binary)));
b=mb.jsonParse(this.rawtext);if(b==0)b=!1,this.binary=this.rawtext=null;else{this.json=b;this.map=new aa;c=0;for(d=A.fields(b);c<d.length;)f=d[c],++c,g=A.field(b,f),this.map.h[f]=g;b=!0}break;default:this.binary=this._loader.data,b=!0}this._end!=null&&this._end();this._ac!=null&&(b?this._ac(!0,this):(Me.trace("erro ws",{fileName:"Source/com/tilbuci/data/DataLoader.hx",lineNumber:339,className:"com.tilbuci.data.DataLoader",methodName:"onLoaderComplete",customParams:[this._loader.data]}),this._ac(!1,
null)));this.dispatchEvent(a);this._single&&this.kill()},onLoaderIOError:function(a){this._end!=null&&this._end();this._ac!=null&&this._ac(!1,null);this.dispatchEvent(a);this._single&&this.kill()},onLoaderSecurityError:function(a){this._end!=null&&this._end();this._ac!=null&&this._ac(!1,null);this.dispatchEvent(a);this._single&&this.kill()},onLoaderProgress:function(a){this._pr!=null&&this._pr(a.bytesLoaded,a.bytesTotal);this.dispatchEvent(a)},__class__:kd});var Um=function(a,b,c){this._dateFile=
!0;this._language=[];this._base=this._player=this._ws=this._font="";this._loaded=!1;na.call(this);var d=null;this._callback=b;c&&(b=new aa,b.h.rand=Math.ceil(Math.random()*1E4),d=b);new kd(!0,a,"GET",d,3,m(this,this.dataLoaded))};r["com.tilbuci.data.EditorConfig"]=Um;Um.__name__="com.tilbuci.data.EditorConfig";Um.__super__=na;Um.prototype=I(na.prototype,{loaded:null,_loaded:null,get_loaded:function(){return this._loaded},base:null,_base:null,get_base:function(){return this._base},player:null,_player:null,
get_player:function(){return this._player},ws:null,_ws:null,get_ws:function(){return this._ws},font:null,_font:null,get_font:function(){return this._font},language:null,_language:null,get_language:function(){return this._language},dateFile:null,_dateFile:null,get_dateFile:function(){return this._dateFile},_callback:null,kill:function(){this._font=this._base=this._ws=null;if(this._language!=null)for(;this._language.length>0;)this._language.pop();this._callback=this._language=null},dataLoaded:function(a,
b){(this._loaded=a)?(Object.prototype.hasOwnProperty.call(b.json,"base")||(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"player")&&(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"ws")&&(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"font")&&(this._loaded=!1),this._loaded&&!Object.prototype.hasOwnProperty.call(b.json,"language")?this._language=[new od("English","default")]:this._language=b.json.language,this._loaded&&
(this._base=mb.slashURL(b.json.base),this._player=mb.slashURL(b.json.player),this._ws=mb.slashURL(b.json.ws),this._font=mb.slashURL(b.json.font)),this._callback(this._loaded)):this._callback(!1);this._callback=null},__class__:Um,__properties__:{get_dateFile:"get_dateFile",get_language:"get_language",get_font:"get_font",get_ws:"get_ws",get_player:"get_player",get_base:"get_base",get_loaded:"get_loaded"}});var ag=function(a){this._uploadType=this._externName="";this._extra=new aa;na.call(this);this._ref=
new eo;this._ref.addEventListener("select",m(this,this.onFileSelect));this._ref.addEventListener("cancel",m(this,this.onFileCancel));this._ref.addEventListener("complete",m(this,this.onLoadComplete));this._ref.addEventListener("ioError",m(this,this.onLoadIOError));this._stage=a;this._interface=new yd;a=new Bg;a.setPadding(10);a.set_gap(20);a.set_verticalAlign(fc.TOP);a.set_horizontalAlign(Vb.LEFT);this._interface.set_backgroundSkin(new Qj(3684408));this._interface.set_layout(a);this._interface.set_width(500);
this._interface.set_height(180);a=new pj;a.set_text(t.ln.get("uploader-title"));this._interface.set_header(a);this._fname=new bc;this._fname.set_text("");this._fname.set_wordWrap(!1);this._fname.set_width(this._interface.get_width()-30);this._interface.addChild(this._fname);this._bar=new Sl(0,0,1);this._bar.set_width(this._interface.get_width()-30);this._interface.addChild(this._bar);this._bt=new Qb;this._bt.set_text(t.ln.get("default-cancel"));this._bt.addEventListener("trigger",m(this,this.onCancel));
this._bt.set_width(this._interface.get_width()-30);this._interface.addChild(this._bt);this._localLoad=new eo;this._localLoad.addEventListener("select",m(this,this.onLocalLoaded));this._localLoad.addEventListener("complete",m(this,this.onLocalComplete));this._localLoad.addEventListener("ioError",m(this,this.onLocalError));this._localLoad.addEventListener("securityError",m(this,this.onLocalError))};r["com.tilbuci.data.FileUpload"]=ag;ag.__name__="com.tilbuci.data.FileUpload";ag.TBU_setFile=La.TBU_setFile=
function(a,b,c,d){t.up.onFileSelectExtern(a)};ag.TBU_setProgress=La.TBU_setProgress=function(a,b,c,d){d==null&&(d="");t.up.onProgressExtern(a,b);if(c)t.up.onUploadExtern(!0,d)};ag.TBU_setFailed=La.TBU_setFailed=function(){t.up.onCancelExtern()};ag.TBU_setAborted=La.TBU_setAborted=function(){t.up.onCancelExtern()};ag.__super__=na;ag.prototype=I(na.prototype,{_ref:null,_ac:null,_extra:null,_uploadType:null,_stage:null,_interface:null,_fname:null,_bar:null,_bt:null,_loader:null,_localLoad:null,_llComplete:null,
_externName:null,selectedName:null,get_selectedName:function(){return this._externName},browseForFont:function(a){this._ac=a;window.TBU_browse(".woff2,.woff");return!0},uploadFont:function(a,b){return mb.stringContains(this.get_selectedName(),[".woff"])?(this._uploadType="Font",this._ac=a,this._extra=b,Object.prototype.hasOwnProperty.call(this._extra.h,"movie")?(a="../movie/"+L.string(this._extra.h.movie)+".movie/media/font/",this._extra.h.path=a):this._extra.h.path="../font/",this._fname.set_text(this.get_selectedName()),
this._bar.set_minimum(this._bar.set_value(0)),this._bar.set_maximum(100),Ub.addPopUp(this._interface,this._stage),this.sendExtern("File/ExtFont"),!0):!1},browseForMedia:function(a,b){var c="";switch(b){case "audio":c=".mp3,.m4a";t.ln.get("uploader-audioname");break;case "embed":c=".zip";t.ln.get("uploader-embedname");break;case "html":c=".html,.htm";t.ln.get("uploader-htmlname");break;case "movie":c=".zip";t.ln.get("uploader-moviename");break;case "picture":c=".jpg,.png,.jpeg";t.ln.get("uploader-picturename");
break;case "snippets":c=".json";t.ln.get("uploader-stringsname");break;case "spritemap":c=".png";t.ln.get("uploader-spritemapname");break;case "update":c=".zip";t.ln.get("uploader-updatename");break;case "video":c=".mp4,.webm";t.ln.get("uploader-videoname");break;case "zip":c=".zip",t.ln.get("uploader-mediazip")}return c!=""?(this._ac=a,window.TBU_browse(c),!0):!1},uploadMedia:function(a,b){this._uploadType=b.h.type;this._ac=a;this._extra=b;this._fname.set_text(this.get_selectedName());this._bar.set_minimum(this._bar.set_value(0));
this._bar.set_maximum(100);Ub.addPopUp(this._interface,this._stage);this.sendExtern("Media/ExtUpload")},kill:function(){this._ref.removeEventListener("select",m(this,this.onFileSelect));this._ref.removeEventListener("cancel",m(this,this.onFileCancel));this._ref.removeEventListener("complete",m(this,this.onLoadComplete));this._ref.removeEventListener("ioError",m(this,this.onLoadIOError));this._stage=this._loader=this._extra=this._ac=this._ref=null;this._interface.removeChildren();this._bar=this._fname=
this._interface=null;this._bt.removeEventListener("trigger",m(this,this.onCancel));this._bt=null},send:function(a,b){var c=new aa,d=this.get_selectedName();c.h.fname=d;c.h.fcontent=b;if(this._extra!=null){d=Object.keys(this._extra.h);b=d.length;for(var f=0;f<b;){var g=d[f++];c.h[g]=this._extra.h[g]}}d=mb.jsonStringify(c);b=t.ws.get_url();c=new aa;c.h.r=d;d=mb.md5(t.ws.get_key()+d);c.h.s=d;d=t.ws.get_user();c.h.u=d;c.h.a=a;this._loader=new kd(!0,b,"POST",c,4,m(this,this.onUpload),m(this,this.onProgress))},
sendExtern:function(a){var b=new aa,c=this.get_selectedName();b.h.fname=c;if(this._extra!=null){c=Object.keys(this._extra.h);for(var d=c.length,f=0;f<d;){var g=c[f++];b.h[g]=this._extra.h[g]}}b=mb.jsonStringify(b);window.TBU_upload(a,b,t.ws.get_user(),mb.md5(t.ws.get_key()+b),t.ws.get_url())},onUpload:function(a,b){Ub.removePopUp(this._interface);this._loader=null;a?this._ac(!0,b.map):this._ac(!1,null);this._ac=null},onUploadExtern:function(a,b){Ub.removePopUp(this._interface);a?this._ac(!0,mb.jsonAsMap(b)):
this._ac(!1,null);this._ac=null},onProgress:function(a,b){b>0&&(this._bar.set_minimum(0),this._bar.set_value(a),this._bar.set_maximum(b))},onProgressExtern:function(a,b){b>0&&(this._bar.set_minimum(0),this._bar.set_value(a),this._bar.set_maximum(b))},onCancel:function(a){window.TBU_cancelUpload()},onCancelExtern:function(){this._extra=null;Ub.removePopUp(this._interface);this._ac(!1);this._ac=null},onFileCancel:function(a){this._ac(!1)},onFileSelect:function(a){this._ac(!0)},onFileSelectExtern:function(a){this._externName=
a;this._ac(!0)},onLoadComplete:function(a){this.send("File/"+this._uploadType,Xh.encode(cc.toBytes(this._ref.data)))},onLoadIOError:function(a){this._uploadType="";this._ac(!1);this._ac=null},selectFile:function(a,b,c){this._llComplete=a;a=new zt(b,c);this._localLoad.browse([a])},onLocalLoaded:function(a){this._localLoad.load()},onLocalComplete:function(a){this._llComplete(!0,this._localLoad.data)},onLocalError:function(a){this._llComplete(!1)},__class__:ag,__properties__:{get_selectedName:"get_selectedName"}});
var t=function(){};r["com.tilbuci.data.Global"]=t;t.__name__="com.tilbuci.data.Global";t.showActionWindow=function(a,b,c){t.acwindow==null&&(t.acwindow=new lq,t.acwindow.startInterface());t.acwindow.setContent(a,b,c);Ub.addPopUp(t.acwindow,t.stage)};t.showNewBlockWindow=function(a){t.acblock==null&&(t.acblock=new mq,t.acblock.startInterface());t.acInfo.loadInfo();t.acblock.setContent(a);Ub.addPopUp(t.acblock,t.stage)};t.showEditBlockWindow=function(a,b,c,d){c==null&&(c=-1);t.edblock==null&&(t.edblock=
new nq,t.edblock.startInterface());t.edblock.setContent(a,b,c,d);Ub.addPopUp(t.edblock,t.stage)};t.showPopup=function(a,b,c,d,f,g,h,l){l==null&&(l="");h==null&&(h="warn");a=new hl(a,b,c,d,f,g,h,l);Ub.addPopUp(a,t.stage)};t.evaluate=function(a){return null};t.setBrowserAddress=function(a,b){window.TBB_setAddress(a,b);return!0};t.copyText=function(a){var b=!1;try{window.TBB_copyText(a),b=!0}catch(c){Me.trace(a,{fileName:"Source/com/tilbuci/data/Global.hx",lineNumber:325,className:"com.tilbuci.data.Global",
methodName:"copyText"}),b=!1}return b};var Qa=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};r["openfl.geom.Point"]=Qa;Qa.__name__="openfl.geom.Point";Qa.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Qa.interpolate=function(a,b,c){return new Qa(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Qa.interpolateToOutput=function(a,b,c,d){return d!=null?(d.setTo(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y)),d):new Qa(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Qa.polar=function(a,b){return new Qa(a*
Math.cos(b),a*Math.sin(b))};Qa.polarToOutput=function(a,b,c){return c!=null?(c.setTo(a*Math.cos(b),a*Math.sin(b)),c):new Qa(a*Math.cos(b),a*Math.sin(b))};Qa.prototype={x:null,y:null,add:function(a){return new Qa(a.x+this.x,a.y+this.y)},addToOutput:function(a,b){return b!=null?(b.setTo(a.x+this.x,a.y+this.y),b):new Qa(a.x+this.x,a.y+this.y)},clone:function(){return new Qa(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},equals:function(a){return a!=null&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(this.x!=
0||this.y!=0)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a){return new Qa(this.x-a.x,this.y-a.y)},subtractToOutput:function(a,b){return b!=null?(b.setTo(this.x-a.x,this.y-a.y),b):new Qa(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+", y="+this.y+")"},__toLimeVector2:function(){Qa.__limeVector2==null&&(Qa.__limeVector2=new Ff);var a=Qa.__limeVector2;a.x=this.x;a.y=
this.y;return Qa.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:Qa,__properties__:{get_length:"get_length"}};var Rj=function(){this.cards=new aa;this.consItAmounts=[];this.consItNames=[];this.keyItems=[];this.items=new aa;this.dialogues=new aa;this.chars=new aa;this.diagSpeech=new Pj(m(this,this.onSpeechLoad),m(this,this.onSpeechEnd))};r["com.tilbuci.narrative.Narrative"]=Rj;Rj.__name__="com.tilbuci.narrative.Narrative";Rj.prototype={chars:null,dialogues:null,
diagSpeech:null,items:null,keyItems:null,consItNames:null,consItAmounts:null,cards:null,clear:function(){var a=this.chars.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.chars.h[d].kill();var f=this.chars;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this.dialogues.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.dialogues.h[d].kill(),f=this.dialogues,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.items.h;a=Object.keys(a);b=a.length;for(c=
0;c<b;)d=a[c++],this.items.h[d].kill(),f=this.items,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this.cards.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.cards.h[d].kill(),f=this.cards,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];for(;this.keyItems.length>0;)this.keyItems.shift();for(;this.consItNames.length>0;)this.consItNames.shift();for(;this.consItAmounts.length>0;)this.consItAmounts.shift()},clearDialogues:function(){if(p.mode=="player")for(var a=this.dialogues.h,
b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].clear()},addKeyItem:function(a){this.keyItems.length<4&&Object.prototype.hasOwnProperty.call(this.items.h,a)&&this.keyItems.indexOf(a)==-1&&this.keyItems.push(a)},removeKeyItem:function(a){Object.prototype.hasOwnProperty.call(this.items.h,a)&&(a=this.keyItems.indexOf(a),a>-1&&this.keyItems.splice(a,1))},clearKeyItems:function(){for(;this.keyItems.length>0;)this.keyItems.shift()},hasKeyItem:function(a){return Object.prototype.hasOwnProperty.call(this.items.h,
a)?this.keyItems.indexOf(a)!=-1:!1},addConsumableItem:function(a,b){this.consItNames.indexOf(a)!=-1?(a=this.consItNames.indexOf(a),this.consItAmounts[a]+=b):this.consItNames.length<8&&(this.consItNames.push(a),this.consItAmounts.push(b))},removeConsumableItem:function(a){this.consItNames.indexOf(a)!=-1&&(a=this.consItNames.indexOf(a),this.consItNames.splice(a,1),this.consItAmounts.splice(a,1))},consumeItem:function(a){this.consItNames.indexOf(a)!=-1&&(a=this.consItNames.indexOf(a),--this.consItAmounts[a],
this.consItAmounts[a]<=0&&(this.consItNames.splice(a,1),this.consItAmounts.splice(a,1)))},clearConsumableItems:function(){for(;this.consItNames.length>0;)this.consItNames.shift();for(;this.consItAmounts.length>0;)this.consItAmounts.shift()},consumableAmount:function(a){return this.consItNames.indexOf(a)!=-1?(a=this.consItNames.indexOf(a),this.consItAmounts[a]):0},currentItems:function(){return mb.jsonStringify({k:this.keyItems,c:this.consItNames,a:this.consItAmounts})},loadItems:function(a){var b=
mb.jsonParse(a);if(b==0)return!1;if(Object.prototype.hasOwnProperty.call(b,"k")&&Object.prototype.hasOwnProperty.call(b,"c")&&Object.prototype.hasOwnProperty.call(b,"a")){a=A.field(b,"k");var c=A.field(b,"c");b=A.field(b,"a");if(a!=null&&c!=null&&b!=null)return this.keyItems=a,this.consItNames=c,this.consItAmounts=b,!0}return!1},currentKeyItems:function(){return mb.jsonStringify({k:this.keyItems})},loadKeyItems:function(a){a=mb.jsonParse(a);return a==0?!1:Object.prototype.hasOwnProperty.call(a,"k")&&
(a=A.field(a,"k"),a!=null)?(this.keyItems=a,!0):!1},currentConsItems:function(){return mb.jsonStringify({c:this.consItNames,a:this.consItAmounts})},loadConsItems:function(a){var b=mb.jsonParse(a);return b==0?!1:Object.prototype.hasOwnProperty.call(b,"c")&&Object.prototype.hasOwnProperty.call(b,"a")&&(a=A.field(b,"c"),b=A.field(b,"a"),a!=null&&b!=null)?(this.consItNames=a,this.consItAmounts=b,!0):!1},getData:function(){var a=new aa,b=[];a.h.chars=b;var c=this.chars.h;b=c;c=Object.keys(c);for(var d=
c.length,f=0;f<d;){var g=b[c[f++]];a.h.chars.push(g.toObject())}b=[];a.h.dialogues=b;b=[];a.h.diagcontent=b;b=c=this.dialogues.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],a.h.dialogues.push(g.idObject()),g.numDiags()>0&&a.h.diagcontent.push(g.toObject());b=[];a.h.items=b;b=c=this.items.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],a.h.items.push(g.toObject());b=[];a.h.cards=b;b=c=this.cards.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=b[c[f++]],a.h.cards.push(g.toObject());return mb.jsonStringify(a)},
onSpeechLoad:function(a){this.diagSpeech.play()},onSpeechEnd:function(){this.diagSpeech.stop()},__class__:Rj};var lc=function(a,b,c){this.oWidth=this.oHeight=0;this._autoTimer=!1;this.extraInfo=[];this.type="";za.call(this);this.type=a;this._autoTimer=b;this._onLoad=c;this._mediaLoaded=!1;this.set_visible(!1);this._lastMedia="";this.mouseChildren=!1};r["com.tilbuci.display.BaseImage"]=lc;lc.__name__="com.tilbuci.display.BaseImage";lc.__super__=za;lc.prototype=I(za.prototype,{type:null,extraInfo:null,
_autoTimer:null,_onLoad:null,oWidth:null,oHeight:null,mediaLoaded:null,get_mediaLoaded:function(){return this._mediaLoaded},_mediaLoaded:null,lastMedia:null,get_lastMedia:function(){return this._lastMedia},_lastMedia:null,kill:function(){this.removeChildren();for(this._onLoad=this.type=null;this.extraInfo.length>0;)this.extraInfo.shift();this.extraInfo=null},__class__:lc,__properties__:I(za.prototype.__properties__,{get_lastMedia:"get_lastMedia",get_mediaLoaded:"get_mediaLoaded"})});var Pj=function(a,
b,c){this._channelPos=-1;this._currentTime=0;this._loaded=!1;lc.call(this,"audio",!0,a);this._onEnd=b;this._sound=new C;this._sound.addEventListener("complete",m(this,this.onComplete));this._sound.addEventListener("ioError",m(this,this.onError));this._onTimedAc=c};r["com.tilbuci.display.AudioImage"]=Pj;Pj.__name__="com.tilbuci.display.AudioImage";Pj.__super__=lc;Pj.prototype=I(lc.prototype,{_sound:null,_channel:null,_loaded:null,_onEnd:null,_timer:null,_currentTime:null,_channelPos:null,_transform:null,
_onTimedAc:null,getTime:function(){return this._loaded?Math.round(this._channel.get_position()/1E3):0},setTime:function(a){},load:function(a){this._lastMedia=a=Z.replace(a,p.path+"media/audio/","");this._loaded=!1;this._channelPos=-1;this._transform=null;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);a=p.parser.parsePath(p.path+"media/audio/"+a);this._sound.load(new Ve(a))},iterateSound:function(a,b){this._channel!=
null&&(ua.transform(this._channel,p.mdata.time).sound(a,null),this._transform=new ci(a,0))},stopSound:function(){ua.stop(this._sound)},kill:function(){lc.prototype.kill.call(this);this._loaded=!1;this._onEnd=null;try{this._sound.close()}catch(a){}this._sound.removeEventListener("complete",m(this,this.onComplete));this._sound.removeEventListener("ioError",m(this,this.onError));this._sound=null;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),
this._channel=null);this._onTimedAc=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}},play:function(){if(this._loaded){var a=0;this._channelPos>0&&(a=this._channelPos);this._channelPos=-1;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);this._channel=this._sound.play(a,0,this._transform);this._channel.addEventListener("soundComplete",m(this,this.soundComplete));if(this._timer!=
null){try{this._timer.stop()}catch(b){}this._timer=null}this._currentTime=Math.round(a/1E3);this._timer=new rd(1E3);this._timer.run=m(this,this.onTimer)}},pause:function(){this._loaded&&(this._channelPos=this._channel.get_position(),this._channel.stop())},stop:function(){if(this._loaded){this._channel.stop();if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._channelPos=-1}},onTimer:function(){var a=Math.round(this._channel.get_position()/1E3);this._currentTime!=a&&this._onTimedAc!=
null&&(this._currentTime=a,this._onTimedAc(a))},onComplete:function(a){this._loaded=!0;this._channel!=null&&(this._channel.removeEventListener("soundComplete",m(this,this.soundComplete)),this._channel.stop(),this._channel=null);this._channel=this._sound.play(0);this._channel.addEventListener("soundComplete",m(this,this.soundComplete));this._onLoad(!0)},onError:function(a){this._loaded=!1;this._onLoad(!1)},soundComplete:function(a){this._onEnd()},__class__:Pj});var C=function(a,b){this.__webAudioContext=
null;this.__urlLoading=!1;na.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.isBuffering=!1;this.url=null;a!=null&&this.load(a,b);a==null&&F.context!=null&&F.context.type=="web"&&(this.__webAudioContext=F.context.web)};r["openfl.media.Sound"]=C;C.__name__="openfl.media.Sound";C.fromAudioBuffer=function(a){var b=new C;b.__buffer=a;return b};C.fromFile=function(a){var b=ce.fromFile(a);if(b==null)throw new Tl("Error loading sound from file: "+a);return C.fromAudioBuffer(b)};C.loadFromFile=function(a){return ce.loadFromFile(a).then(function(b){return zc.withValue(C.fromAudioBuffer(b))})};
C.loadFromFiles=function(a){return ce.loadFromFiles(a).then(function(b){return zc.withValue(C.fromAudioBuffer(b))})};C.__super__=na;C.prototype=I(na.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__urlLoading:null,__pendingSoundChannel:null,__pendingAudioSource:null,__buffer:null,__webAudioContext:null,close:function(){this.__buffer!=null&&(fe.__unregisterSoundChannelByBuffer(this.__buffer),this.__buffer.dispose(),this.__buffer=null)},load:function(a,b){var c=this;this.url=
a.url;this.__urlLoading=!0;this.dispatchEvent(new ka("open"));a=bb.getLibrary("default");if(a!=null&&Object.prototype.hasOwnProperty.call(a.cachedAudioBuffers.h,this.url))a=a.cachedAudioBuffers.h[this.url],b=a!=null&&a.data!=null?a.data.byteLength:0,this.AudioBuffer_onURLProgress(b,b),this.AudioBuffer_onURLLoad(a);else ce.loadFromFile(this.url).onProgress(m(this,this.AudioBuffer_onURLProgress)).onComplete(m(this,this.AudioBuffer_onURLLoad)).onError(function(d){c.AudioBuffer_onURLLoad(null)})},loadCompressedDataFromByteArray:function(a,
b){if(a==null||b<=0)this.dispatchEvent(new Eh("ioError"));else{if(ta.gt(a.position,0)||ta.gt(cc.get_length(a),b)){var c=b;c==null&&(c=0);var d=new Pc(c),f=a.position;c=b;c==null&&(c=0);f==null&&(f=0);d.writeBytes(a,f,c);a=d}this.__buffer=ce.fromBytes(cc.toBytes(a));this.__buffer==null?this.dispatchEvent(new Eh("ioError")):(this.dispatchEvent(new ka("open")),this.dispatchEvent(new kh("progress",!1,!1,ta.toFloat(cc.get_length(a)),ta.toFloat(cc.get_length(a)))),this.dispatchEvent(new ka("complete")))}},
loadPCMFromByteArray:function(a,b,c,d,f){f==null&&(f=44100);d==null&&(d=!0);c==null&&(c="float");if(a==null)this.dispatchEvent(new Eh("ioError"));else{c=c=="float"?32:16;d=d?2:1;b=b*d*(c/8)|0;if(ta.gt(a.position,0)||ta.gt(cc.get_length(a),b)){var g=b;g==null&&(g=0);var h=new Pc(g),l=a.position;g=b;g==null&&(g=0);l==null&&(l=0);h.writeBytes(a,l,g);a=h}b=new ce;b.bitsPerSample=c;b.channels=d;c=cc.toArrayBuffer(a);c=c!=null?new Uint8Array(c,0):null;b.data=c;b.sampleRate=f|0;this.__buffer=b;this.dispatchEvent(new ka("open"));
this.dispatchEvent(new kh("progress",!1,!1,ta.toFloat(cc.get_length(a)),ta.toFloat(cc.get_length(a))));this.dispatchEvent(new ka("complete"))}},play:function(a,b,c){b==null&&(b=0);a==null&&(a=0);if(fe.__soundChannels.length>=32)return null;c=c==null?new ci:c.clone();var d=fe.__soundTransform.pan+c.pan;d>1&&(d=1);d<-1&&(d=-1);var f=fe.__soundTransform.volume*c.volume,g=new At(this.__buffer);g.offset=a|0;b>1&&g.set_loops(b-1);g.set_gain(f);a=g.get_position();a.x=d;a.z=-1*Math.sqrt(1-Math.pow(d,2));
g.set_position(a);c=new oq(this,this.__urlLoading?null:g,c);this.__urlLoading?(this.__pendingAudioSource=g,this.__pendingSoundChannel=c):this.__buffer==null&&this.__webAudioContext!=null&&c.__startSampleData();return c},get_sampleRate:function(){return this.__webAudioContext.sampleRate|0},get_id3:function(){return new Bt},get_length:function(){return this.__buffer!=null?this.__buffer.get_src().duration()*1E3|0:0},AudioBuffer_onURLLoad:function(a){this.__urlLoading=!1;a==null?this.dispatchEvent(new Eh("ioError")):
(this.__buffer=a,a=1,this.__buffer.data!=null&&(a=this.__buffer.data.length),this.dispatchEvent(new kh("progress",!1,!1,a,a)),this.dispatchEvent(new ka("complete")),this.__pendingSoundChannel!=null&&(this.__pendingAudioSource.buffer=this.__buffer,this.__pendingAudioSource.init(),this.__pendingSoundChannel.__initAudioSource(this.__pendingAudioSource)));this.__pendingAudioSource=this.__pendingSoundChannel=null},AudioBuffer_onURLProgress:function(a,b){var c=new kh("progress");c.bytesLoaded=a;c.bytesTotal=
b;this.dispatchEvent(c)},__class__:C,__properties__:{get_sampleRate:"get_sampleRate",get_length:"get_length",get_id3:"get_id3"}});var F=function(){};r["lime.media.AudioManager"]=F;F.__name__="lime.media.AudioManager";F.init=function(a){if(F.context==null){if(a==null&&(F.context=new Ct,a=F.context,a.type=="openal")){var b=a.openal,c=b.openDevice();c!=null&&(c=b.createContext(c),b.makeContextCurrent(c),b.processContext(c))}F.context=a}};F.resume=function(){if(F.context!=null&&F.context.type=="openal"){var a=
F.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};F.shutdown=function(){if(F.context!=null&&F.context.type=="openal"){var a=F.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);c!=null&&a.closeDevice(c)}}F.context=null};F.suspend=function(){if(F.context!=null&&F.context.type=="openal"){var a=F.context.openal,b=a.getCurrentContext();b!=null&&(a.suspendContext(b),
b=a.getContextsDevice(b),b!=null&&a.pauseDevice(b))}};var N={__properties__:{set_ty:"set_ty",get_ty:"get_ty",set_tx:"set_tx",get_tx:"get_tx",set_d:"set_d",get_d:"get_d",set_c:"set_c",get_c:"get_c",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);a=[a,b,0,c,d,0,f,g,1];return a!=null?new Float32Array(a):null},clone:function(a){return N._new(a[0],a[1],a[3],a[4],a[6],a[7])},concat:function(a,
b){var c=a[0]*b[0]+a[1]*b[3];a[1]=a[0]*b[1]+a[1]*b[4];a[0]=c;c=a[3]*b[0]+a[4]*b[3];a[4]=a[3]*b[1]+a[4]*b[4];a[3]=c;c=a[6]*b[0]+a[7]*b[3]+b[6];a[7]=a[6]*b[1]+a[7]*b[4]+b[7];a[6]=c},copyColumnFrom:function(a,b,c){if(b>2)throw la.thrown("Column "+b+" out of bounds (2)");b==0?(a[0]=c.x,a[1]=c.y):b==1?(a[3]=c.x,a[4]=c.y):(a[6]=c.x,a[7]=c.y)},copyColumnTo:function(a,b,c){if(b>2)throw la.thrown("Column "+b+" out of bounds (2)");b==0?(c.x=a[0],c.y=a[1],c.z=0):b==1?(c.x=a[3],c.y=a[4],c.z=0):(c.x=a[6],c.y=
a[7],c.z=1)},copyFrom:function(a,b){a[0]=b[0];a[1]=b[1];a[3]=b[3];a[4]=b[4];a[6]=b[6];a[7]=b[7]},copyRowFrom:function(a,b,c){if(b>2)throw la.thrown("Row "+b+" out of bounds (2)");b==0?(a[0]=c.x,a[3]=c.y,a[6]=c.z):b==1&&(a[1]=c.x,a[4]=c.y,a[7]=c.z)},copyRowTo:function(a,b,c){if(b>2)throw la.thrown("Row "+b+" out of bounds (2)");b==0?(c.x=a[0],c.y=a[3],c.z=a[6]):b==1?(c.x=a[1],c.y=a[4],c.z=a[7]):(c.x=0,c.y=0,c.z=1)},createBox:function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=0);if(d!=
0){var h=Math.cos(d);d=Math.sin(d);a[0]=h*b;a[1]=d*c;a[3]=-d*b;a[4]=h*c}else a[0]=b,a[1]=0,a[3]=0,a[4]=c;a[6]=f;a[7]=g},createGradientBox:function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=0);a[0]=b/1638.4;a[4]=c/1638.4;if(d!=0){var h=Math.cos(d);d=Math.sin(d);a[1]=d*a[4];a[3]=-d*a[0];a[0]*=h;a[4]*=h}else a[1]=0,a[3]=0;a[6]=f+b/2;a[7]=g+c/2},equals:function(a,b){return b!=null&&a[6]==b[6]&&a[7]==b[7]&&a[0]==b[0]&&a[1]==b[1]&&a[3]==b[3]?a[4]==b[4]:!1},deltaTransformVector:function(a,b,
c){c==null&&(c=new Ff);c.x=b.x*a[0]+b.y*a[3];c.y=b.x*a[1]+b.y*a[4];return c},fromCairoMatrix3:function(a){return N._new(a.a,a.b,a.c,a.d,a.tx,a.ty)},fromFloat32Array:function(a){if(a.length!=9)throw la.thrown("Expected array of length 9, got "+a.length);return a},identity:function(a){a[0]=1;a[1]=0;a[3]=0;a[4]=1;a[6]=0;a[7]=0},invert:function(a){var b=a[0]*a[4]-a[1]*a[3];if(b==0)a[0]=a[1]=a[3]=a[4]=0,a[6]=-a[6],a[7]=-a[7];else{b=1/b;var c=a[4]*b;a[4]=a[0]*b;a[0]=c;a[1]*=-b;a[3]*=-b;b=-a[0]*a[6]-a[3]*
a[7];a[7]=-a[1]*a[6]-a[4]*a[7];a[6]=b}if(a.length!=9)throw la.thrown("Expected array of length 9, got "+a.length);return a},rotate:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[0]*c-a[1]*b;a[1]=a[0]*b+a[1]*c;a[0]=d;d=a[3]*c-a[4]*b;a[4]=a[3]*b+a[4]*c;a[3]=d;d=a[6]*c-a[7]*b;a[7]=a[6]*b+a[7]*c;a[6]=d},scale:function(a,b,c){a[0]*=b;a[1]*=c;a[3]*=b;a[4]*=c;a[6]*=b;a[7]*=c},setRotation:function(a,b,c){c==null&&(c=1);a[0]=Math.cos(b)*c;a[3]=Math.sin(b)*c;a[1]=-a[3];a[4]=a[0]},setTo:function(a,b,
c,d,f,g,h){a[0]=b;a[1]=c;a[3]=d;a[4]=f;a[6]=g;a[7]=h},toCairoMatrix3:function(a){return new Dt(a[0],a[1],a[3],a[4],a[6],a[7])},toString:function(a){return"matrix("+a[0]+", "+a[1]+", "+a[3]+", "+a[4]+", "+a[6]+", "+a[7]+")"},transformRect:function(a,b,c){c==null&&(c=new We);var d=a[0]*b.x+a[3]*b.y,f=d,g=a[1]*b.x+a[4]*b.y,h=g,l=a[0]*(b.x+b.width)+a[3]*b.y,k=a[1]*(b.x+b.width)+a[4]*b.y;l<d&&(d=l);k<g&&(g=k);l>f&&(f=l);k>h&&(h=k);l=a[0]*(b.x+b.width)+a[3]*(b.y+b.height);k=a[1]*(b.x+b.width)+a[4]*(b.y+
b.height);l<d&&(d=l);k<g&&(g=k);l>f&&(f=l);k>h&&(h=k);l=a[0]*b.x+a[3]*(b.y+b.height);k=a[1]*b.x+a[4]*(b.y+b.height);l<d&&(d=l);k<g&&(g=k);l>f&&(f=l);k>h&&(h=k);c.setTo(d+l,g+k,f-d,h-g);return c},transformVector:function(a,b,c){c==null&&(c=new Ff);c.x=b.x*a[0]+b.y*a[3]+a[6];c.y=b.x*a[1]+b.y*a[4]+a[7];return c},translate:function(a,b,c){a[6]+=b;a[7]+=c},get_a:function(a){return a[0]},set_a:function(a,b){return a[0]=b},get_b:function(a){return a[1]},set_b:function(a,b){return a[1]=b},get_c:function(a){return a[3]},
set_c:function(a,b){return a[3]=b},get_d:function(a){return a[4]},set_d:function(a,b){return a[4]=b},get_tx:function(a){return a[6]},set_tx:function(a,b){return a[6]=b},get_ty:function(a){return a[7]},set_ty:function(a,b){return a[7]=b},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},S=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g};r["openfl.geom.Matrix"]=S;
S.__name__="openfl.geom.Matrix";S.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new S(this.a,this.b,this.c,this.d,this.tx,this.ty)},concat:function(a){var b=this.a*a.a+this.b*a.c;this.b=this.a*a.b+this.b*a.d;this.a=b;b=this.c*a.a+this.d*a.c;this.d=this.c*a.b+this.d*a.d;this.c=b;b=this.tx*a.a+this.ty*a.c+a.tx;this.ty=this.tx*a.b+this.ty*a.d+a.ty;this.tx=b},copyColumnFrom:function(a,b){if(a>2)throw la.thrown("Column "+a+" out of bounds (2)");a==0?(this.a=
b.x,this.b=b.y):a==1?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(a>2)throw la.thrown("Column "+a+" out of bounds (2)");a==0?(b.x=this.a,b.y=this.b,b.z=0):a==1?(b.x=this.c,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},copyFrom:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty},copyRowFrom:function(a,b){if(a>2)throw la.thrown("Row "+a+" out of bounds (2)");a==0?(this.a=b.x,this.c=b.y,this.tx=b.z):a==1&&(this.b=b.x,this.d=b.y,
this.ty=b.z)},copyRowTo:function(a,b){if(a>2)throw la.thrown("Row "+a+" out of bounds (2)");a==0?(b.x=this.a,b.y=this.c,b.z=this.tx):a==1?(b.x=this.b,b.y=this.d,b.z=this.ty):b.setTo(0,0,1)},createBox:function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);if(c!=0){var g=Math.cos(c);c=Math.sin(c);this.a=g*a;this.b=c*b;this.c=-c*a;this.d=g*b}else this.a=a,this.c=this.b=0,this.d=b;this.tx=d;this.ty=f},createGradientBox:function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);this.a=
a/1638.4;this.d=b/1638.4;if(c!=0){var g=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=g;this.d*=g}else this.c=this.b=0;this.tx=d+a/2;this.ty=f+b/2},deltaTransformPoint:function(a){return new Qa(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},deltaTransformPointToOutput:function(a,b){return b!=null?(b.setTo(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d),b):new Qa(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},equals:function(a){return a!=null&&this.tx==a.tx&&this.ty==a.ty&&this.a==
a.a&&this.b==a.b&&this.c==a.c?this.d==a.d:!1},identity:function(){this.a=1;this.c=this.b=0;this.d=1;this.ty=this.tx=0},invert:function(){var a=this.a*this.d-this.b*this.c;if(a==0)this.a=this.b=this.c=this.d=0,this.tx=-this.tx,this.ty=-this.ty;else{a=1/a;var b=this.d*a;this.d=this.a*a;this.a=b;this.b*=-a;this.c*=-a;a=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=a}return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.a*b-this.b*a;this.b=this.a*a+
this.b*b;this.a=c;c=this.c*b-this.d*a;this.d=this.c*a+this.d*b;this.c=c;c=this.tx*b-this.ty*a;this.ty=this.tx*a+this.ty*b;this.tx=c},scale:function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b},setRotation:function(a,b){b==null&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,f,g){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g},to3DString:function(a){a==null&&(a=!1);return a?"matrix3d("+this.a+", "+this.b+", 0, 0, "+
this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+this.tx+", "+this.ty+", 0, 1)"},toMozString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+"px, "+this.ty+"px)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformPoint:function(a){return new Qa(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+
a.y*this.d+this.ty)},transformPointToOutput:function(a,b){return b!=null?(b.setTo(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty),b):new Qa(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty)},translate:function(a,b){this.tx+=a;this.ty+=b},toArray:function(a){a==null&&(a=!1);this.__array==null&&(this.__array=new Float32Array(9));a?(this.__array[0]=this.a,this.__array[1]=this.b,this.__array[2]=0,this.__array[3]=this.c,this.__array[4]=this.d,this.__array[5]=0,this.__array[6]=this.tx,
this.__array[7]=this.ty):(this.__array[0]=this.a,this.__array[1]=this.c,this.__array[2]=this.tx,this.__array[3]=this.b,this.__array[4]=this.d,this.__array[5]=this.ty,this.__array[6]=0,this.__array[7]=0);this.__array[8]=1;return this.__array},__cleanValues:function(){this.a=Math.round(this.a*1E3)/1E3;this.b=Math.round(this.b*1E3)/1E3;this.c=Math.round(this.c*1E3)/1E3;this.d=Math.round(this.d*1E3)/1E3;this.tx=Math.round(this.tx*10)/10;this.ty=Math.round(this.ty*10)/10},__toMatrix3:function(){N.setTo(S.__matrix3,
this.a,this.b,this.c,this.d,this.tx,this.ty);return S.__matrix3},__transformInversePoint:function(a){var b=this.a*this.d-this.b*this.c;if(b==0)a.x=-this.tx,a.y=-this.ty;else{var c=1/b*(this.c*(this.ty-a.y)+this.d*(a.x-this.tx));a.y=1/b*(this.a*(a.y-this.ty)+this.b*(this.tx-a.x));a.x=c}},__transformInverseX:function(a,b){var c=this.a*this.d-this.b*this.c;return c==0?-this.tx:1/c*(this.c*(this.ty-b)+this.d*(a-this.tx))},__transformInverseY:function(a,b){var c=this.a*this.d-this.b*this.c;return c==0?
-this.ty:1/c*(this.a*(b-this.ty)+this.b*(this.tx-a))},__transformPoint:function(a){var b=a.x,c=a.y;a.x=b*this.a+c*this.c+this.tx;a.y=b*this.b+c*this.d+this.ty},__transformX:function(a,b){return a*this.a+b*this.c+this.tx},__transformY:function(a,b){return a*this.b+b*this.d+this.ty},__translateTransformed:function(a,b){this.tx=a*this.a+b*this.c+this.tx;this.ty=a*this.b+b*this.d+this.ty},__class__:S};var ca=function(a,b,c,d,f,g,h,l){l==null&&(l=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=0);d==null&&
(d=1);c==null&&(c=1);b==null&&(b=1);a==null&&(a=1);this.redMultiplier=a;this.greenMultiplier=b;this.blueMultiplier=c;this.alphaMultiplier=d;this.redOffset=f;this.greenOffset=g;this.blueOffset=h;this.alphaOffset=l};r["openfl.geom.ColorTransform"]=ca;ca.__name__="openfl.geom.ColorTransform";ca.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,concat:function(a){this.redOffset=a.redOffset*this.redMultiplier+
this.redOffset;this.greenOffset=a.greenOffset*this.greenMultiplier+this.greenOffset;this.blueOffset=a.blueOffset*this.blueMultiplier+this.blueOffset;this.alphaOffset=a.alphaOffset*this.alphaMultiplier+this.alphaOffset;this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier},toString:function(){return"(redMultiplier="+this.redMultiplier+", greenMultiplier="+this.greenMultiplier+", blueMultiplier="+this.blueMultiplier+
", alphaMultiplier="+this.alphaMultiplier+", redOffset="+this.redOffset+", greenOffset="+this.greenOffset+", blueOffset="+this.blueOffset+", alphaOffset="+this.alphaOffset+")"},__clone:function(){return new ca(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},__copyFrom:function(a){this.redMultiplier=a.redMultiplier;this.greenMultiplier=a.greenMultiplier;this.blueMultiplier=a.blueMultiplier;this.alphaMultiplier=
a.alphaMultiplier;this.redOffset=a.redOffset;this.greenOffset=a.greenOffset;this.blueOffset=a.blueOffset;this.alphaOffset=a.alphaOffset},__combine:function(a){this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset+=a.redOffset;this.greenOffset+=a.greenOffset;this.blueOffset+=a.blueOffset;this.alphaOffset+=a.alphaOffset},__identity:function(){this.alphaMultiplier=this.blueMultiplier=this.greenMultiplier=
this.redMultiplier=1;this.alphaOffset=this.blueOffset=this.greenOffset=this.redOffset=0},__invert:function(){this.redMultiplier=this.redMultiplier!=0?1/this.redMultiplier:1;this.greenMultiplier=this.greenMultiplier!=0?1/this.greenMultiplier:1;this.blueMultiplier=this.blueMultiplier!=0?1/this.blueMultiplier:1;this.alphaMultiplier=this.alphaMultiplier!=0?1/this.alphaMultiplier:1;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},
__equals:function(a,b){return a==null||this.redMultiplier!=a.redMultiplier||this.greenMultiplier!=a.greenMultiplier||this.blueMultiplier!=a.blueMultiplier||!b&&this.alphaMultiplier!=a.alphaMultiplier||this.redOffset!=a.redOffset||this.greenOffset!=a.greenOffset||this.blueOffset!=a.blueOffset?!1:this.alphaOffset==a.alphaOffset},__isDefault:function(a){return a?this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0?this.alphaOffset==
0:!1:this.redMultiplier==1&&this.greenMultiplier==1&&this.blueMultiplier==1&&this.alphaMultiplier==1&&this.redOffset==0&&this.greenOffset==0&&this.blueOffset==0?this.alphaOffset==0:!1},__setArrays:function(a,b){a[0]=this.redMultiplier;a[1]=this.greenMultiplier;a[2]=this.blueMultiplier;a[3]=this.alphaMultiplier;b[0]=this.redOffset;b[1]=this.greenOffset;b[2]=this.blueOffset;b[3]=this.alphaOffset},get_color:function(){return(this.redOffset|0)<<16|(this.greenOffset|0)<<8|this.blueOffset|0},set_color:function(a){this.redOffset=
a>>16&255;this.greenOffset=a>>8&255;this.blueOffset=a&255;this.blueMultiplier=this.greenMultiplier=this.redMultiplier=0;return this.get_color()},__toLimeColorMatrix:function(){ca.__limeColorMatrix==null&&(ca.__limeColorMatrix=new Float32Array(20));ca.__limeColorMatrix[0]=this.redMultiplier;ca.__limeColorMatrix[4]=this.redOffset/255;ca.__limeColorMatrix[6]=this.greenMultiplier;ca.__limeColorMatrix[9]=this.greenOffset/255;ca.__limeColorMatrix[12]=this.blueMultiplier;ca.__limeColorMatrix[14]=this.blueOffset/
255;ca.__limeColorMatrix[18]=this.alphaMultiplier;ca.__limeColorMatrix[19]=this.alphaOffset/255;return ca.__limeColorMatrix},__class__:ca,__properties__:{set_color:"set_color",get_color:"get_color"}};var ba=function(){na.call(this);this.clear()};r["openfl.text.StyleSheet"]=ba;ba.__name__="openfl.text.StyleSheet";ba.__super__=na;ba.prototype=I(na.prototype,{__styleNames:null,__styleNamesDirty:null,__styles:null,clear:function(){this.__styleNamesDirty=!1;this.__styleNames=null;this.__styles=new aa},
getStyle:function(a){a=a.toLowerCase();return Object.prototype.hasOwnProperty.call(this.__styles.h,a)?this.__styles.h[a]:null},parseCSS:function(a){var b=new aa;b.h.silent=!0;b=(new Et(b)).parse(a);if(b!=null)for(a=b.h.rules,b=0;b<a.length;){var c=a[b];++b;var d=Object.prototype.hasOwnProperty.call(c.h,"selectors")?c.h.selectors:null;if(d!=null&&(d=d.toLowerCase(),Object.prototype.hasOwnProperty.call(this.__styles.h,d)||(this.__styles.h[d]={},this.__styleNamesDirty=!0),d=this.__styles.h[d],c=c.h.declarations,
c!=null))for(var f=0;f<c.length;){var g=c[f];++f;var h=g.h.property;g=L.string(g.h.value);if(h!=null)if(h==null)d[h]=g;else switch(h){case "font-family":g=Z.replace(g,'"',"");h=d;h!=null&&A.setProperty(h,"fontFamily",g);break;case "font-size":h=d;h!=null&&A.setProperty(h,"fontSize",g);break;case "font-style":h=d;h!=null&&A.setProperty(h,"fontStyle",g);break;case "font-weight":h=d;h!=null&&A.setProperty(h,"fontWeight",g);break;case "letter-spacing":h=d;h!=null&&A.setProperty(h,"letterSpacing",g);break;
case "margin-left":h=d;h!=null&&A.setProperty(h,"marginLeft",g);break;case "text-align":h=d;h!=null&&A.setProperty(h,"textAlign",g);break;case "text-decoration":h=d;h!=null&&A.setProperty(h,"textDecoration",g);break;case "text-indent":h=d;h!=null&&A.setProperty(h,"textIndent",g);break;default:d[h]=g}}}},setStyle:function(a,b){a=a.toLowerCase();if(b==null)Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&(b=this.__styles,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]);else{for(var c=
{},d=0,f=A.fields(b);d<f.length;){var g=f[d];++d;c[g]=A.field(b,g)}this.__styles.h[a]=c}},transform:function(a){var b=new qf;this.__applyStyleObject(a,b);return b},__applyStyle:function(a,b){a=a.toLowerCase();Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&this.__applyStyleObject(this.__styles.h[a],b)},__applyStyleObject:function(a,b){if(a!=null){var c=new sb("[0-9A-Fa-f]+",""),d=new sb("[0-9]+","");var f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"color")?(f=ef.__get(a,"color"),f=
c.match(f==null?null:L.string(f))):f=!1;f&&(b.color=L.parseInt("0x"+c.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontFamily")&&(f=ef.__get(a,"fontFamily"),b.set_font(this.__parseFont(f==null?null:L.string(f))));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontSize")?(f=ef.__get(a,"fontSize"),f=d.match(f==null?null:L.string(f))):f=!1;f&&b.set_size(L.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"fontStyle"))switch(ef.__get(a,"fontStyle")){case "italic":b.set_italic(!0);
break;case "normal":b.set_italic(!1)}f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"fontWeight"))switch(ef.__get(a,"fontWeight")){case "bold":b.set_bold(!0);break;case "normal":b.set_bold(!1)}f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"leading")?(f=ef.__get(a,"leading"),f=d.match(f==null?null:L.string(f))):f=!1;f&&(b.leading=L.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"letterSpacing")?(f=ef.__get(a,"letterSpacing"),f=d.match(f==null?null:L.string(f))):
f=!1;f&&(b.letterSpacing=parseFloat(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"marginLeft")?(f=ef.__get(a,"marginLeft"),f=d.match(f==null?null:L.string(f))):f=!1;f&&(b.leftMargin=L.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"marginRight")?(f=ef.__get(a,"marginRight"),f=d.match(f==null?null:L.string(f))):f=!1;f&&(b.rightMargin=L.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"textAlign"))switch(ef.__get(a,"textAlign")){case "center":b.align=
0;break;case "justify":b.align=2;break;case "left":b.align=3;break;case "right":b.align=4}f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"textDecoration"))switch(ef.__get(a,"textDecoration")){case "none":b.underline=!1;break;case "underline":b.underline=!0}f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"textIndent")?(f=ef.__get(a,"textIndent"),f=d.match(f==null?null:L.string(f))):f=!1;f&&(b.blockIndent=L.parseInt(d.matched(0)))}},__parseFont:function(a){if(a==null)return null;a.indexOf(",")>
-1&&(a=X.substr(a,0,a.indexOf(",")));switch(a){case "mono":return"_typewriter";case "sans-serif":return"_sans";case "serif":return"_serif";default:return a}},get_styleNames:function(){if(this.__styleNames==null||this.__styleNamesDirty){this.__styleNames=[];for(var a=Object.keys(this.__styles.h),b=a.length,c=0;c<b;){var d=a[c++];this.__styleNames.push(d)}this.__styleNamesDirty=!1}return this.__styleNames},__class__:ba,__properties__:{get_styleNames:"get_styleNames"}});var p=function(){};r["com.tilbuci.data.GlobalPlayer"]=
p;p.__name__="com.tilbuci.data.GlobalPlayer";p.copyText=function(a){var b=!1;try{window.TBB_copyText(a),b=!0}catch(c){Me.trace(a,{fileName:"Source/com/tilbuci/data/GlobalPlayer.hx",lineNumber:255,className:"com.tilbuci.data.GlobalPlayer",methodName:"copyText"}),b=!1}return b};p.isMobile=function(){var a=!0;try{a=window.TBB_isMobile()}catch(b){a=!0}return a};p.appQuit=function(){var a=!1;try{a=!1}catch(b){a=!1}return a};p.pwaInstall=function(){var a=!1;try{window.TBB_showInstallPrompt(),a=!0}catch(b){a=
!1}return a};p.fullscreen=function(){var a=!1;try{window.TBB_fullscreen(),a=!0}catch(b){a=!1}return a};p.saveFile=function(a,b){var c=!1;try{window.TBB_saveFile(a,b),c=!0}catch(d){c=!1}return c};p.existsFile=function(a){return!1};p.loadFile=function(a,b,c){a=!1;try{window.TBB_loadFile(b,c),a=!0}catch(d){a=!1}return a};var Wa=function(){this._max=20;this.propDisplay=[];this._current=0;this.states=[]};r["com.tilbuci.data.History"]=Wa;Wa.__name__="com.tilbuci.data.History";Wa.prototype={states:null,
current:null,get_current:function(){return this._current},_current:null,historyDisplay:null,propDisplay:null,_max:null,addState:function(a){for(a==null&&(a="");this.states.length>this._current+1;)this.states.pop();for(this.states.push({title:oc.format(new Date,"%H:%M:%S"),state:p.movie.scene.toObject(),orientation:t.displayType,keyframe:p.area.get_currentKf(),name:a});this.states.length>this._max;)this.states.shift();this._current=this.states.length-1;this.historyDisplay!=null&&this.historyDisplay()},
updateProperties:function(){for(var a=0,b=this.propDisplay;a<b.length;){var c=b[a];++a;c()}},loadState:function(a){return this.states.length>a?(t.displayType=this.states[a].orientation,p.movie.scene.fromObject(this.states[a].state),this._current=a,!0):!1},clear:function(){for(;this.states.length>0;)this.states.shift();this._current=-1;this.historyDisplay!=null&&this.historyDisplay()},__class__:Wa,__properties__:{get_current:"get_current"}};var Pa=function(){this._texts=new aa;this._current="";this._ok=
!1;na.call(this);this._ok=!0};r["com.tilbuci.data.Language"]=Pa;Pa.__name__="com.tilbuci.data.Language";Pa.__super__=na;Pa.prototype=I(na.prototype,{ok:null,get_ok:function(){return this._ok},_ok:null,current:null,get_current:function(){return this._current},_current:null,_texts:null,load:function(a){var b=Sc.getText(a);b=mb.jsonParse(b);if(b==0)a=!1;else{for(var c=0,d=A.fields(b);c<d.length;){var f=d[c];++c;var g=A.field(b,f);this._texts.h[f]=g}this._current=a;a=!0}return a},get:function(a){return Object.prototype.hasOwnProperty.call(this._texts.h,
a)?this._texts.h[a]:""},kill:function(){for(var a=Object.keys(this._texts.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._texts;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._texts=null},__class__:Pa,__properties__:{get_current:"get_current",get_ok:"get_ok"}});var xb=function(a,b){this._mvId=this._scId="";this._colLoad=0;this._cacheScene=new aa;this._actions=new aa;this.preventHistory=!1;this.collections=new aa;this.data=new pe;this.scene=new ke;this._actions.h.movie=a;this._actions.h.scene=
b};r["com.tilbuci.data.MovieInfo"]=xb;xb.__name__="com.tilbuci.data.MovieInfo";xb.prototype={data:null,scene:null,collections:null,preventHistory:null,_path:null,_actions:null,_cacheScene:null,_colLoad:null,mvId:null,_mvId:null,get_mvId:function(){return this._mvId},mvLoaded:null,get_mvLoaded:function(){return this._mvId!=""},scId:null,_scId:null,get_scId:function(){return this._scId},scLoaded:null,get_scLoaded:function(){return this._scId!=""},kill:function(){this.data.kill();this.data=null;this.scene.kill();
this.scene=null;var a=this._actions.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._actions;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._actions=null;a=this._cacheScene.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._cacheScene,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._cacheScene=null},loadMovie:function(a){for(;p.history.length>0;)p.history.shift();p.loadingMovie=a;this._scId=this._mvId="";this.data.clear();this.scene.clear();
p.parser.clearStringFile();p.area.clear();for(var b=Object.keys(this._cacheScene.h),c=b.length,d=0;d<c;){var f=b[d++],g=this._cacheScene;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}X.substr(a,0,4)!="http"&&X.substr(a,0,4)!="file"&&(a=p.base+"movie/"+a);X.substr(a,-6,null)!=".movie"&&(a+=".movie");p.path=this._path=a+"/";a+="/movie.json";b=null;p.nocache&&(b=new aa,b.h.rand=Math.ceil(Math.random()*1E4));new kd(!0,a,"GET",b,4,m(this,this.onMovieLoaded))},loadScene:function(a,b){b==null&&
(b=0);if(this.get_mvLoaded()){p.contraptions.showLoadingIc();if(p.mode=="editor"||p.mode=="editorplayer"||p.mode=="player"&&p.mdata.identify){if(p.mode=="player"&&p.mdata.identify)p.ws.loadScene(a,m(this,this.onSceneLoaded));else if(a==null){var c=t.ws,d=new aa,f=p.movie.get_mvId();d.h.movie=f;d.h.uid=b;c.send("Scene/LoadUid",d,m(this,this.onSceneLoadedEditor))}else c=t.ws,d=new aa,f=p.movie.get_mvId(),d.h.movie=f,d.h.id=a,c.send("Scene/Load",d,m(this,this.onSceneLoadedEditor));return!0}if(Object.prototype.hasOwnProperty.call(this._cacheScene.h,
a))return this.scene.load(mb.jsonAsMap(this._cacheScene.h[a]))?this._scId=a:this._scId="",this._actions.h.scene(this.get_scLoaded()),this.get_scLoaded();b=null;p.nocache&&(d=new aa,f=Math.ceil(Math.random()*1E4),d.h.rand=f,b=d);new kd(!0,this._path+"scene/"+a+".json","GET",b,4,m(this,this.onSceneLoaded));return!0}this._actions.h.scene(!1);return!1},noScene:function(){this._scId=""},cacheScene:function(a){if(this.get_mvLoaded()){if(!Object.prototype.hasOwnProperty.call(this._cacheScene.h,a)){var b=
null;p.nocache&&(b=new aa,b.h.rand=Math.ceil(Math.random()*1E4));new kd(!0,this._path+"scene/"+a+".json","GET",b,4,m(this,this.onSceneCache))}return!0}return!1},onMovieLoaded:function(a,b){a&&this.data.load(b.map)&&(a=Z.replace(this._path,".movie/","").split("/"),this._mvId=a[a.length-1]);if(this.get_mvLoaded()){a=!1;if(p.mdata.vsgroups.length==0)a=!0;else for(var c=0,d=p.mdata.vsgroups;c<d.length;){var f=d[c];++c;p.ws.get_groups().indexOf(f)!=-1&&(a=!0)}p.mdata.identify&&!p.ws.userLogged()&&p.mode==
"player"?(this._path=this._mvId="",p.mdata.fallback!=""&&(Object.prototype.hasOwnProperty.call(Fb,"scene")&&(Fb.scene=""),this.loadMovie(p.mdata.fallback))):a||p.mode!="player"?(p.parser.loadStringsJson(),p.mode=="player"&&(a="",Object.prototype.hasOwnProperty.call(Fb,"scene")&&(a=A.field(Fb,"scene")),a==""?this.loadScene(b.map.h.start):(this.loadScene(a),Object.prototype.hasOwnProperty.call(Fb,"scene")&&(Fb.scene="")))):(this._path=this._mvId="",p.mdata.fallback!=""&&(Object.prototype.hasOwnProperty.call(Fb,
"scene")&&(Fb.scene=""),this.loadMovie(p.mdata.fallback)));this._actions.h.movie(!0)}else this._path="",this._actions.h.movie(this.get_mvLoaded())},loadCollection:function(a){var b=this.collections,c=new tb(this._path+"collection/"+a+".json",null);b.h[a]=c},onSceneLoadedEditor:function(a,b){if(a)if(p.movie.scene.clear(),b.map.h.e==0){var c=new aa;a=0;for(var d=A.fields(b.map.h.info);a<d.length;){var f=d[a];++a;var g=A.field(b.map.h.info,f);c.h[f]=g}if(this.scene.load(c)){this._scId=c.h.id;a=this._colLoad=
0;for(d=this.scene.collections;a<d.length;)b=d[a],++a,b!=""&&(Object.prototype.hasOwnProperty.call(this.collections.h,b)&&(this.collections.h[b].kill(),g=this.collections,Object.prototype.hasOwnProperty.call(g.h,b)&&delete g.h[b]),this._colLoad++,c=this.collections,g=new tb(this._path+"collection/"+b+".json",m(this,this.onColLoad)),c.h[b]=g);if(this._colLoad==0)this.onColLoad()}else t.showPopup(t.ln.get("scene-load-windowtitle"),t.ln.get("scene-load-error"),320,160,t.ln.get("default-ok"))}else t.showPopup(t.ln.get("scene-load-windowtitle"),
t.ln.get("scene-load-error"),320,160,t.ln.get("default-ok"));else t.showPopup(t.ln.get("scene-load-windowtitle"),t.ln.get("scene-load-error"),320,160,t.ln.get("default-ok"))},onSceneLoaded:function(a,b){if(a&&(p.movie.preventHistory||this._scId==""||p.history.push(this._scId),p.movie.preventHistory=!1,p.movie.scene.clear(),this.scene.load(b.map))){b.url.indexOf(".json")!=-1?(a=Z.replace(b.url,".json","").split("/"),this._scId=a[a.length-1]):Object.prototype.hasOwnProperty.call(b.map.h,"id")&&(this._scId=
b.map.h.id);var c=b.rawtext;this._cacheScene.h[this._scId]=c;b=this._colLoad=0;for(a=this.scene.collections;b<a.length;){var d=a[b];++b;c=!0;try{c=Object.prototype.hasOwnProperty.call(this.collections.h,d)}catch(g){c=!1}if(c){if(!this.collections.h[d].ok){this.collections.h[d].kill();this._colLoad++;var f=this.collections;c=new tb(this._path+"collection/"+d+".json",m(this,this.onColLoad));f.h[d]=c}}else this._colLoad++,c=this.collections,f=new tb(this._path+"collection/"+d+".json",m(this,this.onColLoad)),
c.h[d]=f}if(this._colLoad==0)this.onColLoad()}},onSceneCache:function(a,b){var c=X.substr(b.url,-37,32);a&&this.scene.checkFields(b.map)?this._cacheScene.h[c]=b.rawtext:Object.prototype.hasOwnProperty.call(this._cacheScene.h,c)&&(a=this._cacheScene,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c])},onColLoad:function(){this._colLoad--;this._colLoad<=0&&(this._colLoad=0,this._actions.h.scene(this.get_scLoaded()))},__class__:xb,__properties__:{get_scLoaded:"get_scLoaded",get_scId:"get_scId",
get_mvLoaded:"get_mvLoaded",get_mvId:"get_mvId"}};var yb=function(a){this.frtime=100;this.frames=1;this.order=0;this.action="";this.ok=!1;this.ok=!0;Object.prototype.hasOwnProperty.call(a,"name")?this.name=A.field(a,"name"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"type")?this.type=A.field(a,"type"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"order")?this.order=A.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"time")?this.time=A.field(a,
"time"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=A.field(a,"action"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frames")?this.frames=A.field(a,"frames"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frtime")?this.frtime=A.field(a,"frtime"):this.ok=!1;if(this.ok&&Object.prototype.hasOwnProperty.call(a,"file")){var b=A.field(a,"file");if(Object.prototype.hasOwnProperty.call(b,"@1")){this.file=new aa;var c=A.field(b,"@1");this.file.h["@1"]=
c;Object.prototype.hasOwnProperty.call(b,"@2")?(c=A.field(b,"@2"),this.file.h["@2"]=c,this.file.h["@2"]==""&&(c=this.file.h["@1"],this.file.h["@2"]=c)):(c=this.file.h["@1"],this.file.h["@2"]=c);Object.prototype.hasOwnProperty.call(b,"@3")?(c=A.field(b,"@3"),this.file.h["@3"]=c,this.file.h["@3"]==""&&(c=this.file.h["@2"],this.file.h["@3"]=c)):(c=this.file.h["@2"],this.file.h["@3"]=c);Object.prototype.hasOwnProperty.call(b,"@4")?(c=A.field(b,"@4"),this.file.h["@4"]=c,this.file.h["@4"]==""&&(c=this.file.h["@3"],
this.file.h["@4"]=c)):(c=this.file.h["@3"],this.file.h["@4"]=c);Object.prototype.hasOwnProperty.call(b,"@5")?(c=A.field(b,"@5"),this.file.h["@5"]=c,this.file.h["@5"]==""&&(c=this.file.h["@4"],this.file.h["@5"]=c)):(c=this.file.h["@4"],this.file.h["@5"]=c)}else this.ok=!1;this.time=A.field(a,"time")}else this.ok=!1};r["com.tilbuci.def.AssetData"]=yb;yb.__name__="com.tilbuci.def.AssetData";yb.prototype={ok:null,name:null,type:null,time:null,action:null,order:null,frames:null,frtime:null,file:null,kill:function(){this.ok=
!1;this.action=this.type=this.name=null;this.time=0;for(var a=this.file.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]],g=this.file;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}this.file=null},toObject:function(){return{order:this.order,name:this.name,type:this.type,time:this.time,action:this.action,frames:this.frames,frtime:this.frtime,file:{"@1":this.file.h["@1"],"@2":this.file.h["@2"],"@3":this.file.h["@3"],"@4":this.file.h["@4"],"@5":this.file.h["@5"]}}},__class__:yb};var mc=
function(a){this.reqFields=[];a!=null&&(this.reqFields=a)};r["com.tilbuci.def.DefBase"]=mc;mc.__name__="com.tilbuci.def.DefBase";mc.prototype={reqFields:null,checkFields:function(a){for(var b=!0,c=0,d=this.reqFields.length;c<d;){var f=c++;Object.prototype.hasOwnProperty.call(a.h,this.reqFields[f])||(b=!1)}return b},kill:function(){for(;this.reqFields.length>0;)this.reqFields.shift();this.reqFields=null},__class__:mc};var tb=function(a,b,c){c==null&&(c=!0);this.assetOrder=[];this.assets=new aa;this.time=
1;this.transition="none";this.name="";this.ok=!1;mc.call(this,["name","transition","time","assets"]);this._acLoad=b;c&&(b=null,p.nocache&&(b=new aa,b.h.rand=Math.ceil(Math.random()*1E4)),new kd(!0,a,"GET",b,4,m(this,this.onLoad)))};r["com.tilbuci.def.CollectionData"]=tb;tb.__name__="com.tilbuci.def.CollectionData";tb.__super__=mc;tb.prototype=I(mc.prototype,{ok:null,name:null,transition:null,time:null,assets:null,assetOrder:null,_acLoad:null,toJson:function(){return ng.print(this.toObject(),null,
null)},fromJson:function(a){a=mb.jsonAsMap(a);if(Object.prototype.hasOwnProperty.call(a.h,"name")){this.ok=!0;this.name=a.h.name;this.transition=a.h.transition;this.time=a.h.time;for(var b=0,c=A.fields(a.h.assets);b<c.length;){var d=c[b];++b;var f=this.assets,g=new yb(A.field(a.h.assets,d));f.h[d]=g;this.assetOrder.push("")}a=Object.keys(this.assets.h);b=a.length;for(c=0;c<b;)d=a[c++],this.assetOrder[this.assets.h[d].order]=d;return!0}return!1},toObject:function(){for(var a={},b=Object.keys(this.assets.h),
c=b.length,d=0;d<c;){var f=b[d++];a[f]=this.assets.h[f].toObject()}return{name:this.name,transition:this.transition,time:this.time,assets:a}},cloneData:function(){return{name:this.name,transition:this.transition,time:this.time,assets:this.assets,assetOrder:this.assetOrder}},kill:function(){mc.prototype.kill.call(this);this.transition=this.name=null;for(var a=Object.keys(this.assets.h),b=a.length,c=0;c<b;){var d=a[c++];this.assets.h[d].kill();var f=this.assets;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}for(this.assets=null;this.assetOrder.length>0;)this.assetOrder.shift();this.assetOrder=null},onLoad:function(a,b){this.ok=!1;if(a&&this.checkFields(b.map)){this.ok=!0;this.name=b.map.h.name;this.transition=b.map.h.transition;this.time=b.map.h.time;a=0;for(var c=A.fields(b.map.h.assets);a<c.length;){var d=c[a];++a;var f=this.assets,g=new yb(A.field(b.map.h.assets,d));f.h[d]=g;this.assetOrder.push("")}b=Object.keys(this.assets.h);a=b.length;for(c=0;c<a;)d=b[c++],this.assetOrder[this.assets.h[d].order]=
d}this._acLoad!=null&&this._acLoad();this._acLoad=null},__class__:tb});var Tc=function(a){this.playOnLoad=this.focus=!0;this.timedAc=new aa;(this.ok=!0,Object.prototype.hasOwnProperty.call(a,"collection"))?this.collection=A.field(a,"collection"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"asset")?this.asset=A.field(a,"asset"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=A.field(a,"action"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"play")?this.playOnLoad=A.field(a,"play"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=new Zc(A.field(a,"horizontal")):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=new Zc(A.field(a,"vertical")):this.ok=!1;!this.ok||this.horizontal.ok&&this.vertical.ok||(this.ok=!1);this.ok&&(this.asset=X.substr(this.asset,0,32));this.ok&&Object.prototype.hasOwnProperty.call(a,"actionover")?this.actionover=A.field(a,"actionover"):this.actionover=
"";if(this.ok&&Object.prototype.hasOwnProperty.call(a,"timedac")){var b=L.string(A.field(a,"timedac"));if(b=="")this.timedAc=new aa;else if(b=mb.jsonParse(b),b==0)this.timedAc=new aa;else for(var c=0,d=A.fields(b);c<d.length;){var f=d[c];++c;var g=A.field(b,f);this.timedAc.h[f]=g}}else this.timedAc=new aa;this.ok&&Object.prototype.hasOwnProperty.call(a,"focus")?this.focus=A.field(a,"focus"):this.focus=!0};r["com.tilbuci.def.InstanceData"]=Tc;Tc.__name__="com.tilbuci.def.InstanceData";Tc.prototype=
{ok:null,collection:null,asset:null,action:null,actionover:null,timedAc:null,playOnLoad:null,focus:null,horizontal:null,vertical:null,kill:function(){this.ok=!1;this.actionover=this.action=this.asset=this.collection=null;this.horizontal.kill();this.horizontal=null;this.vertical.kill();this.vertical=null;for(var a=Object.keys(this.timedAc.h),b=a.length,c=0;c<b;){var d=a[c++],f=this.timedAc;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.timedAc=null},toObject:function(){var a="";V.count(this.timedAc)>
0&&(a=mb.jsonStringify(this.timedAc));return{collection:this.collection,asset:this.asset,action:this.action,actionover:this.actionover,timedac:a,play:this.playOnLoad,focus:this.focus,horizontal:this.horizontal.toObject(),vertical:this.vertical.toObject()}},toJson:function(){return mb.jsonStringify(this.toObject())},clone:function(){return new Tc(this.toObject())},__class__:Tc};var Zc=function(a){this.textAlign="left";this.textBackground="";this.textLeading=this.textSpacing=0;this.textBold=this.textItalic=
!1;this.textColor="0xFFFFFF";this.textSize=12;this.textFont="_sans";this.glow=[];this.dropshadow=[];this.blur=[];this.blend="normal";this.pan=0;this.volume=1;this.colorAlpha=0;this.color="0x000000";this.visible=!0;this.rotation=0;(this.ok=!0,Object.prototype.hasOwnProperty.call(a,"order"))?this.order=A.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"x")?this.x=A.field(a,"x"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"y")?this.y=A.field(a,"y"):this.ok=
!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"alpha")?this.alpha=A.field(a,"alpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"width")?this.width=A.field(a,"width"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"height")?this.height=A.field(a,"height"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"rotation")?this.rotation=A.field(a,"rotation"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"visible")?this.visible=A.field(a,"visible"):this.ok=
!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"color")?this.color=A.field(a,"color"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"colorAlpha")?this.colorAlpha=A.field(a,"colorAlpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"volume")?this.volume=A.field(a,"volume"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"pan")?this.pan=A.field(a,"pan"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"blur")?(this.blur=A.field(a,"blur").split(";"),
this.blur.length!=2&&(this.blur=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"dropshadow")?(this.dropshadow=A.field(a,"dropshadow").split(";"),this.dropshadow.length!=8&&(this.dropshadow=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textFont")?this.textFont=A.field(a,"textFont"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSize")?this.textSize=A.field(a,"textSize"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textColor")?this.textColor=
A.field(a,"textColor"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textBold")?this.textBold=A.field(a,"textBold"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textItalic")?this.textItalic=A.field(a,"textItalic"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textLeading")?this.textLeading=A.field(a,"textLeading"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSpacing")?this.textSpacing=A.field(a,"textSpacing"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"textBackground")?this.textBackground=A.field(a,"textBackground"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textAlign")?this.textAlign=A.field(a,"textAlign"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"glow")?(this.glow=A.field(a,"glow").split(";"),this.glow.length!=5&&(this.glow=[])):this.glow=[];this.ok&&Object.prototype.hasOwnProperty.call(a,"blend")?this.blend=A.field(a,"blend"):this.blend="normal"};r["com.tilbuci.def.InstanceDesc"]=Zc;Zc.__name__="com.tilbuci.def.InstanceDesc";
Zc.prototype={ok:null,order:null,x:null,y:null,alpha:null,width:null,height:null,rotation:null,visible:null,color:null,colorAlpha:null,volume:null,pan:null,blend:null,blur:null,dropshadow:null,glow:null,textFont:null,textSize:null,textColor:null,textBold:null,textItalic:null,textLeading:null,textSpacing:null,textBackground:null,textAlign:null,kill:function(){for(this.ok=!1;this.blur.length>0;)this.blur.shift();for(this.blur=null;this.dropshadow.length>0;)this.dropshadow.shift();for(this.dropshadow=
null;this.glow.length>0;)this.glow.shift();this.blend=this.textAlign=this.textBackground=this.textColor=this.textFont=this.color=this.glow=null},toObject:function(){return{order:this.order,x:this.x,y:this.y,alpha:this.alpha,width:this.width,height:this.height,rotation:this.rotation,visible:this.visible,color:this.color,colorAlpha:this.colorAlpha,volume:this.volume,pan:this.pan,blur:this.blur.join(";"),dropshadow:this.dropshadow.join(";"),glow:this.glow.join(";"),blend:this.blend,textFont:this.textFont,
textSize:this.textSize,textColor:this.textColor,textBold:this.textBold,textItalic:this.textItalic,textLeading:this.textLeading,textSpacing:this.textSpacing,textBackground:this.textBackground,textAlign:this.textAlign}},__class__:Zc};var od=function(a,b){this.name=a;this.file=b};r["com.tilbuci.def.InterfaceLang"]=od;od.__name__="com.tilbuci.def.InterfaceLang";od.prototype={name:null,file:null,__class__:od};var pe=function(){this.inputs=new aa;this.highlightInt=null;this.encrypted=!1;this.loadingic=
["","",""];this.highlight="";this.plugins=new aa;this.flags=new aa;this.numbers=new aa;this.texts=new aa;this.theme="";this.actions=[];this.style="";this.fonts=[];this.animation="linear";this.origin="center";this.time=1;this.vsgroups=[];this.identify=!1;mc.call(this,"version title author copyright copyleft description favicon image key start acstart tags screen time origin animation fonts style theme texts numbers flags plugins".split(" "));this.screen=new Rd;this.clear()};r["com.tilbuci.def.MovieData"]=
pe;pe.__name__="com.tilbuci.def.MovieData";pe.__super__=mc;pe.prototype=I(mc.prototype,{version:null,title:null,author:null,copyright:null,copyleft:null,description:null,favicon:null,image:null,key:null,fallback:null,identify:null,vsgroups:null,start:null,acstart:null,tags:null,screen:null,time:null,origin:null,animation:null,fonts:null,style:null,actions:null,theme:null,texts:null,numbers:null,flags:null,plugins:null,highlight:null,loadingic:null,encrypted:null,highlightInt:null,inputs:null,clear:function(){this.version=
0;this.fallback=this.key=this.image=this.favicon=this.description=this.copyleft=this.copyright=this.author=this.title="";this.identify=!1;this.vsgroups=[];this.acstart=this.start="";this.tags=[];this.time=1;this.origin="center";this.animation="linear";this.highlight="";this.highlightInt=null;this.loadingic=["","",""];this.encrypted=!1;for(this.screen.clear();this.fonts.length>0;){var a=this.fonts.shift();a.name=null;a.file=null}for(;this.actions.length>0;){var b=this.actions.shift();b.name=null;b.ac=
null}this.theme=this.style="";a=this.texts.h;b=Object.keys(a);for(var c=b.length,d=0;d<c;){var f=b[d++];a=this.texts;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}a=this.numbers.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.numbers,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=this.flags.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.flags,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=this.plugins.h;b=Object.keys(a);c=b.length;for(d=
0;d<c;)f=b[d++],a=this.plugins,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];a=p.plugins.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],p.plugins.h[d].active=!1;p.style.clear();a=p.mvActions.h;c=Object.keys(a);d=c.length;for(f=0;f<d;)b=c[f++],a=p.mvActions,Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b];ua.defaultEase=bg.get_easeNone();a=new aa;a.h.keyup="up";a.h.keydown="down";a.h.keyleft="left";a.h.keyright="right";a.h.keyspace="";a.h.keyenter="target";a.h.keypup="nout";
a.h.keypdown="nin";a.h.keyhome="nothing";a.h.keyend="nothing";a.h.swiperight="right";a.h.swipeleft="left";a.h.swipetop="up";a.h.swipebottom="down";a.h.touchhold="nothing";a.h.pinchopen="nothing";a.h.pinchclose="nothing";a.h.mousemiddle="nothing";a.h.mouseright="nothing";a.h.mousewheelup="nothing";a.h.mousewheeldown="nothing";this.inputs=a},load:function(a){if(this.checkFields(a)){this.version=a.h.version;this.title=a.h.title;this.author=a.h.author;this.copyright=a.h.copyright;this.copyleft=a.h.copyleft;
this.description=a.h.description;this.favicon=a.h.favicon;this.image=a.h.image;this.key=a.h.key;this.start=a.h.start;this.acstart=a.h.acstart;this.tags=a.h.tags;this.screen.big=a.h.screen.big;this.screen.small=a.h.screen.small;this.screen.type=a.h.screen.type;this.screen.bgcolor=L.parseInt(a.h.screen.bgcolor);this.time=a.h.time;this.origin=a.h.origin;this.animation=a.h.animation;this.fonts=a.h.fonts;this.style=a.h.style;this.actions=a.h.actions;this.theme=a.h.theme;Object.prototype.hasOwnProperty.call(a.h,
"fallback")?this.fallback=a.h.fallback:this.fallback="";Object.prototype.hasOwnProperty.call(a.h,"identify")?this.identify=a.h.identify:this.identify=!1;Object.prototype.hasOwnProperty.call(a.h,"vsgroups")?this.vsgroups=a.h.vsgroups:this.vsgroups=[];this.vsgroups.length>0&&(this.identify=!0);Object.prototype.hasOwnProperty.call(a.h,"highlight")?(this.highlight=a.h.highlight,this.highlightInt=L.parseInt(this.highlight)):(this.highlight="",this.highlightInt=null);if(Object.prototype.hasOwnProperty.call(a.h,
"inputs"))for(var b=0,c=A.fields(a.h.inputs);b<c.length;){var d=c[b];++b;var f=A.field(a.h.inputs,d);this.inputs.h[d]=f}Object.prototype.hasOwnProperty.call(a.h,"loadingic")?this.loadingic=a.h.loadingic==""?["","",""]:mb.jsonParse(a.h.loadingic):this.loadingic=["","",""];Object.prototype.hasOwnProperty.call(a.h,"encrypted")?this.encrypted=a.h.encrypted:this.encrypted=!1;p.mdata=this;switch(this.animation){case "bounce.in":ua.defaultEase=wk.easeIn;break;case "bounce.inout":ua.defaultEase=wk.easeInOut;
break;case "bounce.out":ua.defaultEase=wk.easeOut;break;case "cubic.in":ua.defaultEase=xk.easeIn;break;case "cubic.inout":ua.defaultEase=xk.easeInOut;break;case "cubic.out":ua.defaultEase=xk.easeOut;break;case "elastic.in":ua.defaultEase=Ti.easeIn;break;case "elastic.inout":ua.defaultEase=Ti.easeInOut;break;case "elastic.out":ua.defaultEase=Ti.easeOut;break;case "expo.in":ua.defaultEase=Sj.easeIn;break;case "expo.inout":ua.defaultEase=Sj.easeInOut;break;case "expo.out":ua.defaultEase=Sj.easeOut;break;
case "quad.in":ua.defaultEase=Ai.easeIn;break;case "quad.inout":ua.defaultEase=Ai.easeInOut;break;case "quad.out":ua.defaultEase=Ai.easeOut;break;case "quart.in":ua.defaultEase=lh.easeIn;break;case "quart.inout":ua.defaultEase=lh.easeInOut;break;case "quart.out":ua.defaultEase=lh.easeOut;break;case "quint.in":ua.defaultEase=yk.easeIn;break;case "quint.inout":ua.defaultEase=yk.easeInOut;break;case "quint.out":ua.defaultEase=yk.easeOut;break;case "sine.in":ua.defaultEase=zk.easeIn;break;case "sine.inout":ua.defaultEase=
zk.easeInOut;break;case "sine.out":ua.defaultEase=zk.easeOut;break;default:this.animation="linear",ua.defaultEase=bg.get_easeNone()}b=0;for(c=this.fonts;b<c.length;)d=c[b],++b,new ih(p.path+"media/font/"+d.file,d.name,null,!1);b=p.mvActions.h;c=Object.keys(b);f=c.length;for(var g=0;g<f;)d=c[g++],b=p.mvActions,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=this.actions;b<c.length;)d=c[b],++b,f=d.ac,p.mvActions.h[d.name]=f;b=this.texts.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=
c[g++],b=this.texts,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=A.fields(a.h.texts);b<c.length;)d=c[b],++b,f=A.field(a.h.texts,d),this.texts.h[d]=f;b=this.numbers.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.numbers,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=A.fields(a.h.numbers);b<c.length;)d=c[b],++b,f=A.field(a.h.numbers,d),this.numbers.h[d]=f;b=this.flags.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.flags,Object.prototype.hasOwnProperty.call(b.h,
d)&&delete b.h[d];b=0;for(c=A.fields(a.h.flags);b<c.length;)d=c[b],++b,f=A.field(a.h.flags,d),this.flags.h[d]=f;b=p.plugins.h;b=Object.keys(b);d=b.length;for(c=0;c<d;)f=b[c++],p.plugins.h[f].active=!1;b=this.plugins.h;c=Object.keys(b);f=c.length;for(g=0;g<f;)d=c[g++],b=this.plugins,Object.prototype.hasOwnProperty.call(b.h,d)&&delete b.h[d];b=0;for(c=A.fields(a.h.plugins);b<c.length;)d=c[b],++b,f=A.field(a.h.plugins,d),this.plugins.h[d]=f;this.applySets();return!0}return!1},applySets:function(a){a==
null&&(a=!1);p.style.clear();p.style.parseCSS(this.style);for(var b=p.mvActions.h,c=Object.keys(b),d=c.length,f=0;f<d;){b=c[f++];var g=p.mvActions;Object.prototype.hasOwnProperty.call(g.h,b)&&delete g.h[b]}c=0;for(d=this.actions;c<d.length;)b=d[c],++c,p.mvActions.h[b.name]=b.ac;a&&p.parser.clearVars();b=this.texts.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setString(d,this.texts.h[d]);b=this.flags.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setBool(d,this.flags.h[d]);
b=this.numbers.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.parser.setFloat(d,this.numbers.h[d]),p.parser.setInt(d,Math.round(this.numbers.h[d]));b=p.plugins.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],p.plugins.h[d].active=!1;b=p.plugins.h;a=Object.keys(b);b=a.length;for(c=0;c<b;)d=a[c++],Object.prototype.hasOwnProperty.call(this.plugins.h,d)?(p.plugins.h[d].active=this.plugins.h[d].active,p.plugins.h[d].setConfig(this.plugins.h[d].config)):p.plugins.h[d].active=!1;a=!0;Object.prototype.hasOwnProperty.call(Fb,
"mode")&&A.field(Fb,"mode")=="editor"&&(a=!1);a&&(p.theme=new pq(this.theme),Wb.setTheme(p.theme));p.contraptions.loadLoadingIc()},toJson:function(){return ng.print({version:this.version,title:this.title,author:this.author,copyright:this.copyright,copyleft:this.copyleft,start:this.start,acstart:this.acstart,description:this.description,favicon:this.favicon,key:this.key,identify:this.identify,vsgroups:this.vsgroups,image:this.image,tags:this.tags,screen:{big:this.screen.big,small:this.screen.small,
type:this.screen.type,bgcolor:"0x"+Z.hex(this.screen.bgcolor)},time:this.time,origin:this.origin,animation:this.animation,fonts:this.fonts,highlight:this.highlight,loadingic:this.loadingic,encrypted:this.encrypted,inputs:this.inputs},null,null)},kill:function(){mc.prototype.kill.call(this);for(this.acstart=this.start=this.image=this.favicon=this.description=this.copyleft=this.copyright=this.author=this.title=null;this.tags.length>0;)this.tags.shift();this.tags=null;this.screen.kill();this.screen=
null;this.time=1;for(this.animation=this.origin=null;this.fonts.length>0;){var a=this.fonts.shift();a.name=null;a.file=null}for(this.theme=this.style=this.fonts=null;this.actions.length>0;)a=this.actions.shift(),a.name=null,a.ac=null;this.actions=null;a=this.texts.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=b[d++];a=this.texts;Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f]}this.texts=null;a=this.numbers.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.numbers,Object.prototype.hasOwnProperty.call(a.h,
f)&&delete a.h[f];this.numbers=null;a=this.flags.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.flags,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];this.flags=null;a=this.plugins.h;b=Object.keys(a);c=b.length;for(d=0;d<c;)f=b[d++],a=this.plugins,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];for(this.highlightInt=this.highlight=this.plugins=null;this.loadingic.length>0;)this.loadingic.shift();this.loadingic=null;a=this.inputs.h;b=Object.keys(a);c=b.length;for(d=
0;d<c;)f=b[d++],a=this.inputs,Object.prototype.hasOwnProperty.call(a.h,f)&&delete a.h[f];this.inputs=null},__class__:pe});var Rd=function(){this.clear()};r["com.tilbuci.def.MovieDataScreen"]=Rd;Rd.__name__="com.tilbuci.def.MovieDataScreen";Rd.prototype={big:null,small:null,type:null,bgcolor:null,clear:function(){this.small=this.big=0;this.type="";this.bgcolor=0},kill:function(){this.type=null},__class__:Rd};var ke=function(){this.dflow=[];this.navigation=new aa;this.ackeyframes=[];this.acstart="";
this.loop=0;this.keyframes=[];this.collections=[];this.staticsc=!1;this.title=this.about=this.image="";mc.call(this,"title about image navigation collections keyframes loop acstart ackeyframes".split(" "));this.clear()};r["com.tilbuci.def.SceneData"]=ke;ke.__name__="com.tilbuci.def.SceneData";ke.__super__=mc;ke.prototype=I(mc.prototype,{title:null,about:null,image:null,staticsc:null,collections:null,keyframes:null,loop:null,acstart:null,ackeyframes:null,navigation:null,dflow:null,clear:function(){this.image=
this.about=this.title="";this.staticsc=!1;var a=this.navigation.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++],f=this.navigation;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}b=new aa;b.h.up="";b.h.down="";b.h.left="";b.h.right="";b.h.nin="";b.h.nout="";this.navigation=b;this.dflow=[["",""],["",""],["",""],["",""]];for(this.loop=0;this.collections.length>0;)this.collections.shift();for(;this.keyframes.length>0;)for(b=this.keyframes.shift(),a=b.h,a=Object.keys(a),c=a.length,
d=0;d<c;)f=a[d++],b.h[f].kill(),Object.prototype.hasOwnProperty.call(b.h,f)&&delete b.h[f];for(this.acstart="";this.ackeyframes.length>0;)this.ackeyframes.shift()},load:function(a){p.contraptions.removeContraptions();p.contraptions.usingDflow=!1;if(this.checkFields(a)){this.title=a.h.title;this.about=a.h.about;this.image=a.h.image;var b=new aa;b.h.up=a.h.navigation.up;b.h.down=a.h.navigation.down;b.h.left=a.h.navigation.left;b.h.right=a.h.navigation.right;b.h.nin=a.h.navigation.nin;b.h.nout=a.h.navigation.nout;
for(this.navigation=b;this.collections.length>0;)this.collections.shift();var c=a.h.collections;if(c.length>0)for(b=0;b<c.length;){var d=c[b];++b;this.collections.push(d)}for(;this.keyframes.length>0;){var f=this.keyframes.shift();b=Object.keys(f.h);var g=b.length;for(d=0;d<g;)c=b[d++],f.h[c].kill(),Object.prototype.hasOwnProperty.call(f.h,c)&&delete f.h[c]}b=0;for(g=A.fields(a.h.keyframes);b<g.length;){c=g[b];++b;f=new aa;for(var h=0,l=A.fields(A.field(a.h.keyframes,c));h<l.length;){var k=l[h];++h;
d=new Tc(A.field(A.field(a.h.keyframes,c),k));f.h[k]=d}this.keyframes.push(f)}this.loop=a.h.loop;if(this.loop>=this.keyframes.length||this.loop<0)this.loop=0;for(this.acstart=a.h.acstart;this.ackeyframes.length>0;)this.ackeyframes.shift();b=0;for(g=A.fields(a.h.ackeyframes);b<g.length;)c=g[b],++b,this.ackeyframes.push(A.field(a.h.ackeyframes,c));Object.prototype.hasOwnProperty.call(a.h,"staticsc")?this.staticsc=a.h.staticsc:this.staticsc=!1;if(Object.prototype.hasOwnProperty.call(a.h,"dflow"))for(this.dflow=
[["",""],["",""],["",""],["",""]],b=f=0,g=A.fields(a.h.dflow);b<g.length;)c=g[b],++b,c=A.field(a.h.dflow,c),c!=null&&(this.dflow[f]=c),++f;p.contraptions.hideLoadingIc();return!0}p.contraptions.hideLoadingIc();return!1},toJson:function(){return ng.print(this.toObject(),null,null)},toObject:function(){for(var a=[],b=0,c=this.keyframes.length;b<c;){for(var d=b++,f={},g=Object.keys(this.keyframes[d].h),h=g.length,l=0;l<h;){var k=g[l++];f[k]=this.keyframes[d].h[k].toObject()}a.push(f)}return{title:this.title,
about:this.about,image:this.image,staticsc:this.staticsc,navigation:{up:this.navigation.h.up,down:this.navigation.h.down,left:this.navigation.h.left,right:this.navigation.h.right,nin:this.navigation.h.nin,nout:this.navigation.h.nout},dflow:this.dflow,collections:this.collections,loop:this.loop,acstart:this.acstart,ackeyframes:this.ackeyframes,keyframes:a}},fromObject:function(a){Object.prototype.hasOwnProperty.call(a,"title")&&(this.title=A.field(a,"title"));Object.prototype.hasOwnProperty.call(a,
"about")&&(this.about=A.field(a,"about"));Object.prototype.hasOwnProperty.call(a,"image")&&(this.image=A.field(a,"image"));Object.prototype.hasOwnProperty.call(a,"staticsc")&&(this.staticsc=A.field(a,"staticsc"));Object.prototype.hasOwnProperty.call(a,"loop")&&(this.loop=A.field(a,"loop"));Object.prototype.hasOwnProperty.call(a,"acstart")&&(this.acstart=A.field(a,"acstart"));Object.prototype.hasOwnProperty.call(a,"ackeyframes")&&(this.ackeyframes=A.field(a,"ackeyframes"));Object.prototype.hasOwnProperty.call(a,
"collections")&&(this.collections=A.field(a,"collections"));if(Object.prototype.hasOwnProperty.call(a,"navigation")){var b=A.field(a,"navigation");if(Object.prototype.hasOwnProperty.call(b,"up")){var c=A.field(b,"up");this.navigation.h.up=c}Object.prototype.hasOwnProperty.call(b,"down")&&(c=A.field(b,"down"),this.navigation.h.down=c);Object.prototype.hasOwnProperty.call(b,"left")&&(c=A.field(b,"left"),this.navigation.h.left=c);Object.prototype.hasOwnProperty.call(b,"right")&&(c=A.field(b,"right"),
this.navigation.h.right=c);Object.prototype.hasOwnProperty.call(b,"nin")&&(c=A.field(b,"nin"),this.navigation.h.nin=c);Object.prototype.hasOwnProperty.call(b,"nout")&&(c=A.field(b,"nout"),this.navigation.h.nout=c)}if(Object.prototype.hasOwnProperty.call(a,"dflow")){this.dflow=[["",""],["",""],["",""],["",""]];c=A.field(a,"dflow");for(var d=0,f=0,g=A.fields(c);f<g.length;)b=g[f],++f,b=A.field(c,b),b!=null&&(this.dflow[d]=b),++d}if(Object.prototype.hasOwnProperty.call(a,"keyframes")){for(;this.keyframes.length>
0;)for(f=this.keyframes.shift(),g=Object.keys(f.h),c=g.length,d=0;d<c;)b=g[d++],f.h[b].kill(),Object.prototype.hasOwnProperty.call(f.h,b)&&delete f.h[b];a=A.field(a,"keyframes");f=0;for(g=A.fields(a);f<g.length;){b=g[f];++f;d=new aa;for(var h=0,l=A.fields(A.field(a,b));h<l.length;){var k=l[h];++h;c=new Tc(A.field(A.field(a,b),k));d.h[k]=c}this.keyframes.push(d)}}},hasDflow:function(){return this.dflow[0][1]==""&&this.dflow[1][1]==""&&this.dflow[2][1]==""?this.dflow[3][1]!="":!0},kill:function(){mc.prototype.kill.call(this);
this.image=this.about=this.title=null;var a=this.navigation.h,b=Object.keys(a);a=b.length;for(var c=0;c<a;){var d=b[c++],f=this.navigation;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}for(this.navigation=null;this.collections.length>0;)this.collections.shift();for(this.collections=null;this.keyframes.length>0;)for(b=this.keyframes.shift(),a=b.h,a=Object.keys(a),c=a.length,d=0;d<c;)f=a[d++],b.h[f].kill(),Object.prototype.hasOwnProperty.call(b.h,f)&&delete b.h[f];for(;this.dflow.length>
0;)this.dflow.shift();for(this.acstart=this.keyframes=this.dflow=null;this.ackeyframes.length>0;)this.ackeyframes.shift();this.ackeyframes=null},__class__:ke});var rf=function(){this._cursor=-1;this._data=[];this._data=[];this._cursor=-1};r["com.tilbuci.def.TBArray"]=rf;rf.__name__="com.tilbuci.def.TBArray";rf.prototype={_data:null,_cursor:null,kill:function(){for(;this._data.length>0;)this._data.shift();this._data=null},current:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=
0&&this._data.length>this._cursor?p.parser.parseString(this._data[this._cursor]):""},currentInt:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseInt(this._data[this._cursor]):0},currentFloat:function(){this._cursor<0&&this._data.length>0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseFloat(this._data[this._cursor]):0},currentBool:function(){this._cursor<0&&this._data.length>
0&&(this._cursor=0);return this._cursor>=0&&this._data.length>this._cursor?p.parser.parseBool(this._data[this._cursor]):!1},next:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.current()},nextInt:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentInt()},
nextFloat:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentFloat()},nextBool:function(){this._cursor++;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentBool()},previous:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=
0:this._cursor<0&&(this._cursor=this._data.length-1);return this.current()},previousInt:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentInt()},previousFloat:function(){this._cursor--;this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentFloat()},previousBool:function(){this._cursor--;
this._data.length==0?this._cursor=-1:this._cursor>=this._data.length?this._cursor=0:this._cursor<0&&(this._cursor=this._data.length-1);return this.currentBool()},setIndex:function(a){this._cursor=this._data.length==0?-1:a>=this._data.length?this._data.length-1:a<0?0:a},currentIndex:function(){return this._cursor},toJson:function(){return mb.jsonStringify(this._data)},fromJson:function(a){this._data=mb.jsonParse(a);if(this._data==null)return this._data=[],this._cursor=-1,!1;if(this._data.length>0)return this._cursor=
0,!0;this._cursor=-1;return!1},push:function(a){this._data.push(a)},clear:function(){for(;this._data.length>0;)this._data.shift();this._cursor=-1},set:function(a,b){if(a>=0){for(;this._data.length<=a;)this._data.push("");this._data[a]=b}},get:function(a){return a>=0&&this._data.length>a?p.parser.parseString(this._data[a]):""},getInt:function(a){return a>=0&&this._data.length>a?p.parser.parseInt(this._data[a]):0},getFloat:function(a){return a>=0&&this._data.length>a?p.parser.parseFloat(this._data[a]):
0},getBool:function(a){return a>=0&&this._data.length>a?p.parser.parseBool(this._data[a]):!1},__class__:rf};var Xe=function(a){this._scrollPos=0;lc.call(this,"html",!1,a);this._text=new Jc;this._text.set_selectable(!1);this._format=new qf;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!0);this._text.set_multiline(!0);this._text.set_embedFonts(!0);this._text.set_cacheAsBitmap(!0);this._text.condenseWhite=!0;this._text.set_styleSheet(p.style);this.addChild(this._text);
this._loader=new Si;this._loader.addEventListener("complete",m(this,this.onOk));this._loader.addEventListener("ioError",m(this,this.onError));this._loader.addEventListener("securityError",m(this,this.onError))};r["com.tilbuci.display.HtmlImage"]=Xe;Xe.__name__="com.tilbuci.display.HtmlImage";Xe.__super__=lc;Xe.prototype=I(lc.prototype,{_text:null,_format:null,_loader:null,_scrollPos:null,setFormat:function(a,b,c,d,f,g,h,l,k){this._format.set_font(a);this._format.set_size(b);this._format.color=L.parseInt(c);
this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;switch(k){case "center":this._format.align=0;break;case "justify":this._format.align=2;break;case "right":this._format.align=4;break;default:this._format.align=3}this._text.set_defaultTextFormat(this._format);l==""?this._text.set_background(!1):(this._text.set_backgroundColor(L.parseInt(l)),this._text.set_background(!0))},setTextSize:function(a,b){this._text.set_width(this.oWidth=a);this._text.set_height(this.oHeight=
b);this._text.set_scrollV(this._scrollPos)},textScroll:function(a){switch(a){case -1:this._scrollPos>0&&(this._scrollPos=this._text.set_scrollV(this._scrollPos-1));break;case 0:this._scrollPos=this._text.set_scrollV(0);break;case 1:this._scrollPos<this._text.get_maxScrollV()&&(this._scrollPos=this._text.set_scrollV(this._scrollPos+1));break;case 2:this._scrollPos=this._text.set_scrollV(this._text.get_maxScrollV())}},setText:function(a){a=p.parser.parseString(a);this._text.set_htmlText(a);this._scrollPos=
this._text.set_scrollV(0)},getText:function(){return this._text.get_text()},load:function(a){a=Z.replace(a,p.path+"media/html/","");a=p.parser.parsePath(p.path+"media/html/"+a);this._loader.load(new Ve(a))},kill:function(){lc.prototype.kill.call(this);this._loader.removeEventListener("complete",m(this,this.onOk));this._loader.removeEventListener("ioError",m(this,this.onError));this._loader.removeEventListener("securityError",m(this,this.onError));this._format=this._text=this._loader=null},onOk:function(a){this._text.set_htmlText(p.parser.parseString(this._loader.data));
this.oWidth=this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},onError:function(a){this._text.set_htmlText("");this._onLoad(!1)},__class__:Xe});var Bi=function(a,b){this._dragging=this.selected=!1;this._changeAsset="";this.keep=this._firstLoad=this._playOnLoad=!0;this._path=this._collection=this._asset="";this._current=1;this.lastClick=new Qa;za.call(this);this._name=a;this._onSelect=b;this._display=new za;this._mask=new zd;this._mask.get_graphics().beginFill(0);this._mask.get_graphics().drawRect(0,
0,64,64);this._mask.get_graphics().endFill();this.addChild(this._display);this.addChild(this._mask);this._display.set_mask(this._mask);this._im1=new Qf(m(this,this.onLoad),a,m(this,this.onTimedAc));this._im2=new Qf(m(this,this.onLoad),a,m(this,this.onTimedAc));this._imCurrent=this._im1;this._imOther=this._im2;this._current=1;this._display.addChild(this._im1);this._display.addChild(this._im2);this._multSize=new Qa(1,1);p.mdata.origin!="none"&&this.set_alpha(0);this.set_rotation(0);p.movie.data.screen.type==
"landscape"?(this.set_x(p.mdata.screen.big/2),this.set_y(p.mdata.screen.small/2)):p.movie.data.screen.type=="portrait"?(this.set_x(p.mdata.screen.small/2),this.set_y(p.mdata.screen.big/2)):p.orientation=="horizontal"?(this.set_x(p.mdata.screen.big/2),this.set_y(p.mdata.screen.small/2)):(this.set_x(p.mdata.screen.small/2),this.set_y(p.mdata.screen.big/2));this._lastH=this._lastW=this.set_width(this.set_height(10));this._set=new qj;this.addEventListener("mouseDown",m(this,this.onClick));this.addEventListener("mouseOver",
m(this,this.onMouseOver));this.addEventListener("mouseOut",m(this,this.onMouseOut))};r["com.tilbuci.display.InstanceImage"]=Bi;Bi.__name__="com.tilbuci.display.InstanceImage";Bi.__super__=za;Bi.prototype=I(za.prototype,{lastClick:null,_name:null,_display:null,_mask:null,_im1:null,_im2:null,_imCurrent:null,_imOther:null,_current:null,_data:null,_multSize:null,_desc:null,_path:null,_lastW:null,_lastH:null,_collection:null,_asset:null,keep:null,_firstLoad:null,_playOnLoad:null,_set:null,_changeAsset:null,
_dragging:null,_onSelect:null,selected:null,playing:null,get_playing:function(){return this._imCurrent.get_playing()},currentType:null,get_currentType:function(){return this._imCurrent.get_currentType()},currentMedia:null,get_currentMedia:function(){return this._imCurrent.get_currentMedia()},displayWidth:null,get_displayWidth:function(){return p.orientation=="horizontal"?this._data.horizontal.width:this._data.vertical.width},displayHeight:null,get_displayHeight:function(){return p.orientation=="horizontal"?
this._data.horizontal.height:this._data.vertical.height},transition:null,get_transition:function(){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,this._collection)?p.movie.collections.h[this._collection].transition:""},get_width:function(){return this._mask!=null?this._mask.get_width():za.prototype.get_width.call(this)},get_height:function(){return this._mask!=null?this._mask.get_height():za.prototype.get_height.call(this)},set_width:function(a){this._mask!=null&&(this._mask.set_width(a),
this._im1.set_width(a),this._im2.set_width(a));return a},set_height:function(a){this._mask!=null&&(this._mask.set_height(a),this._im1.set_height(a),this._im2.set_height(a));return a},changeId:function(a,b){return this._name==a?(this._name=b,!0):!1},load:function(a){if(a.ok){if(Object.prototype.hasOwnProperty.call(p.movie.collections.h,a.collection)){if(p.movie.collections.h[a.collection].ok&&Object.prototype.hasOwnProperty.call(p.movie.collections.h[a.collection].assets.h,a.asset)){this._data=a;var b=
p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply];if(b==this._path)return!0;this._path=b;this._playOnLoad=a.playOnLoad;if(this._imOther.load(a))return this._collection=a.collection,this._asset=a.asset,this._imCurrent.stopTimer(),!0;this.set_visible(!1);return!1}this.set_visible(!1);return!1}this.set_visible(!1);return!1}this.set_visible(!1);return!1},getProp:function(a){switch(a){case "alpha":return this._desc.alpha;case "colorAlpha":return this._desc.colorAlpha;case "fontLeading":return this._imCurrent.getProp("fontLeading");
case "fontSize":return this._imCurrent.getProp("fontSize");case "fontSpacing":return this._imCurrent.getProp("fontSpacing");case "height":return this._desc.height;case "order":return this._desc.order;case "pan":return this._desc.pan;case "rotation":return this._desc.rotation;case "volume":return this._desc.volume;case "width":return this._desc.width;case "x":return this._desc.x;case "y":return this._desc.y;default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._imCurrent.getBoolProp("fontBold");
case "fontItalic":return this._imCurrent.getBoolProp("fontItalic");case "visible":return this.get_visible();default:return!1}},getStringProp:function(a){switch(a){case "color":return this._desc.color;case "font":return this._imCurrent.getStringProp("font");case "fontColor":return this._imCurrent.getStringProp("fontColor");case "text":return this._imCurrent.getStringProp("text");default:return""}},kill:function(){this.removeEventListener("mouseDown",m(this,this.onClick));this.removeEventListener("mouseOver",
m(this,this.onMouseOver));this.removeEventListener("mouseOut",m(this,this.onMouseOut));this.removeChildren();this._display.set_mask(null);this._display.removeChildren();this._display=null;this._mask.get_graphics().clear();this._imOther=this._imCurrent=this._mask=null;this._im1.kill();this._im1=null;this._im2.kill();this._path=this._desc=this._multSize=this._data=this._im2=null;this._set.kill();this._onSelect=this._changeAsset=this._asset=this._collection=this._set=null},place:function(){ua.stop(this,
null,!1,!1);if(this.keep&&this._data!=null){this._set.load(this._data.horizontal,this._data.vertical);this._desc=p.movie.data.screen.type=="landscape"?this._set.horizontal:p.movie.data.screen.type=="portrait"?this._set.vertical:p.orientation=="horizontal"?this._set.horizontal:this._set.vertical;this._lastW=this._multSize.x*this._desc.width;this._lastH=this._multSize.y*this._desc.height;this._imCurrent.formatText(this._desc.textFont,this._desc.textSize,this._desc.textColor,this._desc.textBold,this._desc.textItalic,
this._desc.textLeading,this._desc.textSpacing,this._desc.textBackground,this._desc.textAlign);this._imCurrent.setTextSize(this._desc.width,this._desc.height);p.focusMode?(ua.tween(this,3,{x:this._desc.x,y:this._desc.y,width:this._multSize.x*this._desc.width,height:this._multSize.y*this._desc.height,alpha:this._desc.alpha,rotation:this._desc.rotation}).smartRotation().autoVisible(!1).ease(bg.get_easeNone()),ua.transform(this,3).color(L.parseInt(this._desc.color),this._desc.colorAlpha).ease(bg.get_easeNone())):
(ua.tween(this,p.mdata.time,{x:this._desc.x,y:this._desc.y,width:this._multSize.x*this._desc.width,height:this._multSize.y*this._desc.height,alpha:this._desc.alpha,rotation:this._desc.rotation}).smartRotation().autoVisible(!1),ua.transform(this,p.mdata.time).color(L.parseInt(this._desc.color),this._desc.colorAlpha));this._imOther.stopSound();this._imCurrent.stopSound();this._imCurrent.iterateSound(this._desc.volume,this._desc.pan);var a=[];this._desc.dropshadow.length==8&&a.push(new il(L.parseInt(this._desc.dropshadow[0]),
parseFloat(this._desc.dropshadow[1]),L.parseInt(this._desc.dropshadow[2]),parseFloat(this._desc.dropshadow[3]),parseFloat(this._desc.dropshadow[4]),parseFloat(this._desc.dropshadow[5]),parseFloat(this._desc.dropshadow[6]),1,this._desc.dropshadow[7]=="1"));this._desc.blur.length==2&&a.push(new Ui(parseFloat(this._desc.blur[0]),parseFloat(this._desc.blur[1])));this._desc.glow.length==5&&a.push(new Zd(L.parseInt(this._desc.glow[0]),parseFloat(this._desc.glow[1]),L.parseInt(this._desc.glow[2]),L.parseInt(this._desc.glow[2]),
L.parseInt(this._desc.glow[3]),1,this._desc.glow[4]=="1"));this.set_filters(a);switch(this._desc.blend){case "add":this.set_blendMode(0);break;case "difference":this.set_blendMode(3);break;case "invert":this.set_blendMode(6);break;case "multiply":this.set_blendMode(9);break;case "screen":this.set_blendMode(12);break;case "subtract":this.set_blendMode(14);break;default:this.set_blendMode(10)}p.mode=="editor"&&ua.stop(this,null,!0);this.set_visible(this._desc.visible)}else{a=this.get_x();var b=this.get_y(),
c=this.get_width(),d=this.get_height(),f=this.get_alpha();if(p.movie.data.screen.type=="landscape"){var g=p.mdata.screen.big;var h=p.mdata.screen.small}else p.movie.data.screen.type=="portrait"?(h=p.mdata.screen.big,g=p.mdata.screen.small):p.orientation=="horizontal"?(g=p.mdata.screen.big,h=p.mdata.screen.small):(h=p.mdata.screen.big,g=p.mdata.screen.small);switch(p.mdata.origin){case "alpha":f=0;break;case "bottom":b=-10-this.get_height();break;case "bottomkeep":b=-10-h+this.get_y();break;case "left":a=
g+10;break;case "leftkeep":a=g+10+this.get_x();break;case "none":this.set_alpha(0);f=0;break;case "right":a=-10-this.get_width();break;case "rightkeep":a=-10-g+this.get_x();break;case "top":b=h+10;break;case "topkeep":b=h+10+this.get_y();break;default:d=c=1,a=g/2,b=h/2,f=0}p.focusMode?ua.tween(this,3,{x:a,y:b,width:c,height:d,alpha:f}).autoVisible(!1).ease(bg.get_easeNone()):ua.tween(this,p.mdata.time,{x:a,y:b,width:c,height:d,alpha:f}).autoVisible(!1);this.pause()}this._desc!=null&&this.parent.swapChildrenAt(this.parent.getChildIndex(this),
this._desc.order)},setTextSize:function(a,b){this._imCurrent.setTextSize(a,b);this._imOther.setTextSize(a,b);this._mask.set_width(this._im1.set_width(this._im2.get_width()));this._mask.set_height(this._im1.set_height(this._im2.get_height()))},formatText:function(a,b,c,d,f,g,h,l,k){this._imCurrent.formatText(a,b,c,d,f,g,h,l,k);this._imOther.formatText(a,b,c,d,f,g,h,l,k)},getOrder:function(){return t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.order:
p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.order},setOrder:function(a,b){b==null&&(b=!0);t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.order=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.order=a;b&&this.parent.swapChildrenAt(this.parent.getChildIndex(this),a)},next:function(){var a=this._imCurrent.assetOrder+1;a>=p.movie.collections.h[this._collection].assetOrder.length&&(a=0);this._imCurrent.stopTimer();
this._changeAsset="next";this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[p.movie.collections.h[this._collection].assetOrder[a]])},previous:function(){var a=this._imCurrent.assetOrder-1;a<0&&(a=p.movie.collections.h[this._collection].assetOrder.length-1);this._imCurrent.stopTimer();this._changeAsset="previous";this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[p.movie.collections.h[this._collection].assetOrder[a]])},loadAsset:function(a){return Object.prototype.hasOwnProperty.call(p.movie.collections.h[this._collection].assets.h,
a)?(this._imCurrent.stopTimer(),this._changeAsset="set",this._imOther.loadAsset(p.movie.collections.h[this._collection].assets.h[a]),!0):!1},loadCollectionAsset:function(a,b){return Object.prototype.hasOwnProperty.call(p.movie.collections.h,a)&&Object.prototype.hasOwnProperty.call(p.movie.collections.h[a].assets.h,b)?(this._imCurrent.stopTimer(),this._changeAsset="set",this._imOther.loadAsset(p.movie.collections.h[a].assets.h[b]),!0):!1},playPause:function(){this._imCurrent.playPause();this._playOnLoad=
this._imCurrent.get_playing()},play:function(){this._playOnLoad=!0;this._imCurrent.play()},pause:function(){this._playOnLoad=!1;this._imCurrent.pause()},stop:function(){this._playOnLoad=!1;this._imCurrent.stop();this._imOther.stop()},getTime:function(){return this._imCurrent.getTime()},seek:function(a){this._imCurrent.seek(a)},updateFrames:function(a,b){this._imCurrent.updateFrames(a,b)},fixProp:function(a,b,c){this._set.fixProp(a,b,c)},textScroll:function(a){this._imCurrent.textScroll(a)},setText:function(a){this._imCurrent.setText(a);
this._imOther.setText(a)},updateText:function(){this._imCurrent.updateText();this._imOther.updateText()},releaseProp:function(a){this._set.releaseProp(a)},releaseAll:function(){this._set.releaseAll()},oWidth:function(){return this._imCurrent!=null?this._imCurrent.oWidth():0},oHeight:function(){return this._imCurrent!=null?this._imCurrent.oHeight():0},onLoad:function(a){if(a){this._im1.set_width(this._im2.set_width(p.mdata.screen.big/2*p.multiply));this._im1.set_height(this._im2.set_height(p.mdata.screen.big/
2*p.multiply));this._imCurrent.stop();this._current==1?(this._current=2,this._imCurrent=this._im2,this._imOther=this._im1):(this._current=1,this._imCurrent=this._im1,this._imOther=this._im2);ua.stop(this._imCurrent);ua.stop(this._imOther);a=p.movie.collections.h[this._data.collection].transition;if(this._changeAsset=="previous")switch(a){case "bottom":a="top";break;case "left":a="right";break;case "right":a="left";break;case "top":a="bottom"}switch(a){case "alpha":this._multSize.x=this._multSize.y=
1;this._imCurrent.set_x(this._imOther.set_x(this._imCurrent.set_y(this._imOther.set_y(0))));this._imCurrent.set_alpha(0);this._imOther.set_alpha(1);p.focusMode?(ua.tween(this._imCurrent,3,{alpha:1}).ease(bg.get_easeNone()),ua.tween(this._imOther,3,{alpha:0}).ease(bg.get_easeNone())):(ua.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{alpha:1}),ua.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{alpha:0}));break;case "bottom":this._multSize.x=1;this._multSize.y=
1;this._imCurrent.set_y(this._imCurrent.get_height());this._imOther.set_y(0);this._imCurrent.set_x(this._imOther.set_x(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);p.focusMode?(ua.tween(this._imCurrent,3,{y:0}).ease(bg.get_easeNone()),ua.tween(this._imOther,3,{y:-this._imCurrent.get_height()}).ease(bg.get_easeNone())):(ua.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{y:0}),ua.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{y:-this._imCurrent.get_height()}));
break;case "left":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_x(-this._imCurrent.get_width());this._imOther.set_x(0);this._imCurrent.set_y(this._imOther.set_y(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);p.focusMode?(ua.tween(this._imCurrent,3,{x:0}).ease(bg.get_easeNone()),ua.tween(this._imOther,3,{x:this._imCurrent.get_width()}).ease(bg.get_easeNone())):(ua.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0}),ua.tween(this._imOther,p.movie.collections.h[this._data.collection].time,
{x:this._imCurrent.get_width()}));break;case "right":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_x(this._imCurrent.get_width());this._imOther.set_x(0);this._imCurrent.set_y(this._imOther.set_y(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);p.focusMode?(ua.tween(this._imCurrent,3,{x:0}).ease(bg.get_easeNone()),ua.tween(this._imOther,3,{x:-this._imCurrent.get_width()}).ease(bg.get_easeNone())):(ua.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0}),
ua.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{x:-this._imCurrent.get_width()}));break;case "top":this._multSize.x=1;this._multSize.y=1;this._imCurrent.set_y(-this._imCurrent.get_height());this._imOther.set_y(0);this._imCurrent.set_x(this._imOther.set_x(0));this._imCurrent.set_alpha(1);this._imOther.set_alpha(1);p.focusMode?(ua.tween(this._imCurrent,3,{y:0}).ease(bg.get_easeNone()),ua.tween(this._imOther,3,{y:this._imCurrent.get_height()}).ease(bg.get_easeNone())):(ua.tween(this._imCurrent,
p.movie.collections.h[this._data.collection].time,{y:0}),ua.tween(this._imOther,p.movie.collections.h[this._data.collection].time,{y:this._imCurrent.get_height()}));break;default:this._multSize.x=this._multSize.y=1,this._imCurrent.set_x(this._imOther.set_x(this._imCurrent.set_y(this._imOther.set_y(0)))),this._imCurrent.set_alpha(1),this._imOther.set_alpha(0)}this._mask.set_x(this._display.set_x(this._mask.set_y(this._display.set_y(0))));this._display.setChildIndex(this._imCurrent,1);this._display.setChildIndex(this._imOther,
0);if(this._firstLoad){if(p.movie.data.screen.type=="landscape"){this._desc=this._data.horizontal;a=p.mdata.screen.big;var b=p.mdata.screen.small}else p.movie.data.screen.type=="portrait"?(this._desc=this._data.vertical,a=p.mdata.screen.small,b=p.mdata.screen.big):p.orientation=="horizontal"?(this._desc=this._data.horizontal,a=p.mdata.screen.big,b=p.mdata.screen.small):(this._desc=this._data.vertical,a=p.mdata.screen.small,b=p.mdata.screen.big);switch(p.mdata.origin){case "alpha":this.set_x(this._desc.x);
this.set_y(this._desc.y);this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(0);this.set_rotation(this._desc.rotation);break;case "bottom":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(b+10);break;case "bottomkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*
this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(b+10+this._desc.y);break;case "left":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(-10-this.get_width());break;case "leftkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*
this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(-10-a+this._desc.x);break;case "none":this.set_x(this._desc.x);this.set_y(this._desc.y);this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);break;case "right":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);
this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(a+10);break;case "rightkeep":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);this.set_rotation(this._desc.rotation);this.set_y(this._desc.y);this.set_x(a+10+this._desc.x);break;case "top":this.set_width(this._desc.width*this._multSize.x);this.set_height(this._desc.height*this._multSize.y);this.set_alpha(this._desc.alpha);
this.set_rotation(this._desc.rotation);this.set_x(this._desc.x);this.set_y(-10-this.get_height());break;case "topkeep":this.set_width(this._desc.width*this._multSize.x),this.set_height(this._desc.height*this._multSize.y),this.set_alpha(this._desc.alpha),this.set_rotation(this._desc.rotation),this.set_x(this._desc.x),this.set_y(-10-b+this._desc.y)}}this._firstLoad=!1;this._imOther.stopTimer();this._imOther.stop();this._playOnLoad?this._imCurrent.startTimer():this._imCurrent.stopTimer();this._changeAsset==
""&&this.place();this._changeAsset=""}},onTimedAc:function(a){p.canTrigger&&Object.prototype.hasOwnProperty.call(this._data.timedAc.h,a+"s")&&p.parser.run(this._data.timedAc.h[a+"s"])},onClick:function(a){if(p.canTrigger)if(p.mode!="editor")this._data.action!=""&&(a!=null&&(this.lastClick=this.globalToLocal(new Qa(a.stageX,a.stageY))),p.parser.run(this._data.action));else if(this._onSelect(this._name),p.callback!=null){a=p.callback;var b=new aa;b.h.nm=this._name;a("selectimage",b)}},onMouseOver:function(a){p.cursorVisible&&
(p.mode=="editor"||this._data.action==""||p.mdata.highlightInt==null||p.isMobile()||this._imCurrent.set_filters(this._imOther.set_filters([new Zd(p.mdata.highlightInt,1,4,4,255,1,!0)])));p.canTrigger&&p.mode!="editor"&&this._data.actionover!=""&&p.parser.run(this._data.actionover)},onTargetOver:function(){p.canTrigger&&p.mode!="editor"&&this._data.actionover!=""&&p.parser.run(this._data.actionover)},onMouseOut:function(a){this._imCurrent.set_filters(this._imOther.set_filters([]))},dragImageStart:function(){p.mode==
"editor"&&(this._dragging=!0,this.startDrag())},finishDrag:function(){this._dragging&&(this._dragging=!1,this.stopDrag())},updateInstance:function(){t.displayType=="portrait"?(p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.x=this.get_x(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.y=this.get_y(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.width=this.get_displayWidth(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.height=
this.get_displayHeight()):(p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.x=this.get_x(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.y=this.get_y(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.width=this.get_displayWidth(),p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.height=this.get_displayHeight());t.history.addState(t.ln.get("rightbar-history-move"));t.history.updateProperties()},setDescWidth:function(a){t.displayType==
"portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.width=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.width=a},setDescHeight:function(a){t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical.height=a:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal.height=a},getCurrentNum:function(a){var b=t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:
p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "alpha":return b.alpha;case "coloralpha":return b.colorAlpha;case "height":return b.height;case "order":return b.order;case "rotation":return b.rotation;case "textleading":return b.textLeading;case "textsize":return b.textSize;case "textspacing":return b.textSpacing;case "volume":return b.volume;case "width":return b.width;case "x":return b.x;case "y":return b.y;default:return 0}},getCurrentStr:function(a){var b=
t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "asset":return this._asset;case "blend":return b.blend;case "collection":return this._collection;case "color":return b.color;case "instance":return this._name;case "textalign":return b.textAlign;case "textbackground":return b.textBackground;case "textcolor":return b.textColor;case "textfont":return b.textFont;default:return""}},
getCurrentBool:function(a){var b=t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "blur":return b.blur.length==2;case "dropshadow":return b.dropshadow.length==8;case "glow":return b.glow.length==5;case "textbold":return b.textBold;case "textitalic":return b.textItalic;case "visible":return b.visible;default:return!1}},getCurrentArr:function(a){var b=t.displayType==
"portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].horizontal;switch(a){case "blur":return b.blur.length==2?b.blur:["4","4"];case "dropshadow":return b.dropshadow.length==8?b.dropshadow:"1 45 0x000000 1 4 4 1 0".split(" ");case "glow":return b.glow.length==5?b.glow:["0xFFFFFF","1","6","1","0"];default:return[]}},getInstName:function(){return this._name},setSound:function(a,b){b==null&&(b=0);this._imCurrent.iterateSound(a,
b)},playOnLoad:function(){var a=p.movie.scene.keyframes[p.area.get_currentKf()];return Object.prototype.hasOwnProperty.call(a.h,this._name)?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].playOnLoad:!1},focus:function(){var a=p.movie.scene.keyframes[p.area.get_currentKf()];return Object.prototype.hasOwnProperty.call(a.h,this._name)?p.movie.scene.keyframes[p.area.get_currentKf()].h[this._name].focus:!0},__class__:Bi,__properties__:I(za.prototype.__properties__,{get_transition:"get_transition",
get_displayHeight:"get_displayHeight",get_displayWidth:"get_displayWidth",get_currentMedia:"get_currentMedia",get_currentType:"get_currentType",get_playing:"get_playing"})});var qj=function(){this._fixed=[];this.horizontal=new Zc([]);this.vertical=new Zc([]);this.horizontal.ok=this.vertical.ok=!0};r["com.tilbuci.display.ImageSet"]=qj;qj.__name__="com.tilbuci.display.ImageSet";qj.prototype={_fixed:null,horizontal:null,vertical:null,load:function(a,b){this.setProp("order",a.order,b.order);this.setProp("x",
a.x,b.x);this.setProp("y",a.y,b.y);this.setProp("alpha",a.alpha,b.alpha);this.setProp("width",a.width,b.width);this.setProp("height",a.height,b.height);this.setProp("rotation",a.rotation,b.rotation);this.setProp("visible",a.visible,b.visible);this.setProp("color",a.color,b.color);this.setProp("blend",a.blend,b.blend);this.setProp("colorAlpha",a.colorAlpha,b.colorAlpha);this.setProp("volume",a.volume,b.volume);this.setProp("pan",a.pan,b.pan);this.setProp("blur",a.blur,b.blur);this.setProp("dropshadow",
a.dropshadow,b.dropshadow);this.setProp("glow",a.glow,b.glow);this.setProp("textFont",a.textFont,b.textFont);this.setProp("textSize",a.textSize,b.textSize);this.setProp("textColor",a.textColor,b.textColor);this.setProp("textBold",a.textBold,b.textBold);this.setProp("textItalic",a.textItalic,b.textItalic);this.setProp("textLeading",a.textLeading,b.textLeading);this.setProp("textSpacing",a.textSpacing,b.textSpacing);this.setProp("textBackground",a.textBackground,b.textBackground);this.setProp("textAlign",
a.textAlign,b.textAlign)},setProp:function(a,b,c){if(this.isFixed(a))return!1;switch(a){case "alpha":this.horizontal.alpha=b;this.vertical.alpha=c;break;case "blend":this.horizontal.blend=b;this.vertical.blend=c;break;case "blur":this.horizontal.blur=b;this.vertical.blur=c;break;case "color":this.horizontal.color=b;this.vertical.color=c;break;case "colorAlpha":this.horizontal.colorAlpha=b;this.vertical.colorAlpha=c;break;case "dropshadow":this.horizontal.dropshadow=b;this.vertical.dropshadow=c;break;
case "glow":this.horizontal.glow=b;this.vertical.glow=c;break;case "height":this.horizontal.height=b;this.vertical.height=c;break;case "order":this.horizontal.order=b;this.vertical.order=c;break;case "pan":this.horizontal.pan=b;this.vertical.pan=c;break;case "rotation":this.horizontal.rotation=b;this.vertical.rotation=c;break;case "textAlign":this.horizontal.textAlign=b;this.vertical.textAlign=c;break;case "textBackground":this.horizontal.textBackground=b;this.vertical.textBackground=c;break;case "textBold":this.horizontal.textBold=
b;this.vertical.textBold=c;break;case "textColor":this.horizontal.textColor=b;this.vertical.textColor=c;break;case "textFont":this.horizontal.textFont=b;this.vertical.textFont=c;break;case "textItalic":this.horizontal.textItalic=b;this.vertical.textItalic=c;break;case "textLeading":this.horizontal.textLeading=b;this.vertical.textLeading=c;break;case "textSize":this.horizontal.textSize=b;this.vertical.textSize=c;break;case "textSpacing":this.horizontal.textSpacing=b;this.vertical.textSpacing=c;break;
case "visible":this.horizontal.visible=b;this.vertical.visible=c;break;case "volume":this.horizontal.volume=b;this.vertical.volume=c;break;case "width":this.horizontal.width=b;this.vertical.width=c;break;case "x":this.horizontal.x=b;this.vertical.x=c;break;case "y":this.horizontal.y=b,this.vertical.y=c}return!0},isFixed:function(a){return this._fixed.indexOf(a)!=-1},fixProp:function(a,b,c){this.isFixed(a)||this._fixed.push(a);switch(a){case "alpha":this.horizontal.alpha=b;this.vertical.alpha=c;break;
case "blend":this.horizontal.blend=b;this.vertical.blend=c;break;case "blur":this.horizontal.blur=b;this.vertical.blur=c;break;case "color":this.horizontal.color=b;this.vertical.color=c;break;case "colorAlpha":this.horizontal.colorAlpha=b;this.vertical.colorAlpha=c;break;case "dropshadow":this.horizontal.dropshadow=b;this.vertical.dropshadow=c;break;case "glow":this.horizontal.glow=b;this.vertical.glow=c;break;case "height":this.horizontal.height=b;this.vertical.height=c;break;case "order":this.horizontal.order=
b;this.vertical.order=c;break;case "pan":this.horizontal.pan=b;this.vertical.pan=c;break;case "rotation":this.horizontal.rotation=b;this.vertical.rotation=c;break;case "textAlign":this.horizontal.textAlign=b;this.vertical.textAlign=c;break;case "textBackground":this.horizontal.textBackground=b;this.vertical.textBackground=c;break;case "textBold":this.horizontal.textBold=b;this.vertical.textBold=c;break;case "textColor":this.horizontal.textColor=b;this.vertical.textColor=c;break;case "textFont":this.horizontal.textFont=
b;this.vertical.textFont=c;break;case "textItalic":this.horizontal.textItalic=b;this.vertical.textItalic=c;break;case "textLeading":this.horizontal.textLeading=b;this.vertical.textLeading=c;break;case "textSize":this.horizontal.textSize=b;this.vertical.textSize=c;break;case "textSpacing":this.horizontal.textSpacing=b;this.vertical.textSpacing=c;break;case "visible":this.horizontal.visible=b;this.vertical.visible=c;break;case "volume":this.horizontal.volume=b;this.vertical.volume=c;break;case "width":this.horizontal.width=
b;this.vertical.width=c;break;case "x":this.horizontal.x=b;this.vertical.x=c;break;case "y":this.horizontal.y=b,this.vertical.y=c}},releaseProp:function(a){this.isFixed(a)&&X.remove(this._fixed,a)},releaseAll:function(){for(;this._fixed.length>0;)this._fixed.shift()},kill:function(){for(;this._fixed.length>0;)this._fixed.shift();this._fixed=null;this.horizontal.kill();this.horizontal=null;this.vertical.kill();this.vertical=null},__class__:qj};var Sd=function(){this._updating="";za.call(this);this._borders=
new zd;this.addChild(this._borders);this._move=new za;new cg;this.addChild(this._move);this._resizeH=new za;this.addChild(this._resizeH);this._resizeV=new za;this.addChild(this._resizeV);this._resize=new za;this.addChild(this._resize);this._stagepos=new Qa;this.set_visible(!1)};r["com.tilbuci.display.InstanceSelect"]=Sd;Sd.__name__="com.tilbuci.display.InstanceSelect";Sd.__super__=za;Sd.prototype=I(za.prototype,{image:null,_move:null,_resizeH:null,_resizeV:null,_resize:null,_borders:null,_limits:null,
_stagepos:null,_updating:null,stg:null,setInstance:function(a){this.image=a;this.place();this.set_visible(!0);this._move.addEventListener("mouseDown",m(this,this.onMoveStart));this._resizeH.addEventListener("mouseDown",m(this,this.onResizeHStart));this._resizeV.addEventListener("mouseDown",m(this,this.onResizeVStart));this._resize.addEventListener("mouseDown",m(this,this.onResizeStart))},clearInstance:function(){this.image=null;this.set_visible(!1);this.set_x(this.set_y(0));if(this._move.hasEventListener("mouseDown"))try{this._move.removeEventListener("mouseDown",
m(this,this.onMoveStart))}catch(a){}if(this._resizeH.hasEventListener("mouseDown"))try{this._resizeH.removeEventListener("mouseDown",m(this,this.onResizeHStart))}catch(a){}if(this._resizeV.hasEventListener("mouseDown"))try{this._resizeV.removeEventListener("mouseDown",m(this,this.onResizeVStart))}catch(a){}if(this._resize.hasEventListener("mouseDown"))try{this._resize.removeEventListener("mouseDown",m(this,this.onResizeStart))}catch(a){}if(this.stg!=null&&this.stg.hasEventListener("mouseMove")){try{this.stg.removeEventListener("mouseMove",
m(this,this.onMove))}catch(a){}this.stg=null}},setAsPrecache:function(){var a=this.image,b=p.movie.scene.keyframes[p.area.get_currentKf()],c=this.image.getInstName();a.set_x(b.h[c].horizontal.x=-100);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_y(b.h[c].horizontal.y=-100);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_width(b.h[c].horizontal.width=5);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];
c=this.image.getInstName();a.set_height(b.h[c].horizontal.height=5);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_alpha(b.h[c].horizontal.alpha=0);b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].horizontal.volume=0;this.image.setSound(0);a=this.image;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();a.set_visible(b.h[c].horizontal.visible=!1);b=p.movie.scene.keyframes[p.area.get_currentKf()];
c=this.image.getInstName();b.h[c].vertical.x=-100;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.y=-100;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.width=5;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.height=5;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.alpha=0;b=p.movie.scene.keyframes[p.area.get_currentKf()];
c=this.image.getInstName();b.h[c].vertical.volume=0;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].vertical.visible=!1;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this.image.getInstName();b.h[c].playOnLoad=!1;this.place()},setCurrentNum:function(a,b){if(t.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),
c=c.h[d].horizontal;switch(a){case "alpha":c.alpha=this.image.set_alpha(b);break;case "coloralpha":c.colorAlpha=b;ua.transform(this.image,.01).color(L.parseInt(c.color),c.colorAlpha);break;case "height":a=c.height=b;if(this.image.get_transition()=="top"||this.image.get_transition()=="bottom")a=b;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),a);this.image.set_height(a);break;case "rotation":c.rotation=Math.round(b);this.image.set_rotation(b);
break;case "textleading":c.textLeading=Math.round(b);break;case "textsize":c.textSize=Math.round(b);break;case "textspacing":c.textSpacing=b;break;case "volume":c.volume=b;this.image.setSound(b);break;case "width":a=c.width=b;if(this.image.get_transition()=="right"||this.image.get_transition()=="left")a=b;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(a,this.image.get_height());this.image.set_width(a);break;case "x":c.x=this.image.set_x(b);
break;case "y":c.y=this.image.set_y(b)}this.place()},setCurrentStr:function(a,b){if(t.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "asset":b=b.split("|:|");c=p.movie.scene.keyframes[p.area.get_currentKf()];d=this.image.getInstName();c.h[d].collection=b[0];c=p.movie.scene.keyframes[p.area.get_currentKf()];
d=this.image.getInstName();c.h[d].asset=b[1];b=this.image;c=p.movie.scene.keyframes[p.area.get_currentKf()];d=this.image.getInstName();b.load(c.h[d]);break;case "blend":c.blend=b;break;case "color":c.color=b;ua.stop(this.image,null,!0);ua.transform(this.image,.01).color(L.parseInt(c.color),c.colorAlpha);break;case "instance":c=this.image.getInstName();p.area.swapInstance(this.image.getInstName(),b)&&(d=p.movie.scene.keyframes[p.area.get_currentKf()].h[c],a=p.movie.scene.keyframes[p.area.get_currentKf()],
Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c],p.movie.scene.keyframes[p.area.get_currentKf()].h[b]=d);break;case "textalign":c.textAlign=b;break;case "textbackground":c.textBackground=b;break;case "textcolor":c.textColor=b;break;case "textfont":c.textFont=b}this.place()},setCurrentBool:function(a,b){if(t.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],
d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "blur":b||(c.blur=[]);break;case "dropshadow":b||(c.dropshadow=[]);break;case "glow":b||(c.glow=[]);break;case "textbold":c.textBold=b;break;case "textitalic":c.textItalic=b;break;case "visible":c.visible=this.image.set_visible(b)}if(a=="blur"||a=="dropshadow"||a=="glow")a=[],c.dropshadow.length==8&&a.push(new il(L.parseInt(c.dropshadow[0]),parseFloat(c.dropshadow[1]),L.parseInt(c.dropshadow[2]),parseFloat(c.dropshadow[3]),parseFloat(c.dropshadow[4]),
parseFloat(c.dropshadow[5]),parseFloat(c.dropshadow[6]),1,c.dropshadow[7]=="1")),c.blur.length==2&&a.push(new Ui(parseFloat(c.blur[0]),parseFloat(c.blur[1]))),c.glow.length==5&&a.push(new Zd(L.parseInt(c.glow[0]),parseFloat(c.glow[1]),L.parseInt(c.glow[2]),L.parseInt(c.glow[2]),L.parseInt(c.glow[3]),1,c.glow[4]=="1")),this.image.set_filters(a);this.place()},setCurrentArray:function(a,b){if(t.displayType=="portrait"){var c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=this.image.getInstName();
c=c.h[d].vertical}else c=p.movie.scene.keyframes[p.area.get_currentKf()],d=this.image.getInstName(),c=c.h[d].horizontal;switch(a){case "blur":c.blur=b.length==2?b:[];break;case "dropshadow":c.dropshadow=b.length==8?b:[];break;case "glow":c.glow=b.length==5?b:[]}this.place()},applyText:function(){if(t.displayType=="portrait"){var a=p.movie.scene.keyframes[p.area.get_currentKf()];var b=this.image.getInstName();a=a.h[b].vertical}else a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this.image.getInstName(),
a=a.h[b].horizontal;this.image.formatText(a.textFont,a.textSize,a.textColor,a.textBold,a.textItalic,a.textLeading,a.textSpacing,a.textBackground,a.textAlign)},place:function(){this.image!=null&&(this.set_x(this.image.get_x()),this.set_y(this.image.get_y()),this._borders.get_graphics().clear(),this._borders.get_graphics().lineStyle(2,0),this._borders.get_graphics().drawRect(0,0,this.image.get_displayWidth(),this.image.get_displayHeight()),this._borders.get_graphics().lineStyle(2,16777215),this._borders.get_graphics().drawRect(2,
2,this.image.get_displayWidth()-4,this.image.get_displayHeight()-4),this.set_rotation(this.image.get_rotation()),this.image.get_displayWidth()<=this._limits.x||this.image.get_displayHeight()<=this._limits.y?(this._move.set_visible(!0),this._resizeH.set_visible(!1),this._resizeV.set_visible(!1),this._resize.set_visible(!1)):(this._move.set_visible(!0),this._resizeH.set_visible(!0),this._resizeV.set_visible(!0),this._resize.set_visible(!0),this._resizeH.set_x(this.image.get_displayWidth()-this._resizeH.get_width()),
this._resizeH.set_y((this.image.get_displayHeight()-this._resizeH.get_height())/2),this._resizeV.set_y(this.image.get_displayHeight()-this._resizeH.get_height()),this._resizeV.set_x((this.image.get_displayWidth()-this._resizeH.get_width())/2),this._resize.set_x(this.image.get_displayWidth()-this._resize.get_width()),this._resize.set_y(this.image.get_displayHeight()-this._resize.get_height())))},endPropSet:function(){this.image!=null&&(this._updating=="move"&&this.image.finishDrag(),this._updating=
"",this.place(),this.stg!=null&&this.stg.hasEventListener("mouseMove")&&(this.stg.removeEventListener("mouseMove",m(this,this.onMove)),this.stg=null),this.image.updateInstance())},onMoveStart:function(a){this.image!=null&&(t.history.states.length==0&&t.history.addState(t.ln.get("rightbar-history-original")),this._updating="move",this.image.dragImageStart(),this.stage.addEventListener("mouseMove",m(this,this.onMove)))},onResizeHStart:function(a){this.image!=null&&(t.history.states.length==0&&t.history.addState(t.ln.get("rightbar-history-original")),
this._updating="resizeh",this._stagepos.x=this.getBounds(this.stage).x,a=this.image.get_width(),this._stagepos.y=a/this.getBounds(this.stage).width,this.stage.addEventListener("mouseMove",m(this,this.onMove)))},onResizeVStart:function(a){this.image!=null&&(t.history.states.length==0&&t.history.addState(t.ln.get("rightbar-history-original")),this._updating="resizev",this._stagepos.x=this.getBounds(this.stage).y,a=this.image.get_height(),this._stagepos.y=a/this.getBounds(this.stage).height,this.stage.addEventListener("mouseMove",
m(this,this.onMove)))},onResizeStart:function(a){this.image!=null&&(t.history.states.length==0&&t.history.addState(t.ln.get("rightbar-history-original")),this._updating="resize",this._stagepos.x=this.getBounds(this.stage).y,a=this.image.get_height(),this._stagepos.y=a/this.getBounds(this.stage).height,this.stage.addEventListener("mouseMove",m(this,this.onMove)),this.stg=this.stage)},onMove:function(a){if(this.image!=null)switch(this._updating){case "move":this.set_x(this.image.get_x());this.set_y(this.image.get_y());
break;case "resize":a=(a.stageX-this._stagepos.x)*this._stagepos.y;var b=a*this.image.oHeight()/this.image.oWidth();if(a>this._limits.x&&b>this._limits.y){var c=a;if(this.image.get_transition()=="right"||this.image.get_transition()=="left")c=a*2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(c,this.image.get_height());this.image.set_width(a);this.image.setDescWidth(c);c=b;if(this.image.get_transition()=="top"||this.image.get_transition()=="bottom")c=
b/2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),c);this.image.set_height(b);this.image.setDescHeight(c);this.place()}break;case "resizeh":a=(a.stageX-this._stagepos.x)*this._stagepos.y;if(a>this._limits.x){c=a;if(this.image.get_transition()=="right"||this.image.get_transition()=="left")c=a*2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(c,this.image.get_height());
this.image.set_width(a);this.image.setDescWidth(c);this.place()}break;case "resizev":if(b=(a.stageY-this._stagepos.x)*this._stagepos.y,b>this._limits.y){c=b;if(this.image.get_transition()=="top"||this.image.get_transition()=="bottom")c=b/2;this.image.get_currentType()!="paragraph"&&this.image.get_currentType()!="html"||this.image.setTextSize(this.image.get_width(),c);this.image.set_height(b);this.image.setDescHeight(c);this.place()}}},__class__:Sd});var rj=function(){this.size=new Qa;this.position=
new Qa;this.instances=[];za.call(this);this.mouseChildren=this.mouseEnabled=!1};r["com.tilbuci.display.MultiSelect"]=rj;rj.__name__="com.tilbuci.display.MultiSelect";rj.__super__=za;rj.prototype=I(za.prototype,{instances:null,position:null,size:null,isAvailable:function(){return this.instances.length>1},clear:function(){for(this.get_graphics().clear();this.instances.length>0;)this.instances.shift();this.position.x=this.position.y=0;this.size.x=this.size.y=0},add:function(a){var b=p.area.pickInstance(a);
b!=null&&(this.get_graphics().lineStyle(2,0,.7),this.get_graphics().beginFill(16777215,.2),this.get_graphics().drawRect(b.get_x(),b.get_y(),b.get_width(),b.get_height()),this.get_graphics().endFill(),this.instances.push(a))},__class__:rj});var Ul=function(a){this._scrollPos=0;lc.call(this,"paragraph",!1,a);this._text=new Jc;this._text.set_selectable(!1);this._format=new qf;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!0);this._text.set_multiline(!0);
this.addChild(this._text)};r["com.tilbuci.display.ParagraphImage"]=Ul;Ul.__name__="com.tilbuci.display.ParagraphImage";Ul.__super__=lc;Ul.prototype=I(lc.prototype,{_text:null,_format:null,_loadTimer:null,_scrollPos:null,setFormat:function(a,b,c,d,f,g,h,l,k){this._format.set_font(a);this._format.set_size(b);this._format.color=L.parseInt(c);this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;switch(k){case "center":this._format.align=0;break;case "justify":this._format.align=
2;break;case "right":this._format.align=4;break;default:this._format.align=3}this._text.set_defaultTextFormat(this._format);l==""?this._text.set_background(!1):(this._text.set_backgroundColor(L.parseInt(l)),this._text.set_background(!0))},getProp:function(a){switch(a){case "fontLeading":return this._format.leading*1;case "fontSize":return this._format.size*1;case "fontSpacing":return this._format.letterSpacing;default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._format.bold;
case "fontItalic":return this._format.italic;default:return!1}},getStringlProp:function(a){switch(a){case "font":return this._format.font;case "fontColor":return"0x"+Z.hex(this._format.color);default:return""}},setTextSize:function(a,b){this._text.set_width(this.oWidth=a);this._text.set_height(this.oHeight=b);this._text.set_scrollV(this._scrollPos)},textScroll:function(a){switch(a){case -1:this._scrollPos>0&&(this._scrollPos=this._text.set_scrollV(this._scrollPos-1));break;case 0:this._scrollPos=
this._text.set_scrollV(0);break;case 1:this._scrollPos<this._text.get_maxScrollV()&&(this._scrollPos=this._text.set_scrollV(this._scrollPos+1));break;case 2:this._scrollPos=this._text.set_scrollV(this._text.get_maxScrollV())}},setText:function(a){a=p.parser.parseString(a);this._text.set_text(a);this._scrollPos=this._text.set_scrollV(0)},updateText:function(){this._text.set_text(p.parser.parseString(this._text.get_text()))},getText:function(){return this._text.get_text()},load:function(a){this._lastMedia=
a=p.parser.parseString(a);this._text.set_text(a);this._text.set_scrollV(this._scrollPos=0);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(b){}this._loadTimer=null}this._loadTimer=new rd(100);this._loadTimer.run=m(this,this.onOk)},kill:function(){lc.prototype.kill.call(this);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._format=this._text=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this.oWidth=
this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},__class__:Ul});var Vc=function(a){lc.call(this,"picture",!1,a);this._lastMedia="";this._loader=new Gf;this._loader.contentLoaderInfo.addEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError));this.addChild(this._loader)};r["com.tilbuci.display.PictureImage"]=Vc;Vc.__name__=
"com.tilbuci.display.PictureImage";Vc.__super__=lc;Vc.prototype=I(lc.prototype,{_loader:null,load:function(a){a=Z.replace(a,p.path+"media/picture/","");this._mediaLoaded=!1;this._lastMedia=a;a=p.parser.parsePath(p.path+"media/picture/"+a);this._loader.load(new Ve(a))},unload:function(){this._mediaLoaded=!1;this._lastMedia="";try{this._loader.unload()}catch(a){}},kill:function(){lc.prototype.kill.call(this);try{this._loader.unload()}catch(a){}this._loader.contentLoaderInfo.removeEventListener("complete",
m(this,this.onOk));this._loader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.removeEventListener("securityError",m(this,this.onError));this._lastMedia=this._loader=null},onOk:function(a){this.oWidth=this._loader.content.get_width();this.oHeight=this._loader.content.get_height();this._mediaLoaded=this._loader.content.smoothing=!0;this._onLoad!=null&&this._onLoad(!0)},onError:function(a){this._lastMedia="";this._mediaLoaded=!1;this._onLoad!=null&&
this._onLoad(!1)},__class__:Vc});var Vl=function(a){lc.call(this,"shape",!1,a);this._shape=new zd;this.addChild(this._shape)};r["com.tilbuci.display.ShapeImage"]=Vl;Vl.__name__="com.tilbuci.display.ShapeImage";Vl.__super__=lc;Vl.prototype=I(lc.prototype,{_shape:null,_loadTimer:null,load:function(a){this._shape.set_rotation(0);this._shape.set_x(0);this._shape.set_y(0);this._shape.get_graphics().clear();var b=mb.jsonParse(a);if(b==0)a=!1;else if(Object.prototype.hasOwnProperty.call(b,"type")&&Object.prototype.hasOwnProperty.call(b,
"color")&&Object.prototype.hasOwnProperty.call(b,"alpha")&&Object.prototype.hasOwnProperty.call(b,"border")&&Object.prototype.hasOwnProperty.call(b,"bdcolor")&&Object.prototype.hasOwnProperty.call(b,"bdalpha")&&Object.prototype.hasOwnProperty.call(b,"rotation")){this._shape.get_graphics().beginFill(0,0);this._shape.get_graphics().drawRect(0,0,256,256);this._shape.get_graphics().endFill();this._shape.get_graphics().beginFill(L.parseInt(A.field(b,"color")),A.field(b,"alpha"));A.field(b,"border")>0?
this._shape.get_graphics().lineStyle(A.field(b,"border"),L.parseInt(A.field(b,"bdcolor")),A.field(b,"bdalpha")):(b.border=.2,this._shape.get_graphics().lineStyle(.2,L.parseInt(A.field(b,"color")),A.field(b,"alpha")));switch(A.field(b,"type")){case "circle":this._shape.get_graphics().drawCircle(128,128,128-2*A.field(b,"border"));a=!0;break;case "decagon":this._shape.get_graphics().moveTo(87,6);this._shape.get_graphics().lineTo(169,6);this._shape.get_graphics().lineTo(231,53);this._shape.get_graphics().lineTo(256-
A.field(b,"border")/2,128);this._shape.get_graphics().lineTo(231,203);this._shape.get_graphics().lineTo(169,250);this._shape.get_graphics().lineTo(87,250);this._shape.get_graphics().lineTo(25,203);this._shape.get_graphics().lineTo(A.field(b,"border")/2,128);this._shape.get_graphics().lineTo(25,53);this._shape.get_graphics().lineTo(87,6);a=!0;break;case "eneagon":this._shape.get_graphics().moveTo(128,3);this._shape.get_graphics().lineTo(210,34);this._shape.get_graphics().lineTo(256-A.field(b,"border")/
2,110);this._shape.get_graphics().lineTo(239,196);this._shape.get_graphics().lineTo(173,253);this._shape.get_graphics().lineTo(83,253);this._shape.get_graphics().lineTo(17,196);this._shape.get_graphics().lineTo(A.field(b,"border")/2,110);this._shape.get_graphics().lineTo(46,34);this._shape.get_graphics().lineTo(128,3);a=!0;break;case "heptagon":this._shape.get_graphics().moveTo(128,3);this._shape.get_graphics().lineTo(228,54);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,165);this._shape.get_graphics().lineTo(183,
253);this._shape.get_graphics().lineTo(73,253);this._shape.get_graphics().lineTo(A.field(b,"border")/2,165);this._shape.get_graphics().lineTo(28,54);this._shape.get_graphics().lineTo(128,3);a=!0;break;case "hexagon":this._shape.get_graphics().moveTo(65,0);this._shape.get_graphics().lineTo(191,0);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,108);this._shape.get_graphics().lineTo(191,216);this._shape.get_graphics().lineTo(65,216);this._shape.get_graphics().lineTo(A.field(b,"border")/
2,108);this._shape.get_graphics().lineTo(65,0);a=!0;break;case "isoscelestriangle":this._shape.get_graphics().moveTo(128,A.field(b,"border")/2);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(A.field(b,"border")/2,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(128,A.field(b,"border")/2);a=!0;break;case "octagon":this._shape.get_graphics().moveTo(75,A.field(b,"border")/2);this._shape.get_graphics().lineTo(181,A.field(b,
"border")/2);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,75);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,181);this._shape.get_graphics().lineTo(181,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(75,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(A.field(b,"border")/2,181);this._shape.get_graphics().lineTo(A.field(b,"border")/2,75);this._shape.get_graphics().lineTo(75,A.field(b,"border")/2);a=!0;break;case "pentagon":this._shape.get_graphics().moveTo(128,
A.field(b,"border")/2);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,98);this._shape.get_graphics().lineTo(206,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(50,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(A.field(b,"border")/2,98);this._shape.get_graphics().lineTo(128,A.field(b,"border")/2);a=!0;break;case "righttriangle":this._shape.get_graphics().moveTo(A.field(b,"border")/2,A.field(b,"border")/2);this._shape.get_graphics().lineTo(256-A.field(b,"border")/
2,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(A.field(b,"border")/2,256-A.field(b,"border")/2);this._shape.get_graphics().lineTo(A.field(b,"border")/2,A.field(b,"border")/2);a=!0;break;case "square":this._shape.get_graphics().drawRect(A.field(b,"border")/2,A.field(b,"border")/2,256-2*A.field(b,"border"),256-2*A.field(b,"border"));a=!0;break;case "triangle":this._shape.get_graphics().moveTo(128,0);this._shape.get_graphics().lineTo(256-A.field(b,"border")/2,220);this._shape.get_graphics().lineTo(A.field(b,
"border")/2,220);this._shape.get_graphics().lineTo(128,0);a=!0;break;default:a=!1}this._shape.get_graphics().endFill();this._shape.set_rotation(A.field(b,"rotation"));b=this._shape.getBounds(this);this._shape.set_x(-b.x);this._shape.set_y(-b.y);this.oWidth=b.width;this.oHeight=b.height}else a=!1;if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(c){}this._loadTimer=null}this._loadTimer=new rd(100);this._loadTimer.run=a?m(this,this.onOk):m(this,this.onError)},kill:function(){lc.prototype.kill.call(this);
if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._shape.get_graphics().clear();this._shape=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._onLoad(!0)},onError:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._onLoad(!1)},__class__:Vl});var Oj=function(a){this._display=[];this._current=0;this.playOnLoad=this._warn=!0;this.frtime=100;this.frames=
1;lc.call(this,"spritemap",!1,a);this._loader=new Gf;this._loader.contentLoaderInfo.addEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError))};r["com.tilbuci.display.SpritemapImage"]=Oj;Oj.__name__="com.tilbuci.display.SpritemapImage";Oj.__super__=lc;Oj.prototype=I(lc.prototype,{frames:null,frtime:null,playOnLoad:null,_loader:null,_warn:null,_current:null,
_timer:null,_display:null,load:function(a){this._lastMedia=a=Z.replace(a,p.path+"media/spritemap/","");this._mediaLoaded=!1;if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}for(this.removeChildren();this._display.length>0;)this._display.shift().get_bitmapData().dispose();a=p.parser.parsePath(p.path+"media/spritemap/"+a);this._loader.load(new Ve(a))},unload:function(){this._mediaLoaded=!1;this._lastMedia="";try{this._loader.unload()}catch(a){}if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=
null}},kill:function(){lc.prototype.kill.call(this);try{this._loader.unload()}catch(a){}this._loader.contentLoaderInfo.removeEventListener("complete",m(this,this.onOk));this._loader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError));this._loader.contentLoaderInfo.removeEventListener("securityError",m(this,this.onError));for(this._loader=null;this._display.length>0;)this._display.shift().get_bitmapData().dispose();this._display=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=
null}},updateFrames:function(a,b){this._mediaLoaded&&(this.frames=a,this.frtime=b,this._warn=!1,this.load(this._lastMedia))},onOk:function(a){if(this._timer!=null){try{this._timer.stop()}catch(f){}this._timer=null}this._mediaLoaded=!0;this.oWidth=this._loader.content.get_width()/this.frames;this.oHeight=this._loader.content.get_height();a=0;for(var b=this.frames;a<b;){var c=a++,d=new uc(Math.ceil(this.oWidth),Math.ceil(this.oHeight),!0,0);d.draw(this._loader,new S(1,0,0,1,-c*this.oWidth,0),null,null,
new Ea(0,0,this.oWidth,this.oHeight));c=new cg(d);c.smoothing=!0;this._display.push(c)}this._loader.unload();this._current=0;this.loadFrame();this._warn&&this._onLoad!=null&&this._onLoad(!0);this.playOnLoad&&(this._timer=new rd(this.frtime),this._timer.run=m(this,this.nextFrame));this._warn=!0},pause:function(){this.playOnLoad=!1;if(this._timer!=null)try{this._timer.stop(),this._timer=null}catch(a){}},play:function(){this.pause();this.playOnLoad=!0;this._timer=new rd(this.frtime);this._timer.run=
m(this,this.nextFrame)},setFrame:function(a){return a>0&&a<=this.frames?(this.pause(),this._current=a-1,this.loadFrame(),!0):!1},loadFrame:function(){this.removeChildren();this.addChild(this._display[this._current])},nextFrame:function(){this._current++;this._current>=this.frames&&(this._current=0);this.loadFrame()},onError:function(a){this._warn=!0;this._mediaLoaded=!1;this._onLoad!=null&&this._onLoad(!1)},__class__:Oj});var Wl=function(a){lc.call(this,"text",!1,a);this._text=new Jc;this._text.set_selectable(!1);
this._format=new qf;this._format.align=3;this._text.set_defaultTextFormat(this._format);this._text.set_wordWrap(!1);this._text.set_multiline(!1);this._text.set_embedFonts(!0);this._text.set_cacheAsBitmap(!0);this.addChild(this._text)};r["com.tilbuci.display.TextImage"]=Wl;Wl.__name__="com.tilbuci.display.TextImage";Wl.__super__=lc;Wl.prototype=I(lc.prototype,{_text:null,_format:null,_loadTimer:null,setFormat:function(a,b,c,d,f,g,h,l){this._format.set_font(a);this._format.set_size(b);this._format.color=
L.parseInt(c);this._format.set_bold(d);this._format.set_italic(f);this._format.leading=g;this._format.letterSpacing=h;this._text.set_defaultTextFormat(this._format);l==""?this._text.set_background(!1):(this._text.set_backgroundColor(L.parseInt(l)),this._text.set_background(!0))},getText:function(){return this._text.get_text()},load:function(a){a=a.split("\r").join("");a=p.parser.parseString(a);var b=0;this._format.align=3;this._text.set_autoSize(1);for(var c=0,d=a.length;c<d;){var f=c++;this._text.set_text(a.charAt(f).toUpperCase());
f=this._text.getLineMetrics(0);b+=f.width}this._format.align=0;this._text.set_autoSize(2);this._text.set_width(b-a.length*.4);this._text.set_text(a);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(g){}this._loadTimer=null}this._loadTimer=new rd(100);this._loadTimer.run=m(this,this.onOk)},kill:function(){lc.prototype.kill.call(this);if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=null}this._format=this._text=null},onOk:function(){if(this._loadTimer!=null){try{this._loadTimer.stop()}catch(a){}this._loadTimer=
null}this.oWidth=this._text.get_width();this.oHeight=this._text.get_height();this._onLoad(!0)},__class__:Wl});var Qf=function(a,b,c){this._useTimer=this._playing=!1;this._name="";this._loadOK=!1;this.assetOrder=this._oWidth=this._oHeight=0;this._currentAction="";this._currentTime=0;this._totalTime=1;za.call(this);this._onLoad=a;this.get_graphics().beginFill(0,0);this.get_graphics().drawRect(0,0,8,8);this.get_graphics().endFill();this._name=b;this._onTimedAc=c;this._picture=new Vc(m(this,this.onLoad));
this.addChild(this._picture);this._video=new Zh(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._video);this._audio=new Pj(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._audio);this._text=new Wl(m(this,this.onLoad));this.addChild(this._text);this._paragraph=new Ul(m(this,this.onLoad));this.addChild(this._paragraph);this._html=new Xe(m(this,this.onLoad));this.addChild(this._html);this._spritemap=new Oj(m(this,this.onLoad));this.addChild(this._spritemap);this._shape=new Vl(m(this,
this.onLoad));this.addChild(this._shape)};r["com.tilbuci.display.TilBuciImage"]=Qf;Qf.__name__="com.tilbuci.display.TilBuciImage";Qf.__super__=za;Qf.prototype=I(za.prototype,{_picture:null,_video:null,_audio:null,_text:null,_paragraph:null,_html:null,_spritemap:null,_shape:null,_currentType:null,_totalTime:null,_currentTime:null,_currentAction:null,assetOrder:null,_onLoad:null,_oWidth:null,_oHeight:null,_loadOK:null,_name:null,_timer:null,_useTimer:null,playing:null,_playing:null,get_playing:function(){return this._playing},
currentType:null,get_currentType:function(){return this._currentType},currentMedia:null,get_currentMedia:function(){switch(this._currentType){case "audio":return this._audio.get_lastMedia();case "paragraph":return this._paragraph.get_lastMedia();case "picture":return this._picture.get_lastMedia();case "spritemap":return this._spritemap.get_lastMedia();case "video":return this._video.get_lastMedia();default:return""}},_onTimedAc:null,load:function(a){if(a.ok){switch(p.movie.collections.h[a.collection].assets.h[a.asset].type){case "audio":this._audio.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+
p.multiply]);this._currentType="audio";this._useTimer=!1;break;case "html":this._html.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="html";this._useTimer=!0;break;case "paragraph":this._paragraph.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="paragraph";this._useTimer=!0;break;case "picture":this._picture.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType=
"picture";this._useTimer=!0;break;case "shape":this._shape.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="shape";this._useTimer=!0;break;case "spritemap":this._spritemap.frames=p.movie.collections.h[a.collection].assets.h[a.asset].frames;this._spritemap.frtime=p.movie.collections.h[a.collection].assets.h[a.asset].frtime;this._spritemap.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="spritemap";
this._useTimer=!0;break;case "text":this._text.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]);this._currentType="text";this._useTimer=!0;break;case "video":this._video.load(p.movie.collections.h[a.collection].assets.h[a.asset].file.h["@"+p.multiply]),this._currentType="video",this._useTimer=!1}this._totalTime=p.movie.collections.h[a.collection].assets.h[a.asset].time;this._currentAction=p.movie.collections.h[a.collection].assets.h[a.asset].action;this.assetOrder=
p.movie.collections.h[a.collection].assets.h[a.asset].order;this._loadOK=!1;return!0}return this._loadOK=!1},loadAsset:function(a){switch(a.type){case "audio":this._audio.load(a.file.h["@"+p.multiply]);this._currentType="audio";this._useTimer=!1;break;case "html":this._html.load(a.file.h["@"+p.multiply]);this._currentType="html";this._useTimer=!0;break;case "paragraph":this._paragraph.load(a.file.h["@"+p.multiply]);this._currentType="paragraph";this._useTimer=!0;break;case "picture":this._picture.load(a.file.h["@"+
p.multiply]);this._currentType="picture";this._useTimer=!0;break;case "shape":this._shape.load(a.file.h["@"+p.multiply]);this._currentType="shape";this._useTimer=!0;break;case "spritemap":this._spritemap.frames=a.frames;this._spritemap.frtime=a.frtime;this._spritemap.load(a.file.h["@"+p.multiply]);this._currentType="spritemap";this._useTimer=!0;break;case "text":this._text.load(a.file.h["@"+p.multiply]);this._currentType="text";this._useTimer=!0;break;case "video":this._video.load(a.file.h["@"+p.multiply]),
this._currentType="video",this._useTimer=!1}this._totalTime=a.time;this._currentAction=a.action;this.assetOrder=a.order;this._loadOK=!1;return!0},updateFrames:function(a,b){this._currentType=="spritemap"&&this._spritemap.updateFrames(a,b)},startTimer:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._useTimer?(this._currentTime=0,this._loadOK&&(this._timer=new rd(1E3),this._timer.run=m(this,this.onTimer))):this._currentType=="video"?this._video.play():this._currentType==
"audio"&&this._audio.play();this._playing=!0},stopTimer:function(){this._currentTime=0;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}this._video.pause();this._audio.pause();this._playing=!1},getTime:function(){return this._useTimer?this._currentTime:this._currentType=="video"?this._video.getTime():this._currentType=="audio"?this._audio.getTime():0},getProp:function(a){switch(a){case "fontLeading":return this._paragraph.getProp("fontLeading");case "fontSize":return this._paragraph.getProp("fontSize");
case "fontSpacing":return this._paragraph.getProp("fontSpacing");default:return 0}},getBoolProp:function(a){switch(a){case "fontBold":return this._paragraph.getBoolProp("fontBold");case "fontItalic":return this._paragraph.getBoolProp("fontItalic");default:return!1}},getStringProp:function(a){switch(a){case "font":return this._paragraph.getStringlProp("font");case "fontColor":return this._paragraph.getStringlProp("fontColor");case "text":return this._currentType=="text"?this._text.getText():this._currentType==
"paragraph"?this._paragraph.getText():this._currentType=="html"?this._html.getText():"";default:return""}},playPause:function(){if(this._useTimer)if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null;this._playing=!1}else this._timer=new rd(1E3),this._timer.run=m(this,this.onTimer),this._playing=!0;else this._playing?this._currentType=="video"?this._video.pause():this._currentType=="audio"&&this._audio.pause():this._currentType=="video"?this._video.play():this._currentType=="audio"&&
this._audio.play(),this._playing=!this._playing},play:function(){this._useTimer?this._timer==null&&(this._timer=new rd(1E3),this._timer.run=m(this,this.onTimer)):this._currentType=="video"?this._video.play():this._currentType=="audio"&&this._audio.play();this._playing=!0},pause:function(){if(this._useTimer){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}}else this._currentType=="video"?this._video.pause():this._currentType=="audio"&&this._audio.pause();this._playing=!1},stop:function(){if(this._timer!=
null){try{this._timer.stop()}catch(a){}this._timer=null}this._playing=!1;this._currentTime=0;this._video.stop();this._audio.stop()},seek:function(a){a<0&&(a=0);this._useTimer?this._currentTime=a:this._currentType=="video"?this._video.setTime(a):this._currentType=="audio"&&this._audio.setTime(a)},formatText:function(a,b,c,d,f,g,h,l,k){this._text.setFormat(a,b,c,d,f,g,h,l);this._paragraph.setFormat(a,b,c,d,f,g,h,l,k);this._html.setFormat(a,b,c,d,f,g,h,l,k)},setTextSize:function(a,b){this._paragraph.setTextSize(a,
b);this._html.setTextSize(a,b);if(this._currentType=="paragraph"||this._currentType=="html")this._oWidth=a,this._oHeight=b},textScroll:function(a){this._currentType=="paragraph"?this._paragraph.textScroll(a):this._currentType=="html"&&this._html.textScroll(a)},setText:function(a){this._currentType=="paragraph"?this._paragraph.setText(a):this._currentType=="html"&&this._html.setText(a)},updateText:function(){this._currentType=="paragraph"&&this._paragraph.updateText()},iterateSound:function(a,b){this._video.iterateSound(a,
b);this._audio.iterateSound(a,b)},stopSound:function(){this._video.stopSound();this._audio.stopSound()},onTimer:function(){this._currentTime++;this._onTimedAc(this._currentTime);this._currentTime>=this._totalTime&&(this._currentTime=0,this._useTimer&&this.endAction())},onEnd:function(){this._playing=!0;this._currentType=="video"?this._currentAction!="next"&&this._currentAction!="previous"&&this._currentAction!="stop"&&(this._video.setTime(0),this._video.play()):this._currentType=="audio"&&this._currentAction!=
"next"&&this._currentAction!="previous"&&this._currentAction!="stop"&&(this._audio.setTime(0),this._audio.play());this.endAction()},endAction:function(){if(this._currentAction!="")switch(this._currentAction){case "":break;case "loop":break;case "next":p.parser.run('{"ac":"instance.next","param":["'+this._name+'"]}');break;case "previous":p.parser.run('{"ac":"instance.previous","param":["'+this._name+'"]}');break;case "stop":p.parser.run('{"ac":"instance.stop","param":["'+this._name+'"]}');break;default:p.parser.run(this._currentAction)}},
kill:function(){this.removeChildren();this.get_graphics().clear();this._picture.kill();this._picture=null;this._video.kill();this._video=null;this._audio.kill();this._audio=null;this._text.kill();this._text=null;this._paragraph.kill();this._paragraph=null;this._html.kill();this._html=null;this._spritemap.kill();this._spritemap=null;this._shape.kill();this._currentAction=this._currentType=this._onLoad=this._shape=null;if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null;this._playing=
!1}this._onTimedAc=this._name=null},oWidth:function(){return this._oWidth},oHeight:function(){return this._oHeight},loadOK:function(){return this._loadOK},onLoad:function(a){if(a)switch(this._picture.set_visible(!1),this._video.set_visible(!1),this._audio.set_visible(!1),this._text.set_visible(!1),this._paragraph.set_visible(!1),this._html.set_visible(!1),this._spritemap.set_visible(!1),this._shape.set_visible(!1),this.removeChildren(),this._currentType){case "audio":this._audio.set_visible(!0);this._oWidth=
this._audio.set_width(8);this._oHeight=this._audio.set_height(8);this.addChild(this._audio);break;case "html":this._html.set_visible(!0);this._html.set_width(this._oWidth=this._html.oWidth);this._html.set_height(this._oHeight=this._html.oHeight);this._html.set_cacheAsBitmap(!0);this.addChild(this._html);break;case "paragraph":this._paragraph.set_visible(!0);this._paragraph.set_width(this._oWidth=this._paragraph.oWidth);this._paragraph.set_height(this._oHeight=this._paragraph.oHeight);this._paragraph.set_cacheAsBitmap(!0);
this.addChild(this._paragraph);break;case "picture":this._picture.set_visible(!0);this._picture.set_width(this._oWidth=this._picture.oWidth);this._picture.set_height(this._oHeight=this._picture.oHeight);this.addChild(this._picture);break;case "shape":this._shape.set_visible(!0);this._shape.set_width(this._oWidth=this._shape.oWidth);this._shape.set_height(this._oHeight=this._shape.oHeight);this._shape.set_cacheAsBitmap(!0);this.addChild(this._shape);break;case "spritemap":this._spritemap.set_visible(!0);
this._spritemap.set_width(this._oWidth=this._spritemap.oWidth);this._spritemap.set_height(this._oHeight=this._spritemap.oHeight);this._spritemap.set_cacheAsBitmap(!0);this.addChild(this._spritemap);break;case "text":this._text.set_visible(!0);this._text.set_width(this._oWidth=this._text.oWidth);this._text.set_height(this._oHeight=this._text.oHeight);this._text.set_cacheAsBitmap(!0);this.addChild(this._text);break;case "video":this._video.set_visible(!0),this._oWidth=this._video.set_width(this._video.oWidth),
this._oHeight=this._video.set_height(this._video.oHeight),this.addChild(this._video)}this.set_width(this.set_height(p.mdata.screen.big/2*p.multiply));this._loadOK=a;this._onLoad(a)},__class__:Qf,__properties__:I(za.prototype.__properties__,{get_currentMedia:"get_currentMedia",get_currentType:"get_currentType",get_playing:"get_playing"})});var Zh=function(a,b,c){this._lasttime=0;this._current="";this._loaded=!1;lc.call(this,"video",!0,a);this._onEnd=b;this._onTimedAc=c;this._bg=new zd;this._bg.get_graphics().beginFill(0);
this._bg.get_graphics().drawRect(0,0,32,32);this._bg.get_graphics().endFill();this.addChild(this._bg);this._video=new fo;this._video.smoothing=!0;this.addChild(this._video);this._connection=new Vm;this._connection.addEventListener("securityError",m(this,this.securityErrorHandler));this._connection.addEventListener("ioError",m(this,this.ioErrorHandler));this._connection.addEventListener("netStatus",m(this,this.netStatusHandler));this._connection.addEventListener("asyncError",m(this,this.asyncErrorHandler));
this._connection.connect(null);this._stream=new go(this._connection);this._stream.checkPolicyFile=!0;this._stream.addEventListener("asyncError",m(this,this.asyncErrorHandler));this._stream.addEventListener("ioError",m(this,this.ioErrorHandler));this._stream.addEventListener("netStatus",m(this,this.netStatusHandler));a={onMetaData:m(this,this.metadataEvent),onImageData:m(this,this.imagedataEvent),onPlayStatus:m(this,this.playstatusEvent),onCuePoint:m(this,this.cuepointEvent)};this._stream.client=a;
this._video.attachNetStream(this._stream)};r["com.tilbuci.display.VideoImage"]=Zh;Zh.__name__="com.tilbuci.display.VideoImage";Zh.__super__=lc;Zh.prototype=I(lc.prototype,{_video:null,_connection:null,_stream:null,_loaded:null,_bg:null,_onEnd:null,_current:null,_lasttime:null,_onTimedAc:null,getTime:function(){return this._loaded?Math.round(this._stream.time):0},setTime:function(a){this._loaded&&this._stream.seek(a)},load:function(a){this._lastMedia=a=Z.replace(a,p.path+"media/video/","");var b=p.parser.parsePath(p.path+
"media/video/"+a);p.mode=="editor"?(this._loaded=!1,this._current=""):this._current!=a?(this._loaded=!1,this._current=a):(this._loaded=!1,this._stream.seek(0));this._stream.play(b)},iterateSound:function(a,b){ua.transform(this._stream,p.mdata.time).sound(a,null)},stopSound:function(){ua.stop(this._stream)},kill:function(){lc.prototype.kill.call(this);this._bg.get_graphics().clear();this._bg=null;this._video.attachNetStream(null);this._video=null;this._connection.removeEventListener("securityError",
m(this,this.securityErrorHandler));this._connection.removeEventListener("ioError",m(this,this.ioErrorHandler));this._connection.removeEventListener("netStatus",m(this,this.netStatusHandler));this._connection.removeEventListener("asyncError",m(this,this.asyncErrorHandler));this._connection=null;this._stream.client=null;this._stream.removeEventListener("asyncError",m(this,this.asyncErrorHandler));this._stream.removeEventListener("ioError",m(this,this.ioErrorHandler));this._stream.removeEventListener("netStatus",
m(this,this.netStatusHandler));this._onTimedAc=this._current=this._onEnd=this._stream=null},play:function(){this._loaded&&this._stream.resume()},pause:function(){this._loaded&&this._stream.pause()},stop:function(){this._stream.pause();this._stream.seek(0)},unload:function(){this._loaded&&(this._stream.pause(),this._stream.seek(0));this._lastMedia="";this._loaded=!1},netStatusHandler:function(a){switch(a.info.code){case "NetStream.Play.Complete":this._onEnd();break;case "NetStream.Play.Start":this._loaded||
(this._loaded=!0,this._bg.set_width(this._video.set_width(this.oWidth)),this._bg.set_height(this._video.set_height(this.oHeight)),this._onLoad(!0),p.mode=="editor"&&this.stop())}},ioErrorHandler:function(a){this._onLoad(!1)},securityErrorHandler:function(a){this._onLoad(!1)},asyncErrorHandler:function(a){this._onLoad(!1)},metadataEvent:function(a){this.oWidth=a.width;this.oHeight=a.height;p.mode=="editor"&&(this._loaded=!0,this._bg.set_width(this._video.set_width(this.oWidth=a.width)),this._bg.set_height(this._video.set_height(this.oHeight=
a.height)),this._onLoad(!0),this.stop())},imagedataEvent:function(a){},playstatusEvent:function(a){this._stream.time!=null&&this._onTimedAc!=null&&(a=Math.round(this._stream.time),a!=this._lasttime&&(this._lasttime=a,this._onTimedAc(a)))},cuepointEvent:function(a){},__class__:Zh});var ka=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};r["openfl.events.Event"]=ka;ka.__name__="openfl.events.Event";ka.prototype={bubbles:null,cancelable:null,
currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=new ka(this.type,this.bubbles,this.cancelable);a.eventPhase=this.eventPhase;a.target=this.target;a.currentTarget=this.currentTarget;return a},formatToString:function(a,b,c,d,f,g){var h=[];b!=null&&h.push(b);c!=null&&h.push(c);d!=null&&h.push(d);f!=null&&h.push(f);g!=null&&h.push(g);return m(this,this.__formatToString).apply(this,[a,h])},isDefaultPrevented:function(){return this.__preventDefault},
preventDefault:function(){this.cancelable&&(this.__preventDefault=!0)},stopImmediatePropagation:function(){this.__isCanceledNow=this.__isCanceled=!0},stopPropagation:function(){this.__isCanceled=!0},toString:function(){return this.__formatToString("Event",["type","bubbles","cancelable"])},__formatToString:function(a,b){a="["+a;for(var c,d=0;d<b.length;){var f=b[d];++d;c=A.field(this,f);a=typeof c=="string"?a+(" "+f+'="'+L.string(c)+'"'):a+(" "+f+"="+L.string(c))}return a+"]"},__init:function(){this.currentTarget=
this.target=null;this.cancelable=this.bubbles=!1;this.eventPhase=2;this.__preventDefault=this.__isCanceledNow=this.__isCanceled=!1},__class__:ka};var Ag=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);ka.call(this,a,c,d);this.info=b};r["com.tilbuci.event.TilBuciEvent"]=Ag;Ag.__name__="com.tilbuci.event.TilBuciEvent";Ag.__super__=ka;Ag.prototype=I(ka.prototype,{info:null,__class__:Ag});var ih=function(a,b,c,d){d==null&&(d=!0);this._addToGlobal=!0;this._fname="";a=Z.replace(a,".ttf",".woff2");a=Z.replace(a,
".otf",".woff2");this._addToGlobal=d;this._fname=b;this._ac=c;new kd(!0,a,"GET",null,0,m(this,this.onLoad))};r["com.tilbuci.font.EmbedFont"]=ih;ih.__name__="com.tilbuci.font.EmbedFont";ih.prototype={fname:null,_fname:null,get_fname:function(){return this._fname},_ac:null,_addToGlobal:null,onLoad:function(a,b){var c=this;if(a){a=new ArrayBuffer(cc.get_length(b.binary));for(var d=new DataView(a,0,a.byteLength),f=0,g=cc.get_length(b.binary);f<g;){var h=f++;d.setUint8(h,b.binary.b[h])}b=new FontFace(this._fname,
a);window.document.fonts.add(b);b.load().then(function(l){$d.loadFromName(c._fname).onComplete(function(k){c._addToGlobal&&t.fonts.push(c._fname);c._ac!=null&&c._ac(!0,c);c._ac=null})})}else this._fname="",this._ac=this._ac=null},__class__:ih,__properties__:{get_fname:"get_fname"}};var ae=function(a){this.ok=!1;a!=null&&this.load(a)};r["com.tilbuci.narrative.BattleCardNarrative"]=ae;ae.__name__="com.tilbuci.narrative.BattleCardNarrative";ae.prototype={ok:null,cardname:null,cardgraphic:null,cardattributes:null,
clone:function(){return new ae(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"cardname")&&Object.prototype.hasOwnProperty.call(a,"cardgraphic")&&Object.prototype.hasOwnProperty.call(a,"cardattributes")?(this.cardname=A.field(a,"cardname"),this.cardgraphic=A.field(a,"cardgraphic"),this.cardattributes=A.field(a,"cardattributes"),this.cardattributes==null&&(this.cardattributes=[0,0,0,0,0]),this.ok=!0):!1},kill:function(){for(this.cardgraphic=this.cardname=
null;this.cardattributes.length>0;)this.cardattributes.shift();this.cardattributes=null},toObject:function(){return{cardname:this.cardname,cardgraphic:this.cardgraphic,cardattributes:this.cardattributes}},__class__:ae};var hc=function(a){this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.narrative.CharacterNarrative"]=hc;hc.__name__="com.tilbuci.narrative.CharacterNarrative";hc.__super__=za;hc.prototype=I(za.prototype,{ok:null,id:null,chname:null,about:null,collection:null,clone:function(){return new hc(this.toObject())},
load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&Object.prototype.hasOwnProperty.call(a,"chname")&&Object.prototype.hasOwnProperty.call(a,"about")&&Object.prototype.hasOwnProperty.call(a,"collection")?(this.id=A.field(a,"id"),this.chname=A.field(a,"chname"),this.about=A.field(a,"about"),this.collection=A.field(a,"collection"),this.ok=!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.collection=this.about=this.chname=
this.id=null},toObject:function(){return{id:this.id,chname:this.chname,about:this.about,collection:this.collection}},__class__:hc});var ho=function(a){this.diags=new aa;this.loaded=!1;this.code="";this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.narrative.DialogueFolderNarrative"]=ho;ho.__name__="com.tilbuci.narrative.DialogueFolderNarrative";ho.__super__=za;ho.prototype=I(za.prototype,{ok:null,id:null,code:null,loaded:null,diags:null,_callback:null,clone:function(){return new ho(this.toObject())},
load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=A.field(a,"id");Object.prototype.hasOwnProperty.call(a,"code")&&(this.code=A.field(a,"code"));for(var b=Object.keys(this.diags.h),c=b.length,d=0;d<c;){var f=b[d++];this.diags.h[f].kill();var g=this.diags;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}if(Object.prototype.hasOwnProperty.call(a,"diags"))for(a=A.field(a,"diags"),b=0,c=A.fields(a);b<c.length;)f=c[b],++b,d=new io,d.load(A.field(a,f))&&(this.diags.h[d.id]=
d);return this.ok=!0}return!1},clear:function(){if(this.ok){for(var a=Object.keys(this.diags.h),b=a.length,c=0;c<b;){var d=a[c++];this.diags.h[d].kill();var f=this.diags;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.diags=new aa}},loadContents:function(a){if(this.ok){p.narrative.clearDialogues();this._callback=a;if(p.nocache){a=p.base+"movie/"+p.movie.get_mvId()+".movie/media/dialogues/"+this.code+".json";var b=new aa,c=(new Date).getTime();b.h.rand=c;new kd(!0,a,"GET",b,3,m(this,
this.onContents))}else new kd(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/media/dialogues/"+this.code+".json","GET",new aa,3,m(this,this.onContents));return!0}return!1},onContents:function(a,b){a?this.load(b.json)?this._callback(!0):this._callback(!1):this._callback(!1)},numDiags:function(){return V.count(this.diags)},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();this.id=null;for(var a=Object.keys(this.diags.h),b=a.length,c=0;c<b;){var d=a[c++];this.diags.h[d].kill();
var f=this.diags;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._callback=this.diags=null},idObject:function(){return{id:this.id,code:this.code,loaded:this.loaded}},toObject:function(){for(var a=[],b=this.diags.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push(g.toObject())}return{id:this.id,code:this.code,loaded:this.loaded,diags:a}},__class__:ho});var jo=function(a){this.audio=this.character=this.asset="";this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.narrative.DialogueLineNarrative"]=
jo;jo.__name__="com.tilbuci.narrative.DialogueLineNarrative";jo.__super__=za;jo.prototype=I(za.prototype,{ok:null,text:null,audio:null,character:null,asset:null,clone:function(){return new jo(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"text")?(this.text=A.field(a,"text"),this.audio=A.field(a,"audio"),this.character=A.field(a,"character"),this.asset=A.field(a,"asset"),this.ok=!0):!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();
this.asset=this.character=this.audio=this.text=null},toObject:function(){return{text:this.text,audio:this.audio,character:this.character,asset:this.asset}},__class__:jo});var io=function(a){this._lastcol=this._lastast="";this.lines=[];this.current=0;this.navprev=this.navnext=this.navend=this.insttext=this.instname=this.instexpr="";this.ok=!1;za.call(this);a!=null&&this.load(a)};r["com.tilbuci.narrative.DialogueNarrative"]=io;io.__name__="com.tilbuci.narrative.DialogueNarrative";io.__super__=za;io.prototype=
I(za.prototype,{ok:null,id:null,navprev:null,navnext:null,navend:null,insttext:null,instname:null,instexpr:null,current:null,lines:null,_lastcol:null,_lastast:null,clone:function(){return new io(this.toObject())},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=A.field(a,"id");Object.prototype.hasOwnProperty.call(a,"navprev")&&(this.navprev=A.field(a,"navprev"));Object.prototype.hasOwnProperty.call(a,"navnext")&&(this.navnext=A.field(a,"navnext"));Object.prototype.hasOwnProperty.call(a,
"navend")&&(this.navend=A.field(a,"navend"));Object.prototype.hasOwnProperty.call(a,"insttext")&&(this.insttext=A.field(a,"insttext"));Object.prototype.hasOwnProperty.call(a,"instname")&&(this.instname=A.field(a,"instname"));Object.prototype.hasOwnProperty.call(a,"instexpr")&&(this.instexpr=A.field(a,"instexpr"));if(Object.prototype.hasOwnProperty.call(a,"lines")){a=A.field(a,"lines");for(var b=0,c=A.fields(a);b<c.length;){var d=c[b];++b;var f=new jo;f.load(A.field(a,d))&&this.lines.push(f)}}return this.ok=
!0}return!1},kill:function(){this.parent!=null&&this.parent.removeChild(this);this.removeChildren();for(this.id=null;this.lines.length>0;)this.lines.shift().kill();this.instexpr=this.instname=this.insttext=this.navend=this.navnext=this.navprev=this.lines=null},toObject:function(){for(var a=[],b=0,c=this.lines;b<c.length;){var d=c[b];++b;a.push(d.toObject())}return{id:this.id,lines:a,navprev:this.navprev,navnext:this.navnext,navend:this.navend,insttext:this.insttext,instname:this.instname,instexpr:this.instexpr}},
numLines:function(){return this.lines.length},next:function(){this.current++;this.current>=this.lines.length&&(this.current=this.lines.length-1);this.show(this.current)},previous:function(){this.current--;this.current<0&&(this.current=0);this.show(this.current)},last:function(){this.current=this.lines.length-1;this.show(this.current)},first:function(){this.current=0;this.show(this.current)},show:function(a){a==null&&(a=-1);a>=0&&(this.current=a);this.current>=this.lines.length&&(this.current=0);this.insttext!=
null&&this.insttext!=""&&p.area.setText(this.insttext,this.lines[this.current].text);this.navprev!=null&&this.navprev!=""&&(this.current==0?p.area.setVisible(this.navprev,!1):p.area.setVisible(this.navprev,!0));this.navnext!=null&&this.navnext!=""&&(this.current>=this.lines.length-1?p.area.setVisible(this.navnext,!1):p.area.setVisible(this.navnext,!0));this.navend!=null&&this.navend!=""&&(this.current>=this.lines.length-1?p.area.setVisible(this.navend,!0):p.area.setVisible(this.navend,!1));this.instname!=
null&&this.instname!=""&&(this.lines[this.current].character==""?p.area.setText(this.instname,""):Object.prototype.hasOwnProperty.call(p.narrative.chars.h,this.lines[this.current].character)?p.area.setText(this.instname,p.narrative.chars.h[this.lines[this.current].character].chname):p.area.setText(this.instname,""));this.instexpr!=null&&this.instexpr!=""&&(this.lines[this.current].asset==""?p.area.setVisible(this.instexpr,!1):Object.prototype.hasOwnProperty.call(p.narrative.chars.h,this.lines[this.current].character)?
Object.prototype.hasOwnProperty.call(p.movie.collections.h,p.narrative.chars.h[this.lines[this.current].character].collection)?(this._lastcol!=p.narrative.chars.h[this.lines[this.current].character].collection&&this._lastast!=this.lines[this.current].asset&&p.area.loadCollectionAsset(this.instexpr,p.narrative.chars.h[this.lines[this.current].character].collection,this.lines[this.current].asset),this._lastcol=p.narrative.chars.h[this.lines[this.current].character].collection,this._lastast=this.lines[this.current].asset,
p.area.setVisible(this.instexpr,!0)):p.area.setVisible(this.instexpr,!1):p.area.setVisible(this.instexpr,!1));this.lines[this.current].audio==""?p.narrative.diagSpeech.stop():p.narrative.diagSpeech.load(this.lines[this.current].audio)},close:function(){this.navprev!=null&&this.navprev!=""&&p.area.releaseProperty(this.navprev,"visible");this.navnext!=null&&this.navnext!=""&&p.area.releaseProperty(this.navnext,"visible");this.navend!=null&&this.navend!=""&&p.area.releaseProperty(this.navend,"visible");
this.instexpr!=null&&this.instexpr!=""&&p.area.releaseProperty(this.instexpr,"visible");p.narrative.diagSpeech.stop();this._lastast=this._lastcol=""},__class__:io});var qq=function(a){this.ok=!1;a!=null&&this.load(a)};r["com.tilbuci.narrative.InvItemNarrative"]=qq;qq.__name__="com.tilbuci.narrative.InvItemNarrative";qq.prototype={ok:null,itname:null,ittype:null,itgraphic:null,itaction:null,clone:function(){return new qq(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,
"itname")&&Object.prototype.hasOwnProperty.call(a,"ittype")&&Object.prototype.hasOwnProperty.call(a,"itgraphic")&&Object.prototype.hasOwnProperty.call(a,"itaction")?(this.itname=A.field(a,"itname"),this.ittype=A.field(a,"ittype"),this.itgraphic=A.field(a,"itgraphic"),this.itaction=A.field(a,"itaction"),this.ok=!0):!1},kill:function(){this.itaction=this.itgraphic=this.ittype=this.itname=null},toObject:function(){return{itname:this.itname,ittype:this.ittype,itgraphic:this.itgraphic,itaction:this.itaction}},
__class__:qq};var kq=function(){this._directionclick=[!0,!0,!0,!0];this._counterd=0;this._buttonclick=[!0,!0,!0,!0];this._counter=0;this._controls=new aa;this._gameInput=new Nc;this._gameInput.addEventListener("deviceAdded",m(this,this.onDeviceAdded));this._gameInput.addEventListener("deviceRemoved",m(this,this.onDeviceRemoved))};r["com.tilbuci.player.Joystick"]=kq;kq.__name__="com.tilbuci.player.Joystick";kq.prototype={_gameInput:null,_device:null,_controls:null,_timer:null,_counter:null,_buttonclick:null,
_counterd:null,_directionclick:null,onDeviceRemoved:function(a){if(this._timer!=null)try{this._timer.stop()}catch(b){}this._timer=null},onDeviceAdded:function(a){this._device=a.device;this._device.enabled=!0;a=Object.keys(this._controls.h);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._controls;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=0;for(b=this._device.get_numControls();a<b;){c=a++;c=this._device.getControlAt(c);switch(c.id){case "AXIS_0":this._controls.h.HL=c;break;case "AXIS_1":this._controls.h.VL=
c;break;case "AXIS_2":this._controls.h.HR=c;break;case "AXIS_3":this._controls.h.VR=c;break;case "BUTTON_0":this._controls.h.B0=c;break;case "BUTTON_1":this._controls.h.B1=c;break;case "BUTTON_2":this._controls.h.B2=c;break;case "BUTTON_3":this._controls.h.B3=c;break;case "DPAD_DOWN":this._controls.h.DD=c;break;case "DPAD_LEFT":this._controls.h.DL=c;break;case "DPAD_RIGHT":this._controls.h.DR=c;break;case "DPAD_UP":this._controls.h.DU=c}this._controls.h[c.id]=c}if(this._timer!=null)try{this._timer.stop()}catch(g){}this._counter=
0;this._buttonclick=[!0,!0,!0,!0];this._counterd=0;this._directionclick=[!0,!0,!0,!0];this._timer=new rd(32);this._timer.run=m(this,this.checkInput)},checkInput:function(){if(p.usingTarget>0){var a=this._controls.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];if(this._controls.h[d].value<-.5||this._controls.h[d].value>.5)switch(d){case "B0":this._buttonclick[0]&&(p.parser.checkJoystick("0"),this._buttonclick[0]=!1,this._counter=0);break;case "B1":this._buttonclick[1]&&(p.parser.checkJoystick("1"),
this._buttonclick[1]=!1,this._counter=0);break;case "B2":this._buttonclick[2]&&(p.parser.checkJoystick("2"),this._buttonclick[2]=!1,this._counter=0);break;case "B3":this._buttonclick[3]&&(p.parser.checkJoystick("3"),this._buttonclick[3]=!1,this._counter=0);break;case "DD":p.parser.checkJoystick("d");break;case "DL":p.parser.checkJoystick("l");break;case "DR":p.parser.checkJoystick("r");break;case "DU":p.parser.checkJoystick("u");break;case "HL":this._controls.h[d].value<0?p.parser.checkJoystick("l"):
p.parser.checkJoystick("r");break;case "HR":this._controls.h[d].value<0?p.parser.checkJoystick("l"):p.parser.checkJoystick("r");break;case "VL":this._controls.h[d].value<0?p.parser.checkJoystick("u"):p.parser.checkJoystick("d");break;case "VR":this._controls.h[d].value<0?p.parser.checkJoystick("u"):p.parser.checkJoystick("d")}}}else for(a=this._controls.h,a=Object.keys(a),b=a.length,c=0;c<b;)if(d=a[c++],this._controls.h[d].value<-.5||this._controls.h[d].value>.5)switch(d){case "B0":this._buttonclick[0]&&
(p.parser.checkJoystick("0"),this._buttonclick[0]=!1,this._counter=0);break;case "B1":this._buttonclick[1]&&(p.parser.checkJoystick("1"),this._buttonclick[1]=!1,this._counter=0);break;case "B2":this._buttonclick[2]&&(p.parser.checkJoystick("2"),this._buttonclick[2]=!1,this._counter=0);break;case "B3":this._buttonclick[3]&&(p.parser.checkJoystick("3"),this._buttonclick[3]=!1,this._counter=0);break;case "DD":this._directionclick[2]&&(p.parser.checkJoystick("d"),this._directionclick[2]=!1,this._counterd=
0);break;case "DL":this._directionclick[3]&&(p.parser.checkJoystick("l"),this._directionclick[3]=!1,this._counterd=0);break;case "DR":this._directionclick[1]&&(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "DU":this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=!1,this._counterd=0);break;case "HL":this._controls.h[d].value<0?this._directionclick[3]&&(p.parser.checkJoystick("l"),this._directionclick[3]=!1,this._counterd=0):this._directionclick[1]&&
(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "HR":this._controls.h[d].value<0?this._directionclick[3]&&(p.parser.checkJoystick("l"),this._directionclick[3]=!1,this._counterd=0):this._directionclick[1]&&(p.parser.checkJoystick("r"),this._directionclick[1]=!1,this._counterd=0);break;case "VL":this._controls.h[d].value<0?this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=!1,this._counterd=0):this._directionclick[2]&&(p.parser.checkJoystick("d"),
this._directionclick[2]=!1,this._counterd=0);break;case "VR":this._controls.h[d].value<0?this._directionclick[0]&&(p.parser.checkJoystick("u"),this._directionclick[0]=!1,this._counterd=0):this._directionclick[2]&&(p.parser.checkJoystick("d"),this._directionclick[2]=!1,this._counterd=0)}this._counter++;this._counter>=10&&(this._buttonclick=[!0,!0,!0,!0],this._counter=0);this._counterd++;this._counterd>=10&&(this._directionclick=[!0,!0,!0,!0],this._counterd=0)},__class__:kq};var gl=function(a,b,c){this._lastfocus=
!1;this._targetTime=.0075;this._target=new rq;this.kfPercent=0;this._currentKf=-1;this._instances=new aa;this._scale=1;this._bloverlays=new aa;this._overlays=new aa;this._kftoLoad=-1;this._playing=!0;za.call(this);this._player=a;this._bgarea=b;this._bg=new zd;this._scene=new za;this._inputArea=new za;this._player.inputArea=this._inputArea;this._mask=new zd;this._holder=new za;this._overlay=new za;this._bloverlay=new za;this._uiBg=new zd;this._uiBg.get_graphics().beginFill(0,.5);this._uiBg.get_graphics().drawRect(0,
0,32,32);this._uiBg.get_graphics().endFill();this._uiBg.set_visible(!1);this._uiArea=c;this._uiArea.addChild(this._uiBg);this._inputPanel=new sq(this._uiBg);this._uiArea.addChild(this._inputPanel);this._holder.addChild(this._bg);this._holder.addChild(this._bloverlay);this._holder.addChild(this._scene);this._holder.addChild(this._inputArea);this._holder.addChild(this._overlay);this.addChild(this._holder);this.addChild(this._mask);p.mode=="player"?this._holder.set_mask(this._mask):this._mask.set_visible(!1);
this.stage==null?this.addEventListener("addedToStage",m(this,this.onStage)):this.addEventListener("mouseUp",m(this,this.onMouseUp));this._select=new Sd;this.addChild(this._select);this._multiSelect=new rj;this.addChild(this._multiSelect)};r["com.tilbuci.player.MovieArea"]=gl;gl.__name__="com.tilbuci.player.MovieArea";gl.__super__=za;gl.prototype=I(za.prototype,{aWidth:null,get_aWidth:function(){return this._mask.get_width()},aHeight:null,get_aHeight:function(){return this._mask.get_height()},aOrientation:null,
get_aOrientation:function(){return this.get_aWidth()==this.get_aHeight()?"square":this.get_aHeight()>this.get_aWidth()?"vertical":"horizontal"},pOrientation:null,get_pOrientation:function(){return this._player.get_rWidth()<this._player.get_rHeight()?"vertical":"horizontal"},playing:null,_playing:null,get_playing:function(){return this._playing},_kftoLoad:null,_player:null,_bgarea:null,_holder:null,_mask:null,_scene:null,_inputArea:null,_overlay:null,_overlays:null,_bloverlay:null,_bloverlays:null,
_bg:null,_scale:null,_instances:null,currentKf:null,get_currentKf:function(){return this._currentKf},_currentKf:null,kfPercent:null,_uiArea:null,_uiBg:null,_inputPanel:null,_select:null,_multiSelect:null,_target:null,_targetTime:null,_lastfocus:null,showTarget:function(){this._holder.addChild(this._target);this._target.show();if(this._target.timer!=null){try{this._target.timer.stop()}catch(a){}this._target.timer=null}this._target.timer=new rd(500);this._target.timer.run=m(this,this.checkTargetOver);
this._target.lastInstOver=""},hideTarget:function(){this._target.parent!=null&&this._holder.removeChild(this._target);this._target.hide();if(this._target.timer!=null){try{this._target.timer.stop()}catch(a){}this._target.timer=null}this._target.lastInstOver=""},toggleTarget:function(){this._target.get_visible()?this.hideTarget():this.showTarget()},clearTarget:function(){this._target.clear()},setTarget:function(a){return Object.prototype.hasOwnProperty.call(p.contraptions.targets.h,a)?p.contraptions.targets.h[a].ok?
this._target.load(a):!1:!1},moveTarget:function(a){switch(a){case "down":this._target.get_y()<p.area.get_aHeight()&&(a=this._target,a.set_y(a.get_y()+p.usingTarget));break;case "left":this._target.get_x()>0&&(a=this._target,a.set_x(a.get_x()-p.usingTarget));break;case "right":this._target.get_x()<p.area.get_aWidth()&&(a=this._target,a.set_x(a.get_x()+p.usingTarget));break;case "up":this._target.get_y()>0&&(a=this._target,a.set_y(a.get_y()-p.usingTarget))}if(p.parser.onDrag!=null){a=Math.round(this._target.get_x()-
p.parser.onDrag.lastClick.x);var b=Math.round(this._target.get_y()-p.parser.onDrag.lastClick.y);p.area.setProperty(p.parser.onDrag.getInstName(),"x",a,a);p.area.setProperty(p.parser.onDrag.getInstName(),"y",b,b);this._target.set_alpha(0)}},setTargetPos:function(a,b){this._target.get_visible()||this.showTarget();this._target.targetX=this._target.set_x(a);this._target.targetY=this._target.set_y(b)},triggerTarget:function(){if(p.parser.onDrag!=null)p.parser.onDragMoveStop(null),this._target.set_alpha(1);
else if(!(p.contraptions.usingMessages&&p.contraptions.checkMessagesCollision(this._target)||p.contraptions.usingInv&&p.contraptions.checkInvCollision(this._target)||p.contraptions.usingBs&&p.contraptions.checkBsCollision(this._target)||p.contraptions.usingMenu&&p.contraptions.checkMenuCollision(this._target)||p.contraptions.usingDflow&&p.contraptions.checkDflowCollision(this._target)||p.contraptions.checkInterfaceCollision(this._target))){for(var a,b=null,c=0,d=this._scene.get_numChildren();c<d;)a=
c++,a=this._scene.getChildAt(a),a!=null&&a.get_visible()&&this._target.hitTestObject(a)&&(b=a);b!=null&&(c=this._target.get_x(),d=b.get_x(),b.lastClick.x=c-d,c=this._target.get_y(),d=b.get_y(),b.lastClick.y=c-d,b.onClick())}},checkTargetOver:function(){if(this._target.get_visible()){for(var a="",b,c=0,d=this._scene.get_numChildren();c<d;)b=c++,b=this._scene.getChildAt(b),b!=null&&b.get_visible()&&this._target.hitTestObject(b)&&(a=b.getInstName());if(p.contraptions.checkMenuOver(this._target)||p.contraptions.checkDflowOver(this._target)||
p.contraptions.checkMessagesOver(this._target)||p.contraptions.checkInvOver(this._target)||p.contraptions.checkBsOver(this._target))a="_menu_";p.contraptions.checkInterfaceOver(this._target)&&(a="_interface_");this._target.setGraphic(a);if(a!="_menu_"&&a!="_interface_"&&a!=this._target.lastInstOver&&(this._target.lastInstOver=a,Object.prototype.hasOwnProperty.call(this._instances.h,a)))this._instances.h[a].onTargetOver()}else this.hideTarget()},loadKeyframe:function(a,b){this._playing||p.mode=="editor"||
this.playPause();ua.stop(this,{kfPercent:100},!1,!1);this._select.clearInstance();this._multiSelect.clear();this._currentKf=b;var c=this._instances.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];if(this._instances.h[g].keep)this._instances.h[g].keep=!1;else{this._scene.removeChild(this._instances.h[g]);this._instances.h[g].stop();this._instances.h[g].kill();var h=this._instances;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}}c=a.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)if(g=
c[f++],Object.prototype.hasOwnProperty.call(this._instances.h,g))this._instances.h[g].keep=!0,this._instances.h[g].load(a.h[g]);else{h=this._instances;var l=new Bi(g,m(this,this.imgSelect));h.h[g]=l;this._instances.h[g].load(a.h[g]);this._instances.h[g].set_visible(!1);this._scene.addChild(this._instances.h[g])}c=this._instances.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=c[f++],this._instances.h[g].place();if(p.mode=="editor")for(c=this._instances.h,c=Object.keys(c),d=c.length,f=0;f<d;)g=c[f++],
this._instances.h[g].keep?this._instances.h[g].stop():(this._scene.removeChild(this._instances.h[g]),this._instances.h[g].kill(),h=this._instances,Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]);if(p.mode!="editor")if(this.kfPercent=0,p.focusMode)ua.tween(this,3,{kfPercent:100}).onComplete(m(this,this.nextKeyframe)).ease(bg.get_easeNone());else ua.tween(this,p.mdata.time,{kfPercent:100}).onComplete(m(this,this.nextKeyframe));else this.kfPercent=100;a=c=p.plugins.h;c=Object.keys(c);d=c.length;
for(f=0;f<d;)if(g=a[c[f++]],g.get_ready())g.info.onNewKeyframe(b);p.callback!=null&&(b=p.callback,a=new aa,c=this.get_currentKf(),a.h.kf=c,b("loadkeyframe",a));p.mode!="editor"&&this.get_currentKf()==p.movie.scene.keyframes.length-1&&(p.contraptions.showingDflow()||p.movie.scene.hasDflow()&&p.contraptions.dflowShow(p.movie.scene.dflow));this.setFocus()},imgSelect:function(a){this._select.clearInstance();this._multiSelect.clear();for(var b=Object.keys(this._instances.h),c=b.length,d=0;d<c;){var f=
b[d++];a==null?this._instances.h[f].selected=!1:f==a?(this._instances.h[f].selected=!0,this._select.setInstance(this._instances.h[f])):this._instances.h[f].selected=!1}},imgSelectMultiple:function(a){if(a.length>1){this.imgSelect(null);this._multiSelect.clear();for(var b=0;b<a.length;){var c=a[b];++b;this._multiSelect.add(c)}}},setCurrentPrecache:function(){this._select.setAsPrecache()},setCurrentNum:function(a,b){this._select.setCurrentNum(a,b)},setCurrentStr:function(a,b){this._select.setCurrentStr(a,
b)},setCurrentBool:function(a,b){this._select.setCurrentBool(a,b)},setCurrentArray:function(a,b){this._select.setCurrentArray(a,b)},applyText:function(){this._select.applyText()},setPropertyNum:function(a,b,c){var d=this.pickInstance(a);if(d!=null)switch(a=t.displayType=="portrait"?p.movie.scene.keyframes[p.area.get_currentKf()].h[a].vertical:p.movie.scene.keyframes[p.area.get_currentKf()].h[a].horizontal,b){case "alpha":a.alpha=d.set_alpha(c);break;case "coloralpha":a.colorAlpha=c;ua.transform(d,
.01).color(L.parseInt(a.color),a.colorAlpha);break;case "height":b=a.height=c;if(d.get_transition()=="top"||d.get_transition()=="bottom")b=c;d.get_currentType()!="paragraph"&&d.get_currentType()!="html"||d.setTextSize(d.get_width(),b);d.set_height(b);break;case "rotation":a.rotation=Math.round(c);d.set_rotation(c);break;case "textleading":a.textLeading=Math.round(c);break;case "textsize":a.textSize=Math.round(c);break;case "textspacing":a.textSpacing=c;break;case "volume":a.volume=c;d.setSound(c);
break;case "width":b=a.width=c;if(d.get_transition()=="right"||d.get_transition()=="left")b=c;d.get_currentType()!="paragraph"&&d.get_currentType()!="html"||d.setTextSize(b,d.get_height());d.set_width(b);break;case "x":a.x=d.set_x(c);break;case "y":a.y=d.set_y(c)}},orderUp:function(){if(this._select.image!=null){for(var a=0,b=Object.keys(this._instances.h).length,c=0;c<b;)c++,++a;this._select.image.getOrder()<a-1&&(this._select.image.setOrder(this._select.image.getOrder()+1),this.updateOrder())}},
orderDown:function(){this._select.image!=null&&this._select.image.getOrder()>0&&(this._select.image.setOrder(this._select.image.getOrder()-1),this.updateOrder())},updateOrder:function(){var a=this._instances.h,b=Object.keys(a),c=b.length;for(a=0;a<c;){var d=b[a++];this._instances.h[d].setOrder(this._scene.getChildIndex(this._instances.h[d]),!1)}c=[];b=[];a=p.movie.scene.keyframes[p.area.get_currentKf()].h;a=Object.keys(a);d=a.length;for(var f=0;f<d;){for(var g=a[f++],h=p.movie.scene.keyframes[p.area.get_currentKf()].h[g];c.length<
h.horizontal.order+1;)c.push("");for(c[h.horizontal.order]==""?c[h.horizontal.order]=g:c.splice(h.horizontal.order,0,g);b.length<h.vertical.order+1;)b.push("");b[h.vertical.order]==""?b[h.vertical.order]=g:b.splice(h.vertical.order,0,g)}a=f=0;for(d=c.length;a<d;)g=a++,c[g]!=""&&(p.movie.scene.keyframes[p.area.get_currentKf()].h[c[g]].horizontal.order=f,++f);a=c=0;for(d=b.length;a<d;)f=a++,b[f]!=""&&(p.movie.scene.keyframes[p.area.get_currentKf()].h[b[f]].vertical.order=c,++c)},removeInstance:function(a,
b){b==null&&(b=!1);return Object.prototype.hasOwnProperty.call(this._instances.h,a)&&Object.prototype.hasOwnProperty.call(p.movie.scene.keyframes[this._currentKf].h,a)?(b&&t.history.clear(),t.history.addState(t.ln.get("rightbar-history-removeinst")),this._scene.removeChild(this._instances.h[a]),b=this._instances,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],b=p.movie.scene.keyframes[this._currentKf],Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],this.updateOrder(),!0):!1},
onStage:function(a){this.removeEventListener("addedToStage",m(this,this.onStage));this.addEventListener("mouseUp",m(this,this.onMouseUp))},onMouseUp:function(a){p.mode=="editor"&&this._select.image!=null&&this._select.endPropSet()},nextKeyframe:function(){p.movie.scene.ackeyframes.length>this._currentKf&&p.movie.scene.ackeyframes[this._currentKf]!=""&&p.parser.run(p.movie.scene.ackeyframes[this._currentKf]);p.movie.scene.staticsc?this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf):
(this._currentKf++,this._currentKf>=p.movie.scene.keyframes.length&&(this._currentKf=p.movie.scene.loop),this._kftoLoad=this._currentKf,this._playing&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf)))},playPause:function(){this._playing?(ua.pauseAll(),this._playing=!1):(ua.resumeAll(),this._kftoLoad>=0&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf)),this._playing=!0)},play:function(){if(!this._playing){p.mode!=
"editorplayerwait"?ua.resumeAll():(this._currentKf++,this._currentKf>=p.movie.scene.keyframes.length&&(this._currentKf=p.movie.scene.loop),this._kftoLoad=this._currentKf,p.mode="editorplayer");this._kftoLoad>=0&&(this._kftoLoad=-1,this.loadKeyframe(p.movie.scene.keyframes[this._currentKf],this._currentKf));for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].playOnLoad()&&this._instances.h[d].play()}this._playing=!0}},pause:function(){if(this._playing){ua.pauseAll();
this._playing=!1;for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].pause()}}},playPauseInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].playPause(),!0):!1},playInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].play(),!0):!1},pauseInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].pause(),
!0):!1},stopInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].stop(),!0):!1},instancePlaying:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].get_playing():!1},instanceSeek:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].seek(b),!0):!1},instanceRef:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a]:
null},instanceProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getProp(b):0},instanceBoolProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getBoolProp(b):!1},instanceStringProp:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].getStringProp(b):""},setAnimation:function(a){switch(a){case "bounce.in":ua.defaultEase=wk.easeIn;break;case "bounce.inout":ua.defaultEase=
wk.easeInOut;break;case "bounce.out":ua.defaultEase=wk.easeOut;break;case "cubic.in":ua.defaultEase=xk.easeIn;break;case "cubic.inout":ua.defaultEase=xk.easeInOut;break;case "cubic.out":ua.defaultEase=xk.easeOut;break;case "elastic.in":ua.defaultEase=Ti.easeIn;break;case "elastic.inout":ua.defaultEase=Ti.easeInOut;break;case "elastic.out":ua.defaultEase=Ti.easeOut;break;case "expo.in":ua.defaultEase=Sj.easeIn;break;case "expo.inout":ua.defaultEase=Sj.easeInOut;break;case "expo.out":ua.defaultEase=
Sj.easeOut;break;case "linear":ua.defaultEase=bg.get_easeNone();break;case "quad.in":ua.defaultEase=Ai.easeIn;break;case "quad.inout":ua.defaultEase=Ai.easeInOut;break;case "quad.out":ua.defaultEase=Ai.easeOut;break;case "quart.in":ua.defaultEase=lh.easeIn;break;case "quart.inout":ua.defaultEase=lh.easeInOut;break;case "quart.out":ua.defaultEase=lh.easeOut;break;case "quint.in":ua.defaultEase=yk.easeIn;break;case "quint.inout":ua.defaultEase=yk.easeInOut;break;case "quint.out":ua.defaultEase=yk.easeOut;
break;case "sine.in":ua.defaultEase=zk.easeIn;break;case "sine.inout":ua.defaultEase=zk.easeInOut;break;case "sine.out":ua.defaultEase=zk.easeOut}},textScroll:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].textScroll(b),!0):!1},updateTexts:function(){for(var a=this._instances.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].updateText()},setText:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].setText(b),
!0):!1},setVisible:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].set_visible(b),this.setProperty(a,"visible",b,b),!0):!1},setProperty:function(a,b,c,d){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].fixProp(b,c,d),!0):!1},releaseProperty:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].releaseProp(b),!0):!1},releaseAllProperties:function(a){a==null&&(a=
"");if(a==""){a=this._instances.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].releaseAll();return!0}return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].releaseAll(),!0):!1},next:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].next(),!0):!1},previous:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?(this._instances.h[a].previous(),!0):!1},loadAsset:function(a,b){return Object.prototype.hasOwnProperty.call(this._instances.h,
a)?this._instances.h[a].loadAsset(b):!1},loadCollectionAsset:function(a,b,c){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a].loadCollectionAsset(b,c):!1},getOverlay:function(a,b){b==null&&(b=!1);if(b){if(!Object.prototype.hasOwnProperty.call(this._bloverlays.h,a)){b=this._bloverlays;var c=new za;b.h[a]=c;this._bloverlay.addChild(this._bloverlays.h[a])}return this._bloverlays.h[a]}Object.prototype.hasOwnProperty.call(this._overlays.h,a)||(b=this._overlays,c=new za,
b.h[a]=c,this._overlay.addChild(this._overlays.h[a]));return this._overlays.h[a]},removeOverlay:function(a,b){b==null&&(b=!1);if(b){if(Object.prototype.hasOwnProperty.call(this._bloverlays.h,a))return this._bloverlay.removeChild(this._bloverlays.h[a]),this._bloverlays.h[a].removeChildren(),this._bloverlays.h[a].get_graphics().clear(),b=this._bloverlays,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],!0}else if(Object.prototype.hasOwnProperty.call(this._overlays.h,a))return this._overlay.removeChild(this._overlays.h[a]),
this._overlays.h[a].removeChildren(),this._overlays.h[a].get_graphics().clear(),b=this._overlays,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a],!0;return!1},overlayTop:function(a){return Object.prototype.hasOwnProperty.call(this._overlays.h,a)?(this._overlay.swapChildrenAt(this._overlay.get_numChildren()-1,this._overlay.getChildIndex(this._overlays.h[a])),!0):!1},overlayBottom:function(a){return Object.prototype.hasOwnProperty.call(this._overlays.h,a)?(this._overlay.swapChildrenAt(0,this._overlay.getChildIndex(this._overlays.h[a])),
!0):!1},kill:function(){this.removeEventListener("mouseUp",m(this,this.onMouseUp));this._bgarea.removeChildren();this._bgarea.get_graphics().clear();this._player=this._bgarea=null;this.removeChildren();this._holder.removeChildren();this._holder.set_mask(null);this._holder=null;this._bg.get_graphics().clear();this._bg=null;this._mask.get_graphics().clear();this._mask=null;this._scene.removeChildren();this._scene=null;var a=this._overlays.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];
this.removeOverlay(d)}this._overlays=null;this._overlay.removeChildren();this._overlay=null;a=this._bloverlays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.removeOverlay(d,!0);this._bloverlays=null;this._bloverlay.removeChildren();this._bloverlay=null;a=this._instances.h;a=Object.keys(a);b=a.length;for(c=0;c<b;){d=a[c++];this._instances.h[d].kill();var f=this._instances;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._instances=null;this._uiArea.removeChildren();this._uiArea=
null;this._uiBg.get_graphics().clear();this._uiBg=null;this._inputPanel.kill();this._inputPanel=null},clear:function(){ua.stop(this,{kfPercent:100},!1,!1);this._currentKf=0;this._scene.removeChildren();for(var a=Object.keys(this._instances.h),b=a.length,c=0;c<b;){var d=a[c++];this._instances.h[d].kill();var f=this._instances;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this._uiBg.set_visible(!1);this._inputPanel.set_visible(!1)},setArea:function(){this._bg.get_graphics().clear();this._mask.get_graphics().clear();
this._bg.get_graphics().beginFill(p.movie.data.screen.bgcolor);this._mask.get_graphics().beginFill(0);p.movie.data.screen.type=="square"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.big)):p.movie.data.screen.type=="horizontal"||p.movie.data.screen.type=="landscape"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small),this._mask.get_graphics().drawRect(0,
0,p.movie.data.screen.big,p.movie.data.screen.small)):p.movie.data.screen.type=="vertical"||p.movie.data.screen.type=="portrait"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big)):this.get_pOrientation()=="vertical"?(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.small,p.movie.data.screen.big)):
(this._bg.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small),this._mask.get_graphics().drawRect(0,0,p.movie.data.screen.big,p.movie.data.screen.small));this._bg.get_graphics().endFill();this._mask.get_graphics().endFill();this._uiBg.set_width(this._mask.get_width()*this._scale);this._uiBg.set_height(this._mask.get_height()*this._scale);this._bgarea.get_graphics().clear();this._bgarea.get_graphics().beginFill(0);this._bgarea.get_graphics().drawRect(0,0,this._player.get_rWidth(),
this._player.get_rHeight());this._bgarea.get_graphics().endFill();p.contraptions.changeDisplay();this.place()},showLoginInput:function(a,b){var c=p.parser.parseString("$_TEXTS:logintitle");c==""&&(c="Login");var d=p.parser.parseString("$_TEXTS:logintext");d==""&&(d="Please type your e-mail address. You'll receive a 6 digit code to confirm your identity.");var f=p.parser.parseString("$_TEXTS:termsagree");f==""&&(f="I agree with the above terms.");var g=p.parser.parseString("$_TEXTS:invalidemail");
g==""&&(g="Please provide a valid e-mail address.");var h=p.parser.parseString("$_TEXTS:emailwait");h==""&&(h="Please wait while a confirmation code is sent to your e-mail.");var l=p.parser.parseString("$_TEXTS:noemailsent");l==""&&(l="Error while sending the code by e-mail. Please try again.");var k=p.parser.parseString("$_TEXTS:checkforcode");k==""&&(k="Please check out your e-mail inbox. Type below the 6 digit code you received. If you do not find the message, take a look at you spam folder.");
var q=p.parser.parseString("$_TEXTS:codewait");q==""&&(q="Please wait while the provided code is checked.");var w=p.parser.parseString("$_TEXTS:invalidcode");w==""&&(w="The provided code is invalid. Please try again.");var v=p.parser.parseString("$_TEXTS:emailsubject");v==""&&(v="TilBuci login");var z=p.parser.parseString("$_TEXTS:emailbody");z==""&&(z="Hi, you are receiving this message to confirm your login at TilBuci. Please provide the code below to proceed:\r\n\r\n[CODE]\r\n\r\nIf you did'nt request this code, don't worry: just ignore this message.");
var n=p.parser.parseString("$_TEXTS:emailsender");n==""&&(n="TilBuci");this._inputPanel.askLogin(c,d,f,g,h,l,k,q,w,v,z,n,a,b)},showStatesInput:function(a,b){var c=p.parser.parseString("$_TEXTS:titlestates");c==""&&(c="Select a state to load");var d=p.parser.parseString("$_TEXTS:waistates");d==""&&(d="Please wait while a list of available saves states is loaded.");var f=p.parser.parseString("$_TEXTS:selectstate");f==""&&(f="Select a state to load.");var g=p.parser.parseString("$_TEXTS:nostates");g==
""&&(g="Sorry, no saved states found to load.");var h=p.parser.parseString("$_TEXTS:dateformat");h==""&&(h="Y-m-d h:i a");this._inputPanel.askStates(c,d,f,g,h,a,b)},showTextInput:function(a,b,c,d){this._inputPanel.askText(a,b,c,d)},showSecretKeyInput:function(a){this._inputPanel.askSecret(a)},showMessageInput:function(a,b,c,d){this._inputPanel.setWarn(a,b,c,d)},showEmailInput:function(a,b,c,d,f){this._inputPanel.askEmail(a,b,c,d,f)},showListInput:function(a,b,c,d,f){this._inputPanel.askList(a,b,c,
d,f)},showNumericInput:function(a,b,c,d,f,g,h,l){l==null&&(l=100);h==null&&(h=0);g==null&&(g=0);this._inputPanel.askNumeric(a,b,c,d,f,g,h,l)},swapInstance:function(a,b){if(Object.prototype.hasOwnProperty.call(this._instances.h,a)){var c=this._instances.h[a];if(c.changeId(a,b)){var d=this._instances;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];this._instances.h[b]=c;return!0}}return!1},getInstances:function(){for(var a=[],b=Object.keys(this._instances.h),c=b.length,d=0;d<c;){var f=b[d++];
a.push(f)}return a},pickInstance:function(a){return Object.prototype.hasOwnProperty.call(this._instances.h,a)?this._instances.h[a]:null},maskArea:function(a){a?(this._mask.set_visible(!0),this._holder.set_mask(this._mask)):(this._holder.set_mask(null),this._mask.set_visible(!1))},setOverlay:function(a){a&&this._overlay.parent==null?this._holder.addChild(this._overlay):a||this._overlay.parent==null||this._holder.removeChild(this._overlay)},place:function(){this._holder.removeChild(this._target);this._holder.removeChild(this._overlay);
this._holder.removeChild(this._bloverlay);this.get_pOrientation()=="vertical"?(this._scale=this._player.get_rWidth()/this.get_aWidth(),this.get_aHeight()*this._scale>this._player.get_rHeight()&&(this._scale=this._player.get_rHeight()/this.get_aHeight())):(this._scale=this._player.get_rHeight()/this.get_aHeight(),this.get_aWidth()*this._scale>this._player.get_rWidth()&&(this._scale=this._player.get_rWidth()/this.get_aWidth()));this.set_scaleX(this.set_scaleY(this._scale));this._uiBg.set_width(this._mask.get_width()*
this._scale);this._uiBg.set_height(this._mask.get_height()*this._scale);this._player.get_rWidth()-this.get_aWidth()*this._scale<this._player.get_rHeight()-this.get_aHeight()*this._scale?(this._uiArea.set_x(this.set_x(0)),this._uiArea.set_y(this.set_y((this._player.get_rHeight()-this.get_aHeight()*this._scale)/2))):(this._uiArea.set_x(this.set_x((this._player.get_rWidth()-this.get_aWidth()*this._scale)/2)),this._uiArea.set_y(this.set_y(0)));p.contentPosition.x=this._uiArea.get_x();p.contentPosition.y=
this._uiArea.get_y();p.contentWidth=this._uiBg.get_width();p.contentHeight=this._uiBg.get_height();this._player.get_rWidth()>=this._player.get_rHeight()?(p.orientation="horizontal",p.multiply=Math.round(this._player.get_rWidth()/this.get_aWidth())):(p.orientation="vertical",p.multiply=Math.round(this._player.get_rHeight()/this.get_aHeight()));p.multiply<1?p.multiply=1:p.multiply>5&&(p.multiply=5);this._holder.removeChildren();this._holder.addChild(this._bg);this._holder.addChild(this._bloverlay);
this._holder.addChild(this._scene);this._holder.addChild(this._inputArea);this._holder.addChild(this._overlay);for(var a=p.plugins.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];if(f.get_ready())f.info.onDisplayResize(p.orientation,p.multiply)}},removeInputInterfaces:function(){this.removeAllInputs();this.removeAllTareas();this.removeAllNumerics();this.removeAllToggles()},addInput:function(a,b,c,d,f){f==null&&(f="");this._player.addInput(a,b,c,d,f)},placeInput:function(a,b,c,d){this._player.placeInput(a,
b,c,d)},removeInput:function(a){this._player.removeInput(a)},removeAllInputs:function(){this._player.removeAllInputs()},getInputText:function(a){return this._player.getInputText(a)},setInputText:function(a,b){this._player.setInputText(a,b)},setInputPassword:function(a,b){this._player.setInputPassword(a,b)},addTarea:function(a,b,c,d,f){this._player.addTarea(a,b,c,d,f)},placeTarea:function(a,b,c,d,f){this._player.placeTarea(a,b,c,d,f)},removeTarea:function(a){this._player.removeTarea(a)},removeAllTareas:function(){this._player.removeAllTareas()},
getTareaText:function(a){return this._player.getTareaText(a)},setTareaText:function(a,b){this._player.setTareaText(a,b)},addNumeric:function(a,b,c,d,f){this._player.addNumeric(a,b,c,d,f)},placeNumeric:function(a,b,c,d){this._player.placeNumeric(a,b,c,d)},removeNumeric:function(a){this._player.removeNumeric(a)},removeAllNumerics:function(){this._player.removeAllNumerics()},getNumericValue:function(a){return this._player.getNumericValue(a)},setNumericValue:function(a,b){this._player.setNumericValue(a,
b)},setNumericBounds:function(a,b,c,d){this._player.setNumericBounds(a,b,c,d)},addToggle:function(a,b,c,d){this._player.addToggle(a,b,c,d)},placeToggle:function(a,b,c){this._player.placeToggle(a,b,c)},removeToggle:function(a){this._player.removeToggle(a)},removeAllToggles:function(){this._player.removeAllToggles()},getToggleValue:function(a){return this._player.getToggleValue(a)},setToggleValue:function(a,b){this._player.setToggleValue(a,b)},invertToggle:function(a){this._player.invertToggle(a)},
noMouseOver:function(){for(var a=this._instances.h,b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].onMouseOut()},setFocus:function(){if(p.focusMode){var a=this._instances.h,b=a;a=Object.keys(a);for(var c=a.length,d=0;d<c;){var f=b[a[d++]];f.focus()?f.set_filters([]):f.set_filters([new pf(new Yh)])}}else if(this._lastfocus)for(b=a=this._instances.h,a=Object.keys(a),c=a.length,d=0;d<c;)f=b[a[d++]],f.set_filters([]);this._lastfocus=p.focusMode},__class__:gl,__properties__:I(za.prototype.__properties__,
{get_currentKf:"get_currentKf",get_playing:"get_playing",get_pOrientation:"get_pOrientation",get_aOrientation:"get_aOrientation",get_aHeight:"get_aHeight",get_aWidth:"get_aWidth"})});var rq=function(){this._lastname="xxx";this._inst1len=this._inst2len=this._inst3len=0;this._tgname="";this.targetX=this.targetY=0;this.lastInstOver="";za.call(this);this.set_visible(!1);p.usingTarget=0;this._custom=new Vc(m(this,this.onLoad));this.clear()};r["com.tilbuci.player.Target"]=rq;rq.__name__="com.tilbuci.player.Target";
rq.__super__=za;rq.prototype=I(za.prototype,{timer:null,lastInstOver:null,targetX:null,targetY:null,_bmp:null,_tgname:null,_custom:null,_inst1len:null,_inst2len:null,_inst3len:null,_lastname:null,clear:function(){this.removeChildren();this._tgname="";this._lastname="xxx";this._inst1len=this._inst2len=this._inst3len=0;this._bmp!=null&&this._bmp.get_bitmapData().dispose();this._bmp=new cg(Sc.getBitmapData("icTarget"));this._bmp.set_x(-(this._bmp.get_width()/2));this._bmp.set_y(-(this._bmp.get_height()/
2));this.addChild(this._bmp)},load:function(a){return Object.prototype.hasOwnProperty.call(p.contraptions.targets.h,a)&&p.contraptions.targets.h[a].ok?(this.clear(),this._tgname=a,this._lastname="",this._custom.load(p.contraptions.targets.h[a].defaultp),p.contraptions.targets.h[a].inst1name!=""&&(this._inst1len=p.contraptions.targets.h[a].inst1name.length),p.contraptions.targets.h[a].inst2name!=""&&(this._inst2len=p.contraptions.targets.h[a].inst2name.length),p.contraptions.targets.h[a].inst3name!=
""&&(this._inst3len=p.contraptions.targets.h[a].inst3name.length),!0):!1},setGraphic:function(a){this._tgname!=""&&a!=this._lastname&&(this._lastname=a,a==""?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].defaultp&&this._custom.load(p.contraptions.targets.h[this._tgname].defaultp):a=="_menu_"&&p.contraptions.targets.h[this._tgname].menus!=""?this._custom.load(p.contraptions.targets.h[this._tgname].menus):a=="_interface_"&&p.contraptions.targets.h[this._tgname].interf!=""?this._custom.load(p.contraptions.targets.h[this._tgname].interf):
this._inst1len>0&&X.substr(a,0,this._inst1len)==p.contraptions.targets.h[this._tgname].inst1name?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst1&&this._custom.load(p.contraptions.targets.h[this._tgname].inst1):this._inst2len>0&&X.substr(a,0,this._inst2len)==p.contraptions.targets.h[this._tgname].inst2name?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst2&&this._custom.load(p.contraptions.targets.h[this._tgname].inst2):this._inst3len>0&&X.substr(a,
0,this._inst3len)==p.contraptions.targets.h[this._tgname].inst3name?this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].inst3&&this._custom.load(p.contraptions.targets.h[this._tgname].inst3):this._custom.get_lastMedia()!=p.contraptions.targets.h[this._tgname].defaultp&&this._custom.load(p.contraptions.targets.h[this._tgname].defaultp))},show:function(){this.targetX=this.set_x(p.area.get_aWidth()/2);this.targetY=this.set_y(p.area.get_aHeight()/2);this.set_visible(!0);p.usingTarget=
Math.round(p.area.get_aWidth()/64);p.area.get_aHeight()/64<p.usingTarget&&(p.usingTarget=Math.round(p.area.get_aHeight()/64));p.parser.onDragMoveStop(null);this.set_alpha(1)},hide:function(){p.usingTarget=0;this.set_visible(!1);p.parser.onDragMoveStop(null)},onLoad:function(a){a?(this.removeChildren(),this._custom.set_visible(!0),this._custom.set_x(-(this._custom.get_width()/2)),this._custom.set_y(-(this._custom.get_height()/2)),this.addChild(this._custom)):this.clear()},__class__:rq});var xe=function(a,
b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c="");this._actions=new aa;this.active=!1;this.config=new aa;this._plindex=this._plws=this._ready=!1;na.call(this);this._plname=a;this._pltitle=b;this._plfile=c;this._plindex=d;this._plws=f;this._ready=!1;this.info=new tq};r["com.tilbuci.plugin.Plugin"]=xe;xe.__name__="com.tilbuci.plugin.Plugin";xe.__super__=na;xe.prototype=I(na.prototype,{plname:null,_plname:null,get_plname:function(){return this._plname},pltitle:null,_pltitle:null,get_pltitle:function(){return this._pltitle==
null||this._pltitle==""?this._plname:this._pltitle},plfile:null,_plfile:null,get_plfile:function(){return this._plfile},_plindex:null,_plws:null,ready:null,_ready:null,get_ready:function(){return this._ready},config:null,info:null,active:null,_actions:null,_access:null,initialize:function(a){var b="0";this._plindex&&(b="1");var c="0";this._plws&&(c="1");var d=p.ws,f=new aa;f.h.name=this._plname;f.h.file=this._plfile;f.h.index=b;f.h.ws=c;d.send("Plugin/GetConfig",f,m(this,this.onConfig));this._access=
a},onConfig:function(a,b){if(a&&b.map.h.e==0&&Object.prototype.hasOwnProperty.call(b.map.h,"conf")){a=0;for(var c=A.fields(b.map.h.conf);a<c.length;){var d=c[a];++a;var f=A.field(b.map.h.conf,d);this.config.h[d]=f}}this._ready=!0},addMenu:function(a,b,c){c==null&&(c=!0);if(p.mode=="editor"){var d=t.editorActions,f=new aa;f.h.name=a;f.h.callback=b;f.h.top=c;f.h.asset="btPlugin";d("addleftbutton",f)}},showWindow:function(a){var b=t.editorActions,c=new aa;c.h.wd=a;b("showwindow",c)},hideWindow:function(a){var b=
t.editorActions,c=new aa;c.h.wd=a;b("hidewindow",c)},updateConfig:function(a){var b="0";this._plindex&&(b="1");var c="0";this._plws&&(c="1");var d=new aa;d.h.name=this._plname;d.h.file=this._plfile;d.h.index=b;d.h.ws=c;b=mb.jsonStringify(this.config);d.h.conf=b;t.ws.send("Plugin/SetConfig",d,a)},setAction:function(a,b){this._actions.h[a]=b},removeAction:function(a){if(Object.prototype.hasOwnProperty.call(this._actions.h,a)){var b=this._actions;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];
return!0}return!1},hasAction:function(a){return Object.prototype.hasOwnProperty.call(this._actions.h,a)},runAction:function(a,b,c){return this.hasAction(a)?this._actions.h[a](b,c):!1},checkKeyboard:function(a){return!1},getOverlay:function(a){return p.area.getOverlay(a)},removeOverlay:function(a){return p.area.removeOverlay(a)},overlayTop:function(a){return p.area.overlayTop(a)},overlayBottom:function(a){return p.area.overlayBottom(a)},parseBool:function(a){return{found:!1,value:!1}},parseString:function(a){return{found:!1,
value:""}},parseFloat:function(a){return{found:!1,value:0}},parseInt:function(a){return{found:!1,value:0}},addActionGroupDescription:function(a){p.parser.addAvailableGroup(a)},addGlobalVarGroupDescription:function(a){p.parser.addAvailableGlobal(a)},getConfig:function(a){return{}},setConfig:function(a){},getSceneConfig:function(a,b){return{}},setSceneConfig:function(a,b){},kill:function(){this._ready=!1;for(var a=Object.keys(this._actions.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._actions;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}this._actions=null;this._access.kill();this._access=null;this.info.kill();this.info=null},__class__:xe,__properties__:{get_ready:"get_ready",get_plfile:"get_plfile",get_pltitle:"get_pltitle",get_plname:"get_plname"}});var yt=function(a,b,c,d,f){this.varString=a;this.varFloat=b;this.varInt=c;this.varBool=d;this.parser=f};r["com.tilbuci.plugin.PluginAccess"]=yt;yt.__name__="com.tilbuci.plugin.PluginAccess";yt.prototype={varString:null,varFloat:null,varInt:null,varBool:null,parser:null,
kill:function(){this.parser=this.varBool=this.varInt=this.varFloat=this.varString=null},__class__:yt};var sj=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);b==null&&(b=!0);this.extra=new aa;this.ok=!0;ka.call(this,a,d,f);this.ok=b;c!=null&&(this.extra=c)};r["com.tilbuci.plugin.PluginEvent"]=sj;sj.__name__="com.tilbuci.plugin.PluginEvent";sj.__super__=ka;sj.prototype=I(ka.prototype,{ok:null,extra:null,__class__:sj});var oa=function(){};r["feathers.core.IValidating"]=oa;oa.__name__="feathers.core.IValidating";
oa.__isInterface__=!0;oa.prototype={get_depth:null,validateNow:null,__class__:oa,__properties__:{get_depth:"get_depth"}};var Tj=function(){this._ignoreInvalidationFlags=this._setInvalidationFlagsOnly=!1;this._depth=-1;this._validationQueue=null;this._setInvalidCount=0;this._delayedInvalidationFlags=new Ye;this._invalidationFlags=new Ye;this._validating=this._allInvalid=this._allInvalidDelayed=!1;za.call(this);this.addEventListener("addedToStage",m(this,this.validatingSprite_addedToStageHandler));
this.addEventListener("removedFromStage",m(this,this.validatingSprite_removedFromStageHandler))};r["feathers.core.ValidatingSprite"]=Tj;Tj.__name__="feathers.core.ValidatingSprite";Tj.__interfaces__=[oa];Tj.__super__=za;Tj.prototype=I(za.prototype,{_validating:null,get_validating:function(){return this._validating},_allInvalid:null,_allInvalidDelayed:null,_invalidationFlags:null,_delayedInvalidationFlags:null,_setInvalidCount:null,_validationQueue:null,_depth:null,get_depth:function(){return this._depth},
isInvalid:function(a){return this._allInvalid?!0:a==null?this._invalidationFlags.keys().hasNext():this._invalidationFlags.exists(a)},_ignoreInvalidationFlags:null,runWithoutInvalidation:function(a){var b=this._ignoreInvalidationFlags;this._ignoreInvalidationFlags=!0;a();this._ignoreInvalidationFlags=b},_setInvalidationFlagsOnly:null,runWithInvalidationFlagsOnly:function(a){var b=this._setInvalidationFlagsOnly;this._setInvalidationFlagsOnly=!0;a();this._setInvalidationFlagsOnly=b},setInvalid:function(a){if(!this._ignoreInvalidationFlags)if(this._setInvalidationFlagsOnly)a==
null?this._allInvalid=!0:this.setInvalidationFlag(a);else{var b=this.isInvalid(),c=!1;this._validating&&(c=this._delayedInvalidationFlags.keys().hasNext());a==null?this._validating?this._allInvalidDelayed=!0:this._allInvalid=!0:this._validating?this._delayedInvalidationFlags.set(a,!0):a==null||this._invalidationFlags.exists(a)||this._invalidationFlags.set(a,!0);if(this._validationQueue!=null)if(this._validating){if(!c){this._setInvalidCount++;if(this._setInvalidCount>=10)throw a=u.getClass(this),
new fb(a.__name__+" returned to validation queue too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls setInvalid() during validation.");this._validationQueue.addControl(this)}}else b||(this._setInvalidCount=0,this._validationQueue.addControl(this))}},validateNow:function(){if(this.isInvalid()&&!this._validating){this._validating=!0;this.update();this._allInvalid=this._allInvalidDelayed;this._allInvalidDelayed=!1;this._invalidationFlags.clear();for(var a=
this._delayedInvalidationFlags.keys();a.hasNext();){var b=a.next();this._invalidationFlags.set(b,!0)}this._delayedInvalidationFlags.clear();this._validating=!1}},setInvalidationFlag:function(a){this._ignoreInvalidationFlags||this._invalidationFlags.exists(a)||this._invalidationFlags.set(a,!0)},update:function(){},validatingSprite_addedToStageHandler:function(a){this._depth=Qg.getDisplayObjectDepthFromStage(this);this._validationQueue=Uj.forStage(this.stage);this._validationQueue!=null&&this.isInvalid()&&
(this._setInvalidCount=0,this._validationQueue.addControl(this))},validatingSprite_removedFromStageHandler:function(a){this._depth=-1;this._validationQueue=null},__class__:Tj,__properties__:I(za.prototype.__properties__,{get_depth:"get_depth",get_validating:"get_validating"})});var Xl=function(){};r["feathers.core.IDisplayObject"]=Xl;Xl.__name__="feathers.core.IDisplayObject";Xl.__isInterface__=!0;Xl.__interfaces__=[qb];Xl.prototype={get_x:null,set_x:null,get_y:null,set_y:null,get_alpha:null,set_alpha:null,
get_width:null,set_width:null,get_height:null,set_height:null,get_scaleX:null,set_scaleX:null,get_scaleY:null,set_scaleY:null,get_visible:null,set_visible:null,parent:null,stage:null,__class__:Xl,__properties__:{set_visible:"set_visible",get_visible:"get_visible",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_alpha:"set_alpha",get_alpha:"get_alpha",set_y:"set_y",
get_y:"get_y",set_x:"set_x",get_x:"get_x"}};var Kb=function(){};r["feathers.core.IMeasureObject"]=Kb;Kb.__name__="feathers.core.IMeasureObject";Kb.__isInterface__=!0;Kb.__interfaces__=[Xl];Kb.prototype={get_explicitWidth:null,get_explicitHeight:null,get_explicitMinWidth:null,get_explicitMinHeight:null,get_explicitMaxWidth:null,get_explicitMaxHeight:null,get_minWidth:null,set_minWidth:null,get_minHeight:null,set_minHeight:null,get_maxWidth:null,set_maxWidth:null,get_maxHeight:null,set_maxHeight:null,
resetWidth:null,resetHeight:null,resetMinWidth:null,resetMinHeight:null,resetMaxWidth:null,resetMaxHeight:null,__class__:Kb,__properties__:{set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",get_explicitMaxHeight:"get_explicitMaxHeight",get_explicitMaxWidth:"get_explicitMaxWidth",get_explicitMinHeight:"get_explicitMinHeight",
get_explicitMinWidth:"get_explicitMinWidth",get_explicitHeight:"get_explicitHeight",get_explicitWidth:"get_explicitWidth"}};var Hf=function(){this._explicitWidth=this._explicitHeight=this._explicitMinWidth=this._explicitMinHeight=this._explicitMaxWidth=this._explicitMaxHeight=null;this.scaledActualMaxHeight=1/0;this.scaledActualMaxWidth=1/0;this.scaledActualWidth=this.scaledActualHeight=this.scaledActualMinWidth=this.scaledActualMinHeight=0;this.actualMaxHeight=1/0;this.actualMaxWidth=1/0;this.actualWidth=
this.actualHeight=this.actualMinWidth=this.actualMinHeight=0;Tj.call(this)};r["feathers.core.MeasureSprite"]=Hf;Hf.__name__="feathers.core.MeasureSprite";Hf.__interfaces__=[Kb];Hf.__super__=Tj;Hf.prototype=I(Tj.prototype,{actualWidth:null,actualHeight:null,actualMinWidth:null,actualMinHeight:null,actualMaxWidth:null,actualMaxHeight:null,scaledActualWidth:null,scaledActualHeight:null,scaledActualMinWidth:null,scaledActualMinHeight:null,scaledActualMaxWidth:null,scaledActualMaxHeight:null,get_width:function(){return this.scaledActualWidth},
set_width:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitWidth(a);return this.scaledActualWidth},get_height:function(){return this.scaledActualHeight},set_height:function(a){this.get_scaleY()!=1&&(a/=this.get_scaleY());this.set_explicitHeight(a);return this.scaledActualHeight},set_scaleX:function(a){Tj.prototype.set_scaleX.call(this,a);this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);
return this.get_scaleX()},set_scaleY:function(a){Tj.prototype.set_scaleY.call(this,a);this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);return this.get_scaleY()},_explicitWidth:null,get_explicitWidth:function(){return this._explicitWidth},set_explicitWidth:function(a){if(this._explicitWidth==a)return this._explicitWidth;this._explicitWidth=a;a==null?(this.scaledActualWidth=this.actualWidth=0,this.setInvalid(x.SIZE)):
this.saveMeasurements(a,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(x.SIZE);return this._explicitWidth},_explicitHeight:null,get_explicitHeight:function(){return this._explicitHeight},set_explicitHeight:function(a){if(this._explicitHeight==a)return this._explicitHeight;this._explicitHeight=a;a==null?(this.scaledActualHeight=this.actualHeight=0,this.setInvalid(x.SIZE)):this.saveMeasurements(this.actualWidth,a,this.actualMinWidth,
this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(x.SIZE);return this._explicitHeight},_explicitMinWidth:null,get_explicitMinWidth:function(){return this._explicitMinWidth},set_explicitMinWidth:function(a){if(this._explicitMinWidth==a)return this._explicitMinWidth;var b=this._explicitMinWidth;this._explicitMinWidth=a;if(a==null)this.scaledActualMinWidth=this.actualMinWidth=0,this.setInvalid(x.SIZE);else{var c=this.actualWidth;this.saveMeasurements(this.actualWidth,this.actualHeight,
a,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight);this._explicitWidth==null&&(c<a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMinWidth},_explicitMinHeight:null,get_explicitMinHeight:function(){return this._explicitMinHeight},set_explicitMinHeight:function(a){if(this._explicitMinHeight==a)return this._explicitMinHeight;var b=this._explicitMinHeight;this._explicitMinHeight=a;if(a==null)this.scaledActualMinHeight=this.actualMinHeight=0,this.setInvalid(x.SIZE);else{var c=this.actualHeight;
this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,a,this.actualMaxWidth,this.actualMaxHeight);this._explicitHeight==null&&(c<a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMinHeight},get_minWidth:function(){return this.scaledActualMinWidth},set_minWidth:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitMinWidth(a);return this.scaledActualMinWidth},get_minHeight:function(){return this.scaledActualMinHeight},set_minHeight:function(a){this.get_scaleY()!=
1&&(a/=this.get_scaleY());this.set_explicitMinHeight(a);return this.scaledActualMinHeight},_explicitMaxWidth:null,get_explicitMaxWidth:function(){return this._explicitMaxWidth},set_explicitMaxWidth:function(a){if(this._explicitMaxWidth==a)return this._explicitMaxWidth;var b=this._explicitMaxWidth;this._explicitMaxWidth=a;if(a==null)this.actualMaxWidth=1/0,this.scaledActualMaxWidth=1/0,this.setInvalid(x.SIZE);else{var c=this.actualWidth;this.saveMeasurements(this.actualWidth,this.actualHeight,this.actualMinWidth,
this.actualMinHeight,a,this.actualMaxHeight);this._explicitWidth==null&&(c>a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMaxWidth},_explicitMaxHeight:null,get_explicitMaxHeight:function(){return this._explicitMaxHeight},set_explicitMaxHeight:function(a){if(this._explicitMaxHeight==a)return this._explicitMaxHeight;var b=this._explicitMaxHeight;this._explicitMaxHeight=a;if(a==null)this.actualMaxHeight=1/0,this.scaledActualMaxHeight=1/0,this.setInvalid(x.SIZE);else{var c=this.actualHeight;this.saveMeasurements(this.actualWidth,
this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,a);this._explicitHeight==null&&(c>a||c==b)&&this.setInvalid(x.SIZE)}return this._explicitMaxHeight},get_maxWidth:function(){return this.scaledActualMaxWidth},set_maxWidth:function(a){this.get_scaleX()!=1&&(a/=this.get_scaleX());this.set_explicitMaxWidth(a);return this.scaledActualMaxWidth},get_maxHeight:function(){return this.scaledActualMaxHeight},set_maxHeight:function(a){this.get_scaleY()!=1&&(a/=this.get_scaleY());
this.set_explicitMaxHeight(a);return this.scaledActualMaxHeight},resetWidth:function(){this.set_explicitWidth(null)},resetHeight:function(){this.set_explicitHeight(null)},resetMinWidth:function(){this.set_explicitMinWidth(null)},resetMinHeight:function(){this.set_explicitMinHeight(null)},resetMaxWidth:function(){this.set_explicitMaxWidth(null)},resetMaxHeight:function(){this.set_explicitMaxHeight(null)},__getBoundsHelperMatrix1:null,__getBoundsHelperMatrix2:null,getBounds:function(a){this.__getBoundsHelperMatrix1==
null?this.__getBoundsHelperMatrix1=new S:this.__getBoundsHelperMatrix1.identity();if(a!=null&&a!=this){this.__getBoundsHelperMatrix2==null&&(this.__getBoundsHelperMatrix2=new S);var b=this.__getWorldTransform();this.__getBoundsHelperMatrix1.copyFrom(b);a=a.__getWorldTransform();this.__getBoundsHelperMatrix2.copyFrom(a);this.__getBoundsHelperMatrix2.invert();this.__getBoundsHelperMatrix1.concat(this.__getBoundsHelperMatrix2);this.__getBoundsHelperMatrix2.identity()}a=this.__getBoundsHelperMatrix1.tx;
b=this.__getBoundsHelperMatrix1.ty;var c=this.actualWidth*this.__getBoundsHelperMatrix1.a+this.actualHeight*this.__getBoundsHelperMatrix1.c+this.__getBoundsHelperMatrix1.tx-a,d=this.actualWidth*this.__getBoundsHelperMatrix1.b+this.actualHeight*this.__getBoundsHelperMatrix1.d+this.__getBoundsHelperMatrix1.ty-b;this.__getBoundsHelperMatrix1.identity();return new Ea(a,b,c,d)},saveMeasurements:function(a,b,c,d,f,g){d==null&&(d=0);c==null&&(c=0);f==null&&(f=1/0);g==null&&(g=1/0);this._explicitMinWidth!=
null&&(c=this._explicitMinWidth);this._explicitMinHeight!=null&&(d=this._explicitMinHeight);this._explicitMaxWidth!=null?f=this._explicitMaxWidth:f==null&&(f=1/0);this._explicitMaxHeight!=null?g=this._explicitMaxHeight:g==null&&(g=1/0);this._explicitMaxWidth==null&&f<c&&(f=c);this._explicitMinWidth==null&&c>f&&(c=f);this._explicitMaxHeight==null&&g<d&&(g=d);this._explicitMinHeight==null&&d>g&&(d=g);this._explicitWidth!=null?a=this._explicitWidth:a<c?a=c:a>f&&(a=f);this._explicitHeight!=null?b=this._explicitHeight:
b<d?b=d:b>g&&(b=g);var h=this.get_scaleX();h<0&&(h=-h);var l=this.get_scaleY();l<0&&(l=-l);var k=!1;this.actualWidth!=a&&(this.actualWidth=a,k=!0);this.actualHeight!=b&&(this.actualHeight=b,k=!0);this.actualMinWidth!=c&&(this.actualMinWidth=c,k=!0);this.actualMinHeight!=d&&(this.actualMinHeight=d,k=!0);this.actualMaxWidth!=f&&(this.actualMaxWidth=f,k=!0);this.actualMaxHeight!=g&&(this.actualMaxHeight=g,k=!0);a=this.scaledActualWidth;b=this.scaledActualHeight;this.scaledActualWidth=this.actualWidth*
h;this.scaledActualHeight=this.actualHeight*l;this.scaledActualMinWidth=this.actualMinWidth*h;this.scaledActualMinHeight=this.actualMinHeight*l;this.scaledActualMaxWidth=this.actualMaxWidth*h;this.scaledActualMaxHeight=this.actualMaxHeight*l;if(a!=this.scaledActualWidth||b!=this.scaledActualHeight)k=!0,W.dispatch(this,"resize");return k},__class__:Hf,__properties__:I(Tj.prototype.__properties__,{set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",
set_explicitMaxHeight:"set_explicitMaxHeight",get_explicitMaxHeight:"get_explicitMaxHeight",set_explicitMaxWidth:"set_explicitMaxWidth",get_explicitMaxWidth:"get_explicitMaxWidth",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",set_explicitMinHeight:"set_explicitMinHeight",get_explicitMinHeight:"get_explicitMinHeight",set_explicitMinWidth:"set_explicitMinWidth",get_explicitMinWidth:"get_explicitMinWidth",set_explicitHeight:"set_explicitHeight",
get_explicitHeight:"get_explicitHeight",set_explicitWidth:"set_explicitWidth",get_explicitWidth:"get_explicitWidth"})});var dc=function(){};r["feathers.layout.ILayoutObject"]=dc;dc.__name__="feathers.layout.ILayoutObject";dc.__isInterface__=!0;dc.__interfaces__=[qb];dc.prototype={get_includeInLayout:null,set_includeInLayout:null,get_layoutData:null,set_layoutData:null,__class__:dc,__properties__:{set_layoutData:"set_layoutData",get_layoutData:"get_layoutData",set_includeInLayout:"set_includeInLayout",
get_includeInLayout:"get_includeInLayout"}};var ko=function(){};r["feathers.style.IStyleObject"]=ko;ko.__name__="feathers.style.IStyleObject";ko.__isInterface__=!0;ko.prototype={get_themeEnabled:null,set_themeEnabled:null,__class__:ko,__properties__:{set_themeEnabled:"set_themeEnabled",get_themeEnabled:"get_themeEnabled"}};var If=function(){};r["feathers.style.IVariantStyleObject"]=If;If.__name__="feathers.style.IVariantStyleObject";If.__isInterface__=!0;If.__interfaces__=[ko];If.prototype={get_styleContext:null,
get_variant:null,set_variant:null,__class__:If,__properties__:{set_variant:"set_variant",get_variant:"get_variant",get_styleContext:"get_styleContext"}};var jb=function(){};r["feathers.core.IUIControl"]=jb;jb.__name__="feathers.core.IUIControl";jb.__isInterface__=!0;jb.__interfaces__=[Xl];jb.prototype={get_enabled:null,set_enabled:null,get_toolTip:null,set_toolTip:null,initializeNow:null,dispose:null,__class__:jb,__properties__:{set_toolTip:"set_toolTip",get_toolTip:"get_toolTip",set_enabled:"set_enabled",
get_enabled:"get_enabled"}};var wa=function(){this._restrictedStyles=[];this._styleProviderStyles=[];this._applyingStyles=this._clearingStyles=!1;this._focusPaddingTop=this._focusPaddingRight=this._focusPaddingBottom=this._focusPaddingLeft=0;this._focusRectSkin=null;this._alwaysShowFocus=!1;this._currentFocusRectSkin=null;this._focusEnabled=!0;this._disabledAlpha=this._focusManager=null;this._explicitAlpha=1;this._includeInLayout=!0;this._currentStyleProvider=this._customStyleProvider=null;this._themeEnabled=
!0;this._toolTip=null;this._enabled=!0;this._waitingToApplyStyles=this._initializing=this._initialized=this._created=!1;Hf.call(this);this.set_tabEnabled(u.__implements(this,ld));this.addEventListener("addedToStage",m(this,this.feathersControl_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.feathersControl_removedFromStageHandler));this.addEventListener("focusIn",m(this,this.feathersControl_focusInHandler));this.addEventListener("focusOut",m(this,this.feathersControl_focusOutHandler))};
r["feathers.core.FeathersControl"]=wa;wa.__name__="feathers.core.FeathersControl";wa.__interfaces__=[dc,If,jb];wa.__super__=Hf;wa.prototype=I(Hf.prototype,{_waitingToApplyStyles:null,_initializing:null,_initialized:null,get_initialized:function(){return this._initialized},_created:null,get_created:function(){return this._created},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==a)return this._enabled;(this._enabled=a)||this._disabledAlpha==null?
Hf.prototype.set_alpha.call(this,this._explicitAlpha):this._enabled||this._disabledAlpha==null||Hf.prototype.set_alpha.call(this,this._disabledAlpha);this.setInvalid(x.STATE);this._enabled?W.dispatch(this,"enable"):W.dispatch(this,"disable");return this._enabled},_toolTip:null,get_toolTip:function(){return this._toolTip},set_toolTip:function(a){return this._toolTip==a?this._toolTip:this._toolTip=a},_themeEnabled:null,get_themeEnabled:function(){return this._themeEnabled},set_themeEnabled:function(a){if(this._themeEnabled==
a)return this._themeEnabled;this._themeEnabled=a;this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._themeEnabled},_currentStyleProvider:null,_customStyleProvider:null,get_styleProvider:function(){return this._customStyleProvider!=null?this._customStyleProvider:this._currentStyleProvider},set_styleProvider:function(a){if(this._customStyleProvider==a)return this._customStyleProvider;this._customStyleProvider!=null&&this._customStyleProvider.removeEventListener("clear",
m(this,this.feathersControl_customStyleProvider_clearHandler));this._customStyleProvider=a;this._customStyleProvider!=null&&this._customStyleProvider.addEventListener("clear",m(this,this.feathersControl_customStyleProvider_clearHandler),!1,0,!0);this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._customStyleProvider},get_styleContext:function(){return null},_includeInLayout:null,get_includeInLayout:function(){return this._includeInLayout},
set_includeInLayout:function(a){if(this._includeInLayout==a)return this._includeInLayout;this._includeInLayout=a;W.dispatch(this,"layoutDataChange");return this._includeInLayout},_layoutData:null,get_layoutData:function(){return this._layoutData},set_layoutData:function(a){if(!this.setStyle("layoutData"))return this._layoutData;this._previousClearStyle=m(this,this.clearStyle_layoutData);return this.setLayoutDataInternal(a)},_explicitAlpha:null,set_alpha:function(a){this._explicitAlpha=a;(this._enabled||
this._disabledAlpha==null)&&Hf.prototype.set_alpha.call(this,a);return this._explicitAlpha},_disabledAlpha:null,get_disabledAlpha:function(){return this._disabledAlpha},set_disabledAlpha:function(a){if(!this.setStyle("disabledAlpha"))return this._disabledAlpha;this._previousClearStyle=m(this,this.clearStyle_disabledAlpha);this._disabledAlpha=a;this._enabled||this._disabledAlpha==null?Hf.prototype.set_alpha.call(this,this._explicitAlpha):this._enabled||this._disabledAlpha==null||Hf.prototype.set_alpha.call(this,
this._disabledAlpha);return this._disabledAlpha},_focusManager:null,get_focusManager:function(){return this._focusManager},set_focusManager:function(a){if(this._focusManager==a)return this._focusManager;this._focusManager!=null&&this.showFocus(!1);return this._focusManager=a},_focusOwner:null,get_focusOwner:function(){return this._focusOwner},set_focusOwner:function(a){return this._focusOwner==a?this._focusOwner:this._focusOwner=a},get_rawTabEnabled:function(){return Hf.prototype.get_tabEnabled.call(this)},
_focusEnabled:null,get_focusEnabled:function(){return this._enabled?this._focusEnabled:!1},set_focusEnabled:function(a){return this._focusEnabled==a?this._focusEnabled:this._focusEnabled=a},get_tabEnabled:function(){return this._enabled?Hf.prototype.get_tabEnabled.call(this):!1},_currentFocusRectSkin:null,_alwaysShowFocus:null,get_alwaysShowFocus:function(){return this._alwaysShowFocus},set_alwaysShowFocus:function(a){if(!this.setStyle("alwaysShowFocus"))return this._alwaysShowFocus;var b=this._focusManager!=
null&&u.__implements(this,ld)&&this._focusManager.get_focus()==this||this._focusRectSkin.parent!=null;b&&this.showFocus(!1);this._alwaysShowFocus=a;b&&this.showFocus(!0);return this._alwaysShowFocus},_focusRectSkin:null,get_focusRectSkin:function(){return this._focusRectSkin},set_focusRectSkin:function(a){if(!this.setStyle("focusRectSkin"))return this._focusRectSkin;this.showFocus(!1);this._previousClearStyle=m(this,this.clearStyle_focusRectSkin);return this._focusRectSkin=a},_focusPaddingTop:null,
get_focusPaddingTop:function(){return this._focusPaddingTop},set_focusPaddingTop:function(a){if(!this.setStyle("focusPaddingTop"))return this._focusPaddingTop;this._previousClearStyle=m(this,this.clearStyle_focusPaddingTop);return this._focusPaddingTop=a},_focusPaddingRight:null,get_focusPaddingRight:function(){return this._focusPaddingRight},set_focusPaddingRight:function(a){if(!this.setStyle("focusPaddingRight"))return this._focusPaddingRight;this._previousClearStyle=m(this,this.clearStyle_focusPaddingRight);
return this._focusPaddingRight=a},_focusPaddingBottom:null,get_focusPaddingBottom:function(){return this._focusPaddingBottom},set_focusPaddingBottom:function(a){if(!this.setStyle("focusPaddingBottom"))return this._focusPaddingBottom;this._previousClearStyle=m(this,this.clearStyle_focusPaddingBottom);return this._focusPaddingBottom=a},_focusPaddingLeft:null,get_focusPaddingLeft:function(){return this._focusPaddingLeft},set_focusPaddingLeft:function(a){if(!this.setStyle("focusPaddingLeft"))return this._focusPaddingLeft;
this._previousClearStyle=m(this,this.clearStyle_focusPaddingLeft);return this._focusPaddingLeft=a},setFocusPadding:function(a){this.set_focusPaddingTop(a);this.set_focusPaddingRight(a);this.set_focusPaddingBottom(a);this.set_focusPaddingLeft(a)},showFocus:function(a){this._currentFocusRectSkin=this.getCurrentFocusRectSkin();this._focusManager!=null&&this._currentFocusRectSkin!=null&&(a?(this._focusManager.get_focusPane().addChild(this._currentFocusRectSkin),this.addEventListener("enterFrame",m(this,
this.feathersControl_focusRect_enterFrameHandler)),this.positionFocusRect()):this._currentFocusRectSkin.parent!=null&&(this.removeEventListener("enterFrame",m(this,this.feathersControl_focusRect_enterFrameHandler)),this._currentFocusRectSkin.parent.removeChild(this._currentFocusRectSkin)))},getCurrentFocusRectSkin:function(){return this._focusRectSkin},clearStyle_layoutData:function(){return this.setLayoutDataInternal(null)},clearStyle_focusRectSkin:function(){this.showFocus(!1);return this._focusRectSkin=
null},clearStyle_disabledAlpha:function(){this._disabledAlpha=null;Hf.prototype.set_alpha.call(this,this._explicitAlpha);return this._disabledAlpha},clearStyle_focusPaddingTop:function(){return this._focusPaddingTop=0},clearStyle_focusPaddingRight:function(){return this._focusPaddingRight=0},clearStyle_focusPaddingBottom:function(){return this._focusPaddingBottom=0},clearStyle_focusPaddingLeft:function(){return this._focusPaddingLeft=0},positionFocusRect:function(){if(this._focusManager!=null&&this._currentFocusRectSkin!=
null&&this._currentFocusRectSkin.parent!=null){var a=new Qa(-this._focusPaddingLeft,-this._focusPaddingTop);a=this.localToGlobal(a);a=this._focusManager.get_focusPane().globalToLocal(a);this._currentFocusRectSkin.set_x(a.x);this._currentFocusRectSkin.set_y(a.y);a.setTo(this.actualWidth+this._focusPaddingRight,this.actualHeight+this._focusPaddingBottom);a=this.localToGlobal(a);a=this._focusManager.get_focusPane().globalToLocal(a);this._currentFocusRectSkin.set_width(a.x-this._currentFocusRectSkin.get_x());
this._currentFocusRectSkin.set_height(a.y-this._currentFocusRectSkin.get_y())}},setLayoutDataInternal:function(a){if(this._layoutData==a)return this._layoutData;this._layoutData!=null&&this._layoutData.removeEventListener("change",m(this,this.feathersControl_layoutData_changeHandler));this._layoutData=a;this._layoutData!=null&&this._layoutData.addEventListener("change",m(this,this.feathersControl_layoutData_changeHandler),!1,0,!0);W.dispatch(this,"layoutDataChange");return this._layoutData},_variant:null,
get_variant:function(){return this._variant},set_variant:function(a){if(this._variant==a)return this._variant;this._variant=a;this._initialized&&this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0;this.setInvalid(x.STYLES);return this._variant},_applyingStyles:null,_clearingStyles:null,_styleProviderStyles:null,_restrictedStyles:null,validateNow:function(){if(!this._initialized){if(this._initializing)throw new fb("A component cannot validate until after it has finished initializing.");
this.initializeNow()}this._waitingToApplyStyles&&this.applyStyles();Hf.prototype.validateNow.call(this);this._created||(this._created=!0,W.dispatch(this,"creationComplete"))},initializeNow:function(){this._initialized||this._initializing||(this._initializing=this._waitingToApplyStyles=!0,this.initialize(),this.setInvalid(),this._initializing=!1,this._initialized=!0,W.dispatch(this,"initialize"))},move:function(a,b){this.set_x(a);this.set_y(b)},setSize:function(a,b){this.set_width(a);this.set_height(b)},
dispose:function(){this.clearStyles();for(var a=0,b=this.get_numChildren();a<b;){var c=a++;c=this.getChildAt(c);u.__implements(c,jb)&&c.dispose()}},initialize:function(){},setStyle:function(a,b){a=b==null?lo.Name(a):lo.NameAndState(a,b);b=this.containsStyleDef(this._restrictedStyles,a);if(this._applyingStyles&&b)return!1;this._applyingStyles?this._clearingStyles||this.containsStyleDef(this._styleProviderStyles,a)||this._styleProviderStyles.push(a):b||(!this._clearingStyles&&this.containsStyleDef(this._styleProviderStyles,
a)&&X.remove(this._styleProviderStyles,a),this._restrictedStyles.push(a));return!0},isStyleRestricted:function(a,b){a=b==null?lo.Name(a):lo.NameAndState(a,b);return this.containsStyleDef(this._restrictedStyles,a)},containsStyleDef:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(Aa.enumEq(b,d))return!0}return!1},applyStyles:function(){if(!this._initialized)throw new fb("Cannot apply styles until after a Feathers UI component has initialized.");this._waitingToApplyStyles=!1;var a=this._customStyleProvider;
if(a==null){var b=Wb.getTheme(this);b!=null&&(a=b.getStyleProvider(this))}this._themeEnabled&&a==null&&(b=Wb.get_fallbackTheme(),b!=null&&(a=b.getStyleProvider(this)));a==null&&(a=this._currentStyleProvider);this._currentStyleProvider!=a&&(this._currentStyleProvider!=null&&(this._currentStyleProvider.removeEventListener("stylesChange",m(this,this.feathersControl_styleProvider_stylesChangeHandler)),this._currentStyleProvider.removeEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler))),
this._currentStyleProvider=a,this._currentStyleProvider!=null&&(this._currentStyleProvider.addEventListener("stylesChange",m(this,this.feathersControl_styleProvider_stylesChangeHandler),!1,0,!0),this._currentStyleProvider.addEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler),!1,0,!0)));a=this._applyingStyles;this._applyingStyles=!0;this.clearStyles();this._currentStyleProvider!=null&&this._currentStyleProvider.applyStyles(this);this._applyingStyles=a},_previousClearStyle:null,
clearStyles:function(){var a=this._clearingStyles;this._clearingStyles=!0;for(var b=0,c=this._styleProviderStyles;b<c.length;){var d=c[b];++b;switch(d._hx_index){case 0:d="clearStyle_"+d.name;var f=A.field(this,d);if(f==null)throw new rb("Missing @style method: '"+d+"'");f.apply(this,[]);break;case 1:f=d.state,A.field(this,d.name).apply(this,[f,null])}}this._styleProviderStyles=[];this._clearingStyles=a},clearStyleProvider:function(){this._currentStyleProvider!=null&&(this._currentStyleProvider.removeEventListener("stylesChange",
m(this,this.feathersControl_styleProvider_stylesChangeHandler)),this._currentStyleProvider.removeEventListener("clear",m(this,this.feathersControl_styleProvider_clearHandler)),this._currentStyleProvider=null,this._waitingToApplyStyles=!0)},feathersControl_addedToStageHandler:function(a){this._initialized||this.initializeNow();this._waitingToApplyStyles&&this.applyStyles()},feathersControl_removedFromStageHandler:function(a){this.showFocus(!1);this.clearStyleProvider()},feathersControl_focusInHandler:function(a){a=
null;u.__implements(this,ld)&&(a=this);this._focusManager!=null&&(this._focusManager.get_showFocusIndicator()||this.get_alwaysShowFocus())&&this._focusManager.get_focus()==a&&this.showFocus(!0)},feathersControl_focusOutHandler:function(a){this._focusManager!=null&&this.showFocus(!1)},feathersControl_styleProvider_stylesChangeHandler:function(a){a.affectsTarget(this)&&(this.stage!=null?this.applyStyles():this._waitingToApplyStyles=!0)},feathersControl_customStyleProvider_clearHandler:function(a){this._customStyleProvider.removeEventListener("clear",
m(this,this.feathersControl_customStyleProvider_clearHandler));this._customStyleProvider=null},feathersControl_styleProvider_clearHandler:function(a){this.clearStyleProvider();this.stage!=null&&this.applyStyles()},feathersControl_layoutData_changeHandler:function(a){W.dispatch(this,"layoutDataChange")},feathersControl_focusRect_enterFrameHandler:function(a){this.positionFocusRect()},__class__:wa,__properties__:I(Hf.prototype.__properties__,{set_variant:"set_variant",get_variant:"get_variant",set_focusPaddingLeft:"set_focusPaddingLeft",
get_focusPaddingLeft:"get_focusPaddingLeft",set_focusPaddingBottom:"set_focusPaddingBottom",get_focusPaddingBottom:"get_focusPaddingBottom",set_focusPaddingRight:"set_focusPaddingRight",get_focusPaddingRight:"get_focusPaddingRight",set_focusPaddingTop:"set_focusPaddingTop",get_focusPaddingTop:"get_focusPaddingTop",set_focusRectSkin:"set_focusRectSkin",get_focusRectSkin:"get_focusRectSkin",set_alwaysShowFocus:"set_alwaysShowFocus",get_alwaysShowFocus:"get_alwaysShowFocus",set_focusEnabled:"set_focusEnabled",
get_focusEnabled:"get_focusEnabled",get_rawTabEnabled:"get_rawTabEnabled",set_focusOwner:"set_focusOwner",get_focusOwner:"get_focusOwner",set_focusManager:"set_focusManager",get_focusManager:"get_focusManager",set_disabledAlpha:"set_disabledAlpha",get_disabledAlpha:"get_disabledAlpha",set_layoutData:"set_layoutData",get_layoutData:"get_layoutData",set_includeInLayout:"set_includeInLayout",get_includeInLayout:"get_includeInLayout",get_styleContext:"get_styleContext",set_styleProvider:"set_styleProvider",
get_styleProvider:"get_styleProvider",set_themeEnabled:"set_themeEnabled",get_themeEnabled:"get_themeEnabled",set_toolTip:"set_toolTip",get_toolTip:"get_toolTip",set_enabled:"set_enabled",get_enabled:"get_enabled",get_created:"get_created",get_initialized:"get_initialized"})});var tj=function(){};r["feathers.core.IFocusManagerAware"]=tj;tj.__name__="feathers.core.IFocusManagerAware";tj.__isInterface__=!0;tj.prototype={get_focusManager:null,set_focusManager:null,__class__:tj,__properties__:{set_focusManager:"set_focusManager",
get_focusManager:"get_focusManager"}};var ld=function(){};r["feathers.core.IFocusObject"]=ld;ld.__name__="feathers.core.IFocusObject";ld.__isInterface__=!0;ld.__interfaces__=[Xl,tj];ld.prototype={get_focusEnabled:null,set_focusEnabled:null,get_focusOwner:null,set_focusOwner:null,showFocus:null,__class__:ld,__properties__:{set_focusOwner:"set_focusOwner",get_focusOwner:"get_focusOwner",set_focusEnabled:"set_focusEnabled",get_focusEnabled:"get_focusEnabled"}};var x=O["feathers.core.InvalidationFlag"]=
{__ename__:"feathers.core.InvalidationFlag",__constructs__:null,STATE:{_hx_name:"STATE",_hx_index:0,__enum__:"feathers.core.InvalidationFlag",toString:D},SIZE:{_hx_name:"SIZE",_hx_index:1,__enum__:"feathers.core.InvalidationFlag",toString:D},STYLES:{_hx_name:"STYLES",_hx_index:2,__enum__:"feathers.core.InvalidationFlag",toString:D},SKIN:{_hx_name:"SKIN",_hx_index:3,__enum__:"feathers.core.InvalidationFlag",toString:D},LAYOUT:{_hx_name:"LAYOUT",_hx_index:4,__enum__:"feathers.core.InvalidationFlag",
toString:D},DATA:{_hx_name:"DATA",_hx_index:5,__enum__:"feathers.core.InvalidationFlag",toString:D},SCROLL:{_hx_name:"SCROLL",_hx_index:6,__enum__:"feathers.core.InvalidationFlag",toString:D},SELECTION:{_hx_name:"SELECTION",_hx_index:7,__enum__:"feathers.core.InvalidationFlag",toString:D},FOCUS:{_hx_name:"FOCUS",_hx_index:8,__enum__:"feathers.core.InvalidationFlag",toString:D},SORT:{_hx_name:"SORT",_hx_index:9,__enum__:"feathers.core.InvalidationFlag",toString:D},CUSTOM:(G=function(a){return{_hx_index:10,
value:a,__enum__:"feathers.core.InvalidationFlag",toString:D}},G._hx_name="CUSTOM",G.__params__=["value"],G)};x.__constructs__=[x.STATE,x.SIZE,x.STYLES,x.SKIN,x.LAYOUT,x.DATA,x.SCROLL,x.SELECTION,x.FOCUS,x.SORT,x.CUSTOM];var Ec=function(){};r["feathers.utils.DisplayObjectFactory"]=Ec;Ec.__name__="feathers.utils.DisplayObjectFactory";Ec.withDisplayObject=function(a,b){var c=new Ec;c.create=function(){return a};c.destroy=b;return c};Ec.withClass=function(a,b){b==null&&(b=function(d){u.__implements(d,
jb)&&d.dispose()});var c=new Ec;c.create=function(){return Aa.createInstance(a,[])};c.destroy=b;return c};Ec.withFunction=function(a,b){var c=new Ec;c.create=a;c.destroy=b;return c};Ec.prototype={create:function(){return null},destroy:function(a){},__class__:Ec};var u=function(){};r["js.Boot"]=u;u.__name__="js.Boot";u.getClass=function(a){if(a==null)return null;if(a instanceof Array)return Array;var b=a.__class__;if(b!=null)return b;a=u.__nativeClassName(a);return a!=null?u.__resolveNativeClass(a):
null};u.__string_rec=function(a,b){if(a==null)return"null";if(b.length>=5)return"<...>";var c=typeof a;c=="function"&&(a.__name__||a.__ename__)&&(c="object");switch(c){case "function":return"<function>";case "object":if(a.__enum__){var d=O[a.__enum__].__constructs__[a._hx_index];c=d._hx_name;if(d.__params__){b+="\t";var f=[],g=0;for(d=d.__params__;g<d.length;){var h=d[g];g+=1;f.push(u.__string_rec(a[h],b))}return c+"("+f.join(",")+")"}return c}if(a instanceof Array){c="[";b+="\t";f=0;for(g=a.length;f<
g;)d=f++,c+=(d>0?",":"")+u.__string_rec(a[d],b);return c+"]"}try{f=a.toString}catch(l){return Rb.lastError=l,"???"}if(f!=null&&f!=Object.toString&&typeof f=="function"&&(c=a.toString(),c!="[object Object]"))return c;c="{\n";b+="\t";f=a.hasOwnProperty!=null;g=null;for(g in a)f&&!a.hasOwnProperty(g)||g=="prototype"||g=="__class__"||g=="__super__"||g=="__interfaces__"||g=="__properties__"||(c.length!=2&&(c+=", \n"),c+=b+g+" : "+u.__string_rec(a[g],b));b=b.substring(1);return c+("\n"+b+"}");case "string":return a;
default:return String(a)}};u.__interfLoop=function(a,b){if(a==null)return!1;if(a==b)return!0;var c=a.__interfaces__;if(c!=null)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];if(g==b||u.__interfLoop(g,b))return!0}return u.__interfLoop(a.__super__,b)};u.__instanceof=function(a,b){if(b==null)return!1;switch(b){case Array:return a instanceof Array;case Yw:return typeof a=="boolean";case nx:return a!=null;case Zw:return typeof a=="number";case Ft:return typeof a=="number"?(a|0)===a:!1;case String:return typeof a==
"string";default:if(a!=null)if(typeof b=="function"){if(u.__downcastCheck(a,b))return!0}else{if(typeof b=="object"&&u.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==Gt&&a.__name__!=null||b==$w&&a.__ename__!=null?!0:a.__enum__!=null?O[a.__enum__]==b:!1}};u.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?u.__interfLoop(u.getClass(a),b):!1};u.__implements=function(a,b){return u.__interfLoop(u.getClass(a),b)};u.__cast=function(a,b){if(a==null||u.__instanceof(a,
b))return a;throw la.thrown("Cannot cast "+L.string(a)+" to "+L.string(b));};u.__nativeClassName=function(a){a=u.__toStr.call(a).slice(8,-1);return a=="Object"||a=="Function"||a=="Math"||a=="JSON"?null:a};u.__isNativeObj=function(a){return u.__nativeClassName(a)!=null};u.__resolveNativeClass=function(a){return sa[a]};var jl=function(){};r["feathers.controls.IRange"]=jl;jl.__name__="feathers.controls.IRange";jl.__isInterface__=!0;jl.__interfaces__=[jb];jl.prototype={get_value:null,set_value:null,get_minimum:null,
set_minimum:null,get_maximum:null,set_maximum:null,__class__:jl,__properties__:{set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"}};var mo=function(){};r["feathers.controls.IScrollBar"]=mo;mo.__name__="feathers.controls.IScrollBar";mo.__isInterface__=!0;mo.__interfaces__=[jl];mo.prototype={get_step:null,set_step:null,get_page:null,set_page:null,__class__:mo,__properties__:{set_page:"set_page",get_page:"get_page",
set_step:"set_step",get_step:"get_step"}};var mh=function(){};r["feathers.core.IStateContext"]=mh;mh.__name__="feathers.core.IStateContext";mh.__isInterface__=!0;mh.__interfaces__=[qb];mh.prototype={get_currentState:null,__class__:mh,__properties__:{get_currentState:"get_currentState"}};var Fh=function(){};r["feathers.controls.ITriggerView"]=Fh;Fh.__name__="feathers.controls.ITriggerView";Fh.__isInterface__=!0;Fh.__interfaces__=[jb];var di=function(a){this.__backgroundSkin=null;this.__keepDownStateOnRollOut=
!1;this._stateToSkin=new Ye;this._pointerToState=this._keyToState=this._pointerTrigger=this._backgroundSkinMeasurements=this._currentBackgroundSkin=null;this._currentState=Cc.UP;wa.call(this);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.addEventListener("click",m(this,this.basicButton_clickHandler));this.addEventListener("touchTap",m(this,this.basicButton_touchTapHandler));a!=null&&this.addEventListener("trigger",a)};r["feathers.controls.BasicButton"]=di;di.__name__="feathers.controls.BasicButton";
di.__interfaces__=[mh,Fh];di.__super__=wa;di.prototype=I(wa.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){wa.prototype.set_enabled.call(this,a);this._enabled?this._currentState==Cc.DISABLED&&this.changeState(Cc.UP):this.changeState(Cc.DISABLED);return this._enabled},_pointerToState:null,_keyToState:null,_pointerTrigger:null,_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},
setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initialize:function(){wa.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new Yl(this,m(this,this.changeState),Cc.UP,Cc.DOWN,Cc.HOVER));this._keyToState==null&&(this._keyToState=
new Wm(this,m(this,this.changeState),Cc.UP,Cc.DOWN));this._pointerTrigger==null&&(this._pointerTrigger=new uq(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(x.STYLES),b=this.isInvalid(x.STATE);(a||b)&&this.refreshBackgroundSkin();a&&this.refreshInteractivity()},layoutContent:function(){this.layoutBackgroundSkin()},refreshInteractivity:function(){this._pointerToState.set_keepDownStateOnRollOut(this.get_keepDownStateOnRollOut())},
refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this.get_backgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),
this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),u.__implements(a,Td)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==
null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();
var l=this.get_explicitWidth();a&&(l=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_width():0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_height():0);b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null?this._backgroundSkinMeasurements.minWidth:0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._backgroundSkinMeasurements!=
null&&this._backgroundSkinMeasurements.minHeight!=null?this._backgroundSkinMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,
a,b,c,d,f)},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},changeState:function(a){this._enabled||
(a=Cc.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},basicButton_clickHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicButton_touchTapHandler:function(a){this._enabled||a.stopImmediatePropagation()},__keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this.__keepDownStateOnRollOut},set_keepDownStateOnRollOut:function(a){if(!this.setStyle("keepDownStateOnRollOut")||this.__keepDownStateOnRollOut==
a)return this.__keepDownStateOnRollOut;this._previousClearStyle=m(this,this.clearStyle_keepDownStateOnRollOut);this.__keepDownStateOnRollOut=a;this.setInvalid(x.STYLES);return this.__keepDownStateOnRollOut},clearStyle_keepDownStateOnRollOut:function(){this.set_keepDownStateOnRollOut(!1);return this.get_keepDownStateOnRollOut()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==
a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__class__:di,__properties__:I(wa.prototype.__properties__,{set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",
get_currentState:"get_currentState"})});var kl=function(){};r["feathers.core.IHTMLTextControl"]=kl;kl.__name__="feathers.core.IHTMLTextControl";kl.__isInterface__=!0;kl.__interfaces__=[jb];kl.prototype={get_htmlText:null,set_htmlText:null,__class__:kl,__properties__:{set_htmlText:"set_htmlText",get_htmlText:"get_htmlText"}};var de=function(){};r["feathers.core.ITextControl"]=de;de.__name__="feathers.core.ITextControl";de.__isInterface__=!0;de.__interfaces__=[jb];de.prototype={get_text:null,set_text:null,
get_baseline:null,__class__:de,__properties__:{get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"}};var Qb=function(a,b){this.__showText=!0;this.__gap=this.__minGap=this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__iconPosition=ja.LEFT;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.CENTER;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__icon=null;this.__embedFonts=this.__wordWrap=!1;this.__textFormat=
this.__styleSheet=this.__disabledTextFormat=null;this._stateToTextFormat=new Ye;this._ignoreIconResizes=this._wrappedOnMeasure=!1;this._iconMeasurements=this._currentIcon=null;this._stateToIcon=new Ye;this._htmlText=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeButtonTheme();di.call(this,b);this.set_text(a);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=!1;this.addEventListener("keyDown",
m(this,this.button_keyDownHandler));this.addEventListener("focusIn",m(this,this.button_focusInHandler));this.addEventListener("focusOut",m(this,this.button_focusOutHandler))};r["feathers.controls.Button"]=Qb;Qb.__name__="feathers.controls.Button";Qb.__interfaces__=[ld,kl,de];Qb.__super__=di;Qb.prototype=I(di.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_text:null,get_text:function(){return this._text},
set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=null&&this._text.length>0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();
if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToIcon:null,
_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_stateToTextFormat:null,getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),this.setInvalid(x.STYLES))},getIconForState:function(a){return this._stateToIcon.get(a)},setIconForState:function(a,
b){if(this.setStyle("setIconForState",a)){var c=this._stateToIcon.get(a);c!=null&&c==this._currentIcon&&(this.removeCurrentIcon(c),this._currentIcon=null);b==null?this._stateToIcon.remove(a):this._stateToIcon.set(a,b);this.setInvalid(x.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeButtonTheme:function(){Ht.initialize()},initialize:function(){di.prototype.initialize.call(this);this.textField==null&&(this.textField=
new Jc,this.textField.set_selectable(!1),this.textField.set_multiline(!0),this.addChild(this.textField))},commitChanges:function(){di.prototype.commitChanges.call(this);var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(d||c)&&this.refreshIcon();(d||c)&&this.refreshTextStyles();(a||d||c||b)&&this.refreshText(b)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this.get_showText()&&this._text!=null,l=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;(h||l)&&this.refreshTextFieldDimensions(!0);this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);
u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();u.__implements(this._currentIcon,oa)&&(l=this._ignoreIconResizes,this._ignoreIconResizes=!0,this._currentIcon.validateNow(),this._ignoreIconResizes=l);l=this.get_explicitWidth();a&&(l=this.measureContentWidth(),l+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(l=Math.max(this._currentBackgroundSkin.get_width(),l)));a=this.get_explicitHeight();b&&(a=this.measureContentHeight(),
a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.measureContentMinWidth(),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this.measureContentMinHeight(),
c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=
null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+
this.get_paddingRight();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentIcon==null||this.get_iconPosition()!=ja.LEFT&&this.get_iconPosition()!=ja.RIGHT||(u.__implements(this._currentIcon,oa)&&this._currentIcon.validateNow(),a-=this._currentIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:
0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:
0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:
0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:
0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),
this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.button_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.button_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),
this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this.get_showText()&&this._text!=null&&this._text.length>0,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),
this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&
this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){if(this.get_styleSheet()!=null)return null;var a=this._stateToTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){di.prototype.layoutContent.call(this);this.layoutChildren()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);
var a=this.get_showText()&&this._text!=null,b=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,c=this._currentIcon!=null&&this.get_iconPosition()!=ja.MANUAL;(a||b)&&c?(this.positionSingleChild(this.textField),this.positionTextAndIcon()):a||b?this.positionSingleChild(this.textField):c&&this.positionSingleChild(this._currentIcon);this._currentIcon!=null&&(this.get_iconPosition()==ja.MANUAL&&(this._currentIcon.set_x(this.get_paddingLeft()),this._currentIcon.set_y(this.get_paddingTop())),
c=this._currentIcon,c.set_x(c.get_x()+this.get_iconOffsetX()),c=this._currentIcon,c.set_y(c.get_y()+this.get_iconOffsetY()));if(a||b)c=this.textField,c.set_x(c.get_x()+this.get_textOffsetX()),c=this.textField,c.set_y(c.get_y()+this.get_textOffsetY())},refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;u.__implements(this._currentIcon,oa)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&
this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();if(this._currentIcon!=null){a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==
ja.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)c-=this._currentIcon.get_height()+a}b>this._textMeasuredWidth&&(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},positionSingleChild:function(a){this.get_horizontalAlign()==
Vb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.RIGHT?a.set_x(this.actualWidth-this.get_paddingRight()-a.get_width()):a.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-a.get_width())/2);this.get_verticalAlign()==fc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.BOTTOM?a.set_y(this.actualHeight-this.get_paddingBottom()-a.get_height()):a.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-
a.get_height())/2)},positionTextAndIcon:function(){if(this.get_iconPosition()==ja.TOP)if(this.get_gap()==1/0)this._currentIcon.set_y(this.get_paddingTop()),this.textField.set_y(this.actualHeight-this.get_paddingBottom()-this.textField.get_height());else{if(this.get_verticalAlign()==fc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==fc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap())/
2));this._currentIcon.set_y(this.textField.get_y()-this._currentIcon.get_height()-this.get_gap())}else this.get_iconPosition()==ja.RIGHT?this.get_gap()==1/0?(this.textField.set_x(this.get_paddingLeft()),this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width())):(this.get_horizontalAlign()==Vb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Vb.CENTER&&(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+
this.get_gap())/2)),this._currentIcon.set_x(this.textField.get_x()+this.textField.get_width()+this.get_gap())):this.get_iconPosition()==ja.BOTTOM?this.get_gap()==1/0?(this.textField.set_y(this.get_paddingTop()),this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height())):(this.get_verticalAlign()==fc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==fc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()-
(this._currentIcon.get_height()+this.get_gap())/2)),this._currentIcon.set_y(this.textField.get_y()+this.textField.get_height()+this.get_gap())):this.get_iconPosition()==ja.LEFT&&(this.get_gap()==1/0?(this._currentIcon.set_x(this.get_paddingLeft()),this.textField.set_x(this.actualWidth-this.get_paddingRight()-this.textField.get_width())):(this.get_horizontalAlign()==Vb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Vb.CENTER&&(a=
this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width())/2)),this._currentIcon.set_x(this.textField.get_x()-this.get_gap()-this._currentIcon.get_width())));this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT?this.get_verticalAlign()==fc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.BOTTOM?this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height()):this._currentIcon.set_y(this.get_paddingTop()+
(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentIcon.get_height())/2):this.get_horizontalAlign()==Vb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.RIGHT?this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width()):this._currentIcon.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentIcon.get_width())/2)},refreshIcon:function(){var a=this._currentIcon;
this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this.addCurrentIcon(this._currentIcon))},addCurrentIcon:function(a){if(a==null)this._iconMeasurements=null;else{u.__implements(a,jb)&&a.initializeNow();this._iconMeasurements==null?this._iconMeasurements=new Ib(a):this._iconMeasurements.save(a);u.__implements(a,wb)&&a.set_uiContext(this);u.__implements(a,Td)&&a.set_stateContext(this);a.addEventListener("resize",m(this,this.button_icon_resizeHandler),!1,0,!0);
var b=this.getChildIndex(this.textField);this.addChildAt(a,b)}},getCurrentIcon:function(){var a=this._stateToIcon.get(this._currentState);return a!=null?a:this.get_icon()},removeCurrentIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.button_icon_resizeHandler)),u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},button_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&
this.focusRect==1||this._focusManager!=null&&this._focusManager.get_focus()!=this||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Bc("click")))},button_focusInHandler:function(a){this._keyToState.set_enabled(this._enabled)},button_focusOutHandler:function(a){this._keyToState.set_enabled(!1)},button_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},button_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return Qb},
__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||
this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);
return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__icon:null,get_icon:function(){return this.__icon},
set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);
this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);
return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==
a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.CENTER);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=
m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);return this.get_verticalAlign()},__iconPosition:null,get_iconPosition:function(){return this.__iconPosition},set_iconPosition:function(a){if(!this.setStyle("iconPosition")||this.__iconPosition==a)return this.__iconPosition;this._previousClearStyle=m(this,this.clearStyle_iconPosition);this.__iconPosition=a;this.setInvalid(x.STYLES);
return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(ja.LEFT);return this.get_iconPosition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||
this.__minGap==a)return this.__minGap;this._previousClearStyle=m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__iconOffsetX:null,get_iconOffsetX:function(){return this.__iconOffsetX},set_iconOffsetX:function(a){if(!this.setStyle("iconOffsetX")||this.__iconOffsetX==a)return this.__iconOffsetX;this._previousClearStyle=m(this,this.clearStyle_iconOffsetX);this.__iconOffsetX=a;this.setInvalid(x.STYLES);
return this.__iconOffsetX},clearStyle_iconOffsetX:function(){this.set_iconOffsetX(0);return this.get_iconOffsetX()},__iconOffsetY:null,get_iconOffsetY:function(){return this.__iconOffsetY},set_iconOffsetY:function(a){if(!this.setStyle("iconOffsetY")||this.__iconOffsetY==a)return this.__iconOffsetY;this._previousClearStyle=m(this,this.clearStyle_iconOffsetY);this.__iconOffsetY=a;this.setInvalid(x.STYLES);return this.__iconOffsetY},clearStyle_iconOffsetY:function(){this.set_iconOffsetY(0);return this.get_iconOffsetY()},
__textOffsetX:null,get_textOffsetX:function(){return this.__textOffsetX},set_textOffsetX:function(a){if(!this.setStyle("textOffsetX")||this.__textOffsetX==a)return this.__textOffsetX;this._previousClearStyle=m(this,this.clearStyle_textOffsetX);this.__textOffsetX=a;this.setInvalid(x.STYLES);return this.__textOffsetX},clearStyle_textOffsetX:function(){this.set_textOffsetX(0);return this.get_textOffsetX()},__textOffsetY:null,get_textOffsetY:function(){return this.__textOffsetY},set_textOffsetY:function(a){if(!this.setStyle("textOffsetY")||
this.__textOffsetY==a)return this.__textOffsetY;this._previousClearStyle=m(this,this.clearStyle_textOffsetY);this.__textOffsetY=a;this.setInvalid(x.STYLES);return this.__textOffsetY},clearStyle_textOffsetY:function(){this.set_textOffsetY(0);return this.get_textOffsetY()},__showText:null,get_showText:function(){return this.__showText},set_showText:function(a){if(!this.setStyle("showText")||this.__showText==a)return this.__showText;this._previousClearStyle=m(this,this.clearStyle_showText);this.__showText=
a;this.setInvalid(x.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);return this.get_showText()},__class__:Qb,__properties__:I(di.prototype.__properties__,{set_showText:"set_showText",get_showText:"get_showText",set_textOffsetY:"set_textOffsetY",get_textOffsetY:"get_textOffsetY",set_textOffsetX:"set_textOffsetX",get_textOffsetX:"get_textOffsetX",set_iconOffsetY:"set_iconOffsetY",get_iconOffsetY:"get_iconOffsetY",set_iconOffsetX:"set_iconOffsetX",get_iconOffsetX:"get_iconOffsetX",
set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_iconPosition:"set_iconPosition",get_iconPosition:"get_iconPosition",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",
set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_icon:"set_icon",get_icon:"get_icon",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",get_baseline:"get_baseline",set_htmlText:"set_htmlText",
get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var Jf=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__hideThumbWhenDisabled=!1;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__fixedThumbSize=!1;this.__customDecrementButtonVariant=this.__customIncrementButtonVariant=this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this._pointerStartX=this._pointerStartY=this._thumbStartX=this._thumbStartY=this._previousFallbackTrackWidth=
this._previousFallbackTrackHeight=0;this._dragging=!1;this._previousCustomDecrementButtonVariant=this._previousCustomIncrementButtonVariant=this._currentThumbSkin=this._thumbSkinMeasurements=this._currentTrackSkin=this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=null;this.showDecrementAndIncrementButtons=!1;this.liveDragging=this._enableButtonsAtRangeLimits=!0;this._snapInterval=this._page=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;
this._isDefaultValue=!0;this.incrementButtonMeasurements=new Ib;this.decrementButtonMeasurements=new Ib;wa.call(this);this.set_tabChildren(!1);this.focusRect=null;this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};r["feathers.controls.supportClasses.BaseScrollBar"]=Jf;Jf.__name__="feathers.controls.supportClasses.BaseScrollBar";Jf.__interfaces__=[mo];Jf.__super__=wa;Jf.prototype=I(wa.prototype,{decrementButton:null,incrementButton:null,decrementButtonMeasurements:null,
incrementButtonMeasurements:null,_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=a;this.setInvalid(x.DATA);!this.liveDragging&&this._dragging||W.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,
get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==a)return this._snapInterval;this._snapInterval=
a;this.setInvalid(x.DATA);return this._snapInterval},_page:null,get_page:function(){return this._page},set_page:function(a){if(this._page==a)return this._page;this._page=a;this.setInvalid(x.DATA);return this._page},liveDragging:null,_enableButtonsAtRangeLimits:null,get_enableButtonsAtRangeLimits:function(){return this._enableButtonsAtRangeLimits},set_enableButtonsAtRangeLimits:function(a){if(this._enableButtonsAtRangeLimits==a)return this._enableButtonsAtRangeLimits;this._enableButtonsAtRangeLimits=
a;this.setInvalid(x.STATE);return this._enableButtonsAtRangeLimits},showDecrementAndIncrementButtons:null,_oldDecrementButtonFactory:null,_decrementButtonFactory:null,get_decrementButtonFactory:function(){return this._decrementButtonFactory},set_decrementButtonFactory:function(a){if(this._decrementButtonFactory==a)return this._decrementButtonFactory;this._decrementButtonFactory=a;this.setInvalid(Jf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);return this._decrementButtonFactory},_oldIncrementButtonFactory:null,
_incrementButtonFactory:null,get_incrementButtonFactory:function(){return this._incrementButtonFactory},set_incrementButtonFactory:function(a){if(this._incrementButtonFactory==a)return this._incrementButtonFactory;this._incrementButtonFactory=a;this.setInvalid(Jf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);return this._incrementButtonFactory},_previousCustomDecrementButtonVariant:null,_previousCustomIncrementButtonVariant:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,
_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,_secondaryTrackSkinMeasurements:null,_dragging:null,_pointerStartX:null,_pointerStartY:null,_thumbStartX:null,_thumbStartY:null,_previousFallbackTrackWidth:null,_previousFallbackTrackHeight:null,setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},dispose:function(){this.destroyDecrementButton();
this.destroyIncrementButton();wa.prototype.dispose.call(this)},initialize:function(){wa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(x.SIZE);var a=this.isInvalid(x.STATE),b=this.isInvalid(x.STYLES);this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(Jf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&
this.setInvalidationFlag(Jf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(Jf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(Jf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);b&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());c&&this.createDecrementButton();d&&this.createIncrementButton();(a||b)&&this.refreshEnabled();this.measure();this.layoutContent();this._previousCustomDecrementButtonVariant=this.get_customDecrementButtonVariant();this._previousCustomIncrementButtonVariant=
this.get_customIncrementButtonVariant()},measure:function(){var a=u.getClass(this);throw new ne("Missing override for 'measure' in type "+a.__name__);},refreshThumb:function(){var a=this._currentThumbSkin;this._currentThumbSkin=this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.initializeNow(),
this._thumbSkinMeasurements==null?this._thumbSkinMeasurements=new Ib(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),this.addChild(this._currentThumbSkin),this._currentThumbSkin.addEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),u.__implements(this._currentThumbSkin,wb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=
a&&(a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(u.__implements(this._currentTrackSkin,jb)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Ib(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),this.addChildAt(this._currentTrackSkin,0),this._currentTrackSkin.addEventListener("mouseDown",
m(this,this.trackSkin_mouseDownHandler)),u.__implements(this._currentTrackSkin,wb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=
null?(u.__implements(this._currentSecondaryTrackSkin,jb)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Ib(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0),this._currentSecondaryTrackSkin.addEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler)),u.__implements(this._currentSecondaryTrackSkin,
wb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.set_enabled(this._enabled);this.decrementButton!=null&&this.decrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._minimum));this.incrementButton!=null&&this.incrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._maximum))},
layoutContent:function(){this.layoutButtons();this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null?(this.get_graphics().clear(),this.layoutSplitTrack()):this._currentTrackSkin!=null?(this.get_graphics().clear(),this.layoutSingleTrack()):this.drawFallbackTrack();this.layoutThumb()},layoutButtons:function(){if(this.showDecrementAndIncrementButtons){var a=u.getClass(this);throw new ne("Missing override for 'layoutButtons' in type "+a.__name__);}},layoutSplitTrack:function(){var a=u.getClass(this);
throw new ne("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutThumb' in type "+a.__name__);},createDecrementButton:function(){this.destroyDecrementButton();if(this.showDecrementAndIncrementButtons){var a=this._decrementButtonFactory!=null?this._decrementButtonFactory:
Jf.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&(a=this.get_customDecrementButtonVariant(),a==null&&(this instanceof Rg?a=Rg.CHILD_VARIANT_DECREMENT_BUTTON:this instanceof Sg&&(a=Sg.CHILD_VARIANT_DECREMENT_BUTTON)),this.decrementButton.set_variant(a));this.decrementButton.addEventListener("mouseDown",m(this,this.baseScrollBar_decrementButton_mouseDownHandler));this.decrementButton.addEventListener("touchBegin",
m(this,this.baseScrollBar_decrementButton_touchBeginHandler));this.decrementButton.initializeNow();this.decrementButtonMeasurements.save(this.decrementButton);this.addChild(this.decrementButton)}},destroyDecrementButton:function(){this.decrementButton!=null&&(this.decrementButton.removeEventListener("mouseDown",m(this,this.baseScrollBar_decrementButton_mouseDownHandler)),this.decrementButton.removeEventListener("touchBegin",m(this,this.baseScrollBar_decrementButton_touchBeginHandler)),this.removeChild(this.decrementButton),
this._oldDecrementButtonFactory.destroy!=null&&this._oldDecrementButtonFactory.destroy(this.decrementButton),this.decrementButton=this._oldDecrementButtonFactory=null)},createIncrementButton:function(){this.destroyIncrementButton();if(this.showDecrementAndIncrementButtons){var a=this._incrementButtonFactory!=null?this._incrementButtonFactory:Jf.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&(a=this.get_customIncrementButtonVariant(),
a==null&&(this instanceof Rg?a=Rg.CHILD_VARIANT_INCREMENT_BUTTON:this instanceof Sg&&(a=Sg.CHILD_VARIANT_INCREMENT_BUTTON)),this.incrementButton.set_variant(a));this.incrementButton.addEventListener("mouseDown",m(this,this.baseScrollBar_incrementButton_mouseDownHandler));this.incrementButton.addEventListener("touchBegin",m(this,this.baseScrollBar_incrementButton_touchBeginHandler));this.incrementButton.initializeNow();this.incrementButtonMeasurements.save(this.incrementButton);this.addChild(this.incrementButton)}},
destroyIncrementButton:function(){this.incrementButton!=null&&(this.incrementButton.removeEventListener("mouseDown",m(this,this.baseScrollBar_incrementButton_mouseDownHandler)),this.incrementButton.removeEventListener("touchBegin",m(this,this.baseScrollBar_incrementButton_touchBeginHandler)),this.removeChild(this.incrementButton),this._oldIncrementButtonFactory.destroy!=null&&this._oldIncrementButtonFactory.destroy(this.incrementButton),this.incrementButton=this._oldIncrementButtonFactory=null)},
drawFallbackTrack:function(){if(this.actualWidth!=this._previousFallbackTrackWidth||this.actualHeight!=this._previousFallbackTrackHeight)this.get_graphics().clear(),this.get_graphics().beginFill(16711935,0),this.get_graphics().drawRect(0,0,this.actualWidth,this.actualHeight),this.get_graphics().endFill(),this._previousFallbackTrackWidth=this.actualWidth,this._previousFallbackTrackHeight=this.actualHeight},normalizeValue:function(a){var b=0;this._minimum!=this._maximum&&(b=(a-this._minimum)/(this._maximum-
this._minimum),b<0?b=0:b>1&&(b=1));return b},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&(a=ff.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);return a},valueToLocation:function(a){a=u.getClass(this);throw new ne("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=u.getClass(this);throw new ne("Missing override for 'locationToValue' in type "+a.__name__);},
saveThumbStart:function(a,b){a=u.getClass(this);throw new ne("Missing override for 'saveThumbStart' in type "+a.__name__);},getAdjustedPage:function(){var a=this._maximum-this._minimum,b=this._page;b==0?b=this._step:b>a&&(b=a);return b},decrement:function(){var a=this._value-this._step;a=this.restrictValue(a);this.set_value(a)},increment:function(){var a=this._value+this._step;a=this.restrictValue(a);this.set_value(a)},thumbSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&
(this.stage.addEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler),!1,0,!0),this._thumbStartX=this._currentThumbSkin.get_x(),this._thumbStartY=this._currentThumbSkin.get_y(),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0,Bd.dispatch(this,"scrollStart"))},thumbSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());
a=this.restrictValue(a);this.set_value(a)},thumbSkin_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler));this._dragging=!1;Bd.dispatch(this,"scrollComplete");this.liveDragging||W.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",
m(this,this.trackSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler),!1,0,!0),this.saveThumbStart(this.get_mouseX(),this.get_mouseY()),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0,Bd.dispatch(this,"scrollStart"),a=this.locationToValue(this.get_mouseX(),this.get_mouseY()),a=this.restrictValue(a),this.set_value(a))},trackSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),
this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},trackSkin_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=!1;Bd.dispatch(this,"scrollComplete");this.liveDragging||W.dispatch(this,"change")},baseScrollBar_decrementButton_mouseDownHandler:function(a){this._enabled&&this.decrementButton.get_enabled()&&
this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.increment()},baseScrollBar_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||
this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.increment()},__customDecrementButtonVariant:null,get_customDecrementButtonVariant:function(){return this.__customDecrementButtonVariant},set_customDecrementButtonVariant:function(a){if(!this.setStyle("customDecrementButtonVariant")||this.__customDecrementButtonVariant==a)return this.__customDecrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementButtonVariant);
this.__customDecrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementButtonVariant},clearStyle_customDecrementButtonVariant:function(){this.set_customDecrementButtonVariant(null);return this.get_customDecrementButtonVariant()},__customIncrementButtonVariant:null,get_customIncrementButtonVariant:function(){return this.__customIncrementButtonVariant},set_customIncrementButtonVariant:function(a){if(!this.setStyle("customIncrementButtonVariant")||this.__customIncrementButtonVariant==
a)return this.__customIncrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementButtonVariant);this.__customIncrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementButtonVariant},clearStyle_customIncrementButtonVariant:function(){this.set_customIncrementButtonVariant(null);return this.get_customIncrementButtonVariant()},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||this.__thumbSkin==
a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=a;this.setInvalid(x.STYLES);
return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);
return this.get_secondaryTrackSkin()},__fixedThumbSize:null,get_fixedThumbSize:function(){return this.__fixedThumbSize},set_fixedThumbSize:function(a){if(!this.setStyle("fixedThumbSize")||this.__fixedThumbSize==a)return this.__fixedThumbSize;this._previousClearStyle=m(this,this.clearStyle_fixedThumbSize);this.__fixedThumbSize=a;this.setInvalid(x.STYLES);return this.__fixedThumbSize},clearStyle_fixedThumbSize:function(){this.set_fixedThumbSize(!1);return this.get_fixedThumbSize()},__paddingTop:null,
get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__hideThumbWhenDisabled:null,get_hideThumbWhenDisabled:function(){return this.__hideThumbWhenDisabled},set_hideThumbWhenDisabled:function(a){if(!this.setStyle("hideThumbWhenDisabled")||this.__hideThumbWhenDisabled==a)return this.__hideThumbWhenDisabled;this._previousClearStyle=m(this,this.clearStyle_hideThumbWhenDisabled);this.__hideThumbWhenDisabled=a;this.setInvalid(x.STYLES);return this.__hideThumbWhenDisabled},
clearStyle_hideThumbWhenDisabled:function(){this.set_hideThumbWhenDisabled(!1);return this.get_hideThumbWhenDisabled()},__class__:Jf,__properties__:I(wa.prototype.__properties__,{set_hideThumbWhenDisabled:"set_hideThumbWhenDisabled",get_hideThumbWhenDisabled:"get_hideThumbWhenDisabled",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",
set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_fixedThumbSize:"set_fixedThumbSize",get_fixedThumbSize:"get_fixedThumbSize",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",set_thumbSkin:"set_thumbSkin",get_thumbSkin:"get_thumbSkin",set_customIncrementButtonVariant:"set_customIncrementButtonVariant",get_customIncrementButtonVariant:"get_customIncrementButtonVariant",set_customDecrementButtonVariant:"set_customDecrementButtonVariant",
get_customDecrementButtonVariant:"get_customDecrementButtonVariant",set_incrementButtonFactory:"set_incrementButtonFactory",get_incrementButtonFactory:"get_incrementButtonFactory",set_decrementButtonFactory:"set_decrementButtonFactory",get_decrementButtonFactory:"get_decrementButtonFactory",set_enableButtonsAtRangeLimits:"set_enableButtonsAtRangeLimits",get_enableButtonsAtRangeLimits:"get_enableButtonsAtRangeLimits",set_page:"set_page",get_page:"get_page",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",
set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var Sg=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHScrollBarTheme();Jf.call(this,a,b,c,d)};r["feathers.controls.HScrollBar"]=Sg;Sg.__name__="feathers.controls.HScrollBar";Sg.__super__=Jf;Sg.prototype=I(Jf.prototype,{initializeHScrollBarTheme:function(){It.initialize()},valueToLocation:function(a){u.__implements(this._currentThumbSkin,
oa)&&this._currentThumbSkin.validateNow();this.showDecrementAndIncrementButtons&&(this.decrementButton.validateNow(),this.incrementButton.validateNow());a=this.normalizeValue(a);var b=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentThumbSkin.get_width();this.showDecrementAndIncrementButtons&&(b-=this.decrementButton.get_width()+this.incrementButton.get_width());a=this.get_paddingLeft()+b*a;this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_width());return a},
locationToValue:function(a,b){b=this.get_paddingLeft();var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentThumbSkin.get_width();this.showDecrementAndIncrementButtons&&(b+=this.decrementButton.get_width(),c-=this.decrementButton.get_width()+this.incrementButton.get_width());return this._minimum+Math.min(Math.max(0,this._thumbStartX+(a-this._pointerStartX)-b),c)/c*(this._maximum-this._minimum)},saveThumbStart:function(a,b){var c=this.actualWidth;this._currentThumbSkin!=
null&&(c-=this._currentThumbSkin.get_width(),a-=this._currentThumbSkin.get_width()/2);this._thumbStartX=Math.min(c,a);this._thumbStartY=b},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButton!=null&&(this.decrementButtonMeasurements.restore(this.decrementButton),this.decrementButton.validateNow());
this.incrementButton!=null&&(this.incrementButtonMeasurements.restore(this.incrementButton),this.incrementButton.validateNow());this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=
null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow());c=this.get_explicitWidth();a&&(c=0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(c+=this._currentSecondaryTrackSkin.get_width())),a=this.get_paddingLeft()+this.get_paddingRight(),this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<a&&
(c=a),this.showDecrementAndIncrementButtons&&(c+=this.decrementButton.get_width()+this.incrementButton.get_width()));a=this.get_explicitHeight();b&&(a=this.get_paddingTop()+this.get_paddingBottom(),this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())),
this.showDecrementAndIncrementButtons&&(b=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height()),a<b&&(a=b)));return this.saveMeasurements(c,a,c,a,null,a)},layoutButtons:function(){this.showDecrementAndIncrementButtons&&(this.decrementButton!=null&&this.decrementButton.validateNow(),this.decrementButton.set_x(0),this.decrementButton.set_y((this.actualHeight-this.decrementButton.get_height())/2),this.incrementButton!=null&&this.incrementButton.validateNow(),this.incrementButton.set_x(this.actualWidth-
this.incrementButton.get_width()),this.incrementButton.set_y((this.actualHeight-this.incrementButton.get_height())/2))},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());this._currentThumbSkin!=null&&(u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_width()/2));var b=0,c=this.actualWidth;this.showDecrementAndIncrementButtons&&(b=this.decrementButton.get_width(),c-=this.incrementButton.get_width());this._currentTrackSkin.set_x(b);
this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(c-a);u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow();this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)},layoutSingleTrack:function(){if(this._currentTrackSkin!=
null){var a=0,b=this.actualWidth;this.showDecrementAndIncrementButtons&&(a=this.decrementButton.get_width(),b-=this.incrementButton.get_width());this._currentTrackSkin.set_x(a);this._currentTrackSkin.set_width(b-a);u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2)}},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this._maximum-this._minimum;this._currentThumbSkin.set_visible((!this.get_hideThumbWhenDisabled()||
this._enabled)&&a>0);if(this._currentThumbSkin.get_visible()){u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow();var b=0;this._value<this._minimum?b=this._minimum-this._value:this._value>this._maximum&&(b=this._value-this._maximum);var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(this.get_fixedThumbSize())this._thumbSkinMeasurements.width!=null&&this._currentThumbSkin.set_width(this._thumbSkinMeasurements.width);
else{var f=this.getAdjustedPage();f=c*f/(a+f);if(f>0){var g=c-f;g>f&&(g=f);f-=b/(a*f/c)*g}this._thumbSkinMeasurements.minWidth!=null?f<this._thumbSkinMeasurements.minWidth&&(f=this._thumbSkinMeasurements.minWidth):u.__implements(this._currentThumbSkin,Kb)&&(a=this._currentThumbSkin,f<a.get_minWidth()&&(f=a.get_minWidth()));f<0&&(f=0);this._currentThumbSkin.set_width(f)}this._currentThumbSkin.set_x(this.valueToLocation(this._value));this._currentThumbSkin.set_y(this.get_paddingTop()+(d-this._currentThumbSkin.get_height())/
2)}}},get_styleContext:function(){return Sg},__class__:Sg});var Rg=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVScrollBarTheme();Jf.call(this,a,b,c,d)};r["feathers.controls.VScrollBar"]=Rg;Rg.__name__="feathers.controls.VScrollBar";Rg.__super__=Jf;Rg.prototype=I(Jf.prototype,{initializeVScrollBarTheme:function(){Jt.initialize()},valueToLocation:function(a){u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow();this.showDecrementAndIncrementButtons&&
(this.decrementButton.validateNow(),this.incrementButton.validateNow());a=this.normalizeValue(a);var b=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentThumbSkin.get_height();this.showDecrementAndIncrementButtons&&(b-=this.decrementButton.get_height()+this.incrementButton.get_height());a=this.get_paddingTop()+b*a;this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_height());return a},locationToValue:function(a,b){a=this.get_paddingTop();var c=this.actualHeight-
this.get_paddingTop()-this.get_paddingBottom()-this._currentThumbSkin.get_height();this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_height(),c-=this.decrementButton.get_height()+this.incrementButton.get_height());return this._minimum+Math.min(Math.max(0,this._thumbStartY+(b-this._pointerStartY)-a),c)/c*(this._maximum-this._minimum)},saveThumbStart:function(a,b){var c=this.actualHeight;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_height(),b-=this._currentThumbSkin.get_height()/
2);this._thumbStartX=a;this._thumbStartY=Math.min(c,b)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButton!=null&&(this.decrementButtonMeasurements.restore(this.decrementButton),this.decrementButton.validateNow());this.incrementButton!=null&&(this.incrementButtonMeasurements.restore(this.incrementButton),
this.incrementButton.validateNow());this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,
oa)&&this._currentSecondaryTrackSkin.validateNow());c=this.get_explicitWidth();a&&(c=this.get_paddingLeft()+this.get_paddingRight(),this._currentThumbSkin!=null&&(c+=this._currentThumbSkin.get_width()),this._currentTrackSkin!=null&&(c<this._currentTrackSkin.get_width()&&(c=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&c<this._currentSecondaryTrackSkin.get_width()&&(c=this._currentSecondaryTrackSkin.get_width())),this.showDecrementAndIncrementButtons&&(a=Math.max(this.decrementButton.get_width(),
this.incrementButton.get_width()),c<a&&(c=a)));a=this.get_explicitHeight();b&&(a=0,this._currentTrackSkin!=null&&(a+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(a+=this._currentSecondaryTrackSkin.get_height())),b=this.get_paddingTop()+this.get_paddingBottom(),this._currentThumbSkin!=null&&(b+=this._currentThumbSkin.get_height()),a<b&&(a=b),this.showDecrementAndIncrementButtons&&(a+=this.decrementButton.get_height()+this.incrementButton.get_height()));return this.saveMeasurements(c,
a,c,a,c,null)},layoutButtons:function(){this.showDecrementAndIncrementButtons&&(this.decrementButton!=null&&this.decrementButton.validateNow(),this.decrementButton.set_x((this.actualWidth-this.decrementButton.get_width())/2),this.decrementButton.set_y(0),this.incrementButton!=null&&this.incrementButton.validateNow(),this.incrementButton.set_x((this.actualWidth-this.incrementButton.get_width())/2),this.incrementButton.set_y(this.actualHeight-this.incrementButton.get_height()))},layoutSplitTrack:function(){var a=
this.valueToLocation(this.get_value());this._currentThumbSkin!=null&&(u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_height()/2));var b=0,c=this.actualHeight;this.showDecrementAndIncrementButtons&&(b=this.decrementButton.get_height(),c-=this.incrementButton.get_height());this._currentSecondaryTrackSkin.set_y(b);this._currentSecondaryTrackSkin.set_height(a);this._currentTrackSkin.set_y(a);this._currentTrackSkin.set_height(c-
a);u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow();u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();this._currentSecondaryTrackSkin.set_x((this.actualWidth-this._currentSecondaryTrackSkin.get_width())/2);this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)},layoutSingleTrack:function(){if(this._currentTrackSkin!=null){var a=0,b=this.actualHeight;this.showDecrementAndIncrementButtons&&
(a=this.decrementButton.get_height(),b-=this.incrementButton.get_height());this._currentTrackSkin.set_y(a);this._currentTrackSkin.set_height(b-a);u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)}},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this._maximum-this._minimum;this._currentThumbSkin.set_visible((!this.get_hideThumbWhenDisabled()||this._enabled)&&a>0);if(this._currentThumbSkin.get_visible()){u.__implements(this._currentThumbSkin,
oa)&&this._currentThumbSkin.validateNow();var b=0;this._value<this._minimum?b=this._minimum-this._value:this._value>this._maximum&&(b=this._value-this._maximum);var c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(this.get_fixedThumbSize())this._thumbSkinMeasurements.height!=null&&this._currentThumbSkin.set_height(this._thumbSkinMeasurements.height);else{var f=this.getAdjustedPage();f=d*f/(a+f);if(f>0){var g=d-
f;g>f&&(g=f);f-=b/(a*f/d)*g}this._thumbSkinMeasurements.minHeight!=null?f<this._thumbSkinMeasurements.minHeight&&(f=this._thumbSkinMeasurements.minHeight):u.__implements(this._currentThumbSkin,Kb)&&(a=this._currentThumbSkin,f<a.get_minHeight()&&(f=a.get_minHeight()));f<0&&(f=0);this._currentThumbSkin.set_height(f)}this._currentThumbSkin.set_x(this.get_paddingLeft()+(c-this._currentThumbSkin.get_width())/2);this._currentThumbSkin.set_y(this.valueToLocation(this._value))}}},get_styleContext:function(){return Rg},
__class__:Rg});var ob=function(){this.__scrollPixelSnapping=!1;this.__hideScrollBarEase=lh.easeOut;this.__hideScrollBarDuration=.2;this.__showScrollBarMinimumDuration=.5;this.__scrollBarYPosition=ja.RIGHT;this.__scrollBarXPosition=ja.BOTTOM;this.__showScrollBars=this.__autoHideScrollBars=!0;this.__fixedScrollBars=!1;this.__backgroundSkin=this.__disabledBackgroundSkin=this.__maskSkin=this.__viewPortMaskSkin=this.__scrollBarsCornerSkin=null;this.__paddingTop=this.__paddingRight=this.__paddingBottom=
this.__paddingLeft=0;this._scrollMode=uj.MASK;this._ignoreScrollerChanges=this._settingScrollerDimensions=this._ignoreViewPortResizing=!1;this._scrollRect2=new Ea;this._scrollRect1=new Ea;this._prevMinScrollX=this._prevMaxScrollX=this._prevMinScrollY=this._prevMaxScrollY=0;this._hideScrollBarX=this._hideScrollBarY=null;this._scrollPolicyX=this._scrollPolicyY=Ee.AUTO;this._scrollStepX=this._scrollStepY=1;this._temporaryScrollX=this._temporaryRestrictedScrollX=this._temporaryScrollY=this._temporaryRestrictedScrollY=
null;this._ignoreScrollBarXChange=this._ignoreScrollBarYChange=this.showScrollBarX=this.showScrollBarY=!1;this.chromeMeasuredMaxHeight=1/0;this.chromeMeasuredHeight=this.chromeMeasuredMinHeight=0;this.chromeMeasuredMaxWidth=1/0;this.topViewPortOffset=this.rightViewPortOffset=this.bottomViewPortOffset=this.leftViewPortOffset=this.chromeMeasuredWidth=this.chromeMeasuredMinWidth=0;this._currentBackgroundSkin=this._backgroundSkinMeasurements=this._currentMaskSkin=this._currentViewPortMaskSkin=this._fallbackViewPortMaskSkin=
null;this._scrollerDraggingX=this._scrollerDraggingY=this._scrollBarXHover=this._scrollBarYHover=!1;wa.call(this);this.set_tabEnabled(!0);this.set_tabChildren(!0);this.focusRect=null;this.addEventListener("keyDown",m(this,this.baseScrollContainer_keyDownHandler));this.addEventListener("addedToStage",m(this,this.baseScrollContainer_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.baseScrollContainer_removedFromStageHandler))};r["feathers.controls.supportClasses.BaseScrollContainer"]=
ob;ob.__name__="feathers.controls.supportClasses.BaseScrollContainer";ob.__interfaces__=[ld];ob.__super__=wa;ob.prototype=I(wa.prototype,{_viewPort:null,get_viewPort:function(){return this._viewPort},set_viewPort:function(a){if(this._viewPort==a)return this._viewPort;this._viewPort!=null&&this._viewPort.removeEventListener("resize",m(this,this.viewPort_resizeHandler));this.scroller!=null&&this.scroller.set_target(null);this._viewPort=a;this._viewPort!=null&&this._viewPort.addEventListener("resize",
m(this,this.viewPort_resizeHandler));this.setInvalid(x.SCROLL);return this._viewPort},scroller:null,_scrollerDraggingX:null,_scrollerDraggingY:null,_scrollBarXHover:null,_scrollBarYHover:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentMaskSkin:null,_currentViewPortMaskSkin:null,_fallbackViewPortMaskSkin:null,topViewPortOffset:null,rightViewPortOffset:null,bottomViewPortOffset:null,leftViewPortOffset:null,chromeMeasuredWidth:null,chromeMeasuredMinWidth:null,chromeMeasuredMaxWidth:null,
chromeMeasuredHeight:null,chromeMeasuredMinHeight:null,chromeMeasuredMaxHeight:null,get_tabEnabled:function(){return this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX()?this.get_rawTabEnabled():!1},_currentScrollBarsCornerSkin:null,scrollBarX:null,scrollBarY:null,_ignoreScrollBarXChange:null,_ignoreScrollBarYChange:null,showScrollBarX:null,showScrollBarY:null,_oldScrollBarXFactory:null,_scrollBarXFactory:null,get_scrollBarXFactory:function(){return this._scrollBarXFactory},
set_scrollBarXFactory:function(a){if(this._scrollBarXFactory==a)return this._scrollBarXFactory;this._scrollBarXFactory=a;this.setInvalid(ob.INVALIDATION_FLAG_SCROLL_BAR_FACTORY);return this._scrollBarXFactory},_oldScrollBarYFactory:null,_scrollBarYFactory:null,get_scrollBarYFactory:function(){return this._scrollBarYFactory},set_scrollBarYFactory:function(a){if(this._scrollBarYFactory==a)return this._scrollBarYFactory;this._scrollBarYFactory=a;this.setInvalid(ob.INVALIDATION_FLAG_SCROLL_BAR_FACTORY);
return this._scrollBarYFactory},_scrollerFactory:null,get_scrollerFactory:function(){return this._scrollerFactory},set_scrollerFactory:function(a){if(this._scrollerFactory==a)return this._scrollerFactory;this._scrollerFactory=a;this.setInvalid(ob.INVALIDATION_FLAG_SCROLLER_FACTORY);return this._scrollerFactory},_temporaryScrollX:null,_temporaryRestrictedScrollX:null,get_scrollX:function(){return this.scroller==null?this._temporaryRestrictedScrollX!=null?this._temporaryRestrictedScrollX:this._temporaryScrollX!=
null?this._temporaryScrollX:0:this.scroller.get_scrollX()},set_scrollX:function(a){if(this.scroller==null)return this._temporaryScrollX=a,this._temporaryRestrictedScrollX=null,Bd.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryScrollX;this.scroller.set_scrollX(a);return this.scroller.get_scrollX()},get_restrictedScrollX:function(){return this.scroller==null?this.get_scrollX():this.scroller.get_restrictedScrollX()},set_restrictedScrollX:function(a){if(this.scroller==
null)return this._temporaryRestrictedScrollX=a,this._temporaryScrollX=null,Bd.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryRestrictedScrollX;this.scroller.set_restrictedScrollX(a);return this.scroller.get_restrictedScrollX()},_temporaryScrollY:null,_temporaryRestrictedScrollY:null,get_scrollY:function(){return this.scroller==null?this._temporaryRestrictedScrollY!=null?this._temporaryRestrictedScrollY:this._temporaryScrollY!=null?this._temporaryScrollY:
0:this.scroller.get_scrollY()},set_scrollY:function(a){if(this.scroller==null)return this._temporaryScrollY=a,this._temporaryRestrictedScrollY=null,Bd.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryScrollY;this.scroller.set_scrollY(a);return this.scroller.get_scrollY()},get_restrictedScrollY:function(){this.scroller==null&&this.get_scrollY();return this.scroller.get_restrictedScrollY()},set_restrictedScrollY:function(a){if(this.scroller==null)return this._temporaryRestrictedScrollY=
a,this._temporaryScrollY=null,Bd.dispatch(this,"scroll",!1,!1,this._temporaryScrollX,this._temporaryScrollY),this._temporaryRestrictedScrollY;this.scroller.set_restrictedScrollY(a);return this.scroller.get_restrictedScrollY()},get_minScrollX:function(){return this.scroller==null?0:this.scroller.get_minScrollX()},get_minScrollY:function(){return this.scroller==null?0:this.scroller.get_minScrollY()},get_maxScrollX:function(){return this.scroller==null?0:this.scroller.get_maxScrollX()},get_maxScrollY:function(){return this.scroller==
null?0:this.scroller.get_maxScrollY()},_scrollStepX:null,get_scrollStepX:function(){return this._scrollStepX},set_scrollStepX:function(a){if(this._scrollStepX==a)return this._scrollStepX;this._scrollStepX=a;this.setInvalid(x.SCROLL);return this._scrollStepX},_scrollStepY:null,get_scrollStepY:function(){return this._scrollStepY},set_scrollStepY:function(a){if(this._scrollStepY==a)return this._scrollStepY;this._scrollStepY=a;this.setInvalid(x.SCROLL);return this._scrollStepY},_scrollPolicyX:null,get_scrollPolicyX:function(){return this._scrollPolicyX},
set_scrollPolicyX:function(a){if(this._scrollPolicyX==a)return this._scrollPolicyX;this._scrollPolicyX=a;this.setInvalid(x.SCROLL);return this._scrollPolicyX},_scrollPolicyY:null,get_scrollPolicyY:function(){return this._scrollPolicyY},set_scrollPolicyY:function(a){if(this._scrollPolicyY==a)return this._scrollPolicyY;this._scrollPolicyY=a;this.setInvalid(x.SCROLL);return this._scrollPolicyY},_scrollBarXRevealTime:null,_scrollBarYRevealTime:null,_hideScrollBarX:null,_hideScrollBarY:null,_prevMinScrollX:null,
_prevMaxScrollX:null,_prevMinScrollY:null,_prevMaxScrollY:null,_currentScrollRect:null,_scrollRect1:null,_scrollRect2:null,_ignoreScrollerChanges:null,_settingScrollerDimensions:null,_ignoreViewPortResizing:null,get_measureViewPort:function(){return!0},_scrollMode:null,get_scrollMode:function(){return this._scrollMode},set_scrollMode:function(a){if(this._scrollMode==a)return this._scrollMode;this._scrollMode=a;this.setInvalid(x.LAYOUT);return this._scrollMode},setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},getViewPortVisibleBounds:function(a){var b=this.leftViewPortOffset+this.get_paddingLeft(),c=this.topViewPortOffset+this.get_paddingTop();a==null?a=new Ea(b,c,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight()):a.setTo(b,c,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());return a},dispose:function(){this.destroyScroller();this.destroyScrollBarX();this.destroyScrollBarY();wa.prototype.dispose.call(this)},
update:function(){var a=this.isInvalid(x.STYLES);this.isInvalid(x.SIZE);var b=this.isInvalid(x.STATE),c=this.isInvalid(ob.INVALIDATION_FLAG_SCROLLER_FACTORY),d=this.isInvalid(ob.INVALIDATION_FLAG_SCROLL_BAR_FACTORY),f=this._ignoreScrollerChanges;this._ignoreScrollerChanges=!0;c&&this.createScroller();(a||b)&&this.refreshBackgroundSkin();a&&(this.refreshMaskSkin(),this.refreshViewPortMaskSkin(),this.refreshScrollBarsCornerSkin());d&&this.createScrollBars();this.refreshEnabled();this.refreshScrollerValues();
this.refreshViewPort();this.applyTemporaryScrollPositions();this.refreshScrollRect();this.refreshScrollBarValues();this.layoutChildren();this._ignoreScrollerChanges=f},applyTemporaryScrollPositions:function(){this._temporaryScrollX!=null?this.scroller.set_scrollX(this._temporaryScrollX):this._temporaryRestrictedScrollX!=null&&this.scroller.set_restrictedScrollX(this._temporaryRestrictedScrollX);this._temporaryScrollY!=null?this.scroller.set_scrollY(this._temporaryScrollY):this._temporaryRestrictedScrollY!=
null&&this.scroller.set_restrictedScrollY(this._temporaryRestrictedScrollY);this._temporaryRestrictedScrollY=this._temporaryRestrictedScrollX=this._temporaryScrollY=this._temporaryScrollX=null},needsMeasurement:function(){return this.isInvalid(x.SCROLL)&&this.needsScrollMeasurement()||this.isInvalid(x.DATA)||this.isInvalid(x.SIZE)||this.isInvalid(x.STYLES)||this.isInvalid(ob.INVALIDATION_FLAG_SCROLL_BAR_FACTORY)||this.isInvalid(x.STATE)?!0:this.isInvalid(x.LAYOUT)},needsScrollMeasurement:function(){return!1},
createScroller:function(){this.destroyScroller();this.scroller=this._scrollerFactory!=null?this._scrollerFactory():new Ci;this.scroller.addEventListener("scroll",m(this,this.baseScrollContainer_scroller_scrollHandler));this.scroller.addEventListener("scrollStart",m(this,this.baseScrollContainer_scroller_scrollStartHandler));this.scroller.addEventListener("scrollComplete",m(this,this.baseScrollContainer_scroller_scrollCompleteHandler))},destroyScroller:function(){this.scroller!=null&&(this._temporaryScrollX=
this.scroller.get_scrollX(),this._temporaryScrollY=this.scroller.get_scrollY(),this._temporaryRestrictedScrollY=this._temporaryRestrictedScrollX=null,this.scroller.set_target(null),this.scroller.removeEventListener("scroll",m(this,this.baseScrollContainer_scroller_scrollHandler)),this.scroller.removeEventListener("scrollStart",m(this,this.baseScrollContainer_scroller_scrollStartHandler)),this.scroller.removeEventListener("scrollComplete",m(this,this.baseScrollContainer_scroller_scrollCompleteHandler)),
this.scroller=null,this.setInvalidationFlag(ob.INVALIDATION_FLAG_SCROLLER_FACTORY))},createScrollBars:function(){this.createScrollBarX();this.createScrollBarY()},createScrollBarX:function(){this.destroyScrollBarX();var a=this._scrollBarXFactory!=null?this._scrollBarXFactory:ob.defaultScrollBarXFactory;this._oldScrollBarXFactory=a;this.scrollBarX=a.create();this.get_autoHideScrollBars()&&this.scrollBarX.set_alpha(0);this.scrollBarX.addEventListener("change",m(this,this.scrollBarX_changeHandler));this.scrollBarX.addEventListener("rollOver",
m(this,this.scrollBarX_rollOverHandler));this.scrollBarX.addEventListener("rollOut",m(this,this.scrollBarX_rollOutHandler));this.scrollBarX.addEventListener("scrollStart",m(this,this.scrollBarX_scrollStartHandler));this.scrollBarX.addEventListener("scrollComplete",m(this,this.scrollBarX_scrollCompleteHandler));this.addChild(u.__cast(this.scrollBarX,ea))},destroyScrollBarX:function(){this.scrollBarX!=null&&(this.scrollBarX.removeEventListener("change",m(this,this.scrollBarX_changeHandler)),this.scrollBarX.removeEventListener("rollOver",
m(this,this.scrollBarX_rollOverHandler)),this.scrollBarX.removeEventListener("rollOut",m(this,this.scrollBarX_rollOutHandler)),this.scrollBarX.removeEventListener("scrollStart",m(this,this.scrollBarX_scrollStartHandler)),this.scrollBarX.removeEventListener("scrollComplete",m(this,this.scrollBarX_scrollCompleteHandler)),this.removeChild(u.__cast(this.scrollBarX,ea)),this._oldScrollBarXFactory.destroy!=null&&this._oldScrollBarXFactory.destroy(this.scrollBarX),this.scrollBarX=this._oldScrollBarXFactory=
null)},createScrollBarY:function(){this.destroyScrollBarY();var a=this._scrollBarYFactory!=null?this._scrollBarYFactory:ob.defaultScrollBarYFactory;this._oldScrollBarYFactory=a;this.scrollBarY=a.create();this.get_autoHideScrollBars()&&this.scrollBarY.set_alpha(0);this.scrollBarY.addEventListener("change",m(this,this.scrollBarY_changeHandler));this.scrollBarY.addEventListener("rollOver",m(this,this.scrollBarY_rollOverHandler));this.scrollBarY.addEventListener("rollOut",m(this,this.scrollBarY_rollOutHandler));
this.scrollBarY.addEventListener("scrollStart",m(this,this.scrollBarY_scrollStartHandler));this.scrollBarY.addEventListener("scrollComplete",m(this,this.scrollBarY_scrollCompleteHandler));this.addChild(u.__cast(this.scrollBarY,ea))},destroyScrollBarY:function(){this.scrollBarY!=null&&(this.scrollBarY.removeEventListener("change",m(this,this.scrollBarY_changeHandler)),this.scrollBarY.removeEventListener("rollOver",m(this,this.scrollBarY_rollOverHandler)),this.scrollBarY.removeEventListener("rollOut",
m(this,this.scrollBarY_rollOutHandler)),this.scrollBarY.removeEventListener("scrollStart",m(this,this.scrollBarY_scrollStartHandler)),this.scrollBarY.removeEventListener("scrollComplete",m(this,this.scrollBarY_scrollCompleteHandler)),this.removeChild(u.__cast(this.scrollBarY,ea)),this._oldScrollBarYFactory.destroy!=null&&this._oldScrollBarYFactory.destroy(this.scrollBarY),this.scrollBarY=this._oldScrollBarYFactory=null)},refreshEnabled:function(){this._viewPort.set_enabled(this._enabled);this.scrollBarX!=
null&&this.scrollBarX.set_enabled(this._enabled);this.scrollBarY!=null&&this.scrollBarY.set_enabled(this._enabled)},restrictScrollAfterRefreshViewPort:function(){if(!this.scroller.get_scrolling()){var a=this.scroller.get_scrollX(),b=this.scroller.get_scrollY();this._prevMinScrollX!=this.scroller.get_minScrollX()&&a<this.scroller.get_minScrollX()?this.scroller.set_restrictedScrollX(a):this._prevMaxScrollX!=this.scroller.get_maxScrollX()&&a>this.scroller.get_maxScrollX()&&this.scroller.set_restrictedScrollX(a);
this._prevMinScrollY!=this.scroller.get_minScrollY()&&b<this.scroller.get_minScrollY()?this.scroller.set_restrictedScrollY(b):this._prevMaxScrollY!=this.scroller.get_maxScrollY()&&b>this.scroller.get_maxScrollY()&&this.scroller.set_restrictedScrollY(b);a==this.scroller.get_scrollX()&&b==this.scroller.get_scrollY()||Bd.dispatch(this,"scroll",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())}},refreshViewPort:function(){u.__implements(this.scrollBarX,oa)&&this.scrollBarX.validateNow();
u.__implements(this.scrollBarY,oa)&&this.scrollBarY.validateNow();this._viewPort.set_scrollX(this.get_scrollX());this._viewPort.set_scrollY(this.get_scrollY());this._prevMinScrollX=this.scroller.get_minScrollX();this._prevMaxScrollX=this.scroller.get_maxScrollX();this._prevMinScrollY=this.scroller.get_minScrollY();this._prevMaxScrollY=this.scroller.get_maxScrollY();if(this.needsMeasurement()){this.resetViewPortOffsets();this.calculateViewPortOffsets(!1,!1);this.refreshViewPortBoundsForMeasurement();
if(this.get_scrollPolicyX()==Ee.AUTO){var a=this.showScrollBarX;this.calculateViewPortOffsetsForFixedScrollBarX(!1);this.get_fixedScrollBars()&&this.showScrollBarX!=a&&this.refreshViewPortBoundsForMeasurement()}this.get_scrollPolicyY()==Ee.AUTO&&(a=this.showScrollBarY,this.calculateViewPortOffsetsForFixedScrollBarY(!1),this.get_fixedScrollBars()&&this.showScrollBarY!=a&&this.refreshViewPortBoundsForMeasurement());this.get_fixedScrollBars()&&!this.showScrollBarX&&this.showScrollBarY&&this.get_scrollPolicyX()==
Ee.AUTO&&this.get_scrollPolicyY()==Ee.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!1),this.showScrollBarX!=a&&this.refreshViewPortBoundsForMeasurement());a=this._settingScrollerDimensions;this._settingScrollerDimensions=!0;this.scroller.setDimensions(this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight(),this._viewPort.get_width(),this._viewPort.get_height());this._settingScrollerDimensions=a;this.measure();this.resetViewPortOffsets();this.calculateViewPortOffsets(!1,
!0);this.refreshViewPortBoundsForLayout();this.get_scrollPolicyX()==Ee.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!0),this.get_fixedScrollBars()&&this.showScrollBarX!=a&&this.refreshViewPortBoundsForLayout());this.get_scrollPolicyY()==Ee.AUTO&&(a=this.showScrollBarY,this.calculateViewPortOffsetsForFixedScrollBarY(!0),this.get_fixedScrollBars()&&this.showScrollBarY!=a&&this.refreshViewPortBoundsForLayout());this.get_fixedScrollBars()&&!this.showScrollBarX&&this.showScrollBarY&&
this.get_scrollPolicyX()==Ee.AUTO&&this.get_scrollPolicyY()==Ee.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!0),this.showScrollBarX!=a&&this.refreshViewPortBoundsForLayout());a=this._settingScrollerDimensions}else this._viewPort.validateNow(),a=this._settingScrollerDimensions;this._settingScrollerDimensions=!0;this.scroller.setDimensions(this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight(),this._viewPort.get_width(),this._viewPort.get_height());this._settingScrollerDimensions=
a;this.restrictScrollAfterRefreshViewPort()},resetViewPortOffsets:function(){this.showScrollBarX=this.get_showScrollBars()&&(this._scrollPolicyX==Ee.ON||this._scrollPolicyX==Ee.AUTO&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX());this.showScrollBarY=this.get_showScrollBars()&&(this._scrollPolicyX==Ee.ON||this._scrollPolicyY==Ee.AUTO&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY());this.topViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==
ja.TOP?this.scrollBarX.get_height():0;this.bottomViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==ja.BOTTOM?this.scrollBarX.get_height():0;this.leftViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==ja.LEFT?this.scrollBarY.get_width():0;this.rightViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==ja.RIGHT?this.scrollBarY.get_width():0;this.chromeMeasuredMinWidth=this.chromeMeasuredWidth=
0;this.chromeMeasuredMaxWidth=1/0;this.chromeMeasuredMinHeight=this.chromeMeasuredHeight=0;this.chromeMeasuredMaxHeight=1/0},calculateViewPortOffsets:function(a,b){},calculateViewPortOffsetsForFixedScrollBarX:function(a){if(this.scrollBarX!=null){var b=!1;this.get_showScrollBars()&&this.get_scrollPolicyX()!=Ee.OFF&&(b=this.get_scrollPolicyX()==Ee.ON,b||this.get_scrollPolicyX()!=Ee.AUTO||(b=a?this.actualWidth:this.get_explicitWidth(),b!=null&&(b-=this.get_paddingLeft()+this.get_paddingRight()+this.leftViewPortOffset+
this.rightViewPortOffset,b<0&&(b=0)),b!=null||a||(b=this._viewPort.get_visibleWidth()),a=this._viewPort.get_width(),b=b!=null&&a>b&&!ff.fuzzyEquals(a,b),b||(b=this.get_explicitMaxWidth(),b!=null&&(b-=this.get_paddingLeft()+this.get_paddingRight()+this.leftViewPortOffset+this.rightViewPortOffset,b<0&&(b=0)),b=b!=null&&a>b&&!ff.fuzzyEquals(a,b))));this.showScrollBarX!=b&&(this.showScrollBarX=b,this.get_fixedScrollBars()&&(a=this.scrollBarX.get_height(),this.showScrollBarX||(a=-a),this.get_scrollBarXPosition()==
ja.TOP?this.topViewPortOffset+=a:this.bottomViewPortOffset+=a))}},calculateViewPortOffsetsForFixedScrollBarY:function(a){if(this.scrollBarY!=null){var b=!1;this.get_showScrollBars()&&this.get_scrollPolicyY()!=Ee.OFF&&(b=this.get_scrollPolicyY()==Ee.ON,b||this.get_scrollPolicyY()!=Ee.AUTO||(b=a?this.actualHeight:this.get_explicitHeight(),b!=null&&(b-=this.get_paddingTop()+this.get_paddingBottom()+this.topViewPortOffset+this.bottomViewPortOffset,b<0&&(b=0)),b!=null||a||(b=this._viewPort.get_visibleHeight()),
a=this._viewPort.get_height(),b=b!=null&&a>b&&!ff.fuzzyEquals(a,b),b||(b=this.get_explicitMaxHeight(),b!=null&&(b-=this.get_paddingTop()+this.get_paddingBottom()+this.topViewPortOffset+this.bottomViewPortOffset,b<0&&(b=0)),b=b!=null&&a>b&&!ff.fuzzyEquals(a,b))));this.showScrollBarY!=b&&(this.showScrollBarY=b,this.get_fixedScrollBars()&&(a=this.scrollBarY.get_width(),this.showScrollBarY||(a=-a),this.get_scrollBarYPosition()==ja.LEFT?this.leftViewPortOffset+=a:this.rightViewPortOffset+=a))}},refreshViewPortBoundsForMeasurement:function(){var a=
this._ignoreViewPortResizing;this._ignoreViewPortResizing=!0;var b=this.get_paddingLeft()+this.leftViewPortOffset,c=this.get_paddingTop()+this.topViewPortOffset;if(this._scrollMode==uj.MASK||this._scrollMode==uj.MASKLESS||this._currentViewPortMaskSkin!=null)b-=this.get_scrollX(),c-=this.get_scrollY();this._viewPort.set_x(b);this._viewPort.set_y(c);this.get_explicitWidth()!=null?(b=this.get_explicitWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),
b<0&&(b=0),this._viewPort.set_visibleWidth(b)):this._viewPort.set_visibleWidth(null);this.get_explicitHeight()!=null?(b=this.get_explicitHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_visibleHeight(b)):this._viewPort.set_visibleHeight(null);this.get_explicitMinWidth()!=null?(b=this.get_explicitMinWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),
this._viewPort.set_minVisibleWidth(b)):this._viewPort.set_minVisibleWidth(null);this.get_explicitMinHeight()!=null?(b=this.get_explicitMinHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_minVisibleHeight(b)):this._viewPort.set_minVisibleHeight(null);this.get_explicitMaxWidth()!=null?(b=this.get_explicitMaxWidth()-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&
(b=0),this._viewPort.set_maxVisibleWidth(b)):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?(b=this._backgroundSkinMeasurements.maxWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight(),b<0&&(b=0),this._viewPort.set_maxVisibleWidth(b)):this._viewPort.set_maxVisibleWidth(1/0);this.get_explicitMaxHeight()!=null?(b=this.get_explicitMaxHeight()-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-
this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_maxVisibleHeight(b)):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?(b=this._backgroundSkinMeasurements.maxHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom(),b<0&&(b=0),this._viewPort.set_maxVisibleHeight(b)):this._viewPort.set_maxVisibleHeight(1/0);this._viewPort.validateNow();this._ignoreViewPortResizing=a},refreshViewPortBoundsForLayout:function(){var a=
this._ignoreViewPortResizing;this._ignoreViewPortResizing=!0;var b=this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();b<0&&(b=0);var c=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();c<0&&(c=0);var d=this.actualMinWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();d<0&&(d=0);var f=this.actualMinHeight-this.topViewPortOffset-
this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();f<0&&(f=0);var g=this.actualMaxWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();g<0&&(g=0);var h=this.actualMaxHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();h<0&&(h=0);var l=this.get_paddingLeft()+this.leftViewPortOffset,k=this.get_paddingTop()+this.topViewPortOffset;if(this._scrollMode==uj.MASK||this._scrollMode==uj.MASKLESS||
this._currentViewPortMaskSkin!=null)l-=this.get_scrollX(),k-=this.get_scrollY();this._viewPort.set_x(l);this._viewPort.set_y(k);this._viewPort.set_visibleWidth(b);this._viewPort.set_visibleHeight(c);this._viewPort.set_minVisibleWidth(d);this._viewPort.set_minVisibleHeight(f);this._viewPort.set_maxVisibleWidth(g);this._viewPort.set_maxVisibleHeight(h);this._viewPort.validateNow();this._ignoreViewPortResizing=a},refreshScrollerValues:function(){this.stage!=null&&this.scroller.set_target(u.__cast(this._viewPort,
Da));this.scroller.enabledX=this._enabled&&this._scrollPolicyX!=Ee.OFF;this.scroller.enabledY=this._enabled&&this._scrollPolicyY!=Ee.OFF},refreshScrollBarValues:function(){if(this.scrollBarX!=null){var a=this._ignoreScrollBarXChange;this._ignoreScrollBarXChange=!0;this.scrollBarX.set_minimum(this.scroller.get_minScrollX());this.scrollBarX.set_maximum(this.scroller.get_maxScrollX());this.scrollBarX.set_value(this.scroller.get_scrollX());this.scrollBarX.set_page((this.scroller.get_maxScrollX()-this.scroller.get_minScrollX())*
this._viewPort.get_visibleWidth()/this._viewPort.get_width());this.scrollBarX.set_step(this._scrollStepX);u.__cast(this.scrollBarX,lb).set_visible(this.showScrollBarX);!this.get_fixedScrollBars()&&this.get_autoHideScrollBars()||this.scrollBarX.set_alpha(1);this._ignoreScrollBarXChange=a}this.scrollBarY!=null&&(a=this._ignoreScrollBarYChange,this._ignoreScrollBarYChange=!0,this.scrollBarY.set_minimum(this.scroller.get_minScrollY()),this.scrollBarY.set_maximum(this.scroller.get_maxScrollY()),this.scrollBarY.set_value(this.scroller.get_scrollY()),
this.scrollBarY.set_page((this.scroller.get_maxScrollY()-this.scroller.get_minScrollY())*this._viewPort.get_visibleHeight()/this._viewPort.get_height()),this.scrollBarY.set_step(this._scrollStepY),u.__cast(this.scrollBarY,lb).set_visible(this.showScrollBarY),!this.get_fixedScrollBars()&&this.get_autoHideScrollBars()||this.scrollBarY.set_alpha(1),this._ignoreScrollBarYChange=a)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();var l=this.get_explicitWidth();a&&(l=this.get_measureViewPort()?
this._viewPort.get_visibleWidth():0,l+=this.leftViewPortOffset+this.rightViewPortOffset,l=Math.max(l,this.chromeMeasuredWidth),l+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(l=Math.max(l,this._currentBackgroundSkin.get_width())));a=this.get_explicitHeight();b&&(a=this.get_measureViewPort()?this._viewPort.get_visibleHeight():0,a+=this.topViewPortOffset+this.bottomViewPortOffset,a=Math.max(a,this.chromeMeasuredHeight),a+=this.get_paddingTop()+this.get_paddingBottom(),
this._currentBackgroundSkin!=null&&(a=Math.max(a,this._currentBackgroundSkin.get_height())));b=this.get_explicitMinWidth();c&&(b=this.get_measureViewPort()?this._viewPort.get_minVisibleWidth():0,b+=this.leftViewPortOffset+this.rightViewPortOffset,b=Math.max(b,this.chromeMeasuredMinWidth),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(b,h.get_minWidth()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(b,this._backgroundSkinMeasurements.minWidth)));
c=this.get_explicitMinHeight();d&&(c=this.get_measureViewPort()?this._viewPort.get_minVisibleHeight():0,c+=this.topViewPortOffset+this.bottomViewPortOffset,c=Math.max(c,this.chromeMeasuredMinHeight),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(c,h.get_minHeight()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(c,this._backgroundSkinMeasurements.minHeight)));d=this.get_explicitMaxWidth();f&&(d=this.get_measureViewPort()?
this._viewPort.get_maxVisibleWidth():1/0,d+=this.leftViewPortOffset+this.rightViewPortOffset,d=Math.min(d,this.chromeMeasuredMaxWidth),d+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?d=Math.min(d,h.get_maxWidth()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(d=Math.min(d,this._backgroundSkinMeasurements.maxWidth)));f=this.get_explicitMaxHeight();g&&(f=this.get_measureViewPort()?this._viewPort.get_maxVisibleHeight():1/0,f+=this.topViewPortOffset+
this.bottomViewPortOffset,f=Math.min(f,this.chromeMeasuredMaxHeight),f+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?f=Math.min(f,h.get_maxHeight()):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null&&(f=Math.min(f,this._backgroundSkinMeasurements.maxHeight)));return this.saveMeasurements(l,a,b,c,d,f)},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=
a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),
u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshMaskSkin:function(){var a=this._currentMaskSkin;this._currentMaskSkin=this.getCurrentMaskSkin();this._currentMaskSkin!=a&&(this.removeCurrentMaskSkin(a),this.addCurrentMaskSkin(this._currentMaskSkin))},getCurrentMaskSkin:function(){return this.get_maskSkin()},
addCurrentMaskSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a),this.set_mask(a))},removeCurrentMaskSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a),this.set_mask(null))},refreshViewPortMaskSkin:function(){var a=this._currentViewPortMaskSkin;this._currentViewPortMaskSkin=this.getCurrentViewPortMaskSkin();this._currentViewPortMaskSkin!=a&&(this.removeCurrentViewPortMaskSkin(a),
this.addCurrentViewPortMaskSkin(this._currentViewPortMaskSkin))},getCurrentViewPortMaskSkin:function(){return this.get_viewPortMaskSkin()!=null?this.get_viewPortMaskSkin():this._scrollMode==uj.MASK?(this._fallbackViewPortMaskSkin==null&&(this._fallbackViewPortMaskSkin=new db(Ab.SolidColor(16711935))),this._fallbackViewPortMaskSkin):null},addCurrentViewPortMaskSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a),u.__cast(this._viewPort,
ea).set_mask(a))},removeCurrentViewPortMaskSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a),u.__cast(this._viewPort,ea).set_mask(null))},refreshScrollBarsCornerSkin:function(){var a=this._currentScrollBarsCornerSkin;this._currentScrollBarsCornerSkin=this.getCurrentScrollBarsCornerSkin();this._currentScrollBarsCornerSkin!=a&&(this.removeCurrentScrollBarsCornerSkin(a),this.addCurrentScrollBarsCornerSkin(this._currentScrollBarsCornerSkin))},getCurrentScrollBarsCornerSkin:function(){return this.get_scrollBarsCornerSkin()},
addCurrentScrollBarsCornerSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentScrollBarsCornerSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},layoutChildren:function(){this.layoutBackgroundSkin();this.layoutMaskSkin();this.layoutViewPortMaskSkin();this.layoutScrollBars()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),
this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},layoutMaskSkin:function(){this._currentMaskSkin!=null&&(this._currentMaskSkin.set_x(0),this._currentMaskSkin.set_y(0),this._currentMaskSkin.set_width(this.actualWidth),
this._currentMaskSkin.set_height(this.actualHeight),u.__implements(this._currentMaskSkin,oa)&&this._currentMaskSkin.validateNow())},layoutViewPortMaskSkin:function(){if(this._currentViewPortMaskSkin!=null){var a=this.get_paddingLeft()+this.leftViewPortOffset,b=this.get_paddingTop()+this.topViewPortOffset,c=this._viewPort.get_visibleWidth(),d=this._viewPort.get_visibleHeight();this.get_fixedScrollBars()&&this.scrollBarY.get_visible()&&(c+=this.scrollBarY.get_width(),this.get_scrollBarYPosition()==
ja.LEFT&&(a-=this.scrollBarY.get_width()));this.get_fixedScrollBars()&&this.scrollBarX.get_visible()&&(d+=this.scrollBarX.get_height(),this.get_scrollBarXPosition()==ja.TOP&&(a-=this.scrollBarX.get_height()));this._currentViewPortMaskSkin.set_x(a);this._currentViewPortMaskSkin.set_y(b);this._currentViewPortMaskSkin.set_width(c);this._currentViewPortMaskSkin.set_height(d);u.__implements(this._currentViewPortMaskSkin,oa)&&this._currentViewPortMaskSkin.validateNow()}},layoutScrollBars:function(){var a=
this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();a<0&&(a=0);var b=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();b<0&&(b=0);this.scrollBarX!=null&&u.__implements(this.scrollBarX,oa)&&this.scrollBarX.validateNow();this.scrollBarY!=null&&u.__implements(this.scrollBarY,oa)&&this.scrollBarY.validateNow();if(this.scrollBarX!=null)if(this.get_scrollBarXPosition()._hx_index==
0?this.scrollBarX.set_y(this.get_paddingTop()):this.scrollBarX.set_y(this.get_paddingTop()+this.topViewPortOffset+b),this.scrollBarX.set_x(this.get_paddingLeft()+this.leftViewPortOffset),this.get_fixedScrollBars())this.scrollBarX.set_width(a);else{var c=this.scrollBarX;c.set_y(c.get_y()-this.scrollBarX.get_height());!this.showScrollBarY&&this._hideScrollBarY==null||this.scrollBarY==null?this.scrollBarX.set_width(a):(c=a-this.scrollBarY.get_width(),c<0&&(c=0),this.scrollBarX.set_width(c))}this.scrollBarY!=
null&&(this.get_scrollBarYPosition()._hx_index==3?this.scrollBarY.set_x(this.get_paddingLeft()):this.scrollBarY.set_x(this.get_paddingLeft()+this.leftViewPortOffset+a),this.scrollBarY.set_y(this.get_paddingTop()+this.topViewPortOffset),this.get_fixedScrollBars()?this.scrollBarY.set_height(b):(c=this.scrollBarY,c.set_x(c.get_x()-this.scrollBarY.get_width()),!this.showScrollBarX&&this._hideScrollBarX==null||this.scrollBarX==null?this.scrollBarY.set_height(b):(a=b-this.scrollBarX.get_height(),a<0&&(a=
0),this.scrollBarY.set_height(a))));this._currentScrollBarsCornerSkin!=null&&(this.get_fixedScrollBars()&&this.scrollBarX!=null&&this.scrollBarY!=null&&this.scrollBarX.get_visible()&&this.scrollBarY.get_visible()?(this._currentScrollBarsCornerSkin.set_x(this.scrollBarY.get_x()),this._currentScrollBarsCornerSkin.set_width(this.scrollBarY.get_width()),this._currentScrollBarsCornerSkin.set_y(this.scrollBarX.get_y()),this._currentScrollBarsCornerSkin.set_height(this.scrollBarX.get_height()),this._currentScrollBarsCornerSkin.set_visible(!0)):
this._currentScrollBarsCornerSkin.set_visible(!1))},refreshScrollRect:function(){var a=this.scroller.get_scrollX(),b=this.scroller.get_scrollY();if(this.get_scrollPixelSnapping()){var c=Qg.getConcatenatedScaleX(this),d=Qg.getConcatenatedScaleY(this);a=Math.round(a/c)*c;b=Math.round(b/d)*d}if(this._scrollMode==uj.MASK||this._scrollMode==uj.MASKLESS||this._currentViewPortMaskSkin!=null)d=u.__cast(this._viewPort,ea),d.set_scrollRect(null),this._viewPort.set_x(this.get_paddingLeft()+this.leftViewPortOffset-
a),this._viewPort.set_y(this.get_paddingTop()+this.topViewPortOffset-b);else if(this._scrollMode==uj.SCROLL_RECT){c=this._scrollRect1;this._currentScrollRect==c&&(c=this._scrollRect2);this._currentScrollRect=c;d=this.actualWidth-this.leftViewPortOffset-this.rightViewPortOffset-this.get_paddingLeft()-this.get_paddingRight();d<0&&(d=0);var f=this.actualHeight-this.topViewPortOffset-this.bottomViewPortOffset-this.get_paddingTop()-this.get_paddingBottom();f<0&&(f=0);c.setTo(a,b,d,f);d=u.__cast(this._viewPort,
ea);d.set_scrollRect(c)}else throw new rb("Unknown scrollMode: "+L.string(this._scrollMode));},revealScrollBarX:function(){this.scrollBarX!=null&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX()&&(this._hideScrollBarX!=null&&ua.stop(this._hideScrollBarX),this.scrollBarX.set_alpha(1),this._scrollBarXRevealTime=Oa.getTimer())},revealScrollBarY:function(){this.scrollBarY!=null&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY()&&(this._hideScrollBarY!=null&&ua.stop(this._hideScrollBarY),
this.scrollBarY.set_alpha(1),this._scrollBarYRevealTime=Oa.getTimer())},hideScrollBarX:function(){var a=this;if(this.scrollBarX!=null&&this._hideScrollBarX==null&&this.scrollBarX.get_alpha()!=0)if(this.get_hideScrollBarDuration()==0)this.scrollBarX.set_alpha(0);else{this._hideScrollBarX=ua.update(function(c){return a.scrollBarX.set_alpha(c)},this.get_hideScrollBarDuration(),[this.scrollBarX.get_alpha()],[0],!0);this._hideScrollBarX.ease(this.get_hideScrollBarEase());this._hideScrollBarX.autoVisible(!1);
var b=(Oa.getTimer()-this._scrollBarXRevealTime)/1E3;b<this.get_showScrollBarMinimumDuration()&&this._hideScrollBarX.delay(this.get_showScrollBarMinimumDuration()-b);this._hideScrollBarX.onComplete(m(this,this.hideScrollBarX_onComplete))}},hideScrollBarY:function(){var a=this;if(this.scrollBarY!=null&&this._hideScrollBarY==null&&this.scrollBarY.get_alpha()!=0)if(this.get_hideScrollBarDuration()==0)this.scrollBarY.set_alpha(0);else{this._hideScrollBarY=ua.update(function(c){return a.scrollBarY.set_alpha(c)},
this.get_hideScrollBarDuration(),[this.scrollBarY.get_alpha()],[0],!0);this._hideScrollBarY.ease(this.get_hideScrollBarEase());this._hideScrollBarY.autoVisible(!1);var b=(Oa.getTimer()-this._scrollBarYRevealTime)/1E3;b<this.get_showScrollBarMinimumDuration()&&this._hideScrollBarY.delay(this.get_showScrollBarMinimumDuration()-b);this._hideScrollBarY.onComplete(m(this,this.hideScrollBarY_onComplete))}},checkForRevealScrollBars:function(){!this._scrollerDraggingX&&this.scroller.get_draggingX()&&(this._scrollerDraggingX=
!0,this.revealScrollBarX());!this._scrollerDraggingY&&this.scroller.get_draggingY()&&(this._scrollerDraggingY=!0,this.revealScrollBarY())},scrollWithKeyboard:function(a){if(this._scrollPolicyY!=Ee.OFF||this._scrollPolicyX!=Ee.OFF){var b=this._scrollStepX;b<=0&&(b=1);var c=this._scrollStepY;c<=0&&(c=1);var d=this.get_scrollX(),f=this.get_scrollY();switch(a.keyCode){case 33:f=this.get_scrollY()-this._viewPort.get_visibleHeight();break;case 34:f=this.get_scrollY()+this._viewPort.get_visibleHeight();
break;case 35:f=this.get_maxScrollY();break;case 36:f=this.get_minScrollY();break;case 37:d=this.get_scrollX()-b;break;case 38:f=this.get_scrollY()-c;break;case 39:d=this.get_scrollX()+b;break;case 40:f=this.get_scrollY()+c;break;default:return}f<this.get_minScrollY()?f=this.get_minScrollY():f>this.get_maxScrollY()&&(f=this.get_maxScrollY());d<this.get_minScrollX()?d=this.get_minScrollX():d>this.get_maxScrollX()&&(d=this.get_maxScrollX());b=!1;this.get_scrollY()!=f&&this._scrollPolicyY!=Ee.OFF&&(b=
!0,this.set_scrollY(f));this.get_scrollX()!=d&&this._scrollPolicyX!=Ee.OFF&&(b=!0,this.set_scrollX(d));b&&a.preventDefault()}},baseScrollContainer_addedToStageHandler:function(a){this.setInvalid(x.SCROLL)},baseScrollContainer_removedFromStageHandler:function(a){this.scroller!=null&&this.scroller.set_target(null)},baseScrollContainer_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.scrollWithKeyboard(a))},
baseScrollContainer_scroller_scrollStartHandler:function(a){a=this.scroller.get_touchPointID();if(this.scroller.get_touchPointIsSimulated()){var b=Ad.forStage(this.stage);a=b.claimMouse(this);if(!a){this.scroller.stop();return}}else if(a!=null&&(b=Ad.forStage(this.stage),a=b.claimTouch(a,this),!a)){this.scroller.stop();return}this._viewPort.addEventListener("mouseDown",m(this,this.baseScrollContainer_viewPort_mouseDownHandler));this._viewPort.addEventListener("touchBegin",m(this,this.baseScrollContainer_viewPort_touchBeginHandler));
this._scrollerDraggingY=this._scrollerDraggingX=!1;this.checkForRevealScrollBars();Bd.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},baseScrollContainer_scroller_scrollHandler:function(a){this._ignoreScrollerChanges?this._settingScrollerDimensions&&this.needsScrollMeasurement()?this.setInvalid(x.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY())):(this.checkForRevealScrollBars(),this.needsScrollMeasurement()?
this.setInvalid(x.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY()),this.refreshScrollRect(),this.refreshScrollBarValues()),Bd.dispatch(this,"scroll",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY()))},baseScrollContainer_scroller_scrollCompleteHandler:function(a){this._viewPort.removeEventListener("mouseDown",m(this,this.baseScrollContainer_viewPort_mouseDownHandler));this._viewPort.removeEventListener("touchBegin",m(this,this.baseScrollContainer_viewPort_touchBeginHandler));
this._scrollerDraggingY=this._scrollerDraggingX=!1;this._scrollBarXHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarX();this._scrollBarYHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarY();Bd.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},reclaimMouse:function(){if(this.scroller.get_touchPointIsSimulated()){var a=Ad.forStage(this.stage);a.getMouseClaim()==null&&a.claimMouse(this)}},
reclaimTouch:function(a){if(!this.scroller.get_touchPointIsSimulated()&&this.scroller.get_touchPointID()!=null&&this.scroller.get_touchPointID()==a){var b=Ad.forStage(this.stage);b.getTouchClaim(a)==null&&b.claimTouch(a,this)}},baseScrollContainer_viewPort_mouseDownHandler:function(a){this.reclaimMouse()},baseScrollContainer_viewPort_touchBeginHandler:function(a){this.reclaimTouch(a.touchPointID)},scrollBarX_changeHandler:function(a){this._ignoreScrollBarXChange||this.scroller.set_scrollX(this.scrollBarX.get_value())},
scrollBarY_changeHandler:function(a){this._ignoreScrollBarYChange||this.scroller.set_scrollY(this.scrollBarY.get_value())},scrollBarX_rollOverHandler:function(a){this._scrollBarXHover=!0;this.revealScrollBarX()},scrollBarX_rollOutHandler:function(a){this._scrollBarXHover&&(this._scrollBarXHover=!1,this._scrollerDraggingX||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarX())},scrollBarY_rollOverHandler:function(a){this._scrollBarYHover=!0;this.revealScrollBarY()},scrollBarY_rollOutHandler:function(a){this._scrollBarYHover&&
(this._scrollBarYHover=!1,this._scrollerDraggingY||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarY())},scrollBarX_scrollStartHandler:function(a){this.scroller.stop();this._scrollerDraggingX=!0;Bd.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},scrollBarX_scrollCompleteHandler:function(a){this._scrollerDraggingX=!1;this._scrollBarXHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarX();Bd.dispatch(this,
"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},scrollBarY_scrollStartHandler:function(a){this.scroller.stop();this._scrollerDraggingY=!0;Bd.dispatch(this,"scrollStart",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},scrollBarY_scrollCompleteHandler:function(a){this._scrollerDraggingY=!1;this._scrollBarYHover||this.get_fixedScrollBars()||!this.get_autoHideScrollBars()||this.hideScrollBarY();Bd.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),
this.scroller.get_scrollY())},hideScrollBarX_onComplete:function(){this._hideScrollBarX=null},hideScrollBarY_onComplete:function(){this._hideScrollBarY=null},viewPort_resizeHandler:function(a){this._ignoreViewPortResizing||this.setInvalid(x.SIZE)},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=
a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);
return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==
a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;
this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__maskSkin:null,get_maskSkin:function(){return this.__maskSkin},set_maskSkin:function(a){if(!this.setStyle("maskSkin")||this.__maskSkin==a)return this.__maskSkin;this._previousClearStyle=m(this,this.clearStyle_maskSkin);
this.__maskSkin=a;this.setInvalid(x.STYLES);return this.__maskSkin},clearStyle_maskSkin:function(){this.set_maskSkin(null);return this.get_maskSkin()},__viewPortMaskSkin:null,get_viewPortMaskSkin:function(){return this.__viewPortMaskSkin},set_viewPortMaskSkin:function(a){if(!this.setStyle("viewPortMaskSkin")||this.__viewPortMaskSkin==a)return this.__viewPortMaskSkin;this._previousClearStyle=m(this,this.clearStyle_viewPortMaskSkin);this.__viewPortMaskSkin=a;this.setInvalid(x.STYLES);return this.__viewPortMaskSkin},
clearStyle_viewPortMaskSkin:function(){this.set_viewPortMaskSkin(null);return this.get_viewPortMaskSkin()},__scrollBarsCornerSkin:null,get_scrollBarsCornerSkin:function(){return this.__scrollBarsCornerSkin},set_scrollBarsCornerSkin:function(a){if(!this.setStyle("scrollBarsCornerSkin")||this.__scrollBarsCornerSkin==a)return this.__scrollBarsCornerSkin;this._previousClearStyle=m(this,this.clearStyle_scrollBarsCornerSkin);this.__scrollBarsCornerSkin=a;this.setInvalid(x.STYLES);return this.__scrollBarsCornerSkin},
clearStyle_scrollBarsCornerSkin:function(){this.set_scrollBarsCornerSkin(null);return this.get_scrollBarsCornerSkin()},__fixedScrollBars:null,get_fixedScrollBars:function(){return this.__fixedScrollBars},set_fixedScrollBars:function(a){if(!this.setStyle("fixedScrollBars")||this.__fixedScrollBars==a)return this.__fixedScrollBars;this._previousClearStyle=m(this,this.clearStyle_fixedScrollBars);this.__fixedScrollBars=a;this.setInvalid(x.STYLES);return this.__fixedScrollBars},clearStyle_fixedScrollBars:function(){this.set_fixedScrollBars(!1);
return this.get_fixedScrollBars()},__showScrollBars:null,get_showScrollBars:function(){return this.__showScrollBars},set_showScrollBars:function(a){if(!this.setStyle("showScrollBars")||this.__showScrollBars==a)return this.__showScrollBars;this._previousClearStyle=m(this,this.clearStyle_showScrollBars);this.__showScrollBars=a;this.setInvalid(x.STYLES);return this.__showScrollBars},clearStyle_showScrollBars:function(){this.set_showScrollBars(!0);return this.get_showScrollBars()},__autoHideScrollBars:null,
get_autoHideScrollBars:function(){return this.__autoHideScrollBars},set_autoHideScrollBars:function(a){if(!this.setStyle("autoHideScrollBars")||this.__autoHideScrollBars==a)return this.__autoHideScrollBars;this._previousClearStyle=m(this,this.clearStyle_autoHideScrollBars);this.__autoHideScrollBars=a;this.setInvalid(x.STYLES);return this.__autoHideScrollBars},clearStyle_autoHideScrollBars:function(){this.set_autoHideScrollBars(!0);return this.get_autoHideScrollBars()},__scrollBarXPosition:null,get_scrollBarXPosition:function(){return this.__scrollBarXPosition},
set_scrollBarXPosition:function(a){if(!this.setStyle("scrollBarXPosition")||this.__scrollBarXPosition==a)return this.__scrollBarXPosition;this._previousClearStyle=m(this,this.clearStyle_scrollBarXPosition);this.__scrollBarXPosition=a;this.setInvalid(x.STYLES);return this.__scrollBarXPosition},clearStyle_scrollBarXPosition:function(){this.set_scrollBarXPosition(ja.BOTTOM);return this.get_scrollBarXPosition()},__scrollBarYPosition:null,get_scrollBarYPosition:function(){return this.__scrollBarYPosition},
set_scrollBarYPosition:function(a){if(!this.setStyle("scrollBarYPosition")||this.__scrollBarYPosition==a)return this.__scrollBarYPosition;this._previousClearStyle=m(this,this.clearStyle_scrollBarYPosition);this.__scrollBarYPosition=a;this.setInvalid(x.STYLES);return this.__scrollBarYPosition},clearStyle_scrollBarYPosition:function(){this.set_scrollBarYPosition(ja.RIGHT);return this.get_scrollBarYPosition()},__showScrollBarMinimumDuration:null,get_showScrollBarMinimumDuration:function(){return this.__showScrollBarMinimumDuration},
set_showScrollBarMinimumDuration:function(a){if(!this.setStyle("showScrollBarMinimumDuration")||this.__showScrollBarMinimumDuration==a)return this.__showScrollBarMinimumDuration;this._previousClearStyle=m(this,this.clearStyle_showScrollBarMinimumDuration);this.__showScrollBarMinimumDuration=a;this.setInvalid(x.STYLES);return this.__showScrollBarMinimumDuration},clearStyle_showScrollBarMinimumDuration:function(){this.set_showScrollBarMinimumDuration(.5);return this.get_showScrollBarMinimumDuration()},
__hideScrollBarDuration:null,get_hideScrollBarDuration:function(){return this.__hideScrollBarDuration},set_hideScrollBarDuration:function(a){if(!this.setStyle("hideScrollBarDuration")||this.__hideScrollBarDuration==a)return this.__hideScrollBarDuration;this._previousClearStyle=m(this,this.clearStyle_hideScrollBarDuration);this.__hideScrollBarDuration=a;this.setInvalid(x.STYLES);return this.__hideScrollBarDuration},clearStyle_hideScrollBarDuration:function(){this.set_hideScrollBarDuration(.2);return this.get_hideScrollBarDuration()},
__hideScrollBarEase:null,get_hideScrollBarEase:function(){return this.__hideScrollBarEase},set_hideScrollBarEase:function(a){if(!this.setStyle("hideScrollBarEase")||this.__hideScrollBarEase==a)return this.__hideScrollBarEase;this._previousClearStyle=m(this,this.clearStyle_hideScrollBarEase);this.__hideScrollBarEase=a;this.setInvalid(x.STYLES);return this.__hideScrollBarEase},clearStyle_hideScrollBarEase:function(){this.set_hideScrollBarEase(lh.easeOut);return this.get_hideScrollBarEase()},__scrollPixelSnapping:null,
get_scrollPixelSnapping:function(){return this.__scrollPixelSnapping},set_scrollPixelSnapping:function(a){if(!this.setStyle("scrollPixelSnapping")||this.__scrollPixelSnapping==a)return this.__scrollPixelSnapping;this._previousClearStyle=m(this,this.clearStyle_scrollPixelSnapping);this.__scrollPixelSnapping=a;this.setInvalid(x.STYLES);return this.__scrollPixelSnapping},clearStyle_scrollPixelSnapping:function(){this.set_scrollPixelSnapping(!1);return this.get_scrollPixelSnapping()},__class__:ob,__properties__:I(wa.prototype.__properties__,
{set_scrollMode:"set_scrollMode",get_scrollMode:"get_scrollMode",get_measureViewPort:"get_measureViewPort",set_scrollPixelSnapping:"set_scrollPixelSnapping",get_scrollPixelSnapping:"get_scrollPixelSnapping",set_hideScrollBarEase:"set_hideScrollBarEase",get_hideScrollBarEase:"get_hideScrollBarEase",set_hideScrollBarDuration:"set_hideScrollBarDuration",get_hideScrollBarDuration:"get_hideScrollBarDuration",set_showScrollBarMinimumDuration:"set_showScrollBarMinimumDuration",get_showScrollBarMinimumDuration:"get_showScrollBarMinimumDuration",
set_scrollBarYPosition:"set_scrollBarYPosition",get_scrollBarYPosition:"get_scrollBarYPosition",set_scrollBarXPosition:"set_scrollBarXPosition",get_scrollBarXPosition:"get_scrollBarXPosition",set_scrollPolicyY:"set_scrollPolicyY",get_scrollPolicyY:"get_scrollPolicyY",set_scrollPolicyX:"set_scrollPolicyX",get_scrollPolicyX:"get_scrollPolicyX",set_scrollStepY:"set_scrollStepY",get_scrollStepY:"get_scrollStepY",set_scrollStepX:"set_scrollStepX",get_scrollStepX:"get_scrollStepX",get_maxScrollY:"get_maxScrollY",
get_maxScrollX:"get_maxScrollX",get_minScrollY:"get_minScrollY",get_minScrollX:"get_minScrollX",set_restrictedScrollY:"set_restrictedScrollY",get_restrictedScrollY:"get_restrictedScrollY",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_restrictedScrollX:"set_restrictedScrollX",get_restrictedScrollX:"get_restrictedScrollX",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_scrollerFactory:"set_scrollerFactory",get_scrollerFactory:"get_scrollerFactory",set_scrollBarYFactory:"set_scrollBarYFactory",
get_scrollBarYFactory:"get_scrollBarYFactory",set_scrollBarXFactory:"set_scrollBarXFactory",get_scrollBarXFactory:"get_scrollBarXFactory",set_autoHideScrollBars:"set_autoHideScrollBars",get_autoHideScrollBars:"get_autoHideScrollBars",set_showScrollBars:"set_showScrollBars",get_showScrollBars:"get_showScrollBars",set_fixedScrollBars:"set_fixedScrollBars",get_fixedScrollBars:"get_fixedScrollBars",set_scrollBarsCornerSkin:"set_scrollBarsCornerSkin",get_scrollBarsCornerSkin:"get_scrollBarsCornerSkin",
set_viewPortMaskSkin:"set_viewPortMaskSkin",get_viewPortMaskSkin:"get_viewPortMaskSkin",set_maskSkin:"set_maskSkin",get_maskSkin:"get_maskSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",
get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_viewPort:"set_viewPort",get_viewPort:"get_viewPort"})});var dg=function(){};r["feathers.core.IFocusContainer"]=dg;dg.__name__="feathers.core.IFocusContainer";dg.__isInterface__=!0;dg.__interfaces__=[ld];dg.prototype={get_childFocusEnabled:null,set_childFocusEnabled:null,__class__:dg,__properties__:{set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"}};var Ze=
function(){this.__layout=null;this._manageChildVisibility=!1;this._autoSizeMode=Fe.CONTENT;this._childFocusEnabled=!0;this._xmlContent=null;this.items=[];this._displayListBypassEnabled=!0;this._ignoreRemovedEvent=this._ignoreChildChanges=this._ignoreChangesButSetFlags=!1;this.initializeScrollContainerTheme();ob.call(this);this.get_viewPort()==null&&(this.layoutViewPort=new no,this.addRawChild(this.layoutViewPort),this.set_viewPort(this.layoutViewPort));this.addEventListener("addedToStage",m(this,
this.scrollContainer_addedToStageHandler))};r["feathers.controls.ScrollContainer"]=Ze;Ze.__name__="feathers.controls.ScrollContainer";Ze.__interfaces__=[dg];Ze.__super__=ob;Ze.prototype=I(ob.prototype,{layoutViewPort:null,_ignoreRemovedEvent:null,_ignoreChildChanges:null,_ignoreChangesButSetFlags:null,_displayListBypassEnabled:null,items:null,_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==a)return this._xmlContent;if(this._xmlContent!=
null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=null)for(b=0,c=this._xmlContent;b<c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},
set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Fe.STAGE?(this.stage.addEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler),!1,0,!0),this.addEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,
this.scrollContainer_removedFromStageHandler))));return this._autoSizeMode},_manageChildVisibility:null,get_manageChildVisibility:function(){return this._manageChildVisibility},set_manageChildVisibility:function(a){if(this._manageChildVisibility==a)return this._manageChildVisibility;this._manageChildVisibility=a;this.setInvalid(x.LAYOUT);return this._manageChildVisibility},get_numRawChildren:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;var b=this.get_numChildren();
this._displayListBypassEnabled=a;return b},get_numChildren:function(){return this._displayListBypassEnabled?this.layoutViewPort.get_numChildren():ob.prototype.get_numChildren.call(this)},addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.layoutViewPort.get_numChildren()):ob.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return ob.prototype.addChildAt.call(this,a,b);var c=this.items.indexOf(a);if(c==b)return a;c>=0&&X.remove(this.items,
a);this.items.splice(b,0,a);b=this.layoutViewPort.addChildAt(a,b);a.addEventListener("resize",m(this,this.scrollContainer_child_resizeHandler));u.__implements(a,dc)&&a.addEventListener("layoutDataChange",m(this,this.scrollContainer_child_layoutDataChangeHandler),!1,0,!0);a.addEventListener("removed",m(this,this.scrollContainer_child_removedHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},removeChild:function(a){return this.removeChildInternal(a,
!0)},removeChildInternal:function(a,b){if(!this._displayListBypassEnabled)return ob.prototype.removeChild.call(this,a);if(a==null||a.parent!=this.layoutViewPort)return a;X.remove(this.items,a);var c=a;b&&(b=this._ignoreRemovedEvent,this._ignoreRemovedEvent=!0,c=this.layoutViewPort.removeChild(a),this._ignoreRemovedEvent=b);a.removeEventListener("resize",m(this,this.scrollContainer_child_resizeHandler));u.__implements(a,dc)&&a.removeEventListener("layoutDataChange",m(this,this.scrollContainer_child_layoutDataChangeHandler));
a.removeEventListener("removed",m(this,this.scrollContainer_child_removedHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return c},removeChildAt:function(a){return this._displayListBypassEnabled?this.removeChild(this.layoutViewPort.getChildAt(a)):ob.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.layoutViewPort.getChildAt(a):ob.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this._displayListBypassEnabled?
this.items.indexOf(a):ob.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?this.getChildIndex(a)!=b&&(X.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT)):ob.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return ob.prototype.getChildByName.call(this,a);for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==
a)return d}return null},addRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChild(a);this._displayListBypassEnabled=b;return a},addRawChildAt:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChildAt(a,b);this._displayListBypassEnabled=c;return a},removeRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChild(a);this._displayListBypassEnabled=b;return a},
removeRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildByName:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildByName(a);this._displayListBypassEnabled=b;return a},getRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildIndex:function(a){var b=
this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildIndex(a);this._displayListBypassEnabled=b;return a},setRawChildIndex:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.setChildIndex(a,b);this._displayListBypassEnabled=c},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(this._displayListBypassEnabled){if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new oe("The supplied index is out of bounds.");
for(b-=a;b>=0;)this.removeChildAt(a),--b}}else ob.prototype.removeChildren.call(this,a,b)},removeRawChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.removeChildren(a,b);this._displayListBypassEnabled=c},readjustLayout:function(){this.setInvalid(x.LAYOUT)},initializeScrollContainerTheme:function(){Kt.initialize()},collectChildren:function(a){if(a==null)return this.items.slice();for(var b=0,c=this.items;b<c.length;){var d=
c[b];++b;a.push(d)}return a},dispatchEvent:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;a=ob.prototype.dispatchEvent.call(this,a);this._displayListBypassEnabled=b;return a},validateNow:function(){var a=this._ignoreChangesButSetFlags;this._ignoreChangesButSetFlags=!0;ob.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){this._ignoreChangesButSetFlags=!1;var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);(a||b)&&this.refreshLayout();
a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;b=this._ignoreChildChanges;this._ignoreChildChanges=!0;ob.prototype.update.call(this);this._ignoreChildChanges=b;this._displayListBypassEnabled=a},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;return a||b||c||d||f||g?this._autoSizeMode==Fe.STAGE&&
this.stage!=null?(b=this.globalToLocal(new Qa),c=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight)),a=c.x-b.x,b=c.y-b.y,this.saveMeasurements(a,b,a,b)):ob.prototype.measure.call(this):!1},refreshViewPortBoundsForMeasurement:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;ob.prototype.refreshViewPortBoundsForMeasurement.call(this);this._displayListBypassEnabled=a},refreshViewPortBoundsForLayout:function(){var a=this._displayListBypassEnabled;
this._displayListBypassEnabled=!0;ob.prototype.refreshViewPortBoundsForLayout.call(this);this._displayListBypassEnabled=a},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=
!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.layoutViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.layoutViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){return u.__implements(this.get_layout(),Oe)},refreshLayout:function(){this.layoutViewPort.set_manageChildVisibility(this._manageChildVisibility);this.layoutViewPort.set_layout(this.get_layout())},scrollContainer_addedToStageHandler:function(a){this._autoSizeMode==
Fe.STAGE&&(this.setInvalid(x.SIZE),this.addEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler)),this.stage.addEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler),!1,0,!0))},scrollContainer_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.scrollContainer_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.scrollContainer_stage_resizeHandler))},scrollContainer_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},
scrollContainer_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},scrollContainer_child_resizeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},scrollContainer_child_removedHandler:function(a){this._ignoreRemovedEvent||ef.__neq(a.target,a.currentTarget)||(a=u.__cast(a.currentTarget,ea),this.removeChildInternal(a,
!1))},get_styleContext:function(){return Ze},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__class__:Ze,__properties__:I(ob.prototype.__properties__,{get_numRawChildren:"get_numRawChildren",set_manageChildVisibility:"set_manageChildVisibility",
get_manageChildVisibility:"get_manageChildVisibility",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",set_layout:"set_layout",get_layout:"get_layout"})});var ei=function(){};r["feathers.core.IFocusExtras"]=ei;ei.__name__="feathers.core.IFocusExtras";ei.__isInterface__=!0;ei.__interfaces__=[tj];ei.prototype={get_focusExtrasBefore:null,
get_focusExtrasAfter:null,__class__:ei,__properties__:{get_focusExtrasAfter:"get_focusExtrasAfter",get_focusExtrasBefore:"get_focusExtrasBefore"}};var yd=function(){this._focusExtrasAfter=[];this._focusExtrasBefore=[];this._footerMeasurements=this._footer=null;this._ignoreFooterResize=!1;this._headerMeasurements=this._header=null;this._ignoreHeaderResize=!1;this.initializePanelTheme();Ze.call(this)};r["feathers.controls.Panel"]=yd;yd.__name__="feathers.controls.Panel";yd.__interfaces__=[ei];yd.__super__=
Ze;yd.prototype=I(Ze.prototype,{_ignoreHeaderResize:null,_headerMeasurements:null,_header:null,get_header:function(){return this._header},set_header:function(a){if(this._header==a)return this._header;this._header!=null&&(this._header.removeEventListener("resize",m(this,this.panel_header_resizeHandler)),X.remove(this._focusExtrasBefore,this._header),this.removeRawChild(this._header));this._header=a;this._header!=null?(this._focusExtrasBefore.push(this._header),a=this.layoutViewPort!=null?this.getRawChildIndex(this.layoutViewPort)+
1:0,this.addRawChildAt(this._header,a),u.__implements(this._header,jb)&&this._header.initializeNow(),this._headerMeasurements==null?this._headerMeasurements=new Ib(this._header):this._headerMeasurements.save(this._header),this._header.addEventListener("resize",m(this,this.panel_header_resizeHandler),!1,0,!0)):this._headerMeasurements=null;this.setInvalid(x.LAYOUT);return this._header},_ignoreFooterResize:null,_footerMeasurements:null,_footer:null,get_footer:function(){return this._footer},set_footer:function(a){if(this._footer==
a)return this._footer;this._footer!=null&&(this._footer.removeEventListener("resize",m(this,this.panel_footer_resizeHandler)),X.remove(this._focusExtrasAfter,this._footer),this.removeRawChild(this._footer));this._footer=a;this._footer!=null?(this._focusExtrasAfter.push(this._footer),this.addRawChild(this._footer),u.__implements(this._footer,jb)&&this._footer.initializeNow(),this._footerMeasurements==null?this._footerMeasurements=new Ib(this._footer):this._footerMeasurements.save(this._footer),this._footer.addEventListener("resize",
m(this,this.panel_footer_resizeHandler),!1,0,!0)):this._footerMeasurements=null;this.setInvalid(x.LAYOUT);return this._footer},_focusExtrasBefore:null,get_focusExtrasBefore:function(){return this._focusExtrasBefore},_focusExtrasAfter:null,get_focusExtrasAfter:function(){return this._focusExtrasAfter},dispose:function(){this._header!=null&&this.set_header(null);this._footer!=null&&this.set_footer(null);Ze.prototype.dispose.call(this)},initializePanelTheme:function(){Lt.initialize()},update:function(){this._ignoreChangesButSetFlags=
!1;Ze.prototype.update.call(this);var a=this._ignoreHeaderResize;this._ignoreHeaderResize=!0;this.layoutHeader();this._ignoreHeaderResize=a;a=this._ignoreFooterResize;this._ignoreFooterResize=!0;this.layoutFooter();this._ignoreFooterResize=a},calculateViewPortOffsets:function(a,b){if(this._header!=null){var c=this._ignoreHeaderResize;this._ignoreHeaderResize=!0;this._headerMeasurements!=null&&this._headerMeasurements.restore(this._header);b?this._header.set_width(this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight()):this.get_explicitWidth()!=null&&this._header.set_width(this.get_explicitWidth()-this.get_paddingLeft()-this.get_paddingRight());u.__implements(this._header,oa)&&this._header.validateNow();this.topViewPortOffset+=this._header.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._header.get_width());u.__implements(this._header,Kb)&&(this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._header.get_minWidth()));this._ignoreHeaderResize=
c}this._footer!=null&&(c=this._ignoreFooterResize,this._ignoreFooterResize=!0,this._footerMeasurements!=null&&this._footerMeasurements.restore(this._footer),b?this._footer.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()):this.get_explicitWidth()!=null&&this._footer.set_width(this.get_explicitWidth()-this.get_paddingLeft()-this.get_paddingRight()),u.__implements(this._footer,oa)&&this._footer.validateNow(),this.bottomViewPortOffset+=this._footer.get_height(),this.chromeMeasuredWidth=
Math.max(this.chromeMeasuredWidth,this._footer.get_width()),u.__implements(this._footer,Kb)&&(this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._footer.get_minWidth())),this._ignoreFooterResize=c);Ze.prototype.calculateViewPortOffsets.call(this,a,b)},layoutHeader:function(){this._header!=null&&(this._header.set_x(this.get_paddingLeft()),this._header.set_y(this.get_paddingTop()),this._header.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()),u.__implements(this._header,
oa)&&this._header.validateNow())},layoutFooter:function(){this._footer!=null&&(this._footer.set_x(this.get_paddingLeft()),this._footer.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()),u.__implements(this._footer,oa)&&this._footer.validateNow(),this._footer.set_y(this.actualHeight-this._footer.get_height()-this.get_paddingBottom()))},panel_header_resizeHandler:function(a){this._ignoreHeaderResize||(this._headerMeasurements!=null&&this._headerMeasurements.save(this._header),
this.setInvalid(x.SIZE))},panel_footer_resizeHandler:function(a){this._ignoreFooterResize||(this._footerMeasurements!=null&&this._footerMeasurements.save(this._footer),this.setInvalid(x.SIZE))},get_styleContext:function(){return yd},__class__:yd,__properties__:I(Ze.prototype.__properties__,{get_focusExtrasAfter:"get_focusExtrasAfter",get_focusExtrasBefore:"get_focusExtrasBefore",set_footer:"set_footer",get_footer:"get_footer",set_header:"set_header",get_header:"get_header"})});var Ug=function(a,b,
c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!0);f==null&&(f=!0);d==null&&(d=0);c==null&&(c=0);this._withTabs=!1;this._padding=10;this._interfaces=[];yd.call(this);this.ui=new Zl(this._padding);this.set_backgroundSkin(new Qj(3684408));this.set_layout(new Sm);this.setPadding(0);this._ac=a;c>0?this.set_width(c):this.set_width(500);d>0?this.set_height(d):this.set_height(400);this._head=new pj;this._head.set_text(b);this.set_header(this._head);a=new sc;b=new Gh;b.set_gap(10);a.set_layout(b);h&&(this._btNotes=
new Qb,h=new cg(Sc.getBitmapData("btNotes")),h.set_width(h.set_height(20)),h.smoothing=!0,this._btNotes.set_icon(h),this._btNotes.set_width(40),this._btNotes.set_height(30),this._btNotes.addEventListener("trigger",m(this,this.notesWindow)),a.addChild(this._btNotes));g&&(this._btClose=new Qb,h=new cg(Sc.getBitmapData("btClose")),h.set_width(h.set_height(20)),h.smoothing=!0,this._btClose.set_icon(h),this._btClose.set_width(40),this._btClose.set_height(30),this._btClose.addEventListener("trigger",m(this,
this.closeWindow)),a.addChild(this._btClose));this._head.set_rightView(a);this._tabs=new Tg;this._tabs.set_dataProvider(new mg);this._tabs.set_layoutData(Hd.fill());this._tabs.addEventListener("change",m(this,this.onTab));f&&this.addChild(this._tabs);this._vLayout=new Bg;this._vLayout.setPadding(0);this._vLayout.set_gap(0);this._vLayout.set_verticalAlign(fc.TOP);this._vLayout.set_horizontalAlign(Vb.LEFT);this._forms=new Ze;this._forms.set_backgroundSkin(new Qj);this._forms.set_layout(this._vLayout);
this._forms.set_width(this.get_width());f||this.addChild(this._forms);this._withTabs=f;this.stage!=null?this.initialize():this.addEventListener("addedToStage",m(this,this.startInterface))};r["com.tilbuci.ui.window.PopupWindow"]=Ug;Ug.__name__="com.tilbuci.ui.window.PopupWindow";Ug.__super__=yd;Ug.prototype=I(yd.prototype,{_head:null,_btClose:null,_btNotes:null,_tabs:null,_forms:null,_interfaces:null,_ac:null,_vLayout:null,_padding:null,_withTabs:null,ui:null,acStart:function(){},startInterface:function(a){this.hasEventListener("addedToStage")&&
this.removeEventListener("addedToStage",m(this,this.startInterface));this.redraw()},addForm:function(a,b){b.set_width(this.get_width());b.set_minHeight(this.get_height()-2*this._padding);u.getClass(b).__name__=="com.tilbuci.ui.base.InterfaceColumns"&&b.left.set_width(b.right.set_width(this.get_width()/2));this._interfaces.push(b);this._withTabs?this._tabs.get_dataProvider().add(eg.withDisplayObject(a,b)):this._forms.addChild(b)},kill:function(){this.removeEventListener("addedToStage",m(this,this.redraw));
this._tabs.removeEventListener("change",m(this,this.onTab));for(this.removeChildren();this._interfaces.length>0;)this._interfaces.shift();this._interfaces=null;this._head.removeChildren();this._head=null;this._btClose.removeChildren();this._btClose=null;this._tabs.removeChildren();this._tabs.removeAllItems();this._tabs=null;this._forms.removeChildren();this._forms=null;this.ui.kill();this._ac=this.ui=null},redraw:function(a){a=0;for(var b=this._interfaces.length;a<b;){var c=a++;this._interfaces[c].set_width(this.get_width());
this._interfaces[c].set_minHeight(this.get_height()-2*this._padding);u.getClass(this._interfaces[c]).__name__=="com.tilbuci.ui.base.InterfaceColumns"&&(c=this._interfaces[c],c.left.set_width(c.right.set_width(this.get_width()/2)))}this.ui.redraw()},action:function(a,b){},closeWindow:function(a){Ub.removePopUp(this);this._ac!=null&&this._ac("window-close")},notesWindow:function(a){this._ac!=null&&this._ac("window-notes")},onTab:function(a){this.redraw()},__class__:Ug});var oo=function(a,b,c,d){d==
null&&(d=!1);Ug.call(this,null,a,b,c,d)};r["com.tilbuci.plugin.PluginWindow"]=oo;oo.__name__="com.tilbuci.plugin.PluginWindow";oo.__super__=Ug;oo.prototype=I(Ug.prototype,{__class__:oo});var tq=function(a){this.orientation="";this.displayMultiply=1;this.keyframeTotal=this.keyframeCurrent=this.displayBigger=this.displaySmaller=0;this.movieName=this.movieId=this.sceneName=this.sceneId="";na.call(this,a)};r["com.tilbuci.plugin.SystemInfo"]=tq;tq.__name__="com.tilbuci.plugin.SystemInfo";tq.__super__=
na;tq.prototype=I(na.prototype,{movieName:null,movieId:null,sceneName:null,sceneId:null,keyframeTotal:null,keyframeCurrent:null,displayBigger:null,displaySmaller:null,displayMultiply:null,orientation:null,kill:function(){this.sceneName=this.sceneId=this.movieName=this.movieId=null},onNewMovie:function(a,b,c,d){this.movieName=a;this.movieId=b;this.displayBigger=c;this.displaySmaller=d;this.dispatchEvent(new sj("movieload"))},onNewScene:function(a,b,c){this.sceneName=a;this.sceneId=b;this.keyframeTotal=
c;this.keyframeCurrent=0;this.dispatchEvent(new sj("sceneload"))},onNewKeyframe:function(a){this.keyframeCurrent=a;this.dispatchEvent(new sj("keyframeload"))},onDisplayResize:function(a,b){this.orientation=a;this.displayMultiply=b;this.dispatchEvent(new sj("displayresize"))},__class__:tq});var Uv=function(){this._aShaders=new aa;this._mnPlacement=new aa;this._scDirections=new aa;this._mvOrigins=new aa;this.selScenes=[];this.scenes=new aa;this.selMovies=[];this.movies=new aa;this.groups=[];var a=new aa,
b=t.ln.get("window-movieprop-ornone");a.h.none=b;b=t.ln.get("window-movieprop-oralpha");a.h.alpha=b;b=t.ln.get("window-movieprop-orcenter");a.h.center=b;b=t.ln.get("window-movieprop-ortop");a.h.top=b;b=t.ln.get("window-movieprop-ortopkeep");a.h.topkeep=b;b=t.ln.get("window-movieprop-orbottom");a.h.bottom=b;b=t.ln.get("window-movieprop-orbottomkeep");a.h.bottomkeep=b;b=t.ln.get("window-movieprop-orleft");a.h.left=b;b=t.ln.get("window-movieprop-orleftkeep");a.h.leftkeep=b;b=t.ln.get("window-movieprop-orright");
a.h.righ=b;b=t.ln.get("window-movieprop-orrightkeep");a.h.rightkeep=b;this._mvOrigins=a;a=new aa;b=t.ln.get("window-movieprop-input-opup");a.h.up=b;b=t.ln.get("window-movieprop-input-opdown");a.h.down=b;b=t.ln.get("window-movieprop-input-opleft");a.h.left=b;b=t.ln.get("window-movieprop-input-opright");a.h.right=b;b=t.ln.get("window-movieprop-input-opnin");a.h.nin=b;b=t.ln.get("window-movieprop-input-opnout");a.h.nout=b;this._scDirections=a;a=new aa;b=t.ln.get("placement-center");a.h.center=b;b=t.ln.get("placement-centerleft");
a.h.centerleft=b;b=t.ln.get("placement-centerright");a.h.centerright=b;b=t.ln.get("placement-top");a.h.top=b;b=t.ln.get("placement-topleft");a.h.topleft=b;b=t.ln.get("placement-topright");a.h.topright=b;b=t.ln.get("placement-bottom");a.h.bottom=b;b=t.ln.get("placement-bottomleft");a.h.bottomleft=b;b=t.ln.get("placement-bottomright");a.h.bottomright=b;b=t.ln.get("placement-absolute");a.h.absolute=b;this._mnPlacement=a;a=new aa;b=t.ln.get("sharders-none");a.h.none=b;b=t.ln.get("sharders-deuteranotopia");
a.h.deuteranotopia=b;b=t.ln.get("sharders-protonatopia");a.h.protonatopia=b;b=t.ln.get("sharders-tritanotopia");a.h.tritanotopia=b;b=t.ln.get("sharders-contrast");a.h.contrast=b;b=t.ln.get("sharders-grayscale");a.h.grayscale=b;this._aShaders=a;this.groups.push(new sf(t.ln.get("window-acbmovie-title"),[{n:t.ln.get("acinfo-movieload"),a:"movie.load",p:[{t:"s",n:t.ln.get("acinfo-movieload-p1"),v:"movies"}],e:[]},{n:t.ln.get("acinfo-sceneload"),a:"scene.load",p:[{t:"s",n:t.ln.get("acinfo-sceneload-p1"),
v:"scenes"}],e:[]},{n:t.ln.get("acinfo-scenehistoryback"),a:"scene.historyback",p:[],e:[]},{n:t.ln.get("acinfo-scenenavigate"),a:"scene.navigate",p:[{t:"s",n:t.ln.get("acinfo-scenenavigate-p1"),v:"navigation"}],e:[]},{n:t.ln.get("acinfo-scenepause"),a:"scene.pause",p:[],e:[]},{n:t.ln.get("acinfo-sceneplay"),a:"scene.play",p:[],e:[]},{n:t.ln.get("acinfo-sceneplaypause"),a:"scene.playpause",p:[],e:[]},{n:t.ln.get("acinfo-scenenextkf"),a:"scene.nextkeyframe",p:[],e:[]},{n:t.ln.get("acinfo-scenepreviouskf"),
a:"scene.previouskeyframe",p:[],e:[]},{n:t.ln.get("acinfo-scenefirstkf"),a:"scene.loadfirstkeyframe",p:[],e:[]},{n:t.ln.get("acinfo-scenelastkf"),a:"scene.loadlastkeyframe",p:[],e:[]},{n:t.ln.get("acinfo-sceneloadkf"),a:"scene.loadkeyframe",p:[{t:"i",n:t.ln.get("acinfo-sceneloadkf-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-sceneshake"),a:"scene.shake",p:[{t:"f",n:t.ln.get("acinfo-sceneshake-p1"),v:""},{t:"f",n:t.ln.get("acinfo-sceneshake-p2"),v:""}],e:["end"]}]));this.groups.push(new sf(t.ln.get("window-acbbool-title"),
[{n:t.ln.get("acinfo-boolset"),a:"bool.set",p:[{t:"s",n:t.ln.get("acinfo-boolset-p1"),v:""},{t:"b",n:t.ln.get("acinfo-boolset-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-ifbool"),a:"if.bool",p:[{t:"b",n:t.ln.get("acinfo-ifbool-p1"),v:""},{t:"b",n:t.ln.get("acinfo-ifbool-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-boolsetinverse"),a:"bool.setinverse",p:[{t:"s",n:t.ln.get("acinfo-boolsetinverse-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-ifboolset"),a:"if.boolset",p:[{t:"s",n:t.ln.get("acinfo-ifboolset-p1"),
v:""}],e:["then","else"]},{n:t.ln.get("acinfo-boolclear"),a:"bool.clear",p:[{t:"s",n:t.ln.get("acinfo-boolclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-boolclearall"),a:"bool.clearall",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbstring-title"),[{n:t.ln.get("acinfo-stringset"),a:"string.set",p:[{t:"s",n:t.ln.get("acinfo-stringset-p1"),v:""},{t:"e",n:t.ln.get("acinfo-stringset-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-stringconcat"),a:"string.concat",p:[{t:"s",n:t.ln.get("acinfo-stringconcat-p1"),
v:""},{t:"",n:t.ln.get("acinfo-stringconcat-p2"),v:""},{t:"",n:t.ln.get("acinfo-stringconcat-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-stringreplace"),a:"string.replace",p:[{t:"s",n:t.ln.get("acinfo-stringreplace-p1"),v:""},{t:"s",n:t.ln.get("acinfo-stringreplace-p2"),v:""},{t:"s",n:t.ln.get("acinfo-stringreplace-p3"),v:""},{t:"s",n:t.ln.get("acinfo-stringreplace-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-stringclear"),a:"string.clear",p:[{t:"s",n:t.ln.get("acinfo-stringclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-stringtoint"),
a:"string.toint",p:[{t:"s",n:t.ln.get("acinfo-stringtoint-p1"),v:""},{t:"s",n:t.ln.get("acinfo-stringtoint-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-stringtofloat"),a:"string.tofloat",p:[{t:"s",n:t.ln.get("acinfo-stringtofloat-p1"),v:""},{t:"s",n:t.ln.get("acinfo-stringtofloat-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-stringsload"),a:"string.loadfile",p:[{t:"s",n:t.ln.get("acinfo-stringsload-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-stringsetgroup"),a:"string.setgroup",p:[{t:"s",n:t.ln.get("acinfo-stringsetgroup-p1"),
v:""}],e:[]},{n:t.ln.get("acinfo-stringclearall"),a:"string.clearall",p:[],e:[]},{n:t.ln.get("acinfo-stringsetglobal"),a:"string.setglobal",p:[{t:"s",n:t.ln.get("acinfo-stringsetglobal-p1"),v:""},{t:"s",n:t.ln.get("acinfo-stringsetglobal-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-stringclearglobal"),a:"string.clearglobal",p:[{t:"s",n:t.ln.get("acinfo-stringclearglobal-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-ifstringsequal"),a:"if.stringsequal",p:[{t:"s",n:t.ln.get("acinfo-ifstringsequal-p1"),v:""},{t:"s",
n:t.ln.get("acinfo-ifstringsequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringsdifferent"),a:"if.stringsdifferent",p:[{t:"s",n:t.ln.get("acinfo-ifstringsdifferent-p1"),v:""},{t:"s",n:t.ln.get("acinfo-ifstringsdifferent-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringset"),a:"if.stringset",p:[{t:"s",n:t.ln.get("acinfo-ifstringset-p1"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringcontains"),a:"if.stringcontains",p:[{t:"s",n:t.ln.get("acinfo-ifstringcontains-p1"),v:""},
{t:"s",n:t.ln.get("acinfo-ifstringcontains-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringstartswith"),a:"if.stringstartswith",p:[{t:"s",n:t.ln.get("acinfo-ifstringstartswith-p1"),v:""},{t:"s",n:t.ln.get("acinfo-ifstringstartswith-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringendswith"),a:"if.stringendswith",p:[{t:"s",n:t.ln.get("acinfo-ifstringendswith-p1"),v:""},{t:"s",n:t.ln.get("acinfo-ifstringendswith-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifstringemail"),
a:"if.stringemail",p:[{t:"s",n:t.ln.get("acinfo-ifstringemail-p1"),v:""}],e:["then","else"]}]));this.groups.push(new sf(t.ln.get("window-acbint-title"),[{n:t.ln.get("acinfo-intset"),a:"int.set",p:[{t:"s",n:t.ln.get("acinfo-intset-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intset-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-intsum"),a:"int.sum",p:[{t:"s",n:t.ln.get("acinfo-intsum-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intsum-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intsum-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intsubtract"),
a:"int.subtract",p:[{t:"s",n:t.ln.get("acinfo-intsubtract-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intsubtract-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intsubtract-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intmultiply"),a:"int.multiply",p:[{t:"s",n:t.ln.get("acinfo-intmultiply-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intmultiply-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intmultiply-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intdivide"),a:"int.divide",p:[{t:"s",n:t.ln.get("acinfo-intdivide-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intdivide-p2"),
v:""},{t:"f",n:t.ln.get("acinfo-intdivide-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intmax"),a:"int.max",p:[{t:"s",n:t.ln.get("acinfo-intmax-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intmax-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intmax-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intmin"),a:"int.min",p:[{t:"s",n:t.ln.get("acinfo-intmin-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intmin-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intmin-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intrandom"),a:"int.random",p:[{t:"s",n:t.ln.get("acinfo-intrandom-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-intrandom-p2"),v:""},{t:"f",n:t.ln.get("acinfo-intrandom-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-intabs"),a:"int.abs",p:[{t:"s",n:t.ln.get("acinfo-intabs-p1"),v:""},{t:"f",n:t.ln.get("acinfo-intabs-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-intclear"),a:"int.clear",p:[{t:"s",n:t.ln.get("acinfo-intclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-intclearall"),a:"int.clearall",p:[],e:[]},{n:t.ln.get("acinfo-inttofloat"),a:"int.tofloat",p:[{t:"s",n:t.ln.get("acinfo-inttofloat-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-inttofloat-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-inttostring"),a:"int.tostring",p:[{t:"s",n:t.ln.get("acinfo-inttostring-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inttostring-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-ifintsequal"),a:"if.intsequal",p:[{t:"f",n:t.ln.get("acinfo-ifintsequal-p1"),v:""},{t:"f",n:t.ln.get("acinfo-ifintsequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintsdifferent"),a:"if.intsdifferent",p:[{t:"f",n:t.ln.get("acinfo-ifintsdifferent-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-ifintsdifferent-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintgreater"),a:"if.intgreater",p:[{t:"f",n:t.ln.get("acinfo-ifintgreater-p1"),v:""},{t:"f",n:t.ln.get("acinfo-ifintgreater-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintlower"),a:"if.intlower",p:[{t:"f",n:t.ln.get("acinfo-ifintlower-p1"),v:""},{t:"f",n:t.ln.get("acinfo-ifintlower-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintgreaterequal"),a:"if.intgreaterequal",p:[{t:"f",n:t.ln.get("acinfo-ifintgreaterequal-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-ifintgreaterequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintlowerequal"),a:"if.intlowerequal",p:[{t:"f",n:t.ln.get("acinfo-ifintlowerequal-p1"),v:""},{t:"f",n:t.ln.get("acinfo-ifintlowerequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifintset"),a:"if.intset",p:[{t:"s",n:t.ln.get("acinfo-ifintset-p1"),v:""}],e:["then","else"]}]));this.groups.push(new sf(t.ln.get("window-acbfloat-title"),[{n:t.ln.get("acinfo-floatset"),a:"float.set",p:[{t:"s",n:t.ln.get("acinfo-floatset-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-floatset-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-floatsum"),a:"float.sum",p:[{t:"s",n:t.ln.get("acinfo-floatsum-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatsum-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatsum-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatsubtract"),a:"float.subtract",p:[{t:"s",n:t.ln.get("acinfo-floatsubtract-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatsubtract-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatsubtract-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatmultiply"),
a:"float.multiply",p:[{t:"s",n:t.ln.get("acinfo-floatmultiply-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatmultiply-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatmultiply-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatdivide"),a:"float.divide",p:[{t:"s",n:t.ln.get("acinfo-floatdivide-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatdivide-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatdivide-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatmax"),a:"float.max",p:[{t:"s",n:t.ln.get("acinfo-floatmax-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatmax-p2"),
v:""},{t:"f",n:t.ln.get("acinfo-floatmax-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatmin"),a:"float.min",p:[{t:"s",n:t.ln.get("acinfo-floatmin-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatmin-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatmin-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatrandom"),a:"float.random",p:[{t:"s",n:t.ln.get("acinfo-floatrandom-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatrandom-p2"),v:""},{t:"f",n:t.ln.get("acinfo-floatrandom-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-floatabs"),a:"float.abs",
p:[{t:"s",n:t.ln.get("acinfo-floatabs-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floatabs-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-floatclear"),a:"float.clear",p:[{t:"s",n:t.ln.get("acinfo-floatclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-floatclearall"),a:"float.clearall",p:[],e:[]},{n:t.ln.get("acinfo-floattoint"),a:"float.toint",p:[{t:"s",n:t.ln.get("acinfo-floattoint-p1"),v:""},{t:"f",n:t.ln.get("acinfo-floattoint-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-floattostring"),a:"float.tostring",p:[{t:"s",n:t.ln.get("acinfo-floattostring-p1"),
v:""},{t:"f",n:t.ln.get("acinfo-floattostring-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-iffloatsequal"),a:"if.floatsequal",p:[{t:"f",n:t.ln.get("acinfo-iffloatsequal-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatsequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatsdifferent"),a:"if.floatsdifferent",p:[{t:"f",n:t.ln.get("acinfo-iffloatsdifferent-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatsdifferent-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatgreater"),a:"if.floatgreater",p:[{t:"f",
n:t.ln.get("acinfo-iffloatgreater-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatgreater-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatlower"),a:"if.floatlower",p:[{t:"f",n:t.ln.get("acinfo-iffloatlower-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatlower-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatgreaterequal"),a:"if.floatgreaterequal",p:[{t:"f",n:t.ln.get("acinfo-iffloatgreaterequal-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatgreaterequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatlowerequal"),
a:"if.floatlowerequal",p:[{t:"f",n:t.ln.get("acinfo-iffloatlowerequal-p1"),v:""},{t:"f",n:t.ln.get("acinfo-iffloatlowerequal-p2"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-iffloatset"),a:"if.floatset",p:[{t:"s",n:t.ln.get("acinfo-iffloatset-p1"),v:""}],e:["then","else"]}]));this.groups.push(new sf(t.ln.get("window-acbarray-title"),[{n:t.ln.get("acinfo-arrayload"),a:"array.loadfile",p:[{t:"s",n:t.ln.get("acinfo-arrayload-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-arraycreate"),a:"array.create",
p:[{t:"s",n:t.ln.get("acinfo-arraycreate-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-arrayremove"),a:"array.remove",p:[{t:"s",n:t.ln.get("acinfo-arrayremove-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-arraypush"),a:"array.push",p:[{t:"s",n:t.ln.get("acinfo-arraypush-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraypush-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arrayset"),a:"array.set",p:[{t:"s",n:t.ln.get("acinfo-arrayset-p1"),v:""},{t:"i",n:t.ln.get("acinfo-arrayset-p2"),v:""},{t:"s",n:t.ln.get("acinfo-arrayset-p3"),v:""}],
e:[]},{n:t.ln.get("acinfo-arrayget"),a:"array.get",p:[{t:"s",n:t.ln.get("acinfo-arrayget-p1"),v:""},{t:"i",n:t.ln.get("acinfo-arrayget-p2"),v:""},{t:"s",n:t.ln.get("acinfo-arrayget-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-arraygetint"),a:"array.getint",p:[{t:"s",n:t.ln.get("acinfo-arraygetint-p1"),v:""},{t:"i",n:t.ln.get("acinfo-arraygetint-p2"),v:""},{t:"s",n:t.ln.get("acinfo-arraygetint-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-arraygetfloat"),a:"array.getfloat",p:[{t:"s",n:t.ln.get("acinfo-arraygetfloat-p1"),
v:""},{t:"i",n:t.ln.get("acinfo-arraygetfloat-p2"),v:""},{t:"s",n:t.ln.get("acinfo-arraygetfloat-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-arraygetbool"),a:"array.getbool",p:[{t:"s",n:t.ln.get("acinfo-arraygetbool-p1"),v:""},{t:"i",n:t.ln.get("acinfo-arraygetbool-p2"),v:""},{t:"s",n:t.ln.get("acinfo-arraygetbool-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-arrayclear"),a:"array.clear",p:[{t:"s",n:t.ln.get("acinfo-arrayclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-arraycurrent"),a:"array.current",p:[{t:"s",n:t.ln.get("acinfo-arraycurrent-p1"),
v:""},{t:"s",n:t.ln.get("acinfo-arraycurrent-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraynext"),a:"array.next",p:[{t:"s",n:t.ln.get("acinfo-arraynext-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraynext-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arrayprevious"),a:"array.previous",p:[{t:"s",n:t.ln.get("acinfo-arrayprevious-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arrayprevious-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraycurrentint"),a:"array.currentint",p:[{t:"s",n:t.ln.get("acinfo-arraycurrentint-p1"),v:""},{t:"s",
n:t.ln.get("acinfo-arraycurrentint-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraynextint"),a:"array.nextint",p:[{t:"s",n:t.ln.get("acinfo-arraynextint-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraynextint-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraypreviousint"),a:"array.previousint",p:[{t:"s",n:t.ln.get("acinfo-arraypreviousint-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraypreviousint-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraycurrentfloat"),a:"array.currentfloat",p:[{t:"s",n:t.ln.get("acinfo-arraycurrentfloat-p1"),
v:""},{t:"s",n:t.ln.get("acinfo-arraycurrentfloat-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraynextfloat"),a:"array.nextfloat",p:[{t:"s",n:t.ln.get("acinfo-arraynextfloat-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraynextfloat-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraypreviousfloat"),a:"array.previousfloat",p:[{t:"s",n:t.ln.get("acinfo-arraypreviousfloat-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraypreviousfloat-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraycurrentbool"),a:"array.currentbool",p:[{t:"s",n:t.ln.get("acinfo-arraycurrentbool-p1"),
v:""},{t:"s",n:t.ln.get("acinfo-arraycurrentbool-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraynextbool"),a:"array.nextbool",p:[{t:"s",n:t.ln.get("acinfo-arraynextbool-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraynextbool-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraypreviousbool"),a:"array.previousbool",p:[{t:"s",n:t.ln.get("acinfo-arraypreviousbool-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraypreviousbool-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraysetindex"),a:"array.setindex",p:[{t:"s",n:t.ln.get("acinfo-arraysetindex-p1"),
v:""},{t:"i",n:t.ln.get("acinfo-arraysetindex-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraygetindex"),a:"array.getindex",p:[{t:"s",n:t.ln.get("acinfo-arraygetindex-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraygetindex-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arraytostring"),a:"array.tostring",p:[{t:"s",n:t.ln.get("acinfo-arraytostring-p1"),v:""},{t:"s",n:t.ln.get("acinfo-arraytostring-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-arrayfromstring"),a:"array.fromstring",p:[{t:"s",n:t.ln.get("acinfo-arrayfromstring-p1"),
v:""},{t:"s",n:t.ln.get("acinfo-arrayfromstring-p2"),v:""}],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbinstance-title"),[{n:t.ln.get("acinfo-instancemorezoom"),a:"instance.morezoom",p:[{t:"s",n:t.ln.get("acinfo-instancemorezoom-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancemorezoom-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancelesszoom"),a:"instance.lesszoom",p:[{t:"s",n:t.ln.get("acinfo-instancelesszoom-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancelesszoom-p2"),v:""}],
e:[]},{n:t.ln.get("acinfo-instanceclearzoom"),a:"instance.clearzoom",p:[{t:"s",n:t.ln.get("acinfo-instanceclearzoom-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancemoveup"),a:"instance.moveup",p:[{t:"s",n:t.ln.get("acinfo-instancemoveup-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancemoveup-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancemovedown"),a:"instance.movedown",p:[{t:"s",n:t.ln.get("acinfo-instancemovedown-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancemovedown-p2"),v:""}],
e:[]},{n:t.ln.get("acinfo-instancemoveleft"),a:"instance.moveleft",p:[{t:"s",n:t.ln.get("acinfo-instancemoveleft-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancemoveleft-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancemoveright"),a:"instance.moveright",p:[{t:"s",n:t.ln.get("acinfo-instancemoveright-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancemoveright-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instanceclearmove"),a:"instance.clearmove",p:[{t:"s",n:t.ln.get("acinfo-instanceclearmove-p1"),
v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancestartdrag"),a:"instance.startdrag",p:[{t:"s",n:t.ln.get("acinfo-instancestartdrag-p1"),v:"instances"}],e:["complete"]},{n:t.ln.get("acinfo-instancestopdrag"),a:"instance.stopdrag",p:[],e:[]},{n:t.ln.get("acinfo-instanceisoverlapping"),a:"instance.isoverlapping",p:[{t:"s",n:t.ln.get("acinfo-instanceisoverlapping-p1"),v:"instances"},{t:"s",n:t.ln.get("acinfo-instanceisoverlapping-p2"),v:"instances"}],e:["then","else"]},{n:t.ln.get("acinfo-instancepause"),
a:"instance.pause",p:[{t:"s",n:t.ln.get("acinfo-instancepause-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceplay"),a:"instance.play",p:[{t:"s",n:t.ln.get("acinfo-instanceplay-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceplaypause"),a:"instance.playpause",p:[{t:"s",n:t.ln.get("acinfo-instanceplaypause-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancestop"),a:"instance.stop",p:[{t:"s",n:t.ln.get("acinfo-instancestop-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancenext"),
a:"instance.next",p:[{t:"s",n:t.ln.get("acinfo-instancenext-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceprevious"),a:"instance.previous",p:[{t:"s",n:t.ln.get("acinfo-instanceprevious-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceseek"),a:"instance.seek",p:[{t:"s",n:t.ln.get("acinfo-instanceseek-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instanceseek-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancezoom"),a:"instance.zoom",p:[{t:"s",n:t.ln.get("acinfo-instancezoom-p1"),v:"instances"}],
e:[]},{n:t.ln.get("acinfo-instancesetparagraph"),a:"instance.setparagraph",p:[{t:"s",n:t.ln.get("acinfo-instancesetparagraph-p1"),v:"instances"},{t:"s",n:t.ln.get("acinfo-instancesetparagraph-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instanceloadasset"),a:"instance.loadasset",p:[{t:"s",n:t.ln.get("acinfo-instanceloadasset-p1"),v:"instances"},{t:"s",n:t.ln.get("acinfo-instanceloadasset-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetx"),a:"instance.setx",p:[{t:"s",n:t.ln.get("acinfo-instancesetx-p1"),
v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetx-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesety"),a:"instance.sety",p:[{t:"s",n:t.ln.get("acinfo-instancesety-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesety-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetwidth"),a:"instance.setwidth",p:[{t:"s",n:t.ln.get("acinfo-instancesetwidth-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetwidth-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetheight"),a:"instance.setheight",p:[{t:"s",
n:t.ln.get("acinfo-instancesetheight-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetheight-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetvisible"),a:"instance.setvisible",p:[{t:"s",n:t.ln.get("acinfo-instancesetvisible-p1"),v:"instances"},{t:"b",n:t.ln.get("acinfo-instancesetvisible-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetalpha"),a:"instance.setalpha",p:[{t:"s",n:t.ln.get("acinfo-instancesetalpha-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetalpha-p2"),v:""}],e:[]},
{n:t.ln.get("acinfo-instancesetwidth"),a:"instance.setwidth",p:[{t:"s",n:t.ln.get("acinfo-instancesetwidth-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetwidth-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetorder"),a:"instance.setorder",p:[{t:"s",n:t.ln.get("acinfo-instancesetorder-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancesetorder-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetcolor"),a:"instance.setcolor",p:[{t:"s",n:t.ln.get("acinfo-instancesetcolor-p1"),v:"instances"},
{t:"s",n:t.ln.get("acinfo-instancesetcolor-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetcoloralpha"),a:"instance.setcoloralpha",p:[{t:"s",n:t.ln.get("acinfo-instancesetcoloralpha-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetcoloralpha-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfont"),a:"instance.setfont",p:[{t:"s",n:t.ln.get("acinfo-instancesetfont-p1"),v:"instances"},{t:"s",n:t.ln.get("acinfo-instancesetfont-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontsize"),a:"instance.setfontsize",
p:[{t:"s",n:t.ln.get("acinfo-instancesetfontsize-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancesetfontsize-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontalign"),a:"instance.setfontalign",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontalign-p1"),v:"instances"},{t:"s",n:t.ln.get("acinfo-instancesetfontalign-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontbackground"),a:"instance.setfontbackground",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontbackground-p1"),v:"instances"},{t:"e",n:t.ln.get("acinfo-instancesetfontbackground-p2"),
v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontbold"),a:"instance.setfontbold",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontbold-p1"),v:"instances"},{t:"b",n:t.ln.get("acinfo-instancesetfontbold-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontitalic"),a:"instance.setfontitalic",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontitalic-p1"),v:"instances"},{t:"b",n:t.ln.get("acinfo-instancesetfontitalic-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontcolor"),a:"instance.setfontcolor",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontcolor-p1"),
v:"instances"},{t:"s",n:t.ln.get("acinfo-instancesetfontcolor-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetfontleading"),a:"instance.setfontleading",p:[{t:"s",n:t.ln.get("acinfo-instancesetfontleading-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancesetfontleading-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetvolume"),a:"instance.setvolume",p:[{t:"s",n:t.ln.get("acinfo-instancesetvolume-p1"),v:"instances"},{t:"f",n:t.ln.get("acinfo-instancesetvolume-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancesetrotation"),
a:"instance.setrotation",p:[{t:"s",n:t.ln.get("acinfo-instancesetrotation-p1"),v:"instances"},{t:"i",n:t.ln.get("acinfo-instancesetrotation-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-instancescrolldown"),a:"instance.scrolldown",p:[{t:"s",n:t.ln.get("acinfo-instancescrolldown-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancescrollup"),a:"instance.scrollup",p:[{t:"s",n:t.ln.get("acinfo-instancescrollup-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancescrollbottom"),a:"instance.scrollbottom",
p:[{t:"s",n:t.ln.get("acinfo-instancescrollbottom-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancescrolltop"),a:"instance.scrolltop",p:[{t:"s",n:t.ln.get("acinfo-instancescrolltop-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearall"),a:"instance.clearall",p:[{t:"s",n:t.ln.get("acinfo-instanceclearall-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearx"),a:"instance.clearx",p:[{t:"s",n:t.ln.get("acinfo-instanceclearx-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instancecleary"),
a:"instance.cleary",p:[{t:"s",n:t.ln.get("acinfo-instancecleary-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearwidth"),a:"instance.clearwidth",p:[{t:"s",n:t.ln.get("acinfo-instanceclearwidth-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearheight"),a:"instance.clearheight",p:[{t:"s",n:t.ln.get("acinfo-instanceclearheight-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearvisible"),a:"instance.clearvisible",p:[{t:"s",n:t.ln.get("acinfo-instanceclearvisible-p1"),v:"instances"}],
e:[]},{n:t.ln.get("acinfo-instanceclearalpha"),a:"instance.clearalpha",p:[{t:"s",n:t.ln.get("acinfo-instanceclearalpha-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearwidth"),a:"instance.clearwidth",p:[{t:"s",n:t.ln.get("acinfo-instanceclearwidth-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearorder"),a:"instance.clearorder",p:[{t:"s",n:t.ln.get("acinfo-instanceclearorder-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearcolor"),a:"instance.clearcolor",p:[{t:"s",
n:t.ln.get("acinfo-instanceclearcolor-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearcoloralpha"),a:"instance.clearcoloralpha",p:[{t:"s",n:t.ln.get("acinfo-instanceclearcoloralpha-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfont"),a:"instance.clearfont",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfont-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontsize"),a:"instance.clearfontsize",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontsize-p1"),v:"instances"}],e:[]},
{n:t.ln.get("acinfo-instanceclearfontalign"),a:"instance.clearfontalign",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontalign-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontbackground"),a:"instance.clearfontbackground",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontbackground-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontbold"),a:"instance.clearfontbold",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontbold-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontitalic"),
a:"instance.clearfontitalic",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontitalic-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontcolor"),a:"instance.clearfontcolor",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontcolor-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearfontleading"),a:"instance.clearfontleading",p:[{t:"s",n:t.ln.get("acinfo-instanceclearfontleading-p1"),v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearvolume"),a:"instance.clearvolume",p:[{t:"s",n:t.ln.get("acinfo-instanceclearvolume-p1"),
v:"instances"}],e:[]},{n:t.ln.get("acinfo-instanceclearrotation"),a:"instance.clearrotation",p:[{t:"s",n:t.ln.get("acinfo-instanceclearrotation-p1"),v:"instances"}],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbdata-title"),[{n:t.ln.get("acinfo-dataevent"),a:"data.event",p:[{t:"s",n:t.ln.get("acinfo-dataevent-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-dataeventclear"),a:"data.eventclear",p:[],e:[]},{n:t.ln.get("acinfo-dataliststates"),a:"data.liststates",p:[],e:["success","error"]},{n:t.ln.get("acinfo-dataload"),
a:"data.load",p:[{t:"s",n:t.ln.get("acinfo-dataload-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-dataloadlocal"),a:"data.loadlocal",p:[{t:"s",n:t.ln.get("acinfo-dataloadlocal-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-dataloadquickstate"),a:"data.loadquickstate",p:[],e:["success","error"]},{n:t.ln.get("acinfo-dataloadstatelocal"),a:"data.loadstatelocal",p:[],e:["success","error"]},{n:t.ln.get("acinfo-datasave"),a:"data.save",p:[{t:"s",n:t.ln.get("acinfo-datasave-p1"),v:""},{t:"v",
n:t.ln.get("acinfo-datasave-p2"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-datasavelocal"),a:"data.savelocal",p:[{t:"s",n:t.ln.get("acinfo-datasavelocal-p1"),v:""},{t:"v",n:t.ln.get("acinfo-datasavelocal-p2"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-datasavestate"),a:"data.savestate",p:[],e:["success","error"]},{n:t.ln.get("acinfo-datasavequickstate"),a:"data.savequickstate",p:[],e:["success","error"]},{n:t.ln.get("acinfo-datasavestatelocal"),a:"data.savestatelocal",p:[],e:["success",
"error"]}]));this.groups.push(new sf(t.ln.get("window-acbinput-title"),[{n:t.ln.get("acinfo-targetshow"),a:"target.show",p:[],e:[]},{n:t.ln.get("acinfo-targethide"),a:"target.hide",p:[],e:[]},{n:t.ln.get("acinfo-targettoggle"),a:"target.toggle",p:[],e:[]},{n:t.ln.get("acinfo-targetsetposition"),a:"target.setposition",p:[{t:"i",n:t.ln.get("acinfo-targetsetposition-p1"),v:""},{t:"i",n:t.ln.get("acinfo-targetsetposition-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-targetclear"),a:"target.clear",p:[],e:[]},
{n:t.ln.get("acinfo-targetset"),a:"target.set",p:[{t:"s",n:t.ln.get("acinfo-targetset-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-mousehide"),a:"mouse.hide",p:[],e:[]},{n:t.ln.get("acinfo-mouseshow"),a:"mouse.show",p:[],e:[]},{n:t.ln.get("acinfo-inputmessage"),a:"input.message",p:[{t:"s",n:t.ln.get("acinfo-inputmessage-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputmessage-p2"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputstring"),a:"input.string",p:[{t:"s",n:t.ln.get("acinfo-inputstring-p1"),v:""},{t:"s",
n:t.ln.get("acinfo-inputstring-p2"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputint"),a:"input.int",p:[{t:"s",n:t.ln.get("acinfo-inputint-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputint-p2"),v:""},{t:"i",n:t.ln.get("acinfo-inputint-p3"),v:""},{t:"i",n:t.ln.get("acinfo-inputint-p4"),v:""},{t:"i",n:t.ln.get("acinfo-inputint-p5"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputfloat"),a:"input.float",p:[{t:"s",n:t.ln.get("acinfo-inputfloat-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputfloat-p2"),
v:""},{t:"f",n:t.ln.get("acinfo-inputfloat-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputfloat-p4"),v:""},{t:"f",n:t.ln.get("acinfo-inputfloat-p5"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputlist"),a:"input.list",p:[{t:"s",n:t.ln.get("acinfo-inputlist-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputlist-p2"),v:""},{t:"s",n:t.ln.get("acinfo-inputlist-p3"),v:""},{t:"s",n:t.ln.get("acinfo-inputlist-p4"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputlogin"),a:"input.login",p:[],e:["ok","cancel"]},
{n:t.ln.get("acinfo-inputemail"),a:"input.email",p:[{t:"s",n:t.ln.get("acinfo-inputemail-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputemail-p2"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-inputadd"),a:"input.add",p:[{t:"s",n:t.ln.get("acinfo-inputadd-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputadd-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputadd-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputadd-p4"),v:""},{t:"e",n:t.ln.get("acinfo-inputadd-p5"),v:""}],e:[]},{n:t.ln.get("acinfo-inputplace"),a:"input.place",
p:[{t:"s",n:t.ln.get("acinfo-inputplace-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputplace-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputplace-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputplace-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsettext"),a:"input.settext",p:[{t:"s",n:t.ln.get("acinfo-inputsettext-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputsettext-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsetpassword"),a:"input.setpassword",p:[{t:"s",n:t.ln.get("acinfo-inputsetpassword-p1"),v:""},{t:"b",n:t.ln.get("acinfo-inputsetpassword-p2"),
v:""}],e:[]},{n:t.ln.get("acinfo-inputremove"),a:"input.remove",p:[{t:"s",n:t.ln.get("acinfo-inputremove-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-inputremoveall"),a:"input.removeall",p:[],e:[]},{n:t.ln.get("acinfo-inputaddtarea"),a:"input.addtarea",p:[{t:"s",n:t.ln.get("acinfo-inputaddtarea-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputaddtarea-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputaddtarea-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputaddtarea-p4"),v:""},{t:"f",n:t.ln.get("acinfo-inputaddtarea-p5"),v:""}],
e:[]},{n:t.ln.get("acinfo-inputplacetarea"),a:"input.placetarea",p:[{t:"s",n:t.ln.get("acinfo-inputplacetarea-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacetarea-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacetarea-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacetarea-p4"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacetarea-p5"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsettextarea"),a:"input.settextarea",p:[{t:"s",n:t.ln.get("acinfo-inputsettextarea-p1"),v:""},{t:"s",n:t.ln.get("acinfo-inputsettextarea-p2"),
v:""}],e:[]},{n:t.ln.get("acinfo-inputremovetarea"),a:"input.removetarea",p:[{t:"s",n:t.ln.get("acinfo-inputremovetarea-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-inputremovealltareas"),a:"input.removealltareas",p:[],e:[]},{n:t.ln.get("acinfo-inputaddnumeric"),a:"input.addnumeric",p:[{t:"s",n:t.ln.get("acinfo-inputaddnumeric-p1"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddnumeric-p2"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddnumeric-p3"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddnumeric-p4"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddnumeric-p5"),
v:""}],e:[]},{n:t.ln.get("acinfo-inputplacenumeric"),a:"input.placenumeric",p:[{t:"s",n:t.ln.get("acinfo-inputplacenumeric-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacenumeric-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacenumeric-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputplacenumeric-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsetnumeric"),a:"input.setnumeric",p:[{t:"s",n:t.ln.get("acinfo-inputsetnumeric-p1"),v:""},{t:"i",n:t.ln.get("acinfo-inputsetnumeric-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsetnumericbounds"),
a:"input.setnumericbounds",p:[{t:"s",n:t.ln.get("acinfo-inputsetnumericbounds-p1"),v:""},{t:"f",n:t.ln.get("acinfo-inputsetnumericbounds-p2"),v:""},{t:"f",n:t.ln.get("acinfo-inputsetnumericbounds-p3"),v:""},{t:"f",n:t.ln.get("acinfo-inputsetnumericbounds-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-inputremovenumeric"),a:"input.removenumeric",p:[{t:"s",n:t.ln.get("acinfo-inputremovenumeric-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-inputremoveallnumerics"),a:"input.removeallnumerics",p:[],e:[]},{n:t.ln.get("acinfo-inputaddaddtoggle"),
a:"input.addtoggle",p:[{t:"s",n:t.ln.get("acinfo-inputaddaddtoggle-p1"),v:""},{t:"b",n:t.ln.get("acinfo-inputaddaddtoggle-p2"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddaddtoggle-p3"),v:""},{t:"i",n:t.ln.get("acinfo-inputaddaddtoggle-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-inputplacetoggle"),a:"input.placetoggle",p:[{t:"s",n:t.ln.get("acinfo-inputplacetoggle-p1"),v:""},{t:"b",n:t.ln.get("acinfo-inputplacetoggle-p2"),v:""},{t:"i",n:t.ln.get("acinfo-inputplacetoggle-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-inputsettoggle"),
a:"input.settoggle",p:[{t:"s",n:t.ln.get("acinfo-inputsettoggle-p1"),v:""},{t:"b",n:t.ln.get("acinfo-inputsettoggle-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-inputinverttoggle"),a:"input.inverttoggle",p:[{t:"s",n:t.ln.get("acinfo-inputinverttoggle-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-inputremovetoggle"),a:"input.removetoggle",p:[{t:"s",n:t.ln.get("acinfo-inputremovetoggle-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-inputrremovealltoggles"),a:"input.removealltoggles",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbsystem-title"),
[{n:t.ln.get("acinfo-run"),a:"run",p:[{t:"s",n:t.ln.get("acinfo-run-p1"),v:""},{t:"e",n:t.ln.get("acinfo-run-p2"),v:""},{t:"e",n:t.ln.get("acinfo-run-p3"),v:""},{t:"e",n:t.ln.get("acinfo-run-p4"),v:""},{t:"e",n:t.ln.get("acinfo-run-p5"),v:""},{t:"e",n:t.ln.get("acinfo-run-p6"),v:""},{t:"e",n:t.ln.get("acinfo-run-p7"),v:""},{t:"e",n:t.ln.get("acinfo-run-p8"),v:""}],e:[]},{n:t.ln.get("acinfo-snippetsload"),a:"snippets.load",p:[{t:"s",n:t.ln.get("acinfo-snippetsload-p1"),v:""}],e:["success","error"]},
{n:t.ln.get("acinfo-snippetsunload"),a:"snippets.unload",p:[{t:"s",n:t.ln.get("acinfo-snippetsunload-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-systemfullscreen"),a:"system.fullscreen",p:[],e:[]},{n:t.ln.get("acinfo-systemopenembed"),a:"system.openembed",p:[{t:"s",n:t.ln.get("acinfo-systemopenembed-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-systemcloseembed"),a:"system.closeembed",p:[],e:[]},{n:t.ln.get("acinfo-systemsembedplace"),a:"system.embedplace",p:[{t:"f",n:t.ln.get("acinfo-systemsembedplace-p1"),v:""},
{t:"f",n:t.ln.get("acinfo-systemsembedplace-p2"),v:""},{t:"f",n:t.ln.get("acinfo-systemsembedplace-p3"),v:""},{t:"f",n:t.ln.get("acinfo-systemsembedplace-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-systemembedreset"),a:"system.embedreset",p:[],e:[]},{n:t.ln.get("acinfo-systemopenurl"),a:"system.openurl",p:[{t:"s",n:t.ln.get("acinfo-systemopenurl-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-systemcopytext"),a:"system.copytext",p:[{t:"s",n:t.ln.get("acinfo-systemcopytext-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-systemifhorizontal"),
a:"system.ifhorizontal",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifvertical"),a:"system.ifvertical",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifwebsite"),a:"system.ifwebsite",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifpwa"),a:"system.ifpwa",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifpwainstalled"),a:"system.ifpwainstalled",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifdesktop"),a:"system.ifdesktop",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifmobile"),
a:"system.ifmobile",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifpublish"),a:"system.ifpublish",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemifplayer"),a:"system.ifplayer",p:[],e:["then","else"]},{n:t.ln.get("acinfo-systemvisitoringroup"),a:"system.visitoringroup",p:[{t:"s",n:t.ln.get("acinfo-systemvisitoringroup-p1"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-systemlogout"),a:"system.logout",p:[],e:[]},{n:t.ln.get("acinfo-systemsendevent"),a:"system.sendevent",p:[{t:"s",n:t.ln.get("acinfo-systemsendevent-p1"),
v:""}],e:[]},{n:t.ln.get("acinfo-systemsetkftime"),a:"system.setkftime",p:[{t:"i",n:t.ln.get("acinfo-systemsetkftime-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-systemcalljs"),a:"system.calljs",p:[{t:"s",n:t.ln.get("acinfo-systemcalljs-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-cssset"),a:"css.set",p:[{t:"s",n:t.ln.get("acinfo-cssset-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-cssclear"),a:"css.clear",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbtimer-title"),[{n:t.ln.get("acinfo-timerset"),a:"timer.set",
p:[{t:"s",n:t.ln.get("acinfo-timerset-p1"),v:""},{t:"i",n:t.ln.get("acinfo-timerset-p2"),v:""},{t:"i",n:t.ln.get("acinfo-timerset-p3"),v:""}],e:["tick","end"]},{n:t.ln.get("acinfo-timerclear"),a:"timer.clear",p:[{t:"s",n:t.ln.get("acinfo-timerclear-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-timerclearall"),a:"timer.clearall",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbreplace-title"),[{n:t.ln.get("acinfo-replaceorigin"),a:"replace.origin",p:[{t:"s",n:t.ln.get("acinfo-replaceorigin-p1"),v:"origins"}],
e:[]},{n:t.ln.get("acinfo-replacesetstring"),a:"replace.setstring",p:[{t:"s",n:t.ln.get("acinfo-replacesetstring-p1"),v:""},{t:"s",n:t.ln.get("acinfo-replacesetstring-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-replacesetfile"),a:"replace.setfile",p:[{t:"s",n:t.ln.get("acinfo-replacesetfile-p1"),v:""},{t:"s",n:t.ln.get("acinfo-replacesetfile-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-replaceclearstring"),a:"replace.clearstring",p:[{t:"s",n:t.ln.get("acinfo-replaceclearstring-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-replaceclearfile"),
a:"replace.clearfile",p:[{t:"s",n:t.ln.get("acinfo-replaceclearfile-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-replaceclearallstrings"),a:"replace.clearallstrings",p:[],e:[]},{n:t.ln.get("acinfo-replaceclearallfiles"),a:"replace.clearallfiles",p:[],e:[]},{n:t.ln.get("acinfo-ifreplacestringset"),a:"if.replacestringset",p:[{t:"s",n:t.ln.get("acinfo-ifreplacestringset-p1"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-ifreplacefileset"),a:"if.replacefileset",p:[{t:"s",n:t.ln.get("acinfo-ifreplacefileset-p1"),
v:""}],e:["then","else"]}]));this.groups.push(new sf(t.ln.get("window-acbcontraptions-title"),[{n:t.ln.get("acinfo-showmessage"),a:"contraption.message",p:[{t:"s",n:t.ln.get("acinfo-showmessage-p1"),v:""},{t:"s",n:t.ln.get("acinfo-showmessage-p2"),v:""},{t:"s",n:t.ln.get("acinfo-showmessage-p3"),v:""},{t:"s",n:t.ln.get("acinfo-showmessage-p4"),v:""}],e:["select"]},{n:t.ln.get("acinfo-hidemessage"),a:"contraption.messagehide",p:[],e:[]},{n:t.ln.get("acinfo-showmenu"),a:"contraption.menu",p:[{t:"s",
n:t.ln.get("acinfo-showmenu-p1"),v:""},{t:"s",n:t.ln.get("acinfo-showmenu-p2"),v:""},{t:"s",n:t.ln.get("acinfo-showmenu-p3"),v:""},{t:"s",n:t.ln.get("acinfo-showmenu-p4"),v:"placement"},{t:"i",n:t.ln.get("acinfo-showmenu-p5"),v:""},{t:"i",n:t.ln.get("acinfo-showmenu-p6"),v:""}],e:["select"]},{n:t.ln.get("acinfo-hidemenu"),a:"contraption.menuhide",p:[],e:[]},{n:t.ln.get("acinfo-showcover"),a:"contraption.cover",p:[{t:"s",n:t.ln.get("acinfo-showcover-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-hidecover"),
a:"contraption.coverhide",p:[],e:[]},{n:t.ln.get("acinfo-showbg"),a:"contraption.background",p:[{t:"s",n:t.ln.get("acinfo-showbg-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-hidebg"),a:"contraption.backgroundhide",p:[],e:[]},{n:t.ln.get("acinfo-showloading"),a:"contraption.showloading",p:[],e:[]},{n:t.ln.get("acinfo-hideloading"),a:"contraption.hideloading",p:[],e:[]},{n:t.ln.get("acinfo-musicplay"),a:"contraption.musicplay",p:[{t:"s",n:t.ln.get("acinfo-musicplay-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-musicpause"),
a:"contraption.musicpause",p:[],e:[]},{n:t.ln.get("acinfo-musicstop"),a:"contraption.musicstop",p:[],e:[]},{n:t.ln.get("acinfo-musicvolume"),a:"contraption.musicvolume",p:[{t:"i",n:t.ln.get("acinfo-musicvolume-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-soundplay"),a:"contraption.soundplay",p:[{t:"s",n:t.ln.get("acinfo-soundplay-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-soundpause"),a:"contraption.soundpause",p:[{t:"e",n:t.ln.get("acinfo-soundpause-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-soundstop"),a:"contraption.soundstop",
p:[{t:"e",n:t.ln.get("acinfo-soundstop-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-soundvolume"),a:"contraption.soundvolume",p:[{t:"i",n:t.ln.get("acinfo-soundvolume-p1"),v:""},{t:"e",n:t.ln.get("acinfo-soundvolume-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-showform"),a:"contraption.form",p:[{t:"s",n:t.ln.get("acinfo-showform-p1"),v:""},{t:"i",n:t.ln.get("acinfo-showform-p2"),v:""},{t:"i",n:t.ln.get("acinfo-showform-p3"),v:""}],e:["ok","cancel"]},{n:t.ln.get("acinfo-setformvalue"),a:"contraption.formvalue",
p:[{t:"s",n:t.ln.get("acinfo-setformvalue-p1"),v:""},{t:"s",n:t.ln.get("acinfo-setformvalue-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-setformstepper"),a:"contraption.formsetstepper",p:[{t:"s",n:t.ln.get("acinfo-setformstepper-p1"),v:""},{t:"i",n:t.ln.get("acinfo-setformstepper-p2"),v:""},{t:"i",n:t.ln.get("acinfo-setformstepper-p3"),v:""},{t:"i",n:t.ln.get("acinfo-setformstepper-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-hideform"),a:"contraption.formhide",p:[],e:[]},{n:t.ln.get("acinfo-showinterf"),a:"contraption.interface",
p:[{t:"s",n:t.ln.get("acinfo-showinterf-p1"),v:""},{t:"i",n:t.ln.get("acinfo-showinterf-p2"),v:""},{t:"i",n:t.ln.get("acinfo-showinterf-p3"),v:""}],e:[]},{n:t.ln.get("acinfo-hideinterf"),a:"contraption.interfacehide",p:[{t:"s",n:t.ln.get("acinfo-hideinterf-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-hideallinterf"),a:"contraption.interfacehideall",p:[],e:[]},{n:t.ln.get("acinfo-interftext"),a:"contraption.interfacetext",p:[{t:"s",n:t.ln.get("acinfo-interftext-p1"),v:""},{t:"s",n:t.ln.get("acinfo-interftext-p2"),
v:""}],e:[]},{n:t.ln.get("acinfo-interfframe"),a:"contraption.interfaceanimframe",p:[{t:"s",n:t.ln.get("acinfo-interfframe-p1"),v:""},{t:"i",n:t.ln.get("acinfo-interfframe-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-interfplay"),a:"contraption.interfaceanimplay",p:[{t:"s",n:t.ln.get("acinfo-interfplay-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-interfpause"),a:"contraption.interfaceanimpause",p:[{t:"s",n:t.ln.get("acinfo-interfpause-p1"),v:""}],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbnarrative-title"),
[{n:t.ln.get("acinfo-invshow"),a:"inventory.show",p:[],e:["complete"]},{n:t.ln.get("acinfo-invclose"),a:"inventory.close",p:[],e:[]},{n:t.ln.get("acinfo-invaddkey"),a:"inventory.addkeyitem",p:[{t:"s",n:t.ln.get("acinfo-invaddkey-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invremkey"),a:"inventory.removekeyitem",p:[{t:"s",n:t.ln.get("acinfo-invremkey-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invclearkey"),a:"inventory.clearkeyitems",p:[],e:[]},{n:t.ln.get("acinfo-invhaskey"),a:"inventory.haskeyitem",p:[{t:"s",
n:t.ln.get("acinfo-invhaskey-p1"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-invaddcons"),a:"inventory.addconsumable",p:[{t:"s",n:t.ln.get("acinfo-invaddcons-p1"),v:""},{t:"i",n:t.ln.get("acinfo-invaddcons-p2"),v:""}],e:[]},{n:t.ln.get("acinfo-invremcons"),a:"inventory.removeconsumable",p:[{t:"s",n:t.ln.get("acinfo-invremcons-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invconsume"),a:"inventory.consumeitem",p:[{t:"s",n:t.ln.get("acinfo-invconsume-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invclearcons"),
a:"inventory.clearconsumables",p:[],e:[]},{n:t.ln.get("acinfo-invtostring"),a:"inventory.tostring",p:[{t:"s",n:t.ln.get("acinfo-invtostring-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invfromstring"),a:"inventory.fromstring",p:[{t:"s",n:t.ln.get("acinfo-invfromstring-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invtostringk"),a:"inventory.keytostring",p:[{t:"s",n:t.ln.get("acinfo-invtostringk-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invfromstringk"),a:"inventory.keyfromstring",p:[{t:"s",n:t.ln.get("acinfo-invfromstringk-p1"),
v:""}],e:[]},{n:t.ln.get("acinfo-invtostringc"),a:"inventory.constostring",p:[{t:"s",n:t.ln.get("acinfo-invtostringc-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-invfromstringc"),a:"inventory.consfromstring",p:[{t:"s",n:t.ln.get("acinfo-invfromstringc-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-battleshow"),a:"battle.show",p:[{t:"s",n:t.ln.get("acinfo-battleshow-p1"),v:""},{t:"s",n:t.ln.get("acinfo-battleshow-p2"),v:""}],e:["win","loose"]},{n:t.ln.get("acinfo-battleclose"),a:"battle.close",p:[],e:[]},{n:t.ln.get("acinfo-battlesetattr"),
a:"battle.setattribute",p:[{t:"i",n:t.ln.get("acinfo-battlesetattr-p1"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetattr-p2"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetattr-p3"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetattr-p4"),v:""}],e:[]},{n:t.ln.get("acinfo-battlesetoppo"),a:"battle.setopponent",p:[{t:"i",n:t.ln.get("acinfo-battlesetoppo-p1"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetoppo-p2"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetoppo-p3"),v:""},{t:"i",n:t.ln.get("acinfo-battlesetoppo-p4"),v:""}],
e:[]},{n:t.ln.get("acinfo-diagloadgroup"),a:"dialogue.loadgroup",p:[{t:"s",n:t.ln.get("acinfo-diagloadgroup-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-diagstart"),a:"dialogue.start",p:[{t:"s",n:t.ln.get("acinfo-diagstart-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-diagnext"),a:"dialogue.next",p:[],e:[]},{n:t.ln.get("acinfo-diagprevious"),a:"dialogue.previous",p:[],e:[]},{n:t.ln.get("acinfo-diaglast"),a:"dialogue.last",p:[],e:[]},{n:t.ln.get("acinfo-diagfirst"),a:"dialogue.first",p:[],e:[]},
{n:t.ln.get("acinfo-diagclose"),a:"dialogue.close",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbaccesibility-title"),[{n:t.ln.get("acinfo-accesssetdescription"),a:"accessibility.setdescription",p:[{t:"s",n:t.ln.get("acinfo-accesssetdescription-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-accesschangeshader"),a:"accessibility.changeshader",p:[],e:[]},{n:t.ln.get("acinfo-accesssetshader"),a:"accessibility.setshader",p:[{t:"s",n:t.ln.get("acinfo-accesssetshader-p1"),v:"shader"}],e:[]},{n:t.ln.get("acinfo-accessfocuson"),
a:"accessibility.focuson",p:[],e:[]},{n:t.ln.get("acinfo-accessfocusoff"),a:"accessibility.focusoff",p:[],e:[]},{n:t.ln.get("acinfo-accessfocusswitch"),a:"accessibility.focusswitch",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbruntime-title"),[{n:t.ln.get("acinfo-runinstall"),a:"runtime.install",p:[],e:[]},{n:t.ln.get("acinfo-runquit"),a:"runtime.quit",p:[],e:[]},{n:t.ln.get("acinfo-runsavedata"),a:"runtime.savedata",p:[{t:"s",n:t.ln.get("acinfo-runsavedata-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-runloaddata"),
a:"runtime.loaddata",p:[{t:"s",n:t.ln.get("acinfo-runloaddata-p1"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-runifdataexist"),a:"runtime.ifdataexist",p:[{t:"s",n:t.ln.get("acinfo-runifdataexist-p1"),v:""}],e:["then","else"]},{n:t.ln.get("acinfo-runbrowser"),a:"runtime.ifbrowser",p:[],e:["then","else"]},{n:t.ln.get("acinfo-startkiosk"),a:"runtime.startkiosk",p:[],e:[]},{n:t.ln.get("acinfo-endkiosk"),a:"runtime.endkiosk",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbserver-title"),
[{n:t.ln.get("acinfo-callprocess"),a:"call.process",p:[{t:"s",n:t.ln.get("acinfo-callprocess-p1"),v:""},{t:"s",n:t.ln.get("acinfo-callprocess-p2"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-callsdprocess"),a:"call.sdprocess",p:[{t:"s",n:t.ln.get("acinfo-callsdprocess-p1"),v:""},{t:"s",n:t.ln.get("acinfo-callsdprocess-p2"),v:""}],e:["success","error"]},{n:t.ln.get("acinfo-callurl"),a:"call.url",p:[{t:"s",n:t.ln.get("acinfo-callurl-p1"),v:""},{t:"e",n:t.ln.get("acinfo-callurl-p2"),v:""}],e:["success",
"error"]}]));this.groups.push(new sf(t.ln.get("window-acbdebug-title"),[{n:t.ln.get("acinfo-debugtrace"),a:"trace",p:[{t:"s",n:t.ln.get("acinfo-debugtrace-p1"),v:""}],e:[]},{n:t.ln.get("acinfo-debugtracebools"),a:"trace.bools",p:[],e:[]},{n:t.ln.get("acinfo-debugtraceints"),a:"trace.ints",p:[],e:[]},{n:t.ln.get("acinfo-debugtracefloats"),a:"trace.floats",p:[],e:[]},{n:t.ln.get("acinfo-debugtracestrings"),a:"trace.strings",p:[],e:[]},{n:t.ln.get("acinfo-debuginfoshow"),a:"debuginfo.show",p:[],e:[]},
{n:t.ln.get("acinfo-debuginfohide"),a:"debuginfo.hide",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbanalytics-title"),[{n:t.ln.get("acinfo-analyticsevent"),a:"analytics.event",p:[{t:"s",n:t.ln.get("acinfo-analyticsevent-p1"),v:""},{t:"s",n:t.ln.get("acinfo-analyticsevent-p2"),v:""}],e:[]}]));this.groups.push(new sf(t.ln.get("window-acbshare-title"),[{n:t.ln.get("acinfo-sharefacebook"),a:"share.facebook",p:[],e:[]},{n:t.ln.get("acinfo-sharelinkedin"),a:"share.linkedin",p:[],e:[]},{n:t.ln.get("acinfo-sharepinterest"),
a:"share.pinterest",p:[],e:[]},{n:t.ln.get("acinfo-sharereddit"),a:"share.reddit",p:[],e:[]},{n:t.ln.get("acinfo-sharex"),a:"share.x",p:[],e:[]}]));this.groups.push(new sf(t.ln.get("window-acboverlay-title"),[{n:t.ln.get("acinfo-overlayshow"),a:"overlay.show",p:[{t:"s",n:t.ln.get("acinfo-overlayshow-p1"),v:""},{t:"e",n:t.ln.get("acinfo-overlayshow-p2"),v:""},{t:"b",n:t.ln.get("acinfo-overlayshow-p3"),v:""},{t:"e",n:t.ln.get("acinfo-overlayshow-p4"),v:""}],e:["success","error"]}]))};r["com.tilbuci.script.ActionInfo"]=
Uv;Uv.__name__="com.tilbuci.script.ActionInfo";Uv.prototype={groups:null,movies:null,selMovies:null,scenes:null,selScenes:null,_lastUpdate:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,_aShaders:null,getAcName:function(a){for(var b=0,c=this.groups;b<c.length;){var d=c[b];++b;Object.prototype.hasOwnProperty.call(d.actions.h,a)&&(a=d.actions.h[a].n)}return a},getNumParams:function(a){for(var b=0,c=0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,
a)&&(b=f.actions.h[a].p.length)}return b},getParamLine:function(a,b){for(var c="",d=0,f=this.groups;d<f.length;){var g=f[d];++d;if(Object.prototype.hasOwnProperty.call(g.actions.h,a)&&g.actions.h[a].p.length>0){for(var h=[],l=0,k=g.actions.h[a].p.length;l<k;){var q=l++;b.length>q&&b[q]!=""&&(g.actions.h[a].p[q].v=="movies"?h.push(this.getMovieName(b[q])):g.actions.h[a].p[q].v=="scenes"?h.push(this.getSceneName(b[q])):g.actions.h[a].p[q].v=="origins"?Object.prototype.hasOwnProperty.call(this._mvOrigins.h,
b[q])?h.push(this._mvOrigins.h[b[q]]):h.push(b[q]):g.actions.h[a].p[q].v=="navigation"?Object.prototype.hasOwnProperty.call(this._scDirections.h,b[q])?h.push(this._scDirections.h[b[q]]):h.push(b[q]):g.actions.h[a].p[q].v=="shader"?Object.prototype.hasOwnProperty.call(this._aShaders.h,b[q])?h.push(this._aShaders.h[b[q]]):h.push(b[q]):g.actions.h[a].p[q].v=="placement"?Object.prototype.hasOwnProperty.call(this._mnPlacement.h,b[q])?h.push(this._mnPlacement.h[b[q]]):h.push(b[q]):h.push(b[q]))}h.length>
0&&(c=" ("+h.join(", ")+")")}}return c},getAcParam:function(a,b,c){for(var d="#"+(b+1)+": ",f="",g=0,h=this.groups;g<h.length;){var l=h[g];++g;Object.prototype.hasOwnProperty.call(l.actions.h,a)&&l.actions.h[a].p.length>b&&(d=l.actions.h[a].p[b].n+": ",f=l.actions.h[a].p[b].v)}if(c!=null)switch(f){case "movies":d+=this.getMovieName(c);break;case "navigation":d=Object.prototype.hasOwnProperty.call(this._scDirections.h,c)?d+this._scDirections.h[c]:d+c;break;case "origins":d=Object.prototype.hasOwnProperty.call(this._mvOrigins.h,
c)?d+this._mvOrigins.h[c]:d+c;break;case "placement":d=Object.prototype.hasOwnProperty.call(this._mnPlacement.h,c)?d+this._mnPlacement.h[c]:d+c;break;case "scenes":d+=this.getSceneName(c);break;case "shader":d=Object.prototype.hasOwnProperty.call(this._aShaders.h,c)?d+this._aShaders.h[c]:d+c;break;default:d+=c}return d},getExtra1:function(a){for(var b="",c=0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,a)&&f.actions.h[a].e.length>0&&(b=f.actions.h[a].e[0])}return b},
getExtra2:function(a){for(var b="",c=0,d=this.groups;c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(f.actions.h,a)&&f.actions.h[a].e.length>1&&(b=f.actions.h[a].e[1])}return b},getMovieName:function(a){Object.prototype.hasOwnProperty.call(this.movies.h,a)&&(a=this.movies.h[a]);return a},getSceneName:function(a){Object.prototype.hasOwnProperty.call(this.scenes.h,a)&&(a=this.scenes.h[a]);return a},loadInfo:function(a){a==null&&(a=!1);if(a){this._lastUpdate=(new Date).getTime();a=t.ws;
var b=new aa,c=p.movie.get_mvId();b.h.id=c;a.send("Movie/AcInfo",b,m(this,this.onInfo),0,!1)}else a=(new Date).getTime(),a-this._lastUpdate>6E5&&(this._lastUpdate=a,a=t.ws,b=new aa,c=p.movie.get_mvId(),b.h.id=c,a.send("Movie/AcInfo",b,m(this,this.onInfo),0,!1))},onInfo:function(a,b){if(a&&b.map.h.e==0){if(Object.prototype.hasOwnProperty.call(b.map.h,"movies")){a=this.movies.h;for(var c=Object.keys(a),d=c.length,f=0;f<d;){a=c[f++];var g=this.movies;Object.prototype.hasOwnProperty.call(g.h,a)&&delete g.h[a]}for(;this.selMovies.length>
0;)this.selMovies.shift();c=0;for(d=A.fields(b.map.h.movies);c<d.length;)a=d[c],++c,a=A.field(b.map.h.movies,a),this.selMovies.push({text:a.title,value:a.id}),f=a.title,this.movies.h[a.id]=f}if(Object.prototype.hasOwnProperty.call(b.map.h,"scenes")){a=this.scenes.h;c=Object.keys(a);d=c.length;for(f=0;f<d;)a=c[f++],g=this.scenes,Object.prototype.hasOwnProperty.call(g.h,a)&&delete g.h[a];for(;this.selScenes.length>0;)this.selScenes.shift();c=0;for(d=A.fields(b.map.h.scenes);c<d.length;)a=d[c],++c,a=
A.field(b.map.h.scenes,a),this.selScenes.push({text:a.title,value:a.id}),f=a.title,this.scenes.h[a.id]=f}}},__class__:Uv};var sf=function(a,b){this.actions=new aa;this.name="";this.name=a;a=0;for(var c=A.fields(b);a<c.length;){var d=c[a];++a;var f=A.field(b,d);d=this.actions;var g=f.a;f=new vq(f);d.h[g]=f}};r["com.tilbuci.script.ActionInfoGroup"]=sf;sf.__name__="com.tilbuci.script.ActionInfoGroup";sf.prototype={name:null,actions:null,__class__:sf};var vq=function(a){this.e=[];this.p=[];this.a=this.n=
"";this.a=a.a;this.n=a.n;for(var b=0,c=A.fields(a.p);b<c.length;){var d=c[b];++b;this.p.push(new Mt(A.field(a.p,d)))}this.e=a.e};r["com.tilbuci.script.ActionInfoAc"]=vq;vq.__name__="com.tilbuci.script.ActionInfoAc";vq.prototype={a:null,n:null,p:null,e:null,__class__:vq};var Mt=function(a){this.n=this.v="";this.t="s";this.t=a.t;this.n=a.n;this.v=a.v};r["com.tilbuci.script.ActionInfoParam"]=Mt;Mt.__name__="com.tilbuci.script.ActionInfoParam";Mt.prototype={t:null,n:null,v:null,__class__:Mt};var Nt=function(a,
b,c,d,f){this.name=a;this._steps=c;this._current=0;this._action=d;this._acend=f;this._timer=new rd(b);this._timer.run=m(this,this.runAction)};r["com.tilbuci.script.ActionTimer"]=Nt;Nt.__name__="com.tilbuci.script.ActionTimer";Nt.prototype={name:null,_timer:null,_action:null,_acend:null,_current:null,_steps:null,clear:function(){try{this._timer.stop()}catch(a){}this._action=this._acend=this.name=this._timer=null},runAction:function(){this._action!=null&&p.mode!="editor"&&p.parser.run(this._action,
!0);this._current++;this._current>=this._steps&&(this._acend!=null&&p.mode!="editor"&&p.parser.run(this._acend,!0),this.clear())},__class__:Nt};var yi=function(){this.onDrag=null;this._sngroup="";this._dSnippets=new aa;this._currDiag="";this._snpParam="      ".split(" ");this._stringfile=new aa;this._lastEvent=new aa;this.hadInteraction=!1;this.eventSend=null;this.globalAvailable=[];this.available=[];this._currentArray="";this._arrays=new aa;this._bools=new aa;this._ints=new aa;this._floats=new aa;
this._timers=new aa;this._replacefile=new aa;this._replacestr=new aa;this._jsongropup="";this._stringsjson=new aa;this._strings=new aa};r["com.tilbuci.script.ScriptParser"]=yi;yi.__name__="com.tilbuci.script.ScriptParser";yi.tilbuci_getstring=La.tilbuci_getstring=function(a){return p.parser.getString(a)};yi.tilbuci_getfloat=La.tilbuci_getfloat=function(a){return p.parser.getFloat(a)};yi.tilbuci_getint=La.tilbuci_getint=function(a){return p.parser.getInt(a)};yi.tilbuci_getbool=La.tilbuci_getbool=function(a){return p.parser.getBool(a)};
yi.tilbuci_setstring=La.tilbuci_setstring=function(a,b){p.parser.setString(a,b)};yi.tilbuci_setfloat=La.tilbuci_setfloat=function(a,b){p.parser.setFloat(a,b)};yi.tilbuci_setint=La.tilbuci_setint=function(a,b){p.parser.setInt(a,b)};yi.tilbuci_setbool=La.tilbuci_setbool=function(a,b){p.parser.setBool(a,b)};yi.tilbuci_runaction=La.tilbuci_runaction=function(a){return p.parser.run(a)};yi.prototype={_strings:null,_stringsjson:null,_jsongropup:null,_replacestr:null,_replacefile:null,_timers:null,_floats:null,
_ints:null,_bools:null,_arrays:null,_currentArray:null,available:null,globalAvailable:null,eventSend:null,hadInteraction:null,_acOk:null,_acError:null,_lastEvent:null,_stringfile:null,_snpParam:null,_currDiag:null,_diagInfo:null,_dSnippets:null,_sngroup:null,onDrag:null,getVarRef:function(a){switch(a){case "bool":return this._bools;case "float":return this._floats;case "int":return this._ints;case "string":return this._strings;default:return null}},addAvailableGroup:function(a){this.available.push(a)},
addAvailableGlobal:function(a){this.globalAvailable.push(a)},kill:function(){var a=this._strings.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._strings;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._ints.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];
a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._bools,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._arrays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this._arrays.h[d].kill(),f=this._arrays,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._dSnippets.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._dSnippets,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];for(this._dSnippets=this._arrays=this._bools=this._ints=
this._floats=this._strings=null;this.available.length>0;)for(a=this.available.shift();a.a.length>0;)for(b=a.a.shift();b.p.length>0;)b.p.shift();for(this.available=null;this.globalAvailable.length>0;)for(a=this.globalAvailable.shift();a.v.length>0;)a.v.shift();this.clearStringFile();this.globalAvailable=this._stringfile=null},clearVars:function(a){a==null&&(a="");switch(a){case "arrays":a=this._arrays.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this._arrays.h[d].kill();var f=this._arrays;
Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}break;case "bools":a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;case "floats":a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;case "ints":a=this._ints.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d];break;case "strings":a=this._strings.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];break;default:a=this._strings.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._strings,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._floats.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._floats,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._ints.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;)d=a[c++],f=this._ints,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._bools.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._bools,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];a=this._arrays.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this._arrays.h[d].kill(),f=this._arrays,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}return!0},loadStringsJson:function(){this._stringsjson=new aa;this._jsongropup="";if(p.nocache){var a=
p.base+"movie/"+p.movie.get_mvId()+".movie/strings.json",b=new aa,c=(new Date).getTime();b.h.rand=c;new kd(!0,a,"GET",b,3,m(this,this.onStringsJSON))}else new kd(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/strings.json","GET",new aa,3,m(this,this.onStringsJSON))},onStringsJSON:function(a,b){if(a){a=0;for(var c=A.fields(b.json);a<c.length;){var d=c[a];++a;for(var f=A.field(b.json,d),g=new aa,h=0,l=A.fields(f);h<l.length;){var k=l[h];++h;var q=A.field(f,k);g.h["$"+k]=q}this._stringsjson.h[d]=g}}this.loadContraptions();
this.loadNarrative()},loadContraptions:function(){if(p.nocache){var a=p.base+"movie/"+p.movie.get_mvId()+".movie/contraptions.json",b=new aa,c=(new Date).getTime();b.h.rand=c;new kd(!0,a,"GET",b,3,m(this,this.onContraptions))}else new kd(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/contraptions.json","GET",new aa,3,m(this,this.onContraptions))},loadNarrative:function(){if(p.nocache){var a=p.base+"movie/"+p.movie.get_mvId()+".movie/narrative.json",b=new aa,c=(new Date).getTime();b.h.rand=c;new kd(!0,
a,"GET",b,3,m(this,this.onNarrative))}else new kd(!0,p.base+"movie/"+p.movie.get_mvId()+".movie/narrative.json","GET",new aa,3,m(this,this.onNarrative))},clearStringFile:function(){for(var a=Object.keys(this._stringfile.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._stringfile;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}},onStringFile:function(a,b){if(a){this.clearStringFile();a=Object.keys(b.map.h);for(var c=a.length,d=0;d<c;){var f=a[d++];this._stringfile.h[f]=b.map.h[f]}this._acOk!=
null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0)},onSnippetFile:function(a,b){if(a&&this._sngroup!=""){this._dSnippets.h[this._sngroup]=[];a=Object.keys(b.map.h);for(var c=a.length,d=0;d<c;){var f=a[d++];this._dSnippets.h[this._sngroup].push({name:f,code:L.string(b.map.h[f])})}this._sngroup="";this._acOk!=null&&this.run(this._acOk,!0)}else this._sngroup="",this._acError!=null&&this.run(this._acError,!0)},onArrayFile:function(a,b){if(a)if(this._currentArray!=""){if(!Object.prototype.hasOwnProperty.call(this._arrays.h,
this._currentArray)){a=this._arrays;var c=this._currentArray,d=new rf;a.h[c]=d}this._arrays.h[this._currentArray].fromJson(b.rawtext)?(this._currentArray="",this._acOk!=null&&this.run(this._acOk,!0)):(this._currentArray="",this._acError!=null&&this.run(this._acError,!0))}else this._acError!=null&&this.run(this._acError,!0);else this._currentArray="",this._acError!=null&&this.run(this._acError,!0)},onVariablesFile:function(a,b){if(a)if(b=mb.decrypt(b,mb.md5(p.movie.get_mvId()+X.substr(p.movie.get_mvId(),
2,null)).toLowerCase()),a=mb.jsonParse(b),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=A.fields(a);b<c.length;){var d=c[b];++b;d=A.field(a,d);if(d!=null)switch(d.t){case "b":this._bools.h[d.n]=d.v;break;case "f":this._floats.h[d.n]=d.v;break;case "i":this._ints.h[d.n]=d.v;break;case "s":this._strings.h[d.n]=d.v}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0)},onDiagGroup:function(a){a?this._acOk!=null&&this.run(this._acOk,
!0):(this._currDiag="",this._acError!=null&&this.run(this._acError,!0))},onContraptions:function(a,b){p.contraptions.removeAll();p.contraptions.clear();if(a){a=0;for(var c=A.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="covers"){d=0;for(var f=A.fields(A.field(b.json,"covers"));d<f.length;){var g=f[d];++d;var h=new Ya;h.load(A.field(A.field(b.json,"covers"),g))?p.contraptions.covers.h[h.id]=h:h.kill()}}else if(d=="backgrounds")for(d=0,f=A.fields(A.field(b.json,"backgrounds"));d<f.length;)g=f[d],
++d,h=new Xc,h.load(A.field(A.field(b.json,"backgrounds"),g))?p.contraptions.backgrounds.h[h.id]=h:h.kill();else if(d=="menus")for(d=0,f=A.fields(A.field(b.json,"menus"));d<f.length;)g=f[d],++d,h=new $h,h.load(A.field(A.field(b.json,"menus"),g))?p.contraptions.menus.h[h.id]=h:h.kill();else if(d=="messages")for(d=0,f=A.fields(A.field(b.json,"messages"));d<f.length;)g=f[d],++d,h=new jh,h.load(A.field(A.field(b.json,"messages"),g))?p.contraptions.messages.h[h.id]=h:h.kill();else if(d=="dflow")for(d=
0,f=A.fields(A.field(b.json,"dflow"));d<f.length;)g=f[d],++d,h=new Dc,h.load(A.field(A.field(b.json,"dflow"),g))?p.contraptions.dflow.h[h.id]=h:h.kill();else if(d=="inv")for(d=0,f=A.fields(A.field(b.json,"inv"));d<f.length;)g=f[d],++d,h=new Ac,h.load(A.field(A.field(b.json,"inv"),g))?p.contraptions.inv.h.inv=h:h.kill();else if(d=="bs")for(d=0,f=A.fields(A.field(b.json,"bs"));d<f.length;)g=f[d],++d,h=new K,h.load(A.field(A.field(b.json,"bs"),g))?p.contraptions.bs.h.bs=h:h.kill();else if(d=="musics")for(d=
0,f=A.fields(A.field(b.json,"musics"));d<f.length;)g=f[d],++d,h=new oj,h.load(A.field(A.field(b.json,"musics"),g))?p.contraptions.musics.h[h.id]=h:h.kill();else if(d=="sounds")for(d=0,f=A.fields(A.field(b.json,"sounds"));d<f.length;)g=f[d],++d,h=new ai,h.load(A.field(A.field(b.json,"sounds"),g))?p.contraptions.sounds.h[h.id]=h:h.kill();else if(d=="targets")for(d=0,f=A.fields(A.field(b.json,"targets"));d<f.length;)g=f[d],++d,h=new bi,h.load(A.field(A.field(b.json,"targets"),g))?p.contraptions.targets.h[h.id]=
h:h.kill();else if(d=="forms")for(d=0,f=A.fields(A.field(b.json,"forms"));d<f.length;)g=f[d],++d,h=new Db,h.load(A.field(A.field(b.json,"forms"),g))?p.contraptions.forms.h[h.id]=h:h.kill();else if(d=="interf")for(d=0,f=A.fields(A.field(b.json,"interf"));d<f.length;)g=f[d],++d,h=new yc,h.load(A.field(A.field(b.json,"interf"),g))?p.contraptions.interf.h[h.id]=h:h.kill()}}},onNarrative:function(a,b){p.narrative.clear();if(a){a=0;for(var c=A.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="chars"){d=
0;for(var f=A.fields(A.field(b.json,"chars"));d<f.length;){var g=f[d];++d;var h=new hc;h.load(A.field(A.field(b.json,"chars"),g))?p.narrative.chars.h[h.id]=h:h.kill()}}else if(d=="dialogues")for(d=0,f=A.fields(A.field(b.json,"dialogues"));d<f.length;)g=f[d],++d,h=new ho,h.load(A.field(A.field(b.json,"dialogues"),g))?p.narrative.dialogues.h[h.id]=h:h.kill();else if(d=="items")for(d=0,f=A.fields(A.field(b.json,"items"));d<f.length;)g=f[d],++d,h=new qq,h.load(A.field(A.field(b.json,"items"),g))?p.narrative.items.h[h.itname]=
h:h.kill();else if(d=="cards")for(d=0,f=A.fields(A.field(b.json,"cards"));d<f.length;)g=f[d],++d,h=new ae,h.load(A.field(A.field(b.json,"cards"),g))?p.narrative.cards.h[h.cardname]=h:h.kill()}b=p.narrative.chars.h;a=Object.keys(b);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.collection!=""&&p.movie.loadCollection(f.collection)}},getString:function(a){return Object.prototype.hasOwnProperty.call(this._strings.h,a)?this._strings.h[a]:""},setString:function(a,b){var c=this._strings;a=this.parseString(a);b=this.parseString(b);
c.h[a]=b;return!0},clearString:function(a){var b=this._strings,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._strings,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c]);return!0},concatString:function(a,b,c){b=X.substr(b,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,X.substr(b,1,null))?L.string(this._ints.h[X.substr(b,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,X.substr(b,1,null))?L.string(this._floats.h[X.substr(b,
1,null)]):this.parseString(b):X.substr(b,0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,X.substr(b,1,null))?this._bools.h[X.substr(b,1,null)]?"true":"false":this.parseString(b):this.parseString(b);c=X.substr(c,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,X.substr(c,1,null))?L.string(this._ints.h[X.substr(c,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,X.substr(c,1,null))?L.string(this._floats.h[X.substr(c,1,null)]):this.parseString(c):X.substr(c,0,1)==
"?"?Object.prototype.hasOwnProperty.call(this._bools.h,X.substr(c,1,null))?this._bools.h[X.substr(c,1,null)]?"true":"false":this.parseString(c):this.parseString(c);var d=this._strings;a=this.parseString(a);d.h[a]=b+c;return!0},getFloat:function(a){return Object.prototype.hasOwnProperty.call(this._floats.h,a)?this._floats.h[a]:0},clearFloat:function(a){var b=this._floats,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._floats,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,
c)&&delete a.h[c]);return!0},setFloat:function(a,b){a=this.parseString(a);if(Aa.typeof(b)==nb.TFloat||Aa.typeof(b)==nb.TInt)this._floats.h[a]=b;else{var c=this._floats;b=this.parseFloat(b);c.h[a]=b}return!0},getInt:function(a){return Object.prototype.hasOwnProperty.call(this._ints.h,a)?this._ints.h[a]:0},clearInt:function(a){var b=this._ints,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._ints,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,c)&&delete a.h[c]);
return!0},setInt:function(a,b){a=this.parseString(a);if(Aa.typeof(b)==nb.TInt)this._ints.h[a]=b;else if(Aa.typeof(b)==nb.TFloat)b=Math.round(b),this._ints.h[a]=b;else{var c=this._ints;b=this.parseInt(b);c.h[a]=b}return!0},getBool:function(a){return Object.prototype.hasOwnProperty.call(this._bools.h,a)?this._bools.h[a]:!1},clearBool:function(a){var b=this._bools,c=this.parseString(a);Object.prototype.hasOwnProperty.call(b.h,c)&&(b=this._bools,c=this.parseString(a),a=b,Object.prototype.hasOwnProperty.call(a.h,
c)&&delete a.h[c]);return!0},setBool:function(a,b,c){c==null&&(c=!1);a=this.parseString(a);Aa.typeof(b)==nb.TBool?this._bools.h[a]=c?!b:b:(c?(c=this._bools,b=!this.parseBool(b)):(c=this._bools,b=this.parseBool(b)),c.h[a]=b);return!0},run:function(a,b){b==null&&(b=!1);if(b){if(a==null)return!0;var c=a}else c=mb.jsonParse(a);if(c==0)return!1;if(Aa.typeof(c)!=nb.TObject){a=[];b=!1;try{a=u.__cast(c,Array),b=!0}catch(f){b=!1}if(b){for(c=0;c<a.length;){var d=a[c];++c;this.run(d,!0)||(b=!1)}return b}return!1}return this.exec(c)},
checkJoystick:function(a){var b=!1;switch(a){case "0":p.usingTarget>0?(p.area.triggerTarget(),b=!0):b=this.runInput("keyspace");break;case "1":b=this.runInput("keyenter");break;case "2":b=this.runInput("keypup");break;case "3":b=this.runInput("keypdown");break;case "d":p.usingTarget>0?(p.area.moveTarget("down"),b=!0):b=this.runInput("keydown");break;case "l":p.usingTarget>0?(p.area.moveTarget("left"),b=!0):b=this.runInput("keyleft");break;case "r":p.usingTarget>0?(p.area.moveTarget("right"),b=!0):
b=this.runInput("keyright");break;case "u":p.usingTarget>0?(p.area.moveTarget("up"),b=!0):b=this.runInput("keyup")}return b},checkKeyboard:function(a){var b=!1;switch(a){case 13:b=this.runInput("keyenter");break;case 32:p.usingTarget>0?(p.area.triggerTarget(),b=!0):b=this.runInput("keyspace");break;case 33:b=this.runInput("keypup");break;case 34:b=this.runInput("keypdown");break;case 35:b=this.runInput("keyend");break;case 36:b=this.runInput("keyhome");break;case 37:p.usingTarget>0?(p.area.moveTarget("left"),
b=!0):(b=this.runInput("keyleft"))||(b=this.runInput("keyletf"));break;case 38:p.usingTarget>0?(p.area.moveTarget("up"),b=!0):b=this.runInput("keyup");break;case 39:p.usingTarget>0?(p.area.moveTarget("right"),b=!0):b=this.runInput("keyright");break;case 40:p.usingTarget>0?(p.area.moveTarget("down"),b=!0):b=this.runInput("keydown")}return b},checkMouse:function(a){var b=!1;switch(a){case "mousemiddle":b=this.runInput("mousemiddle");break;case "mouseright":b=this.runInput("mouseright");break;case "mousewheeldown":b=
this.runInput("mousewheeldown");break;case "mousewheelup":b=this.runInput("mousewheelup")}return b},runInput:function(a){var b=!1;if(Object.prototype.hasOwnProperty.call(p.mdata.inputs.h,a))if(b=p.mdata.inputs.h[a],b==null)b=this.run('{ "ac": "run", "param": [ "'+p.mdata.inputs.h[a]+'" ] }');else switch(b){case "down":this.run('{ "ac": "scene.navigate", "param": [ "down" ] }');b=!0;break;case "firstkf":this.run('{ "ac": "scene.loadfirstkeyframe", "param": [ "" ] }');b=!0;break;case "lastkf":this.run('{ "ac": "scene.loadlastkeyframe", "param": [ "" ] }');
b=!0;break;case "left":this.run('{ "ac": "scene.navigate", "param": [ "left" ] }');b=!0;break;case "nextkf":this.run('{ "ac": "scene.nextkeyframe", "param": [ "" ] }');b=!0;break;case "nin":this.run('{ "ac": "scene.navigate", "param": [ "nin" ] }');b=!0;break;case "nothing":b=!1;break;case "nout":this.run('{ "ac": "scene.navigate", "param": [ "nout" ] }');b=!0;break;case "prevkf":this.run('{ "ac": "scene.previouskeyframe", "param": [ "" ] }');b=!0;break;case "right":this.run('{ "ac": "scene.navigate", "param": [ "right" ] }');
b=!0;break;case "target":this.run('{ "ac": "target.toggle", "param": [ "" ] }');b=!0;break;case "up":this.run('{ "ac": "scene.navigate", "param": [ "up" ] }');b=!0;break;default:b=this.run('{ "ac": "run", "param": [ "'+p.mdata.inputs.h[a]+'" ] }')}return b},exec:function(a){if(Object.prototype.hasOwnProperty.call(a,"ac")&&Object.prototype.hasOwnProperty.call(a,"param")&&Aa.typeof(A.field(a,"param"))!=nb.TObject){var b=[],c=!1;try{b=u.__cast(A.field(a,"param"),Array),c=!0}catch(E){c=!1}if(c)switch(A.field(a,
"ac")){case "accessibility.changeshader":return p.currentShader++,p.currentShader>=p.shaders.length&&(p.currentShader=0),this.applyPlayerShader(p.currentShader),!0;case "accessibility.focuson":return p.focusMode=!0,p.area.setFocus(),p.contraptions.setFocus(),!0;case "accessibility.focusooff":return p.focusMode=!1,p.area.setFocus(),p.contraptions.setFocus(),!0;case "accessibility.focusswitch":return p.focusMode=!p.focusMode,p.area.setFocus(),p.contraptions.setFocus(),!0;case "accessibility.setdescription":return b.length>=
1?window.TBB_callDescription(this.parseString(b[0])):!1;case "accessibility.setshader":if(b.length>=1){Me.trace("param ok",{fileName:"Source/com/tilbuci/script/ScriptParser.hx",lineNumber:3036,className:"com.tilbuci.script.ScriptParser",methodName:"exec"});p.currentShader=0;switch(this.parseString(b[0])){case "contrast":p.currentShader=4;break;case "deuteranotopia":p.currentShader=1;break;case "grayscale":p.currentShader=5;break;case "protonatopia":p.currentShader=2;break;case "tritanotopia":p.currentShader=
3}this.applyPlayerShader(p.currentShader);return!0}return!1;case "animation.method":return p.area.setAnimation(this.parseString(b[0])),!0;case "array.clear":if(b.length>0){var d=this._arrays,f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return d=this._arrays,f=this.parseString(b[0]),d.h[f].clear(),!0}return!1;case "array.create":if(b.length>0){d=this._arrays;f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return!1;d=this._arrays;var g=this.parseString(b[0]),
h=new rf;d.h[g]=h;return!0}return!1;case "array.current":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].current(),d.h[g]=h,!0):!1;case "array.currentbool":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentBool(),
d.h[g]=h,!0):!1;case "array.currentfloat":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentFloat(),d.h[g]=h,!0):!1;case "array.currentint":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].currentInt(),d.h[g]=
h,!0):!1;case "array.fromstring":return b.length>1?(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)||(d=this._arrays,g=this.parseString(b[0]),h=new rf,d.h[g]=h),d=this._arrays,f=this.parseString(b[0]),a=d.h[f],d=this._strings,f=this.parseString(b[1]),a.fromJson(d.h[f])):!1;case "array.get":return b.length>2?(d=this._strings,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].get(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getbool":return b.length>
2?(d=this._bools,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].getBool(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getfloat":return b.length>2?(d=this._floats,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].getFloat(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.getindex":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),
h=a.h[f].currentIndex(),d.h[g]=h,!0):!1;case "array.getint":return b.length>2?(d=this._ints,g=this.parseString(b[2]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].getInt(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "array.loadfile":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),a=null,this._currentArray=this.parseString(b[0]),
p.nocache&&(f=new aa,g=Math.ceil(Math.random()*1E4),f.h.rand=g,a=f),new kd(!0,p.path+"media/strings/"+this.parseString(b[0])+".json","GET",a,1,m(this,this.onArrayFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "array.next":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].next(),d.h[g]=h,!0):!1;case "array.nextbool":return b.length>
1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextBool(),d.h[g]=h,!0):!1;case "array.nextfloat":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextFloat(),d.h[g]=h,!0):!1;case "array.nextint":return b.length>1&&(d=this._arrays,
f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].nextInt(),d.h[g]=h,!0):!1;case "array.previous":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previous(),d.h[g]=h,!0):!1;case "array.previousbool":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._bools,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousBool(),d.h[g]=h,!0):!1;case "array.previousfloat":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._floats,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousFloat(),d.h[g]=h,!0):!1;case "array.previousint":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._ints,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].previousInt(),d.h[g]=h,!0):!1;case "array.push":return b.length>1?(d=this._arrays,f=this.parseString(b[0]),d.h[f].push(L.string(b[1])),!0):!1;case "array.remove":if(b.length>0&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))){d=this._arrays;f=this.parseString(b[0]);d.h[f].kill();d=this._arrays;f=this.parseString(b[0]);var l=d;Object.prototype.hasOwnProperty.call(l.h,
f)&&delete l.h[f];return!0}return!1;case "array.set":return b.length>2?(d=this._arrays,f=this.parseString(b[0]),d.h[f].set(this.parseInt(b[1]),L.string(b[2])),!0):!1;case "array.setindex":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=this._arrays,f=this.parseString(b[0]),d.h[f].setIndex(this.parseInt(b[1])),!0):!1;case "array.tostring":return b.length>1&&(d=this._arrays,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,
f))?(d=this._strings,g=this.parseString(b[1]),a=this._arrays,f=this.parseString(b[0]),h=a.h[f].toJson(),d.h[g]=h,!0):!1;case "battle.close":return p.contraptions.bsHide(),!0;case "battle.setattribute":return b.length>3&&Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,"bs")?(p.contraptions.bs.h.bs.setAttributes(!0,this.parseInt(b[0])-1,this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "battle.setopponent":return b.length>3&&Object.prototype.hasOwnProperty.call(p.contraptions.bs.h,
"bs")?(p.contraptions.bs.h.bs.setAttributes(!1,this.parseInt(b[0])-1,this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "battle.show":if(b.length>1){d=this.parseString(b[0]).split(",");c=this.parseString(b[1]).split(",");b=[];h=[];f=0;for(g=d.length;f<g;)l=f++,l<5&&b.push(this.parseString(Z.trim(d[l])));f=0;for(g=c.length;f<g;)l=f++,l<5&&h.push(this.parseString(Z.trim(c[l])));g=f=null;Object.prototype.hasOwnProperty.call(a,"win")&&(f=A.field(a,"win"));Object.prototype.hasOwnProperty.call(a,
"loose")&&(g=A.field(a,"loose"));p.contraptions.battleShow(f,g,b,h);return!0}return!1;case "bool.clear":return this.clearBool(b[0]);case "bool.clearall":return this.clearVars("bools");case "bool.set":return this.setBool(b[0],b[1]);case "bool.setinverse":return this.setBool(b[0],b[1],!0);case "contraption.background":return b.length>0?p.contraptions.showBackground(this.parseString(b[0])):!1;case "contraption.backgroundhide":return p.contraptions.hideBackground(),!0;case "contraption.cover":return b.length>
0?p.contraptions.showCover(this.parseString(b[0])):!1;case "contraption.coverhide":return p.contraptions.hideCover(),!0;case "contraption.form":return b.length>2?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel")),p.contraptions.showForm(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),h,d)):!1;case "contraption.formhide":return p.contraptions.hideForm(),!0;case "contraption.formsetstepper":return b.length>
3?p.contraptions.setFormStepper(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])):!1;case "contraption.formvalue":return b.length>1?p.contraptions.setFormValue(this.parseString(b[0]),b[1]):!1;case "contraption.hideloading":return p.contraptions.hideLoadingIc(),!0;case "contraption.interface":return b.length>2?p.contraptions.showInterface(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2])):!1;case "contraption.interfaceanimframe":return b.length>1?p.contraptions.setInterfaceFrame(this.parseString(b[0]),
this.parseInt(b[1])):!1;case "contraption.interfaceanimpause":return b.length>0?p.contraptions.pauseInterface(this.parseString(b[0])):!1;case "contraption.interfaceanimplay":return b.length>0?p.contraptions.playInterface(this.parseString(b[0])):!1;case "contraption.interfacehide":return b.length>0?(p.contraptions.hideInterface(this.parseString(b[0])),!0):!1;case "contraption.interfacehideall":return p.contraptions.hideAllInterfaces(),!0;case "contraption.interfacetext":return b.length>1?p.contraptions.setInterfaceText(this.parseString(b[0]),
this.parseString(b[1])):!1;case "contraption.menu":if(b.length>=6&&(g=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(p.contraptions.menus.h,g))){l=this.parseString(b[1]).split(";");h=[];for(f=0;f<l.length;)d=l[f],++f,h.push(this.parseString(Z.trim(d)));f=null;Object.prototype.hasOwnProperty.call(a,"select")&&(f=A.field(a,"select"));return p.contraptions.menuShow(g,h,this.parseString(b[2]),f,this.parseString(b[3]),this.parseInt(b[4]),this.parseInt(b[5]))}return!1;case "contraption.menuhide":return p.contraptions.menuHide(),
!0;case "contraption.message":return b.length>=4&&(g=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(p.contraptions.messages.h,g))?(l=this.parseString(b[2]).split(";"),f=null,Object.prototype.hasOwnProperty.call(a,"select")&&(f=A.field(a,"select")),p.contraptions.messagesShow(g,this.parseString(b[1]),l,this.parseString(b[3]),f)):!1;case "contraption.messagehide":return p.contraptions.messagesHide(),!0;case "contraption.musicpause":return p.contraptions.musicPause(),!0;case "contraption.musicplay":return b.length>
0?p.contraptions.musicPlay(this.parseString(b[0])):!1;case "contraption.musicstop":return p.contraptions.musicStop(),!0;case "contraption.musicvolume":return b.length>0?(p.contraptions.musicVolume(this.parseInt(b[0])),!0):!1;case "contraption.showloading":return p.contraptions.showLoadingIc(),!0;case "contraption.soudstop":return b.length>0?p.contraptions.soundStop(this.parseString(b[0])):p.contraptions.soundStop(),!0;case "contraption.soundpause":return b.length>0?p.contraptions.soundPause(this.parseString(b[0])):
p.contraptions.soundPause(),!0;case "contraption.soundplay":return b.length>0?p.contraptions.soundPlay(this.parseString(b[0])):!1;case "contraption.soundvolume":return b.length>1?(p.contraptions.soundVolume(this.parseInt(b[0]),this.parseString(b[1])),!0):b.length>0?(p.contraptions.soundVolume(this.parseInt(b[0])),!0):!1;case "css.clear":return p.style.clear(),!0;case "css.set":return p.style.parseCSS(this.parseString(b[0])),!0;case "data.event":a=[];if(b.length>1)for(f=1,g=b.length;f<g;)l=f++,X.substr(L.string(b[l]),
0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,X.substr(L.string(b[l]),1,null))?a.push(this._ints.h[X.substr(L.string(b[l]),1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,X.substr(L.string(b[l]),1,null))?a.push(this._floats.h[X.substr(L.string(b[l]),1,null)]):a.push(this.parseString(b[l])):X.substr(L.string(b[l]),0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,X.substr(L.string(b[l]),1,null))?a.push(this._bools.h[X.substr(L.string(b[l]),1,null)]):a.push(this.parseString(b[l])):
a.push(this.parseString(b[l]));f=new aa;g=this.parseString(b[0]);f.h.name=g;g=X.dateStr(new Date);f.h.when=g;g=mb.jsonStringify(a);f.h.data=g;g=p.movie.get_mvId();f.h.movieid=g;g=p.movie.get_scId();f.h.sceneid=g;f.h.movietitle=p.mdata.title;f.h.scenetitle=p.movie.scene.title;g=p.ws.get_user();f.h.visitor=g;f.h.sessionid=p.session;this._lastEvent=f;p.ws.send("Visitor/Event",this._lastEvent,m(this,this.onDataEvent));return!0;case "data.eventclear":try{var k=Ge.getLocal(p.movie.get_mvId()+"_eventsheld");
k.data.events=[];k.flush();k.close()}catch(E){}return!0;case "data.liststates":return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),p.area.showStatesInput(this._acOk,this._acError),!0;case "data.load":this._acOk=this._acError=null;if(p.ws.userLogged()&&b.length>0)return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),
Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),p.ws.dataLoad(this.parseString(b[0]),m(this,this.onDataLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "data.loadlocal":this._acOk=this._acError=null;if(b.length>0){try{if(d=Ge.getLocal(p.movie.get_mvId()+"_"+this.parseString(b[0])),Object.prototype.hasOwnProperty.call(d.data,"values")){var q=mb.jsonParse(A.field(d.data,"values"));if(q==0)Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(A.field(a,"error"),!0);else{f=0;for(g=A.fields(q);f<g.length;){l=g[f];++f;var w=A.field(q,l);switch(A.field(w,"t")){case "B":h=A.field(w,"v");this._bools.h[A.field(w,"n")]=h;break;case "F":var v=A.field(w,"v");this._floats.h[A.field(w,"n")]=v;break;case "I":var z=A.field(w,"v");this._ints.h[A.field(w,"n")]=z;break;case "S":var n=A.field(w,"v");this._strings.h[A.field(w,"n")]=n}}Object.prototype.hasOwnProperty.call(a,"success")&&this.run(A.field(a,"success"),!0)}}else Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(A.field(a,"error"),!0)}catch(E){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "data.loadquickstate":this._acOk=this._acError=null;if(p.ws.userLogged())return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),p.ws.stateLoad("",
!0,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "data.loadstate":this._acOk=this._acError=null;if(p.ws.userLogged()&&b.length>0)return Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),p.ws.stateLoad(this.parseString(b[0]),!1,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&
this.run(A.field(a,"error"),!0);return!1;case "data.loadstatelocal":this._acOk=this._acError=null;try{if(d=Ge.getLocal(p.movie.get_mvId()+"_state"),Object.prototype.hasOwnProperty.call(d.data,"values")&&Object.prototype.hasOwnProperty.call(d.data,"scene"))if(q=mb.jsonParse(A.field(d.data,"values")),q==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);else{f=0;for(g=A.fields(q);f<g.length;)switch(l=g[f],++f,w=A.field(q,l),A.field(w,"t")){case "B":h=A.field(w,"v");this._bools.h[A.field(w,
"n")]=h;break;case "F":v=A.field(w,"v");this._floats.h[A.field(w,"n")]=v;break;case "I":z=A.field(w,"v");this._ints.h[A.field(w,"n")]=z;break;case "S":n=A.field(w,"v"),this._strings.h[A.field(w,"n")]=n}Object.prototype.hasOwnProperty.call(a,"success")&&this.run(A.field(a,"success"),!0)}else Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0)}catch(E){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0)}return!0;case "data.save":this._acOk=this._acError=
null;if(p.ws.userLogged()&&b.length>1){h=[];f=1;for(g=b.length;f<g;)l=f++,w=this.getValueObj(b[l]),w!=null&&h.push(w);h.length==0?Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0):(Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),p.ws.dataSave(this.parseString(b[0]),h,m(this,this.onDataSave)));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&
this.run(A.field(a,"error"),!0);return!1;case "data.savelocal":this._acOk=this._acError=null;if(b.length>1){h=[];f=1;for(g=b.length;f<g;)l=f++,w=this.getValueObj(b[l]),w!=null&&h.push(w);if(h.length==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);else try{d=Ge.getLocal(p.movie.get_mvId()+"_"+this.parseString(b[0])),d.data.values=mb.jsonStringify(h),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(A.field(a,"success"),!0)}catch(E){Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(A.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "data.savequickstate":this._acOk=this._acError=null;if(p.ws.userLogged()){h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"S",v:this._strings.h[l]});c=this._floats.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"F",v:this._floats.h[l]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],
h.push({n:l,t:"I",v:this._ints.h[l]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"B",v:this._bools.h[l]});Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error"));a="";b.length>0&&(a=this.parseString(b[0]));p.ws.stateSave(h,!0,a,m(this,this.onDataSave));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;
case "data.savestate":this._acOk=this._acError=null;if(p.ws.userLogged()){h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"S",v:this._strings.h[l]});c=this._floats.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"F",v:this._floats.h[l]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"I",v:this._ints.h[l]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"B",v:this._bools.h[l]});
Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error"));a="";b.length>0&&(a=this.parseString(b[0]));p.ws.stateSave(h,!1,a,m(this,this.onDataSave));return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "data.savestatelocal":this._acOk=this._acError=null;h=[];c=this._strings.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,
t:"S",v:this._strings.h[l]});c=this._floats.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"F",v:this._floats.h[l]});c=this._ints.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"I",v:this._ints.h[l]});c=this._bools.h;f=Object.keys(c);g=f.length;for(c=0;c<g;)l=f[c++],h.push({n:l,t:"B",v:this._bools.h[l]});Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,
"error"));try{d=Ge.getLocal(p.movie.get_mvId()+"_state"),d.data.values=mb.jsonStringify(h),d.data.scene=p.movie.get_scId(),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(A.field(a,"success"),!0)}catch(E){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0)}return!0;case "dialogue.close":return this._diagInfo!=null?(this._diagInfo.close(),this._diagInfo=null,!0):!1;case "dialogue.first":return this._diagInfo!=null?(this._diagInfo.first(),!0):!1;case "dialogue.last":return this._diagInfo!=
null?(this._diagInfo.last(),!0):!1;case "dialogue.loadgroup":this._currDiag="";this._diagInfo=null;if(b.length>0){this._acOk=this._acError=null;d=p.narrative.dialogues;f=this.parseString(b[0]);if(Object.prototype.hasOwnProperty.call(d.h,f))return this._currDiag=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),d=p.narrative.dialogues,f=this.parseString(b[0]),
d.h[f].loadContents(m(this,this.onDiagGroup)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "dialogue.next":return this._diagInfo!=null?(this._diagInfo.next(),!0):!1;case "dialogue.previous":return this._diagInfo!=null?(this._diagInfo.previous(),!0):!1;case "dialogue.start":return this._diagInfo=null,b.length!=0&&this._currDiag!=""&&Object.prototype.hasOwnProperty.call(p.narrative.dialogues.h,
this._currDiag)&&(d=p.narrative.dialogues.h[this._currDiag].diags,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f))?(d=p.narrative.dialogues.h[this._currDiag].diags,f=this.parseString(b[0]),this._diagInfo=d.h[f],this._diagInfo.show(0),!0):!1;case "float.abs":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=Math.abs(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "float.clear":return this.clearFloat(b[0]);case "float.clearall":return this.clearVars("floats");case "float.divide":if(b.length>
2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])/this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=this._floats,h=this._floats.h[a]/this.parseFloat(b[l]),d.h[a]=h;return!0}return!1;case "float.max":return b.length>2?(d=this._floats,g=this.parseString(b[0]),h=Math.max(this.parseFloat(b[1]),this.parseFloat(b[2])),d.h[g]=h,!0):!1;case "float.min":return b.length>2?(d=this._floats,g=this.parseString(b[0]),h=Math.min(this.parseFloat(b[1]),this.parseFloat(b[2])),
d.h[g]=h,!0):!1;case "float.multiply":if(b.length>2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])*this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._floats,h=c.h[d]*this.parseFloat(b[l]),c.h[d]=h;return!0}return!1;case "float.random":return b.length>2?(a=this.parseFloat(b[1]),f=Math.abs(this.parseFloat(b[2])-a),d=this._floats,g=this.parseString(b[0]),h=a+Math.random()*f,d.h[g]=h,!0):!1;case "float.set":return this.setFloat(b[0],b[1]);case "float.subtract":if(b.length>
2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])-this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._floats,h=c.h[d]-this.parseFloat(b[l]),c.h[d]=h;return!0}return!1;case "float.sum":if(b.length>2){a=this.parseString(b[0]);d=this._floats;h=this.parseFloat(b[1])+this.parseFloat(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._floats,h=c.h[d]+this.parseFloat(b[l]),c.h[d]=h;return!0}return!1;case "float.toint":return b.length>
1?(d=this._ints,g=this.parseString(b[0]),h=Math.round(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "float.tostring":return b.length>1?(d=this._strings,g=this.parseString(b[0]),h=L.string(this.parseFloat(b[1])),d.h[g]=h,!0):!1;case "if.bool":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseBool(b[0])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.boolset":return b.length>0?(d=this._bools,f=this.parseString(b[0]),
Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.floatgreater":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])>this.parseFloat(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatgreaterequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?
this.parseFloat(b[0])>=this.parseFloat(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatlower":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])<this.parseFloat(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatlowerequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])<=
this.parseFloat(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])!=this.parseFloat(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatsequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseFloat(b[0])==this.parseFloat(b[1])?
this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.floatset":return b.length>0?(d=this._floats,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.intgreater":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])>this.parseInt(b[1])?this.run(A.field(a,"then"),
!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.intgreaterequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])>=this.parseInt(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.intlower":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])<this.parseInt(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,
"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.intlowerequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])<=this.parseInt(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.intsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])!=this.parseInt(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,
"else"),!0):!0:!1;case "if.intsequal":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseInt(b[0])==this.parseInt(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.intset":return b.length>0?(d=this._ints,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.replacefileset":return b.length>
0?(d=this._replacefile,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.replacestringset":return b.length>0?(d=this._replacestr,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.stringcontains":return b.length>1&&
Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0]).indexOf(this.parseString(b[1]))!=-1?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.stringemail":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?mb.validateEmail(this.parseString(b[0]))?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.stringendswith":return b.length>
1&&Object.prototype.hasOwnProperty.call(a,"then")?Z.endsWith(this.parseString(b[0]),this.parseString(b[1]))?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.stringsdifferent":return b.length>1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0])!=this.parseString(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.stringsequal":return b.length>
1&&Object.prototype.hasOwnProperty.call(a,"then")?this.parseString(b[0])==this.parseString(b[1])?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "if.stringset":return b.length>0?(d=this._strings,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0):!1;case "if.stringstartswith":return b.length>1&&Object.prototype.hasOwnProperty.call(a,
"then")?Z.startsWith(this.parseString(b[0]),this.parseString(b[1]))?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "input.add":return p.mode=="editor"?!0:b.length==4?(p.area.addInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):b.length>4?(p.area.addInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseString(b[4])),!0):!1;case "input.addnumeric":return p.mode==
"editor"?!0:b.length>4?(p.area.addNumeric(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),!0):!1;case "input.addtarea":return p.mode=="editor"?!0:b.length==5?(p.area.addTarea(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),!0):!1;case "input.addtoggle":return p.mode=="editor"?!0:b.length>3?(p.area.addToggle(this.parseString(b[0]),this.parseBool(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),
!0):!1;case "input.email":if(b.length>1){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel"));a=[];if(b.length>2)for(f=2,g=b.length;f<g;)l=f++,a.push(this.parseString(b[l]));p.area.showEmailInput(this.parseString(b[0]),this.parseString(b[1]),a,h,d);return!0}return!1;case "input.float":return b.length>1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,
"cancel")&&(d=A.field(a,"cancel")),a=1,f=0,g=100,b.length>2&&(a=this.parseInt(b[2])),b.length>3&&(f=this.parseInt(b[3])),b.length>4&&(g=this.parseInt(b[4])),p.area.showNumericInput("float",this.parseString(b[0]),this.parseString(b[1]),h,d,a,f,g),!0):!1;case "input.int":return b.length>1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel")),a=1,f=0,g=100,b.length>2&&(a=this.parseInt(b[2])),b.length>3&&(f=
this.parseInt(b[3])),b.length>4&&(g=this.parseInt(b[4])),p.area.showNumericInput("int",this.parseString(b[0]),this.parseString(b[1]),h,d,a,f,g),!0):!1;case "input.inverttoggle":return b.length>0?(p.area.invertToggle(this.parseString(b[0])),!0):!1;case "input.list":if(b.length>3){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel"));c=[];f=2;for(g=b.length;f<g;)l=f++,c.push(this.parseString(b[l]));p.area.showListInput(this.parseString(b[0]),
this.parseString(b[1]),c,h,d);return!0}return!1;case "input.login":return d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel")),p.area.showLoginInput(h,d),!0;case "input.message":if(b.length>1){d=h=null;Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel"));c=!1;try{u.__cast(d,Array),c=!0}catch(E){c=!1}c||(d=null);p.area.showMessageInput(this.parseString(b[0]),
this.parseString(b[1]),h,d);return!0}return!1;case "input.place":return b.length>3?(p.area.placeInput(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "input.placenumeric":return b.length>3?(p.area.placeNumeric(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "input.placetarea":return b.length>4?(p.area.placeTarea(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3]),this.parseInt(b[4])),
!0):!1;case "input.placetoggle":return b.length>2?(p.area.placeToggle(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2])),!0):!1;case "input.remove":return b.length>0?(p.area.removeInput(this.parseString(b[0])),!0):!1;case "input.removeall":return p.area.removeAllInputs(),!0;case "input.removeallnumerics":return p.area.removeAllNumerics(),!0;case "input.removealltareas":return p.area.removeAllTareas(),!0;case "input.removealltoggles":return p.area.removeAllToggles(),!0;case "input.removenumeric":return b.length>
0?(p.area.removeNumeric(this.parseString(b[0])),!0):!1;case "input.removetarea":return b.length>0?(p.area.removeTarea(this.parseString(b[0])),!0):!1;case "input.removetoggle":return b.length>0?(p.area.removeToggle(this.parseString(b[0])),!0):!1;case "input.setnumeric":return b.length>1?(p.area.setNumericValue(this.parseString(b[0]),this.parseInt(b[1])),!0):!1;case "input.setnumericbounds":return b.length>1?(p.area.setNumericBounds(this.parseString(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),
!0):!1;case "input.setpassword":return b.length>1?(p.area.setInputPassword(this.parseString(b[0]),this.parseBool(b[1])),!0):!1;case "input.settext":return b.length>1?(p.area.setInputText(this.parseString(b[0]),this.parseString(b[1])),!0):!1;case "input.settextarea":return b.length>1?(p.area.setTareaText(this.parseString(b[0]),this.parseString(b[1])),!0):!1;case "input.settoggle":return b.length>1?(p.area.setToggleValue(this.parseString(b[0]),this.parseBool(b[1])),!0):!1;case "input.string":return b.length>
1?(d=h=null,Object.prototype.hasOwnProperty.call(a,"ok")&&(h=A.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=A.field(a,"cancel")),p.area.showTextInput(this.parseString(b[0]),this.parseString(b[1]),h,d),!0):!1;case "instance.clearall":return p.area.releaseAllProperties(this.parseString(b[0]));case "instance.clearalpha":return p.area.releaseProperty(this.parseString(b[0]),"alpha");case "instance.clearcolor":return p.area.releaseProperty(this.parseString(b[0]),"color");case "instance.clearcoloralpha":return p.area.releaseProperty(this.parseString(b[0]),
"colorAlpha");case "instance.clearfont":return p.area.releaseProperty(this.parseString(b[0]),"textFont");case "instance.clearfontalign":return p.area.releaseProperty(this.parseString(b[0]),"textAlign");case "instance.clearfontbackground":return p.area.releaseProperty(this.parseString(b[0]),"textBackground");case "instance.clearfontbold":return p.area.releaseProperty(this.parseString(b[0]),"textBold");case "instance.clearfontcolor":return p.area.releaseProperty(this.parseString(b[0]),"textColor");
case "instance.clearfontitalic":return p.area.releaseProperty(this.parseString(b[0]),"textItalic");case "instance.clearfontleading":return p.area.releaseProperty(this.parseString(b[0]),"textLeading");case "instance.clearfontsize":return p.area.releaseProperty(this.parseString(b[0]),"textSize");case "instance.clearfontspacing":return p.area.releaseProperty(this.parseString(b[0]),"textSpacing");case "instance.clearheight":return p.area.releaseProperty(this.parseString(b[0]),"height");case "instance.clearmove":if(b.length>
0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.releaseProperty(f.getInstName(),"x");p.area.releaseProperty(f.getInstName(),"y");return!0}return!1;case "instance.clearorder":return p.area.releaseProperty(this.parseString(b[0]),"order");case "instance.clearpan":return p.area.releaseProperty(this.parseString(b[0]),"pan");case "instance.clearrotation":return p.area.releaseProperty(this.parseString(b[0]),"rotation");case "instance.clearvisible":return p.area.releaseProperty(this.parseString(b[0]),
"visible");case "instance.clearvolume":return p.area.releaseProperty(this.parseString(b[0]),"volume");case "instance.clearwidth":return p.area.releaseProperty(this.parseString(b[0]),"width");case "instance.clearx":return p.area.releaseProperty(this.parseString(b[0]),"x");case "instance.cleary":return p.area.releaseProperty(this.parseString(b[0]),"y");case "instance.clearzoom":if(b.length>0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.releaseProperty(f.getInstName(),"width");
p.area.releaseProperty(f.getInstName(),"height");p.area.releaseProperty(f.getInstName(),"x");p.area.releaseProperty(f.getInstName(),"y");return!0}return!1;case "instance.isoverlapping":return b.length>1?(f=p.area.pickInstance(this.parseString(b[0])),b=p.area.pickInstance(this.parseString(b[1])),f==null||b==null?Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:f.hitTestObject(b)?Object.prototype.hasOwnProperty.call(a,"then")?this.run(A.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,
"else")?this.run(A.field(a,"else"),!0):!0):!1;case "instance.lesszoom":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;a=this.parseFloat(b[1]);b=f.get_width()*(1-a/100);a=f.get_height()*(1-a/100);g=f.get_x()-(b-f.get_width())/2;l=f.get_y()-(a-f.get_height())/2;p.area.setProperty(f.getInstName(),"width",b,b);p.area.setProperty(f.getInstName(),"height",a,a);p.area.setProperty(f.getInstName(),"x",g,g);p.area.setProperty(f.getInstName(),"y",l,l);return!0}return!1;case "instance.loadasset":return p.area.loadAsset(this.parseString(b[0]),
this.parseString(b[1]));case "instance.morezoom":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;a=this.parseFloat(b[1]);b=f.get_width()*(1+a/100);a=f.get_height()*(1+a/100);g=f.get_x()-(b-f.get_width())/2;l=f.get_y()-(a-f.get_height())/2;p.area.setProperty(f.getInstName(),"width",b,b);p.area.setProperty(f.getInstName(),"height",a,a);p.area.setProperty(f.getInstName(),"x",g,g);p.area.setProperty(f.getInstName(),"y",l,l);return!0}return!1;case "instance.movedown":if(b.length>
1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"y",f.get_y()+this.parseFloat(b[1]),f.get_y()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveleft":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"x",f.get_x()-this.parseFloat(b[1]),f.get_x()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveright":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));
if(f==null)return!1;p.area.setProperty(f.getInstName(),"x",f.get_x()+this.parseFloat(b[1]),f.get_x()-this.parseFloat(b[1]));return!0}return!1;case "instance.moveup":if(b.length>1){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;p.area.setProperty(f.getInstName(),"y",f.get_y()-this.parseFloat(b[1]),f.get_y()-this.parseFloat(b[1]));return!0}return!1;case "instance.next":return p.area.next(this.parseString(b[0]));case "instance.pause":return p.area.pauseInstance(this.parseString(b[0]));
case "instance.play":return p.area.playInstance(this.parseString(b[0]));case "instance.playpause":return p.area.playPauseInstance(this.parseString(b[0]));case "instance.previous":return p.area.previous(this.parseString(b[0]));case "instance.scrollbottom":return p.area.textScroll(this.parseString(b[0]),2);case "instance.scrolldown":return p.area.textScroll(this.parseString(b[0]),1);case "instance.scrolltop":return p.area.textScroll(this.parseString(b[0]),0);case "instance.scrollup":return p.area.textScroll(this.parseString(b[0]),
-1);case "instance.seek":return p.area.instanceSeek(this.parseString(b[0]),this.parseInt(b[1]));case "instance.setalpha":return b.length==2?p.area.setProperty(this.parseString(b[0]),"alpha",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"alpha",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setcolor":return b.length==2?p.area.setProperty(this.parseString(b[0]),"color",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"color",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setcoloralpha":return b.length==2?p.area.setProperty(this.parseString(b[0]),"colorAlpha",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"colorAlpha",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setfont":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textFont",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textFont",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontalign":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textAlign",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textAlign",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontbackground":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textBackground",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textBackground",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontbold":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textBold",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textBold",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setfontcolor":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textColor",this.parseString(b[1]),this.parseString(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textColor",this.parseString(b[1]),this.parseString(b[2])):!1;case "instance.setfontitalic":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textItalic",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textItalic",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setfontleading":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textLeading",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textLeading",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setfontsize":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textSize",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"textSize",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setfontspacing":return b.length==2?p.area.setProperty(this.parseString(b[0]),"textSpacing",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"textSpacing",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setheight":return b.length==2?p.area.setProperty(this.parseString(b[0]),"height",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"height",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setorder":return b.length==2?p.area.setProperty(this.parseString(b[0]),"order",this.parseInt(b[1]),this.parseInt(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),
"order",this.parseInt(b[1]),this.parseInt(b[2])):!1;case "instance.setpan":return b.length==2?p.area.setProperty(this.parseString(b[0]),"pan",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"pan",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setparagraph":return p.area.setText(this.parseString(b[0]),this.parseString(b[1]));case "instance.setrotation":return b.length==2?p.area.setProperty(this.parseString(b[0]),"rotation",this.parseFloat(b[1]),
this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"rotation",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setvisible":return b.length==2?p.area.setProperty(this.parseString(b[0]),"visible",this.parseBool(b[1]),this.parseBool(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"visible",this.parseBool(b[1]),this.parseBool(b[2])):!1;case "instance.setvolume":return b.length==2?p.area.setProperty(this.parseString(b[0]),"volume",this.parseFloat(b[1]),
this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"volume",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setwidth":return b.length==2?p.area.setProperty(this.parseString(b[0]),"width",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"width",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.setx":return b.length==2?p.area.setProperty(this.parseString(b[0]),"x",this.parseFloat(b[1]),this.parseFloat(b[1])):
b.length>=3?p.area.setProperty(this.parseString(b[0]),"x",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.sety":return b.length==2?p.area.setProperty(this.parseString(b[0]),"y",this.parseFloat(b[1]),this.parseFloat(b[1])):b.length>=3?p.area.setProperty(this.parseString(b[0]),"y",this.parseFloat(b[1]),this.parseFloat(b[2])):!1;case "instance.startdrag":if(b.length>0){f=p.area.pickInstance(this.parseString(b[0]));if(f==null)return!1;this._acOk=null;Object.prototype.hasOwnProperty.call(a,
"complete")&&(this._acOk=A.field(a,"complete"));this.onDrag=f;p.usingTarget==0&&(p.area.hasEventListener("mouseMove")||p.area.addEventListener("mouseMove",m(this,this.onDragMove)),p.area.stage.hasEventListener("mouseUp")||p.area.stage.addEventListener("mouseUp",m(this,this.onDragMoveStop)));return!0}return!1;case "instance.stop":return p.area.stopInstance(this.parseString(b[0]));case "instance.stopdrag":return this.onDragMoveStop(null),!0;case "instance.zoom":return b.length>0?p.contraptions.zoomInstance(this.parseString(b[0])):
!1;case "int.abs":return b.length>1?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.abs(this.parseInt(b[1]))),d.h[g]=h,!0):!1;case "int.clear":return this.clearInt(b[0]);case "int.clearall":return this.clearVars("ints");case "int.divide":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=Math.round(this.parseInt(b[1])/this.parseInt(b[2]));d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=this._ints,h=Math.round(this._ints.h[a]/this.parseInt(b[l])),d.h[a]=h;return!0}return!1;case "int.max":return b.length>
2?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.max(this.parseInt(b[1]),this.parseInt(b[2]))),d.h[g]=h,!0):!1;case "int.min":return b.length>2?(d=this._ints,g=this.parseString(b[0]),h=Math.round(Math.min(this.parseInt(b[1]),this.parseInt(b[2]))),d.h[g]=h,!0):!1;case "int.multiply":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])*this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._ints,h=c.h[d]*this.parseInt(b[l]),c.h[d]=h;return!0}return!1;
case "int.random":return b.length>2?(a=this.parseInt(b[1]),f=Math.round(Math.abs(this.parseInt(b[2])-a)),d=this._ints,g=this.parseString(b[0]),h=a+Math.round(Math.random()*f),d.h[g]=h,!0):!1;case "int.set":return this.setInt(b[0],b[1]);case "int.subtract":if(b.length>2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])-this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._ints,h=c.h[d]-this.parseInt(b[l]),c.h[d]=h;return!0}return!1;case "int.sum":if(b.length>
2){a=this.parseString(b[0]);d=this._ints;h=this.parseInt(b[1])+this.parseInt(b[2]);d.h[a]=h;if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,d=a,c=this._ints,h=c.h[d]+this.parseInt(b[l]),c.h[d]=h;return!0}return!1;case "int.tofloat":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=this.parseInt(b[1])*1,d.h[g]=h,!0):!1;case "int.tostring":return b.length>1?(d=this._strings,g=this.parseString(b[0]),h=L.string(this.parseInt(b[1])),d.h[g]=h,!0):!1;case "inventory.addconsumable":return b.length>
1?(p.narrative.addConsumableItem(this.parseString(b[0]),this.parseInt(b[1])),!0):!1;case "inventory.addkeyitem":return b.length>0?(p.narrative.addKeyItem(this.parseString(b[0])),!0):!1;case "inventory.clearconsumables":return p.narrative.clearConsumableItems(),!0;case "inventory.clearkeyitems":return p.narrative.clearKeyItems(),!0;case "inventory.close":return p.contraptions.invHide(),!0;case "inventory.consfromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadConsItems(d.h[f]),
!0):!1;case "inventory.constostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentConsItems(),d.h[g]=h,!0):!1;case "inventory.consumeitem":return b.length>0?(p.narrative.consumeItem(this.parseString(b[0])),!0):!1;case "inventory.fromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadItems(d.h[f]),!0):!1;case "inventory.haskeyitem":return b.length>0?(p.narrative.hasKeyItem(this.parseString(b[0]))?Object.prototype.hasOwnProperty.call(a,
"then")&&this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(A.field(a,"else"),!0),!0):!1;case "inventory.keyfromstring":return b.length>0?(a=p.narrative,d=this._strings,f=this.parseString(b[0]),a.loadKeyItems(d.h[f]),!0):!1;case "inventory.keytostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentKeyItems(),d.h[g]=h,!0):!1;case "inventory.removeconsumable":return b.length>0?(p.narrative.removeConsumableItem(this.parseString(b[0])),
!0):!1;case "inventory.removekeyitem":return b.length>0?(p.narrative.removeKeyItem(this.parseString(b[0])),!0):!1;case "inventory.show":return b=null,Object.prototype.hasOwnProperty.call(a,"complete")&&(b=A.field(a,"complete")),p.contraptions.inventoryShow(b),!0;case "inventory.tostring":return b.length>0?(d=this._strings,g=this.parseString(b[0]),h=p.narrative.currentItems(),d.h[g]=h,!0):!1;case "mouse.hide":return Id.hide(),p.cursorVisible=!1,p.area.noMouseOver(),!0;case "mouse.show":return p.cursorVisible=
!0,Id.show(),!0;case "movie.load":return p.contraptions.removeContraptions(!0),p.movie.loadMovie(this.parseString(b[0])),!0;case "replace.clearallfiles":return this._replacefile=new aa,!0;case "replace.clearallstrings":return this._replacestr=new aa,!0;case "replace.clearfile":return b.length>0?(d=this._replacefile,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._replacefile,f=this.parseString(b[0]),l=d,Object.prototype.hasOwnProperty.call(l.h,f)&&delete l.h[f]),!0):
!1;case "replace.clearstring":return b.length>0?(d=this._replacestr,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._replacestr,f=this.parseString(b[0]),l=d,Object.prototype.hasOwnProperty.call(l.h,f)&&delete l.h[f]),!0):!1;case "replace.origin":if(b.length>0){switch(this.parseString(b[0])){case "bottom":p.mdata.origin=this.parseString(b[0]);break;case "bottomkeep":p.mdata.origin=this.parseString(b[0]);break;case "center":p.mdata.origin=this.parseString(b[0]);break;case "left":p.mdata.origin=
this.parseString(b[0]);break;case "leftkeep":p.mdata.origin=this.parseString(b[0]);break;case "none":p.mdata.origin=this.parseString(b[0]);break;case "right":p.mdata.origin=this.parseString(b[0]);break;case "rightkeep":p.mdata.origin=this.parseString(b[0]);break;case "top":p.mdata.origin=this.parseString(b[0]);break;case "topkeep":p.mdata.origin=this.parseString(b[0]);break;default:p.mdata.origin="alpha"}return!0}return!1;case "replace.setfile":return b.length>1?(d=this._replacefile,g=this.parseString(b[0]),
h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "replace.setstring":return b.length>1?(d=this._replacestr,g=this.parseString(b[0]),h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "run":if(b.length>0){this._snpParam="      ".split(" ");b.length>=2&&(this._snpParam[0]=b[1]);b.length>=3&&(this._snpParam[1]=b[2]);b.length>=4&&(this._snpParam[2]=b[3]);b.length>=5&&(this._snpParam[3]=b[4]);b.length>=6&&(this._snpParam[4]=b[5]);b.length>=7&&(this._snpParam[5]=b[6]);b.length>=8&&(this._snpParam[6]=b[7]);l="";
c=this._dSnippets.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)for(g=h[c++],f=0,g=this._dSnippets.h[g];f<g.length;)a=g[f],++f,a.name==this.parseString(b[0])&&(l=a.code);return l==""?(d=p.mvActions,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?(d=p.mvActions,f=this.parseString(b[0]),this.run(d.h[f])):!1):this.run(l)}return!1;case "runtime.endkiosk":return!1;case "runtime.ifbrowser":return b=null,Object.prototype.hasOwnProperty.call(a,"then")&&(b=A.field(a,"then")),Object.prototype.hasOwnProperty.call(a,
"else")&&A.field(a,"else"),b!=null?this.run(b,!0):!0;case "runtime.ifdataexist":if(b.length>0)return p.existsFile(this.parseString(b[0])+"."+p.movie.get_mvId())?Object.prototype.hasOwnProperty.call(a,"then")&&this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(A.field(a,"else"),!0),!0;Object.prototype.hasOwnProperty.call(a,"else")&&this.run(A.field(a,"else"),!0);return!1;case "runtime.install":return!1;case "runtime.loaddata":this._acOk=this._acError=null;Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=A.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error"));if(b.length>0)return p.loadFile(this.parseString(b[0])+"."+p.movie.get_mvId(),p.movie.get_mvId(),m(this,this.onVariablesFile));this._acError!=null&&this.run(this._acError,!0);return!1;case "runtime.quit":return p.appQuit();case "runtime.savedata":if(b.length>0){a=[];c=this._strings.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"s",v:this._strings.h[g]});
c=this._ints.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"i",v:this._ints.h[g]});c=this._floats.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"f",v:this._floats.h[g]});c=this._bools.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],a.push({n:g,t:"b",v:this._bools.h[g]});a=mb.encrypt(mb.jsonStringify(a),mb.md5(p.movie.get_mvId()+X.substr(p.movie.get_mvId(),2,null)).toLowerCase());return p.saveFile(this.parseString(b[0])+"."+p.movie.get_mvId(),a)}return!1;
case "runtime.startkiosk":return!1;case "scene.historyback":return p.history.length>0?(p.movie.preventHistory=!0,p.movie.loadScene(p.history.pop())):!1;case "scene.load":return p.movie.loadScene(this.parseString(b[0]));case "scene.loadfirstkeyframe":return p.area.loadKeyframe(p.movie.scene.keyframes[0],0),!0;case "scene.loadkeyframe":if(b.length>0){b=this.parseInt(b[0])-1;if(b<0||b>p.movie.scene.keyframes.length-1)return!1;p.area.loadKeyframe(p.movie.scene.keyframes[b],b);return!0}return!1;case "scene.loadlastkeyframe":return p.area.loadKeyframe(p.movie.scene.keyframes[p.movie.scene.keyframes.length-
1],p.movie.scene.keyframes.length-1),!0;case "scene.navigate":return b.length>0?Object.prototype.hasOwnProperty.call(p.movie.scene.navigation.h,b[0])?p.movie.scene.navigation.h[b[0]]!=""?p.movie.loadScene(this.parseString(p.movie.scene.navigation.h[b[0]])):!1:!1:!1;case "scene.nextkeyframe":return b=p.area.get_currentKf()+1,b>=p.movie.scene.keyframes.length&&(b=0),p.area.loadKeyframe(p.movie.scene.keyframes[b],b),!0;case "scene.pause":return p.area.pause(),!0;case "scene.play":return p.area.play(),
!0;case "scene.playpause":return p.area.playPause(),!0;case "scene.previouskeyframe":return b=p.area.get_currentKf()-1,b<0&&(b=p.movie.scene.keyframes.length-1),p.area.loadKeyframe(p.movie.scene.keyframes[b],b),!0;case "scene.shake":return b.length>1?(f=null,Object.prototype.hasOwnProperty.call(a,"end")&&(f=A.field(a,"end")),zi.shake(p.area,this.parseFloat(b[0]),this.parseFloat(b[1]),f),!0):!1;case "snippets.load":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),a=null,p.nocache&&(f=new aa,g=Math.ceil(Math.random()*1E4),f.h.rand=g,a=f),this._sngroup=this.parseString(b[0]),new kd(!0,p.path+"media/snippets/"+this.parseString(b[0])+".json","GET",a,4,m(this,this.onSnippetFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "snippets.unload":return b.length>0?(d=this._dSnippets,f=
this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=this._dSnippets,f=this.parseString(b[0]),l=d,Object.prototype.hasOwnProperty.call(l.h,f)&&delete l.h[f]),!0):!1;case "string.clear":return this.clearString(b[0]);case "string.clearall":return this.clearVars("strings");case "string.clearglobal":return b.length>1?(d=p.mdata.texts,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)&&(d=p.mdata.texts,f=this.parseString(b[0]),l=d,Object.prototype.hasOwnProperty.call(l.h,
f)&&delete l.h[f]),!0):!1;case "string.concat":if(b.length>2){a=this.parseString(b[0]);this.concatString(a,b[1],b[2]);if(b.length>3)for(f=3,g=b.length;f<g;)l=f++,this.concatString(a,"$"+a,b[l]);return!0}return!1;case "string.loadfile":if(b.length>0)return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=A.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=A.field(a,"error")),a=null,p.nocache&&(f=new aa,g=Math.ceil(Math.random()*
1E4),f.h.rand=g,a=f),new kd(!0,p.path+"media/strings/"+this.parseString(b[0])+".json","GET",a,4,m(this,this.onStringFile)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(A.field(a,"error"),!0);return!1;case "string.replace":return b.length>3?(d=this._strings,g=this.parseString(b[0]),h=Z.replace(this.parseString(b[1]),this.parseString(b[2]),this.parseString(b[3])),d.h[g]=h,!0):!1;case "string.set":return b.length>1?this.setString(b[0],b[1]):!1;case "string.setglobal":return b.length>
1?(d=p.mdata.texts,g=this.parseString(b[0]),h=this.parseString(b[1]),d.h[g]=h,!0):!1;case "string.setgroup":return b.length>0?(d=this._stringsjson,f=this.parseString(b[0]),Object.prototype.hasOwnProperty.call(d.h,f)?this._jsongropup=this.parseString(b[0]):this._jsongropup="",!0):!1;case "string.tofloat":return b.length>1?(d=this._floats,g=this.parseString(b[0]),h=parseFloat(this.parseString(b[1])),d.h[g]=h,!0):!1;case "string.toint":return b.length>1?(d=this._ints,g=this.parseString(b[0]),h=L.parseInt(this.parseString(b[1])),
d.h[g]=h,!0):!1;case "system.calljs":return b.length>0?(a=[],b.length>1&&a.push(this.parseString(b[1])),b.length>2&&a.push(this.parseString(b[2])),b.length>3&&a.push(this.parseString(b[3])),b.length>4&&a.push(this.parseString(b[4])),b.length>5&&a.push(this.parseString(b[5])),b.length>6&&a.push(this.parseString(b[6])),window.TBB_callJs(this.parseString(b[0]),a)):!1;case "system.closeembed":return window.embed_close(),!0;case "system.copytext":return b.length>0?p.copyText(this.parseString(b[0])):!1;
case "system.embedplace":return b.length>3?(window.embed_setposition(this.parseInt(b[0]),this.parseInt(b[1]),this.parseInt(b[2]),this.parseInt(b[3])),!0):!1;case "system.embedreset":return window.embed_setfull(),!0;case "system.fullscreen":return p.fullscreen();case "system.ifdesktop":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.ifhorizontal":return p.area.get_pOrientation()=="horizontal"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(A.field(a,
"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.ifmobile":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.ifplayer":return Object.prototype.hasOwnProperty.call(a,"then")?this.run(A.field(a,"then"),!0):!0;case "system.ifpublish":return Object.prototype.hasOwnProperty.call(a,"then")?this.run(A.field(a,"then"),!0):!0;case "system.ifpwa":return Object.prototype.hasOwnProperty.call(a,"else")?
this.run(A.field(a,"else"),!0):!0;case "system.ifpwainstalled":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.ifvertical":return p.area.get_pOrientation()=="vertical"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(A.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.ifwebsite":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0;case "system.logout":return p.ws.clearUser(),
!0;case "system.openembed":return p.mode=="editor"?!0:b.length>0?(window.embed_place("movie/"+p.movie.get_mvId()+".movie/media/embed/"+this.parseString(b[0])+"/index.html"),!0):!1;case "system.openurl":return b.length>0?(b=new Ve(b[0]),b.method="GET",Oa.getURL(b),!0):!1;case "system.pwainstall":return!1;case "system.quit":return!1;case "system.sendevent":if(this.eventSend==null)return!1;a=new aa;f=0;for(g=b.length;f<g;)l=f++,h=this.parseString(b[l]),a.h["v"+l]=h;this.eventSend(a);return!0;case "system.setkftime":return b.length>
0&&(b=this.parseInt(b[0]),b>=250)?(p.mdata.time=b/1E3,!0):!1;case "system.visitoringroup":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?p.ws.get_groups().indexOf(this.parseString(b[0]))!=-1?this.run(A.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(A.field(a,"else"),!0):!0:!1;case "target.clear":return p.area.clearTarget(),!0;case "target.hide":return p.area.hideTarget(),!0;case "target.set":return b.length>0?p.area.setTarget(this.parseString(b[0])):
!1;case "target.setposition":return b.length>1?(p.area.setTargetPos(this.parseInt(b[0]),this.parseInt(b[1])),!0):!1;case "target.show":return p.area.showTarget(),!0;case "target.toggle":return p.area.toggleTarget(),!0;case "timer.clear":if(p.mode=="editor")return!0;c=this._timers.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],this._timers.h[g].name==null&&(l=this._timers,Object.prototype.hasOwnProperty.call(l.h,g)&&delete l.h[g]);if(b.length>=1&&Object.prototype.hasOwnProperty.call(this._timers.h,
b[0])){try{this._timers.h[b[0]].clear()}catch(E){}l=this._timers;f=b[0];Object.prototype.hasOwnProperty.call(l.h,f)&&delete l.h[f];return!0}return!1;case "timer.clearall":if(p.mode!="editor")for(c=this._timers.h,h=Object.keys(c),d=h.length,c=0;c<d;)g=h[c++],this._timers.h[g].clear(),l=this._timers,Object.prototype.hasOwnProperty.call(l.h,g)&&delete l.h[g];return!0;case "timer.set":if(p.mode=="editor")return!0;c=this._timers.h;h=Object.keys(c);d=h.length;for(c=0;c<d;)g=h[c++],this._timers.h[g].name==
null&&(l=this._timers,Object.prototype.hasOwnProperty.call(l.h,g)&&delete l.h[g]);if(Object.prototype.hasOwnProperty.call(a,"tick")&&b.length==3){g=L.parseInt(b[1]);if(g==null||g<250)return!1;h=L.parseInt(b[2]);if(h==null||h<1)return!1;Object.prototype.hasOwnProperty.call(this._timers.h,b[0])&&(this._timers.h[b[0]].clear(),l=this._timers,f=b[0],Object.prototype.hasOwnProperty.call(l.h,f)&&delete l.h[f]);f=null;Object.prototype.hasOwnProperty.call(a,"end")&&(f=A.field(a,"end"));d=this._timers;h=new Nt(b[0],
g,h,A.field(a,"tick"),f);d.h[b[0]]=h;return!0}return!1;default:f=l=!1;g={onthen:null,onelse:null,onok:null,oncancel:null,ontick:null,onend:null,onsuccess:null,onerror:null};Object.prototype.hasOwnProperty.call(a,"then")&&(g.onthen=A.field(a,"then"));Object.prototype.hasOwnProperty.call(a,"else")&&(g.onelse=A.field(a,"else"));Object.prototype.hasOwnProperty.call(a,"ok")&&(g.onok=A.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(g.oncancel=A.field(a,"cancel"));Object.prototype.hasOwnProperty.call(a,
"tick")&&(g.ontick=A.field(a,"tick"));Object.prototype.hasOwnProperty.call(a,"end")&&(g.onend=A.field(a,"end"));Object.prototype.hasOwnProperty.call(a,"success")&&(g.onsuccess=A.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(g.onerror=A.field(a,"error"));h=c=p.plugins.h;d=Object.keys(c);c=d.length;for(w=0;w<c;)k=h[d[w++]],k.active&&!l&&k.hasAction(A.field(a,"ac"))&&(f=k.runAction(A.field(a,"ac"),b,g),l=!0);return f}else return!1}else return!1},parsePath:function(a){for(var b=
Object.keys(this._replacefile.h),c=b.length,d=0;d<c;){var f=b[d++];a=Z.replace(a,f,this._replacefile.h[f])}return a},parseString:function(a){a=this.parseStringVar(a);for(var b=Object.keys(this._replacestr.h),c=b.length,d=0;d<c;){var f=b[d++];a=Z.replace(a,f,this._replacestr.h[f])}return a},parseStringVar:function(a){if(a.charAt(0)=="$"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseString(a),g.found))return g.value}if(X.substr(a,0,10)=="$_INSTANCE")if(b=
a.split(":"),b.length==2)switch(b[0]){case "$_INSTANCECOLOR":return p.area.instanceStringProp(this.parseString(b[1]),"color");case "$_INSTANCEFONT":return p.area.instanceStringProp(this.parseString(b[1]),"font");case "$_INSTANCEFONTCOLOR":return p.area.instanceStringProp(this.parseString(b[1]),"fontColor");case "$_INSTANCETEXT":return p.area.instanceStringProp(this.parseString(b[1]),"text");default:return a}else return a;else{if(X.substr(a,0,7)=="$_INPUT")return b=a.split(":"),b.length==2?p.area.getInputText(b[1]):
a;if(X.substr(a,0,7)=="$_TAREA")return b=a.split(":"),b.length==2?p.area.getTareaText(b[1]):a;if(X.substr(a,0,7)=="$_TEXTS")return b=a.split(":"),b.length==2&&(a=p.mdata.texts,c=this.parseString(b[1]),Object.prototype.hasOwnProperty.call(a.h,c))?(a=p.mdata.texts,c=this.parseString(b[1]),a.h[c]):"";if(X.substr(a,0,6)=="$_FORM")return b=a.split(":"),b.length==2?p.contraptions.getFormValue(b[1]):"";if(X.substr(a,0,7)=="$_PARAM")if(b=a.split(":"),b.length==2)switch(b[1]){case "1":return this._snpParam[0];
case "2":return this._snpParam[1];case "3":return this._snpParam[2];case "4":return this._snpParam[3];case "5":return this._snpParam[4];case "6":return this._snpParam[5];case "7":return this._snpParam[6];default:return""}else return"";else{if(this._jsongropup!=""&&Object.prototype.hasOwnProperty.call(this._stringsjson.h,this._jsongropup)&&Object.prototype.hasOwnProperty.call(this._stringsjson.h[this._jsongropup].h,a))return this._stringsjson.h[this._jsongropup].h[a];switch(a){case "$_DATE":return oc.format(new Date,
"%Y-%m-%d");case "$_DAY":return oc.format(new Date,"%d");case "$_HOUR":return oc.format(new Date,"%H");case "$_MINUTE":return oc.format(new Date,"%M");case "$_MONTH":return oc.format(new Date,"%m");case "$_MOVIEID":return p.movie.get_mvId();case "$_MOVIETITLE":return p.movie.data.title;case "$_ORIENTATION":return p.area.get_pOrientation();case "$_RENDER":return"webgl";case "$_RUNTIME":return"publish";case "$_SCENEID":return p.movie.get_scId();case "$_SCENETITLE":return p.movie.scene.title;case "$_SECOND":return oc.format(new Date,
"%S");case "$_SESSION":return p.session;case "$_TIME":return oc.format(new Date,"%H:%M:%S");case "$_URLMOVIE":return p.base+"app?mv="+p.movie.get_mvId();case "$_URLSCENE":return p.base+"app?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId();case "$_USERNAME":return p.ws.getUser();case "$_VERSION":return p.build.get_version();case "$_WSSERVER":return p.ws.get_url();case "$_YEAR":return oc.format(new Date,"%Y");default:return Object.prototype.hasOwnProperty.call(this._strings.h,X.substr(a,1,null))?this._strings.h[X.substr(a,
1,null)]:Object.prototype.hasOwnProperty.call(this._stringfile.h,X.substr(a,1,null))?this._stringfile.h[X.substr(a,1,null)]:a}}}}else return a},parseBool:function(a){if(a.charAt(0)=="?"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseBool(a),g.found))return g.value}if(X.substr(a,0,10)=="?_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "?_INSTANCEFONTBOLD":return p.area.instanceBoolProp(this.parseString(a[1]),"fontBold");case "?_INSTANCEFONTITALIC":return p.area.instanceBoolProp(this.parseString(a[1]),
"fontItalic");case "?_INSTANCEPLAYING":return p.area.instancePlaying(this.parseString(a[1]));case "?_INSTANCEVISIBLE":return p.area.instanceBoolProp(this.parseString(a[1]),"visible");default:return!1}else return!1;else{if(X.substr(a,0,8)=="?_TOGGLE")return a=a.split(":"),a.length==2?p.area.getToggleValue(this.parseString(a[1])):!1;if(X.substr(a,0,7)=="?_FLAGS")return a=a.split(":"),a.length==2&&(b=p.mdata.flags,c=this.parseString(a[1]),Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.flags,
c=this.parseString(a[1]),b.h[c]):!1;switch(a){case "?_HADINTERACTION":return this.hadInteraction;case "?_PLAYING":return p.area.get_playing();case "?_SERVER":return p.server;case "?_USERLOGGED":return p.ws.userLogged();default:return Object.prototype.hasOwnProperty.call(this._bools.h,X.substr(a,1,null))?this._bools.h[X.substr(a,1,null)]:X.substr(a,1,null).toLowerCase()!="true"?X.substr(a,1,null).toLowerCase()=="1":!0}}}else return a.toLowerCase()!="true"?a=="1":!0},parseFloat:function(a){if(a.charAt(0)==
"#"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseFloat(a),g.found))return g.value}if(X.substr(a,0,10)=="#_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "#_INSTANCEALPHA":return p.area.instanceProp(this.parseString(a[1]),"alpha");case "#_INSTANCECOLORALPHA":return p.area.instanceProp(this.parseString(a[1]),"colorAlpha");case "#_INSTANCEFONTLEADING":return p.area.instanceProp(this.parseString(a[1]),"fontLeading");case "#_INSTANCEFONTSIZE":return p.area.instanceProp(this.parseString(a[1]),
"fontSize");case "#_INSTANCEFONTSPACING":return p.area.instanceProp(this.parseString(a[1]),"fontSpacing");case "#_INSTANCEHEIGHT":return p.area.instanceProp(this.parseString(a[1]),"height");case "#_INSTANCEORDER":return p.area.instanceProp(this.parseString(a[1]),"order");case "#_INSTANCEPAN":return p.area.instanceProp(this.parseString(a[1]),"pan");case "#_INSTANCEROTATION":return p.area.instanceProp(this.parseString(a[1]),"rotation");case "#_INSTANCEVOLUME":return p.area.instanceProp(this.parseString(a[1]),
"volume");case "#_INSTANCEWIDTH":return p.area.instanceProp(this.parseString(a[1]),"width");case "#_INSTANCEX":return p.area.instanceProp(this.parseString(a[1]),"x");case "#_INSTANCEY":return p.area.instanceProp(this.parseString(a[1]),"y");default:return 0}else return 0;else{if(X.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==2?p.area.getNumericValue(this.parseString(a[1])):0;if(X.substr(a,0,9)=="#_NUMBERS")return a=a.split(":"),a.length==2&&(b=p.mdata.numbers,c=this.parseString(a[1]),
Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.numbers,c=this.parseString(a[1]),b.h[c]):0;switch(a){case "#_AREABIG":return p.mdata.screen.big*1;case "#_AREASMALL":return p.mdata.screen.small*1;case "#_CONTENTHEIGHT":return p.contentHeight;case "#_CONTENTWIDTH":return p.contentWidth;case "#_CONTENTX":return p.contentPosition.x;case "#_CONTENTY":return p.contentPosition.y;case "#_KEYFRAME":return p.area.get_currentKf()*1;default:return Object.prototype.hasOwnProperty.call(this._floats.h,X.substr(a,
1,null))?this._floats.h[X.substr(a,1,null)]:parseFloat(X.substr(a,1,null))}}}else return parseFloat(a)},parseInt:function(a){if(a.charAt(0)=="#"){for(var b=p.plugins.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];if(g.active&&(g=g.parseInt(a),g.found))return g.value}if(X.substr(a,0,10)=="#_INSTANCE")if(a=a.split(":"),a.length==2)switch(a[0]){case "#_INSTANCEALPHA":return Math.round(p.area.instanceProp(this.parseString(a[1]),"alpha"));case "#_INSTANCECOLORALPHA":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"colorAlpha"));case "#_INSTANCEFONTLEADING":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontLeading"));case "#_INSTANCEFONTSIZE":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontSize"));case "#_INSTANCEFONTSPACING":return Math.round(p.area.instanceProp(this.parseString(a[1]),"fontSpacing"));case "#_INSTANCEHEIGHT":return Math.round(p.area.instanceProp(this.parseString(a[1]),"height"));case "#_INSTANCEORDER":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"order"));case "#_INSTANCEPAN":return Math.round(p.area.instanceProp(this.parseString(a[1]),"pan"));case "#_INSTANCEROTATION":return Math.round(p.area.instanceProp(this.parseString(a[1]),"rotation"));case "#_INSTANCEVOLUME":return Math.round(p.area.instanceProp(this.parseString(a[1]),"volume"));case "#_INSTANCEWIDTH":return Math.round(p.area.instanceProp(this.parseString(a[1]),"width"));case "#_INSTANCEX":return Math.round(p.area.instanceProp(this.parseString(a[1]),"x"));case "#_INSTANCEY":return Math.round(p.area.instanceProp(this.parseString(a[1]),
"y"));default:return 0}else return 0;else{if(X.substr(a,0,15)=="#_INVCONSUMABLE")return a=a.split(":"),a.length==2?p.narrative.consumableAmount(this.parseString(a[1])):0;if(X.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==2?p.area.getNumericValue(this.parseString(a[1])):0;if(X.substr(a,0,9)=="#_NUMBERS")return a=a.split(":"),a.length==2&&(b=p.mdata.numbers,c=this.parseString(a[1]),Object.prototype.hasOwnProperty.call(b.h,c))?(b=p.mdata.numbers,c=this.parseString(a[1]),Math.round(b.h[c])):
0;switch(a){case "#_AREABIG":return p.mdata.screen.big;case "#_AREASMALL":return p.mdata.screen.small;case "#_CONTENTHEIGHT":return Math.round(p.contentHeight);case "#_CONTENTWIDTH":return Math.round(p.contentWidth);case "#_CONTENTX":return Math.round(p.contentPosition.x);case "#_CONTENTY":return Math.round(p.contentPosition.y);case "#_KEYFRAME":return p.area.get_currentKf();default:return Object.prototype.hasOwnProperty.call(this._ints.h,X.substr(a,1,null))?this._ints.h[X.substr(a,1,null)]:L.parseInt(X.substr(a,
1,null))}}}else return L.parseInt(a)},getValueObj:function(a){a=this.parseString(a).split(":");if(a.length==2)switch(a[0]){case "B":return{n:a[1],t:"B",v:this.parseBool("?"+a[1])};case "F":return{n:a[1],t:"F",v:this.parseFloat("#"+a[1])};case "I":return{n:a[1],t:"I",v:this.parseInt("#"+a[1])};case "S":return{n:a[1],t:"S",v:this.parseString("$"+a[1])};default:return null}else return null},onDataSave:function(a,b){a?b.map.h.e==0?this._acOk!=null&&this.run(this._acOk,!0):this._acError!=null&&this.run(this._acError,
!0):this._acError!=null&&this.run(this._acError,!0)},onDataLoad:function(a,b){if(a)if(b.map.h.e==0)if(a=mb.jsonParse(b.map.h.values),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=A.fields(a);b<c.length;){var d=c[b];++b;d=A.field(a,d);switch(A.field(d,"t")){case "B":var f=A.field(d,"v");this._bools.h[A.field(d,"n")]=f;break;case "F":f=A.field(d,"v");this._floats.h[A.field(d,"n")]=f;break;case "I":f=A.field(d,"v");this._ints.h[A.field(d,"n")]=f;break;case "S":f=A.field(d,"v"),
this._strings.h[A.field(d,"n")]=f}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0);else this._acError!=null&&this.run(this._acError,!0)},onStateLoad:function(a,b){if(a)if(b.map.h.e==0)if(a=mb.jsonParse(b.map.h.values),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=A.fields(a);b<c.length;){var d=c[b];++b;d=A.field(a,d);switch(A.field(d,"t")){case "B":var f=A.field(d,"v");this._bools.h[A.field(d,"n")]=f;break;case "F":f=A.field(d,
"v");this._floats.h[A.field(d,"n")]=f;break;case "I":f=A.field(d,"v");this._ints.h[A.field(d,"n")]=f;break;case "S":f=A.field(d,"v"),this._strings.h[A.field(d,"n")]=f}}this._acOk!=null&&this.run(this._acOk,!0)}else this._acError!=null&&this.run(this._acError,!0);else this._acError!=null&&this.run(this._acError,!0)},onDragMove:function(a){if(this.onDrag!=null){var b=this.onDrag.parent.globalToLocal(new Qa(a.stageX,a.stageY));a=Math.round(b.x-this.onDrag.lastClick.x);b=Math.round(b.y-this.onDrag.lastClick.y);
p.area.setProperty(this.onDrag.getInstName(),"x",a,a);p.area.setProperty(this.onDrag.getInstName(),"y",b,b)}},onDragMoveStop:function(a){this.onDrag=null;p.area.hasEventListener("mouseMove")&&p.area.removeEventListener("mouseMove",m(this,this.onDragMove));p.area.stage.hasEventListener("mouseUp")&&p.area.stage.removeEventListener("mouseUp",m(this,this.onDragMoveStop));this._acOk!=null&&this.run(this._acOk,!0);this._acOk=null},onDataEvent:function(a,b){var c=!1,d=[];try{for(var f=Ge.getLocal(p.movie.get_mvId()+
"_eventsheld"),g=0,h=A.fields(f.data.events);g<h.length;){var l=h[g];++g;d.push(A.field(f.data.events,l))}f.close()}catch(k){}a?b.map.h.e!=0?Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")&&(c=!0):d.length>0&&(Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")||d.shift(),d.length>0&&p.ws.send("Visitor/Event",d[0],m(this,this.onDataEvent))):Object.prototype.hasOwnProperty.call(this._lastEvent.h,"name")&&(c=!0);if(c){for(d.push(this._lastEvent);d.length>100;)d.shift();try{f=
Ge.getLocal(p.movie.get_mvId()+"_eventsheld"),f.data.events=d,f.flush(),f.close()}catch(k){}}this._lastEvent=new aa},applyPlayerShader:function(a){if(a<p.shaders.length&&p.area.parent!=null){var b=[];switch(a){case 1:b=[new pf(new wq)];break;case 2:b=[new pf(new xq)];break;case 3:b=[new pf(new yq)];break;case 4:b=[new pf(new zq)];break;case 5:b=[new pf(new Aq)]}p.area.parent.set_filters(b)}},__class__:yi};var Hh=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=
1;this.__data=ax._new(a)};r["openfl.display.Shader"]=Hh;Hh.__name__="openfl.display.Shader";Hh.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(){for(var a=0,b=this.__paramBool;a<b.length;){var c=b[a];++a;c.__useArray=!1}a=0;for(b=this.__paramFloat;a<b.length;)c=b[a],++a,c.__useArray=!1;a=0;for(b=this.__paramInt;a<b.length;)c=b[a],++a,c.__useArray=!1},__createGLShader:function(a,b){var c=this.__context.gl,d=c.createShader(b);c.shaderSource(d,a);c.compileShader(d);var f=c.getShaderInfoLog(d),g=f!=null&&Z.trim(f)!="",h=c.getShaderParameter(d,c.COMPILE_STATUS);if(g||h==0)b=(h==0?"Error":
"Info")+(b==c.VERTEX_SHADER?" compiling vertex shader":" compiling fragment shader"),b=b+("\n"+f)+("\n"+a),h==0?Mb.error(b,{fileName:"openfl/display/Shader.hx",lineNumber:336,className:"openfl.display.Shader",methodName:"__createGLShader"}):g&&Mb.debug(b,{fileName:"openfl/display/Shader.hx",lineNumber:337,className:"openfl.display.Shader",methodName:"__createGLShader"});return d},__createGLProgram:function(a,b){var c=this.__context.gl;a=this.__createGLShader(a,c.VERTEX_SHADER);var d=this.__createGLShader(b,
c.FRAGMENT_SHADER);b=c.createProgram();for(var f=0,g=this.__paramFloat;f<g.length;){var h=g[f];++f;if(h.name.indexOf("Position")>-1&&Z.startsWith(h.name,"openfl_")){c.bindAttribLocation(b,0,h.name);break}}c.attachShader(b,a);c.attachShader(b,d);c.linkProgram(b);c.getProgramParameter(b,c.LINK_STATUS)==0&&(c="Unable to initialize the shader program\n"+c.getProgramInfoLog(b),Mb.error(c,{fileName:"openfl/display/Shader.hx",lineNumber:370,className:"openfl.display.Shader",methodName:"__createGLProgram"}));
return b},__disable:function(){this.program!=null&&this.__disableGL()},__disableGL:function(){for(var a=this.__context.gl,b=0,c=0,d=this.__inputBitmapData;c<d.length;){var f=d[c];++c;f.__disableGL(this.__context,b);++b;if(b==a.MAX_TEXTURE_IMAGE_UNITS)break}c=0;for(d=this.__paramBool;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramFloat;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramInt;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);this.__context.__bindGLArrayBuffer(null);
this.__context.__context.type=="opengl"&&a.disable(a.TEXTURE_2D)},__enable:function(){this.__init();this.program!=null&&this.__enableGL()},__enableGL:function(){for(var a=0,b=this.__context.gl,c=0,d=this.__inputBitmapData;c<d.length;){var f=d[c];++c;b.uniform1i(f.index,a);++a}this.__context.__context.type=="opengl"&&a>0&&b.enable(b.TEXTURE_2D)},__init:function(){this.__data==null&&(this.__data=ax._new(null));this.__glFragmentSource==null||this.__glVertexSource==null||this.program!=null&&!this.__glSourceDirty||
this.__initGL()},__initGL:function(){if(this.__glSourceDirty||this.__paramBool==null)this.__glSourceDirty=!1,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 a=this.__context.gl,b=this.precisionHint==1?"precision mediump float;\n":
"precision lowp float;\n",c=b+this.get_glVertexSource();b+=this.get_glFragmentSource();var d=c+b;Object.prototype.hasOwnProperty.call(this.__context.__programs.h,d)?this.program=this.__context.__programs.h[d]:(this.program=this.__context.createProgram(1),this.program.__glProgram=this.__createGLProgram(c,b),this.__context.__programs.h[d]=this.program);if(this.program!=null){this.glProgram=this.program.__glProgram;c=0;for(b=this.__inputBitmapData;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,
d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramBool;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramFloat;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramInt;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,
d.name)}}},__processGLData:function(a,b){var c=0,d;for(d=b=="uniform"?new sb("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new sb("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);if(!Z.startsWith(g,"gl_")){c=b=="uniform";if(Z.startsWith(f,"sampler")){f=new Bq;f.name=g;f.__isUniform=c;this.__inputBitmapData.push(f);switch(g){case "bitmap":this.__bitmap=f;break;case "openfl_Texture":this.__texture=f}this.__data[g]=f;this.__isGenerated&&(this[g]=f)}else if(!Object.prototype.hasOwnProperty.call(this.__data,
g)||A.field(this.__data,g)==null){switch(f){case "bool":var h=0;break;case "bvec2":h=1;break;case "bvec3":h=2;break;case "bvec4":h=3;break;case "dvec2":case "vec2":h=5;break;case "dvec3":case "vec3":h=6;break;case "dvec4":case "vec4":h=7;break;case "double":case "float":h=4;break;case "mat2":case "mat2x2":h=12;break;case "mat2x3":h=13;break;case "mat2x4":h=14;break;case "mat3x2":h=15;break;case "mat3":case "mat3x3":h=16;break;case "mat3x4":h=17;break;case "mat4x2":h=18;break;case "mat4x3":h=19;break;
case "mat4":case "mat4x4":h=20;break;case "int":case "uint":h=8;break;case "ivec2":case "uvec2":h=9;break;case "ivec3":case "uvec3":h=10;break;case "ivec4":case "uvec4":h=11;break;default:h=null}switch(h){case 1:case 5:case 9:f=2;break;case 2:case 6:case 10:f=3;break;case 3:case 7:case 11:case 12:f=4;break;case 16:f=9;break;case 20:f=16;break;default:f=1}switch(h){case 12:var l=2;break;case 16:l=3;break;case 20:l=4;break;default:l=1}switch(h){case 0:case 1:case 2:case 3:var k=new Xm;k.set_name(g);
k.type=h;k.__arrayLength=l;k.__isBool=!0;k.__isUniform=c;k.__length=f;this.__paramBool.push(k);g=="openfl_HasColorTransform"&&(this.__hasColorTransform=k);this.__data[g]=k;this.__isGenerated&&(this[g]=k);break;case 8:case 9:case 10:case 11:k=new Xm;k.set_name(g);k.type=h;k.__arrayLength=l;k.__isInt=!0;k.__isUniform=c;k.__length=f;this.__paramInt.push(k);this.__data[g]=k;this.__isGenerated&&(this[g]=k);break;default:k=new Xm;k.set_name(g);k.type=h;k.__arrayLength=l;l>0&&(h=l*l,h=h!=null?new Float32Array(h):
null,k.__uniformMatrix=h);k.__isFloat=!0;k.__isUniform=c;k.__length=f;this.__paramFloat.push(k);if(Z.startsWith(g,"openfl_"))switch(g){case "openfl_Alpha":this.__alpha=k;break;case "openfl_ColorMultiplier":this.__colorMultiplier=k;break;case "openfl_ColorOffset":this.__colorOffset=k;break;case "openfl_Matrix":this.__matrix=k;break;case "openfl_Position":this.__position=k;break;case "openfl_TextureCoord":this.__textureCoord=k;break;case "openfl_TextureSize":this.__textureSize=k}this.__data[g]=k;this.__isGenerated&&
(this[g]=k)}}g=d.matchedPos();c=g.pos+g.len}}},__update:function(){this.program!=null&&this.__updateGL()},__updateFromBuffer:function(a,b){this.program!=null&&this.__updateGLFromBuffer(a,b)},__updateGL:function(){for(var a=0,b=0,c=this.__inputBitmapData;b<c.length;){var d=c[b];++b;d.__updateGL(this.__context,a);++a}b=0;for(c=this.__paramBool;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramFloat;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramInt;b<
c.length;)a=c[b],++b,a.__updateGL(this.__context)},__updateGLFromBuffer:function(a,b){for(var c=0,d,f,g,h,l,k=0,q=a.inputCount;k<q;)l=k++,d=a.inputRefs[l],f=a.inputs[l],g=a.inputFilter[l],h=a.inputMipFilter[l],l=a.inputWrap[l],f!=null&&(d.__updateGL(this.__context,c,f,g,h,l),++c);k=this.__context.gl;a.paramDataLength>0?(a.paramDataBuffer==null&&(a.paramDataBuffer=k.createBuffer()),this.__context.__bindGLArrayBuffer(a.paramDataBuffer),pd.bufferData(k,k.ARRAY_BUFFER,a.paramData,k.DYNAMIC_DRAW)):this.__context.__bindGLArrayBuffer(null);
f=d=c=0;g=a.paramBoolCount;h=a.paramFloatCount;var w=a.paramData,v=null,z=null,n=null;k=0;for(q=a.paramCount;k<q;){l=k++;var E=!1;if(l<g){var H=a.paramRefs_Bool[c];for(var J=0,Q=a.overrideBoolCount;J<Q;){var T=J++;if(H.name==a.overrideBoolNames[T]){v=a.overrideBoolValues[T];E=!0;break}}E?H.__updateGL(this.__context,v):H.__updateGLFromBuffer(this.__context,w,a.paramPositions[l],a.paramLengths[l],b);++c}else if(l<g+h){H=a.paramRefs_Float[d];J=0;for(Q=a.overrideFloatCount;J<Q;)if(T=J++,H.name==a.overrideFloatNames[T]){z=
a.overrideFloatValues[T];E=!0;break}E?H.__updateGL(this.__context,z):H.__updateGLFromBuffer(this.__context,w,a.paramPositions[l],a.paramLengths[l],b);++d}else{H=a.paramRefs_Int[f];J=0;for(Q=a.overrideIntCount;J<Q;)if(T=J++,H.name==a.overrideIntNames[T]){n=a.overrideIntValues[T];E=!0;break}E?H.__updateGL(this.__context,n):H.__updateGLFromBuffer(this.__context,w,a.paramPositions[l],a.paramLengths[l],b);++f}}},get_data:function(){(this.__glSourceDirty||this.__data==null)&&this.__init();return this.__data},
set_data:function(a){return this.__data=a},get_glFragmentSource:function(){return this.__glFragmentSource},set_glFragmentSource:function(a){a!=this.__glFragmentSource&&(this.__glSourceDirty=!0);return this.__glFragmentSource=a},get_glVertexSource:function(){return this.__glVertexSource},set_glVertexSource:function(a){a!=this.__glVertexSource&&(this.__glSourceDirty=!0);return this.__glVertexSource=a},__class__:Hh,__properties__:{set_glVertexSource:"set_glVertexSource",get_glVertexSource:"get_glVertexSource",
set_glFragmentSource:"set_glFragmentSource",get_glFragmentSource:"get_glFragmentSource",set_data:"set_data",get_data:"get_data"}};var Kf=function(a){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}");
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}");
Hh.call(this,a);this.__isGenerated=!0;this.__initGL()};r["openfl.display.GraphicsShader"]=Kf;Kf.__name__="openfl.display.GraphicsShader";Kf.__super__=Hh;Kf.prototype=I(Hh.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__:Kf});var zq=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tvec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tfloat contrast = 1.5;\r\n\t\t\tvec3 contrasted = ((color.rgb - 0.5) * contrast) + 0.5;\r\n\t\t\tgl_FragColor = vec4(contrasted, color.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\n\t\t}");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.ContrastShader"]=zq;zq.__name__="com.tilbuci.shaders.ContrastShader";zq.__super__=Kf;zq.prototype=I(Kf.prototype,{__class__:zq});var wq=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tvec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tmat3 deuteranopiaCorrection = mat3(\r\n\t\t\t\t0.625, 0.375, 0.0,\r\n\t\t\t\t0.7,   0.3,   0.0,\r\n\t\t\t\t0.0,   0.3,   0.7 \r\n\t\t\t);\r\n\t\t\tvec3 corrected = deuteranopiaCorrection * color.rgb;\r\n\t\t\tgl_FragColor = vec4(corrected, color.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\n\t\t}");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.DeuteranopiaShader"]=wq;wq.__name__="com.tilbuci.shaders.DeuteranopiaShader";wq.__super__=Kf;wq.prototype=I(Kf.prototype,{__class__:wq});var Aq=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tgl_FragColor = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tfloat sum = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;\r\n\t\t\tgl_FragColor = vec4(sum, sum, sum, gl_FragColor.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\n\t\t}");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.GrayscaleShader"]=Aq;Aq.__name__="com.tilbuci.shaders.GrayscaleShader";Aq.__super__=Kf;Aq.prototype=I(Kf.prototype,{__class__:Aq});var xq=function(){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\r\n\t\tvoid main(void) {\r\n            vec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n            mat3 protanopiaCorrection = mat3(\r\n                0.567, 0.433, 0.0,\r\n                0.558, 0.442, 0.0,\r\n                0.0,   0.242, 0.758\r\n            );\r\n            vec3 corrected = protanopiaCorrection * color.rgb;\r\n            gl_FragColor = vec4(corrected, color.a);\r\n            gl_FragColor = gl_FragColor * openfl_Alphav;\r\n        }");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.ProtanopiaShader"]=xq;xq.__name__="com.tilbuci.shaders.ProtanopiaShader";xq.__super__=Kf;xq.prototype=I(Kf.prototype,{__class__:xq});var yq=function(){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\r\n\t\tvoid main(void) {\r\n            vec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n            mat3 tritanopiaCorrection = mat3(\r\n                0.95,  0.05,  0.0,\r\n                0.0,   0.433, 0.567,\r\n                0.0,   0.475, 0.525\r\n            );\r\n            vec3 corrected = tritanopiaCorrection * color.rgb;\r\n            gl_FragColor = vec4(corrected, color.a);\r\n            gl_FragColor = gl_FragColor * openfl_Alphav;\r\n        }");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.TritanopiaShader"]=yq;yq.__name__="com.tilbuci.shaders.TritanopiaShader";yq.__super__=Kf;yq.prototype=I(Kf.prototype,{__class__:yq});var Yh=function(){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\r\n\t\tvec3 reduceSaturation(vec3 color, float factor) {\r\n\t\t\tfloat gray = dot(color, vec3(0.299, 0.587, 0.114));\r\n\t\t\treturn mix(vec3(gray), color, factor);\r\n\t\t}\r\n\t\tvoid main(void) {\r\n\t\t\tvec2 uv = openfl_TextureCoordv;\r\n\t\t\tvec4 baseColor = texture2D(bitmap, uv);\r\n\t\t\tfloat offset = 1.0 / 512.0;\r\n\t\t\tvec4 blurColor = baseColor;\r\n\t\t\tblurColor += texture2D(bitmap, uv + vec2(offset, 0.0));\r\n\t\t\tblurColor += texture2D(bitmap, uv - vec2(offset, 0.0));\r\n\t\t\tblurColor += texture2D(bitmap, uv + vec2(0.0, offset));\r\n\t\t\tblurColor += texture2D(bitmap, uv - vec2(0.0, offset));\r\n\t\t\tblurColor /= 5.0;\r\n\t\t\tvec3 desaturated = reduceSaturation(blurColor.rgb, 0.15);\r\n\t\t\tgl_FragColor = vec4(desaturated, blurColor.a);\r\n\t\t\tgl_FragColor *= openfl_Alphav;\r\n\t\t}");
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\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\n\t\t}");
Kf.call(this);this.__isGenerated=!0;this.__initGL()};r["com.tilbuci.shaders.UnfocusShader"]=Yh;Yh.__name__="com.tilbuci.shaders.UnfocusShader";Yh.__super__=Kf;Yh.prototype=I(Kf.prototype,{__class__:Yh});var Sc=function(){this.complete=0;this._nocache=!1;this._curLoad=this._curTxtLoad=-1;this._path="assets/icons/";this._plTexts=[{name:"langDefault",path:"assets/language/default.json"}];this._plAssets=["btClose","btOk","icTarget"];this._edTexts=[{name:"buildInfo",path:"assets/build.json"},{name:"license",
path:"assets/license.html"},{name:"langDefault",path:"assets/language/default.json"}];this._edAssets="buci tilBuci01 tilBuci02 tilBuci03 tilBuci04 tilBuci05 tilBuci06 tilBuci07 tilBuci08 btBack btClose btOk btMovie btScene btMovieScene btData icData icInput icSystem icReplace icSnippets icText icTimer icUser icDebug icShare icGoogle icContraption icNarrative icServer btPlus btPlugin btSetup btToggle btZoomP btZoomM btZoomFit btZoom100 btMedia btFolder iconFolder iconUpLevel iconPublished btPlay btPause btStop btLeft btRight btUp btDown btKeyframe btFullscreen btWorkspace btScreen btFocus btColors btOpenfile btCopy btPaste btNone btAll btStageLeft btStageCenter btStageRight btStageTop btStageMiddle btStageBottom btSelectionLeft btSelectionCenter btSelectionRight btSelectionTop btSelectionMiddle btSelectionBottom btDistributeH btDistributeV btBool btInteger btFloat btString btVariables btToLeft btToRight btToCenter btToTop btToDown btToMiddle btExchange btVisitors btContraptions btNarrative iconMove iconResizeH iconResizeV iconResize iconPlus iconMinus iconDown iconUp iconLock iconLandscape iconPortrait btBlocks btCode btDel btEdit btExpand btCompress btNotes btLock icTarget".split(" ");
na.call(this);var a=Oa.get_current().stage.application.__window.parameters;Object.prototype.hasOwnProperty.call(a,"mode")?Oa.get_current().stage.application.__window.parameters.mode=="editor"?(this._reaAssets=this._edAssets,this._realTexts=this._edTexts,this._nocache=!0):(this._reaAssets=this._plAssets,this._realTexts=this._plTexts):(this._reaAssets=this._edAssets,this._realTexts=this._edTexts,this._nocache=!0);a=Oa.get_current().stage.application.__window.parameters;if(Object.prototype.hasOwnProperty.call(a,
"assets")){this._path=L.string(Oa.get_current().stage.application.__window.parameters.assets)+this._path;a=0;for(var b=this._realTexts.length;a<b;){var c=a++,d=L.string(Oa.get_current().stage.application.__window.parameters.assets);this._realTexts[c].path=d+this._realTexts[c].path}}this._txtLoader=new Si;this._txtLoader.addEventListener("complete",m(this,this.onTxtOk));this._txtLoader.addEventListener("ioError",m(this,this.onTxtError));this._txtLoader.addEventListener("securityError",m(this,this.onTxtError));
this.loadNextTxt();this._bmpLoader=new Gf;this._bmpLoader.contentLoaderInfo.addEventListener("complete",m(this,this.onOk));this._bmpLoader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._bmpLoader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError));this.loadNext()};r["com.tilbuci.statictools.Assets"]=Sc;Sc.__name__="com.tilbuci.statictools.Assets";Sc.getBitmapData=function(a,b){return Object.prototype.hasOwnProperty.call(Sc.graphics.h,a)?Sc.graphics.h[a].data:
new uc(32,32,!1)};Sc.getText=function(a,b){return Object.prototype.hasOwnProperty.call(Sc.texts.h,a)?Sc.texts.h[a]:""};Sc.__super__=na;Sc.prototype=I(na.prototype,{_edAssets:null,_edTexts:null,_plAssets:null,_plTexts:null,_reaAssets:null,_realTexts:null,_path:null,_curLoad:null,_curTxtLoad:null,_bmpLoader:null,_txtLoader:null,_nocache:null,complete:null,loadNext:function(){this._curLoad++;this._curLoad<this._reaAssets.length?(this.complete=Math.round(100*this._curLoad/this._reaAssets.length),this._bmpLoader.load(new Ve(this._path+
this._reaAssets[this._curLoad]+".png"))):(this._bmpLoader.contentLoaderInfo.removeEventListener("complete",m(this,this.onOk)),this._bmpLoader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError)),this._bmpLoader.contentLoaderInfo.removeEventListener("securityError",m(this,this.onError)),this._bmpLoader.unload(),this._bmpLoader=null,this.complete=100,this.dispatchEvent(new ka("complete")))},loadNextTxt:function(){this._curTxtLoad++;if(this._curTxtLoad<this._realTexts.length){var a=
new Ve(this._realTexts[this._curTxtLoad].path);if(this._nocache){var b=Rl._new();b.rand=Math.ceil(Math.random()*1E4);a.data=b}this._txtLoader.load(a)}else this._txtLoader.removeEventListener("complete",m(this,this.onTxtOk)),this._txtLoader.removeEventListener("ioError",m(this,this.onTxtError)),this._txtLoader.removeEventListener("securityError",m(this,this.onTxtError)),this._txtLoader=null},onOk:function(a){a=Sc.graphics;var b=this._reaAssets[this._curLoad],c={data:this._bmpLoader.content.get_bitmapData().clone(),
loaded:!0};a.h[b]=c;this._bmpLoader.unload();this.dispatchEvent(new ka("change"));this.loadNext()},onError:function(a){this.loadNext()},onTxtOk:function(a){Sc.texts.h[this._realTexts[this._curTxtLoad].name]=this._txtLoader.data;this.loadNextTxt()},onTxtError:function(a){this.loadNextTxt()},__class__:Sc});var zi=function(){};r["com.tilbuci.statictools.SpriteStatic"]=zi;zi.__name__="com.tilbuci.statictools.SpriteStatic";zi.shake=function(a,b,c,d){var f=a.get_x(),g=a.get_y();ua.timer(b).onUpdate(function(){a.set_x(f+
(Math.random()*c*2-c));a.set_y(g+(Math.random()*c*2-c))}).onComplete(function(){a.set_x(f);a.set_y(g);d!=null&&p.parser.run(d,!0)})};zi.quickJump=function(a,b,c,d){var f=a.get_y();ua.tween(a,b/2,{y:f-c}).ease(Ai.easeOut).onComplete(function(){ua.tween(a,b/2,{y:f}).ease(Ai.easeIn).onComplete(function(){d!=null&&p.parser.run(d,!0)})})};zi.pulse=function(a,b,c,d,f){var g=a.get_scaleX(),h=a.get_scaleY(),l=a.get_x(),k=a.get_y(),q=a.get_x()-(a.get_width()*c-a.get_width())/2,w=a.get_y()-(a.get_height()*
c-a.get_height())/2,v=null,z=null,n=d;b/=2*d;v=function(){n>0?(--n,ua.tween(a,b,{scaleX:c,scaleY:c,x:q,y:w}).ease(Ai.easeOut).onComplete(z)):f!=null&&p.parser.run(f,!0)};z=function(){ua.tween(a,b,{scaleX:g,scaleY:h,x:l,y:k}).ease(Ai.easeIn).onComplete(v)};v()};var mb=function(){};r["com.tilbuci.statictools.StringStatic"]=mb;mb.__name__="com.tilbuci.statictools.StringStatic";mb.slashURL=function(a){return a.charAt(a.length-1)=="/"?a:a+"/"};mb.jsonParse=function(a){var b=null;try{b=(new Ym(a)).doParse()}catch(c){b=
!1}return b};mb.jsonStringify=function(a,b){return ng.print(a,null,b)};mb.jsonAsMap=function(a){var b=new aa;a=mb.jsonParse(a);if(a!=0)for(var c=0,d=A.fields(a);c<d.length;){var f=d[c];++c;var g=A.field(a,f);b.h[f]=g}return b};mb.md5=function(a){return vj.encode(a)};mb.validateEmail=function(a){return(new sb(".+@.+","i")).match(a)};mb.stringContains=function(a,b){a=a.toLowerCase();for(var c=!1,d=0,f=b.length;d<f;){var g=d++;a.indexOf(b[g].toLowerCase())!=-1&&(c=!0)}return c};mb.encryptKey=function(a,
b,c){a=Ia.ofString(a);b=Ia.ofString(b);return(new ic(b,c)).encrypt("ctr",a,"NoPadding").toHex()};mb.decryptKey=function(a,b,c){a=Ia.ofHex(a);b=Ia.ofString(b);return(new ic(b,c)).decrypt("ctr",a,"NoPadding").toString()};mb.decrypt=function(a,b){a=X.substr(a,0,a.length-10)+X.substr(a,-9,null);a=X.substr(a,2,null);try{var c=Xh.decode(a),d=c.sub(0,16),f=c.sub(16,c.length-16),g=Ia.ofString(b),h=new ic;h.init(g,d);a=h.decrypt("cbc",f,"PKCS7").toString()}catch(l){a=""}return a};mb.encrypt=function(a,b){var c=
new ic,d=Ia.ofString(b);b=Ia.ofString(X.substr(mb.random(),0,16));c.init(d,b);a=Ia.ofString(a);d=new Ia(new ArrayBuffer(b.length+a.length));d.blit(0,b,0,b.length);d.blit(b.length,a,0,a.length);c=c.encrypt("cbc",d,"PKCS7");a=Xh.encode(c);return a="TB"+X.substr(a,0,a.length-9)+"b"+X.substr(a,-9,null)};mb.rgbToHex=function(a,b,c){var d="0x";d=a<16?d+("0"+Z.hex(Math.round(a))):a>255?d+"FF":d+Z.hex(Math.round(a));d=b<16?d+("0"+Z.hex(Math.round(b))):b>255?d+"FF":d+Z.hex(Math.round(b));return d=c<16?d+("0"+
Z.hex(Math.round(c))):c>255?d+"FF":d+Z.hex(Math.round(c))};mb.colorHex=function(a,b){b==null&&(b="#FFFFFF");a==null&&(a=b);a=Z.replace(a,"#","0x");X.substr(a,0,2)!="0x"&&(a="0x"+a);a=L.parseInt(a);a=a==null?b:"#"+Z.hex(a,6);return a.toUpperCase()};mb.colorInt=function(a,b){b==null&&(b="0xFFFFFF");a=Z.replace(a,"#","0x");X.substr(a,0,2)!="0x"&&X.substr(a,0,2)!="0X"&&(a="0x"+a);a=L.parseInt(a);a==null&&(a=L.parseInt(b));return a};mb.random=function(){return mb.md5(L.string(Math.random()*1E5))};var sq=
function(a){this._buttons=[];this._statetexts=new aa;this._logintexts=new aa;this._gap=10;yd.call(this);this._uiBg=a;a=new Bg;a.set_gap(this._gap);a.setPadding(this._gap);this.set_layout(a);this.set_y(-500);this._pheader=new pj;this._pheader.set_text("");this.set_header(this._pheader);this._pfooter=new sc;a=new Gh;a.set_horizontalAlign(Vb.CENTER);a.set_gap(this._gap);a.setPadding(this._gap);this._pfooter.set_layout(a);this.set_footer(this._pfooter);this._inputBtCancel=new Qb;a=new cg(Sc.getBitmapData("btClose"));
a.smoothing=!0;a.set_width(a.set_height(3*this._gap));this._inputBtCancel.set_icon(a);this._pfooter.addChild(this._inputBtCancel);this._inputBtOk=new Qb;a=new cg(Sc.getBitmapData("btOk"));a.smoothing=!0;a.set_width(a.set_height(3*this._gap));this._inputBtOk.set_icon(a);this._pfooter.addChild(this._inputBtOk);this._inputText=new Wc;this._inputText.setPadding(this._gap);this._inputList=new Fc;this._inputList.itemToText=function(b){return b.text};this._inputNumeric=new id;this._inputLabel=new bc;this._inputLabel.set_wordWrap(!0);
this._inputArea=new df;this._inputArea.set_selectable(!1);this._inputArea.set_enabled(!1);this._inputArea.set_wordWrap(!0);this._inputCheck=new $l;this.set_visible(!1)};r["com.tilbuci.ui.PlayerInput"]=sq;sq.__name__="com.tilbuci.ui.PlayerInput";sq.__super__=yd;sq.prototype=I(yd.prototype,{_uiBg:null,_inputBtOk:null,_inputBtCancel:null,_inputVar:null,_inputType:null,_inputOkAction:null,_inputCancelAction:null,_gap:null,_pheader:null,_pfooter:null,_inputText:null,_inputList:null,_inputNumeric:null,
_inputLabel:null,_inputArea:null,_inputCheck:null,_logintexts:null,_statetexts:null,_buttons:null,kill:function(){this.removeChildren();this._pheader.removeChildren();this._pheader=null;this._pfooter.removeChildren();this._inputNumeric=this._inputList=this._inputOkAction=this._inputCancelAction=this._inputVar=this._inputType=this._inputText=this._inputBtOk=this._inputBtCancel=this._pfooter=null;for(var a=Object.keys(this._logintexts.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._logintexts;Object.prototype.hasOwnProperty.call(f.h,
d)&&delete f.h[d]}this._logintexts=null},askSecret:function(a){this._inputType="secretkey";this.set_y(-500);this._inputCancelAction=this._inputOkAction=null;this._pheader.set_text(a);this.set_width(p.area.get_width());this.set_x(0);this._inputBtOk.set_width(this.get_width()-2*this._gap);this.removeChildren();this._inputText.set_width(this._inputBtOk.get_width());this._inputText.set_text("");this.addChild(this._inputText);this._pfooter.removeChildren();this._pfooter.addChild(this._inputBtOk);this._inputBtOk.addEventListener("trigger",
m(this,this.inputBtOk));this.set_visible(!0);this._uiBg.set_visible(!0);ua.tween(this,.3,{y:50});ua.tween(this._uiBg,.3,{alpha:1}).autoVisible(!1)},askStates:function(a,b,c,d,f,g,h){this._inputType="states";this._statetexts.h.title=a;this._statetexts.h.waistates=b;this._statetexts.h.selectstate=c;this._statetexts.h.nostates=d;this._statetexts.h.dateformat=f;this.prepare("states",this._statetexts.h.title,g,h);this._inputLabel.set_text(this._statetexts.h.waistates);this._inputLabel.set_width(this.get_width()-
2*this._gap);this.addChild(this._inputLabel);this._pfooter.removeChildren();p.ws.stateList(f,m(this,this.onStateList))},askLogin:function(a,b,c,d,f,g,h,l,k,q,w,v,z,n){this._logintexts.h.logintitle=a;this._logintexts.h.logintext=b;this._logintexts.h.termsagree=c;this._logintexts.h.invalidemail=d;this._logintexts.h.emailwait=f;this._logintexts.h.noemailsent=g;this._logintexts.h.checkforcode=h;this._logintexts.h.codewait=l;this._logintexts.h.invalidcode=k;this._logintexts.h.emailsubject=q;this._logintexts.h.emailbody=
w;this._logintexts.h.emailsender=v;this._inputType="login";this.prepare("login",this._logintexts.h.logintitle,z,n);this._inputLabel.set_text(this._logintexts.h.logintext);this._inputLabel.set_width(this.get_width()-2*this._gap);this.addChild(this._inputLabel);this._inputText.set_width(this.get_width()-2*this._gap);this._inputText.set_text("");this.addChild(this._inputText);this._inputArea.set_width(this.get_width()-2*this._gap);new kd(!0,p.base+"VisitorTerms.txt","GET",null,1,m(this,this.onTerms));
this.addChild(this._inputArea);this._inputCheck.set_selected(!1);this._inputCheck.set_text(this._logintexts.h.termsagree);this._inputCheck.set_maxWidth(this.get_width()-2*this._gap);this.addChild(this._inputCheck)},askText:function(a,b,c,d){this._inputType="text";this.prepare(a,b,c,d);this._inputText.set_width(this.get_width()-2*this._gap);this._inputText.set_text(p.parser.getString(a));this.addChild(this._inputText)},setWarn:function(a,b,c,d){this._inputType="warn";this.prepare("warn",a,c,d);this._inputLabel.set_width(this.get_width()-
2*this._gap);this._inputLabel.set_text(b);this.addChild(this._inputLabel);d==null&&(this._pfooter.removeChildren(),this._inputBtOk.set_width(this.get_width()-3*this._gap-2),this._pfooter.addChild(this._inputBtOk))},askNumeric:function(a,b,c,d,f,g,h,l){l==null&&(l=100);h==null&&(h=0);g==null&&(g=0);this._inputType=a;this.prepare(b,c,d,f);a=="int"?(g==0?this._inputNumeric.set_step(1):this._inputNumeric.set_step(Math.round(g)),this._inputNumeric.set_minimum(Math.round(h)),this._inputNumeric.set_maximum(Math.round(l)),
this._inputNumeric.set_value(p.parser.getInt(b))):(g==0?this._inputNumeric.set_step(.5):this._inputNumeric.set_step(g),this._inputNumeric.set_minimum(h),this._inputNumeric.set_maximum(l),this._inputNumeric.set_value(p.parser.getFloat(b)));this._inputNumeric.set_width(this.get_width()-2*this._gap);this.addChild(this._inputNumeric)},askList:function(a,b,c,d,f){this._inputType="list";this.prepare(a,b,d,f);a=[];b=0;for(d=c.length;b<d;)f=b++,a.push({text:c[f]});this._inputList.set_dataProvider(new mg(a));
this._inputList.set_width(this.get_width()-2*this._gap);this.addChild(this._inputList)},askEmail:function(a,b,c,d,f){this._inputType="email";this.prepare(a,b,d,f);this._inputText.set_width(this.get_width()-2*this._gap);this._inputText.set_text(p.parser.getString(a));this.addChild(this._inputText);this.clearButtons();a=0;for(b=c.length;a<b;)d=a++,d=new ge(c[d],m(this,this.onEmailDomain),c[d]),d.set_width(this._inputText.get_width()),this.addChild(d),this._buttons.push(d);sd.setFocus(this._inputText)},
onEmailDomain:function(a){a=a.target;a!=null&&this._inputText.set_text(this._inputText.get_text()+a.btid)},clearButtons:function(){for(;this._buttons.length>0;)this._buttons.shift().kill()},prepare:function(a,b,c,d){p.theme!=null&&(p.theme.get_headerBackground()!=null&&this._pheader.set_backgroundSkin(new db(Ab.SolidColor(p.theme.get_headerBackground()))),p.theme.get_windowBackground()!=null&&this.set_backgroundSkin(new db(Ab.SolidColor(p.theme.get_windowBackground()))),p.theme.footerFillColor!=null&&
this._pfooter.set_backgroundSkin(new db(Ab.SolidColor(p.theme.footerFillColor))),this._pheader.set_textFormat(new fi(p.theme.get_headerFont(),p.theme.get_headerSize(),p.theme.get_headerFontColor())),this._pheader.set_embedFonts(p.theme.get_headerFont()!="_sans"),p.theme.listItemBackground!=null||p.theme.listItemFont!=null||p.theme.get_windowFontName()!="_sans"||p.theme.get_windowFontSize());this.set_y(-500);this._inputVar=a;this._inputOkAction=c;this._inputCancelAction=d;this._pheader.set_text(b);
this._uiBg.get_width()<this._uiBg.get_height()?this.set_width(3*this._uiBg.get_width()/4):this.set_width(2*this._uiBg.get_width()/3);this.set_x((this._uiBg.get_width()-this.get_width())/2);this.removeChildren();this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1));this._pfooter.removeChildren();this._pfooter.addChild(this._inputBtCancel);this._pfooter.addChild(this._inputBtOk);this._inputBtCancel.addEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.addEventListener("trigger",
m(this,this.inputBtOk));this.set_visible(!0);this._uiBg.set_visible(!0);ua.tween(this,.3,{y:50});ua.tween(this._uiBg,.3,{alpha:1}).autoVisible(!1)},inputBtOk:function(a){if(this._inputType=="secretkey"){if(a="",p.mdata.key!=""&&(a=mb.decryptKey(p.mdata.key,"skey",p.secret)),this._inputText.get_text()==a||p.mdata.key=="")p.secretKey=p.mdata.key,this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),ua.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),ua.tween(this._uiBg,.1,
{alpha:0}).autoVisible(!1)}else if(this._inputType=="login"){if(this._inputCheck.get_selected())if((new sb(".+@.+","i")).match(this._inputText.get_text())){this._inputLabel.set_text(this._logintexts.h.emailwait);this.removeChildren();this.addChild(this._inputLabel);this._inputType="waitemail";a=this._logintexts;var b=this._inputText.get_text();a.h.visitoremail=b;p.ws.loginVisitor(this._inputText.get_text(),this._logintexts.h.emailsubject,this._logintexts.h.emailbody,this._logintexts.h.emailsender,
m(this,this.onLoginSent));this._inputText.set_text("");this._pfooter.removeChildren()}else this._inputLabel.set_text(this._logintexts.h.invalidemail)}else if(this._inputType=="waitforcode")p.ws.checkVisitorCode(this._logintexts.h.visitoremail,this._inputText.get_text(),m(this,this.onCodeCheck)),this._pfooter.removeChildren(),this.removeChildren(),this._inputLabel.set_text(this._logintexts.h.codewait),this.addChild(this._inputLabel);else if(this._inputType=="states")this._inputList.get_selectedItem()!=
null&&(p.parser.run({ac:"data.loadstate",param:[this._inputList.get_selectedItem().id],success:this._inputOkAction,error:this._inputCancelAction},!0),this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel)),this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),ua.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),ua.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1));else if(this._inputType=="email")mb.validateEmail(this._inputText.get_text())&&(p.parser.setString(this._inputVar,
this._inputText.get_text()),this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel)),this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk)),this.clearButtons(),ua.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),ua.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1),p.parser.run(this._inputOkAction,!0));else{switch(this._inputType){case "float":p.parser.setFloat(this._inputVar,this._inputNumeric.get_value());break;case "int":p.parser.setInt(this._inputVar,
Math.round(this._inputNumeric.get_value()));break;case "list":this._inputList.get_selectedItem()!=null&&p.parser.setString(this._inputVar,this._inputList.get_selectedItem().text);break;case "text":p.parser.setString(this._inputVar,this._inputText.get_text())}this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk));ua.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose));ua.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1);
p.parser.run(this._inputOkAction,!0)}},onLoginSent:function(a,b){a?b.map.h.e==0?(this._inputLabel.set_text(this._logintexts.h.checkforcode),this._inputText.set_text(""),this.addChild(this._inputText),this._inputType="waitforcode",this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1)),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._pfooter.addChild(this._inputBtOk)):(this._inputLabel.set_text(this._logintexts.h.noemailsent),this._pfooter.removeChildren(),
this._pfooter.addChild(this._inputBtCancel),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2)):(this._inputLabel.set_text(this._logintexts.h.noemailsent),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2))},onCodeCheck:function(a,b){a?b.map.h.e==0?(p.ws.setUser(this._logintexts.h.visitoremail,b.map.h.key,b.map.h.groups),this._inputType="codeok",this.inputBtOk(null)):(this._inputType="waitforcode",this._inputLabel.set_text(this._logintexts.h.invalidcode),
this.addChild(this._inputText),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._pfooter.addChild(this._inputBtOk),this._inputBtOk.set_width(this._inputBtCancel.set_width((this.get_width()-3*this._gap)/2-1))):(this._inputType="waitforcode",this._inputLabel.set_text(this._logintexts.h.invalidcode),this.addChild(this._inputText),this._pfooter.removeChildren(),this._pfooter.addChild(this._inputBtCancel),this._pfooter.addChild(this._inputBtOk),this._inputBtOk.set_width(this._inputBtCancel.set_width((this.get_width()-
3*this._gap)/2-1)))},onTerms:function(a,b){a?this._inputArea.set_text(Z.replace(b.rawtext,"\r\n","\n")):this._inputArea.set_text("ERROR LOADING THE TERMS")},onStateList:function(a,b){if(a)if(b.map.h.e==0){this._inputLabel.set_text(this._statetexts.h.selectstate);a=[];for(var c=0,d=A.fields(b.map.h.states);c<d.length;){var f=d[c];++c;f=A.field(b.map.h.states,f);var g=A.field(f,"date"),h=A.field(f,"about");h!=""&&(g=g+" : "+h);a.push({text:g,id:A.field(f,"id")})}this._inputList.set_dataProvider(new mg(a));
this._inputList.set_width(this.get_width()-2*this._gap);this.addChild(this._inputList);this._inputBtCancel.set_width(this._inputBtOk.set_width((this.get_width()-3*this._gap)/2-1));this._pfooter.addChild(this._inputBtCancel);this._pfooter.addChild(this._inputBtOk)}else this._inputLabel.set_text(this._statetexts.h.nostates),this._inputBtCancel.set_width(this.get_width()-2*this._gap-2),this._pfooter.addChild(this._inputBtCancel);else this._inputLabel.set_text(this._statetexts.h.nostates),this._inputBtCancel.set_width(this.get_width()-
2*this._gap-2),this._pfooter.addChild(this._inputBtCancel)},inputBtCancel:function(a){this._inputBtCancel.removeEventListener("trigger",m(this,this.inputBtCancel));this._inputBtOk.removeEventListener("trigger",m(this,this.inputBtOk));this.clearButtons();ua.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose));ua.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1);p.parser.run(this._inputCancelAction,!0)},inputClose:function(){this._uiBg.set_visible(!1);this.set_visible(!1)},__class__:sq});var po=
function(){};r["feathers.style.ITheme"]=po;po.__name__="feathers.style.ITheme";po.__isInterface__=!0;po.prototype={getStyleProvider:null,dispose:null,__class__:po};var am=function(){this.styleProvider=new ll};r["feathers.themes.ClassVariantTheme"]=am;am.__name__="feathers.themes.ClassVariantTheme";am.__interfaces__=[po];am.prototype={styleProvider:null,getStyleProvider:function(a){var b=null,c=null;u.__implements(a,If)&&(b=a.get_styleContext(),c=a.get_variant());b==null&&(b=u.getClass(a));var d=this.styleProvider.getStyleFunction(b,
c);if(d!=null)return this.styleProvider;if(c==null)return null;d=Wb.get_fallbackTheme();if(d!=null&&d!=this&&d instanceof am&&(a=d.getStyleProvider(a),a=a instanceof ll?a:null,a!=null&&a.getStyleFunction(b,c)!=null))return null;d=this.styleProvider.getStyleFunction(b,null);return d!=null?this.styleProvider:null},dispose:function(){W.dispatch(this.styleProvider,"clear")},__class__:am};var qo=function(){};r["feathers.style.IDarkModeTheme"]=qo;qo.__name__="feathers.style.IDarkModeTheme";qo.__isInterface__=
!0;qo.__interfaces__=[po];qo.prototype={get_darkMode:null,set_darkMode:null,__class__:qo,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}};var wc=function(a,b){this._darkMode=!1;this.styleProvider=new ll;this.customThemeColor=a;this.customDarkThemeColor=b;this.refreshColors();this.refreshFonts();this.refreshPaddings();this.styleProvider=new ll;this.mediaQueryList=u.__cast(sa,Window).matchMedia("(hover: hover) and (pointer: fine)");this.mediaQueryList.addListener(m(this,this.mediaQueryList_changeHandler))};
r["feathers.themes.steel.BaseSteelTheme"]=wc;wc.__name__="feathers.themes.steel.BaseSteelTheme";wc.__interfaces__=[qo];wc.__super__=am;wc.prototype=I(am.prototype,{mediaQueryList:null,_darkMode:null,get_darkMode:function(){return this._darkMode},set_darkMode:function(a){if(this._darkMode==a)return this._darkMode;this._darkMode=a;this.refreshColors();nh.dispatch(this.styleProvider,"stylesChange");return this._darkMode},customThemeColor:null,customDarkThemeColor:null,themeColor:null,offsetThemeColor:null,
rootFillColor:null,controlFillColor1:null,controlFillColor2:null,controlDisabledFillColor:null,scrollBarThumbFillColor:null,scrollBarThumbDisabledFillColor:null,insetFillColor:null,disabledInsetFillColor:null,insetBorderColor:null,disabledInsetBorderColor:null,selectedInsetBorderColor:null,activeFillBorderColor:null,selectedBorderColor:null,focusBorderColor:null,containerFillColor:null,headerFillColor:null,overlayFillColor:null,subHeadingFillColor:null,borderColor:null,dividerColor:null,subHeadingDividerColor:null,
textColor:null,secondaryTextColor:null,disabledTextColor:null,dangerTextColor:null,dangerFillColor:null,offsetDangerFillColor:null,dangerBorderColor:null,fontName:null,fontSize:null,headerFontSize:null,detailFontSize:null,borderThickness:null,xsmallPadding:null,smallPadding:null,mediumPadding:null,largePadding:null,xlargePadding:null,dispose:function(){this.mediaQueryList!=null&&(this.mediaQueryList.removeListener(m(this,this.mediaQueryList_changeHandler)),this.mediaQueryList=null);am.prototype.dispose.call(this)},
refreshColors:function(){this._darkMode?(this.themeColor=this.customDarkThemeColor!=null?this.customDarkThemeColor:this.customThemeColor!=null?this.customThemeColor:5205919,this.offsetThemeColor=this.darken(this.themeColor,986895),this.rootFillColor=3684408,this.controlFillColor1=6250335,this.controlFillColor2=5000268,this.controlDisabledFillColor=3158064,this.scrollBarThumbFillColor=7303023,this.scrollBarThumbDisabledFillColor=4144959,this.insetFillColor=1579032,this.disabledInsetFillColor=2631720,
this.insetBorderColor=4737096,this.disabledInsetBorderColor=3684408,this.selectedInsetBorderColor=this.themeColor,this.activeFillBorderColor=this.darken(this.themeColor,3092271),this.selectedBorderColor=this.lighten(this.themeColor,986895),this.focusBorderColor=this.lighten(this.themeColor,986895),this.containerFillColor=3684408,this.headerFillColor=4144959,this.overlayFillColor=7303023,this.subHeadingFillColor=2894892,this.dangerFillColor=10440527,this.offsetDangerFillColor=this.darken(this.dangerFillColor,
986895),this.dangerBorderColor=this.darken(this.dangerFillColor,3092271),this.borderColor=526344,this.dividerColor=2631720,this.subHeadingDividerColor=789516,this.textColor=15856113,this.disabledTextColor=9408399,this.secondaryTextColor=11513775):(this.themeColor=this.customThemeColor!=null?this.customThemeColor:10535152,this.offsetThemeColor=this.darken(this.themeColor,986895),this.rootFillColor=16316664,this.controlFillColor1=16777215,this.controlFillColor2=15263976,this.controlDisabledFillColor=
15724527,this.scrollBarThumbFillColor=9408399,this.scrollBarThumbDisabledFillColor=13619151,this.insetFillColor=16579836,this.disabledInsetFillColor=15856113,this.insetBorderColor=11316396,this.disabledInsetBorderColor=13421772,this.selectedInsetBorderColor=this.darken(this.themeColor,3092271),this.activeFillBorderColor=this.darken(this.themeColor,3092271),this.selectedBorderColor=this.darken(this.themeColor,3092271),this.focusBorderColor=this.darken(this.themeColor,3092271),this.containerFillColor=
16316664,this.headerFillColor=15527148,this.overlayFillColor=9408399,this.subHeadingFillColor=14671839,this.dangerFillColor=15769760,this.offsetDangerFillColor=this.darken(this.dangerFillColor,986895),this.dangerBorderColor=this.darken(this.dangerFillColor,3092271),this.borderColor=11316396,this.dividerColor=14671839,this.subHeadingDividerColor=13619151,this.textColor=2039583,this.disabledTextColor=10461087,this.secondaryTextColor=7303023);this.dangerTextColor=13385535},refreshFonts:function(){this.fontName=
"_sans";this.refreshFontSizes()},refreshFontSizes:function(){jc.isDesktop()?(this.fontSize=13,this.headerFontSize=14,this.detailFontSize=11):(this.fontSize=14,this.headerFontSize=18,this.detailFontSize=12)},refreshPaddings:function(){jc.isDesktop()?(this.xsmallPadding=this.borderThickness=1,this.smallPadding=2,this.mediumPadding=4,this.largePadding=8,this.xlargePadding=10):(this.borderThickness=1,this.xsmallPadding=2,this.smallPadding=4,this.mediumPadding=6,this.largePadding=10,this.xlargePadding=
14)},getThemeFill:function(){return Ab.SolidColor(this.themeColor)},getControlFill:function(){return Ab.SolidColor(this.controlFillColor2)},getControlDisabledFill:function(){return Ab.SolidColor(this.controlDisabledFillColor,.7)},getButtonFill:function(){return Ab.Gradient(0,[this.controlFillColor1,this.controlFillColor2],[1,1],[0,255],Cq.fromRadians(Math.PI/2))},getButtonDownFill:function(){return Ab.Gradient(0,[this.controlFillColor2,this.controlFillColor1],[1,1],[0,255],Cq.fromRadians(Math.PI/
2))},getButtonDisabledFill:function(){return Ab.SolidColor(this.controlDisabledFillColor)},getScrollBarThumbFill:function(){return Ab.SolidColor(this.scrollBarThumbFillColor)},getScrollBarThumbDisabledFill:function(){return Ab.SolidColor(this.scrollBarThumbDisabledFillColor,.7)},getBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.borderColor)},getButtonBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.borderColor)},getButtonDisabledBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,
this.disabledInsetBorderColor)},getInsetBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.insetBorderColor)},getDisabledInsetBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.disabledInsetBorderColor)},getSelectedInsetBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.selectedInsetBorderColor)},getThemeBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.themeColor)},getSelectedBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.selectedBorderColor)},
getActiveFillBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.activeFillBorderColor)},getContainerBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.borderColor)},getDividerBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.dividerColor)},getDividerFill:function(){return Ab.SolidColor(this.dividerColor)},getSubHeadingDividerBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.subHeadingDividerColor)},getSubHeadingDividerFill:function(){return Ab.SolidColor(this.subHeadingDividerColor)},
getFocusBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.focusBorderColor)},getInsetFill:function(){return Ab.SolidColor(this.insetFillColor)},getDisabledInsetFill:function(){return Ab.SolidColor(this.disabledInsetFillColor)},getActiveThemeFill:function(){return Ab.Gradient(0,[this.themeColor,this.offsetThemeColor],[1,1],[0,255],Cq.fromRadians(Math.PI/2))},getReversedActiveThemeFill:function(){return Ab.Gradient(0,[this.offsetThemeColor,this.themeColor],[1,1],[0,255],Cq.fromRadians(Math.PI/
2))},getDangerFill:function(){return Ab.Gradient(0,[this.dangerFillColor,this.offsetDangerFillColor],[1,1],[0,255],Cq.fromRadians(Math.PI/2))},getReversedDangerFill:function(){return Ab.Gradient(0,[this.offsetDangerFillColor,this.dangerFillColor],[1,1],[0,255],Cq.fromRadians(Math.PI/2))},getDangerBorder:function(a){a==null&&(a=1);return kc.SolidColor(a,this.dangerBorderColor)},getOverlayFill:function(){return Ab.SolidColor(this.overlayFillColor,.8)},getRootFill:function(){return Ab.SolidColor(this.rootFillColor)},
getContainerFill:function(){return Ab.SolidColor(this.containerFillColor)},getSubHeadingFill:function(){return Ab.SolidColor(this.subHeadingFillColor)},getTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.fontSize,this.textColor,!1,!1,!1,null,null,a)},getDisabledTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.fontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.fontSize,
this.secondaryTextColor,!1,!1,!1,null,null,a)},getDangerTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.fontSize,this.dangerTextColor,!1,!1,!1,null,null,a)},getHeaderTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.headerFontSize,this.textColor,!1,!1,!1,null,null,a)},getDisabledHeaderTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.headerFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getDetailTextFormat:function(a){a==null&&
(a=3);return new fi(this.fontName,this.detailFontSize,this.textColor,!1,!1,!1,null,null,a)},getDisabledDetailTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.detailFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryDetailTextFormat:function(a){a==null&&(a=3);return new fi(this.fontName,this.detailFontSize,this.secondaryTextColor,!1,!1,!1,null,null,a)},getHeaderFill:function(){return Ab.SolidColor(this.headerFillColor)},lighten:function(a,b){var c=(a>>16&255)+
(b>>16&255);c>255&&(c=255);var d=(a>>8&255)+(b>>8&255);d>255&&(d=255);a=(a&255)+(b&255);a>255&&(a=255);return(c<<16)+(d<<8)+a},darken:function(a,b){var c=(a>>16&255)-(b>>16&255);c<0&&(c=0);var d=(a>>8&255)-(b>>8&255);d<0&&(d=0);a=(a&255)-(b&255);a<0&&(a=0);return(c<<16)+(d<<8)+a},mediaQueryList_changeHandler:function(a){this.refreshFontSizes();this.refreshPaddings();nh.dispatch(this.styleProvider,"stylesChange")},__class__:wc,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}});
var bm=function(a,b){wc.call(this,a,b);Ot.initialize(this);Pt.initialize(this);Dq.initialize(this);Ht.initialize(this);Qt.initialize(this);Rt.initialize(this);St.initialize(this);Ak.initialize(this);Tt.initialize(this);Ih.initialize(this);Ut.initialize(this);Vt.initialize(this);Wt.initialize(this);Xt.initialize(this);Yt.initialize(this);Zt.initialize(this);$t.initialize(this);au.initialize(this);It.initialize(this);bu.initialize(this);Bk.initialize(this);cu.initialize(this);du.initialize(this);eu.initialize(this);
fu.initialize(this);gu.initialize(this);hu.initialize(this);iu.initialize(this);ju.initialize(this);Lt.initialize(this);Zm.initialize(this);ku.initialize(this);lu.initialize(this);mu.initialize(this);Kt.initialize(this);nu.initialize(this);ou.initialize(this);pu.initialize(this);qu.initialize(this);ru.initialize(this);su.initialize(this);tu.initialize(this);uu.initialize(this);vu.initialize(this);wu.initialize(this);xu.initialize(this);yu.initialize(this);zu.initialize(this);Jt.initialize(this);Au.initialize(this)};
r["feathers.themes.steel.SteelTheme"]=bm;bm.__name__="feathers.themes.steel.SteelTheme";bm.__super__=wc;bm.prototype=I(wc.prototype,{__class__:bm});var pq=function(a){bm.call(this);this.set_darkMode(!0);a=mb.jsonParse(a);if(a!=0)for(var b=0,c=A.fields(a);b<c.length;){var d=c[b];++b;switch(d){case "activeFillBorderColor":this.setColor(d,a);break;case "borderColor":this.setColor(d,a);break;case "containerFillColor":this.setColor(d,a);break;case "controlDisabledFillColor":this.setColor(d,a);break;case "controlFillColor1":this.setColor(d,
a);break;case "controlFillColor2":this.setColor(d,a);break;case "dangerBorderColor":this.setColor(d,a);break;case "dangerFillColor":this.setColor(d,a);break;case "dangerTextColor":this.setColor(d,a);break;case "disabledInsetBorderColor":this.setColor(d,a);break;case "disabledInsetFillColor":this.setColor(d,a);break;case "disabledTextColor":this.setColor(d,a);break;case "dividerColor":this.setColor(d,a);break;case "focusBorderColor":this.setColor(d,a);break;case "fontName":this.fontName=A.field(a,
d);break;case "fontSize":this.setColor(d,a);break;case "footerFillColor":this.setColor(d,a);break;case "headerFillColor":this.setColor(d,a);break;case "headerFontName":this.headerFontName=L.string(A.field(a,d));break;case "headerFontSize":this.setColor(d,a);break;case "headerTextColor":this.setColor(d,a);break;case "insetBorderColor":this.setColor(d,a);break;case "insetFillColor":this.setColor(d,a);break;case "offsetDangerFillColor":this.setColor(d,a);break;case "offsetThemeColor":this.setColor(d,
a);break;case "overlayFillColor":this.setColor(d,a);break;case "rootFillColor":this.setColor(d,a);break;case "scrollBarThumbDisabledFillColor":this.setColor(d,a);break;case "scrollBarThumbFillColor":this.setColor(d,a);break;case "secondaryTextColor":this.setColor(d,a);break;case "selectedBorderColor":this.setColor(d,a);break;case "selectedInsetBorderColor":this.setColor(d,a);break;case "subHeadingDividerColor":this.setColor(d,a);break;case "subHeadingFillColor":this.setColor(d,a);break;case "textColor":this.setColor(d,
a);break;case "themeColor":this.setColor(d,a)}}};r["com.tilbuci.ui.PlayerTheme"]=pq;pq.__name__="com.tilbuci.ui.PlayerTheme";pq.__super__=bm;pq.prototype=I(bm.prototype,{headerFontName:null,headerTextColor:null,footerFillColor:null,listBackground:null,listItemBackground:null,listItemFont:null,headerBackground:null,get_headerBackground:function(){return this.headerFillColor},headerSize:null,get_headerSize:function(){return this.headerFontSize},headerFont:null,get_headerFont:function(){return this.headerFontName==
null?"_sans":this.headerFontName},headerFontColor:null,get_headerFontColor:function(){return this.headerTextColor==null?16777215:this.headerTextColor},windowBackground:null,get_windowBackground:function(){return this.rootFillColor},windowFontName:null,get_windowFontName:function(){return this.fontName},windowFontSize:null,get_windowFontSize:function(){return this.fontSize},setColor:function(a,b){b=L.parseInt(A.field(b,a));b!=null&&(this[a]=b)},__class__:pq,__properties__:I(bm.prototype.__properties__,
{get_windowFontSize:"get_windowFontSize",get_windowFontName:"get_windowFontName",get_windowBackground:"get_windowBackground",get_headerFontColor:"get_headerFontColor",get_headerFont:"get_headerFont",get_headerSize:"get_headerSize",get_headerBackground:"get_headerBackground"})});var Td=function(){};r["feathers.core.IStateObserver"]=Td;Td.__name__="feathers.core.IStateObserver";Td.__isInterface__=!0;Td.prototype={get_stateContext:null,set_stateContext:null,__class__:Td,__properties__:{set_stateContext:"set_stateContext",
get_stateContext:"get_stateContext"}};var wb=function(){};r["feathers.skins.IProgrammaticSkin"]=wb;wb.__name__="feathers.skins.IProgrammaticSkin";wb.__isInterface__=!0;wb.__interfaces__=[Kb];wb.prototype={get_uiContext:null,set_uiContext:null,__class__:wb,__properties__:{set_uiContext:"set_uiContext",get_uiContext:"get_uiContext"}};var oh=function(){Hf.call(this);this.mouseChildren=!1;this.set_tabEnabled(!1);this.set_tabChildren(!1)};r["feathers.skins.ProgrammaticSkin"]=oh;oh.__name__="feathers.skins.ProgrammaticSkin";
oh.__interfaces__=[Td,wb];oh.__super__=Hf;oh.prototype=I(Hf.prototype,{_uiContext:null,get_uiContext:function(){return this._uiContext},set_uiContext:function(a){if(this._uiContext==a)return this._uiContext;this._uiContext!=null&&(this._uiContext.removeEventListener("stateChange",m(this,this.uiContext_stateChangeHandler)),u.__implements(this._uiContext,md)&&this._uiContext.removeEventListener("change",m(this,this.uiContextToggle_changeHandler)),this.onRemoveUIContext());this._uiContext=a;this._uiContext!=
null&&(this._uiContext.addEventListener("stateChange",m(this,this.uiContext_stateChangeHandler),!1,0,!0),u.__implements(this._uiContext,md)&&this._uiContext.addEventListener("change",m(this,this.uiContextToggle_changeHandler)),this.onAddUIContext());this.setInvalid(x.DATA);return this._uiContext},_stateContext:null,get_stateContext:function(){return this._stateContext},set_stateContext:function(a){if(this._stateContext==a)return this._stateContext;this._stateContext!=null&&this._stateContext.removeEventListener("stateChange",
m(this,this.stateContext_stateChangeHandler));this._stateContext=a;this._stateContext!=null&&this._stateContext.addEventListener("stateChange",m(this,this.stateContext_stateChangeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._stateContext},onAddUIContext:function(){},onRemoveUIContext:function(){},update:function(){},needsStateUpdate:function(){return!0},checkForStateChange:function(){this.needsStateUpdate()&&this.setInvalid(x.STATE)},uiContext_stateChangeHandler:function(a){this.checkForStateChange()},
uiContextToggle_changeHandler:function(a){this.checkForStateChange()},stateContext_stateChangeHandler:function(a){this.checkForStateChange()},stateContextToggle_changeHandler:function(a){this.checkForStateChange()},__class__:oh,__properties__:I(Hf.prototype.__properties__,{set_stateContext:"set_stateContext",get_stateContext:"get_stateContext",set_uiContext:"set_uiContext",get_uiContext:"get_uiContext"})});var qe=function(a,b){this._previousBorder=this._previousFill=null;oh.call(this);this.set_fill(a);
this.set_border(b)};r["feathers.skins.BaseGraphicsPathSkin"]=qe;qe.__name__="feathers.skins.BaseGraphicsPathSkin";qe.__super__=oh;qe.prototype=I(oh.prototype,{_previousBorder:null,_previousFill:null,_stateToFill:null,_fill:null,get_fill:function(){return this._fill},set_fill:function(a){if(this._fill==a)return this._fill;this._previousFill==this._fill&&(this._previousFill=null);this._fill=a;this.setInvalid(x.STYLES);return this._fill},_disabledFill:null,get_disabledFill:function(){return this._disabledFill},
set_disabledFill:function(a){if(this._disabledFill==a)return this._disabledFill;this._previousFill==this._disabledFill&&(this._previousFill=null);this._disabledFill=a;this.setInvalid(x.STYLES);return this._disabledFill},_selectedFill:null,get_selectedFill:function(){return this._selectedFill},set_selectedFill:function(a){if(this._selectedFill==a)return this._selectedFill;this._previousFill==this._selectedFill&&(this._previousFill=null);this._selectedFill=a;this.setInvalid(x.STYLES);return this._selectedFill},
_stateToBorder:null,_border:null,get_border:function(){return this._border},set_border:function(a){if(this._border==a)return this._border;this._previousBorder==this._border&&(this._previousBorder=null);this._border=a;this.setInvalid(x.STYLES);return this._border},_disabledBorder:null,get_disabledBorder:function(){return this._disabledBorder},set_disabledBorder:function(a){if(this._disabledBorder==a)return this._disabledBorder;this._previousBorder==this._disabledBorder&&(this._previousBorder=null);
this._disabledBorder=a;this.setInvalid(x.STYLES);return this._disabledBorder},_selectedBorder:null,get_selectedBorder:function(){return this._selectedBorder},set_selectedBorder:function(a){if(this._selectedBorder==a)return this._selectedBorder;this._previousBorder==this._selectedBorder&&(this._previousBorder=null);this._selectedBorder=a;this.setInvalid(x.STYLES);return this._selectedBorder},getFillForState:function(a){return this._stateToFill==null?null:this._stateToFill.get(a)},setFillForState:function(a,
b){this._stateToFill==null&&(this._stateToFill=new Ye);var c=this._stateToFill.get(a);c!=b&&(this._previousFill==c&&(this._previousFill=null),this._stateToFill.set(a,b),this.setInvalid(x.STYLES))},getBorderForState:function(a){return this._stateToBorder==null?null:this._stateToBorder.get(a)},setBorderForState:function(a,b){this._stateToBorder==null&&(this._stateToBorder=new Ye);var c=this._stateToBorder.get(a);c!=b&&(this._previousBorder==c&&(this._previousBorder=null),this._stateToBorder.set(a,b),
this.setInvalid(x.STYLES))},update:function(){this._previousBorder=this.getCurrentBorder();this._previousFill=this.getCurrentFill();this.get_graphics().clear();this.draw()},draw:function(){this.applyLineStyle(this.getCurrentBorder());var a=this.getCurrentFill();this.applyFillStyle(a);this.drawPath();a!=null&&a!=Ab.None&&this.get_graphics().endFill()},drawPath:function(){},applyLineStyle:function(a){if(a!=null)switch(a._hx_index){case 0:var b=a.thickness,c=a.color,d=a.alpha,f=a.pixelHinting,g=a.scaleMode,
h=a.caps,l=a.joints;a=a.miterLimit;c==null&&(c=0);d==null&&(d=1);f==null&&(f=!1);g==null&&(g=2);a==null&&(a=3);this.get_graphics().lineStyle(b,c,d,f,g,h,l,a);break;case 1:b=a.thickness;d=a.bitmapData;c=a.matrix;f=a.repeat;a=a.smooth;f==null&&(f=!0);a==null&&(a=!1);this.get_graphics().lineStyle(b);this.get_graphics().lineBitmapStyle(d,c,f,a);break;case 2:b=a.thickness;d=a.type;f=a.colors;g=a.alphas;h=a.ratios;l=a.spreadMethod;var k=a.interpolationMethod,q=a.focalPointRatio;a=a.matrix;a==null&&(a=m(this,
this.getDefaultGradientMatrix));l==null&&(l=0);k==null&&(k=1);q==null&&(q=0);c=a(this.getDefaultGradientMatrixWidth(),this.getDefaultGradientMatrixHeight(),this.getDefaultGradientMatrixRadians(),this.getDefaultGradientMatrixTx(),this.getDefaultGradientMatrixTy());this.get_graphics().lineStyle(b);this.get_graphics().lineGradientStyle(d,f,g,h,c,l,k,q);break;case 3:this.get_graphics().lineStyle(NaN,0,0)}},applyFillStyle:function(a){if(a!=null)switch(a._hx_index){case 0:var b=a.color;a=a.alpha;a==null&&
(a=1);this.get_graphics().beginFill(b,a);break;case 1:var c=a.bitmapData;b=a.matrix;var d=a.repeat;a=a.smoothing;d==null&&(d=!0);a==null&&(a=!1);this.get_graphics().beginBitmapFill(c,b,d,a);break;case 2:c=a.type;d=a.colors;var f=a.alphas,g=a.ratios,h=a.spreadMethod,l=a.interpolationMethod,k=a.focalPointRatio;a=a.matrix;a==null&&(a=m(this,this.getDefaultGradientMatrix));h==null&&(h=0);l==null&&(l=1);k==null&&(k=0);b=a(this.getDefaultGradientMatrixWidth(),this.getDefaultGradientMatrixHeight(),this.getDefaultGradientMatrixRadians(),
this.getDefaultGradientMatrixTx(),this.getDefaultGradientMatrixTy());this.get_graphics().beginGradientFill(c,d,f,g,b,h,l,k)}},getLineThickness:function(a){if(a==null)return 0;switch(a._hx_index){case 0:return a=a.thickness;case 2:return a=a.thickness;default:return 0}},getDefaultGradientMatrix:function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=0);var g=new S;g.createGradientBox(a,b,c,d,f);return g},getDefaultGradientMatrixWidth:function(){return this.actualWidth},getDefaultGradientMatrixHeight:function(){return this.actualHeight},
getDefaultGradientMatrixRadians:function(){return 0},getDefaultGradientMatrixTx:function(){return 0},getDefaultGradientMatrixTy:function(){return 0},getCurrentBorder:function(){return this._previousBorder!=null?this._previousBorder:this.getCurrentBorderWithoutCache()},getCurrentBorderWithoutCache:function(){var a=this._stateContext;a==null&&u.__implements(this._uiContext,mh)&&(a=this._uiContext);return this._stateToBorder!=null&&a!=null&&(a=this._stateToBorder.get(a.get_currentState()),a!=null)?a:
this._uiContext==null?this._border:this._disabledBorder==null||this._uiContext.get_enabled()?this._selectedBorder!=null&&u.__implements(this._uiContext,md)&&this._uiContext.get_selected()?this._selectedBorder:this._border:this._disabledBorder},getCurrentFill:function(){return this._previousFill!=null?this._previousFill:this.getCurrentFillWithoutCache()},getCurrentFillWithoutCache:function(){var a=this._stateContext;a==null&&u.__implements(this._uiContext,mh)&&(a=this._uiContext);return this._stateToFill!=
null&&a!=null&&(a=this._stateToFill.get(a.get_currentState()),a!=null)?a:this._uiContext==null?this._fill:this._disabledFill==null||this._uiContext.get_enabled()?this._selectedFill!=null&&u.__implements(this._uiContext,md)&&this._uiContext.get_selected()?this._selectedFill:this._fill:this._disabledFill},needsStateUpdate:function(){var a=!1;this._previousBorder!=this.getCurrentBorderWithoutCache()&&(this._previousBorder=null,a=!0);this._previousFill!=this.getCurrentFillWithoutCache()&&(this._previousFill=
null,a=!0);return a},__class__:qe,__properties__:I(oh.prototype.__properties__,{set_selectedBorder:"set_selectedBorder",get_selectedBorder:"get_selectedBorder",set_disabledBorder:"set_disabledBorder",get_disabledBorder:"get_disabledBorder",set_border:"set_border",get_border:"get_border",set_selectedFill:"set_selectedFill",get_selectedFill:"get_selectedFill",set_disabledFill:"set_disabledFill",get_disabledFill:"get_disabledFill",set_fill:"set_fill",get_fill:"get_fill"})});var db=function(a,b){this._cornerRadius=
0;qe.call(this,a,b)};r["feathers.skins.RectangleSkin"]=db;db.__name__="feathers.skins.RectangleSkin";db.__super__=qe;db.prototype=I(qe.prototype,{_cornerRadius:null,get_cornerRadius:function(){return this._cornerRadius},set_cornerRadius:function(a){if(this._cornerRadius==a)return this._cornerRadius;this._cornerRadius=a;this.setInvalid(x.STYLES);return this._cornerRadius},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a);a=b/2;var c=Math.max(0,this.actualWidth-b);b=Math.max(0,
this.actualHeight-b);if(this._cornerRadius==0)this.get_graphics().drawRect(a,a,c,b);else{var d=this._cornerRadius*2;d=Math.min(d,Math.min(this.actualWidth,this.actualHeight));this.get_graphics().drawRoundRect(a,a,c,b,d)}},__class__:db,__properties__:I(qe.prototype.__properties__,{set_cornerRadius:"set_cornerRadius",get_cornerRadius:"get_cornerRadius"})});var Qj=function(a){a==null&&(a=6710886);db.call(this);this.set_fill(Ab.SolidColor(a))};r["com.tilbuci.ui.base.BackgroundSkin"]=Qj;Qj.__name__="com.tilbuci.ui.base.BackgroundSkin";
Qj.__super__=db;Qj.prototype=I(db.prototype,{__class__:Qj});var hl=function(a,b,c,d,f,g,h,l){l==null&&(l="");h==null&&(h="warn");yd.call(this);var k=new Bg;k.setPadding(10);k.set_gap(20);k.set_verticalAlign(fc.TOP);k.set_horizontalAlign(Vb.LEFT);this.set_backgroundSkin(new Qj(3684408));this.set_layout(k);this.set_width(c);this.set_height(d);d=new pj;d.set_text(a);this.set_header(d);a=new bc;a.set_text(b);a.set_wordWrap(!0);a.set_width(c-30);this.addChild(a);this._btOk=new Qb;this._btOk.set_text(f);
this._btOk.addEventListener("trigger",m(this,this.onBtOk));this._btOk.set_width(a.get_width());this.addChild(this._btOk);this._ac=g;this._btCancel=new Qb;this._btCancel.set_text(l);this._btCancel.addEventListener("trigger",m(this,this.onBtCancel));this._btCancel.set_width(a.get_width());h=="confirm"&&this.addChild(this._btCancel)};r["com.tilbuci.ui.base.ConfirmWindow"]=hl;hl.__name__="com.tilbuci.ui.base.ConfirmWindow";hl.__super__=yd;hl.prototype=I(yd.prototype,{_btOk:null,_btCancel:null,_ac:null,
onBtOk:function(a){this._btOk.removeEventListener("trigger",m(this,this.onBtOk));this._btCancel.removeEventListener("trigger",m(this,this.onBtCancel));this._btCancel=this._btOk=null;this.removeChildren();Ub.removePopUp(this);this._ac!=null&&this._ac(!0);this._ac=null},onBtCancel:function(a){this._btOk.removeEventListener("trigger",m(this,this.onBtOk));this._btCancel.removeEventListener("trigger",m(this,this.onBtCancel));this._btCancel=this._btOk=null;this.removeChildren();Ub.removePopUp(this);this._ac!=
null&&this._ac(!1);this._ac=null},__class__:hl});var Pe=function(){this.layout=this._xmlContent=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__resizeDraggingSkin=null;this._layoutResult=new Cg;this._layoutMeasurements=new Ib;this._ignoreChildChanges=!1;this._displayListBypassEnabled=!0;this._layoutItems=[];this.dividers=[];this.items=[];this.liveDragging=!0;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._autoSizeMode=Fe.CONTENT;this._resizingDividerIndex=-1;this._resizingTouchPointIsMouse=
!1;this._resizingTouchPointID=null;wa.call(this);this.addEventListener("addedToStage",m(this,this.baseDividedBox_addedToStageHandler))};r["feathers.controls.supportClasses.BaseDividedBox"]=Pe;Pe.__name__="feathers.controls.supportClasses.BaseDividedBox";Pe.__super__=wa;Pe.prototype=I(wa.prototype,{resizeCursor:null,_oldDividerMouseCursor:null,_resizingTouchPointID:null,_resizingTouchPointIsMouse:null,_resizingDividerIndex:null,_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},
set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Fe.STAGE?(this.stage.addEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler))));
return this._autoSizeMode},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentResizeDraggingSkin:null,liveDragging:null,_dividerFactory:null,get_dividerFactory:function(){return this._dividerFactory},set_dividerFactory:function(a){if(this._dividerFactory==a)return this._dividerFactory;if(this.items.length>1)for(var b=1,c=this.items.length;b<c;){var d=b++,f=d*2,g=f+(this._currentBackgroundSkin!=null?1:0);d=this.removeRawChildAt(g-1);this.destroyDivider(u.__cast(d,Da),this._dividerFactory)}this._dividerFactory=
a;if(this.items.length>1)for(b=1,c=this.items.length;b<c;)d=b++,f=d*2,g=f+(this._currentBackgroundSkin!=null?1:0),a=this.createDivider(),this.addRawChildAt(a,g-1),this.dividers[d-1]=a,this._layoutItems[f-1]=a;this.setInvalid(x.LAYOUT);return this._dividerFactory},items:null,dividers:null,_layoutItems:null,_displayListBypassEnabled:null,_ignoreChildChanges:null,_layoutMeasurements:null,_layoutResult:null,layout:null,_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==
a)return this._xmlContent;if(this._xmlContent!=null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=null)for(b=0,c=this._xmlContent;b<c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},get_numRawChildren:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;var b=this.get_numChildren();this._displayListBypassEnabled=a;return b},get_numChildren:function(){return this._displayListBypassEnabled?
this.items.length:wa.prototype.get_numChildren.call(this)},addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.items.length):wa.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return wa.prototype.addChildAt.call(this,a,b);var c=this.items.indexOf(a);if(c==b)return a;c>=0&&this.removeItem(a);b=this.addItemAt(a,b);a.addEventListener("resize",m(this,this.baseDividedBox_child_resizeHandler));a.addEventListener("layoutDataChange",
m(this,this.baseDividedBox_child_layoutDataChangeHandler));this.setInvalid(x.LAYOUT);return b},removeChild:function(a){if(!this._displayListBypassEnabled)return wa.prototype.removeChild.call(this,a);if(a==null||a.parent!=this)return a;var b=this.removeItem(a);a.removeEventListener("resize",m(this,this.baseDividedBox_child_resizeHandler));a.removeEventListener("layoutDataChange",m(this,this.baseDividedBox_child_layoutDataChangeHandler));this.setInvalid(x.LAYOUT);return b},removeChildAt:function(a){return this._displayListBypassEnabled?
this.removeChild(this.items[a]):wa.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.items[a]:wa.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this._displayListBypassEnabled?this.items.indexOf(a):wa.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?(X.remove(this.items,a),this.items.splice(b,0,a)):wa.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return wa.prototype.getChildByName.call(this,
a);for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(this._displayListBypassEnabled){if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new oe("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}}else wa.prototype.removeChildren.call(this,a,b)},addRawChild:function(a){var b=this._displayListBypassEnabled;
this._displayListBypassEnabled=!1;a=this.addChild(a);this._displayListBypassEnabled=b;return a},addRawChildAt:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.addChildAt(a,b);this._displayListBypassEnabled=c;return a},removeRawChild:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.removeChild(a);this._displayListBypassEnabled=b;return a},removeRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=
!1;a=this.removeChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildByName:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildByName(a);this._displayListBypassEnabled=b;return a},getRawChildAt:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=this.getChildAt(a);this._displayListBypassEnabled=b;return a},getRawChildIndex:function(a){var b=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;a=
this.getChildIndex(a);this._displayListBypassEnabled=b;return a},setRawChildIndex:function(a,b){var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.setChildIndex(a,b);this._displayListBypassEnabled=c},removeRawChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);var c=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;this.removeChildren(a,b);this._displayListBypassEnabled=c},addItemAt:function(a,b){this.items.splice(b,0,a);var c=b*2,d=c+(this._currentBackgroundSkin!=
null?1:0);if(b!=0){var f=this.createDivider();wa.prototype.addChildAt.call(this,f,d-1);this.dividers.splice(b-1,0,f);this._layoutItems.splice(c-1,0,f)}this._layoutItems.splice(c,0,a);return wa.prototype.addChildAt.call(this,a,d)},removeItem:function(a){X.remove(this.items,a);var b=this.getRawChildIndex(a);if(b!=0){var c=wa.prototype.getChildAt.call(this,b-1);this.dividers.splice(b-1,1);X.remove(this._layoutItems,c);this.destroyDivider(u.__cast(c,Da),this._dividerFactory)}X.remove(this._layoutItems,
a);return wa.prototype.removeChild.call(this,a)},update:function(){var a=this.isInvalid(x.STATE),b=this.isInvalid(x.STYLES);(b||a)&&this.refreshBackgroundSkin();(b||a)&&this.refreshResizeDraggingSkin();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.refreshBackgroundLayout();this.validateChildren()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),
this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),
this.addRawChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeRawChild(a))},refreshResizeDraggingSkin:function(){var a=this._currentResizeDraggingSkin;this._currentResizeDraggingSkin=this.getCurrentResizeDraggingSkin();this._currentResizeDraggingSkin!=a&&(this.removeCurrentResizeDraggingSkin(a),this._currentResizeDraggingSkin!=null&&(u.__implements(this._currentResizeDraggingSkin,
jb)&&this._currentResizeDraggingSkin.initializeNow(),u.__implements(this._currentResizeDraggingSkin,wb)&&this._currentResizeDraggingSkin.set_uiContext(this),this._currentResizeDraggingSkin.set_visible(!1),this._currentResizeDraggingSkin instanceof Da&&(this._currentResizeDraggingSkin.mouseEnabled=!1),this._currentResizeDraggingSkin instanceof lb&&(this._currentResizeDraggingSkin.mouseChildren=!1),this.addRawChild(this._currentResizeDraggingSkin)))},getCurrentResizeDraggingSkin:function(){return this.get_resizeDraggingSkin()},
removeCurrentResizeDraggingSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeRawChild(a))},createDivider:function(){var a=(this._dividerFactory!=null?this._dividerFactory:Pe.defaultDividerFactory).create();a.addEventListener("rollOver",m(this,this.baseDividedBox_divider_rollOverHandler));a.addEventListener("rollOut",m(this,this.baseDividedBox_divider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.baseDividedBox_divider_mouseDownHandler));
a.addEventListener("touchBegin",m(this,this.baseDividedBox_divider_touchBeginHandler));return a},destroyDivider:function(a,b){a.removeEventListener("rollOver",m(this,this.baseDividedBox_divider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.baseDividedBox_divider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.baseDividedBox_divider_mouseDownHandler));a.removeEventListener("touchBegin",m(this,this.baseDividedBox_divider_touchBeginHandler));b!=null&&b.destroy!=null&&b.destroy(a)},
refreshViewPortBounds:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;this._currentBackgroundSkin!=null&&(Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Fe.CONTENT||
this.stage==null,l=0,k=0;if(!h){k=this.globalToLocal(new Qa);var q=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight));l=q.x-k.x;k=q.y-k.y}this._layoutMeasurements.width=a&&!h?l:this.get_explicitWidth();this._layoutMeasurements.height=b&&!h?k:this.get_explicitHeight();a=this.get_explicitMinWidth();c&&(a=0);c=this.get_explicitMinHeight();d&&(c=0);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);this._backgroundSkinMeasurements!=null&&(this._backgroundSkinMeasurements.width!=
null?this._backgroundSkinMeasurements.width>a&&(a=this._backgroundSkinMeasurements.width):this._backgroundSkinMeasurements.minWidth!=null&&this._backgroundSkinMeasurements.minWidth>a&&(a=this._backgroundSkinMeasurements.minWidth),this._backgroundSkinMeasurements.height!=null?this._backgroundSkinMeasurements.height>c&&(c=this._backgroundSkinMeasurements.height):this._backgroundSkinMeasurements.minHeight!=null&&this._backgroundSkinMeasurements.minHeight>c&&(c=this._backgroundSkinMeasurements.minHeight));
this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=f},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();for(var b=!0,c=0;c<this._layoutItems.length;){var d=this.items[c],f=null;c>0&&(f=this.dividers[c-1]);u.__implements(d,dc)&&!d.get_includeInLayout()?(c==0&&(b=!1),f!=null&&f.set_visible(!1)):f!=null&&f.set_visible(c>2||b);c+=2}this.layout.layout(this._layoutItems,
this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},refreshBackgroundLayout:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=
this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;u.__implements(c,oa)&&c.validateNow()}},prepareResize:function(a,b,c){a=u.getClass(this);throw new ne("Missing override for 'prepareResize' in type "+a.__name__);},commitResize:function(a,b,c,d){a=u.getClass(this);throw new ne("Missing override for 'commitResize' in type "+
a.__name__);},resizeTouchBegin:function(a,b,c,d,f){if(this._enabled&&this._resizingDividerIndex==-1&&this.stage!=null){var g=Ad.forStage(this.stage);if(b?g.claimMouse(c):g.claimTouch(a,c))this._resizingTouchPointID=a,this._resizingTouchPointIsMouse=b,this._resizingDividerIndex=this.dividers.indexOf(c),this.prepareResize(this._resizingDividerIndex,d,f),this.liveDragging||this._currentResizeDraggingSkin==null||this._currentResizeDraggingSkin.set_visible(!0),b?(this.stage.addEventListener("mouseMove",
m(this,this.baseDividedBox_divider_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.baseDividedBox_divider_stage_mouseUpHandler),!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.baseDividedBox_divider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.baseDividedBox_divider_stage_touchEndHandler),!1,0,!0))}},resizeTouchMove:function(a,b,c,d){this._resizingTouchPointID!=null&&this._resizingTouchPointID==a&&this._resizingTouchPointIsMouse==
b&&this.commitResize(this._resizingDividerIndex,c,d,!0)},resizeTouchEnd:function(a,b,c,d){this._resizingTouchPointID!=null&&this._resizingTouchPointID==a&&this._resizingTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.baseDividedBox_divider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.baseDividedBox_divider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.baseDividedBox_divider_stage_touchMoveHandler)),
this.stage.removeEventListener("touchEnd",m(this,this.baseDividedBox_divider_stage_touchEndHandler))),this.liveDragging||this.commitResize(this._resizingDividerIndex,c,d,!1),this._currentResizeDraggingSkin!=null&&this._currentResizeDraggingSkin.set_visible(!1),this._resizingTouchPointID=null,this._resizingTouchPointIsMouse=!1,this._resizingDividerIndex=-1,this._oldDividerMouseCursor!=null&&(Id.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null))},baseDividedBox_child_resizeHandler:function(a){this._ignoreChildChanges||
this.setInvalid(x.LAYOUT)},baseDividedBox_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||this.setInvalid(x.LAYOUT)},baseDividedBox_addedToStageHandler:function(a){this._autoSizeMode==Fe.STAGE&&(this.setInvalid(x.SIZE),this.stage.addEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseDividedBox_removedFromStageHandler)))},baseDividedBox_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",
m(this,this.baseDividedBox_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.baseDividedBox_stage_resizeHandler))},baseDividedBox_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},baseDividedBox_divider_rollOverHandler:function(a){this._enabled&&this._resizingDividerIndex==-1&&Id.get_cursor()=="auto"&&(this._oldDividerMouseCursor=Id.get_cursor(),Id.set_cursor(this.resizeCursor))},baseDividedBox_divider_rollOutHandler:function(a){this._enabled&&this._resizingDividerIndex==
-1&&this._oldDividerMouseCursor!=null&&(Id.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null)},baseDividedBox_divider_mouseDownHandler:function(a){a=u.__cast(a.currentTarget,Da);this.resizeTouchBegin(Pe.POINTER_ID_MOUSE,!0,a,this.stage.get_mouseX(),this.stage.get_mouseY())},baseDividedBox_divider_stage_mouseMoveHandler:function(a){a=u.__cast(a.currentTarget,cd);this.resizeTouchMove(Pe.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_stage_mouseUpHandler:function(a){a=
u.__cast(a.currentTarget,cd);this.resizeTouchEnd(Pe.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=u.__cast(a.currentTarget,Da);this.resizeTouchBegin(a.touchPointID,!1,b,a.stageX,a.stageY)}},baseDividedBox_divider_stage_touchMoveHandler:function(a){this.resizeTouchMove(a.touchPointID,!1,a.stageX,a.stageY)},baseDividedBox_divider_stage_touchEndHandler:function(a){this.resizeTouchEnd(a.touchPointID,!1,a.stageX,
a.stageY)},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},
set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__resizeDraggingSkin:null,get_resizeDraggingSkin:function(){return this.__resizeDraggingSkin},
set_resizeDraggingSkin:function(a){if(!this.setStyle("resizeDraggingSkin")||this.__resizeDraggingSkin==a)return this.__resizeDraggingSkin;this._previousClearStyle=m(this,this.clearStyle_resizeDraggingSkin);this.__resizeDraggingSkin=a;this.setInvalid(x.STYLES);return this.__resizeDraggingSkin},clearStyle_resizeDraggingSkin:function(){this.set_resizeDraggingSkin(null);return this.get_resizeDraggingSkin()},__class__:Pe,__properties__:I(wa.prototype.__properties__,{get_numRawChildren:"get_numRawChildren",
set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",set_dividerFactory:"set_dividerFactory",get_dividerFactory:"get_dividerFactory",set_resizeDraggingSkin:"set_resizeDraggingSkin",get_resizeDraggingSkin:"get_resizeDraggingSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode"})});
var Ck=function(){this._fallbackFluidIndex=-1;this._customItemWidths=[];this.initializeHDividedBoxTheme();Pe.call(this);this.resizeCursor=Vg.fromLimeCursor($c.RESIZE_WE)};r["feathers.controls.HDividedBox"]=Ck;Ck.__name__="feathers.controls.HDividedBox";Ck.__super__=Pe;Ck.prototype=I(Pe.prototype,{_hDividedBoxLayout:null,_customItemWidths:null,_fallbackFluidIndex:null,_resizeStartStageX:null,_resizeStartWidth1:null,_resizeStartWidth2:null,initializeHDividedBoxTheme:function(){Zt.initialize()},addItemAt:function(a,
b){var c=Pe.prototype.addItemAt.call(this,a,b),d=null;u.__implements(a,Kb)&&(d=a.get_explicitWidth());this._customItemWidths.splice(b,0,d);a=this._layoutItems.indexOf(a);d==null&&(this._fallbackFluidIndex==-1||a>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=a);return c},removeItem:function(a){var b=this.items.indexOf(a),c=this._layoutItems.indexOf(a);this._fallbackFluidIndex==c&&(this._fallbackFluidIndex=-1);a=Pe.prototype.removeItem.call(this,a);b!=-1&&this._customItemWidths.splice(b,1);return a},
initialize:function(){Pe.prototype.initialize.call(this);this._hDividedBoxLayout==null&&(this._hDividedBoxLayout=new ro);this._hDividedBoxLayout.set_customItemWidths(this._customItemWidths);this.layout=this._hDividedBoxLayout},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._hDividedBoxLayout.set_fallbackFluidIndex(this._fallbackFluidIndex);this._ignoreChildChanges=a;Pe.prototype.handleLayout.call(this)},prepareResize:function(a,b,c){this._resizeStartStageX=
b;b=this.items[a+1];this._resizeStartWidth1=this.items[a].get_width();this._resizeStartWidth2=b.get_width();this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_y(a.get_y()),this._currentResizeDraggingSkin.set_height(a.get_height()),u.__implements(this._currentResizeDraggingSkin,oa)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_x(a.get_x()+(a.get_width()-this._currentResizeDraggingSkin.get_width())/2))},commitResize:function(a,
b,c,d){b-=this._resizeStartStageX;b*=Qg.getConcatenatedScaleX(this);if(d&&!this.liveDragging)this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_y(a.get_y()),this._currentResizeDraggingSkin.set_height(a.get_height()),u.__implements(this._currentResizeDraggingSkin,oa)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_x(a.get_x()+b+(a.get_width()-this._currentResizeDraggingSkin.get_width())/2));else{d=this.items[a];var f=this.items[a+
1];c=this._resizeStartWidth1+this._resizeStartWidth2;b=this._resizeStartWidth2-b;u.__implements(f,Kb)&&(f.get_explicitMinWidth()!=null&&b<f.get_explicitMinWidth()?b=f.get_explicitMinWidth():f.get_explicitMaxWidth()!=null&&b>f.get_explicitMaxWidth()&&(b=f.get_explicitMaxWidth()));b<0?b=0:b>c&&(b=c);b=c-b;u.__implements(d,Kb)&&(d.get_explicitMinWidth()!=null&&b<d.get_explicitMinWidth()?b=d.get_explicitMinWidth():d.get_explicitMaxWidth()!=null&&b>d.get_explicitMaxWidth()&&(b=d.get_explicitMaxWidth()));
b<0?b=0:b>c&&(b=c);this._customItemWidths[a]=b;this._customItemWidths[a+1]=c-b;this.setInvalid(x.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){Pe.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,a);a=u.__cast(a.currentTarget,dc);var b=this._layoutItems.indexOf(a);a.get_includeInLayout()||this._fallbackFluidIndex!=b||(this._fallbackFluidIndex=-1)},baseDividedBox_child_resizeHandler:function(a){if(!this._ignoreChildChanges){var b=a.currentTarget,c=this.items.indexOf(b);
c!=-1&&(a=null,u.__implements(b,Kb)&&(a=b.get_explicitWidth()),this._customItemWidths[c]=a,b=this._layoutItems.indexOf(b),a==null&&(this._fallbackFluidIndex==-1||b>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=b),this.setInvalid(x.LAYOUT))}},__class__:Ck});var $m=function(){Ck.call(this)};r["com.tilbuci.ui.base.HInterfaceContainer"]=$m;$m.__name__="com.tilbuci.ui.base.HInterfaceContainer";$m.__super__=Ck;$m.prototype=I(Ck.prototype,{replaceChildren:function(a){this.removeChildren();for(var b=
0,c=a.length;b<c;){var d=b++;this.addChild(a[d])}},setWidth:function(a,b){this.set_width(a);if(this.get_numChildren()>0)if(b!=null&&b.length==this.get_numChildren()){a=0;for(var c=b.length;a<c;){var d=a++;this.getChildAt(d).set_width(b[d])}}else for(b=(a-(this.get_numChildren()-1)*10)/this.get_numChildren(),a=0,c=this.get_numChildren();a<c;)d=a++,this.getChildAt(d).set_width(b)},__class__:$m});var ml=function(){this._fallbackFluidIndex=-1;this._customItemHeights=[];this.initializeVDividedBoxTheme();
Pe.call(this);this.resizeCursor=Vg.fromLimeCursor($c.RESIZE_NS)};r["feathers.controls.VDividedBox"]=ml;ml.__name__="feathers.controls.VDividedBox";ml.__super__=Pe;ml.prototype=I(Pe.prototype,{_vDividedBoxLayout:null,_customItemHeights:null,_fallbackFluidIndex:null,_resizeStartStageY:null,_resizeStartHeight1:null,_resizeStartHeight2:null,addItemAt:function(a,b){var c=Pe.prototype.addItemAt.call(this,a,b),d=null;u.__implements(a,Kb)&&(d=a.get_explicitHeight());this._customItemHeights.splice(b,0,d);
a=this._layoutItems.indexOf(a);d==null&&(this._fallbackFluidIndex==-1||a>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=a);return c},removeItem:function(a){var b=this.items.indexOf(a),c=this._layoutItems.indexOf(a);this._fallbackFluidIndex==c&&(this._fallbackFluidIndex=-1);a=Pe.prototype.removeItem.call(this,a);b!=-1&&this._customItemHeights.splice(b,1);return a},initializeVDividedBoxTheme:function(){yu.initialize()},initialize:function(){Pe.prototype.initialize.call(this);this._vDividedBoxLayout==
null&&(this._vDividedBoxLayout=new so);this._vDividedBoxLayout.set_customItemHeights(this._customItemHeights);this.layout=this._vDividedBoxLayout},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._vDividedBoxLayout.set_fallbackFluidIndex(this._fallbackFluidIndex);this._ignoreChildChanges=a;Pe.prototype.handleLayout.call(this)},prepareResize:function(a,b,c){this._resizeStartStageY=c;b=this.items[a+1];this._resizeStartHeight1=this.items[a].get_height();this._resizeStartHeight2=
b.get_height();this._currentResizeDraggingSkin!=null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_x(a.get_x()),this._currentResizeDraggingSkin.set_width(a.get_width()),u.__implements(this._currentResizeDraggingSkin,oa)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_y(a.get_y()+(a.get_height()-this._currentResizeDraggingSkin.get_height())/2))},commitResize:function(a,b,c,d){b=c-this._resizeStartStageY;b*=Qg.getConcatenatedScaleY(this);if(d&&!this.liveDragging)this._currentResizeDraggingSkin!=
null&&(a=this.dividers[a],this._currentResizeDraggingSkin.set_x(a.get_x()),this._currentResizeDraggingSkin.set_width(a.get_width()),u.__implements(this._currentResizeDraggingSkin,oa)&&this._currentResizeDraggingSkin.validateNow(),this._currentResizeDraggingSkin.set_y(a.get_y()+b+(a.get_height()-this._currentResizeDraggingSkin.get_height())/2));else{d=this.items[a];var f=this.items[a+1];c=this._resizeStartHeight1+this._resizeStartHeight2;b=this._resizeStartHeight2-b;u.__implements(f,Kb)&&(f.get_explicitMinHeight()!=
null&&b<f.get_explicitMinHeight()?b=f.get_explicitMinHeight():f.get_explicitMaxHeight()!=null&&b>f.get_explicitMaxHeight()&&(b=f.get_explicitMaxHeight()));b<0?b=0:b>c&&(b=c);b=c-b;u.__implements(d,Kb)&&(d.get_explicitMinHeight()!=null&&b<d.get_explicitMinHeight()?b=d.get_explicitMinHeight():d.get_explicitMaxHeight()!=null&&b>d.get_explicitMaxHeight()&&(b=d.get_explicitMaxHeight()));b<0?b=0:b>c&&(b=c);this._customItemHeights[a]=b;this._customItemHeights[a+1]=c-b;this.setInvalid(x.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){Pe.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,
a);a=u.__cast(a.currentTarget,dc);var b=this._layoutItems.indexOf(a);a.get_includeInLayout()||this._fallbackFluidIndex!=b||(this._fallbackFluidIndex=-1)},baseDividedBox_child_resizeHandler:function(a){if(!this._ignoreChildChanges){var b=a.currentTarget,c=this.items.indexOf(b);c!=-1&&(a=null,u.__implements(b,Kb)&&(a=b.get_explicitHeight()),this._customItemHeights[c]=a,b=this._layoutItems.indexOf(b),a==null&&(this._fallbackFluidIndex==-1||b>this._fallbackFluidIndex)&&(this._fallbackFluidIndex=b),this.setInvalid(x.LAYOUT))}},
__class__:ml});var Eq=function(a,b,c,d){d==null&&(d=0);ml.call(this);this.set_layoutData(Hd.fill());var f=new db;f.set_fill(Ab.SolidColor(6710886));this.set_backgroundSkin(f);var g=new Ck;g.set_layoutData(Hd.fill());g.set_backgroundSkin(f);this.left=a;this.right=b;g.addChild(this.left);g.addChild(this.right);this.addChild(g);c!=null&&(this.bottom=c,this.bottom.set_backgroundSkin(f),this.addChild(this.bottom),d>0&&g.set_minHeight(d))};r["com.tilbuci.ui.base.InterfaceColumns"]=Eq;Eq.__name__="com.tilbuci.ui.base.InterfaceColumns";
Eq.__super__=ml;Eq.prototype=I(ml.prototype,{left:null,right:null,bottom:null,__class__:Eq});var Fq=function(a,b,c,d){d==null&&(d=-1);c==null&&(c=-1);b==null&&(b=-1);a==null&&(a="");Ze.call(this);a=="v"?(a=new Bg,b>0?(a.set_gap(b),a.setPadding(b)):b==0&&(a.set_gap(10),a.setPadding(0)),this.set_layout(a)):a=="h"&&(a=new Gh,b>0&&(a.set_gap(b),a.setPadding(b)),this.set_layout(a));c>=0&&(b=new db,b.set_fill(Ab.SolidColor(c)),d>=0&&b.set_border(kc.SolidColor(1,d)),this.set_backgroundSkin(b))};r["com.tilbuci.ui.base.InterfaceContainer"]=
Fq;Fq.__name__="com.tilbuci.ui.base.InterfaceContainer";Fq.__super__=Ze;Fq.prototype=I(Ze.prototype,{replaceChildren:function(a){this.removeChildren();for(var b=0,c=a.length;b<c;){var d=b++;this.addChild(a[d])}},__class__:Fq});var Zl=function(a){a==null&&(a=10);this.lists=new aa;this.selects=new aa;this._btActions=new aa;this.toggles=new aa;this.buttons=new aa;this.spacers=new aa;this.numerics=new aa;this.tareas=new aa;this.inputs=new aa;this.labels=new aa;this.hcontainers=new aa;this.containers=
new aa;this.columns=new aa;this._padding=10;this._padding=a;this._vLayout=new Bg;this._vLayout.setPadding(this._padding);this._vLayout.set_gap(this._padding/2);this._vLayout.set_verticalAlign(fc.TOP);this._vLayout.set_horizontalAlign(Vb.LEFT);this._hLayout=new Gh;this._hLayout.setPadding(this._padding);this._hLayout.set_gap(this._padding/2);this._hLayout.set_verticalAlign(fc.TOP);this._hLayout.set_horizontalAlign(Vb.LEFT)};r["com.tilbuci.ui.base.InterfaceFactory"]=Zl;Zl.__name__="com.tilbuci.ui.base.InterfaceFactory";
Zl.pickValue=function(a,b){return jc.isMobile()?b:a};Zl.prototype={_vLayout:null,_hLayout:null,_padding:null,columns:null,containers:null,hcontainers:null,lastCont:null,labels:null,inputs:null,lastInput:null,tareas:null,numerics:null,spacers:null,buttons:null,toggles:null,_btActions:null,selects:null,lists:null,createColumnHolder:function(a,b,c,d,f){f==null&&(f=0);b=new Eq(b,c,d,f);return this.columns.h[a]=b},createContainer:function(a,b){b==null&&(b=-1);var c=new Fq;c.set_backgroundSkin(new Qj);
if(b<0)c.set_layout(this._vLayout);else{var d=new Bg;d.setPadding(b);d.set_gap(b/2);d.set_verticalAlign(fc.TOP);d.set_horizontalAlign(Vb.LEFT);c.set_layout(d)}return this.lastCont=this.containers.h[a]=c},createHContainer:function(a,b){b==null&&(b=-1);var c=new $m;if(b>=0){var d=new db;d.set_fill(Ab.SolidColor(b));c.set_backgroundSkin(d)}else c.set_backgroundSkin(new Qj);return this.hcontainers.h[a]=c},createHArea:function(a,b,c){c==null&&(c=10);b==null&&(b=10066329);a==null&&(a="left");var d=new yd,
f=new Gh;f.set_gap(c);f.setPadding(c);switch(a){case "left":f.set_horizontalAlign(Vb.LEFT);break;case "right":f.set_horizontalAlign(Vb.RIGHT);break;default:f.set_horizontalAlign(Vb.CENTER)}d.set_layout(f);a=new db;a.set_fill(Ab.SolidColor(b));d.set_backgroundSkin(a);return d},createWarning:function(a,b,c,d,f,g,h){h==null&&(h="Ok");a=new hl(a,b,c,d,h,g,"warn");f!=null&&Ub.addPopUp(a,f);return a},createConfirm:function(a,b,c,d,f,g,h,l){a=new hl(a,b,c,d,g,f,"confirm",h);l!=null&&Ub.addPopUp(a,l);return a},
createLabel:function(a,b,c,d,f){f==null&&(f=!0);c==null&&(c="");var g=new to;c!=""&&g.set_variant(c);g.set_text(b);g.autoResize=f;d!=null&&d.addChild(g);return this.labels.h[a]=g},createDescription:function(a,b,c,d,f){f==null&&(f=!0);c=new to;c.set_wordWrap(!0);c.set_htmlText(b);c.autoResize=f;d!=null&&d.addChild(c);return this.labels.h[a]=c},createTInput:function(a,b,c,d,f,g){f==null&&(f=!0);c==null&&(c="");b==null&&(b="");var h=new Gq;h.set_text(b);h.autoResize=f;c!=""&&h.set_variant(c);d!=null&&
d.addChild(h);this.lastInput=this.inputs.h[a]=h;g!=null&&h.addEventListener("change",g);return h},createNumeric:function(a,b,c,d,f,g){f==null&&(f=0);d==null&&(d=1);c==null&&(c=100);b==null&&(b=0);var h=new id;h.set_minimum(b);h.set_maximum(c);h.set_step(d);h.set_value(f);h.set_valueParseFunction(m(this,this.numericParser));this.numerics.h[a]=h;g!=null&&g.addChild(h);return h},numericParser:function(a){a=t.evaluate(a);return a==null?NaN:parseFloat(a)},createToggle:function(a,b,c,d){b==null&&(b=!1);
var f=new uk;f.set_selected(b);this.toggles.h[a]=f;d!=null&&f.addEventListener("change",d);c!=null&&c.addChild(f);return f},createTArea:function(a,b,c,d,f){d==null&&(d="");c==null&&(c=!0);b==null&&(b="");var g=new df;g.set_text(b);g.set_enabled(c);d!=""&&g.set_variant(d);f!=null&&f.addChild(g);g.set_height(75);return this.tareas.h[a]=g},createButton:function(a,b,c,d,f){f==null&&(f=!0);b=new ge(a,c,b,null,f);b.set_horizontalAlign(Vb.CENTER);d!=null&&d.addChild(b);this.buttons.h[a]=b;this._btActions.h[a]=
c;return b},createIconButton:function(a,b,c,d,f,g){g==null&&(g=!0);var h=new ge(a,b);c.smoothing=!0;c.set_width(c.set_height(20));h.set_icon(c);h.autoResize=g;d!=null&&h.set_text(d);h.set_horizontalAlign(Vb.CENTER);f!=null&&f.addChild(h);this.buttons.h[a]=h;this._btActions.h[a]=b;return h},disableButton:function(a,b){return Object.prototype.hasOwnProperty.call(this.buttons.h,a)?(this.buttons.h[a].set_enabled(!1),b!=null&&this.buttons.h[a].set_text(b),!0):!1},enableButton:function(a,b){return Object.prototype.hasOwnProperty.call(this.buttons.h,
a)?(this.buttons.h[a].set_enabled(!0),b!=null&&this.buttons.h[a].set_text(b),!0):!1},createSpacer:function(a,b,c,d){c==null&&(c=!1);b==null&&(b=10);var f=new Hf;f.set_width(10);f.set_height(b);c&&(b=Math.ceil(b/2),f.get_graphics().beginFill(10987431),f.get_graphics().drawRect(0,b,f.get_width(),1),f.get_graphics().endFill());this.spacers.h[a]=f;d!=null&&d.addChild(f);return f},createSelect:function(a,b,c,d,f){f==null&&(f=!0);var g=new Hq;g.set_dataProvider(new mg(b));g.itemToText=function(h){return h.text};
g.autoResize=f;this.selects.h[a]=g;c!=null&&this.setSelectValue(a,c);d!=null&&d.addChild(g);return g},setSelectOptions:function(a,b,c){return Object.prototype.hasOwnProperty.call(this.selects.h,a)?(this.selects.h[a].set_dataProvider(new mg(b)),c!=null?this.setSelectValue(a,c):!0):!1},setSelectValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.selects.h,a)){for(var c=!1,d=0,f=this.selects.h[a].get_dataProvider().get_length();d<f;){var g=d++;this.selects.h[a].get_dataProvider().get(g).value==
b&&(this.selects.h[a].set_selectedIndex(g),c=!0)}return c}return!1},selectChange:function(a,b,c){return Object.prototype.hasOwnProperty.call(this.selects.h,a)?(this.selects.h[a].addEventListener("change",b),c!=null&&this.selects.h[a].addEventListener("open",c),!0):!1},createList:function(a,b,c,d,f){c==null&&(c=100);var g=new Fc;g.set_dataProvider(new mg(b));g.itemToText=function(h){return h.text};g.set_height(c);g.doubleClickEnabled=!0;b=He.withFunction(function(){var h=new Mc;h.doubleClickEnabled=
!0;return h});g.set_itemRendererRecycler(b);b.update=function(h,l){h.set_text(l.text);l=0;for(var k=h.get_numChildren();l<k;){var q=l++,w=h.getChildAt(q);Object.prototype.hasOwnProperty.call(w,"doubleClickEnabled")&&(h.getChildAt(q).doubleClickEnabled=!0)}};this.lists.h[a]=g;d!=null&&this.setListSelectValue(a,d);f!=null&&f.addChild(g);return g},setListToIcon:function(a){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){var b=He.withFunction(function(){var c=new Mc;c.set_icon(new an);c.doubleClickEnabled=
!0;return c});this.lists.h[a].set_itemRendererRecycler(b);b.update=function(c,d){c.set_text(d.text);c.set_secondaryText(d.data.user);u.__cast(c.get_icon(),an).set_source(d.data.asset);d=0;for(var f=c.get_numChildren();d<f;){var g=d++,h=c.getChildAt(g);Object.prototype.hasOwnProperty.call(h,"doubleClickEnabled")&&(c.getChildAt(g).doubleClickEnabled=!0)}};return!0}return!1},listDbClick:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,a)?(this.lists.h[a].addEventListener("doubleClick",
b),!0):!1},listChange:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,a)?(this.lists.h[a].addEventListener("change",b),!0):!1},setListValues:function(a,b){return Object.prototype.hasOwnProperty.call(this.lists.h,a)?(this.lists.h[a].set_dataProvider(new mg(b)),!0):!1},setListSelectValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){if(b==null)return this.lists.h[a].set_selectedItem(null),!0;for(var c=!1,d=0,f=this.lists.h[a].get_dataProvider().get_length();d<
f;){var g=d++;this.lists.h[a].get_dataProvider().get(g).value==b&&(this.lists.h[a].set_selectedIndex(g),c=!0)}return c}return!1},setListMultiValue:function(a,b){if(Object.prototype.hasOwnProperty.call(this.lists.h,a)){for(var c=[],d=0;d<b.length;){var f=b[d];++d;for(var g=0,h=this.lists.h[a].get_dataProvider().get_length();g<h;){var l=g++;this.lists.h[a].get_dataProvider().get(l).value==f&&c.push(l)}}this.lists.h[a].set_selectedIndices(c)}},forge:function(a,b,c,d,f){f==null&&(f=-1);d==null&&(d=-1);
c==null&&(c=-1);a=this.createContainer(a,f);c>=0&&(f=new db,f.set_fill(Ab.SolidColor(c)),a.set_backgroundSkin(f));c=0;for(f=b.length;c<f;){var g=c++;switch(b[g].tp){case "Button":var h=!0;Object.prototype.hasOwnProperty.call(b[g],"ar")&&(h=b[g].ar);this.createButton(b[g].id,b[g].tx,b[g].ac,this.lastCont,h);d>=0&&this.buttons.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"cl")&&this.buttons.h[b[g].id].addEventListener("trigger",b[g].cl);break;case "Custom":this.lastCont.addChild(b[g].cont);
Object.prototype.hasOwnProperty.call(b[g],"wd")&&(b[g].cont.width=b[g].wd);break;case "Description":this.createDescription(b[g].id,b[g].tx,b[g].vr,this.lastCont);d>=0&&this.labels.h[b[g].id].set_width(d);break;case "Label":this.createLabel(b[g].id,b[g].tx,b[g].vr,this.lastCont);Object.prototype.hasOwnProperty.call(b[g],"wrap")&&this.labels.h[b[g].id].set_wordWrap(b[g].wrap);d>=0&&this.labels.h[b[g].id].set_width(d);break;case "List":this.createList(b[g].id,b[g].vl,b[g].ht,b[g].sl,this.lastCont);d>=
0&&this.lists.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.lists.h[b[g].id].addEventListener("change",b[g].ch);break;case "Numeric":this.createNumeric(b[g].id,b[g].mn,b[g].mx,b[g].st,b[g].vl,this.lastCont);d>=0&&this.numerics.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.numerics.h[b[g].id].addEventListener("change",b[g].ch);break;case "Select":this.createSelect(b[g].id,b[g].vl,b[g].sl,this.lastCont);d>=0&&this.selects.h[b[g].id].set_width(d);
Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.selects.h[b[g].id].addEventListener("change",b[g].ch);break;case "Spacer":this.createSpacer(b[g].id,b[g].ht,b[g].ln,this.lastCont);d>=0&&this.spacers.h[b[g].id].set_width(d);break;case "TArea":this.createTArea(b[g].id,b[g].tx,b[g].en,b[g].vr,this.lastCont);Object.prototype.hasOwnProperty.call(b[g],"ht")&&this.tareas.h[b[g].id].set_height(b[g].ht);d>=0&&this.tareas.h[b[g].id].set_width(d);break;case "TInput":this.createTInput(b[g].id,b[g].tx,b[g].vr,
this.lastCont);d>=0&&this.inputs.h[b[g].id].set_width(d);Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.inputs.h[b[g].id].addEventListener("change",b[g].ch);break;case "Toggle":this.createToggle(b[g].id,b[g].vl,this.lastCont),Object.prototype.hasOwnProperty.call(b[g],"ch")&&this.toggles.h[b[g].id].addEventListener("change",b[g].ch)}}d>0&&a.set_width(d);return a},kill:function(){this._vLayout=null;var a=this.columns.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++];this.columns.h[d].removeChildren();
var f=this.columns;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.columns=null;a=this.containers.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.containers.h[d].removeChildren(),f=this.containers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lastCont=this.containers=null;a=this.inputs.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.inputs,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.inputs=null;a=this.numerics.h;a=Object.keys(a);
b=a.length;for(c=0;c<b;)d=a[c++],f=this.numerics,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lastInput=this.numerics=null;a=this.tareas.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.tareas,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.tareas=null;a=this.labels.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.labels,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.labels=null;a=this.spacers.h;a=Object.keys(a);b=a.length;for(c=
0;c<b;)d=a[c++],this.spacers.h[d].get_graphics().clear(),f=this.spacers,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.spacers=null;a=this.buttons.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],this.buttons.h[d].removeEventListener("trigger",this._btActions.h[d]),f=this.buttons,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d],f=this._btActions,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.buttons=null;a=this.selects.h;a=Object.keys(a);b=a.length;for(c=
0;c<b;)d=a[c++],f=this.selects,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.selects=null;a=this.lists.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.lists,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this.lists=null;a=this.toggles.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this.toggles,Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d];this._btActions=this.toggles=null},redraw:function(){var a=this.inputs.h,b=a;a=Object.keys(a);for(var c=
a.length,d=0;d<c;){var f=b[a[d++]];f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding)}b=a=this.numerics.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.tareas.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.labels.h;a=
Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.selects.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.lists.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_width(f.parent.parent.get_width()-4*this._padding);
b=a=this.buttons.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.autoResize&&f.set_width(f.parent.parent.get_width()-4*this._padding);b=a=this.spacers.h;a=Object.keys(a);c=a.length;for(d=0;d<c;)f=b[a[d++]],f.parent!=null&&f.parent.parent!=null&&f.set_scaleX((f.parent.parent.get_width()-4*this._padding)/10)},__class__:Zl};var Kq=function(a,b,c){c==null&&(c=!1);b==null&&(b=250);a==null&&(a=760);this._codemode=!1;this._idbuttons=new aa;Ze.call(this);var d=
new Bg;d.set_gap(5);d.setPadding(0);this.set_layout(d);this.set_backgroundSkin(new Qj);this._code=new Iq("js");this._code.set_width(a);this._code.set_height(b-35);this._block=new Jq(this._code);this._block.set_width(a);this._block.set_height(b-35);this.addChild(this._block);this._buttons=new $m;this._buttons.set_width(a);b=this._idbuttons;d=new ge("switch",m(this,this.onSwitch),null,Sc.getBitmapData("btBlocks"));b.h["switch"]=d;b=this._idbuttons;d=new ge("copy",m(this,this.onCopy),null,Sc.getBitmapData("btCopy"));
b.h.copy=d;b=this._idbuttons;d=new ge("scene",m(this,this.onScene),null,Sc.getBitmapData("btMovieScene"));b.h.scene=d;b=this._idbuttons;d=new ge("instance",m(this,this.onInstance),null,Sc.getBitmapData("btMedia"));b.h.instance=d;b=this._idbuttons;d=new ge("variables",m(this,this.onVariables),null,Sc.getBitmapData("btVariables"));b.h.variables=d;b=this._idbuttons;d=new ge("data",m(this,this.onData),null,Sc.getBitmapData("btData"));b.h.data=d;b=this._idbuttons;d=new ge("plus",m(this,this.onPlus),null,
Sc.getBitmapData("btPlus"));b.h.plus=d;b=this._idbuttons;d=new ge("plus",m(this,this.onRuntime),null,Sc.getBitmapData("btSetup"));b.h.runtime=d;b=this._idbuttons;d=new ge("contraptions",m(this,this.onContraptions),null,Sc.getBitmapData("btContraptions"));b.h.contraptions=d;b=this._idbuttons;d=new ge("narrative",m(this,this.onNarrative),null,Sc.getBitmapData("btNarrative"));b.h.narrative=d;b=this._idbuttons;d=new ge("plugin",m(this,this.onPlugin),null,Sc.getBitmapData("btPlugin"));b.h.plugin=d;this._buttons.addChild(this._idbuttons.h["switch"]);
this._buttons.addChild(this._idbuttons.h.copy);this._buttons.addChild(this._idbuttons.h.scene);this._buttons.addChild(this._idbuttons.h.instance);this._buttons.addChild(this._idbuttons.h.variables);this._buttons.addChild(this._idbuttons.h.data);this._buttons.addChild(this._idbuttons.h.plus);this._buttons.addChild(this._idbuttons.h.runtime);this._buttons.addChild(this._idbuttons.h.contraptions);this._buttons.addChild(this._idbuttons.h.narrative);this._buttons.addChild(this._idbuttons.h.plugin);this._idbuttons.h["switch"].set_toolTip(t.ln.get("tooltip-action-switch"));
this._idbuttons.h.copy.set_toolTip(t.ln.get("tooltip-action-copy"));this._idbuttons.h.scene.set_toolTip(t.ln.get("tooltip-action-scene"));this._idbuttons.h.instance.set_toolTip(t.ln.get("tooltip-action-instance"));this._idbuttons.h.variables.set_toolTip(t.ln.get("tooltip-action-variables"));this._idbuttons.h.data.set_toolTip(t.ln.get("tooltip-action-data"));this._idbuttons.h.plus.set_toolTip(t.ln.get("tooltip-action-plus"));this._idbuttons.h.contraptions.set_toolTip(t.ln.get("tooltip-action-contraptions"));
this._idbuttons.h.narrative.set_toolTip(t.ln.get("tooltip-action-narrative"));this._idbuttons.h.plugin.set_toolTip(t.ln.get("tooltip-action-plugin"));this._blockbuttons=new $m;this._blockbuttons.set_width(a);b=this._idbuttons;d=new ge("blswitch",m(this,this.onSwitch),null,Sc.getBitmapData("btCode"));b.h.blswitch=d;b=this._idbuttons;d=new ge("bldel",m(this,this.onDel),null,Sc.getBitmapData("btDel"));b.h.bldel=d;b=this._idbuttons;d=new ge("bledit",m(this,this.onEdit),null,Sc.getBitmapData("btEdit"));
b.h.bledit=d;b=this._idbuttons;d=new ge("blopen",m(this,this.onOpen),null,Sc.getBitmapData("btExpand"));b.h.blopen=d;b=this._idbuttons;d=new ge("blclose",m(this,this.onClose),null,Sc.getBitmapData("btCompress"));b.h.blclose=d;b=this._idbuttons;d=new ge("blup",m(this,this.onUp),null,Sc.getBitmapData("btUp"));b.h.blup=d;b=this._idbuttons;d=new ge("bldown",m(this,this.onDown),null,Sc.getBitmapData("btDown"));b.h.bldown=d;this._idbuttons.h.blswitch.set_toolTip(t.ln.get("tooltip-action-switch"));this._idbuttons.h.bldel.set_toolTip(t.ln.get("tooltip-action-bldel"));
this._idbuttons.h.bledit.set_toolTip(t.ln.get("tooltip-action-bledit"));this._idbuttons.h.blopen.set_toolTip(t.ln.get("tooltip-action-blopen"));this._idbuttons.h.blclose.set_toolTip(t.ln.get("tooltip-action-blclose"));this._idbuttons.h.blup.set_toolTip(t.ln.get("tooltip-action-blup"));this._idbuttons.h.bldown.set_toolTip(t.ln.get("tooltip-action-bldown"));c||this._blockbuttons.addChild(this._idbuttons.h.blswitch);this._blockbuttons.addChild(this._idbuttons.h.bldel);this._blockbuttons.addChild(this._idbuttons.h.bledit);
this._blockbuttons.addChild(this._idbuttons.h.blopen);this._blockbuttons.addChild(this._idbuttons.h.blclose);this._blockbuttons.addChild(this._idbuttons.h.blup);this._blockbuttons.addChild(this._idbuttons.h.bldown);this.addChild(this._blockbuttons)};r["com.tilbuci.ui.component.ActionArea"]=Kq;Kq.__name__="com.tilbuci.ui.component.ActionArea";Kq.__super__=Ze;Kq.prototype=I(Ze.prototype,{_code:null,_block:null,_buttons:null,_blockbuttons:null,_idbuttons:null,_codemode:null,setText:function(a){this._code.set_text(a);
this._block.refresh()},getText:function(){return this._codemode?this._code.get_text():this._block.toJson()},onSwitch:function(a){this._codemode=!this._codemode;this.removeChildren();this._codemode?(this._code.set_text(this._block.toJson()),this._block.clear(),this.addChild(this._code),this.addChild(this._buttons)):this._block.refresh()?(this.addChild(this._block),this.addChild(this._blockbuttons)):(this._codemode=!0,this._block.clear(),this.addChild(this._code),this.addChild(this._buttons),t.showPopup(t.ln.get("window-actions-title"),
t.ln.get("window-actions-error"),300,180,t.ln.get("default-ok")))},onCopy:function(a){this._codemode?t.copyText(this._code.get_text()):t.copyText(this._block.toJson())},onVariables:function(a){t.showWindow("assistantvariables")},onScene:function(a){t.showWindow("assistantscene")},onInstance:function(a){t.showWindow("assistantinstance")},onData:function(a){t.showWindow("assistantdata")},onPlus:function(a){t.showWindow("assistantplus")},onRuntime:function(a){t.showWindow("assistantruntime")},onPlugin:function(a){t.showWindow("assistantplugin")},
onContraptions:function(a){t.showWindow("assistantcontraptions")},onNarrative:function(a){t.showWindow("assistantnarrative")},onOpen:function(a){this._block.openAll()},onClose:function(a){this._block.closeAll()},onUp:function(a){this._block.upAction()},onDown:function(a){this._block.downAction()},onEdit:function(a){this._block.editAction()},onDel:function(a){this._block.removeAction()},__class__:Kq});var gi=function(a,b,c,d,f){this._blocks2=[];this._blocks1=[];this.isOpen=!1;this.order=0;this.selected=
!1;this._paramValues=[];yd.call(this);this.doubleClickEnabled=!0;this.blaction=a;var g=new Bg;g.set_gap(5);g.setPadding(8);this.set_layout(g);g=new db(Ab.SolidColor(4473924),kc.SolidColor(1,8947848));g.set_cornerRadius(5);this.set_backgroundSkin(g);this.set_width(b-24);this.order=c;this.mouseChildren=this.isOpen=!1;this._name=new bc(this.order+1+": "+t.acInfo.getAcName(a.ac)+t.acInfo.getParamLine(a.ac,a.param));this._name.set_x(5);this._name.set_y(5);this._name.set_maxWidth(this.get_width()-20);this.addChild(this._name);
b=new Bg;b.set_gap(2);b.setPadding(5);if(t.acInfo.getNumParams(a.ac)>0||a.param.length>0){this._paramArea=new yd;this._paramArea.set_backgroundSkin(new db(Ab.SolidColor(0),kc.SolidColor(1,8947848)));this._paramArea.set_width(this.get_width()-20);this._paramArea.set_layout(b);b=g=0;for(c=a.param.length;b<c;){g=b++;var h=new bc(t.acInfo.getAcParam(a.ac,g,a.param[g]));h.set_variant(bc.VARIANT_DETAIL);this._paramValues.push(h);g+=1}if(g<t.acInfo.getNumParams(a.ac))for(b=g,c=t.acInfo.getNumParams(a.ac);b<
c;)g=b++,h=new bc(t.acInfo.getAcParam(a.ac,g)),h.set_variant(bc.VARIANT_DETAIL),this._paramValues.push(h);b=0;for(c=this._paramValues;b<c.length;)g=c[b],++b,this._paramArea.addChild(g)}g=new Bg;g.set_gap(5);g.setPadding(8);if(t.acInfo.getExtra1(a.ac)!=""){this._extra1Area=new yd;this._extra1Area.set_backgroundSkin(new db(Ab.SolidColor(0),kc.SolidColor(1,8947848)));this._extra1Area.set_width(this.get_width()-20);this._extra1Area.set_layout(g);h=new bc(t.ln.get("acblock-"+t.acInfo.getExtra1(a.ac)));
this._extra1Area.addChild(h);this._paramValues.push(h);h=a.extras;var l=t.acInfo.getExtra1(a.ac);if(Object.prototype.hasOwnProperty.call(h.h,l))for(b=0,h=a.extras,l=t.acInfo.getExtra1(a.ac),c=h.h[l].length;b<c;){var k=b++;h=a.extras;l=t.acInfo.getExtra1(a.ac);h=new gi(h.h[l][k],this.get_width()-20,k,m(this,this.clickAction1),f);this._extra1Area.addChild(h);this._blocks1.push(h)}this._addbt1=new ge("addbt",m(this,this.addActionBlock1),null,Sc.getBitmapData("btPlus"));this._addbt1.set_toolTip(t.ln.get("acblock-addbt"));
this._extra1Area.addChild(this._addbt1)}if(t.acInfo.getExtra2(a.ac)!=""){this._extra2Area=new yd;this._extra2Area.set_backgroundSkin(new db(Ab.SolidColor(0),kc.SolidColor(1,8947848)));this._extra2Area.set_width(this.get_width()-20);this._extra2Area.set_layout(g);h=new bc(t.ln.get("acblock-"+t.acInfo.getExtra2(a.ac)));this._extra2Area.addChild(h);this._paramValues.push(h);h=a.extras;l=t.acInfo.getExtra2(a.ac);if(Object.prototype.hasOwnProperty.call(h.h,l))for(b=0,h=a.extras,l=t.acInfo.getExtra2(a.ac),
c=h.h[l].length;b<c;)k=b++,h=a.extras,l=t.acInfo.getExtra2(a.ac),h=new gi(h.h[l][k],this.get_width()-20,k,m(this,this.clickAction2),f),this._extra2Area.addChild(h),this._blocks2.push(h);this._addbt2=new ge("addbt",m(this,this.addActionBlock2),null,Sc.getBitmapData("btPlus"));this._addbt2.set_toolTip(t.ln.get("acblock-addbt"));this._extra2Area.addChild(this._addbt2)}d!=null&&(this.addEventListener("click",m(this,this.onClick)),this.addEventListener("middleClick",m(this,this.onClickMiddle)),this.addEventListener("doubleClick",
m(this,this.onDbClick)),this._clickAction=d,this._dbClickAction=f);b=0;for(c=this.get_numChildren();b<c;)a=b++,d=this.getChildAt(a),Object.prototype.hasOwnProperty.call(d,"doubleClickEnabled")&&(this.getChildAt(a).doubleClickEnabled=!0)};r["com.tilbuci.ui.component.ActionBlock"]=gi;gi.__name__="com.tilbuci.ui.component.ActionBlock";gi.__super__=yd;gi.prototype=I(yd.prototype,{_name:null,_paramArea:null,_paramValues:null,_extra1Area:null,_extra2Area:null,blaction:null,_clickAction:null,_dbClickAction:null,
selected:null,order:null,isOpen:null,_blocks1:null,_blocks2:null,_addbt1:null,_addbt2:null,setOrder:function(a){this.order=a;this.isOpen?this._name.set_text(this.order+1+": "+t.acInfo.getAcName(this.blaction.ac)):this._name.set_text(this.order+1+": "+t.acInfo.getAcName(this.blaction.ac)+t.acInfo.getParamLine(this.blaction.ac,this.blaction.param))},select:function(){this.selected=!0;var a=new db(Ab.SolidColor(136),kc.SolidColor(1,8947848));a.set_cornerRadius(5);this.set_backgroundSkin(a)},unselect:function(){this.selected=
!1;var a=new db(Ab.SolidColor(4473924),kc.SolidColor(1,8947848));a.set_cornerRadius(5);this.set_backgroundSkin(a)},openAll:function(){this._paramArea!=null&&this._paramArea.parent==null&&this.addChild(this._paramArea);if(this._extra1Area!=null&&this._extra1Area.parent==null){this.addChild(this._extra1Area);for(var a=0,b=this._extra1Area.get_numChildren();a<b;){var c=a++;this._extra1Area.getChildAt(c)instanceof gi&&(c=this._extra1Area.getChildAt(c),c.openAll())}}if(this._extra2Area!=null&&this._extra2Area.parent==
null)for(this.addChild(this._extra2Area),a=0,b=this._extra2Area.get_numChildren();a<b;)c=a++,this._extra2Area.getChildAt(c)instanceof gi&&(c=this._extra2Area.getChildAt(c),c.openAll());this._name.set_text(this.order+1+": "+t.acInfo.getAcName(this.blaction.ac));this.mouseChildren=this.isOpen=!0},closeAll:function(){this._paramArea!=null&&this._paramArea.parent!=null&&this.removeChild(this._paramArea);if(this._extra1Area!=null&&this._extra1Area.parent!=null){this.removeChild(this._extra1Area);for(var a=
0,b=this._extra1Area.get_numChildren();a<b;){var c=a++;this._extra1Area.getChildAt(c)instanceof gi&&(c=this._extra1Area.getChildAt(c),c.closeAll())}}if(this._extra2Area!=null&&this._extra2Area.parent!=null)for(this.removeChild(this._extra2Area),a=0,b=this._extra2Area.get_numChildren();a<b;)c=a++,this._extra2Area.getChildAt(c)instanceof gi&&(c=this._extra2Area.getChildAt(c),c.closeAll());this._name.set_text(this.order+1+": "+t.acInfo.getAcName(this.blaction.ac)+t.acInfo.getParamLine(this.blaction.ac,
this.blaction.param));this.mouseChildren=this.isOpen=!1},refresh:function(){this.isOpen||this._name.set_text(this.order+1+": "+t.acInfo.getAcName(this.blaction.ac)+t.acInfo.getParamLine(this.blaction.ac,this.blaction.param));for(this._paramArea.removeChildren();this._paramValues.length>0;)this._paramValues.shift();for(var a=0,b=0,c=this.blaction.param.length;b<c;){a=b++;var d=new bc(t.acInfo.getAcParam(this.blaction.ac,a,this.blaction.param[a]));d.set_variant(bc.VARIANT_DETAIL);this._paramValues.push(d);
a+=1}if(a<t.acInfo.getNumParams(this.blaction.ac))for(b=a,c=t.acInfo.getNumParams(this.blaction.ac);b<c;)a=b++,d=new bc(t.acInfo.getAcParam(this.blaction.ac,a)),d.set_variant(bc.VARIANT_DETAIL),this._paramValues.push(d);b=0;for(c=this._paramValues;b<c.length;)a=c[b],++b,this._paramArea.addChild(a)},toObject:function(){var a={ac:this.blaction.ac,param:this.blaction.param};if(t.acInfo.getExtra1(this.blaction.ac)!=""){for(var b=[],c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;b.push(f.toObject())}a[t.acInfo.getExtra1(this.blaction.ac)]=
b}if(t.acInfo.getExtra2(this.blaction.ac)!=""){b=[];c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,b.push(f.toObject());a[t.acInfo.getExtra2(this.blaction.ac)]=b}return a},kill:function(){this.removeChildren();this._name=null;this._paramArea!=null&&(this._paramArea.removeChildren(),this._paramArea=null);this._extra1Area!=null&&(this._extra1Area.removeChildren(),this._extra1Area=null,this._addbt1.kill(),this._addbt1=null);this._extra2Area!=null&&(this._extra2Area.removeChildren(),this._extra2Area=
null,this._addbt2.kill(),this._addbt2=null);for(;this._paramValues.length>0;)this._paramValues.shift();for(;this._blocks1.length>0;)this._blocks1.shift().kill();for(;this._blocks2.length>0;)this._blocks2.shift().kill();this._paramValues=this._blocks2=this._blocks1=null;this.blaction.kill();this.blaction=null;this._clickAction!=null&&(this.removeEventListener("click",m(this,this.onClick)),this.removeEventListener("doubleClick",m(this,this.onDbClick)),this.removeEventListener("middleClick",m(this,this.onClickMiddle)));
this._dbClickAction=this._clickAction=null},unselectAll:function(a){this!=a&&this.unselect();for(var b=0,c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselectAll(a)}b=0;for(c=this._blocks2;b<c.length;)d=c[b],++b,d.unselectAll(a)},upAction:function(a){for(var b=0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&(b=1)}if(b==0)for(c=0,d=this._blocks2;c<d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){if(a.order>0){b=[];if(a.order-1>0)for(c=0,d=a.order-1;c<d;)f=c++,b.push(this._blocks1[f]);b.push(this._blocks1[a.order]);
b.push(this._blocks1[a.order-1]);if(this._blocks1.length>a.order+1)for(c=a.order+1,d=this._blocks1.length;c<d;)f=c++,b.push(this._blocks1[f]);for(;this._blocks1.length>0;)this._blocks1.shift();for(;b.length>0;)this._blocks1.push(b.shift());this._extra1Area.removeChildren();this._extra1Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra1(this.blaction.ac))));c=0;for(d=this._blocks1.length;c<d;)f=c++,this._blocks1[f].setOrder(f),this._extra1Area.addChild(this._blocks1[f]);this._extra1Area.addChild(this._addbt1)}}else if(b==
2){if(a.order>0){b=[];if(a.order-1>0)for(c=0,d=a.order-1;c<d;)f=c++,b.push(this._blocks2[f]);b.push(this._blocks2[a.order]);b.push(this._blocks2[a.order-1]);if(this._blocks2.length>a.order+1)for(c=a.order+1,d=this._blocks2.length;c<d;)f=c++,b.push(this._blocks2[f]);for(;this._blocks2.length>0;)this._blocks2.shift();for(;b.length>0;)this._blocks2.push(b.shift());this._extra2Area.removeChildren();this._extra2Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra2(this.blaction.ac))));c=0;for(d=
this._blocks2.length;c<d;)f=c++,this._blocks2[f].setOrder(f),this._extra2Area.addChild(this._blocks2[f]);this._extra2Area.addChild(this._addbt2)}}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.upAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.upAction(a)}},downAction:function(a){for(var b=0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&(b=1)}if(b==0)for(c=0,d=this._blocks2;c<d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){if(a.order<this._blocks1.length-1){b=[];if(a.order>0)for(c=
0,d=a.order;c<d;)f=c++,b.push(this._blocks1[f]);b.push(this._blocks1[a.order+1]);b.push(this._blocks1[a.order]);if(this._blocks1.length>a.order+2)for(c=a.order+2,d=this._blocks1.length;c<d;)f=c++,b.push(this._blocks1[f]);for(;this._blocks1.length>0;)this._blocks1.shift();for(;b.length>0;)this._blocks1.push(b.shift());this._extra1Area.removeChildren();this._extra1Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra1(this.blaction.ac))));c=0;for(d=this._blocks1.length;c<d;)f=c++,this._blocks1[f].setOrder(f),
this._extra1Area.addChild(this._blocks1[f]);this._extra1Area.addChild(this._addbt1)}}else if(b==2){if(a.order<this._blocks2.length-1){b=[];if(a.order>0)for(c=0,d=a.order;c<d;)f=c++,b.push(this._blocks2[f]);b.push(this._blocks2[a.order+1]);b.push(this._blocks2[a.order]);if(this._blocks2.length>a.order+2)for(c=a.order+2,d=this._blocks2.length;c<d;)f=c++,b.push(this._blocks2[f]);for(;this._blocks2.length>0;)this._blocks2.shift();for(;b.length>0;)this._blocks2.push(b.shift());this._extra2Area.removeChildren();
this._extra2Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra2(this.blaction.ac))));c=0;for(d=this._blocks2.length;c<d;)f=c++,this._blocks2[f].setOrder(f),this._extra2Area.addChild(this._blocks2[f]);this._extra2Area.addChild(this._addbt2)}}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.downAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.downAction(a)}},removeAction:function(a){for(var b=0,c=0,d=this._blocks1;c<d.length;){var f=d[c];++c;f==a&&(b=1)}if(b==0)for(c=0,d=this._blocks2;c<
d.length;)f=d[c],++c,f==a&&(b=2);if(b==1){this._blocks1.splice(a.order,1);this._extra1Area.removeChildren();this._extra1Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra1(this.blaction.ac))));c=0;for(d=this._blocks1.length;c<d;)a=c++,this._blocks1[a].setOrder(a),this._extra1Area.addChild(this._blocks1[a]);this._extra1Area.addChild(this._addbt1)}else if(b==2){this._blocks2.splice(a.order,1);this._extra2Area.removeChildren();this._extra2Area.addChild(new bc(t.ln.get("acblock-"+t.acInfo.getExtra2(this.blaction.ac))));
c=0;for(d=this._blocks2.length;c<d;)a=c++,this._blocks2[a].setOrder(a),this._extra2Area.addChild(this._blocks2[a]);this._extra2Area.addChild(this._addbt2)}else{c=0;for(d=this._blocks1;c<d.length;)f=d[c],++c,f.removeAction(a);c=0;for(d=this._blocks2;c<d.length;)f=d[c],++c,f.removeAction(a)}},addActionBlock1:function(a){a.stopImmediatePropagation();t.showNewBlockWindow(m(this,this.onNewBlock1))},onNewBlock1:function(a){a!=0&&(this._extra1Area.removeChild(this._addbt1),a=new gi(new nl(a),this.get_width()-
20,this._blocks1.length,this._clickAction,this._dbClickAction),this._blocks1.push(a),this._extra1Area.addChild(a),this._extra1Area.addChild(this._addbt1))},addActionBlock2:function(a){a.stopImmediatePropagation();t.showNewBlockWindow(m(this,this.onNewBlock2))},onNewBlock2:function(a){a!=0&&(this._extra2Area.removeChild(this._addbt1),a=new gi(new nl(a),this.get_width()-20,this._blocks2.length,this._clickAction,this._dbClickAction),this._blocks2.push(a),this._extra2Area.addChild(a),this._extra2Area.addChild(this._addbt2))},
onClick:function(a){a.stopImmediatePropagation();this._clickAction(this)},onDbClick:function(a){a.stopImmediatePropagation();this._dbClickAction(this)},onClickMiddle:function(a){a.stopImmediatePropagation();this.isOpen?this.closeAll():this.openAll()},clickAction1:function(a,b){b==null&&(b=!1);if(b){b=0;for(var c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselect()}}else if(a.selected)a.unselect();else{b=0;for(c=this._blocks1;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;for(c=this._blocks2;b<
c.length;)d=c[b],++b,d.unselect();this._clickAction(a,!0)},clickAction2:function(a,b){b==null&&(b=!1);if(b){b=0;for(var c=this._blocks1;b<c.length;){var d=c[b];++b;d.unselect()}b=0;c=this._blocks2}else{if(a.selected)a.unselect();else{b=0;for(c=this._blocks2;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;c=this._blocks1}for(;b<c.length;)d=c[b],++b,d.unselect();this._clickAction(a,!0)},__class__:gi});var Jq=function(a){this._blocks=[];Ze.call(this);this._code=a;a=new Bg;a.setPadding(5);a.set_gap(5);
this.set_layout(a);this._selected=null;this._addbt=new ge("addbt",m(this,this.addActionBlock),null,Sc.getBitmapData("btPlus"));this._addbt.set_toolTip(t.ln.get("acblock-addbt"))};r["com.tilbuci.ui.component.BlockArea"]=Jq;Jq.__name__="com.tilbuci.ui.component.BlockArea";Jq.__super__=Ze;Jq.prototype=I(Ze.prototype,{_code:null,_json:null,_selected:null,_blocks:null,_addbt:null,refresh:function(){this.clear();if(this._code.get_text()==""||this._code.get_text()=="[]")return this._json=mb.jsonParse("[ ]"),
this.addChild(this._addbt),!0;Z.trim(X.substr(this._code.get_text(),0,1))!="["&&this._code.set_text("["+Z.trim(this._code.get_text())+"]");this._json=mb.jsonParse(this._code.get_text());if(this._json==0)return!1;for(var a=0,b=0,c=A.fields(this._json);b<c.length;){var d=c[b];++b;this.addAction(new nl(A.field(this._json,d)),a);++a}this.addChild(this._addbt);return!0},addAction:function(a,b){a=new gi(a,this.get_width(),b,m(this,this.clickAction),m(this,this.dbClickAction));this._blocks.push(a);this.addChild(a)},
clear:function(){this.removeChildren();for(this._selected=null;this._blocks.length>0;)this._blocks.shift().kill()},toJson:function(){if(this._blocks.length==0)return"";for(var a=[],b=0,c=this._blocks;b<c.length;){var d=c[b];++b;a.push(d.toObject())}return mb.jsonStringify(a,"  ")},openAll:function(){if(this._selected==null)for(var a=0,b=this._blocks;a<b.length;){var c=b[a];++a;c.openAll()}else this._selected.openAll()},closeAll:function(){if(this._selected==null)for(var a=0,b=this._blocks;a<b.length;){var c=
b[a];++a;c.closeAll()}else this._selected.closeAll()},upAction:function(){if(this._selected!=null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){if(this._selected.order>0){a=[];if(this._selected.order-1>0)for(b=0,c=this._selected.order-1;b<c;)d=b++,a.push(this._blocks[d]);a.push(this._blocks[this._selected.order]);a.push(this._blocks[this._selected.order-1]);if(this._blocks.length>this._selected.order+1)for(b=this._selected.order+1,c=this._blocks.length;b<
c;)d=b++,a.push(this._blocks[d]);for(;this._blocks.length>0;)this._blocks.shift();for(;a.length>0;)this._blocks.push(a.shift());this.removeChildren();b=0;for(c=this._blocks.length;b<c;)d=b++,this._blocks[d].setOrder(d),this.addChild(this._blocks[d]);this.addChild(this._addbt)}}else for(b=0,c=this._blocks;b<c.length;)d=c[b],++b,d.upAction(this._selected)}},downAction:function(){if(this._selected!=null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){if(this._selected.order<
this._blocks.length-1){a=[];if(this._selected.order>0)for(b=0,c=this._selected.order;b<c;)d=b++,a.push(this._blocks[d]);a.push(this._blocks[this._selected.order+1]);a.push(this._blocks[this._selected.order]);if(this._blocks.length>this._selected.order+2)for(b=this._selected.order+2,c=this._blocks.length;b<c;)d=b++,a.push(this._blocks[d]);for(;this._blocks.length>0;)this._blocks.shift();for(;a.length>0;)this._blocks.push(a.shift());this.removeChildren();b=0;for(c=this._blocks.length;b<c;)d=b++,this._blocks[d].setOrder(d),
this.addChild(this._blocks[d]);this.addChild(this._addbt)}}else for(b=0,c=this._blocks;b<c.length;)d=c[b],++b,d.downAction(this._selected)}},removeAction:function(){if(this._selected!=null){for(var a=!1,b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d==this._selected&&(a=!0)}if(a){this._blocks.splice(this._selected.order,1);this.removeChildren();b=0;for(c=this._blocks.length;b<c;)a=b++,this._blocks[a].setOrder(a),this.addChild(this._blocks[a]);this.addChild(this._addbt)}else for(b=0,c=this._blocks;b<
c.length;)d=c[b],++b,d.removeAction(this._selected);this._selected.kill();this._selected=null}},editAction:function(){this._selected!=null&&t.showEditBlockWindow(this._selected.blaction.ac,m(this,this.editReturn),this._selected.order,this._selected.blaction)},addActionBlock:function(a){a.stopImmediatePropagation();t.showNewBlockWindow(m(this,this.onNewBlock))},clickAction:function(a,b){b==null&&(b=!1);this._selected=null;if(b){b=0;for(var c=this._blocks;b<c.length;){var d=c[b];++b;d.unselect()}a.selected&&
(this._selected=a)}else{if(a.selected)a.unselect();else{b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.unselect();a.select()}b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.selected&&(this._selected=d)}b=0;for(c=this._blocks;b<c.length;)d=c[b],++b,d.unselectAll(this._selected)},dbClickAction:function(a){this._selected=null;for(var b=0,c=this._blocks;b<c.length;){var d=c[b];++b;d.unselectAll(this._selected)}a.select();this._selected=a;this.editAction()},onNewBlock:function(a){a==0?this._selected!=
null&&this._selected.refresh():(this.removeChild(this._addbt),a=new gi(new nl(a),this.get_width(),this._blocks.length,m(this,this.clickAction),m(this,this.dbClickAction)),this._blocks.push(a),this.addChild(a),this.addChild(this._addbt))},editReturn:function(a){a==0?this._selected!=null&&this._selected.refresh():(this.removeChild(this._addbt),a=new gi(new nl(a),this.get_width(),this._blocks.length,m(this,this.clickAction),m(this,this.dbClickAction)),this._blocks.push(a),this.addChild(a),this.addChild(this._addbt))},
__class__:Jq});var nl=function(a){this.param=[];this.color=0;this.ac="";Object.prototype.hasOwnProperty.call(a,"ac")&&(this.ac=A.field(a,"ac"));Object.prototype.hasOwnProperty.call(a,"param")&&(this.param=A.field(a,"param"));var b=new aa;b.h.then=[];b.h["else"]=[];b.h.tick=[];b.h.end=[];b.h.ok=[];b.h.cancel=[];b.h.success=[];b.h.error=[];b.h.select=[];b.h.complete=[];b.h.win=[];b.h.loose=[];this.extras=b;for(var c=Object.keys(this.extras.h),d=c.length,f=0;f<d;){var g=c[f++];if(Object.prototype.hasOwnProperty.call(a,
g)){var h=A.field(a,g);b=0;for(var l=A.fields(h);b<l.length;){var k=l[b];++b;k=new nl(A.field(h,k));k.ac!=""?this.extras.h[g].push(k):k.kill()}}}};r["com.tilbuci.ui.component.BlockAction"]=nl;nl.__name__="com.tilbuci.ui.component.BlockAction";nl.prototype={ac:null,color:null,param:null,extras:null,extraJson:function(a){if(Object.prototype.hasOwnProperty.call(this.extras.h,a)&&this.extras.h[a].length>0){for(var b=[],c=0,d=this.extras.h[a].length;c<d;){var f=c++;b.push(this.extras.h[a][f].toObject())}return mb.jsonStringify(b)}return"[ ]"},
toObject:function(){for(var a={ac:this.ac,param:this.param},b=Object.keys(this.extras.h),c=b.length,d=0;d<c;){var f=b[d++];if(this.extras.h[f].length>0){for(var g=[],h=0,l=this.extras.h[f].length;h<l;){var k=h++;g.push(this.extras.h[f][k].toObject())}a[f]=g}}return a},kill:function(){this.ac=null;if(this.param!=null)for(;this.param.length>0;)this.param.shift();this.param=null;if(this.extras!=null)for(var a=Object.keys(this.extras.h),b=a.length,c=0;c<b;){for(var d=a[c++];this.extras.h[d].length>0;)this.extras.h[d].shift().kill();
var f=this.extras;Object.prototype.hasOwnProperty.call(f.h,d)&&delete f.h[d]}this.extras=null},__class__:nl};var hi=function(){};r["feathers.core.IStageFocusDelegate"]=hi;hi.__name__="feathers.core.IStageFocusDelegate";hi.__isInterface__=!0;hi.__interfaces__=[ld];hi.prototype={get_stageFocusTarget:null,__class__:hi,__properties__:{get_stageFocusTarget:"get_stageFocusTarget"}};var Jd=function(a){this.__topArrowGap=this.__rightArrowGap=this.__bottomArrowGap=this.__leftArrowGap=0;this.__backgroundSkin=
this.__topArrowSkin=this.__rightArrowSkin=this.__bottomArrowSkin=this.__leftArrowSkin=null;this.__arrowPosition=ja.TOP;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.CENTER;this.__gap=this.__marginTop=this.__marginRight=this.__marginBottom=this.__marginLeft=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.closeOnPointerOutside=!0;this._ignoreContentResize=!1;this._arrowOffset=0;this.initializeCalloutTheme();wa.call(this);this.set_content(a);this.addEventListener("addedToStage",
m(this,this.callout_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.callout_removedFromStageHandler))};r["feathers.controls.Callout"]=Jd;Jd.__name__="feathers.controls.Callout";Jd.show=function(a,b,c,d,f){d==null&&(d=!0);var g=new Jd;g.set_content(a);return Jd.showCallout(g,b,c,d,f)};Jd.showCallout=function(a,b,c,d,f){d==null&&(d=!0);a.supportedPositions=c;a.set_origin(b);c=f;c==null&&(c=function(){var g=new za;g.get_graphics().beginFill(16711935,0);g.get_graphics().drawRect(0,
0,1,1);g.get_graphics().endFill();return g});Ub.addPopUp(a,b,d,!1,c);return a};Jd.positionBelowOrigin=function(a,b){a.measureWithArrowPosition(ja.TOP);var c=Ub.forStage(a.stage).get_root(),d=new Qa;d=c.globalToLocal(d);var f=new Qa(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.x;switch(a.get_horizontalAlign()._hx_index){case 1:c+=(b.width-a.get_width())/2;break;case 2:c+=b.width-a.get_width()}d=d.x+a.get_marginLeft();f=f.x-a.get_width()-a.get_marginRight();var g=c;g<d?g=d:g>f&&
(g=f);a.set_x(g);a.set_y(b.y+b.height+a.get_gap());a._arrowOffset=c-g;a.set_arrowPosition(ja.TOP)};Jd.positionAboveOrigin=function(a,b){a.measureWithArrowPosition(ja.BOTTOM);var c=Ub.forStage(a.stage).get_root(),d=new Qa;d=c.globalToLocal(d);var f=new Qa(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.x;switch(a.get_horizontalAlign()._hx_index){case 1:c+=(b.width-a.get_width())/2;break;case 2:c+=b.width-a.get_width()}d=d.x+a.get_marginLeft();f=f.x-a.get_width()-a.get_marginRight();
var g=c;g<d?g=d:g>f&&(g=f);a.set_x(g);a.set_y(b.y-a.get_height()-a.get_gap());a._arrowOffset=c-g;a.set_arrowPosition(ja.BOTTOM)};Jd.positionLeftOfOrigin=function(a,b){a.measureWithArrowPosition(ja.RIGHT);var c=Ub.forStage(a.stage).get_root(),d=new Qa;d=c.globalToLocal(d);var f=new Qa(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.y;switch(a.get_verticalAlign()._hx_index){case 1:c+=(b.height-a.get_height())/2;break;case 2:c+=b.height-a.get_height()}d=d.y+a.get_marginTop();f=f.y-a.get_height()-
a.get_marginBottom();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(b.x-a.get_width()-a.get_gap());a.set_y(g);a._arrowOffset=c-g;a.set_arrowPosition(ja.RIGHT)};Jd.positionRightOfOrigin=function(a,b){a.measureWithArrowPosition(ja.RIGHT);var c=Ub.forStage(a.stage).get_root(),d=new Qa;d=c.globalToLocal(d);var f=new Qa(a.stage.stageWidth,a.stage.stageHeight);f=c.globalToLocal(f);c=b.y;switch(a.get_verticalAlign()._hx_index){case 1:c+=(b.height-a.get_height())/2;break;case 2:c+=b.height-a.get_height()}d=d.y+a.get_marginTop();
f=f.y-a.get_height()-a.get_marginBottom();var g=c;g<d?g=d:g>f&&(g=f);a.set_x(b.x+b.width+a.get_gap());a.set_y(g);a._arrowOffset=c-g;a.set_arrowPosition(ja.LEFT)};Jd.__super__=wa;Jd.prototype=I(wa.prototype,{_contentMeasurements:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&(this._content.removeEventListener("resize",m(this,this.callout_content_resizeHandler)),this._contentMeasurements.restore(this._content),
this._content.parent==this&&this.removeChild(this._content));this._content=a;this._content!=null&&(this.addChild(this._content),u.__implements(this._content,jb)&&this._content.initializeNow(),this._contentMeasurements==null?this._contentMeasurements=new Ib(this._content):this._contentMeasurements.save(this._content),this._content.addEventListener("resize",m(this,this.callout_content_resizeHandler),!1,0,!0));this.setInvalid(x.DATA);this.setInvalid(x.SIZE);return this._content},_origin:null,get_origin:function(){return this._origin},
set_origin:function(a){if(this._origin==a)return this._origin;if(a!=null&&a.stage==null)throw new rb("origin must be added to the stage.");this._origin!=null&&(this._origin.removeEventListener("removedFromStage",m(this,this.callout_origin_removedFromStageHandler)),this.removeEventListener("enterFrame",m(this,this.callout_enterFrameHandler)));this._origin=a;this._origin!=null&&(this._origin.addEventListener("removedFromStage",m(this,this.callout_origin_removedFromStageHandler)),this.stage!=null&&this.addEventListener("enterFrame",
m(this,this.callout_enterFrameHandler)));this._lastPopUpOriginBounds=null;this.setInvalid(Jd.INVALIDATION_FLAG_ORIGIN);return this._origin},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentArrowSkin:null,_arrowOffset:null,supportedPositions:null,_lastPopUpOriginBounds:null,_ignoreContentResize:null,closeOnPointerOutside:null,close:function(){this.parent!=null&&this.parent.removeChild(this)},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);
this.set_paddingLeft(a)},dispose:function(){this._content!=null&&this.set_content(null);this._origin!=null&&this.set_origin(null);wa.prototype.dispose.call(this)},initializeCalloutTheme:function(){Rt.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(Jd.INVALIDATION_FLAG_ORIGIN),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);c&&(this._lastPopUpOriginBounds=null,b=!0);(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshArrowSkin();b&&this.positionRelativeToOrigin();
(d||a)&&this.refreshEnabled();this.measure();this.layoutChildren()},measure:function(){return this.measureWithArrowPosition(this.get_arrowPosition())},measureWithArrowPosition:function(a){var b=this.get_explicitWidth()==null,c=this.get_explicitHeight()==null,d=this.get_explicitMinWidth()==null,f=this.get_explicitMinHeight()==null,g=this.get_explicitMaxWidth()==null,h=this.get_explicitMaxHeight()==null;if(!(b||c||d||f||g||h))return!1;var l=h=0;this.stage!=null&&(g=new Qa,g=this.globalToLocal(g),l=
new Qa(this.stage.stageWidth,this.stage.stageHeight),l=this.globalToLocal(l),h=l.x-g.x,l=l.y-g.y);g=this.get_explicitMaxWidth();if(this.stage!=null){if(h=h-this.get_marginLeft()-this.get_marginRight(),g==null||g<h)g=h}else g=1/0;h=this.get_explicitMaxHeight();if(this.stage!=null){if(l=l-this.get_marginTop()-this.get_marginBottom(),h==null||h<l)h=l}else h=1/0;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParentValues(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this.get_explicitWidth(),
this.get_explicitHeight(),this.get_explicitMinWidth(),this.get_explicitMinHeight(),g,h);l=null;u.__implements(this._currentBackgroundSkin,Kb)&&(l=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();u.__implements(this.get_topArrowSkin(),oa)&&this.get_topArrowSkin().validateNow();u.__implements(this.get_rightArrowSkin(),oa)&&this.get_rightArrowSkin().validateNow();u.__implements(this.get_bottomArrowSkin(),oa)&&this.get_bottomArrowSkin().validateNow();
u.__implements(this.get_leftArrowSkin(),oa)&&this.get_leftArrowSkin().validateNow();var k=0,q=0,w=0,v=0;if(this._currentArrowSkin!=null)switch(a._hx_index){case 1:k=this.get_rightArrowSkin().get_width()+this.get_rightArrowGap();q=this.get_rightArrowSkin().get_height();break;case 2:w=this.get_bottomArrowSkin().get_width();v=this.get_bottomArrowSkin().get_height()+this.get_bottomArrowGap();break;case 3:k=this.get_leftArrowSkin().get_width()+this.get_leftArrowGap();q=this.get_leftArrowSkin().get_height();
break;default:w=this.get_topArrowSkin().get_width(),v=this.get_topArrowSkin().get_height()+this.get_topArrowGap()}a=null;u.__implements(this._content,Kb)&&(a=this._content);if(this._content!=null){var z=this._ignoreContentResize;this._ignoreContentResize=!0;Ne.resetFluidlyWithParentValues(this._contentMeasurements,this._content,this.get_explicitWidth()!=null?this.get_explicitWidth()-k-this.get_paddingLeft()-this.get_paddingRight():null,this.get_explicitHeight()!=null?this.get_explicitHeight()-v-this.get_paddingTop()-
this.get_paddingBottom():null,this.get_explicitMinWidth()!=null?this.get_explicitMinWidth()-k-this.get_paddingLeft()-this.get_paddingRight():null,this.get_explicitMinHeight()!=null?this.get_explicitMinHeight()-v-this.get_paddingLeft()-this.get_paddingRight():null,g!=null?g-k-this.get_paddingLeft()-this.get_paddingRight():null,h!=null?h-v-this.get_paddingLeft()-this.get_paddingRight():null);u.__implements(this._content,oa)&&this._content.validateNow();this._ignoreContentResize=z}z=this.get_explicitWidth();
b&&(b=0,this._content!=null&&(b=this._content.get_width()),b<w&&(b=w),z=b+this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(b=this._currentBackgroundSkin.get_width(),z<b&&(z=b)),z+=k);b=this.get_explicitHeight();c&&(c=0,this._content!=null&&(c=this._content.get_height()),c<q&&(c=q),b=c+this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(c=this._currentBackgroundSkin.get_height(),b<c&&(b=c)),b+=v);c=this.get_explicitMinWidth();d&&(d=0,
a!=null?d=a.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minWidth!=null&&(d=this._contentMeasurements.minWidth),d<w&&(d=w),c=d+this.get_paddingLeft()+this.get_paddingRight(),d=0,l!=null?d=l.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(d=this._backgroundSkinMeasurements.minWidth),c<d&&(c=d),c+=k,c>g&&(c=g));d=this.get_explicitMinHeight();f&&(f=0,a!=null?f=a.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minHeight!=
null&&(f=this._contentMeasurements.minHeight),f<q&&(f=q),d=f+this.get_paddingTop()+this.get_paddingBottom(),f=0,l!=null?f=l.get_minHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(f=this._backgroundSkinMeasurements.minHeight),d<f&&(d=f),d+=v,d>h&&(d=h));return this.saveMeasurements(z,b,c,d,g,h)},getCurrentBackgroundSkin:function(){return this.get_backgroundSkin()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=
this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(this),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshArrowSkin:function(){var a=this._currentArrowSkin;this._currentArrowSkin=this.getCurrentArrowSkin();a!=this._currentArrowSkin&&(this.removeCurrentArrowSkin(a),u.__implements(this._currentArrowSkin,wb)&&this._currentArrowSkin.set_uiContext(this),this.addChild(this._currentArrowSkin))},getCurrentArrowSkin:function(){switch(this.get_arrowPosition()._hx_index){case 1:return this.get_rightArrowSkin();
case 2:return this.get_bottomArrowSkin();case 3:return this.get_leftArrowSkin();default:return this.get_topArrowSkin()}},removeCurrentArrowSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshEnabled:function(){u.__implements(this._content,jb)&&this._content.set_enabled(this._enabled)},layoutChildren:function(){u.__implements(this._currentArrowSkin,oa)&&this._currentArrowSkin.validateNow();var a=0,b=0,c=0,d=0;if(this._currentArrowSkin!=
null)switch(this.get_arrowPosition()._hx_index){case 1:c=this._currentArrowSkin.get_width()+this.get_rightArrowGap();break;case 2:d=this._currentArrowSkin.get_height()+this.get_bottomArrowGap();break;case 3:a=this._currentArrowSkin.get_width()+this.get_leftArrowGap();break;default:b=this._currentArrowSkin.get_height()+this.get_topArrowGap()}c=this.actualWidth-a-c;d=this.actualHeight-b-d;this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(a),this._currentBackgroundSkin.set_y(b),this._currentBackgroundSkin.set_width(c),
this._currentBackgroundSkin.set_height(d));if(this._currentArrowSkin!=null){var f=c-this.get_paddingLeft()-this.get_paddingRight(),g=d-this.get_paddingTop()-this.get_paddingBottom();switch(this.get_arrowPosition()._hx_index){case 1:this.get_rightArrowSkin().set_x(a+c+this.get_rightArrowGap());f=this._arrowOffset+b+this.get_paddingTop();this.get_verticalAlign()==fc.MIDDLE?f+=Math.round((g-this.get_rightArrowSkin().get_height())/2):this.get_verticalAlign()==fc.BOTTOM&&(f+=g-this.get_rightArrowSkin().get_height());
var h=b+this.get_paddingTop();h>f?f=h:(g=b+this.get_paddingTop()+g-this.get_rightArrowSkin().get_height(),g<f&&(f=g));this.get_rightArrowSkin().set_y(f);break;case 2:g=this._arrowOffset+a+this.get_paddingLeft();this.get_horizontalAlign()==Vb.CENTER?g+=Math.round((f-this.get_bottomArrowSkin().get_width())/2):this.get_horizontalAlign()==Vb.RIGHT&&(g+=f-this.get_bottomArrowSkin().get_width());h=a+this.get_paddingLeft();h>g?g=h:(f=a+this.get_paddingLeft()+f-this.get_bottomArrowSkin().get_width(),f<g&&
(g=f));this.get_bottomArrowSkin().set_x(g);this.get_bottomArrowSkin().set_y(b+d+this.get_bottomArrowGap());break;case 3:this.get_leftArrowSkin().set_x(a-this.get_leftArrowSkin().get_width()-this.get_leftArrowGap());f=this._arrowOffset+b+this.get_paddingTop();this.get_verticalAlign()==fc.MIDDLE?f+=Math.round((g-this.get_leftArrowSkin().get_height())/2):this.get_verticalAlign()==fc.BOTTOM&&(f+=g-this.get_leftArrowSkin().get_height());h=b+this.get_paddingTop();h>f?f=h:(g=b+this.get_paddingTop()+g-this.get_leftArrowSkin().get_height(),
g<f&&(f=g));this.get_leftArrowSkin().set_y(f);break;default:g=this._arrowOffset+a+this.get_paddingLeft(),this.get_horizontalAlign()==Vb.CENTER?g+=Math.round((f-this.get_topArrowSkin().get_width())/2):this.get_horizontalAlign()==Vb.RIGHT&&(g+=f-this.get_topArrowSkin().get_width()),h=a+this.get_paddingLeft(),h>g?g=h:(f=a+this.get_paddingLeft()+f-this.get_topArrowSkin().get_width(),f<g&&(g=f)),this.get_topArrowSkin().set_x(g),this.get_topArrowSkin().set_y(b-this.get_topArrowSkin().get_height()-this.get_topArrowGap())}}this._content!=
null&&(this._content.set_x(a+this.get_paddingLeft()),this._content.set_y(b+this.get_paddingTop()),a=this._ignoreContentResize,this._ignoreContentResize=!0,this._content.set_width(c-this.get_paddingLeft()-this.get_paddingRight()),this._content.set_height(d-this.get_paddingTop()-this.get_paddingBottom()),u.__implements(this._content,oa)&&this._content.validateNow(),this._ignoreContentResize=a)},checkForOriginMoved:function(){if(this._origin==null)return this._lastPopUpOriginBounds==null?this._lastPopUpOriginBounds=
new Ea:this._lastPopUpOriginBounds.setEmpty(),!1;var a=Ub.forStage(this.stage).get_root(),b=new Qa(this.get_origin().get_x(),this.get_origin().get_y());b=this.get_origin().parent.localToGlobal(b);b=a.globalToLocal(b);var c=new Qa(this.get_origin().get_x()+this.get_origin().get_width(),this.get_origin().get_y()+this.get_origin().get_height());c=this.get_origin().parent.localToGlobal(c);c=a.globalToLocal(c);a=new Ea(b.x,b.y,c.x-b.x,c.y-b.y);if(this._lastPopUpOriginBounds!=null&&this._lastPopUpOriginBounds.equals(a))return!1;
this._lastPopUpOriginBounds=a;return!0},positionRelativeToOrigin:function(){this.checkForOriginMoved();var a=Ub.forStage(this.stage).get_root(),b=new Qa(this.stage.stageWidth,this.stage.stageHeight);b=a.globalToLocal(b);var c=a=-Infinity,d=-Infinity,f=-Infinity,g=this.supportedPositions;g==null&&(g=[ja.BOTTOM,ja.TOP,ja.RIGHT,ja.LEFT]);for(var h=0;h<g.length;){var l=g[h];++h;switch(l._hx_index){case 0:this.measureWithArrowPosition(ja.BOTTOM);a=this._lastPopUpOriginBounds.y-this.actualHeight;if(a>=
this.get_marginTop()){Jd.positionAboveOrigin(this,this._lastPopUpOriginBounds);return}a<0&&(a=0);break;case 1:this.measureWithArrowPosition(ja.LEFT);d=b.x-this.actualWidth-(this._lastPopUpOriginBounds.x+this._lastPopUpOriginBounds.width);if(d>=this.get_marginRight()){Jd.positionRightOfOrigin(this,this._lastPopUpOriginBounds);return}d<0&&(d=0);break;case 3:this.measureWithArrowPosition(ja.RIGHT);f=this._lastPopUpOriginBounds.x-this.actualWidth;if(f>=this.get_marginLeft()){Jd.positionLeftOfOrigin(this,
this._lastPopUpOriginBounds);return}f<0&&(f=0);break;default:this.measureWithArrowPosition(ja.TOP);c=b.y-this.actualHeight-(this._lastPopUpOriginBounds.y+this._lastPopUpOriginBounds.height);if(c>=this.get_marginBottom()){Jd.positionBelowOrigin(this,this._lastPopUpOriginBounds);return}c<0&&(c=0)}}c!=-Infinity&&c>=a&&c>=d&&c>=f?Jd.positionBelowOrigin(this,this._lastPopUpOriginBounds):a!=-Infinity&&a>=d&&a>=f?Jd.positionAboveOrigin(this,this._lastPopUpOriginBounds):d!=-Infinity&&d>=f?Jd.positionRightOfOrigin(this,
this._lastPopUpOriginBounds):f!=-Infinity?Jd.positionLeftOfOrigin(this,this._lastPopUpOriginBounds):Jd.positionBelowOrigin(this,this._lastPopUpOriginBounds)},callout_addedToStageHandler:function(a){this.stage.addEventListener("mouseDown",m(this,this.callout_stage_mouseDownHandler),!1,0,!0);this.stage.addEventListener("touchBegin",m(this,this.callout_stage_touchBeginHandler),!1,0,!0);this._origin!=null&&this.addEventListener("enterFrame",m(this,this.callout_enterFrameHandler))},callout_removedFromStageHandler:function(a){this.stage.removeEventListener("mouseDown",
m(this,this.callout_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.callout_stage_touchBeginHandler));this.removeEventListener("enterFrame",m(this,this.callout_enterFrameHandler));W.dispatch(this,"close")},callout_enterFrameHandler:function(a){this.checkForOriginMoved()&&this.setInvalid(Jd.INVALIDATION_FLAG_ORIGIN)},callout_origin_removedFromStageHandler:function(a){this.close()},callout_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements.save(this.get_content()),
this.setInvalid(x.SIZE))},callout_stage_mouseDownHandler:function(a){this.closeOnPointerOutside&&(this.hitTestPoint(a.stageX,a.stageY)||this.close())},callout_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.closeOnPointerOutside&&(this.hitTestPoint(a.stageX,a.stageY)||this.close())},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);
return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__marginTop:null,get_marginTop:function(){return this.__marginTop},set_marginTop:function(a){if(!this.setStyle("marginTop")||this.__marginTop==a)return this.__marginTop;this._previousClearStyle=m(this,this.clearStyle_marginTop);this.__marginTop=a;this.setInvalid(x.STYLES);return this.__marginTop},clearStyle_marginTop:function(){this.set_marginTop(0);return this.get_marginTop()},__marginRight:null,get_marginRight:function(){return this.__marginRight},
set_marginRight:function(a){if(!this.setStyle("marginRight")||this.__marginRight==a)return this.__marginRight;this._previousClearStyle=m(this,this.clearStyle_marginRight);this.__marginRight=a;this.setInvalid(x.STYLES);return this.__marginRight},clearStyle_marginRight:function(){this.set_marginRight(0);return this.get_marginRight()},__marginBottom:null,get_marginBottom:function(){return this.__marginBottom},set_marginBottom:function(a){if(!this.setStyle("marginBottom")||this.__marginBottom==a)return this.__marginBottom;
this._previousClearStyle=m(this,this.clearStyle_marginBottom);this.__marginBottom=a;this.setInvalid(x.STYLES);return this.__marginBottom},clearStyle_marginBottom:function(){this.set_marginBottom(0);return this.get_marginBottom()},__marginLeft:null,get_marginLeft:function(){return this.__marginLeft},set_marginLeft:function(a){if(!this.setStyle("marginLeft")||this.__marginLeft==a)return this.__marginLeft;this._previousClearStyle=m(this,this.clearStyle_marginLeft);this.__marginLeft=a;this.setInvalid(x.STYLES);
return this.__marginLeft},clearStyle_marginLeft:function(){this.set_marginLeft(0);return this.get_marginLeft()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},
__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||
this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,
this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);
return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.CENTER);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);
return this.get_verticalAlign()},__arrowPosition:null,get_arrowPosition:function(){return this.__arrowPosition},set_arrowPosition:function(a){if(!this.setStyle("arrowPosition")||this.__arrowPosition==a)return this.__arrowPosition;this._previousClearStyle=m(this,this.clearStyle_arrowPosition);this.__arrowPosition=a;this.setInvalid(x.STYLES);return this.__arrowPosition},clearStyle_arrowPosition:function(){this.set_arrowPosition(ja.TOP);return this.get_arrowPosition()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},
set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__topArrowSkin:null,get_topArrowSkin:function(){return this.__topArrowSkin},set_topArrowSkin:function(a){if(!this.setStyle("topArrowSkin")||
this.__topArrowSkin==a)return this.__topArrowSkin;this._previousClearStyle=m(this,this.clearStyle_topArrowSkin);this.__topArrowSkin=a;this.setInvalid(x.STYLES);return this.__topArrowSkin},clearStyle_topArrowSkin:function(){this.set_topArrowSkin(null);return this.get_topArrowSkin()},__rightArrowSkin:null,get_rightArrowSkin:function(){return this.__rightArrowSkin},set_rightArrowSkin:function(a){if(!this.setStyle("rightArrowSkin")||this.__rightArrowSkin==a)return this.__rightArrowSkin;this._previousClearStyle=
m(this,this.clearStyle_rightArrowSkin);this.__rightArrowSkin=a;this.setInvalid(x.STYLES);return this.__rightArrowSkin},clearStyle_rightArrowSkin:function(){this.set_rightArrowSkin(null);return this.get_rightArrowSkin()},__bottomArrowSkin:null,get_bottomArrowSkin:function(){return this.__bottomArrowSkin},set_bottomArrowSkin:function(a){if(!this.setStyle("bottomArrowSkin")||this.__bottomArrowSkin==a)return this.__bottomArrowSkin;this._previousClearStyle=m(this,this.clearStyle_bottomArrowSkin);this.__bottomArrowSkin=
a;this.setInvalid(x.STYLES);return this.__bottomArrowSkin},clearStyle_bottomArrowSkin:function(){this.set_bottomArrowSkin(null);return this.get_bottomArrowSkin()},__leftArrowSkin:null,get_leftArrowSkin:function(){return this.__leftArrowSkin},set_leftArrowSkin:function(a){if(!this.setStyle("leftArrowSkin")||this.__leftArrowSkin==a)return this.__leftArrowSkin;this._previousClearStyle=m(this,this.clearStyle_leftArrowSkin);this.__leftArrowSkin=a;this.setInvalid(x.STYLES);return this.__leftArrowSkin},
clearStyle_leftArrowSkin:function(){this.set_leftArrowSkin(null);return this.get_leftArrowSkin()},__topArrowGap:null,get_topArrowGap:function(){return this.__topArrowGap},set_topArrowGap:function(a){if(!this.setStyle("topArrowGap")||this.__topArrowGap==a)return this.__topArrowGap;this._previousClearStyle=m(this,this.clearStyle_topArrowGap);this.__topArrowGap=a;this.setInvalid(x.STYLES);return this.__topArrowGap},clearStyle_topArrowGap:function(){this.set_topArrowGap(0);return this.get_topArrowGap()},
__rightArrowGap:null,get_rightArrowGap:function(){return this.__rightArrowGap},set_rightArrowGap:function(a){if(!this.setStyle("rightArrowGap")||this.__rightArrowGap==a)return this.__rightArrowGap;this._previousClearStyle=m(this,this.clearStyle_rightArrowGap);this.__rightArrowGap=a;this.setInvalid(x.STYLES);return this.__rightArrowGap},clearStyle_rightArrowGap:function(){this.set_rightArrowGap(0);return this.get_rightArrowGap()},__bottomArrowGap:null,get_bottomArrowGap:function(){return this.__bottomArrowGap},
set_bottomArrowGap:function(a){if(!this.setStyle("bottomArrowGap")||this.__bottomArrowGap==a)return this.__bottomArrowGap;this._previousClearStyle=m(this,this.clearStyle_bottomArrowGap);this.__bottomArrowGap=a;this.setInvalid(x.STYLES);return this.__bottomArrowGap},clearStyle_bottomArrowGap:function(){this.set_bottomArrowGap(0);return this.get_bottomArrowGap()},__leftArrowGap:null,get_leftArrowGap:function(){return this.__leftArrowGap},set_leftArrowGap:function(a){if(!this.setStyle("leftArrowGap")||
this.__leftArrowGap==a)return this.__leftArrowGap;this._previousClearStyle=m(this,this.clearStyle_leftArrowGap);this.__leftArrowGap=a;this.setInvalid(x.STYLES);return this.__leftArrowGap},clearStyle_leftArrowGap:function(){this.set_leftArrowGap(0);return this.get_leftArrowGap()},get_styleContext:function(){return Jd},__class__:Jd,__properties__:I(wa.prototype.__properties__,{set_leftArrowGap:"set_leftArrowGap",get_leftArrowGap:"get_leftArrowGap",set_bottomArrowGap:"set_bottomArrowGap",get_bottomArrowGap:"get_bottomArrowGap",
set_rightArrowGap:"set_rightArrowGap",get_rightArrowGap:"get_rightArrowGap",set_topArrowGap:"set_topArrowGap",get_topArrowGap:"get_topArrowGap",set_leftArrowSkin:"set_leftArrowSkin",get_leftArrowSkin:"get_leftArrowSkin",set_bottomArrowSkin:"set_bottomArrowSkin",get_bottomArrowSkin:"get_bottomArrowSkin",set_rightArrowSkin:"set_rightArrowSkin",get_rightArrowSkin:"get_rightArrowSkin",set_topArrowSkin:"set_topArrowSkin",get_topArrowSkin:"get_topArrowSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",
set_arrowPosition:"set_arrowPosition",get_arrowPosition:"get_arrowPosition",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",
set_marginLeft:"set_marginLeft",get_marginLeft:"get_marginLeft",set_marginBottom:"set_marginBottom",get_marginBottom:"get_marginBottom",set_marginRight:"set_marginRight",get_marginRight:"get_marginRight",set_marginTop:"set_marginTop",get_marginTop:"get_marginTop",set_gap:"set_gap",get_gap:"get_gap",set_origin:"set_origin",get_origin:"get_origin",set_content:"set_content",get_content:"get_content"})});var Qe=function(a){a==null&&(a="");this.__wordWrap=!1;this.__disabledTextFormat=null;this.__embedFonts=
!1;this._htmlText=this.__textFormat=this.__styleSheet=null;this.initializeTextCalloutTheme();Jd.call(this);this.set_text(a)};r["feathers.controls.TextCallout"]=Qe;Qe.__name__="feathers.controls.TextCallout";Qe.__interfaces__=[kl,de];Qe.show=function(a,b,c,d){d==null&&(d=!0);a=new Qe(a);return u.__cast(Jd.showCallout(a,b,c,d),Qe)};Qe.__super__=Jd;Qe.prototype=I(Jd.prototype,{label:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=
a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){return this.label==null?0:this.label.get_y()+this.label.get_baseline()},initializeTextCalloutTheme:function(){ru.initialize()},initialize:function(){Jd.prototype.initialize.call(this);this.label==null&&(this.label=new bc,this.addChild(this.label),
this.set_content(this.label))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);(c||b)&&this.refreshTextStyles();(a||c||b)&&this.refreshText();Jd.prototype.update.call(this)},refreshTextStyles:function(){this.label.set_wordWrap(this.get_wordWrap());this.label.set_textFormat(this.get_textFormat());this.label.set_disabledTextFormat(this.get_disabledTextFormat());this.label.set_embedFonts(this.get_embedFonts());this.label.set_styleSheet(this.get_styleSheet())},
refreshText:function(){this.label.set_text(this._text);this.label.set_htmlText(this._htmlText)},get_styleContext:function(){return Qe},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);
return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__class__:Qe,__properties__:I(Jd.prototype.__properties__,{set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",
get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var Wc=function(a,b,c){a==null&&(a="");this.__errorFocusRectSkin=this.__customErrorCalloutVariant=null;this.__autoSizeWidth=!1;this.__verticalAlign=fc.MIDDLE;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=this.__promptTextFormat=null;this.__rightViewGap=0;this.__rightView=null;
this.__leftViewGap=0;this.__leftView=null;this.__showPromptWhenEmptyAndFocused=!0;this._previousCustomErrorCalloutVariant=this.__backgroundSkin=null;this._maxChars=this._errorStatePriority=this._focusedStatePriority=0;this._pendingSelectionAnchorIndex=this._pendingSelectionActiveIndex=-1;this._scrollX=0;this._stateToTextFormat=new Ye;this._errorString=null;this._displayAsPassword=!1;this._measureText=null;this._updatedTextStyles=this._updatedPromptStyles=!1;this._previousText=this._previousMeasureText=
this._previousPrompt=this._previousTextFormat=this._previousPromptTextFormat=null;this._stateToSkin=new Ye;this._ignoreLeftViewResize=this._ignoreRightViewResize=!1;this._backgroundSkinMeasurements=this._currentBackgroundSkin=null;this._currentState=re.ENABLED;this._editable=this._selectable=!0;this.initializeTextInputTheme();wa.call(this);this.set_text(a);this.set_prompt(b);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=null;this.addEventListener("focusIn",m(this,this.textInput_focusInHandler));
this.addEventListener("focusOut",m(this,this.textInput_focusOutHandler));c!=null&&this.addEventListener("change",c)};r["feathers.controls.TextInput"]=Wc;Wc.__name__="feathers.controls.TextInput";Wc.__interfaces__=[hi,de,mh];Wc.__super__=wa;Wc.prototype=I(wa.prototype,{_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_selectable:null,get_selectable:function(){return this._selectable},
set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.STATE);return this._selectable},get_stageFocusTarget:function(){return this.textField},_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){wa.prototype.set_enabled.call(this,a);this.refreshState();return this._enabled},_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_currentLeftView:null,_leftViewMeasurements:null,_ignoreLeftViewResize:null,
_currentRightView:null,_rightViewMeasurements:null,_ignoreRightViewResize:null,_stateToSkin:null,textField:null,promptTextField:null,errorStringCallout:null,_previousText:null,_previousMeasureText:null,_previousPrompt:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_previousPromptTextFormat:null,_previousPromptSimpleTextFormat:null,_updatedTextStyles:null,_updatedPromptStyles:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==
0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);W.dispatch(this,"change");return this._text},_measureText:null,get_measureText:function(){return this._measureText},set_measureText:function(a){if(this._measureText==a)return this._measureText;this._measureText=a;this.setInvalid(x.DATA);return this._measureText},get_baseline:function(){if(this.textField==null)return 0;if(!(this._text!=null&&this._text.length>0)){this.textField.set_text("\u200b");var a=
this.textField.get_y()+this.textField.getLineMetrics(0).ascent;this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=
a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_errorString:null,get_errorString:function(){return this._errorString},set_errorString:function(a){if(this._errorString==a)return this._errorString;this._errorString=a;this.refreshState();
this.setInvalid(x.DATA);return this._errorString},get_errorStringCalloutOpen:function(){return this.errorStringCallout!=null?this.errorStringCallout.parent!=null:!1},_stateToTextFormat:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);W.dispatch(this,"scroll");return this._scrollX},_pendingSelectionAnchorIndex:null,get_selectionAnchorIndex:function(){return this.textField!=null&&
this._pendingSelectionAnchorIndex==-1?this.textField.get_caretIndex()==this.textField.get_selectionBeginIndex()?this.textField.get_selectionEndIndex():this.textField.get_selectionBeginIndex():this._pendingSelectionAnchorIndex},_pendingSelectionActiveIndex:null,get_selectionActiveIndex:function(){return this.textField!=null&&this._pendingSelectionActiveIndex==-1?this.textField.get_caretIndex():this._pendingSelectionActiveIndex},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==
a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_errorStatePriority:null,get_errorStatePriority:function(){return this._errorStatePriority},set_errorStatePriority:function(a){if(this._errorStatePriority==a)return this._errorStatePriority;this._errorStatePriority=a;this.setInvalid(x.STATE);return this._errorStatePriority},_focusedStatePriority:null,get_focusedStatePriority:function(){return this._errorStatePriority},set_focusedStatePriority:function(a){if(this._focusedStatePriority==
a)return this._focusedStatePriority;this._focusedStatePriority=a;this.setInvalid(x.STATE);return this._focusedStatePriority},_oldErrorCalloutFactory:null,_errorCalloutFactory:null,get_errorCalloutFactory:function(){return this._errorCalloutFactory},set_errorCalloutFactory:function(a){if(this._errorCalloutFactory==a)return this._errorCalloutFactory;this._errorCalloutFactory=a;this.setInvalid(Wc.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);return this._errorCalloutFactory},_previousCustomErrorCalloutVariant:null,
_textMeasuredWidth:null,_textMeasuredHeight:null,_promptTextMeasuredWidth:null,_promptTextMeasuredHeight:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},
setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),this.setInvalid(x.STYLES))},selectRange:function(a,b){this._pendingSelectionAnchorIndex=a;this._pendingSelectionActiveIndex=b;this.setInvalid(x.SELECTION)},selectAll:function(){this.selectRange(0,this._text.length)},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},showFocus:function(a){wa.prototype.showFocus.call(this,
a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();wa.prototype.dispose.call(this)},initializeTextInputTheme:function(){su.initialize()},initialize:function(){wa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_tabEnabled(!1),this.refreshTextFieldType(),this.textField.addEventListener("change",m(this,this.textInput_textField_changeHandler)),this.textField.addEventListener("scroll",m(this,this.textInput_textField_scrollHandler)),
this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SCROLL),c=this.isInvalid(x.SELECTION),d=this.isInvalid(x.SIZE),f=this.isInvalid(x.STATE),g=this.isInvalid(x.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(Wc.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var h=this.isInvalid(Wc.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);this._updatedPromptStyles=this._updatedTextStyles=!1;(h||a)&&this.createErrorCallout();
if(g||f)this.refreshBackgroundSkin(),this.refreshLeftView(),this.refreshRightView();(a||f)&&this.refreshPrompt();(g||f)&&this.refreshTextStyles();(a||g||f)&&this.refreshPromptStyles();(a||g||f||d)&&this.refreshText(d);(a||g||d)&&this.refreshPromptText(d);c&&this.refreshSelection();b&&this.refreshScrollPosition();this.measure();this.layoutContent();(h||f||a)&&this.refreshErrorString();this._previousCustomErrorCalloutVariant=this.get_customErrorCalloutVariant()},refreshBackgroundSkin:function(){var a=
this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this.get_backgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==
null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),u.__implements(a,Td)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshLeftView:function(){var a=this._currentLeftView;this._currentLeftView=
this.getCurrentLeftView();this._currentLeftView!=a&&(this.removeCurrentLeftView(a),this._currentLeftView==null?this._leftViewMeasurements=null:(u.__implements(this._currentLeftView,jb)&&this._currentLeftView.initializeNow(),this._leftViewMeasurements==null?this._leftViewMeasurements=new Ib(this._currentLeftView):this._leftViewMeasurements.save(this._currentLeftView),u.__implements(this._currentLeftView,wb)&&this._currentLeftView.set_uiContext(this),u.__implements(this._currentLeftView,Td)&&this._currentLeftView.set_stateContext(this),
this._currentLeftView.addEventListener("resize",m(this,this.textInput_leftView_resizeHandler),!1,0,!0),this.addChild(this._currentLeftView)))},getCurrentLeftView:function(){return this.get_leftView()},removeCurrentLeftView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.textInput_leftView_resizeHandler)),u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._leftViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshRightView:function(){var a=
this._currentRightView;this._currentRightView=this.getCurrentRightView();this._currentRightView!=a&&(this.removeCurrentRightView(a),this._currentRightView==null?this._rightViewMeasurements=null:(u.__implements(this._currentRightView,jb)&&this._currentRightView.initializeNow(),this._rightViewMeasurements==null?this._rightViewMeasurements=new Ib(this._currentRightView):this._rightViewMeasurements.save(this._currentRightView),u.__implements(this._currentRightView,wb)&&this._currentRightView.set_uiContext(this),
u.__implements(this._currentRightView,Td)&&this._currentRightView.set_stateContext(this),this._currentRightView.addEventListener("resize",m(this,this.textInput_rightView_resizeHandler),!1,0,!0),this.addChild(this._currentRightView)))},getCurrentRightView:function(){return this.get_rightView()},removeCurrentRightView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.textInput_rightView_resizeHandler)),u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),
this._rightViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;u.__implements(this._currentBackgroundSkin,
Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();var l=this._ignoreLeftViewResize;this._ignoreLeftViewResize=!0;var k=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;var q=null;u.__implements(this._currentLeftView,Kb)&&(q=this._currentLeftView);u.__implements(this._currentLeftView,oa)&&this._currentLeftView.validateNow();var w=null;u.__implements(this._currentRightView,Kb)&&(w=this._currentRightView);u.__implements(this._currentRightView,
oa)&&this._currentRightView.validateNow();this._ignoreLeftViewResize=l;this._ignoreRightViewResize=k;l=this.get_explicitWidth();a&&(l=this.get_autoSizeWidth()||this._measureText!=null?this._textMeasuredWidth:0,this._prompt!=null&&(l=Math.max(l,this._promptTextMeasuredWidth)),q!=null?l+=q.get_width()+this.get_leftViewGap():this._leftViewMeasurements!=null&&this._leftViewMeasurements.width!=null&&(l+=this._leftViewMeasurements.width+this.get_leftViewGap()),w!=null?l+=w.get_width()+this.get_rightViewGap():
this._rightViewMeasurements!=null&&this._rightViewMeasurements.width!=null&&(l+=this._rightViewMeasurements.width+this.get_rightViewGap()),l+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(l=Math.max(this._currentBackgroundSkin.get_width(),l)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,this._prompt!=null&&(a=Math.max(a,this._promptTextMeasuredHeight)),q!=null&&a<q.get_height()?a=q.get_height():this._leftViewMeasurements!=null&&a<this._leftViewMeasurements.height&&
(a=this._leftViewMeasurements.height),w!=null&&a<w.get_height()?a=w.get_height():this._rightViewMeasurements!=null&&a<this._rightViewMeasurements.height&&(a=this._rightViewMeasurements.height),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.get_autoSizeWidth()||this._measureText!=null?this._textMeasuredWidth:0,this._prompt!=null&&(b=Math.max(b,this._promptTextMeasuredWidth)),
q!=null?b+=q.get_minWidth()+this.get_leftViewGap():this._leftViewMeasurements!=null&&this._leftViewMeasurements.minWidth!=null&&(b+=this._leftViewMeasurements.minWidth+this.get_leftViewGap()),w!=null?b+=w.get_minWidth()+this.get_rightViewGap():this._rightViewMeasurements!=null&&this._rightViewMeasurements.minWidth!=null&&(b+=this._rightViewMeasurements.minWidth+this.get_rightViewGap()),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=
null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,this._prompt!=null&&(c=Math.max(c,this._promptTextMeasuredHeight)),q!=null&&c<q.get_minHeight()?c=q.get_minHeight():this._leftViewMeasurements!=null&&c<this._leftViewMeasurements.minHeight&&(c=this._leftViewMeasurements.minHeight),w!=null&&c<w.get_minHeight()?c=w.get_minHeight():this._rightViewMeasurements!=null&&c<this._rightViewMeasurements.minHeight&&
(c=this._rightViewMeasurements.minHeight),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();
g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},refreshTextFieldType:function(){this._enabled&&this._editable&&this.textField.get_type()!=1?this.textField.set_type(1):this._enabled&&this._editable||this.textField.get_type()!=1||this.textField.set_type(0)},refreshTextStyles:function(){this.refreshTextFieldType();this.textField.get_embedFonts()!=
this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_displayAsPassword()!=this._displayAsPassword&&(this.textField.set_displayAsPassword(this._displayAsPassword),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.textInput_textFormat_changeHandler)),
a!=null&&(a.addEventListener("change",m(this,this.textInput_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshPrompt:function(){this._prompt==null?this.promptTextField!=null&&(this.removeChild(this.promptTextField),this.promptTextField=null):(this.promptTextField==null&&(this.promptTextField=new Jc,this.addChildAt(this.promptTextField,this.getChildIndex(this.textField))),this.promptTextField.set_selectable(!1),
this.promptTextField.set_mouseWheelEnabled(!1),this.promptTextField.mouseEnabled=!1,this.promptTextField.set_visible(this._text.length==0&&(this.get_currentState()!=re.FOCUSED||this.get_showPromptWhenEmptyAndFocused())))},refreshPromptText:function(a){this._prompt!=null&&(this._prompt!=this._previousPrompt||this._updatedPromptStyles||a)&&(this.promptTextField.set_autoSize(1),(a=this._prompt.length>0)?this.promptTextField.set_text(this._prompt):this.promptTextField.set_text("\u200b"),this._promptTextMeasuredWidth=
this.promptTextField.get_width(),this._promptTextMeasuredHeight=this.promptTextField.get_height(),this.promptTextField.set_autoSize(2),a||this.promptTextField.set_text(""),this._previousPrompt=this._prompt)},refreshPromptStyles:function(){if(this._prompt!=null){this.promptTextField.get_embedFonts()!=this.get_embedFonts()&&(this.promptTextField.set_embedFonts(this.get_embedFonts()),this._updatedPromptStyles=!0);var a=this.getCurrentPromptTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousPromptSimpleTextFormat&&
(this._previousPromptTextFormat!=null&&this._previousPromptTextFormat.removeEventListener("change",m(this,this.textInput_promptTextFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textInput_textFormat_changeHandler),!1,0,!0),this.promptTextField.set_defaultTextFormat(b),this._updatedPromptStyles=!0),this._previousPromptTextFormat=a,this._previousPromptSimpleTextFormat=b)}},getCurrentPromptTextFormat:function(){var a=this.get_promptTextFormat();this._enabled||this.get_disabledTextFormat()==
null||(a=this.get_disabledTextFormat());a==null&&(a=this.get_textFormat());return a},refreshText:function(a){this.textField.set_restrict(this.___restrict);this.textField.set_maxChars(this._maxChars);this._editable?this.textField.set_selectable(this._enabled):this.textField.set_selectable(this._enabled&&this._selectable);var b=this._measureText!=null,c=b?this._measureText:this._text;if(c==null||c.length==0)b=!0,c="\u200b";if(this._text!=this._previousText||c!=this._previousMeasureText||this._updatedTextStyles||
a)this.textField.set_autoSize(1),this.textField.set_text(c),this._textMeasuredWidth=this.textField.get_width(),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),a=null,this._text==null||this._text.length==0?a="":b&&(a=this._text),a!=null&&this.textField.set_text(a),this._previousText=this._text,this._previousMeasureText=c},refreshSelection:function(){if(this._pendingSelectionActiveIndex!=-1||this._pendingSelectionAnchorIndex!=-1){var a=this._pendingSelectionAnchorIndex,
b=this._pendingSelectionActiveIndex;this._pendingSelectionActiveIndex=this._pendingSelectionAnchorIndex=-1;this.textField.setSelection(a,b)}},refreshScrollPosition:function(){this.textField.set_scrollH(Math.round(this._scrollX))},getCurrentTextFormat:function(){var a=this._stateToTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){var a=this._ignoreLeftViewResize;this._ignoreLeftViewResize=
!0;var b=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;this.layoutBackgroundSkin();var c=this._textMeasuredHeight,d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();if(c>d||this.get_verticalAlign()==fc.JUSTIFY)c=d;c<0&&(c=0);this.textField.set_height(c);var f=0;this._currentLeftView!=null&&(u.__implements(this._currentLeftView,oa)&&this._currentLeftView.validateNow(),this._currentLeftView.set_x(this.get_paddingLeft()),this._currentLeftView.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(d-this._currentLeftView.get_height())/2)),f=this._currentLeftView.get_width()+this.get_leftViewGap());var g=0;this._currentRightView!=null&&(u.__implements(this._currentRightView,oa)&&this._currentRightView.validateNow(),this._currentRightView.set_x(this.actualWidth-this.get_paddingRight()-this._currentRightView.get_width()),this._currentRightView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(d-this._currentRightView.get_height())/2)),g=this._currentRightView.get_width()+
this.get_rightViewGap());g=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-f-g;g<0&&(g=0);this.textField.set_width(g);this.textField.set_x(this.get_paddingLeft()+f);var h=this.textField;switch(this.get_verticalAlign()._hx_index){case 0:h.set_y(this.get_paddingTop());break;case 2:h.set_y(this.actualHeight-this.get_paddingBottom()-c);break;case 3:h.set_y(this.get_paddingTop());break;default:h.set_y(this.get_paddingTop()+(d-c)/2)}if(this.promptTextField!=null){this.promptTextField.set_width(g);
c=this._promptTextMeasuredHeight;if(c>d||this.get_verticalAlign()==fc.JUSTIFY)c=d;c<0&&(c=0);this.promptTextField.set_height(c);this.promptTextField.set_x(this.get_paddingLeft()+f);h=this.promptTextField;switch(this.get_verticalAlign()._hx_index){case 0:h.set_y(this.get_paddingTop());break;case 2:h.set_y(this.actualHeight-this.get_paddingBottom()-c);break;case 3:h.set_y(this.get_paddingTop());break;default:h.set_y(this.get_paddingTop()+(d-c)/2)}}this._ignoreLeftViewResize=a;this._ignoreRightViewResize=
b},alignTextField:function(a,b,c){switch(this.get_verticalAlign()._hx_index){case 0:a.set_y(this.get_paddingTop());break;case 2:a.set_y(this.actualHeight-this.get_paddingBottom()-b);break;case 3:a.set_y(this.get_paddingTop());break;default:a.set_y(this.get_paddingTop()+(c-b)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},refreshErrorString:function(){this.errorStringCallout!=null&&(this.errorStringCallout.set_text(this._errorString),this._currentState==re.FOCUSED&&this.errorStringCallout.parent==null?Ub.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=re.FOCUSED&&this.errorStringCallout.parent!=
null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout))},createErrorCallout:function(){this.destroyErrorCallout();if(this._errorString!=null&&this._errorString.length!=0){var a=this._errorCalloutFactory!=null?this._errorCalloutFactory:Wc.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():
Wc.CHILD_VARIANT_ERROR_CALLOUT);this.errorStringCallout.set_origin(this);this.errorStringCallout.closeOnPointerOutside=!1}},destroyErrorCallout:function(){this.errorStringCallout!=null&&(this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout),this._oldErrorCalloutFactory.destroy!=null&&this._oldErrorCalloutFactory.destroy(this.errorStringCallout),this.errorStringCallout=this._oldErrorCalloutFactory=null)},changeState:function(a){this._enabled||(a=
re.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():wa.prototype.getCurrentFocusRectSkin.call(this)},refreshState:function(){if(this._enabled){var a=this.stage!=null&&this.stage.get_focus()==this.textField,b=this._errorString!=null;a&&(!b||this._focusedStatePriority>=this._errorStatePriority)?this.changeState(re.FOCUSED):
b?this.changeState(re.ERROR):this.changeState(re.ENABLED)}else this.changeState(re.DISABLED)},textInput_textField_changeHandler:function(a){a.stopPropagation();var b=this._text;this._text=this.textField.get_text();a=this._measureText!=null?this._measureText:this._text;if(a==null||a.length==0)a="\u200b";var c=this._text!=null&&this._text.length>0;b=b!=null&&b.length>0;var d=this._prompt!=null&&this._prompt.length>0;this.get_autoSizeWidth()||d&&(!c&&b||c&&!b)?this.setInvalid(x.DATA):(this._previousMeasureText=
a,this._previousText=this._text);W.dispatch(this,"change")},textInput_textField_scrollHandler:function(a){this._scrollX=this.textField.get_scrollH();W.dispatch(this,"scroll")},textInput_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this.textField));this.refreshState()},textInput_focusOutHandler:function(a){this.refreshState()},textInput_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},textInput_promptTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},
textInput_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||this.setInvalid(x.STYLES)},textInput_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(x.STYLES)},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);
return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__showPromptWhenEmptyAndFocused:null,get_showPromptWhenEmptyAndFocused:function(){return this.__showPromptWhenEmptyAndFocused},set_showPromptWhenEmptyAndFocused:function(a){if(!this.setStyle("showPromptWhenEmptyAndFocused")||this.__showPromptWhenEmptyAndFocused==a)return this.__showPromptWhenEmptyAndFocused;this._previousClearStyle=m(this,this.clearStyle_showPromptWhenEmptyAndFocused);
this.__showPromptWhenEmptyAndFocused=a;this.setInvalid(x.STYLES);return this.__showPromptWhenEmptyAndFocused},clearStyle_showPromptWhenEmptyAndFocused:function(){this.set_showPromptWhenEmptyAndFocused(!0);return this.get_showPromptWhenEmptyAndFocused()},__leftView:null,get_leftView:function(){return this.__leftView},set_leftView:function(a){if(!this.setStyle("leftView")||this.__leftView==a)return this.__leftView;this._previousClearStyle=m(this,this.clearStyle_leftView);this.__leftView=a;this.setInvalid(x.STYLES);
return this.__leftView},clearStyle_leftView:function(){this.set_leftView(null);return this.get_leftView()},__leftViewGap:null,get_leftViewGap:function(){return this.__leftViewGap},set_leftViewGap:function(a){if(!this.setStyle("leftViewGap")||this.__leftViewGap==a)return this.__leftViewGap;this._previousClearStyle=m(this,this.clearStyle_leftViewGap);this.__leftViewGap=a;this.setInvalid(x.STYLES);return this.__leftViewGap},clearStyle_leftViewGap:function(){this.set_leftViewGap(0);return this.get_leftViewGap()},
__rightView:null,get_rightView:function(){return this.__rightView},set_rightView:function(a){if(!this.setStyle("rightView")||this.__rightView==a)return this.__rightView;this._previousClearStyle=m(this,this.clearStyle_rightView);this.__rightView=a;this.setInvalid(x.STYLES);return this.__rightView},clearStyle_rightView:function(){this.set_rightView(null);return this.get_rightView()},__rightViewGap:null,get_rightViewGap:function(){return this.__rightViewGap},set_rightViewGap:function(a){if(!this.setStyle("rightViewGap")||
this.__rightViewGap==a)return this.__rightViewGap;this._previousClearStyle=m(this,this.clearStyle_rightViewGap);this.__rightViewGap=a;this.setInvalid(x.STYLES);return this.__rightViewGap},clearStyle_rightViewGap:function(){this.set_rightViewGap(0);return this.get_rightViewGap()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);
this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);
return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__promptTextFormat:null,get_promptTextFormat:function(){return this.__promptTextFormat},set_promptTextFormat:function(a){if(!this.setStyle("promptTextFormat")||this.__promptTextFormat==a)return this.__promptTextFormat;this._previousClearStyle=m(this,this.clearStyle_promptTextFormat);this.__promptTextFormat=a;this.setInvalid(x.STYLES);return this.__promptTextFormat},
clearStyle_promptTextFormat:function(){this.set_promptTextFormat(null);return this.get_promptTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},
__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);
return this.get_verticalAlign()},__autoSizeWidth:null,get_autoSizeWidth:function(){return this.__autoSizeWidth},set_autoSizeWidth:function(a){if(!this.setStyle("autoSizeWidth")||this.__autoSizeWidth==a)return this.__autoSizeWidth;this._previousClearStyle=m(this,this.clearStyle_autoSizeWidth);this.__autoSizeWidth=a;this.setInvalid(x.STYLES);return this.__autoSizeWidth},clearStyle_autoSizeWidth:function(){this.set_autoSizeWidth(!1);return this.get_autoSizeWidth()},__errorFocusRectSkin:null,get_errorFocusRectSkin:function(){return this.__errorFocusRectSkin},
set_errorFocusRectSkin:function(a){if(!this.setStyle("errorFocusRectSkin")||this.__errorFocusRectSkin==a)return this.__errorFocusRectSkin;this._previousClearStyle=m(this,this.clearStyle_errorFocusRectSkin);this.__errorFocusRectSkin=a;this.setInvalid(x.STYLES);return this.__errorFocusRectSkin},clearStyle_errorFocusRectSkin:function(){this.set_errorFocusRectSkin(null);return this.get_errorFocusRectSkin()},__customErrorCalloutVariant:null,get_customErrorCalloutVariant:function(){return this.__customErrorCalloutVariant},
set_customErrorCalloutVariant:function(a){if(!this.setStyle("customErrorCalloutVariant")||this.__customErrorCalloutVariant==a)return this.__customErrorCalloutVariant;this._previousClearStyle=m(this,this.clearStyle_customErrorCalloutVariant);this.__customErrorCalloutVariant=a;this.setInvalid(x.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},get_styleContext:function(){return Wc},
__class__:Wc,__properties__:I(wa.prototype.__properties__,{set_customErrorCalloutVariant:"set_customErrorCalloutVariant",get_customErrorCalloutVariant:"get_customErrorCalloutVariant",set_errorCalloutFactory:"set_errorCalloutFactory",get_errorCalloutFactory:"get_errorCalloutFactory",set_focusedStatePriority:"set_focusedStatePriority",get_focusedStatePriority:"get_focusedStatePriority",set_errorStatePriority:"set_errorStatePriority",get_errorStatePriority:"get_errorStatePriority",set_errorFocusRectSkin:"set_errorFocusRectSkin",
get_errorFocusRectSkin:"get_errorFocusRectSkin",set_autoSizeWidth:"set_autoSizeWidth",get_autoSizeWidth:"get_autoSizeWidth",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_promptTextFormat:"set_promptTextFormat",get_promptTextFormat:"get_promptTextFormat",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",get_errorStringCalloutOpen:"get_errorStringCalloutOpen",
set_errorString:"set_errorString",get_errorString:"get_errorString",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_prompt:"set_prompt",get_prompt:"get_prompt",get_baseline:"get_baseline",set_measureText:"set_measureText",get_measureText:"get_measureText",set_text:"set_text",get_text:"get_text",set_rightViewGap:"set_rightViewGap",get_rightViewGap:"get_rightViewGap",set_rightView:"set_rightView",
get_rightView:"get_rightView",set_leftViewGap:"set_leftViewGap",get_leftViewGap:"get_leftViewGap",set_leftView:"set_leftView",get_leftView:"get_leftView",set_showPromptWhenEmptyAndFocused:"set_showPromptWhenEmptyAndFocused",get_showPromptWhenEmptyAndFocused:"get_showPromptWhenEmptyAndFocused",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",get_currentState:"get_currentState",get_stageFocusTarget:"get_stageFocusTarget",set_selectable:"set_selectable",get_selectable:"get_selectable",
set_editable:"set_editable",get_editable:"get_editable"})});var Iq=function(a){Wc.call(this)};r["com.tilbuci.ui.component.CodeArea"]=Iq;Iq.__name__="com.tilbuci.ui.component.CodeArea";Iq.__super__=Wc;Iq.prototype=I(Wc.prototype,{__class__:Iq});var ge=function(a,b,c,d,f){f==null&&(f=!0);a==null&&(a="");this._ac=null;this.autoResize=!0;Qb.call(this);this.btid=a;this.autoResize=f;c!=null&&this.set_text(c);d!=null&&(a=new cg(d),a.smoothing=!0,a.set_width(a.set_height(20)),this.set_icon(a));b!=null&&(this.addEventListener("click",
b),this._ac=b)};r["com.tilbuci.ui.component.IDButton"]=ge;ge.__name__="com.tilbuci.ui.component.IDButton";ge.__super__=Qb;ge.prototype=I(Qb.prototype,{btid:null,autoResize:null,_ac:null,kill:function(){this.parent!=null&&this.parent.removeChild(this);this._ac!=null&&this.removeEventListener("click",this._ac);this.btid=this._ac=null},__class__:ge});var bc=function(a){a==null&&(a="");this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=fc.TOP;this.__paddingTop=
this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__disabledTextFormat=null;this.__embedFonts=!1;this._currentBackgroundSkin=this._backgroundSkinMeasurements=this.__textFormat=this.__styleSheet=null;this._selectable=!1;this._htmlText=null;this._updatedTextStyles=this._wrappedOnMeasure=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeLabelTheme();wa.call(this);this.set_text(a);this.set_tabEnabled(!1);this.set_tabChildren(!1);
this.addEventListener("focusIn",m(this,this.label_focusInHandler))};r["feathers.controls.Label"]=bc;bc.__name__="feathers.controls.Label";bc.__interfaces__=[hi,ld,kl,de];bc.__super__=wa;bc.prototype=I(wa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==
null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;return this._text!=null&&this._text.length>0||a?this.textField.get_y()+this.textField.getLineMetrics(0).ascent:(this.textField.set_text("\u200b"),a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""),a)},_htmlText:null,
get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.SELECTION);return this._selectable},get_tabEnabled:function(){return this._selectable&&this._enabled?this.get_rawTabEnabled():!1},get_focusEnabled:function(){return this._selectable?
wa.prototype.get_focusEnabled.call(this):!1},get_stageFocusTarget:function(){return this.textField},get_selectionBeginIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionBeginIndex():-1},get_selectionEndIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionEndIndex():-1},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);
this.set_paddingLeft(a)},initializeLabelTheme:function(){du.initialize()},initialize:function(){wa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshTextStyles();(a||f||d||
c)&&this.refreshText(c);(a||f||b)&&this.refreshSelection();this.measure()&&(c=!0);(f||d||a||c)&&this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,
this);var h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();var l=this.get_explicitWidth();a&&(l=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(l=Math.max(this._currentBackgroundSkin.get_width(),l)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight+this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=
null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight+this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),
c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?
this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=
!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.label_textFormat_changeHandler)),this.textField.get_caretIndex()!=-1&&this.textField.get_selectionBeginIndex()!=this.textField.get_selectionEndIndex()&&this.textField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.label_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),
this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this._text!=null&&this._text.length>0,c=this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&
this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),
b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();a<0&&(a=
0);return a},refreshSelection:function(){var a=this._selectable&&this._enabled;this.textField.get_selectable()!=a&&this.textField.set_selectable(a)},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),
this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),
this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackgroundSkin();var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a<0&&(a=0);this.textField.set_x(this.get_paddingLeft());this.textField.set_width(a);var b=this.get_wordWrap();b&&!this._wrappedOnMeasure&&a>=this._textMeasuredWidth&&(b=!1);this.textField.get_wordWrap()!=
b&&this.textField.set_wordWrap(b);a=this._textMeasuredHeight;b=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();a>b&&(a=b);a<0&&(a=0);this.textField.set_height(a);switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this.get_paddingTop());break;case 2:this.textField.set_y(this.actualHeight-this.get_paddingBottom()-a);break;default:this.textField.set_y(this.get_paddingTop()+(b-a)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),
this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},label_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this.textField))},
label_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},
set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;
this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);
this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},
clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},
__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==
a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.TOP);return this.get_verticalAlign()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=
a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);
return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},get_styleContext:function(){return bc},__class__:bc,__properties__:I(wa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",
set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",get_stageFocusTarget:"get_stageFocusTarget",set_selectable:"set_selectable",get_selectable:"get_selectable",
set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"})});var to=function(){this.autoResize=!0;bc.call(this)};r["com.tilbuci.ui.component.IDLabel"]=to;to.__name__="com.tilbuci.ui.component.IDLabel";to.__super__=bc;to.prototype=I(bc.prototype,
{autoResize:null,__class__:to});var ii=function(){};r["feathers.core.IDataSelector"]=ii;ii.__name__="feathers.core.IDataSelector";ii.__isInterface__=!0;ii.prototype={get_selectedItem:null,set_selectedItem:null,__class__:ii,__properties__:{set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem"}};var Vi=function(){};r["feathers.core.IIndexSelector"]=Vi;Vi.__name__="feathers.core.IIndexSelector";Vi.__isInterface__=!0;Vi.prototype={get_selectedIndex:null,set_selectedIndex:null,get_maxSelectedIndex:null,
__class__:Vi,__properties__:{get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex"}};var uo=function(){};r["feathers.dragDrop.IDropTarget"]=uo;uo.__name__="feathers.dragDrop.IDropTarget";uo.__isInterface__=!0;uo.__interfaces__=[qb];var Lq=function(){};r["feathers.dragDrop.IDragSource"]=Lq;Lq.__name__="feathers.dragDrop.IDragSource";Lq.__isInterface__=!0;Lq.__interfaces__=[qb];var vo=function(a,b,c,d){b==null&&(b=-1);this.enabled=!0;
this.selected=!1;this.index=-1;this.data=a;this.index=b;this.selected=!1;this.text=d};r["feathers.data.ListViewItemState"]=vo;vo.__name__="feathers.data.ListViewItemState";vo.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:vo};var Fc=function(a,b){this.__layout=this.__customItemRendererVariant=this.__dragDropIndicatorSkin=null;this.edgeAutoScrollDistance=8;this._dragDropLastUpdateTime=-1;this._droppedOnSelf=!1;this._dragIndex=-1;this._dragItem=
null;this._dragDropLocalX=this._dragDropLocalY=this._dragMinDistance=0;this._dragEnabled=this._dropEnabled=this._removeOnDragDropComplete=!1;this._dragFormat=Fc.DEFAULT_DRAG_FORMAT_ITEMS;this._ignoreSelectionChange=this._ignoreLayoutChanges=!1;this._pendingScrollDuration=null;this._pendingScrollIndex=-1;this._selectable=this._virtualLayout=this.pointerSelectionEnabled=!0;this._layoutItems=[];this._tempVisibleIndices=new Di(0,0);this._visibleIndices=new Di(0,0);this._virtualCache=[];this._unrenderedData=
[];this.itemStatePool=new Tb(function(){return new vo});this.itemRendererToItemState=new Na;this.stringDataToItemRenderer=new aa;this.objectDataToItemRenderer=new Na;this._additionalStorage=null;this._defaultStorage=new Mq(null,He.withClass(Mc));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._previousCustomItemRendererVariant=null;this._selectedItems=[];this._selectedIndices=[];this._selectionAnchorIndex=-1;this._allowMultipleSelection=!1;this._selectedItem=null;this._selectedIndex=-1;
this._childFocusEnabled=!0;this.initializeListViewTheme();ob.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.listViewPort=new Dk,this.addChild(this.listViewPort),this.set_viewPort(this.listViewPort));this.addEventListener("keyDown",m(this,this.listView_keyDownHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.ListView"]=Fc;Fc.__name__="feathers.controls.ListView";Fc.__interfaces__=[uo,Lq,dg,ii,Vi];Fc.defaultUpdateItemRenderer=
function(a,b){u.__implements(a,de)&&a.set_text(b.text)};Fc.defaultResetItemRenderer=function(a,b){u.__implements(a,de)&&a.set_text(null)};Fc.__super__=ob;Fc.prototype=I(ob.prototype,{listViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==
a?this._childFocusEnabled:this._childFocusEnabled=a},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.listView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.listView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",
m(this,this.listView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.listView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.listView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.listView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.listView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",
m(this,this.listView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.listView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.listView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length(),this._dataProvider.addEventListener("change",m(this,this.listView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",
m(this,this.listView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.listView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.listView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.listView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.listView_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",
m(this,this.listView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.listView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.listView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.listView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedIndex(-1);this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},
_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._selectable&&this._dataProvider!=null||(a=-1);if(this._selectedIndex==a&&this._selectedIndices.length<=1)return this._selectedIndex;if(a==-1)return this._selectedIndex=this._selectionAnchorIndex=-1,this._selectedItem=null,this._selectedIndices.length=0,this._selectedItems.length=0,this.setInvalid(x.SELECTION),W.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=
this._dataProvider.get(this._selectedIndex);this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==
null||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b&&this._selectedIndices.length==1)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=
this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_allowMultipleSelection:null,get_allowMultipleSelection:function(){return this._allowMultipleSelection},set_allowMultipleSelection:function(a){if(this._allowMultipleSelection==a)return this._allowMultipleSelection;this._allowMultipleSelection=a;this.setInvalid(x.SELECTION);return this._allowMultipleSelection},_selectionAnchorIndex:null,_selectedIndices:null,get_selectedIndices:function(){return this._selectedIndices},
set_selectedIndices:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedIndices;if(this._selectedIndices==a)return this._selectedIndices;!this._allowMultipleSelection&&a.length>1&&(a.length=1);this._selectedIndices=a;this._selectedIndex=this._selectedIndices[0];this._selectedItems.length=this._selectedIndices.length;a=0;for(var b=this._selectedIndices.length;a<b;){var c=a++;this._selectedItems[c]=this._dataProvider.get(this._selectedIndices[c])}this._selectedItem=
this._selectedItems[0];this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndices},_selectedItems:null,get_selectedItems:function(){return this._selectedItems},set_selectedItems:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItems;if(this._selectedItems==a)return this._selectedItems;!this._allowMultipleSelection&&a.length>1&&(a.length=1);for(var b=
[],c=0;c<a.length;){var d=this._dataProvider.indexOf(a[c]);d==-1?a.splice(c,1):(b.push(d),++c)}this._selectedIndices=b;this._selectedItems=a;a.length==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._selectedItems[0]);this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndices},_previousLayout:null,_previousCustomItemRendererVariant:null,get_itemRendererRecycler:function(){return this._defaultStorage.itemRendererRecycler},
set_itemRendererRecycler:function(a){if(this._defaultStorage.itemRendererRecycler==a)return this._defaultStorage.itemRendererRecycler;this._defaultStorage.oldItemRendererRecycler=this._defaultStorage.itemRendererRecycler;this._defaultStorage.itemRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultStorage.itemRendererRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},
set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_itemRendererRecyclerIDFunction:null,get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=
a;this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,itemRendererToItemState:null,itemStatePool:null,_unrenderedData:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_layoutItems:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;
(this._selectable=a)||this.set_selectedIndex(-1);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_pendingScrollIndex:null,_pendingScrollDuration:null,_ignoreSelectionChange:null,_ignoreLayoutChanges:null,_dragDropIndicatorSkinMeasurements:null,_dragFormat:null,
get_dragFormat:function(){return this._dragFormat},set_dragFormat:function(a){a==null&&(a=Fc.DEFAULT_DRAG_FORMAT_ITEMS);return this._dragFormat==a?this._dragFormat:this._dragFormat=a},_dragEnabled:null,get_dragEnabled:function(){return this._dragEnabled},set_dragEnabled:function(a){if(this._dragEnabled==a)return this._dragEnabled;this._dragEnabled&&this.removeEventListener("dragComplete",m(this,this.listView_dragCompleteHandler));(this._dragEnabled=a)&&this.addEventListener("dragComplete",m(this,
this.listView_dragCompleteHandler));return this._dragEnabled},_dropEnabled:null,get_dropEnabled:function(){return this._dropEnabled},set_dropEnabled:function(a){if(this._dropEnabled==a)return this._dropEnabled;this._dropEnabled&&(this.removeEventListener("dragEnter",m(this,this.listView_dragEnterHandler)),this.removeEventListener("dragExit",m(this,this.listView_dragExitHandler)),this.removeEventListener("dragMove",m(this,this.listView_dragMoveHandler)),this.removeEventListener("dragDrop",m(this,this.listView_dragDropHandler)));
if(this._dropEnabled=a)this.addEventListener("dragEnter",m(this,this.listView_dragEnterHandler)),this.addEventListener("dragExit",m(this,this.listView_dragExitHandler)),this.addEventListener("dragMove",m(this,this.listView_dragMoveHandler)),this.addEventListener("dragDrop",m(this,this.listView_dragDropHandler));return this._dropEnabled},_removeOnDragDropComplete:null,get_removeOnDragDropComplete:function(){return this._removeOnDragDropComplete},set_removeOnDragDropComplete:function(a){return this._removeOnDragDropComplete=
a},_dragDropLocalX:null,_dragDropLocalY:null,_dragMinDistance:null,_dragItem:null,_dragIndex:null,_dragItemRenderer:null,_droppedOnSelf:null,_dragDropLastUpdateTime:null,edgeAutoScrollDistance:null,itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},scrollToIndex:function(a,b){this._dataProvider!=null&&this._dataProvider.get_length()!=0&&(this._pendingScrollIndex=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemToItemRenderer:function(a){return a==null?null:
typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},indexToItemRenderer:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},getItemRendererRecycler:function(a){return this._recyclerMap==
null?null:this._recyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new aa);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];
else{var c=this._dataProvider.indexOf(a);if(c==-1)return null;b=new vo;this.populateCurrentItemState(a,c,b,!1)}return b},dispose:function(){this.refreshInactiveItemRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveItemRenderers(this._additionalStorage[c],!0)}this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);ob.prototype.dispose.call(this)},initializeListViewTheme:function(){gu.initialize()},
update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length())),this.listViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.listViewPort.refreshChildren=
m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.listViewPort.setInvalid(b);this._allInvalid&&this.listViewPort.setInvalid();ob.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){ob.prototype.createScroller.call(this);this.listViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);
if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.listViewPort.get_snapPositionsX();this.scroller.snapPositionsY=
this.listViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight(),
this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultStorage.itemRendererRecycler.update==null&&(this._defaultStorage.itemRendererRecycler.update=Fc.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=Fc.defaultResetItemRenderer));
if(this._recyclerMap!=null){a=this._recyclerMap.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Fc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Fc.defaultResetItemRenderer))}}a=this.listViewPort.isInvalid(Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveItemRenderers(d,
a);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveItemRenderers(d);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultStorage);if(this._defaultStorage.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveItemRenderers(d),d.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers "+d.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active item renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
d.removeEventListener("trigger",m(this,this.listView_itemRenderer_triggerHandler));d.removeEventListener("click",m(this,this.listView_itemRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.listView_itemRenderer_touchTapHandler));d.removeEventListener("change",m(this,this.listView_itemRenderer_changeHandler));d.removeEventListener("resize",m(this,this.listView_itemRenderer_resizeHandler));d.removeEventListener("mouseDown",m(this,this.listView_itemRenderer_mouseDownHandler));this.resetItemRenderer(d,
f,a);a.measurements!=null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._visibleIndices.start=0;this._visibleIndices.end=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=
0){this._layoutItems.length=this._dataProvider.get_length();if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._dataProvider.get_length(),this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=
0,a=this._dataProvider.get_length(),this._visibleIndices.end=a-1;b=this._visibleIndices.start;for(var c=this._visibleIndices.end+1;b<c;){a=b++;var d=this._dataProvider.get(a);var f=typeof d=="string"?this.stringDataToItemRenderer.h[d]:this.objectDataToItemRenderer.h[d.__id__];if(f!=null){var g=this.itemRendererToItemState.h[f.__id__],h=this.populateCurrentItemState(d,a,g,this._forceItemStateUpdate),l=g.recyclerID,k=this.itemStateToStorage(g);if(k.id!=l)this._unrenderedData.push(d);else{h&&this.updateItemRenderer(f,
g,k);f.set_visible(!0);this._layoutItems[a]=f;if(!X.remove(k.inactiveItemRenderers,f))throw b=u.getClass(this),new fb(""+b.__name__+": item renderer map contains bad data for item at index "+a+". This may be caused by duplicate items in the data provider, which is not allowed.");k.activeItemRenderers.push(f)}}else this._unrenderedData.push(d)}}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=
this._selectedIndices.indexOf(b)!=-1;if(d||c.selected!=b)c.selected=b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},resetItemRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldItemRendererRecycler!=null?c.oldItemRendererRecycler:c.itemRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,Fc.RESET_ITEM_STATE)},
updateItemRenderer:function(a,b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,wo)&&(a.set_index(b.index),
a.set_listViewOwner(b.owner));u.__implements(a,ji)&&a.set_layoutIndex(b.index);u.__implements(a,md)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._dataProvider.indexOf(c),f=this.itemStatePool.get();this.populateCurrentItemState(c,d,f,!0);c=this.createItemRenderer(f);c.set_visible(!0);this.listViewPort.addChild(c);this._layoutItems[d]=c}this._unrenderedData.length=0},createItemRenderer:function(a){var b=
this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();if(u.__implements(c,If)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Fc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}u.__implements(c,jb)&&c.initializeNow();b.measurements==null&&(b.measurements=new Ib(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);u.__implements(c,Fh)?c.addEventListener("trigger",
m(this,this.listView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.listView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.listView_itemRenderer_touchTapHandler)));u.__implements(c,md)&&c.addEventListener("change",m(this,this.listView_itemRenderer_changeHandler));u.__implements(c,Kb)&&c.addEventListener("resize",m(this,this.listView_itemRenderer_resizeHandler));c.addEventListener("mouseDown",m(this,this.listView_itemRenderer_mouseDownHandler));this.itemRendererToItemState.set(c,
a);d=a.data;typeof d=="string"?this.stringDataToItemRenderer.h[d]=c:this.objectDataToItemRenderer.set(a.data,c);b.activeItemRenderers.push(c);return c},destroyItemRenderer:function(a,b){this.listViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemStateToStorage:function(a){var b=null;this._itemRendererRecyclerIDFunction!=null&&(b=this._itemRendererRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new fb('Item renderer recycler ID "'+
b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.itemRendererRecycler==a)return f}f=new Mq(b,a);this._additionalStorage.push(f);return f},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},handleSelectionChange:function(a,b,c,d){if(b!=
-1&&this._selectable){var f=this._selectedItems.indexOf(a);if(this._allowMultipleSelection&&(c||d))if(d){a=this._selectionAnchorIndex;a==-1&&(a=0);f=[];if(b==a)f.unshift(a);else{c=a;do f.unshift(c),c+=a>b?-1:1;while(c!=b);b!=a&&f.unshift(b)}this.set_selectedIndices(f);this._selectionAnchorIndex=a}else f==-1?(c=this._selectedItems.slice(),c.unshift(a)):(c=this._selectedItems.slice(),c.splice(f,1)),this.set_selectedItems(c),this._selectionAnchorIndex=b;else this.set_selectedItem(a);b!=-1&&this.scrollToIndex(b)}else this.set_selectedItem(null)},
handlePendingScroll:function(){if(this._pendingScrollIndex!=-1){var a=this._pendingScrollIndex,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollIndex=-1;this._pendingScrollDuration=null;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(u.__implements(this.get_layout(),Oe))d=this.get_layout().getNearestScrollPositionForIndex(a,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),
c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},refreshDragDropIndexIndicator:function(){if(this.get_dragDropIndicatorSkin()!=
null&&u.__implements(this.get_layout(),Wi)){u.__implements(this.get_dragDropIndicatorSkin(),jb)&&this.get_dragDropIndicatorSkin().initializeNow();this._dragDropIndicatorSkinMeasurements==null?this._dragDropIndicatorSkinMeasurements=new Ib(this.get_dragDropIndicatorSkin()):this._dragDropIndicatorSkinMeasurements.save(this.get_dragDropIndicatorSkin());var a=this.get_scrollX()+this._dragDropLocalX-this.leftViewPortOffset,b=this.get_scrollY()+this._dragDropLocalY-this.topViewPortOffset,c=this.get_layout(),
d=c.getDragDropIndex(this._layoutItems,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());a=c.getDragDropRegion(this._layoutItems,d,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());this.get_dragDropIndicatorSkin().set_x(a.x-this.get_scrollX()+this.leftViewPortOffset);this.get_dragDropIndicatorSkin().set_y(a.y-this.get_scrollY()+this.topViewPortOffset);a.width==0?this.get_dragDropIndicatorSkin().set_height(a.height):this.get_dragDropIndicatorSkin().set_width(a.width);
this.addChild(this.get_dragDropIndicatorSkin())}},listView_itemRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];Kh.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_clickHandler:function(a){if(this._enabled){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];
Kh.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_triggerHandler:function(a){if(this._enabled){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];Kh.dispatch(this,"itemTrigger",b);this._selectable&&this.handleSelectionChange(b.data,b.index,a.ctrlKey,a.shiftKey)}},listView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},
listView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,ea);a=u.__cast(b,md);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},listView_itemRenderer_mouseDownHandler:function(a){if(this._enabled&&this._dragEnabled&&this.stage!=null){a=u.__cast(a.currentTarget,ea);var b=this.itemRendererToItemState.h[a.__id__];b!=null&&(this._dragItemRenderer=a,this._dragItem=b.data,this._dragIndex=b.index,
this._dragDropLocalX=this.get_mouseX(),this._dragDropLocalY=this.get_mouseY(),this._dragMinDistance=6,this.stage.addEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.listView_stage_pressAndMove_mouseUpHandler),!1,0,!0))}},listView_stage_pressAndMove_mouseMoveHandler:function(a){var b=this.get_mouseX()-this._dragDropLocalX,c=this.get_mouseY()-this._dragDropLocalY;if(b>this._dragMinDistance||c>this._dragMinDistance){a=
u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.listView_stage_pressAndMove_mouseUpHandler));a=[];b=this._allowMultipleSelection?this._selectedIndices.slice():[];b.indexOf(this._dragIndex)==-1&&b.push(this._dragIndex);b.sort(function(f,g){return f<g?-1:f>g?1:0});for(c=0;c<b.length;){var d=b[c];++c;a.push(this._dataProvider.get(d))}b=new Nq;b.set(this._dragFormat,a);a=this.itemRendererToItemState.h[this._dragItemRenderer.__id__];
c=this.itemStateToStorage(a);d=c.itemRendererRecycler.create();this.updateItemRenderer(d,a,c);d.set_width(this._dragItemRenderer.get_width());d.set_height(this._dragItemRenderer.get_height());Va.startDrag(this,b,d,-this._dragItemRenderer.get_mouseX(),-this._dragItemRenderer.get_mouseY())}},listView_stage_pressAndMove_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.listView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",
m(this,this.listView_stage_pressAndMove_mouseUpHandler));this._dragItem=null;this._dragIndex=-1;this._dragItemRenderer=null},listView_dragCompleteHandler:function(a){if(a.dropped)if(this._droppedOnSelf)this._droppedOnSelf=!1;else if(this._removeOnDragDropComplete){a=u.__cast(a.dragData.get(this._dragFormat),Array);for(var b=0;b<a.length;){var c=a[b];++b;this._dataProvider.remove(c)}}},listView_dragEnterHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(a.acceptDrag(this),
this.showFocus(!0),this._dragDropLocalX=a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator(),this._dragDropLastUpdateTime=Oa.getTimer(),this.addEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler)))},listView_dragExitHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.get_dragDropIndicatorSkin().parent==this&&this.removeChild(this.get_dragDropIndicatorSkin()));
this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler))},listView_dragScroll_enterFrameHandler:function(a){a=Oa.getTimer();var b=a-this._dragDropLastUpdateTime;this._dragDropLastUpdateTime=a;a=this._dragDropLocalX-this.leftViewPortOffset;var c=this._dragDropLocalY-this.topViewPortOffset;b/=2;this.get_maxScrollY()>this.get_minScrollY()&&(b=this.get_scrollY()<this.get_maxScrollY()&&c>this._viewPort.get_visibleHeight()-
this.edgeAutoScrollDistance?b*(1-(this._viewPort.get_visibleHeight()-c)/this.edgeAutoScrollDistance):this.get_scrollY()>this.get_minScrollY()&&c<this.edgeAutoScrollDistance?b*-(1-c/this.edgeAutoScrollDistance):0,b!=0&&(c=this.get_scrollY()+b,c>this.get_maxScrollY()?c=this.get_maxScrollY():c<this.get_minScrollY()&&(c=this.get_minScrollY()),this.set_scrollY(c)));this.get_maxScrollX()>this.get_minScrollX()&&(b=this.get_scrollX()<this.get_maxScrollX()&&a>this._viewPort.get_visibleWidth()-this.edgeAutoScrollDistance?
b*(1-(this._viewPort.get_visibleWidth()-a)/this.edgeAutoScrollDistance):this.get_scrollX()>this.get_minScrollX()&&a<this.edgeAutoScrollDistance?b*-(1-a/this.edgeAutoScrollDistance):0,b!=0&&(a=this.get_scrollX()+b,a>this.get_maxScrollX()?a=this.get_maxScrollX():a<this.get_minScrollX()&&(a=this.get_minScrollX()),this.set_scrollX(a)));this.refreshDragDropIndexIndicator()},listView_dragMoveHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(this._dragDropLocalX=
a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator())},listView_dragDropHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&this.get_dragDropIndicatorSkin().parent==this&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.removeChild(this.get_dragDropIndicatorSkin()));this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.listView_dragScroll_enterFrameHandler));this._droppedOnSelf=!1;
if(this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)){var b=u.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(u.__implements(this.get_layout(),Wi)){c=this.get_layout();var d=this.get_scrollX()+a.localX-this.leftViewPortOffset,f=this.get_scrollY()+a.localY-this.topViewPortOffset;c=c.getDragDropIndex(this._layoutItems,d,f,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight())}d=0;if(a.dragSource==this){for(a=0;a<b.length;)f=b[a],
++a,f=this._dataProvider.indexOf(f),f<c&&--d,this._dataProvider.removeAt(f);this._droppedOnSelf=!0}a=0;for(var g=b.length;a<g;){var h=a++;f=b[h];this._dataProvider.addAt(f,c+d+h)}}},listView_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},listView_dataProvider_addItemHandler:function(a){this._virtualCache!=null&&this._virtualCache.splice(a.index,0,null);if(this._selectedIndex!=-1){for(var b=!1,c=0,d=this._selectedIndices.length;c<d;){var f=c++,g=this._selectedIndices[f];g>=a.index&&
(this._selectedIndices[f]=g+1,b=!0)}b&&(this._selectedIndex=this._selectedIndices[0],W.dispatch(this,"change"))}},listView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&X.remove(this._virtualCache,a.index);if(this.get_selectedIndex()!=-1){for(var b=!1,c=this._selectedIndices.length-1;c>=0;){var d=this._selectedIndices[c];d==a.index?(this._selectedIndices.splice(c,1),this._selectedItems.splice(c,1),b=!0):d>a.index&&(this._selectedIndices[c]=d-1,b=!0);--c}b&&(this._selectedIndices.length>
0?(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._dataProvider.get(this._selectedIndex)):(this._selectedIndex=-1,this._selectedItem=null),W.dispatch(this,"change"))}},listView_dataProvider_replaceItemHandler:function(a){this._virtualCache!=null&&(this._virtualCache[a.index]=null);if(this._selectedIndex!=-1)for(var b=0,c=this._selectedIndices.length;b<c;){var d=b++,f=this._selectedIndices[d];if(f==a.index){this._selectedItems[d]=this._dataProvider.get(f);this._selectedItem=this._selectedItems[0];
W.dispatch(this,"change");break}}},listView_dataProvider_removeAllHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0);this.set_selectedIndex(-1)},listView_dataProvider_resetHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.set_selectedIndex(-1)},listView_dataProvider_sortChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());
this.refreshSelectedIndicesAfterFilterOrSort()},listView_dataProvider_filterChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},updateItemRendererForIndex:function(a){this._virtualCache!=null&&(this._virtualCache[a]=null);var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToItemRenderer.h[b]:this.objectDataToItemRenderer.h[b.__id__];if(c==null)this.setInvalid(x.DATA);
else{var d=this.itemRendererToItemState.h[c.__id__];if(d.owner!=null){var f=this.itemStateToStorage(d);this.populateCurrentItemState(b,a,d,!0);this.resetItemRenderer(c,d,f);f.measurements!=null&&f.measurements.restore(c);d.owner=null;this.setInvalid(x.DATA)}}},listView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForIndex(a.index)},listView_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateItemRendererForIndex(c)}},
navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;if(u.__implements(this.get_layout(),wj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;b=u.__cast(this.get_layout(),wj).findNextKeyboardIndex(b,a,!1,this._layoutItems,null,this.listViewPort.get_visibleWidth(),this.listViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--b;
break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&(b=this._dataProvider.get_length()-1);var c=this._selectedIndex!=b;if(!c&&b!=-1)if(this.itemToItemRenderer(this._dataProvider.get(b))==null)c=!0;else if(u.__implements(this.get_layout(),Oe)){var d=this.get_layout().getNearestScrollPositionForIndex(b,this._dataProvider.get_length(),
this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight());if(this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)c=!0}c&&(a.preventDefault(),this.set_selectedIndex(b),this._selectedIndex!=-1&&this.scrollToIndex(this._selectedIndex),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof
Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):ob.prototype.baseScrollContainer_keyDownHandler.call(this,a)},listView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selectedItem!=null){var b=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:this.objectDataToItemRenderer.h[this._selectedItem.__id__];a=null;b!=null&&(a=this.itemRendererToItemState.h[b.__id__]);b=!1;a==null&&(b=
!0,a=this.itemStatePool.get());this.populateCurrentItemState(this._selectedItem,this._selectedIndex,a,!0);Kh.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},get_styleContext:function(){return Fc},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);
return this.get_layout()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);
return this.get_customItemRendererVariant()},__dragDropIndicatorSkin:null,get_dragDropIndicatorSkin:function(){return this.__dragDropIndicatorSkin},set_dragDropIndicatorSkin:function(a){if(!this.setStyle("dragDropIndicatorSkin")||this.__dragDropIndicatorSkin==a)return this.__dragDropIndicatorSkin;this._previousClearStyle=m(this,this.clearStyle_dragDropIndicatorSkin);this.__dragDropIndicatorSkin=a;this.setInvalid(x.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);
return this.get_dragDropIndicatorSkin()},__class__:Fc,__properties__:I(ob.prototype.__properties__,{set_removeOnDragDropComplete:"set_removeOnDragDropComplete",get_removeOnDragDropComplete:"get_removeOnDragDropComplete",set_dropEnabled:"set_dropEnabled",get_dropEnabled:"get_dropEnabled",set_dragEnabled:"set_dragEnabled",get_dragEnabled:"get_dragEnabled",set_dragFormat:"set_dragFormat",get_dragFormat:"get_dragFormat",set_dragDropIndicatorSkin:"set_dragDropIndicatorSkin",get_dragDropIndicatorSkin:"get_dragDropIndicatorSkin",
set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_customItemRendererVariant:"set_customItemRendererVariant",
get_customItemRendererVariant:"get_customItemRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItems:"set_selectedItems",get_selectedItems:"get_selectedItems",set_selectedIndices:"set_selectedIndices",get_selectedIndices:"get_selectedIndices",set_allowMultipleSelection:"set_allowMultipleSelection",get_allowMultipleSelection:"get_allowMultipleSelection",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",
get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var Qd=function(a,b){this._previousCustomButtonVariant=this._previousCustomListViewVariant=this.__popUpAdapter=this.__customButtonVariant=this.__customListViewVariant=null;this._itemRendererRecycler=He.withClass(Mc);this._selectedItem=null;this._selectedIndex=-1;this._ignoreListViewChange=!1;this.buttonMeasurements=
new Ib;this.initializePopUpListViewTheme();wa.call(this);this.set_dataProvider(a);this.addEventListener("focusIn",m(this,this.popUpListView_focusInHandler));this.addEventListener("removedFromStage",m(this,this.popUpListView_removedFromStageHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.PopUpListView"]=Qd;Qd.__name__="feathers.controls.PopUpListView";Qd.__interfaces__=[hi,ii,Vi];Qd.__super__=wa;Qd.prototype=I(wa.prototype,{button:null,listView:null,buttonMeasurements:null,
get_stageFocusTarget:function(){return this.button},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._dataProvider!=null&&this._dataProvider.removeEventListener("removeAll",m(this,this.popUpListView_dataProvider_removeAllHandler));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&this._dataProvider.addEventListener("removeAll",m(this,this.popUpListView_dataProvider_removeAllHandler));
this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),W.dispatch(this,"change");this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_ignoreListViewChange:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==
null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),
this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_itemRendererRecycler:null,
get_itemRendererRecycler:function(){return this._itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._itemRendererRecycler==a)return this._itemRendererRecycler;this._itemRendererRecycler=a;this.setInvalid(x.DATA);return this._itemRendererRecycler},itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},_previousCustomButtonVariant:null,_previousCustomListViewVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},
set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;this._buttonFactory=a;this.setInvalid(Qd.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldListViewFactory:null,_listViewFactory:null,get_listViewFactory:function(){return this._listViewFactory},set_listViewFactory:function(a){if(this._listViewFactory==a)return this._listViewFactory;this._listViewFactory=a;this.setInvalid(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);return this._listViewFactory},get_open:function(){return this.listView!=
null?this.listView.parent!=null:!1},showFocus:function(a){wa.prototype.showFocus.call(this,a);this.button!=null&&this.button.showFocus(a)},openListView:function(){this.get_open()||this.stage==null||(this.validateNow(),this.get_popUpAdapter()!=null?(this.get_popUpAdapter().addEventListener("open",m(this,this.popUpListView_popUpAdapter_openHandler)),this.get_popUpAdapter().addEventListener("close",m(this,this.popUpListView_popUpAdapter_closeHandler)),this.get_popUpAdapter().open(this.listView,this.button)):
(Ub.addPopUp(this.listView,this.button),W.dispatch(this,"open")),this.listView.validateNow(),this.button.addEventListener("focusOut",m(this,this.popUpListView_button_focusOutHandler)),this.listView.addEventListener("removedFromStage",m(this,this.popUpListView_listView_removedFromStageHandler)),this.listView.addEventListener("focusOut",m(this,this.popUpListView_listView_focusOutHandler)),this.listView.addEventListener("keyFocusChange",m(this,this.popUpListView_listView_keyFocusChangeHandler)),this.listView.addEventListener("mouseFocusChange",
m(this,this.popUpListView_listView_mouseFocusChangeHandler)),this.stage.addEventListener("mouseDown",m(this,this.popUpListView_stage_mouseDownHandler),!1,0,!0),this.stage.addEventListener("touchBegin",m(this,this.popUpListView_stage_touchBeginHandler),!1,0,!0),this.listView.scrollToIndex(this._selectedIndex),this.listView.get_focusManager()!=null?this.listView.get_focusManager().set_focus(this.listView):this.stage.set_focus(this.listView))},closeListView:function(){if(this.get_open()){if(this._focusManager==
null&&(this.stage!=null&&this.stage.set_focus(this),!this.get_open()))return;this.get_popUpAdapter()!=null?this.get_popUpAdapter().close():(this.listView.parent.removeChild(this.listView),W.dispatch(this,"close"))}},dispose:function(){this.destroyButton();this.destroyListView();this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);wa.prototype.dispose.call(this)},initializePopUpListViewTheme:function(){ku.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),
c=this.isInvalid(x.STATE);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Qd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&this.setInvalidationFlag(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(Qd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);d&&this.createButton();f&&this.createListView();(a||f)&&this.refreshListViewData();(b||f||d)&&this.refreshSelection();
(c||f||d)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomListViewVariant=this.get_customListViewVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:Qd.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Qd.CHILD_VARIANT_BUTTON);
this.button.addEventListener("mouseDown",m(this,this.popUpListView_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.popUpListView_button_touchBeginHandler));this.button.addEventListener("keyDown",m(this,this.popUpListView_button_keyDownHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",m(this,this.popUpListView_button_mouseDownHandler)),
this.button.removeEventListener("touchBegin",m(this,this.popUpListView_button_touchBeginHandler)),this.button.removeEventListener("keyDown",m(this,this.popUpListView_button_keyDownHandler)),this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createListView:function(){this.destroyListView();var a=this._listViewFactory!=null?this._listViewFactory:Qd.defaultListViewFactory;this._oldListViewFactory=a;
this.listView=a.create();this.listView.get_variant()==null&&this.listView.set_variant(this.get_customListViewVariant()!=null?this.get_customListViewVariant():Qd.CHILD_VARIANT_LIST_VIEW);this.listView.set_focusOwner(this);this.listView.addEventListener("change",m(this,this.popUpListView_listView_changeHandler));this.listView.addEventListener("itemTrigger",m(this,this.popUpListView_listView_itemTriggerHandler));this.listView.addEventListener("keyUp",m(this,this.popUpListView_listView_keyUpHandler))},
destroyListView:function(){this.listView!=null&&(this.listView.removeEventListener("change",m(this,this.popUpListView_listView_changeHandler)),this.listView.removeEventListener("itemTrigger",m(this,this.popUpListView_listView_itemTriggerHandler)),this.listView.removeEventListener("keyUp",m(this,this.popUpListView_listView_keyUpHandler)),this._oldListViewFactory.destroy!=null&&this._oldListViewFactory.destroy(this.listView),this.listView=this._oldListViewFactory=null)},refreshListViewData:function(){var a=
this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_dataProvider(this._dataProvider);this._ignoreListViewChange=a;this.listView.set_itemRendererRecycler(this._itemRendererRecycler);this.listView.itemToEnabled=m(this,this.itemToEnabled);this.listView.itemToText=m(this,this.itemToText)},refreshSelection:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_selectedIndex(this._selectedIndex);this._ignoreListViewChange=a;this._selectedItem!=
null?this.button.set_text(this.itemToText(this._selectedItem)):this._prompt!=null?this.button.set_text(this._prompt):this.button.set_text("")},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.listView.set_enabled(this._enabled)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||
f||g))return!1;Ne.resetFluidlyWithParent(this.buttonMeasurements,this.button,this);this.button.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width());a=this.get_explicitHeight();b&&(a=this.button.get_height());b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth());c=this.get_explicitMinHeight();d&&(c=this.button.get_minHeight());return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.get_width()!=this.actualWidth&&this.button.set_width(this.actualWidth);
this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);this.button.validateNow()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b)}},popUpListView_button_keyDownHandler:function(a){this._enabled&&(this.get_open()||a.keyLocation==4||this.navigateWithKeyboard(a),a.keyCode==32||a.keyCode==13)&&(this.get_open()?(a.preventDefault(),this.closeListView()):(a.preventDefault(),this.openListView()))},popUpListView_button_mouseDownHandler:function(a){this._enabled&&(this.get_open()?this.closeListView():this.openListView())},popUpListView_button_touchBeginHandler:function(a){this._enabled&&
(a.isPrimaryTouchPoint||(this.get_open()?this.closeListView():this.openListView()))},popUpListView_listView_itemTriggerHandler:function(a){this.dispatchEvent(a);this.get_popUpAdapter()!=null&&this.get_popUpAdapter().get_persistent()||this.closeListView()},popUpListView_listView_changeHandler:function(a){this._ignoreListViewChange||(this._selectedIndex=this.listView.get_selectedIndex(),this._selectedItem=this.listView.get_selectedItem(),this.setInvalid(x.SELECTION),W.dispatch(this,"change"))},popUpListView_listView_removedFromStageHandler:function(a){this.button.removeEventListener("focusOut",
m(this,this.popUpListView_button_focusOutHandler));this.listView.removeEventListener("removedFromStage",m(this,this.popUpListView_listView_removedFromStageHandler));this.listView.removeEventListener("focusOut",m(this,this.popUpListView_listView_focusOutHandler));this.listView.removeEventListener("keyFocusChange",m(this,this.popUpListView_listView_keyFocusChangeHandler));this.listView.removeEventListener("mouseFocusChange",m(this,this.popUpListView_listView_mouseFocusChangeHandler));this.stage.removeEventListener("mouseDown",
m(this,this.popUpListView_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.popUpListView_stage_touchBeginHandler))},popUpListView_listView_mouseFocusChangeHandler:function(a){this.listView.get_focusManager()!=null||a.isDefaultPrevented()||ef.__neq(a.target,this.listView)||a.relatedObject!=null&&!this.listView.contains(a.relatedObject)||a.preventDefault()},popUpListView_listView_keyFocusChangeHandler:function(a){this.listView.get_focusManager()!=null||a.isDefaultPrevented()||
ef.__neq(a.target,this.listView)||(a.preventDefault(),this.stage!=null&&this.stage.set_focus(this.button))},popUpListView_listView_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},popUpListView_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this.button&&(a.stopImmediatePropagation(),this.stage.set_focus(this.button))},popUpListView_button_focusOutHandler:function(a){(a.relatedObject==
null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},popUpListView_removedFromStageHandler:function(a){this.closeListView()},popUpListView_listView_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeListView();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeListView())}},popUpListView_stage_mouseDownHandler:function(a){this.button.hitTestPoint(a.stageX,
a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},popUpListView_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.button.hitTestPoint(a.stageX,a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},popUpListView_popUpAdapter_openHandler:function(a){W.dispatch(this,"open")},popUpListView_popUpAdapter_closeHandler:function(a){W.dispatch(this,"close")},popUpListView_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},
__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},clearStyle_popUpAdapter:function(){this.set_popUpAdapter(null);return this.get_popUpAdapter()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},
set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__customListViewVariant:null,get_customListViewVariant:function(){return this.__customListViewVariant},
set_customListViewVariant:function(a){if(!this.setStyle("customListViewVariant")||this.__customListViewVariant==a)return this.__customListViewVariant;this._previousClearStyle=m(this,this.clearStyle_customListViewVariant);this.__customListViewVariant=a;this.setInvalid(x.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);return this.get_customListViewVariant()},get_styleContext:function(){return Qd},__class__:Qd,__properties__:I(wa.prototype.__properties__,
{get_open:"get_open",set_listViewFactory:"set_listViewFactory",get_listViewFactory:"get_listViewFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customListViewVariant:"set_customListViewVariant",get_customListViewVariant:"get_customListViewVariant",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_itemRendererRecycler:"set_itemRendererRecycler",
get_itemRendererRecycler:"get_itemRendererRecycler",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",get_stageFocusTarget:"get_stageFocusTarget"})});var Hq=function(){this.autoResize=!0;Qd.call(this)};r["com.tilbuci.ui.component.IDPopUpListView"]=
Hq;Hq.__name__="com.tilbuci.ui.component.IDPopUpListView";Hq.__super__=Qd;Hq.prototype=I(Qd.prototype,{autoResize:null,__class__:Hq});var Gq=function(){this.autoResize=!0;Wc.call(this)};r["com.tilbuci.ui.component.IDTextInput"]=Gq;Gq.__name__="com.tilbuci.ui.component.IDTextInput";Gq.__super__=Wc;Gq.prototype=I(Wc.prototype,{autoResize:null,__class__:Gq});var Oq=function(){this._current=0;this._icons=[];yd.call(this);this.set_width(this.set_height(150));var a=new db;a.set_fill(Ab.SolidColor(0,0));
this.set_backgroundSkin(a);for(a=1;a<8;){var b=a++;b=new cg(Sc.getBitmapData("tilBuci0"+b));b.smoothing=!0;b.set_alpha(.5);b.set_x((150-b.get_width())/2);b.set_y((150-b.get_height())/2);this._icons.push(b)}};r["com.tilbuci.ui.component.Interacting"]=Oq;Oq.__name__="com.tilbuci.ui.component.Interacting";Oq.__super__=yd;Oq.prototype=I(yd.prototype,{_icons:null,_current:null,_timer:null,start:function(){var a=this;if(this._timer!=null){try{this._timer.stop()}catch(b){}this._timer=null}this._timer=new rd(250);
this._timer.run=function(){a._current++;a._current>=a._icons.length&&(a._current=0);a.removeChildren();a.addChild(a._icons[a._current])};t.stage!=null&&Ub.addPopUp(this,t.stage)},stop:function(){if(this._timer!=null){try{this._timer.stop()}catch(a){}this._timer=null}t.stage!=null&&Ub.removePopUp(this)},__class__:Oq});var lq=function(a){Ug.call(this,a,t.ln.get("window-actions-title"),980,Zl.pickValue(540,560),!1,!0)};r["com.tilbuci.ui.component.WindowAction"]=lq;lq.__name__="com.tilbuci.ui.component.WindowAction";
lq.__super__=Ug;lq.prototype=I(Ug.prototype,{_acarea:null,_acok:null,_accancel:null,startInterface:function(a){this._acarea=new Kq(956,446);a=this.ui.createHContainer("buttons");this.ui.createButton("btcancel",t.ln.get("window-actions-cancel"),m(this,this.onCancel),a,!1);this.ui.createButton("btok",t.ln.get("window-actions-ok"),m(this,this.onOk),a,!1);a.setWidth(956);this.addForm(t.ln.get("window-actions-title"),this.ui.forge("ac",[{tp:"Custom",cont:this._acarea},{tp:"Custom",cont:a}],-1,450));Ug.prototype.startInterface.call(this)},
setContent:function(a,b,c){this._acarea.setText(a);this._acok=b;this._accancel=c},kill:function(){Ug.prototype.kill.call(this)},onCancel:function(a){this._accancel!=null&&this._accancel();this._acok=this._accancel=null;this.closeWindow(null)},onOk:function(a){a=mb.jsonParse(this._acarea.getText());this._acarea.getText()!=""&&a==0?t.showPopup(t.ln.get("window-actions-title"),t.ln.get("window-actions-error"),300,180,t.ln.get("default-ok")):(this._acok!=null&&this._acok(this._acarea.getText()),this._acok=
this._accancel=null,this.closeWindow(null))},__class__:lq});var mq=function(a){Ug.call(this,a,t.ln.get("window-actions-block"),980,Zl.pickValue(540,550),!1,!0);a=this.ui;var b=this.ui.forge("left",[{tp:"Label",id:"groups",tx:t.ln.get("window-actions-blockgroups"),vr:""},{tp:"List",id:"groups",vl:[],sl:"",ht:440,ch:m(this,this.onGroupChange)}]),c=this.ui,d={tp:"Label",id:"available",tx:t.ln.get("window-actions-blockavailable"),vr:""},f=t.ln.get("window-actions-blockcreate");this.addForm("blocks",a.createColumnHolder("available",
b,c.forge("right",[d,{tp:"List",id:"available",vl:[],sl:"",ht:410},{tp:"Button",id:"add",tx:f,ac:m(this,this.onCreate)}])));this.ui.listDbClick("available",m(this,this.onCreate))};r["com.tilbuci.ui.component.WindowActionBlock"]=mq;mq.__name__="com.tilbuci.ui.component.WindowActionBlock";mq.__super__=Ug;mq.prototype=I(Ug.prototype,{_onOk:null,acStart:function(){for(var a=[],b=0,c=0,d=t.acInfo.groups;c<d.length;){var f=d[c];++c;a.push({text:f.name,value:b});++b}this.ui.setListValues("groups",a);this.ui.setListValues("available",
[]);this.ui.setListSelectValue("groups",null);this.ui.setListSelectValue("available",null)},setContent:function(a){this._onOk=a;this.acStart()},onCreate:function(a){this.ui.lists.h.available.get_selectedItem()!=null&&(t.showEditBlockWindow(this.ui.lists.h.available.get_selectedItem().value,this._onOk),this._onOk=null,Ub.removePopUp(this))},onGroupChange:function(a){this.ui.setListValues("available",[]);this.ui.setListSelectValue("available",null);if(this.ui.lists.h.groups.get_selectedItem()!=null&&
t.acInfo.groups.length>this.ui.lists.h.groups.get_selectedItem().value){a=[];for(var b=t.acInfo.groups[this.ui.lists.h.groups.get_selectedItem().value].actions.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push({text:g.n,value:g.a})}this.ui.setListValues("available",a)}},__class__:mq});var nq=function(a){this._aShaders=[];this._mnPlacement=[];this._scDirections=[];this._mvOrigins=[];this._blindex=-1;Ug.call(this,a,"",1100,Zl.pickValue(570,580),!1,!0);this._mvOrigins=[{text:t.ln.get("window-movieprop-oralpha"),
value:"alpha"},{text:t.ln.get("window-movieprop-orcenter"),value:"center"},{text:t.ln.get("window-movieprop-ortop"),value:"top"},{text:t.ln.get("window-movieprop-ortopkeep"),value:"topkeep"},{text:t.ln.get("window-movieprop-orbottom"),value:"bottom"},{text:t.ln.get("window-movieprop-orbottomkeep"),value:"bottomkeep"},{text:t.ln.get("window-movieprop-orleft"),value:"left"},{text:t.ln.get("window-movieprop-orleftkeep"),value:"leftkeep"},{text:t.ln.get("window-movieprop-orright"),value:"right"},{text:t.ln.get("window-movieprop-orrightkeep"),
value:"rightkeep"}];this._scDirections=[{text:t.ln.get("window-movieprop-input-opup"),value:"up"},{text:t.ln.get("window-movieprop-input-opdown"),value:"down"},{text:t.ln.get("window-movieprop-input-opleft"),value:"left"},{text:t.ln.get("window-movieprop-input-opright"),value:"right"},{text:t.ln.get("window-movieprop-input-opnin"),value:"nin"},{text:t.ln.get("window-movieprop-input-opnout"),value:"nout"}];this._mnPlacement=[{text:t.ln.get("placement-center"),value:"center"},{text:t.ln.get("placement-centerleft"),
value:"centerleft"},{text:t.ln.get("placement-centerright"),value:"centerright"},{text:t.ln.get("placement-top"),value:"top"},{text:t.ln.get("placement-topleft"),value:"topleft"},{text:t.ln.get("placement-topright"),value:"topright"},{text:t.ln.get("placement-bottom"),value:"bottom"},{text:t.ln.get("placement-bottomleft"),value:"bottomleft"},{text:t.ln.get("placement-bottomright"),value:"bottomright"},{text:t.ln.get("placement-absolute"),value:"absolute"}];this._aShaders=[{text:t.ln.get("sharders-none"),
value:"none"},{text:t.ln.get("sharders-deuteranotopia"),value:"deuteranotopia"},{text:t.ln.get("sharders-protonatopia"),value:"protonatopia"},{text:t.ln.get("sharders-tritanotopia"),value:"tritanotopia"},{text:t.ln.get("sharders-contrast"),value:"contrast"},{text:t.ln.get("sharders-grayscale"),value:"grayscale"}];this.ui.createHContainer("assets");this.ui.createSelect("assets",[],null,this.ui.hcontainers.h.assets,!1);this.ui.hcontainers.h.assets.addChild(new ge("cpasset",m(this,this.onAsset),t.ln.get("window-acinstance-cpasset"),
Sc.getBitmapData("btCopy"),!1));this.ui.createHContainer("ggeneral");this.ui.createSelect("ggeneral",[{text:t.ln.get("window-globals-playing"),value:"?_PLAYING",asset:"btBool"},{text:t.ln.get("window-globals-userlogged"),value:"?_USERLOGGED",asset:"btBool"},{text:t.ln.get("window-globals-hadinteraction"),value:"?_HADINTERACTION",asset:"btBool"},{text:t.ln.get("window-globals-server"),value:"?_SERVER",asset:"btBool"},{text:t.ln.get("window-globals-keyframe"),value:"#_KEYFRAME",asset:"btFloat"},{text:t.ln.get("window-globals-areabig"),
value:"#_AREABIG",asset:"btFloat"},{text:t.ln.get("window-globals-areasmall"),value:"#_AREASMALL",asset:"btFloat"},{text:t.ln.get("window-globals-contentx"),value:"#_CONTENTX",asset:"btFloat"},{text:t.ln.get("window-globals-contenty"),value:"#_CONTENTY",asset:"btFloat"},{text:t.ln.get("window-globals-contentwidth"),value:"#_CONTENTWIDTH",asset:"btFloat"},{text:t.ln.get("window-globals-contentheight"),value:"#_CONTENTHEIGHT",asset:"btFloat"},{text:t.ln.get("window-globals-movietitle"),value:"$_MOVIETITLE",
asset:"btString"},{text:t.ln.get("window-globals-movieid"),value:"$_MOVIEID",asset:"btString"},{text:t.ln.get("window-globals-scenetitle"),value:"$_SCENETITLE",asset:"btString"},{text:t.ln.get("window-globals-sceneid"),value:"$_SCENEID",asset:"btString"},{text:t.ln.get("window-globals-orientation"),value:"$_ORIENTATION",asset:"btString"},{text:t.ln.get("window-globals-urlmovie"),value:"$_URLMOVIE",asset:"btString"},{text:t.ln.get("window-globals-urlscene"),value:"$_URLSCENE",asset:"btString"},{text:t.ln.get("window-globals-username"),
value:"$_USERNAME",asset:"btString"},{text:t.ln.get("window-globals-runtime"),value:"$_RUNTIME",asset:"btString"},{text:t.ln.get("window-globals-wsserver"),value:"$_WSSERVER",asset:"btString"},{text:t.ln.get("window-globals-version"),value:"$_VERSION",asset:"btString"},{text:t.ln.get("window-globals-session"),value:"$_SESSION",asset:"btString"},{text:t.ln.get("window-globals-date"),value:"$_DATE",asset:"btString"},{text:t.ln.get("window-globals-time"),value:"$_TIME",asset:"btString"},{text:t.ln.get("window-globals-year"),
value:"$_YEAR",asset:"btString"},{text:t.ln.get("window-globals-month"),value:"$_MONTH",asset:"btString"},{text:t.ln.get("window-globals-day"),value:"$_DAY",asset:"btString"},{text:t.ln.get("window-globals-hour"),value:"$_HOUR",asset:"btString"},{text:t.ln.get("window-globals-minute"),value:"$_MINUTE",asset:"btString"},{text:t.ln.get("window-globals-second"),value:"$_SECOND",asset:"btString"}],null,this.ui.hcontainers.h.ggeneral,!1);this.ui.hcontainers.h.ggeneral.addChild(new ge("ggeneral",m(this,
this.onGeneral),t.ln.get("window-globals-get"),Sc.getBitmapData("btCopy"),!1));this.ui.createHContainer("ginstancep");this.ui.createSelect("ginstancep",[{text:t.ln.get("window-globals-instplaying"),value:"?_INSTANCEPLAYING:"},{text:t.ln.get("window-globals-instvisible"),value:"?_INSTANCEVISIBLE:"},{text:t.ln.get("window-globals-instfontbold"),value:"?_INSTANCEFONTBOLD:"},{text:t.ln.get("window-globals-instfontitalic"),value:"?_INSTANCEFONTITALIC:"},{text:t.ln.get("window-acinstance-px"),value:"#_INSTANCEX:"},
{text:t.ln.get("window-acinstance-py"),value:"#_INSTANCEY:"},{text:t.ln.get("window-acinstance-pwidth"),value:"#_INSTANCEWIDTH:"},{text:t.ln.get("window-acinstance-pheight"),value:"#_INSTANCEHEIGHT:"},{text:t.ln.get("window-acinstance-palpha"),value:"#_INSTANCEALPHA:"},{text:t.ln.get("window-acinstance-pvolume"),value:"#_INSTANCEVOLUME:"},{text:t.ln.get("window-acinstance-porder"),value:"#_INSTANCEORDER:"},{text:t.ln.get("window-acinstance-pcoloralpha"),value:"#_INSTANCECOLORALPHA:"},{text:t.ln.get("window-acinstance-protation"),
value:"#_INSTANCEROTATION:"},{text:t.ln.get("window-acinstance-pfontsize"),value:"#_INSTANCEFONTSIZE:"},{text:t.ln.get("window-acinstance-pfontleading"),value:"#_INSTANCEFONTLEADING:"},{text:t.ln.get("window-acinstance-pcolor"),value:"$_INSTANCECOLOR:"},{text:t.ln.get("window-globals-insttext"),value:"$_INSTANCETEXT:"},{text:t.ln.get("window-acinstance-pfont"),value:"$_INSTANCEFONT:"},{text:t.ln.get("window-acinstance-pfontcolor"),value:"$_INSTANCEFONTCOLOR:"}],null,this.ui.hcontainers.h.ginstancep,
!1);this.ui.hcontainers.h.ginstancep.addChild(new ge("instance",m(this,this.onInstance),t.ln.get("window-globals-get"),Sc.getBitmapData("btCopy"),!1));this.ui.createHContainer("gname");this.ui.createTInput("gname","","",this.ui.hcontainers.h.gname,!1);this.ui.hcontainers.h.gname.addChild(new ge("movie",m(this,this.onMovie),t.ln.get("window-globals-get"),Sc.getBitmapData("btCopy"),!1));a=t.ln.get("acblock-parameters");var b=this.ui,c=this.ui.forge("paramleft",[]),d=this.ui,f={tp:"Label",id:"collections",
tx:t.ln.get("window-acinstance-collections"),vr:""},g={tp:"Label",id:"assets",tx:t.ln.get("window-acinstance-assets"),vr:bc.VARIANT_DETAIL},h={tp:"Custom",cont:this.ui.hcontainers.h.assets},l={tp:"Label",id:"ggeneral",tx:t.ln.get("window-globals-general"),vr:""},k={tp:"Custom",cont:this.ui.hcontainers.h.ggeneral},q={tp:"Label",id:"ginstance",tx:t.ln.get("window-globals-instance"),vr:""},w={tp:"Custom",cont:this.ui.hcontainers.h.ginstancep},v={tp:"Label",id:"gmovie",tx:t.ln.get("window-globals-movie"),
vr:""},z={tp:"Select",id:"gmovie",vl:[{text:t.ln.get("window-globals-text"),value:"$_TEXTS:"},{text:t.ln.get("window-globals-number"),value:"#_NUMBERS:"},{text:t.ln.get("window-globals-flag"),value:"?_FLAGS:"},{text:t.ln.get("window-acinput-text"),value:"$_INPUT:"},{text:t.ln.get("window-acform-text"),value:"$_FORM:"},{text:t.ln.get("window-acparam-text"),value:"$_PARAM:"},{text:t.ln.get("window-acnumeric-text"),value:"#_NUMERIC:"},{text:t.ln.get("window-actoggle-text"),value:"?_TOGGLE:"}],sl:[],
ht:95},n={tp:"Label",id:"gname",tx:t.ln.get("window-globals-name"),vr:bc.VARIANT_DETAIL},E={tp:"Custom",cont:this.ui.hcontainers.h.gname},H=t.ln.get("acblock-valcopy");this.addForm(a,b.createColumnHolder("available",c,d.forge("paramright",[f,{tp:"Select",id:"collections",vl:[],sl:[],ch:m(this,this.onCollection)},g,h,{tp:"Spacer",id:"assets",ht:4,ln:!1},l,k,{tp:"Spacer",id:"ggeneral",ht:4,ln:!1},q,{tp:"Select",id:"ginstancen",vl:[],sl:[]},w,{tp:"Spacer",id:"gmovie",ht:4,ln:!1},v,z,n,E,{tp:"Spacer",
id:"showAction",ht:5,ln:!1},{tp:"Label",id:"showAction",tx:H,vr:""},{tp:"TInput",id:"showAction",tx:""}]),this.ui.forge("parambottom",[{tp:"Button",id:"blbutton",tx:t.ln.get("acblock-button"),ac:m(this,this.onClick)}]),460));this.ui.containers.h.parambottom.set_width(1100);this.ui.hcontainers.h.assets.setWidth(510);this.ui.hcontainers.h.ggeneral.setWidth(510);this.ui.hcontainers.h.ginstancep.setWidth(510);this.ui.hcontainers.h.gname.setWidth(510);for(a=0;a<8;)b=a++,this.ui.createLabel("param-"+b,
"#"+(b+1),bc.VARIANT_DETAIL),this.ui.createTInput("param-"+b),this.ui.createHContainer("param-"+b),this.ui.createSelect("param-"+b,[],null,this.ui.hcontainers.h["param-"+b]),this.ui.createLabel("paramor-"+b,t.ln.get("acblock-or"),bc.VARIANT_DETAIL,this.ui.hcontainers.h["param-"+b]),this.ui.createTInput("paramor-"+b,"","",this.ui.hcontainers.h["param-"+b]),this.ui.hcontainers.h["param-"+b].setWidth(400,[175,30,175]),this.ui.labels.h["param-"+b].set_width(this.ui.inputs.h["param-"+b].set_width(this.ui.selects.h["param-"+
b].set_width(510)))};r["com.tilbuci.ui.component.WindowBlockEdit"]=nq;nq.__name__="com.tilbuci.ui.component.WindowBlockEdit";nq.__super__=Ug;nq.prototype=I(Ug.prototype,{_blindex:null,_onOk:null,_acinfo:null,_blac:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,_aShaders:null,acStart:function(){this._head.set_text(this._acinfo.n);for(var a=[],b=Object.keys(p.movie.collections.h),c=b.length,d=0;d<c;){var f=b[d++];a.push({text:p.movie.collections.h[f].name,value:f})}this.ui.setSelectOptions("collections",
a);this.onCollection();a=[];b=0;for(c=p.area.getInstances();b<c.length;)f=c[b],++b,a.push({text:f,value:f});this.ui.setListValues("list",a);this.ui.setSelectOptions("ginstancen",a);this.ui.containers.h.paramleft.removeChildren();for(b=0;b<8;)if(f=b++,this._acinfo.p.length>f){this.ui.labels.h["param-"+f].set_text(this._acinfo.p[f].n);this.ui.containers.h.paramleft.addChild(this.ui.labels.h["param-"+f]);this.ui.hcontainers.h["param-"+f].setWidth(510,[230,30,230]);this.ui.inputs.h["param-"+f].set_text("");
this.ui.inputs.h["paramor-"+f].set_text("");switch(this._acinfo.p[f].v){case "instances":this.ui.setSelectOptions("param-"+f,a);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "movies":this.ui.setSelectOptions("param-"+f,t.acInfo.selMovies);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "navigation":this.ui.setSelectOptions("param-"+f,this._scDirections);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+
f]);break;case "origins":this.ui.setSelectOptions("param-"+f,this._mvOrigins);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "placement":this.ui.setSelectOptions("param-"+f,this._mnPlacement);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "scenes":this.ui.setSelectOptions("param-"+f,t.acInfo.selScenes);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;case "shader":this.ui.setSelectOptions("param-"+
f,this._aShaders);this.ui.containers.h.paramleft.addChild(this.ui.hcontainers.h["param-"+f]);break;default:this.ui.inputs.h["param-"+f].set_text(""),this.ui.containers.h.paramleft.addChild(this.ui.inputs.h["param-"+f])}this._blac!=null&&this._blac.param.length>f&&(this._acinfo.p[f].v==""?this.ui.inputs.h["param-"+f].set_text(this._blac.param[f]):this.ui.setSelectValue("param-"+f,this._blac.param[f])||this.ui.inputs.h["paramor-"+f].set_text(this._blac.param[f]))}else this.ui.labels.h["param-"+f].set_text("#"+
(f+1)),this.ui.containers.h.paramleft.addChild(this.ui.labels.h["param-"+f]),this.ui.inputs.h["param-"+f].set_text(""),this.ui.containers.h.paramleft.addChild(this.ui.inputs.h["param-"+f]),this._blac!=null&&this._blac.param.length>f&&this.ui.inputs.h["param-"+f].set_text(this._blac.param[f])},setContent:function(a,b,c,d){this._onOk=b;this._blindex=c;this._blac=d;this._acinfo=new vq({n:a,a,p:[],e:[]});b=0;for(c=t.acInfo.groups;b<c.length;)d=c[b],++b,Object.prototype.hasOwnProperty.call(d.actions.h,
a)&&(this._acinfo=d.actions.h[a]);this.acStart()},onClick:function(a){a=!0;for(var b=[],c=0;c<8;){var d=c++;if(a)if(this._acinfo.p.length>d){var f=this._acinfo.p[d].v==""?this.ui.inputs.h["param-"+d].get_text():this.ui.inputs.h["paramor-"+d].get_text()!=""?this.ui.inputs.h["paramor-"+d].get_text():this.ui.selects.h["param-"+d].get_selectedItem().value;if(f==""&&this._acinfo.p[d].t!="e")a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-noparam")+this._acinfo.p[d].n,480,180,t.ln.get("default-ok"));
else{switch(this._acinfo.p[d].t){case "b":X.substr(f,0,1)!="?"&&(f=f.toLowerCase(),f!="true"&&f!="false"&&f!="1"&&f!="0"&&(a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-paramtype")+this._acinfo.p[d].n+t.ln.get("acblock-parambool"),480,180,t.ln.get("default-ok"))));break;case "f":X.substr(f,0,1)=="#"||parseFloat(f)!=null&&parseFloat(f)!=NaN||(a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-paramtype")+this._acinfo.p[d].n+t.ln.get("acblock-paramfloat"),480,180,
t.ln.get("default-ok")));break;case "i":X.substr(f,0,1)=="#"||parseFloat(f)!=null&&parseFloat(f)!=NaN||(a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-paramtype")+this._acinfo.p[d].n+t.ln.get("acblock-paramint"),480,180,t.ln.get("default-ok")));break;case "s":if(X.substr(f,0,1)=="?"||X.substr(f,0,1)=="#")a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-paramtype")+this._acinfo.p[d].n+t.ln.get("acblock-paramstring"),480,180,t.ln.get("default-ok"));break;case "v":X.substr(f,
0,1)!="?"&&X.substr(f,0,1)!="#"&&X.substr(f,0,1)!="$"&&(a=!1,t.showPopup(t.ln.get("acblock-errortitle"),t.ln.get("acblock-paramtype")+this._acinfo.p[d].n+t.ln.get("acblock-paramvariable"),480,180,t.ln.get("default-ok")))}a&&b.push(f)}}else this.ui.inputs.h["param-"+d].get_text()!=""&&b.push(this.ui.inputs.h["param-"+d].get_text())}a&&(this._blac!=null?(this._blac.param=b,this._onOk(!1)):(a={ac:this._acinfo.a,param:b},this._acinfo.e.length>0&&(a[this._acinfo.e[0]]="[ ]"),this._acinfo.e.length>1&&(a[this._acinfo.e[1]]=
"[ ]"),this._onOk(a)),this._blac=null,Ub.removePopUp(this))},onCollection:function(a){if(this.ui.selects.h.collections.get_selectedItem()!=null){a=[];for(var b=p.movie.collections,c=this.ui.selects.h.collections.get_selectedItem().value,d=Object.keys(b.h[c].assets.h),f=d.length,g=0;g<f;){var h=d[g++];b=p.movie.collections;c=this.ui.selects.h.collections.get_selectedItem().value;a.push({text:b.h[c].assets.h[h].name,value:h})}this.ui.setSelectOptions("assets",a);this.ui.setSelectValue("assets",null)}},
onAsset:function(a){this.ui.selects.h.assets.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.assets.get_selectedItem().value),t.copyText(this.ui.selects.h.assets.get_selectedItem().value))},onGeneral:function(a){this.ui.selects.h.ggeneral.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ggeneral.get_selectedItem().value),t.copyText(this.ui.selects.h.ggeneral.get_selectedItem().value))},onInstance:function(a){this.ui.selects.h.ginstancep.get_selectedItem()!=
null&&this.ui.selects.h.ginstancen.get_selectedItem()!=null&&(this.ui.inputs.h.showAction.set_text(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value),t.copyText(this.ui.selects.h.ginstancep.get_selectedItem().value+this.ui.selects.h.ginstancen.get_selectedItem().value))},onMovie:function(a){this.ui.selects.h.gmovie.get_selectedItem()!=null&&this.ui.inputs.h.gname.get_text()!=""&&(this.ui.inputs.h.showAction.set_text(L.string(this.ui.selects.h.gmovie.get_selectedItem().value)+
this.ui.inputs.h.gname.get_text()),t.copyText(L.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()))},__class__:nq});var Bu=function(a){this._level=-1;this._key="";this._user="system";na.call(this);this._url=a;this._interact=new Oq};r["com.tilbuci.ws.Webservice"]=Bu;Bu.__name__="com.tilbuci.ws.Webservice";Bu.__super__=na;Bu.prototype=I(na.prototype,{url:null,_url:null,get_url:function(){return this._url},user:null,_user:null,get_user:function(){return this._user},
key:null,_key:null,get_key:function(){return this._key},level:null,_level:null,get_level:function(){return this._level},_interact:null,setUser:function(a,b,c){this._user=a;this._key=b;this._level=c;t.userLevel=c},logout:function(){this._user="system";this._key="";this._level=-1;t.userLevel=-1},send:function(a,b,c,d,f){f==null&&(f=!0);d==null&&(d=0);var g=mb.jsonStringify(b);b=this._url;var h=new aa;h.h.r=g;g=mb.md5(this._key+g);h.h.s=g;h.h.u=this._user;h.h.a=a;new kd(!0,b,"POST",h,4,c,null,null,null,
m(this,this.onEnd),null,d);f&&this._interact.start()},download:function(a){for(var b=Z.replace(this._url,"/ws","/download"),c=Rl._new(),d=Object.keys(a.h),f=d.length,g=0;g<f;){var h=d[g++];c[h]=a.h[h]}c.a="download";a=new Ve(b);a.data=c;a.method="GET";Oa.getURL(a)},openurl:function(a){a=new Ve(a);a.method="GET";Oa.getURL(a)},openWorkspace:function(){var a=Z.replace(this._url,"/ws","/editor"),b=Rl._new();b.us=this._user;b.uk=mb.md5(this._user+this._key);a=new Ve(a);a.data=b;a.method="GET";Oa.getURL(a)},
kill:function(){this._key=this._user=this._url=null},onEnd:function(){this._interact.stop()},__class__:Bu,__properties__:{get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var Tm=function(a,b){this._groups=[];this._level=-1;this._key="";this._user="system";na.call(this);this._url=a;this._user="system";this._key=b;this._groups=[]};r["com.tilbuci.ws.WebserviceP"]=Tm;Tm.__name__="com.tilbuci.ws.WebserviceP";Tm.__super__=na;Tm.prototype=I(na.prototype,{url:null,_url:null,
get_url:function(){return this._url},user:null,_user:null,get_user:function(){return this._user},key:null,_key:null,get_key:function(){return this._key},level:null,_level:null,get_level:function(){return this._level},groups:null,_groups:null,get_groups:function(){return this._groups},send:function(a,b,c,d){if(p.server){var f=mb.jsonStringify(b);b=this._url;var g=new aa;g.h.r=f;f=mb.md5(this._key+f);g.h.s=f;g.h.u=this._user;g.h.a=a;new kd(!0,b,"POST",g,4,c,null,null,null,null,d);return!0}return!1},
loginVisitor:function(a,b,c,d,f){var g=new aa;g.h.email=a;g.h.title=b;g.h.text=c;g.h.sender=d;return this.send("System/Visitor",g,f)},checkVisitorCode:function(a,b,c){var d=new aa;d.h.email=a;d.h.code=b;return this.send("System/VisitorCode",d,c)},checkVisitorKey:function(a,b,c){var d=new aa;d.h.email=a;d.h.key=b;return this.send("System/VisitorKey",d,c)},dataSave:function(a,b,c){var d=new aa;d.h.name=a;a=mb.jsonStringify(b);d.h.values=a;a=p.movie.get_mvId();d.h.movie=a;return this.send("Visitor/DataSave",
d,c)},dataLoad:function(a,b){var c=new aa;c.h.name=a;a=p.movie.get_mvId();c.h.movie=a;return this.send("Visitor/DataLoad",c,b)},stateSave:function(a,b,c,d){var f=new aa;a=mb.jsonStringify(a);f.h.values=a;a=p.movie.get_mvId();f.h.movie=a;f.h.quick=b;a=p.movie.get_scId();f.h.scene=a;f.h.about=c;return this.send("Visitor/StateSave",f,d)},stateLoad:function(a,b,c){var d=new aa;d.h.id=a;d.h.quick=b;a=p.movie.get_mvId();d.h.movie=a;return this.send("Visitor/StateLoad",d,c)},stateList:function(a,b){var c=
new aa;c.h.format=a;a=p.movie.get_mvId();c.h.movie=a;return this.send("Visitor/StateList",c,b)},loadScene:function(a,b){var c=new aa;c.h.id=a;a=p.movie.get_mvId();c.h.movie=a;c.h.visitor=this._user;return this.send("Visitor/LoadScene",c,b)},setUser:function(a,b,c){this._user=a;this._key=b;this._groups=c},clearUser:function(){this._user="system";this._key="";this._groups=[]},userLogged:function(){return this._user!="system"?this._user!="":!1},getUser:function(){return this.userLogged()?this._user:
""},kill:function(){for(this._key=this._user=this._url=null;this._groups.length>0;)this._groups.shift();this._groups=null},__class__:Tm,__properties__:{get_groups:"get_groups",get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var xo=function(){this.__indeterminateDuration=.75;this.__activitySkin=null;this._lastUpdateTime=0;this._reversed=!1;this._savedSkinAlpha=1;this._activitySkinMeasurements=null;this.initializeActivityIndicatorTheme();wa.call(this);this.addEventListener("addedToStage",
m(this,this.activityIndicator_addedToStageHandler));this.addEventListener("removedFromStage",m(this,this.activityIndicator_removedFromStageHandler))};r["feathers.controls.ActivityIndicator"]=xo;xo.__name__="feathers.controls.ActivityIndicator";xo.__super__=wa;xo.prototype=I(wa.prototype,{_currentActivitySkin:null,_activitySkinMeasurements:null,_savedSkinAlpha:null,_reversed:null,_lastUpdateTime:null,initializeActivityIndicatorTheme:function(){Ot.initialize()},update:function(){var a=this.isInvalid(x.SIZE),
b=this.isInvalid(x.STYLES);b&&this.refreshBackgroundSkin();this.measure()&&(a=!0);(a||b)&&this.layoutBackgroundSkin()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentActivitySkin!=null&&Ne.resetFluidlyWithParent(this._activitySkinMeasurements,this._currentActivitySkin,
this);var h=null;u.__implements(this._currentActivitySkin,Kb)&&(h=this._currentActivitySkin);u.__implements(this._currentActivitySkin,oa)&&this._currentActivitySkin.validateNow();var l=this.get_explicitWidth();a&&(l=0,this._currentActivitySkin!=null&&(l=Math.max(this._currentActivitySkin.get_width(),l)));a=this.get_explicitHeight();b&&(a=0,this._currentActivitySkin!=null&&(a=Math.max(this._currentActivitySkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=0,h!=null?b=Math.max(h.get_minWidth(),
b):this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.minWidth!=null&&(b=Math.max(this._activitySkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=0,h!=null?c=Math.max(h.get_minHeight(),c):this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.minHeight!=null&&(c=Math.max(this._activitySkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.maxWidth!=
null?this._activitySkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._activitySkinMeasurements!=null&&this._activitySkinMeasurements.maxHeight!=null?this._activitySkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},layoutBackgroundSkin:function(){if(this._currentActivitySkin!=null){var a=Math.min(this.actualWidth,this.actualHeight);this._currentActivitySkin.set_width(a);this._currentActivitySkin.set_height(a);this._currentActivitySkin.set_x((this.actualWidth-
a)/2);this._currentActivitySkin.set_y((this.actualHeight-a)/2);u.__implements(this._currentActivitySkin,oa)&&this._currentActivitySkin.validateNow()}},refreshBackgroundSkin:function(){var a=this._currentActivitySkin;this._currentActivitySkin=this.getCurrentBackgroundSkin();this._currentActivitySkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentActivitySkin))},getCurrentBackgroundSkin:function(){return this.get_activitySkin()},addCurrentBackgroundSkin:function(a){a==
null?this._activitySkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._activitySkinMeasurements==null?this._activitySkinMeasurements=new Ib(a):this._activitySkinMeasurements.save(a),this._savedSkinAlpha=a.get_alpha(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._activitySkinMeasurements.restore(a),a.set_alpha(this._savedSkinAlpha),a.parent==this&&this.removeChild(a))},
activityIndicator_addedToStageHandler:function(a){this._lastUpdateTime=Oa.getTimer();this.addEventListener("enterFrame",m(this,this.activityIndicator_enterFrameHandler))},activityIndicator_removedFromStageHandler:function(a){this.removeEventListener("enterFrame",m(this,this.activityIndicator_enterFrameHandler))},activityIndicator_enterFrameHandler:function(a){if(this._enabled&&this.get_visible()&&this._currentActivitySkin!=null){a=Oa.getTimer();var b=(a-this._lastUpdateTime)/(this.get_indeterminateDuration()*
1E3);b>=1&&(b-=Math.floor(b),this._lastUpdateTime=a,this._reversed=!this._reversed);u.__implements(this._currentActivitySkin,cm)?this._currentActivitySkin.set_indeterminatePosition(b):this._currentActivitySkin.set_alpha(this._savedSkinAlpha*(this._reversed?1-b:b))}},__activitySkin:null,get_activitySkin:function(){return this.__activitySkin},set_activitySkin:function(a){if(!this.setStyle("activitySkin")||this.__activitySkin==a)return this.__activitySkin;this._previousClearStyle=m(this,this.clearStyle_activitySkin);
this.__activitySkin=a;this.setInvalid(x.STYLES);return this.__activitySkin},clearStyle_activitySkin:function(){this.set_activitySkin(null);return this.get_activitySkin()},__indeterminateDuration:null,get_indeterminateDuration:function(){return this.__indeterminateDuration},set_indeterminateDuration:function(a){if(!this.setStyle("indeterminateDuration")||this.__indeterminateDuration==a)return this.__indeterminateDuration;this._previousClearStyle=m(this,this.clearStyle_indeterminateDuration);this.__indeterminateDuration=
a;this.setInvalid(x.STYLES);return this.__indeterminateDuration},clearStyle_indeterminateDuration:function(){this.set_indeterminateDuration(.75);return this.get_indeterminateDuration()},__class__:xo,__properties__:I(wa.prototype.__properties__,{set_indeterminateDuration:"set_indeterminateDuration",get_indeterminateDuration:"get_indeterminateDuration",set_activitySkin:"set_activitySkin",get_activitySkin:"get_activitySkin"})});var yo=function(a,b,c){b==null&&(b=-1);this.enabled=!0;this.index=-1;this.data=
a;this.index=b;this.text=c};r["feathers.data.ButtonBarItemState"]=yo;yo.__name__="feathers.data.ButtonBarItemState";yo.prototype={owner:null,data:null,index:null,text:null,enabled:null,recyclerID:null,__class__:yo};var Ie=function(a,b){this.__customButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Cg;this._layoutMeasurements=new Ib;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=
!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=new Tb(function(){return new yo});this.buttonToItemState=new Na;this.stringDataToButton=new aa;this.objectDataToButton=new Na;this._additionalStorage=null;this._defaultStorage=new Pq(null,He.withClass(Qb));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._previousCustomButtonVariant=null;this.initializeButtonBarTheme();wa.call(this);this.set_dataProvider(a);b!=null&&this.addEventListener("itemTrigger",b)};r["feathers.controls.ButtonBar"]=
Ie;Ie.__name__="feathers.controls.ButtonBar";Ie.defaultUpdateButton=function(a,b){a.set_text(b.text)};Ie.defaultResetButton=function(a,b){a.set_text(null)};Ie.__super__=wa;Ie.prototype=I(wa.prototype,{_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.buttonBar_dataProvider_changeHandler)),this._dataProvider.removeEventListener("updateItem",
m(this,this.buttonBar_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.buttonBar_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._dataProvider.addEventListener("change",m(this,this.buttonBar_dataProvider_changeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.buttonBar_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.buttonBar_dataProvider_updateAllHandler)));
this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_previousCustomButtonVariant:null,get_buttonRecycler:function(){return this._defaultStorage.buttonRecycler},set_buttonRecycler:function(a){if(this._defaultStorage.buttonRecycler==a)return this._defaultStorage.buttonRecycler;this._defaultStorage.oldButtonRecycler=this._defaultStorage.buttonRecycler;this._defaultStorage.buttonRecycler=a;this.setInvalid(Ie.INVALIDATION_FLAG_BUTTON_FACTORY);return this._defaultStorage.buttonRecycler},
_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_buttonRecyclerIDFunction:null,get_buttonRecyclerIDFunction:function(){return this._buttonRecyclerIDFunction},set_buttonRecyclerIDFunction:function(a){if(this._buttonRecyclerIDFunction==a)return this._buttonRecyclerIDFunction;
this._buttonRecyclerIDFunction=a;this.setInvalid(Ie.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToButton:null,stringDataToButton:null,buttonToItemState:null,itemStatePool:null,_unrenderedData:null,_layoutItems:null,_ignoreSelectionChange:null,itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_layoutMeasurements:null,_layoutResult:null,
_ignoreChildChanges:null,itemToButton:function(a){return a==null?null:typeof a=="string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__]},indexToButton:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__]},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToButton.h[a]:this.objectDataToButton.h[a.__id__];
if(b!=null)b=this.buttonToItemState.h[b.__id__];else{var c=this._dataProvider.indexOf(a);if(c==-1)return null;b=new yo;this.populateCurrentItemState(a,c,b,!1)}return b},getButtonRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},setButtonRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new aa);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Ie.INVALIDATION_FLAG_BUTTON_FACTORY))},
dispose:function(){this.refreshInactiveButtons(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveButtons(this._additionalStorage[c],!0)}this.set_dataProvider(null);wa.prototype.dispose.call(this)},initializeButtonBarTheme:function(){Qt.initialize()},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomButtonVariant!=
this.get_customButtonVariant()&&this.setInvalidationFlag(Ie.INVALIDATION_FLAG_BUTTON_FACTORY);var f=this.isInvalid(Ie.INVALIDATION_FLAG_BUTTON_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&this.refreshButtons();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomButtonVariant=this.get_customButtonVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){var a=
this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;if(!u.__implements(c,oa))break;c.validateNow()}},refreshButtons:function(){this.get_buttonRecycler().update==
null&&(this.get_buttonRecycler().update=Ie.defaultUpdateButton,this.get_buttonRecycler().reset==null&&(this.get_buttonRecycler().reset=Ie.defaultResetButton));if(this._recyclerMap!=null)for(var a=this._recyclerMap.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Ie.defaultUpdateButton,f.reset==null&&(f.reset=Ie.defaultResetButton))}a=this.isInvalid(Ie.INVALIDATION_FLAG_BUTTON_FACTORY);this.refreshInactiveButtons(this._defaultStorage,a);if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveButtons(d,a);this.findUnrenderedData();this.recoverInactiveButtons(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveButtons(d);this.renderUnrenderedData();this.freeInactiveButtons(this._defaultStorage);if(this._defaultStorage.inactiveButtons.length>0)throw a=u.getClass(this),new fb(""+a.__name__+
": inactive buttons should be empty after updating.");if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveButtons(d),d.inactiveButtons.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive buttons "+d.id+" should be empty after updating.");},refreshInactiveButtons:function(a,b){var c=a.inactiveButtons;a.inactiveButtons=a.activeButtons;a.activeButtons=c;if(a.activeButtons.length>0)throw a=u.getClass(this),
new fb(""+a.__name__+": active buttons should be empty before updating.");b&&(this.recoverInactiveButtons(a),this.freeInactiveButtons(a))},recoverInactiveButtons:function(a){var b=0;for(a=a.inactiveButtons;b<a.length;){var c=a[b];++b;if(c!=null){var d=this.buttonToItemState.h[c.__id__];if(d!=null){var f=d.data;this.buttonToItemState.remove(c);if(typeof f=="string"){var g=this.stringDataToButton;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}else this.objectDataToButton.remove(f);c.removeEventListener("trigger",
m(this,this.buttonBar_button_triggerHandler));this.resetButton(c,d);this.itemStatePool.release(d)}}}},freeInactiveButtons:function(a){for(var b=0,c=a.inactiveButtons;b<c.length;){var d=c[b];++b;d!=null&&this.destroyButton(d)}a.inactiveButtons.length=0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),
u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},findUnrenderedData:function(){this._layoutItems.length=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._layoutItems.length=this._dataProvider.get_length();for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._dataProvider.get_length();b<c;){var d=b++,f=this._dataProvider.get(d);var g=typeof f=="string"?this.stringDataToButton.h[f]:this.objectDataToButton.h[f.__id__];if(g!=null){var h=
this.buttonToItemState.h[g.__id__],l=this.populateCurrentItemState(f,d,h,this._forceItemStateUpdate),k=h.recyclerID,q=this.itemStateToStorage(h);if(q.id!=k)this._unrenderedData.push(f);else{l&&this.updateButton(g,h,q);this._layoutItems[d]=g;this.setChildIndex(g,d+a);if(!X.remove(q.inactiveButtons,g))throw a=u.getClass(this),new fb(""+a.__name__+": button renderer map contains bad data for item at index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");q.activeButtons.push(g)}}else this._unrenderedData.push(f)}}},
renderUnrenderedData:function(){for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._unrenderedData;b<c.length;){var d=c[b];++b;var f=this._dataProvider.indexOf(d),g=this.itemStatePool.get();this.populateCurrentItemState(d,f,g,!0);d=this.createButton(g);this.addChildAt(d,f+a);this._layoutItems[f]=d}this._unrenderedData.length=0},createButton:function(a){var b=this.itemStateToStorage(a);if(b.inactiveButtons.length==0){var c=this.get_buttonRecycler().create();if(c.get_variant()==null){var d=
this.get_customButtonVariant()!=null?this.get_customButtonVariant():Ie.CHILD_VARIANT_BUTTON;c.set_variant(d)}c.initializeNow()}else c=b.inactiveButtons.shift();this.updateButton(c,a,b);c.addEventListener("trigger",m(this,this.buttonBar_button_triggerHandler));this.buttonToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToButton.h[a]=c:this.objectDataToButton.set(a,c);b.activeButtons.push(c);return c},destroyButton:function(a){this.removeChild(a);this.get_buttonRecycler().destroy!=null&&
this.get_buttonRecycler().destroy(a)},itemStateToStorage:function(a){var b=null;this._buttonRecyclerIDFunction!=null&&(b=this._buttonRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new fb('Item renderer recycler ID "'+b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.buttonRecycler==
a)return f}f=new Pq(b,a);this._additionalStorage.push(f);return f},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},updateButton:function(a,b,c){b.recyclerID=c.id;c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_buttonRecycler().update!=null&&
this.get_buttonRecycler().update(a,b);this._ignoreSelectionChange=c;this.refreshButtonProperties(a,b)},resetButton:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_buttonRecycler()!=null&&this.get_buttonRecycler().reset!=null&&this.get_buttonRecycler().reset(a,b);this._ignoreSelectionChange=c;this.refreshButtonProperties(a,Ie.RESET_BUTTON_STATE)},refreshButtonProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,
jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,ji)&&a.set_layoutIndex(b.index);a.set_enabled(b.enabled);this._ignoreSelectionChange=c},buttonBar_button_triggerHandler:function(a){a=u.__cast(a.currentTarget,Qb);xj.dispatch(this,"itemTrigger",this.buttonToItemState.h[a.__id__])},buttonBar_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},updateButtonForIndex:function(a){var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToButton.h[b]:
this.objectDataToButton.h[b.__id__];if(c==null)this.setInvalid(x.DATA);else{var d=this.buttonToItemState.h[c.__id__];d.owner!=null&&(this.itemStateToStorage(d),this.populateCurrentItemState(b,a,d,!0),this.resetButton(c,d),d.owner=null,this.setInvalid(x.DATA))}},buttonBar_dataProvider_updateItemHandler:function(a){this.updateButtonForIndex(a.index)},buttonBar_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateButtonForIndex(c)}},__customButtonVariant:null,
get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__layout:null,
get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==
a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;
this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Ie},__class__:Ie,__properties__:I(wa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_buttonRecyclerIDFunction:"set_buttonRecyclerIDFunction",get_buttonRecyclerIDFunction:"get_buttonRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_buttonRecycler:"set_buttonRecycler",get_buttonRecycler:"get_buttonRecycler",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var pj=function(a){a==null&&(a="");this.__verticalAlign=fc.MIDDLE;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=this.__minGap=0;this.__disabledTextFormat=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__embedFonts=!1;this._rightView=this.__textFormat=this.__styleSheet=null;this._ignoreRightViewResize=!1;this._leftView=null;this._ignoreLeftViewResize=!1;this._htmlText=this._currentBackgroundSkin=
this._backgroundSkinMeasurements=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeHeaderTheme();wa.call(this);this.set_text(a)};r["feathers.controls.Header"]=pj;pj.__name__="feathers.controls.Header";pj.__interfaces__=[de];pj.__super__=wa;pj.prototype=I(wa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,
_textMeasuredWidth:null,_textMeasuredHeight:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;return this._text!=null&&this._text.length>0||a?this.textField.get_y()+this.textField.getLineMetrics(0).ascent:(this.textField.set_text("\u200b"),
a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""),a)},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_ignoreLeftViewResize:null,_leftView:null,get_leftView:function(){return this._leftView},set_leftView:function(a){if(this._leftView==a)return this._leftView;
this._leftView!=null&&(this._leftView.removeEventListener("resize",m(this,this.header_leftView_resizeHandler)),this._leftView.parent==this&&this.removeChild(this._leftView));this._leftView=a;this._leftView!=null&&(this.addChild(this._leftView),this._leftView.addEventListener("resize",m(this,this.header_leftView_resizeHandler),!1,0,!0));this.setInvalid(x.LAYOUT);return this._leftView},_ignoreRightViewResize:null,_rightView:null,get_rightView:function(){return this._rightView},set_rightView:function(a){if(this._rightView==
a)return this._rightView;this._rightView!=null&&(this._rightView.removeEventListener("resize",m(this,this.header_rightView_resizeHandler)),this._rightView.parent==this&&this.removeChild(this._rightView));this._rightView=a;this._rightView!=null&&(this.addChild(this._rightView),this._rightView.addEventListener("resize",m(this,this.header_rightView_resizeHandler),!1,0,!0));this.setInvalid(x.LAYOUT);return this._rightView},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);
this.set_paddingLeft(a)},dispose:function(){this.set_leftView(null);this.set_rightView(null);wa.prototype.dispose.call(this)},initializeHeaderTheme:function(){$t.initialize()},initialize:function(){wa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.textField.set_selectable(!1),this.addChild(this.textField))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),
f=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(f||d)&&this.refreshBackgroundSkin();(f||d)&&this.refreshTextStyles();(a||f||d||c)&&this.refreshText(c);this.measure()&&(c=!0);(b||f||d||a||c)&&this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._ignoreLeftViewResize;
this._ignoreLeftViewResize=!0;var l=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var k=null;u.__implements(this._currentBackgroundSkin,Kb)&&(k=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();u.__implements(this._leftView,oa)&&this._leftView.validateNow();u.__implements(this._rightView,oa)&&
this._rightView.validateNow();var q=this.get_explicitWidth();a&&(q=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._leftView!=null&&(q+=this._leftView.get_width()+this.get_minGap()),this._rightView!=null&&(q+=this._rightView.get_width()+this.get_minGap()),this._currentBackgroundSkin!=null&&(q=Math.max(this._currentBackgroundSkin.get_width(),q)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,this._leftView!=null&&(a=Math.max(a,this._leftView.get_height())),
this._rightView!=null&&(a=Math.max(a,this._rightView.get_height())),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth+this.get_paddingLeft()+this.get_paddingRight(),this._leftView!=null&&(b+=this._leftView.get_width()+this.get_minGap()),this._rightView!=null&&(b+=this._rightView.get_width()+this.get_minGap()),k!=null?b=Math.max(k.get_minWidth(),b):
this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,this._leftView!=null&&(c=Math.max(c,this._leftView.get_height())),this._rightView!=null&&(c=Math.max(c,this._rightView.get_height())),c+=this.get_paddingTop()+this.get_paddingBottom(),k!=null?c=Math.max(k.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=
null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=k!=null?k.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=k!=null?k.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);this._ignoreLeftViewResize=h;this._ignoreRightViewResize=
l;return this.saveMeasurements(q,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",
m(this,this.header_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.header_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this._text!=null&&this._text.length>0,c=this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||
a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),a=null,this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null&&(a=this.get_explicitMaxWidth()),a!=null&&(a<0&&(a=0),this.textField.set_width(a)),this._textMeasuredWidth=this.textField.get_width(),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),b||c||this.textField.set_text(""),
this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackgroundSkin();var a=this.get_paddingLeft(),b=this.actualWidth-this.get_paddingRight(),c=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),d=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom(),f=c;if(this._leftView!=null){u.__implements(this._leftView,oa)&&this._leftView.validateNow();this._leftView.set_x(this.get_paddingLeft());
switch(this.get_verticalAlign()._hx_index){case 0:this._leftView.set_y(this.get_paddingTop());break;case 2:this._leftView.set_y(this.actualHeight-this.get_paddingBottom()-this._leftView.get_height());break;default:this._leftView.set_y(this.get_paddingTop()+(d-this._leftView.get_height())/2)}f-=this._leftView.get_width()+this.get_minGap();a=this._leftView.get_x()+this._leftView.get_width()+this.get_minGap()}if(this._rightView!=null){u.__implements(this._rightView,oa)&&this._rightView.validateNow();
this._rightView.set_x(this.actualWidth-this.get_paddingRight()-this._rightView.get_width());switch(this.get_verticalAlign()._hx_index){case 0:this._rightView.set_y(this.get_paddingTop());break;case 2:this._rightView.set_y(this.actualHeight-this.get_paddingBottom()-this._rightView.get_height());break;default:this._rightView.set_y(this.get_paddingTop()+(d-this._rightView.get_height())/2)}f-=this._rightView.get_width()+this.get_minGap();b=this._rightView.get_x()-this.get_minGap()}var g=this._textMeasuredWidth;
g>f&&(g=f);g<0&&(g=0);this.textField.set_width(g);b-=g;f=this._textMeasuredHeight;f>d&&(f=d);f<0&&(f=0);this.textField.set_height(f);c=this.get_paddingLeft()+(c-g)/2;c<a?c=a:c>b&&(c=b);this.textField.set_x(c);switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this.get_paddingTop());break;case 2:this.textField.set_y(this.actualHeight-this.get_paddingBottom()-f);break;default:this.textField.set_y(this.get_paddingTop()+(d-f)/2)}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=
null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},header_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},header_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||
this.setInvalid(x.LAYOUT)},header_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(x.LAYOUT)},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},
__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);
this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);
this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);
return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},
__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},
set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||this.__minGap==a)return this.__minGap;this._previousClearStyle=
m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);return this.get_verticalAlign()},__class__:pj,__properties__:I(wa.prototype.__properties__,{set_rightView:"set_rightView",get_rightView:"get_rightView",set_leftView:"set_leftView",get_leftView:"get_leftView",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",
get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",
set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"})});var td=function(a){a==null&&(a="");this._previousCustomButtonBarVariant=this._previousCustomHeaderVariant=this._previousCustomMessageLabelVariant=this.__icon=this.__customButtonBarVariant=this.__customHeaderVariant=this.__customMessageLabelVariant=
null;this._ignoreIconResizes=!1;this._buttonsDataProvider=this._iconMeasurements=this._currentIcon=null;this._titleText="";this._htmlText=null;this.initializeAlertTheme();yd.call(this);this.set_text(a)};r["feathers.controls.Alert"]=td;td.__name__="feathers.controls.Alert";td.show=function(a,b,c,d,f,g){f=f!=null?f():new td;f.set_text(a);f.set_titleText(b);if(c!=null){a=Array(c.length);b=0;for(var h=c.length;b<h;){var l=b++;a[l]=new Cu(c[l])}c=a}else c=[];f.set_buttonsDataProvider(new mg(c));d!=null&&
f.addEventListener("itemTrigger",function(k){d(k.state)});return td.showAlert(f,g)};td.showAlert=function(a,b){b!=null?b.open(a,Oa.get_current()):Ub.addPopUp(a,Oa.get_current(),!0,!0);return a};td.__super__=yd;td.prototype=I(yd.prototype,{messageLabel:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},
set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},alertHeader:null,_titleText:null,get_titleText:function(){return this._titleText},set_titleText:function(a){if(a==null){if(this._titleText.length==0)return this._titleText;a=""}if(this._titleText==a)return this._titleText;this._titleText=a;this.setInvalid(x.DATA);return this._titleText},_oldMessageLabelFactory:null,_messageLabelFactory:null,get_messageLabelFactory:function(){return this._messageLabelFactory},
set_messageLabelFactory:function(a){if(this._messageLabelFactory==a)return this._messageLabelFactory;this._messageLabelFactory=a;this.setInvalid(td.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);return this._messageLabelFactory},_oldHeaderFactory:null,_headerFactory:null,get_headerFactory:function(){return this._headerFactory},set_headerFactory:function(a){if(this._headerFactory==a)return this._headerFactory;this._headerFactory=a;this.setInvalid(td.INVALIDATION_FLAG_HEADER_FACTORY);return this._headerFactory},
_oldButtonBarFactory:null,_buttonBarFactory:null,get_buttonBarFactory:function(){return this._buttonBarFactory},set_buttonBarFactory:function(a){if(this._buttonBarFactory==a)return this._buttonBarFactory;this._buttonBarFactory=a;this.setInvalid(td.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);return this._buttonBarFactory},buttonBar:null,_buttonsDataProvider:null,get_buttonsDataProvider:function(){return this._buttonsDataProvider},set_buttonsDataProvider:function(a){if(this._buttonsDataProvider==a)return this._buttonsDataProvider;
this._buttonsDataProvider=a;this.setInvalid(x.DATA);return this._buttonsDataProvider},_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_previousCustomButtonBarVariant:null,_previousCustomHeaderVariant:null,_previousCustomMessageLabelVariant:null,set_header:function(a){throw new fb("Alert header must be created with headerFactory");},_set_header:function(a){return yd.prototype.set_header.call(this,a)},set_footer:function(a){throw new fb("Alert footer must be created with buttonBarFactory");
},_set_footer:function(a){return yd.prototype.set_footer.call(this,a)},dispose:function(){this.destroyButtonBar();this.destroyHeader();this.destroyMessageLabel();yd.prototype.dispose.call(this)},initializeAlertTheme:function(){Pt.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);this._previousCustomButtonBarVariant!=this.get_customButtonBarVariant()&&this.setInvalidationFlag(td.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);var d=this.isInvalid(td.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);
this._previousCustomHeaderVariant!=this.get_customHeaderVariant()&&this.setInvalidationFlag(td.INVALIDATION_FLAG_HEADER_FACTORY);var f=this.isInvalid(td.INVALIDATION_FLAG_HEADER_FACTORY);this._previousCustomMessageLabelVariant!=this.get_customMessageLabelVariant()&&this.setInvalidationFlag(td.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);var g=this.isInvalid(td.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);f&&this.createHeader();d&&this.createButtonBar();g&&this.createMessageLabel();(c||b)&&this.refreshIcon();
(a||c||b||g)&&this.refreshText();(a||c||b||f)&&this.refreshTitleText();(a||d)&&this.refreshButtons();yd.prototype.update.call(this);this._previousCustomButtonBarVariant=this.get_customButtonBarVariant();this._previousCustomHeaderVariant=this.get_customHeaderVariant();this._previousCustomMessageLabelVariant=this.get_customMessageLabelVariant()},createButtonBar:function(){var a=this;this.destroyButtonBar();var b=this._buttonBarFactory!=null?this._buttonBarFactory:td.defaultButtonBarFactory;this._oldButtonBarFactory=
b;this.buttonBar=b.create();this.buttonBar.get_variant()==null&&this.buttonBar.set_variant(this.get_customButtonBarVariant()!=null?this.get_customButtonBarVariant():td.CHILD_VARIANT_BUTTON_BAR);this.buttonBar.addEventListener("itemTrigger",m(this,this.alert_buttonBar_itemTriggerHandler));this.runWithInvalidationFlagsOnly(function(){a._set_footer(a.buttonBar)})},destroyButtonBar:function(){var a=this;this.buttonBar!=null&&(this.buttonBar.removeEventListener("itemTrigger",m(this,this.alert_buttonBar_itemTriggerHandler)),
this._oldButtonBarFactory.destroy!=null&&this._oldButtonBarFactory.destroy(this.buttonBar),this.buttonBar=this._oldButtonBarFactory=null,this.runWithInvalidationFlagsOnly(function(){a._set_footer(null)}))},createHeader:function(){var a=this;this.destroyHeader();var b=this._headerFactory!=null?this._headerFactory:td.defaultHeaderFactory;this._oldHeaderFactory=b;this.alertHeader=b.create();this.alertHeader.get_variant()==null&&this.alertHeader.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():
td.CHILD_VARIANT_HEADER);this.runWithInvalidationFlagsOnly(function(){a._set_header(a.alertHeader)})},destroyHeader:function(){var a=this;this.alertHeader!=null&&(this._oldHeaderFactory.destroy!=null&&this._oldHeaderFactory.destroy(this.alertHeader),this.alertHeader=this._oldHeaderFactory=null,this.runWithInvalidationFlagsOnly(function(){a._set_header(null)}))},createMessageLabel:function(){this.destroyMessageLabel();var a=this._messageLabelFactory!=null?this._messageLabelFactory:td.defaultMessageLabelFactory;
this._oldMessageLabelFactory=a;this.messageLabel=a.create();this.messageLabel.get_variant()==null&&this.messageLabel.set_variant(this.get_customMessageLabelVariant()!=null?this.get_customMessageLabelVariant():td.CHILD_VARIANT_MESSAGE_LABEL);this.addChild(this.messageLabel)},destroyMessageLabel:function(){this.messageLabel!=null&&(this.removeChild(this.messageLabel),this._oldMessageLabelFactory.destroy!=null&&this._oldMessageLabelFactory.destroy(this.messageLabel),this.messageLabel=this._oldMessageLabelFactory=
null)},refreshButtons:function(){this.buttonBar.set_dataProvider(this._buttonsDataProvider)},refreshText:function(){this.messageLabel.set_text(this._text);this.messageLabel.set_htmlText(this._htmlText)},refreshTitleText:function(){this.alertHeader.set_text(this._titleText)},refreshIcon:function(){var a=this._currentIcon;this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this._currentIcon==null?this._iconMeasurements=null:(u.__implements(this._currentIcon,jb)&&
this._currentIcon.initializeNow(),this._iconMeasurements==null?this._iconMeasurements=new Ib(this._currentIcon):this._iconMeasurements.save(this._currentIcon),u.__implements(this._currentIcon,wb)&&this._currentIcon.set_uiContext(this),a=this.getChildIndex(this.messageLabel),this.addChildAt(this._currentIcon,a)))},getCurrentIcon:function(){return this.get_icon()},removeCurrentIcon:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},
alert_buttonBar_itemTriggerHandler:function(a){this.parent.removeChild(this);this.dispatchEvent(a)},get_styleContext:function(){return td},__icon:null,get_icon:function(){return this.__icon},set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},__customButtonBarVariant:null,get_customButtonBarVariant:function(){return this.__customButtonBarVariant},
set_customButtonBarVariant:function(a){if(!this.setStyle("customButtonBarVariant")||this.__customButtonBarVariant==a)return this.__customButtonBarVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonBarVariant);this.__customButtonBarVariant=a;this.setInvalid(x.STYLES);return this.__customButtonBarVariant},clearStyle_customButtonBarVariant:function(){this.set_customButtonBarVariant(null);return this.get_customButtonBarVariant()},__customHeaderVariant:null,get_customHeaderVariant:function(){return this.__customHeaderVariant},
set_customHeaderVariant:function(a){if(!this.setStyle("customHeaderVariant")||this.__customHeaderVariant==a)return this.__customHeaderVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderVariant);this.__customHeaderVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderVariant},clearStyle_customHeaderVariant:function(){this.set_customHeaderVariant(null);return this.get_customHeaderVariant()},__customMessageLabelVariant:null,get_customMessageLabelVariant:function(){return this.__customMessageLabelVariant},
set_customMessageLabelVariant:function(a){if(!this.setStyle("customMessageLabelVariant")||this.__customMessageLabelVariant==a)return this.__customMessageLabelVariant;this._previousClearStyle=m(this,this.clearStyle_customMessageLabelVariant);this.__customMessageLabelVariant=a;this.setInvalid(x.STYLES);return this.__customMessageLabelVariant},clearStyle_customMessageLabelVariant:function(){this.set_customMessageLabelVariant(null);return this.get_customMessageLabelVariant()},__class__:td,__properties__:I(yd.prototype.__properties__,
{set_customMessageLabelVariant:"set_customMessageLabelVariant",get_customMessageLabelVariant:"get_customMessageLabelVariant",set_customHeaderVariant:"set_customHeaderVariant",get_customHeaderVariant:"get_customHeaderVariant",set_customButtonBarVariant:"set_customButtonBarVariant",get_customButtonBarVariant:"get_customButtonBarVariant",set_icon:"set_icon",get_icon:"get_icon",set_buttonsDataProvider:"set_buttonsDataProvider",get_buttonsDataProvider:"get_buttonsDataProvider",set_buttonBarFactory:"set_buttonBarFactory",
get_buttonBarFactory:"get_buttonBarFactory",set_headerFactory:"set_headerFactory",get_headerFactory:"get_headerFactory",set_messageLabelFactory:"set_messageLabelFactory",get_messageLabelFactory:"get_messageLabelFactory",set_titleText:"set_titleText",get_titleText:"get_titleText",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var Cu=function(a){this._text=a};r["feathers.controls._Alert.StringWrapper"]=Cu;Cu.__name__="feathers.controls._Alert.StringWrapper";
Cu.prototype={_text:null,toString:function(){return this._text},__class__:Cu};var sc=function(){this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__maskSkin=null;this._layoutActive=this._layoutChanged=!1;this._xmlContent=null;this._autoSizeMode=Fe.CONTENT;this._currentBackgroundSkin=this._backgroundSkinMeasurements=this._currentMaskSkin=null;this._ignoreChildChanges=this._ignoreChangesButSetFlags=this._ignoreLayoutChanges=!1;this._layoutMeasurements=new Ib;this._layoutResult=
new Cg;this.items=[];this.initializeLayoutGroupTheme();wa.call(this);this.addEventListener("addedToStage",m(this,this.layoutGroup_addedToStageHandler))};r["feathers.controls.LayoutGroup"]=sc;sc.__name__="feathers.controls.LayoutGroup";sc.__super__=wa;sc.prototype=I(wa.prototype,{items:null,_layoutResult:null,_layoutMeasurements:null,_ignoreChildChanges:null,_ignoreChangesButSetFlags:null,_ignoreLayoutChanges:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_currentMaskSkin:null,_autoSizeMode:null,
get_autoSizeMode:function(){return this._autoSizeMode},set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Fe.STAGE?(this.stage.addEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler),!1,0,!0),this.addEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler)),this.removeEventListener("removedFromStage",
m(this,this.layoutGroup_removedFromStageHandler))));return this._autoSizeMode},_disabledOverlay:null,_currentLayout:null,get_numChildren:function(){return this.items.length},get__numChildren:function(){return wa.prototype.get_numChildren.call(this)},addChildAt:function(a,b){var c=this.items.indexOf(a);if(c==b)return a;var d=this.getPrivateIndexForPublicIndex(b);c>=0&&this.items.splice(c,1);this.items.splice(b,0,a);b=this._addChildAt(a,d);a.addEventListener("resize",m(this,this.layoutGroup_child_resizeHandler));
u.__implements(a,dc)&&a.addEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler),!1,0,!0);this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},_addChild:function(a){return wa.prototype.addChildAt.call(this,a,this.get__numChildren())},_addChildAt:function(a,b){return wa.prototype.addChildAt.call(this,a,b)},removeChild:function(a){if(a==null||a.parent!=this)return a;X.remove(this.items,a);var b=this._removeChild(a);a.removeEventListener("resize",
m(this,this.layoutGroup_child_resizeHandler));u.__implements(a,dc)&&a.removeEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT);return b},_removeChild:function(a){return wa.prototype.removeChild.call(this,a)},removeChildAt:function(a){return a>=0&&a<this.items.length?this.removeChild(this.items[a]):null},_removeChildAt:function(a){return wa.prototype.removeChildAt.call(this,
a)},getChildIndex:function(a){return this.items.indexOf(a)},_getChildIndex:function(a){return wa.prototype.getChildIndex.call(this,a)},getChildByName:function(a){for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},_getChildByName:function(a){return wa.prototype.getChildByName.call(this,a)},removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);if(b==2147483647&&(b=this.items.length-1,b<0))return;if(!(a>this.items.length-1)){if(b<a||a<0||b>this.items.length)throw new oe("The supplied index is out of bounds.");
for(b-=a;b>=0;)this.removeChildAt(a),--b}},_removeChildren:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);wa.prototype.removeChildren.call(this,a,b)},setChildIndex:function(a,b){this.getChildIndex(a)!=b&&(this._setChildIndex(a,this.getPrivateIndexForPublicIndex(b)),X.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},_setChildIndex:function(a,b){wa.prototype.setChildIndex.call(this,a,b)},getChildAt:function(a){return this.items[a]},
_getChildAt:function(a){return wa.prototype.getChildAt.call(this,a)},readjustLayout:function(){this.setInvalid(x.LAYOUT)},initializeLayoutGroupTheme:function(){eu.initialize()},getPrivateIndexForPublicIndex:function(a){return this.items.length>0?a+this._getChildIndex(this.items[0]):this.get__numChildren()>0?a+this.get__numChildren():a},_xmlContent:null,get_xmlContent:function(){return this._xmlContent},set_xmlContent:function(a){if(this._xmlContent==a)return this._xmlContent;if(this._xmlContent!=
null)for(var b=0,c=this._xmlContent;b<c.length;){var d=c[b];++b;this.removeChild(d)}this._xmlContent=a;if(this._xmlContent!=null)for(b=0,c=this._xmlContent;b<c.length;)d=c[b],++b,this.addChild(d);this.setInvalid(x.STYLES);return this._xmlContent},_layoutActive:null,_layoutChanged:null,collectChildren:function(a){if(a==null)return this.items.slice();for(var b=0,c=this.items;b<c.length;){var d=c[b];++b;a.push(d)}return a},validateNow:function(){var a=this._ignoreChangesButSetFlags;this._ignoreChangesButSetFlags=
!0;wa.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){var a=this;this._ignoreChangesButSetFlags=!1;var b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STYLES),f=this.isInvalid(x.STATE);(d||f)&&this.refreshBackgroundSkin();d&&(this.refreshMaskSkin(),this.refreshLayout());if(c||b||d||f)this.refreshViewPortBounds(),this.runWithInvalidationFlagsOnly(function(){a._layoutActive=!0;var g=0;do if(a._layoutChanged=!1,a.handleLayout(),++g,g>=10){a._layoutActive=
!1;g=u.getClass(a).__name__;var h=a.get_layout()!=null?u.getClass(a.get_layout()).__name__:"The layout";throw new fb(""+g+" is stuck in an infinite loop during layout. "+h+" may be dispatching Event.CHANGE too frequently.");}while(a._layoutChanged);a._layoutActive=!1}),this.refreshBackgroundLayout(),this.refreshDisabledOverlay(),this.refreshMaskLayout(),this.validateChildren()},refreshDisabledOverlay:function(){this._enabled||(this._disabledOverlay==null?(this._disabledOverlay=new za,this._disabledOverlay.get_graphics().beginFill(16711935,
0),this._disabledOverlay.get_graphics().drawRect(0,0,1,1),this._disabledOverlay.get_graphics().endFill(),this._addChild(this._disabledOverlay)):this._setChildIndex(this._disabledOverlay,this.get__numChildren()-1));this._disabledOverlay!=null&&(this._disabledOverlay.set_visible(!this._enabled),this._disabledOverlay.set_x(0),this._disabledOverlay.set_y(0),this._disabledOverlay.set_width(this.actualWidth),this._disabledOverlay.set_height(this.actualHeight))},refreshLayout:function(){var a=this.get_layout();
this._currentLayout!=a&&(this._currentLayout!=null&&this._currentLayout.removeEventListener("change",m(this,this.layoutGroup_layout_changeHandler)),this._currentLayout=a,this._currentLayout!=null&&this._currentLayout.addEventListener("change",m(this,this.layoutGroup_layout_changeHandler)))},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this._addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this._removeChild(a))},refreshMaskSkin:function(){var a=this._currentMaskSkin;this._currentMaskSkin=this.getCurrentMaskSkin();this._currentMaskSkin!=a&&(this.removeCurrentMaskSkin(a),this.addCurrentMaskSkin(this._currentMaskSkin))},getCurrentMaskSkin:function(){return this.get_maskSkin()},addCurrentMaskSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&
a.set_uiContext(this),this._addChild(a),this.set_mask(a))},removeCurrentMaskSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this._removeChild(a),this.set_mask(null))},refreshViewPortBounds:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;this._currentBackgroundSkin!=null&&(Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,
this._currentBackgroundSkin,this),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Fe.CONTENT||this.stage==null,l=0,k=0;if(!h){k=this.globalToLocal(new Qa);var q=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight));l=q.x-k.x;k=q.y-k.y}this._layoutMeasurements.width=a&&!h?l:this.get_explicitWidth();this._layoutMeasurements.height=b&&!h?k:this.get_explicitHeight();a=this.get_explicitMinWidth();c&&(a=0);c=this.get_explicitMinHeight();
d&&(c=0);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);this._backgroundSkinMeasurements!=null&&(this._backgroundSkinMeasurements.width!=null?this._backgroundSkinMeasurements.width>a&&(a=this._backgroundSkinMeasurements.width):this._backgroundSkinMeasurements.minWidth!=null&&this._backgroundSkinMeasurements.minWidth>a&&(a=this._backgroundSkinMeasurements.minWidth),this._backgroundSkinMeasurements.height!=null?this._backgroundSkinMeasurements.height>c&&(c=this._backgroundSkinMeasurements.height):
this._backgroundSkinMeasurements.minHeight!=null&&this._backgroundSkinMeasurements.minHeight>c&&(c=this._backgroundSkinMeasurements.minHeight));this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=f},handleLayout:function(){this._currentLayout!=null?this.handleCustomLayout():this.handleManualLayout();this.handleLayoutResult()},handleCustomLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=
!0;this._layoutResult.reset();this._currentLayout.layout(this.items,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleManualLayout:function(){var a=this._layoutMeasurements.width;a==null&&(a=0);var b=this._layoutMeasurements.height;b==null&&(b=0);var c=this._ignoreChildChanges;this._ignoreChildChanges=!0;for(var d=0,f=this.items;d<f.length;){var g=f[d];++d;if(!u.__implements(g,dc)||g.get_includeInLayout()){u.__implements(g,oa)&&g.validateNow();var h=g.get_x()+g.get_width();
g=g.get_y()+g.get_height();a<h&&(a=h);b<g&&(b=g)}}this._ignoreChildChanges=c;this._layoutResult.contentX=0;this._layoutResult.contentY=0;this._layoutResult.contentWidth=a;this._layoutResult.contentHeight=b;this._layoutMeasurements.width!=null?this._layoutResult.viewPortWidth=this._layoutMeasurements.width:(this._layoutMeasurements.minWidth!=null&&a<this._layoutMeasurements.minWidth?a=this._layoutMeasurements.minWidth:this._layoutMeasurements.maxWidth!=null&&a>this._layoutMeasurements.maxWidth&&(a=
this._layoutMeasurements.maxWidth),this._layoutResult.viewPortWidth=a);this._layoutMeasurements.height!=null?this._layoutResult.viewPortHeight=this._layoutMeasurements.height:(this._layoutMeasurements.minHeight!=null&&b<this._layoutMeasurements.minHeight?b=this._layoutMeasurements.minHeight:this._layoutMeasurements.maxHeight!=null&&b>this._layoutMeasurements.maxHeight&&(b=this._layoutMeasurements.maxHeight),this._layoutResult.viewPortHeight=b)},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,
b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},refreshMaskLayout:function(){this._currentMaskSkin!=null&&(this._currentMaskSkin.set_x(0),this._currentMaskSkin.set_y(0),this._currentMaskSkin.set_width(this.actualWidth),this._currentMaskSkin.set_height(this.actualHeight),u.__implements(this._currentMaskSkin,oa)&&this._currentMaskSkin.validateNow())},refreshBackgroundLayout:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),
this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},validateChildren:function(){u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();for(var a=0,b=this.items;a<b.length;){var c=b[a];++a;u.__implements(c,
oa)&&c.validateNow()}},layoutGroup_addedToStageHandler:function(a){this._autoSizeMode==Fe.STAGE&&(this.setInvalid(x.SIZE),this.addEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler)),this.stage.addEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler),!1,0,!0))},layoutGroup_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.layoutGroup_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.layoutGroup_stage_resizeHandler))},
layoutGroup_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},layoutGroup_child_resizeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},layoutGroup_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},layoutGroup_layout_changeHandler:function(a){this._ignoreLayoutChanges||(this._layoutActive?
this._layoutChanged=!0:this._ignoreChangesButSetFlags?this.setInvalidationFlag(x.LAYOUT):this.setInvalid(x.LAYOUT))},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},
set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||
this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__maskSkin:null,get_maskSkin:function(){return this.__maskSkin},set_maskSkin:function(a){if(!this.setStyle("maskSkin")||this.__maskSkin==a)return this.__maskSkin;
this._previousClearStyle=m(this,this.clearStyle_maskSkin);this.__maskSkin=a;this.setInvalid(x.STYLES);return this.__maskSkin},clearStyle_maskSkin:function(){this.set_maskSkin(null);return this.get_maskSkin()},get_styleContext:function(){return sc},__class__:sc,__properties__:I(wa.prototype.__properties__,{set_xmlContent:"set_xmlContent",get_xmlContent:"get_xmlContent",get__numChildren:"get__numChildren",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_maskSkin:"set_maskSkin",
get_maskSkin:"get_maskSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout"})});var ki=function(){this.__scaleManager=null;this._scaleFactor=1;ki._topLevelApplication==null&&(ki._topLevelApplication=this);this.initializeApplicationTheme();sc.call(this);this.addEventListener("addedToStage",m(this,this.application_addedToStageHandler),
!1,100)};r["feathers.controls.Application"]=ki;ki.__name__="feathers.controls.Application";ki.__interfaces__=[tj];ki.__properties__={get_topLevelApplication:"get_topLevelApplication"};ki.get_topLevelApplication=function(){return ki._topLevelApplication};ki.defaultPopUpContainerFactory=function(){return new za};ki.__super__=sc;ki.prototype=I(sc.prototype,{_scaleFactor:null,get_scaleFactor:function(){return this._scaleFactor},_currentScaleManager:null,popUpContainerFactory:null,_applicationPopUpContainer:null,
_applicationFocusManager:null,_applicationToolTipManager:null,initializeApplicationTheme:function(){Dq.initialize()},update:function(){var a=this.isInvalid(x.SIZE),b=this.isInvalid(x.STYLES);(a||b)&&this.refreshScaleManager();sc.prototype.update.call(this)},refreshScaleManager:function(){var a=this,b=this._currentScaleManager;this._currentScaleManager=this.get_scaleManager();this._currentScaleManager!=b&&(b!=null&&(b.removeEventListener("change",m(this,this.application_scaleManager_changeHandler)),
b.set_target(null)),this._currentScaleManager!=null&&(this._currentScaleManager.addEventListener("change",m(this,this.application_scaleManager_changeHandler),!1,0,!0),this.runWithInvalidationFlagsOnly(function(){a._currentScaleManager.set_target(a)})))},refreshDimensions:function(){if(this._currentScaleManager!=null){this._scaleFactor=this._currentScaleManager.getScale();this.set_scaleX(this._scaleFactor);this.set_scaleY(this._scaleFactor);var a=this._currentScaleManager.getBounds();this.set_x(a.x);
this.set_y(a.y);this.set_width(a.width);this.set_height(a.height);this._applicationPopUpContainer!=null&&(this._applicationPopUpContainer.set_scaleX(this._scaleFactor),this._applicationPopUpContainer.set_scaleY(this._scaleFactor))}},preparePopUpManager:function(){if(this._applicationPopUpContainer==null){var a=this.popUpContainerFactory;a==null&&(a=ki.defaultPopUpContainerFactory);this._applicationPopUpContainer=a()}this._applicationPopUpContainer.set_scaleX(this._scaleFactor);this._applicationPopUpContainer.set_scaleY(this._scaleFactor);
this.stage.addChild(this._applicationPopUpContainer);Ub.forStage(this.stage).set_root(this._applicationPopUpContainer)},cleanupPopUpManager:function(){var a=Ub.forStage(this.stage);a.get_root()==this._applicationPopUpContainer&&a.set_root(this.stage);this.stage.removeChild(this._applicationPopUpContainer);this._applicationPopUpContainer=null},prepareFocusManager:function(){sd.hasRoot(this.stage)||(this._applicationFocusManager=sd.addRoot(this.stage))},cleanupFocusManager:function(){this._applicationFocusManager!=
null&&(this._applicationFocusManager=null,sd.removeRoot(this.stage))},prepareToolTipManager:function(){Ud.hasRoot(this.stage)||(this._applicationToolTipManager=Ud.addRoot(this.stage))},cleanupToolTipManager:function(){this._applicationToolTipManager!=null&&(this._applicationToolTipManager=null,Ud.removeRoot(this.stage))},application_addedToStageHandler:function(a){this.addEventListener("removedFromStage",m(this,this.application_removedFromStageHandler));this.prepareFocusManager();this.preparePopUpManager();
this.prepareToolTipManager()},application_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.application_removedFromStageHandler));this.cleanupToolTipManager();this.cleanupPopUpManager();this.cleanupFocusManager()},application_scaleManager_changeHandler:function(a){this.refreshDimensions()},get_styleContext:function(){return ki},__scaleManager:null,get_scaleManager:function(){return this.__scaleManager},set_scaleManager:function(a){if(!this.setStyle("scaleManager")||
this.__scaleManager==a)return this.__scaleManager;this._previousClearStyle=m(this,this.clearStyle_scaleManager);this.__scaleManager=a;this.setInvalid(x.STYLES);return this.__scaleManager},clearStyle_scaleManager:function(){this.set_scaleManager(null);return this.get_scaleManager()},__class__:ki,__properties__:I(sc.prototype.__properties__,{set_scaleManager:"set_scaleManager",get_scaleManager:"get_scaleManager",get_scaleFactor:"get_scaleFactor"})});var an=function(a,b){this._scaleMode=3;this._scaleModeMask=
null;this._sourceScale=1;this._contentMeasurements=new Ib;wa.call(this);this.set_source(a);b!=null&&this.addEventListener("complete",b)};r["feathers.controls.AssetLoader"]=an;an.__name__="feathers.controls.AssetLoader";an.__super__=wa;an.prototype=I(wa.prototype,{content:null,loader:null,_contentMeasurements:null,_pendingFuture:null,_sourceScale:null,get_sourceScale:function(){return this._sourceScale},set_sourceScale:function(a){if(this._sourceScale==a)return this._sourceScale;this._sourceScale=
a;this.setInvalid(x.SIZE);return this._sourceScale},_source:null,get_source:function(){return this._source},set_source:function(a){var b=this;if(this._source==a)return this._source;this.loader!=null&&this.loader.unloadAndStop();this.content!=null&&(this.removeChild(this.content),this.content=null);this._source=a;if(this._source==null)this._pendingFuture=null,this.cleanupLoader();else if(ub.exists(this._source,"IMAGE"))if(this.cleanupLoader(),ub.isLocal(this._source,"IMAGE"))this._pendingFuture=null,
a=ub.getBitmapData(this._source),a=this.createBitmap(a),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var c=ub.loadBitmapData(this._source);c.onProgress(function(f,g){b.dispatchEvent(new kh("progress",!1,!1,f,g))}).onComplete(function(f){c==b._pendingFuture&&(f=b.createBitmap(f),b._contentMeasurements.save(f),b.addChild(f),b.content=f,b.setInvalid(x.DATA),b.dispatchEvent(new ka("complete")))}).onError(function(f){b.dispatchEvent(new Eh("ioError"))});this._pendingFuture=c}else if(ub.exists(this._source,
"MOVIE_CLIP"))if(this.cleanupLoader(),ub.isLocal(this._source,"MOVIE_CLIP"))this._pendingFuture=null,a=ub.getMovieClip(this._source),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var d=ub.loadMovieClip(this._source);d.onProgress(function(f,g){b.dispatchEvent(new kh("progress",!1,!1,f,g))}).onComplete(function(f){d==b._pendingFuture&&(b._contentMeasurements.save(f),b.addChild(f),b.content=f,b.setInvalid(x.DATA),b.dispatchEvent(new ka("complete")))}).onError(function(f){b.dispatchEvent(new Eh("ioError"))});
this._pendingFuture=d}else{this._pendingFuture=null;this.loader==null&&(this.loader=new Gf,this.loader.contentLoaderInfo.addEventListener("complete",m(this,this.loader_contentLoaderInfo_completeHandler)),this.loader.contentLoaderInfo.addEventListener("progress",m(this,this.loader_contentLoaderInfo_progressHandler)),this.loader.contentLoaderInfo.addEventListener("ioError",m(this,this.loader_contentLoaderInfo_ioErrorHandler)),this.loader.contentLoaderInfo.addEventListener("securityError",m(this,this.loader_contentLoaderInfo_securityErrorHandler)));
try{this.loader.load(new Ve(this._source))}catch(f){Rb.lastError=f,a=la.caught(f).unwrap(),a instanceof Qq&&this.dispatchEvent(new dm("securityError",!1,!1,a.get_message(),a.errorID))}}this.setInvalid(x.DATA);return this._source},get_originalSourceWidth:function(){return this._contentMeasurements==null?null:this._contentMeasurements.width},get_originalSourceHeight:function(){return this._contentMeasurements==null?null:this._contentMeasurements.height},_scaleModeMask:null,_scaleMode:null,get_scaleMode:function(){return this._scaleMode},
set_scaleMode:function(a){if(this._scaleMode==a)return this._scaleMode;this._scaleMode=a;this.setInvalid(x.LAYOUT);return this._scaleMode},dispose:function(){this.set_source(null);wa.prototype.dispose.call(this)},update:function(){this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);this.measure();this.layoutChildren()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==
null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._contentMeasurements.width,l=this._contentMeasurements.height;h!=null&&this._sourceScale!=1&&(h*=this._sourceScale);l!=null&&this._sourceScale!=1&&(l*=this._sourceScale);var k=1,q=1;this.content!=null&&this._scaleMode!=2&&(a?this.get_explicitMaxWidth()!=null&&this.get_explicitMaxWidth()<h?k=this.get_explicitMaxWidth()/h:this.get_explicitMinWidth()!=null&&this.get_explicitMinWidth()>h&&(k=this.get_explicitMinWidth()/
h):k=this.get_explicitWidth()/h,b?this.get_explicitMaxHeight()!=null&&this.get_explicitMaxHeight()<l?q=this.get_explicitMaxHeight()/l:this.get_explicitMinHeight()!=null&&this.get_explicitMinHeight()>l&&(q=this.get_explicitMinHeight()/l):q=this.get_explicitHeight()/l);var w=this.get_explicitWidth();a&&(w=this.content!=null?h*q:0);a=this.get_explicitHeight();b&&(a=this.content!=null?l*k:0);b=this.get_explicitMinWidth();c&&(b=this.content!=null?h*q:0);c=this.get_explicitMinHeight();d&&(c=this.content!=
null?l*k:0);d=this.get_explicitMaxWidth();f&&(d=this.content!=null?h*q:1/0);f=this.get_explicitMaxHeight();g&&(f=this.content!=null?l*k:1/0);return this.saveMeasurements(w,a,b,c,d,f)},layoutChildren:function(){if(this.content!=null){var a=!1;switch(this._scaleMode){case 0:this.content.set_x(0);this.content.set_y(0);this.content.set_width(this.actualWidth);this.content.set_height(this.actualHeight);break;case 1:var b=new Ea(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ea(0,
0,this.actualWidth,this.actualHeight);a=ol.fillRectangle(b,c,c);this.content.set_x(a.x);this.content.set_y(a.y);this.content.set_width(a.width);this.content.set_height(a.height);a=this.content.get_width()>this.actualWidth||this.content.get_height()>this.actualHeight;break;case 2:this.content.set_x(0);this.content.set_y(0);this._contentMeasurements.restore(this.content);u.__implements(this.content,oa)&&this.content.validateNow();a=this.content.get_width()>this.actualWidth||this.content.get_height()>
this.actualHeight;break;default:b=new Ea(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ea(0,0,this.actualWidth,this.actualHeight),ol.fitRectangle(b,c,c),this.content.set_x(c.x),this.content.set_y(c.y),this.content.set_width(c.width),this.content.set_height(c.height)}a?(this._scaleModeMask==null&&(this._scaleModeMask=new db(Ab.SolidColor(16711935)),this.addChild(this._scaleModeMask)),this._scaleModeMask.set_width(this.actualWidth),this._scaleModeMask.set_height(this.actualHeight),
this.content.set_mask(this._scaleModeMask)):(this._scaleModeMask!=null&&(this.removeChild(this._scaleModeMask),this._scaleModeMask=null),this.content.set_mask(null))}},createBitmap:function(a){return new cg(a)},cleanupLoader:function(){this.loader!=null&&(this.loader.contentLoaderInfo.removeEventListener("complete",m(this,this.loader_contentLoaderInfo_completeHandler)),this.loader.contentLoaderInfo.removeEventListener("progress",m(this,this.loader_contentLoaderInfo_progressHandler)),this.loader.contentLoaderInfo.removeEventListener("ioError",
m(this,this.loader_contentLoaderInfo_ioErrorHandler)),this.loader.contentLoaderInfo.removeEventListener("securityError",m(this,this.loader_contentLoaderInfo_securityErrorHandler)),this.loader=null)},loader_contentLoaderInfo_progressHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_ioErrorHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_securityErrorHandler:function(a){this.dispatchEvent(a)},loader_contentLoaderInfo_completeHandler:function(a){this.addChild(this.loader);
this.content=this.loader;this._contentMeasurements.save(this.content);this.setInvalid(x.LAYOUT);this.dispatchEvent(a)},get_styleContext:function(){return an},__class__:an,__properties__:I(wa.prototype.__properties__,{set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",get_originalSourceHeight:"get_originalSourceHeight",get_originalSourceWidth:"get_originalSourceWidth",set_source:"set_source",get_source:"get_source",set_sourceScale:"set_sourceScale",get_sourceScale:"get_sourceScale"})});var md=
function(){};r["feathers.controls.IToggle"]=md;md.__name__="feathers.controls.IToggle";md.__isInterface__=!0;md.__interfaces__=[jb];md.prototype={get_selected:null,set_selected:null,__class__:md,__properties__:{set_selected:"set_selected",get_selected:"get_selected"}};var li=function(a){this.__backgroundSkin=this.__selectedBackgroundSkin=null;this.__keepDownStateOnRollOut=!1;this._stateToSkin=new Ye;this._pointerToState=this._keyToState=this._pointerTrigger=this._backgroundSkinMeasurements=this._currentBackgroundSkin=
null;this._toggleable=!0;this._selected=!1;this._currentState=Nb.UP(!1);wa.call(this);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.addEventListener("click",m(this,this.basicToggleButton_clickHandler));this.addEventListener("touchTap",m(this,this.basicToggleButton_touchTapHandler));this.addEventListener("trigger",m(this,this.basicToggleButton_triggerHandler));a!=null&&this.addEventListener("change",a)};r["feathers.controls.BasicToggleButton"]=li;li.__name__="feathers.controls.BasicToggleButton";
li.__interfaces__=[mh,md,Fh];li.__super__=wa;li.prototype=I(wa.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){wa.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Nb.UP(a.selected))):this.changeState(Nb.DISABLED(this._selected));return this._enabled},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=
a;this.setInvalid(x.SELECTION);this.setInvalid(x.STATE);W.dispatch(this,"change");this.changeState(this.get_currentState());return this._selected},_toggleable:null,get_toggleable:function(){return this._toggleable},set_toggleable:function(a){return this._toggleable==a?this._toggleable:this._toggleable=a},_pointerToState:null,_keyToState:null,_pointerTrigger:null,_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},
setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initialize:function(){wa.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new Yl(this,m(this,this.changeState),Nb.UP(!1),Nb.DOWN(!1),Nb.HOVER(!1)));this._keyToState==
null&&(this._keyToState=new Wm(this,m(this,this.changeState),Nb.UP(!1),Nb.DOWN(!1)));this._pointerTrigger==null&&(this._pointerTrigger=new uq(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(x.SELECTION),b=this.isInvalid(x.STYLES),c=this.isInvalid(x.STATE);(a||c||b)&&this.refreshBackgroundSkin();b&&this.refreshInteractivity()},refreshInteractivity:function(){this._pointerToState.set_keepDownStateOnRollOut(this.get_keepDownStateOnRollOut())},
refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_backgroundSkin()},addCurrentBackgroundSkin:function(a){a==
null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),u.__implements(a,Td)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._backgroundSkinMeasurements.restore(a),
a.parent==this&&this.removeChild(a))},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);
u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();var l=this.get_explicitWidth();a&&(l=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_width():0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._currentBackgroundSkin.get_height():0);b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null?this._backgroundSkinMeasurements.minWidth:
0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null?this._backgroundSkinMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=
null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},layoutContent:function(){this.layoutBackgroundSkin()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),
u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},changeState:function(a){this._enabled||(a=Nb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Nb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Nb.HOVER(this._selected));break;case 2:b=a.selected;this._selected!=b&&(a=Nb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Nb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=
a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},basicToggleButton_clickHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicToggleButton_touchTapHandler:function(a){this._enabled||a.stopImmediatePropagation()},basicToggleButton_triggerHandler:function(a){this._enabled&&this._toggleable&&this.set_selected(!this._selected)},__keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this.__keepDownStateOnRollOut},set_keepDownStateOnRollOut:function(a){if(!this.setStyle("keepDownStateOnRollOut")||
this.__keepDownStateOnRollOut==a)return this.__keepDownStateOnRollOut;this._previousClearStyle=m(this,this.clearStyle_keepDownStateOnRollOut);this.__keepDownStateOnRollOut=a;this.setInvalid(x.STYLES);return this.__keepDownStateOnRollOut},clearStyle_keepDownStateOnRollOut:function(){this.set_keepDownStateOnRollOut(!1);return this.get_keepDownStateOnRollOut()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__selectedBackgroundSkin:null,get_selectedBackgroundSkin:function(){return this.__selectedBackgroundSkin},set_selectedBackgroundSkin:function(a){if(!this.setStyle("selectedBackgroundSkin")||this.__selectedBackgroundSkin==
a)return this.__selectedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedBackgroundSkin);this.__selectedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedBackgroundSkin},clearStyle_selectedBackgroundSkin:function(){this.set_selectedBackgroundSkin(null);return this.get_selectedBackgroundSkin()},__class__:li,__properties__:I(wa.prototype.__properties__,{set_selectedBackgroundSkin:"set_selectedBackgroundSkin",get_selectedBackgroundSkin:"get_selectedBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",set_toggleable:"set_toggleable",get_toggleable:"get_toggleable",set_selected:"set_selected",get_selected:"get_selected",get_currentState:"get_currentState"})});var Pq=function(a,b){this.inactiveButtons=[];this.activeButtons=[];this.id=a;this.buttonRecycler=b};r["feathers.controls._ButtonBar.ButtonStorage"]=Pq;
Pq.__name__="feathers.controls._ButtonBar.ButtonStorage";Pq.prototype={id:null,oldButtonRecycler:null,buttonRecycler:null,activeButtons:null,inactiveButtons:null,__class__:Pq};var Cc=O["feathers.controls.ButtonState"]={__ename__:"feathers.controls.ButtonState",__constructs__:null,UP:{_hx_name:"UP",_hx_index:0,__enum__:"feathers.controls.ButtonState",toString:D},HOVER:{_hx_name:"HOVER",_hx_index:1,__enum__:"feathers.controls.ButtonState",toString:D},DOWN:{_hx_name:"DOWN",_hx_index:2,__enum__:"feathers.controls.ButtonState",
toString:D},DISABLED:{_hx_name:"DISABLED",_hx_index:3,__enum__:"feathers.controls.ButtonState",toString:D}};Cc.__constructs__=[Cc.UP,Cc.HOVER,Cc.DOWN,Cc.DISABLED];var Yc=function(a,b,c){b==null&&(b=!1);this.__showText=!0;this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.CENTER;this.__gap=this.__minGap=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__iconPosition=ja.LEFT;this.__disabledTextFormat=
this.__selectedTextFormat=null;this.__embedFonts=this.__wordWrap=!1;this.__icon=this.__disabledIcon=this.__selectedIcon=this.__textFormat=this.__styleSheet=null;this._stateToTextFormat=new Ye;this._ignoreIconResizes=!1;this._iconMeasurements=this._currentIcon=null;this._stateToIcon=new Ye;this._htmlText=null;this._updatedTextStyles=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeToggleButtonTheme();li.call(this,c);this.set_text(a);
this.set_selected(b);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.addEventListener("keyDown",m(this,this.toggleButton_keyDownHandler));this.addEventListener("focusIn",m(this,this.toggleButton_focusInHandler));this.addEventListener("focusOut",m(this,this.toggleButton_focusOutHandler))};r["feathers.controls.ToggleButton"]=Yc;Yc.__name__="feathers.controls.ToggleButton";Yc.__interfaces__=[ld,kl,de];Yc.__super__=li;Yc.prototype=I(li.prototype,{textField:null,_previousText:null,_previousHTMLText:null,
_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=
null&&this._text.length>0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;
this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToIcon:null,_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_stateToTextFormat:null,getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,
b),this.setInvalid(x.STYLES))},getIconForState:function(a){return this._stateToIcon.get(a)},setIconForState:function(a,b){if(this.setStyle("setIconForState",a)){var c=this._stateToIcon.get(a);c!=null&&c==this._currentIcon&&(this.removeCurrentIcon(c),this._currentIcon=null);b==null?this._stateToIcon.remove(a):this._stateToIcon.set(a,b);this.setInvalid(x.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeToggleButtonTheme:function(){tu.initialize()},
initialize:function(){li.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_selectable(!1),this.textField.set_multiline(!0),this.addChild(this.textField))},commitChanges:function(){li.prototype.commitChanges.call(this);var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=!1;(d||c)&&this.refreshIcon();(d||c)&&this.refreshTextStyles();(a||d||c||b)&&this.refreshText(b)},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this.get_showText()&&this._text!=null,l=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;(h||l)&&this.refreshTextFieldDimensions(!0);this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,
this);h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();u.__implements(this._currentIcon,oa)&&(l=this._ignoreIconResizes,this._ignoreIconResizes=!0,this._currentIcon.validateNow(),this._ignoreIconResizes=l);l=this.get_explicitWidth();a&&(l=this.measureContentWidth(),l+=this.get_paddingLeft()+this.get_paddingRight(),this._currentBackgroundSkin!=null&&(l=Math.max(this._currentBackgroundSkin.get_width(),
l)));a=this.get_explicitHeight();b&&(a=this.measureContentHeight(),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this.measureContentMinWidth(),b+=this.get_paddingLeft()+this.get_paddingRight(),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,
b)));c=this.get_explicitMinHeight();d&&(c=this.measureContentMinHeight(),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:
1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},calculateExplicitWidthForTextMeasurement:function(){var a=null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=
null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentIcon==null||this.get_iconPosition()!=ja.LEFT&&this.get_iconPosition()!=ja.RIGHT||(u.__implements(this._currentIcon,oa)&&this._currentIcon.validateNow(),a-=this._currentIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=Math.max(d,this._currentIcon.get_width());return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&
this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0;if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),
this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,
this.toggleButton_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.toggleButton_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this.get_showText()&&this._text!=null&&this._text.length>0,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=
this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_htmlText(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),
this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},getCurrentTextFormat:function(){if(this.get_styleSheet()!=null)return null;var a=this._stateToTextFormat.get(this._currentState);return a!=
null?a:this._enabled||this.get_disabledTextFormat()==null?this._selected&&this.get_selectedTextFormat()!=null?this.get_selectedTextFormat():this.get_textFormat():this.get_disabledTextFormat()},layoutContent:function(){li.prototype.layoutContent.call(this);this.layoutChildren()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);var a=this.get_showText()&&this._text!=null,b=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,c=this._currentIcon!=null&&this.get_iconPosition()!=
ja.MANUAL;(a||b)&&c?(this.positionSingleChild(this.textField),this.positionTextAndIcon()):a||b?this.positionSingleChild(this.textField):c&&this.positionSingleChild(this._currentIcon);this._currentIcon!=null&&(this.get_iconPosition()==ja.MANUAL&&(this._currentIcon.set_x(this.get_paddingLeft()),this._currentIcon.set_y(this.get_paddingTop())),b=this._currentIcon,b.set_x(b.get_x()+this.get_iconOffsetX()),b=this._currentIcon,b.set_y(b.get_y()+this.get_iconOffsetY()));a&&(b=this.textField,b.set_x(b.get_x()+
this.get_textOffsetX()),b=this.textField,b.set_y(b.get_y()+this.get_textOffsetY()))},refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;u.__implements(this._currentIcon,oa)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),
a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();if(this._currentIcon!=null){a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)c-=this._currentIcon.get_height()+a}b>this._textMeasuredWidth&&
(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},positionSingleChild:function(a){this.get_horizontalAlign()==Vb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.RIGHT?a.set_x(this.actualWidth-this.get_paddingRight()-
a.get_width()):a.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-a.get_width())/2);this.get_verticalAlign()==fc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.BOTTOM?a.set_y(this.actualHeight-this.get_paddingBottom()-a.get_height()):a.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-a.get_height())/2)},positionTextAndIcon:function(){if(this.get_iconPosition()==ja.TOP)if(this.get_gap()==1/0)this._currentIcon.set_y(this.get_paddingTop()),
this.textField.set_y(this.actualHeight-this.get_paddingBottom()-this.textField.get_height());else{if(this.get_verticalAlign()==fc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==fc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap())/2));this._currentIcon.set_y(this.textField.get_y()-this._currentIcon.get_height()-this.get_gap())}else this.get_iconPosition()==ja.RIGHT?this.get_gap()==
1/0?(this.textField.set_x(this.get_paddingLeft()),this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width())):(this.get_horizontalAlign()==Vb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Vb.CENTER&&(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap())/2)),this._currentIcon.set_x(this.textField.get_x()+this.textField.get_width()+this.get_gap())):this.get_iconPosition()==
ja.BOTTOM?this.get_gap()==1/0?(this.textField.set_y(this.get_paddingTop()),this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height())):(this.get_verticalAlign()==fc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==fc.MIDDLE&&(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap())/2)),this._currentIcon.set_y(this.textField.get_y()+this.textField.get_height()+this.get_gap())):
this.get_iconPosition()==ja.LEFT&&(this.get_gap()==1/0?(this._currentIcon.set_x(this.get_paddingLeft()),this.textField.set_x(this.actualWidth-this.get_paddingRight()-this.textField.get_width())):(this.get_horizontalAlign()==Vb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Vb.CENTER&&(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width())/2)),this._currentIcon.set_x(this.textField.get_x()-this.get_gap()-
this._currentIcon.get_width())));this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT?this.get_verticalAlign()==fc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.BOTTOM?this._currentIcon.set_y(this.actualHeight-this.get_paddingBottom()-this._currentIcon.get_height()):this._currentIcon.set_y(this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentIcon.get_height())/2):this.get_horizontalAlign()==Vb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):
this.get_horizontalAlign()==Vb.RIGHT?this._currentIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentIcon.get_width()):this._currentIcon.set_x(this.get_paddingLeft()+(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this._currentIcon.get_width())/2)},refreshIcon:function(){var a=this._currentIcon;this._currentIcon=this.getCurrentIcon();this._currentIcon!=a&&(this.removeCurrentIcon(a),this.addCurrentIcon(this._currentIcon))},getCurrentIcon:function(){var a=this._stateToIcon.get(this._currentState);
return a!=null?a:this._enabled||this.get_disabledIcon()==null?this._selected&&this.get_selectedIcon()!=null?this.get_selectedIcon():this.get_icon():this.get_disabledIcon()},addCurrentIcon:function(a){if(a==null)this._iconMeasurements=null;else{u.__implements(a,jb)&&a.initializeNow();this._iconMeasurements==null?this._iconMeasurements=new Ib(a):this._iconMeasurements.save(a);u.__implements(a,wb)&&a.set_uiContext(this);u.__implements(a,Td)&&a.set_stateContext(this);a.addEventListener("resize",m(this,
this.toggleButton_icon_resizeHandler),!1,0,!0);var b=this.getChildIndex(this.textField);this.addChildAt(a,b)}},removeCurrentIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.toggleButton_icon_resizeHandler)),u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._iconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},toggleButton_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&this.focusRect==1||this._focusManager!=
null&&this._focusManager.get_focus()!=this||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Bc("click")))},toggleButton_focusInHandler:function(a){this._keyToState.set_enabled(this._enabled)},toggleButton_focusOutHandler:function(a){this._keyToState.set_enabled(!1)},toggleButton_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},toggleButton_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return Yc},
__icon:null,get_icon:function(){return this.__icon},set_icon:function(a){if(!this.setStyle("icon")||this.__icon==a)return this.__icon;this._previousClearStyle=m(this,this.clearStyle_icon);this.__icon=a;this.setInvalid(x.STYLES);return this.__icon},clearStyle_icon:function(){this.set_icon(null);return this.get_icon()},__disabledIcon:null,get_disabledIcon:function(){return this.__disabledIcon},set_disabledIcon:function(a){if(!this.setStyle("disabledIcon")||this.__disabledIcon==a)return this.__disabledIcon;
this._previousClearStyle=m(this,this.clearStyle_disabledIcon);this.__disabledIcon=a;this.setInvalid(x.STYLES);return this.__disabledIcon},clearStyle_disabledIcon:function(){this.set_disabledIcon(null);return this.get_disabledIcon()},__selectedIcon:null,get_selectedIcon:function(){return this.__selectedIcon},set_selectedIcon:function(a){if(!this.setStyle("selectedIcon")||this.__selectedIcon==a)return this.__selectedIcon;this._previousClearStyle=m(this,this.clearStyle_selectedIcon);this.__selectedIcon=
a;this.setInvalid(x.STYLES);return this.__selectedIcon},clearStyle_selectedIcon:function(){this.set_selectedIcon(null);return this.get_selectedIcon()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);return this.get_styleSheet()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||
this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=
a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},
clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__selectedTextFormat:null,get_selectedTextFormat:function(){return this.__selectedTextFormat},set_selectedTextFormat:function(a){if(!this.setStyle("selectedTextFormat")||this.__selectedTextFormat==a)return this.__selectedTextFormat;this._previousClearStyle=m(this,this.clearStyle_selectedTextFormat);this.__selectedTextFormat=a;this.setInvalid(x.STYLES);return this.__selectedTextFormat},
clearStyle_selectedTextFormat:function(){this.set_selectedTextFormat(null);return this.get_selectedTextFormat()},__iconPosition:null,get_iconPosition:function(){return this.__iconPosition},set_iconPosition:function(a){if(!this.setStyle("iconPosition")||this.__iconPosition==a)return this.__iconPosition;this._previousClearStyle=m(this,this.clearStyle_iconPosition);this.__iconPosition=a;this.setInvalid(x.STYLES);return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(ja.LEFT);
return this.get_iconPosition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__minGap:null,get_minGap:function(){return this.__minGap},set_minGap:function(a){if(!this.setStyle("minGap")||this.__minGap==a)return this.__minGap;this._previousClearStyle=
m(this,this.clearStyle_minGap);this.__minGap=a;this.setInvalid(x.STYLES);return this.__minGap},clearStyle_minGap:function(){this.set_minGap(0);return this.get_minGap()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);
return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},
set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==
a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);
this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.CENTER);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);return this.get_verticalAlign()},__iconOffsetX:null,get_iconOffsetX:function(){return this.__iconOffsetX},set_iconOffsetX:function(a){if(!this.setStyle("iconOffsetX")||this.__iconOffsetX==a)return this.__iconOffsetX;this._previousClearStyle=m(this,this.clearStyle_iconOffsetX);this.__iconOffsetX=a;this.setInvalid(x.STYLES);return this.__iconOffsetX},clearStyle_iconOffsetX:function(){this.set_iconOffsetX(0);return this.get_iconOffsetX()},
__iconOffsetY:null,get_iconOffsetY:function(){return this.__iconOffsetY},set_iconOffsetY:function(a){if(!this.setStyle("iconOffsetY")||this.__iconOffsetY==a)return this.__iconOffsetY;this._previousClearStyle=m(this,this.clearStyle_iconOffsetY);this.__iconOffsetY=a;this.setInvalid(x.STYLES);return this.__iconOffsetY},clearStyle_iconOffsetY:function(){this.set_iconOffsetY(0);return this.get_iconOffsetY()},__textOffsetX:null,get_textOffsetX:function(){return this.__textOffsetX},set_textOffsetX:function(a){if(!this.setStyle("textOffsetX")||
this.__textOffsetX==a)return this.__textOffsetX;this._previousClearStyle=m(this,this.clearStyle_textOffsetX);this.__textOffsetX=a;this.setInvalid(x.STYLES);return this.__textOffsetX},clearStyle_textOffsetX:function(){this.set_textOffsetX(0);return this.get_textOffsetX()},__textOffsetY:null,get_textOffsetY:function(){return this.__textOffsetY},set_textOffsetY:function(a){if(!this.setStyle("textOffsetY")||this.__textOffsetY==a)return this.__textOffsetY;this._previousClearStyle=m(this,this.clearStyle_textOffsetY);
this.__textOffsetY=a;this.setInvalid(x.STYLES);return this.__textOffsetY},clearStyle_textOffsetY:function(){this.set_textOffsetY(0);return this.get_textOffsetY()},__showText:null,get_showText:function(){return this.__showText},set_showText:function(a){if(!this.setStyle("showText")||this.__showText==a)return this.__showText;this._previousClearStyle=m(this,this.clearStyle_showText);this.__showText=a;this.setInvalid(x.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);
return this.get_showText()},__class__:Yc,__properties__:I(li.prototype.__properties__,{set_showText:"set_showText",get_showText:"get_showText",set_textOffsetY:"set_textOffsetY",get_textOffsetY:"get_textOffsetY",set_textOffsetX:"set_textOffsetX",get_textOffsetX:"get_textOffsetX",set_iconOffsetY:"set_iconOffsetY",get_iconOffsetY:"get_iconOffsetY",set_iconOffsetX:"set_iconOffsetX",get_iconOffsetX:"get_iconOffsetX",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",
get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_iconPosition:"set_iconPosition",get_iconPosition:"get_iconPosition",set_selectedTextFormat:"set_selectedTextFormat",
get_selectedTextFormat:"get_selectedTextFormat",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_selectedIcon:"set_selectedIcon",get_selectedIcon:"get_selectedIcon",set_disabledIcon:"set_disabledIcon",get_disabledIcon:"get_disabledIcon",
set_icon:"set_icon",get_icon:"get_icon",get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var $l=function(a,b,c){b==null&&(b=!1);this.initializeCheckTheme();Yc.call(this,a,b,c)};r["feathers.controls.Check"]=$l;$l.__name__="feathers.controls.Check";$l.__super__=Yc;$l.prototype=I(Yc.prototype,{initializeCheckTheme:function(){St.initialize()},get_styleContext:function(){return $l},__class__:$l});var mi=function(){};r["feathers.core.IOpenCloseToggle"]=
mi;mi.__name__="feathers.core.IOpenCloseToggle";mi.__isInterface__=!0;mi.__interfaces__=[jb];mi.prototype={get_opened:null,set_opened:null,__class__:mi,__properties__:{set_opened:"set_opened",get_opened:"get_opened"}};var qh=function(a,b){this.__animateContentAlpha=!1;this.__openCloseDuration=.2;this.__customHeaderVariant=null;this.openCloseEase=lh.easeOut;this._previousCustomHeaderVariant=null;this._opened=this._animateOpenedProperty=!0;this._pendingAnimation=!1;this._pendingOpened=null;this._ignoreContentResize=
!1;this._contentOriginalAlpha=1;this._contentMeasurements=new Ib;this._scrollRect2=new Ea;this._scrollRect1=new Ea;this._ignoreHeaderEvents=!1;this.headerMeasurements=new Ib;this._measuredOpenHeight=0;this._collapseActuator=this._pendingHeight=null;this.initializeCollapsibleTheme();wa.call(this);this.set_text(a);this.set_content(b)};r["feathers.controls.Collapsible"]=qh;qh.__name__="feathers.controls.Collapsible";qh.__interfaces__=[mi];qh.__super__=wa;qh.prototype=I(wa.prototype,{_collapseActuator:null,
_pendingHeight:null,_measuredOpenHeight:null,header:null,headerMeasurements:null,_ignoreHeaderEvents:null,_currentScrollRect:null,_scrollRect1:null,_scrollRect2:null,_contentMeasurements:null,_contentOriginalAlpha:null,_ignoreContentResize:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&(this._content.removeEventListener("resize",m(this,this.collapsible_content_resizeHandler)),this._content.set_alpha(this._contentOriginalAlpha),
this._contentMeasurements.restore(this._content),this.removeChild(this._content));this._content=a;this._content!=null&&(this.addChild(this._content),this._contentMeasurements.save(this._content),this._contentOriginalAlpha=this._content.get_alpha(),this._content.addEventListener("resize",m(this,this.collapsible_content_resizeHandler)));this.setInvalid(x.DATA);return this._content},_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;
this.setInvalid(x.DATA);return this._text},_pendingOpened:null,_pendingAnimation:null,_opened:null,get_opened:function(){return this._pendingOpened!=null?this._pendingOpened:this._opened},set_opened:function(a){a?this.openContent(this._animateOpenedProperty):this.closeContent(this._animateOpenedProperty);return this._pendingOpened!=null?this._pendingOpened:this._opened},_animateOpenedProperty:null,get_animateOpenedProperty:function(){return this._animateOpenedProperty},set_animateOpenedProperty:function(a){return this._animateOpenedProperty=
a},_oldHeaderFactory:null,_headerFactory:null,get_headerFactory:function(){return this._headerFactory},set_headerFactory:function(a){if(this._headerFactory==a)return this._headerFactory;this._headerFactory=a;this.setInvalid(qh.INVALIDATION_FLAG_HEADER_FACTORY);return this._headerFactory},_previousCustomHeaderVariant:null,openCloseEase:null,dispose:function(){this._collapseActuator!=null&&(ua.stop(this._collapseActuator),this._collapseActuator=null);this.set_content(null);this.destroyHeader();wa.prototype.dispose.call(this)},
openContent:function(a){a==null&&(a=!0);this._pendingAnimation=a;this._pendingOpened!=null&&this._pendingOpened||!W.dispatch(this,"opening",!1,!0)||(this._pendingOpened=!0,this.setInvalid(x.DATA))},closeContent:function(a){a==null&&(a=!0);this._pendingAnimation=a;(this._pendingOpened==null||this._pendingOpened)&&W.dispatch(this,"closing",!1,!0)&&(this._pendingOpened=!1,this.setInvalid(x.DATA))},initializeCollapsibleTheme:function(){Ak.initialize()},update:function(){this._previousCustomHeaderVariant!=
this.get_customHeaderVariant()&&this.setInvalidationFlag(qh.INVALIDATION_FLAG_HEADER_FACTORY);var a=this.isInvalid(x.DATA);this.isInvalid(qh.INVALIDATION_FLAG_HEADER_FACTORY)&&this.createHeader();a&&(this.updateText(),this.updateOpened());this.measure();this.layoutChildren();this._previousCustomHeaderVariant=this.get_customHeaderVariant()},measure:function(){var a=null;u.__implements(this.header,Kb)&&(a=this.header);Ne.resetFluidlyWithParentValues(this.headerMeasurements,this.header,this.get_explicitWidth(),
null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null);u.__implements(this.header,oa)&&this.header.validateNow();var b=null;this._content!=null&&(u.__implements(this._content,Kb)&&(b=this._content),Ne.resetFluidlyWithParentValues(this._contentMeasurements,this._content,this.get_explicitWidth(),null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null),u.__implements(this._content,oa)&&this._content.validateNow());this._measuredOpenHeight=this.header.get_height();this._content!=
null&&(this._measuredOpenHeight+=this._content.get_height());var c=this.get_explicitWidth()==null,d=this.get_explicitHeight()==null,f=this.get_explicitMinWidth()==null,g=this.get_explicitMinHeight()==null,h=this.get_explicitMaxWidth()==null,l=this.get_explicitMaxHeight()==null;if(!(c||d||f||g||h||l))return!1;h=this.get_explicitWidth();c&&(h=this.header.get_width(),this._content!=null&&(h=Math.max(h,this._content.get_width())));c=this.get_explicitHeight();d&&(c=this._pendingHeight!=null?this._pendingHeight:
this._content!=null&&this._content.get_visible()?this._measuredOpenHeight:this.header.get_height());d=this.get_explicitMinWidth();f&&(d=a!=null?a.get_minWidth():this.header.get_width(),this._content!=null&&(d=b!=null?Math.max(d,b.get_minWidth()):Math.max(d,this._content.get_width())));a=this.get_explicitMinHeight();g&&(a=this.header.get_height());return this.saveMeasurements(h,c,d,a)},updateText:function(){u.__implements(this.header,de)&&this.header.set_text(this._text)},updateOpened:function(){var a=
this;if(this._pendingOpened!=null){this._collapseActuator!=null&&(ua.stop(this._collapseActuator),this._collapseActuator=null,W.dispatch(this,"cancel"));var b=this._ignoreHeaderEvents;this._ignoreHeaderEvents=!0;u.__implements(this.header,mi)?this.header.set_opened(this._pendingOpened):u.__implements(this.header,md)&&this.header.set_selected(this._pendingOpened);this._ignoreHeaderEvents=b;this._pendingAnimation?(this._pendingHeight=this.actualHeight,this._pendingOpened?(this._content!=null&&this._content.set_visible(!0),
b=this.header.get_height(),this._content!=null&&(b+=this._content.get_height()),b=ua.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(x.SIZE)},this.get_openCloseDuration(),[this.actualHeight,this._content!=null?this._content.get_alpha():0],[b,this._contentOriginalAlpha]).ease(this.openCloseEase).onComplete(function(){a._pendingHeight=null;a.setInvalid(x.SIZE);return W.dispatch(a,"open")})):(this._content!=null&&this._content.set_visible(!0),
b=ua.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(x.SIZE)},this.get_openCloseDuration(),[this.actualHeight,this._content!=null?this._content.get_alpha():1],[this.header.get_height(),0]).ease(this.openCloseEase).onComplete(function(){a._pendingHeight=null;a._content!=null&&a._content.set_visible(!1);a.setInvalid(x.SIZE);return W.dispatch(a,"close")})),this._collapseActuator=b):this._content!=null&&this._content.set_visible(this._pendingOpened);
this._opened=this._pendingOpened;this._pendingOpened=null}else b=this._ignoreHeaderEvents,this._ignoreHeaderEvents=!0,u.__implements(this.header,mi)?this.header.set_opened(this._opened):u.__implements(this.header,md)&&this.header.set_selected(this._opened),this._ignoreHeaderEvents=b,this._content!=null&&this._content.set_visible(this._opened)},createHeader:function(){this.destroyHeader();var a=this._headerFactory!=null?this._headerFactory:qh.defaultHeaderFactory;this._oldHeaderFactory=a;this.header=
a.create();u.__implements(this.header,If)&&(a=this.header,a.get_variant()==null&&a.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():qh.CHILD_VARIANT_HEADER));u.__implements(this.header,mi)?(this.header.addEventListener("open",m(this,this.collapsible_header_openHandler)),this.header.addEventListener("close",m(this,this.collapsible_header_closeHandler))):u.__implements(this.header,md)?this.header.addEventListener("change",m(this,this.collapsible_header_changeHandler)):
u.__implements(this.header,Fh)?this.header.addEventListener("trigger",m(this,this.collapsible_header_triggerHandler)):this.header.addEventListener("click",m(this,this.collapsible_header_clickHandler));u.__implements(this.header,jb)&&this.header.initializeNow();this.headerMeasurements.save(this.header);this.addChild(this.header)},destroyHeader:function(){this.header!=null&&(this.header.removeEventListener("open",m(this,this.collapsible_header_openHandler)),this.header.removeEventListener("close",m(this,
this.collapsible_header_closeHandler)),this.header.removeEventListener("change",m(this,this.collapsible_header_changeHandler)),this.header.removeEventListener("trigger",m(this,this.collapsible_header_triggerHandler)),this.header.removeEventListener("click",m(this,this.collapsible_header_clickHandler)),this.removeChild(this.header),this._oldHeaderFactory.destroy!=null&&this._oldHeaderFactory.destroy(this.header),this.header=this._oldHeaderFactory=null)},layoutChildren:function(){this.header.set_x(0);
this.header.set_y(0);this.header.set_width(this.actualWidth);u.__implements(this.header,oa)&&this.header.validateNow();if(this._content!=null){var a=this._ignoreContentResize;this._ignoreContentResize=!0;this._content.set_x(0);this._content.set_y(this.header.get_height());this._content.get_width()!=this.actualWidth&&this._content.set_width(this.actualWidth);var b=(this._explicitHeight!=null?this._explicitHeight:this._measuredOpenHeight)-this.header.get_height();b<0&&(b=0);this._content.get_height()!=
b&&this._content.set_height(b);u.__implements(this._content,oa)&&this._content.validateNow();this._pendingHeight!=null?(b=this._currentScrollRect==this._scrollRect1?this._scrollRect2:this._scrollRect1,b.setTo(0,0,this.actualWidth,this._pendingHeight-this.header.get_height()),this._currentScrollRect=b,this._content.set_scrollRect(b)):this._currentScrollRect!=null&&(this._currentScrollRect=null,this._content.set_scrollRect(null));this._ignoreContentResize=a}},collapsible_header_openHandler:function(a){this._ignoreHeaderEvents||
this.openContent(!0)},collapsible_header_closeHandler:function(a){this._ignoreHeaderEvents||this.closeContent(!0)},collapsible_header_changeHandler:function(a){this._ignoreHeaderEvents||(this.header.get_selected()?this.openContent(!0):this.closeContent(!0))},collapsible_header_triggerHandler:function(a){this._ignoreHeaderEvents||(this._opened?this.closeContent(!0):this.openContent(!0))},collapsible_header_clickHandler:function(a){this._ignoreHeaderEvents||(this._opened?this.closeContent(!0):this.openContent(!0))},
collapsible_content_resizeHandler:function(a){this.setInvalid(x.LAYOUT)},__customHeaderVariant:null,get_customHeaderVariant:function(){return this.__customHeaderVariant},set_customHeaderVariant:function(a){if(!this.setStyle("customHeaderVariant")||this.__customHeaderVariant==a)return this.__customHeaderVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderVariant);this.__customHeaderVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderVariant},clearStyle_customHeaderVariant:function(){this.set_customHeaderVariant(null);
return this.get_customHeaderVariant()},__openCloseDuration:null,get_openCloseDuration:function(){return this.__openCloseDuration},set_openCloseDuration:function(a){if(!this.setStyle("openCloseDuration")||this.__openCloseDuration==a)return this.__openCloseDuration;this._previousClearStyle=m(this,this.clearStyle_openCloseDuration);this.__openCloseDuration=a;this.setInvalid(x.STYLES);return this.__openCloseDuration},clearStyle_openCloseDuration:function(){this.set_openCloseDuration(.2);return this.get_openCloseDuration()},
__animateContentAlpha:null,get_animateContentAlpha:function(){return this.__animateContentAlpha},set_animateContentAlpha:function(a){if(!this.setStyle("animateContentAlpha")||this.__animateContentAlpha==a)return this.__animateContentAlpha;this._previousClearStyle=m(this,this.clearStyle_animateContentAlpha);this.__animateContentAlpha=a;this.setInvalid(x.STYLES);return this.__animateContentAlpha},clearStyle_animateContentAlpha:function(){this.set_animateContentAlpha(!1);return this.get_animateContentAlpha()},
get_styleContext:function(){return qh},__class__:qh,__properties__:I(wa.prototype.__properties__,{set_animateContentAlpha:"set_animateContentAlpha",get_animateContentAlpha:"get_animateContentAlpha",set_openCloseDuration:"set_openCloseDuration",get_openCloseDuration:"get_openCloseDuration",set_customHeaderVariant:"set_customHeaderVariant",get_customHeaderVariant:"get_customHeaderVariant",set_headerFactory:"set_headerFactory",get_headerFactory:"get_headerFactory",set_animateOpenedProperty:"set_animateOpenedProperty",
get_animateOpenedProperty:"get_animateOpenedProperty",set_opened:"set_opened",get_opened:"get_opened",set_text:"set_text",get_text:"get_text",set_content:"set_content",get_content:"get_content"})});var Cd=function(a,b){this.__customTextInputVariant=this.__customButtonVariant=this.__customListViewVariant=null;this.__popUpAdapter=new Ek;this.openListViewOnFocus=!1;this._previousCustomTextInputVariant=this._previousCustomButtonVariant=this._previousCustomListViewVariant=this._filterText=null;this._ignoreTextInputChange=
this._ignoreListViewChange=this._ignoreButtonToggleListView=!1;this._itemRendererRecycler=He.withClass(Mc);this._customSelectedItem=this._selectedItem=null;this.pendingSelectedIndex=this._selectedIndex=-1;this._allowCustomUserValue=!0;this.textInputMeasurements=new Ib;this.buttonMeasurements=new Ib;this.initializeComboBoxTheme();wa.call(this);this.set_dataProvider(a);this.addEventListener("focusIn",m(this,this.comboBox_focusInHandler));this.addEventListener("removedFromStage",m(this,this.comboBox_removedFromStageHandler));
this.addEventListener("keyUp",m(this,this.comboBox_keyUpHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.ComboBox"]=Cd;Cd.__name__="feathers.controls.ComboBox";Cd.__interfaces__=[hi,ii,Vi];Cd.__super__=wa;Cd.prototype=I(wa.prototype,{button:null,textInput:null,listView:null,buttonMeasurements:null,textInputMeasurements:null,get_stageFocusTarget:function(){return this.textInput},get_text:function(){var a=this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem;
return a!=null?typeof a=="string"?a:this.itemToText(a):""},_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._dataProvider!=null&&this._dataProvider.removeEventListener("removeAll",m(this,this.comboBox_dataProvider_removeAllHandler));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&this._dataProvider.addEventListener("removeAll",m(this,this.comboBox_dataProvider_removeAllHandler));
this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),W.dispatch(this,"change");this._dataProvider!=null&&this._dataProvider.set_filterFunction(m(this,this.comboBoxFilterFunction));this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_allowCustomUserValue:null,get_allowCustomUserValue:function(){return this._allowCustomUserValue},
set_allowCustomUserValue:function(a){return this._allowCustomUserValue==a?this._allowCustomUserValue:this._allowCustomUserValue=a},pendingSelectedIndex:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a&&(!this.get_open()||this.pendingSelectedIndex==a))return this._selectedIndex;this._selectedIndex=a;this.get_open()&&(this.pendingSelectedIndex=a);this._selectedItem=this._selectedIndex==
-1?null:this._dataProvider.get(this._selectedIndex);this._customSelectedItem=null;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_customSelectedItem:null,_selectedItem:null,get_selectedItem:function(){return this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem},set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),
this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1){if(this._allowCustomUserValue)return this._selectedIndex=-1,this._selectedItem=null,this._customSelectedItem=a,this.setInvalid(x.SELECTION),W.dispatch(this,"change"),this._customSelectedItem;this.set_selectedIndex(-1);return this._selectedItem}if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this.get_open()&&(this.pendingSelectedIndex=b);this._selectedIndex=b;this._selectedItem=a;this._customSelectedItem=null;
this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_itemRendererRecycler:null,get_itemRendererRecycler:function(){return this._itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._itemRendererRecycler==a)return this._itemRendererRecycler;this._itemRendererRecycler=a;this.setInvalid(x.DATA);
return this._itemRendererRecycler},itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},textToItem:function(a){return a},_ignoreTextInputChange:null,_ignoreListViewChange:null,_ignoreButtonToggleListView:null,_previousCustomTextInputVariant:null,_previousCustomButtonVariant:null,_previousCustomListViewVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;
this._buttonFactory=a;this.setInvalid(Cd.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldTextInputFactory:null,_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;this._textInputFactory=a;this.setInvalid(Cd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_oldListViewFactory:null,_listViewFactory:null,get_listViewFactory:function(){return this._listViewFactory},
set_listViewFactory:function(a){if(this._listViewFactory==a)return this._listViewFactory;this._listViewFactory=a;this.setInvalid(Cd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);return this._listViewFactory},get_open:function(){return this.listView!=null?this.listView.parent!=null:!1},_filterText:null,showFocus:function(a){wa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},openListViewOnFocus:null,openListView:function(){this.get_open()||this.stage==null||(this.validateNow(),
this._filterText=null,this._dataProvider!=null&&this._dataProvider.refresh(),this.pendingSelectedIndex=this._selectedIndex,this.get_popUpAdapter().addEventListener("open",m(this,this.comboBox_popUpAdapter_openHandler)),this.get_popUpAdapter().addEventListener("close",m(this,this.comboBox_popUpAdapter_closeHandler)),this.get_popUpAdapter().open(this.listView,this),this.listView.set_visible(this._dataProvider!=null&&this._dataProvider.get_length()>0),this.listView.validateNow(),this.listView.addEventListener("removedFromStage",
m(this,this.comboBox_listView_removedFromStageHandler)),this.textInput.addEventListener("focusOut",m(this,this.comboBox_textInput_focusOutHandler)),this.stage.addEventListener("mouseDown",m(this,this.comboBox_stage_mouseDownHandler),!1,0,!0),this.stage.addEventListener("touchBegin",m(this,this.comboBox_stage_touchBeginHandler),!1,0,!0),this.listView.scrollToIndex(this._selectedIndex))},closeListView:function(){this.get_open()&&this.get_popUpAdapter().close()},dispose:function(){this.destroyButton();
this.destroyTextInput();this.destroyListView();this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);wa.prototype.dispose.call(this)},initializeComboBoxTheme:function(){Tt.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(Cd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&
this.setInvalidationFlag(Cd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&this.setInvalidationFlag(Cd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(Cd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Cd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid(Cd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);d&&this.createButton();f&&this.createTextInput();g&&this.createListView();(a||g)&&this.refreshListViewData();(a||f)&&this.refreshTextInputData();
(b||g||d||f)&&this.refreshSelection();(c||g||d||f)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomTextInputVariant=this.get_customTextInputVariant();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomListViewVariant=this.get_customListViewVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:Cd.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==
null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Cd.CHILD_VARIANT_BUTTON);this.button.set_focusEnabled(!1);this.button.addEventListener("mouseDown",m(this,this.comboBox_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.comboBox_button_touchBeginHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",
m(this,this.comboBox_button_mouseDownHandler)),this.button.removeEventListener("touchBegin",m(this,this.comboBox_button_touchBeginHandler)),this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:Cd.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.get_variant()==
null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():Cd.CHILD_VARIANT_TEXT_INPUT);this.textInput.addEventListener("change",m(this,this.comboBox_textInput_changeHandler));this.textInput.addEventListener("keyDown",m(this,this.comboBox_textInput_keyDownHandler));this.textInput.addEventListener("focusIn",m(this,this.comboBox_textInput_focusInHandler));this.textInput.addEventListener("mouseDown",m(this,this.comboBox_textInput_mouseDownHandler));this.textInput.addEventListener("mouseFocusChange",
m(this,this.comboBox_textInput_mouseFocusChangeHandler));this.textInput.initializeNow();this.textInputMeasurements.save(this.textInput);this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=null&&(this.textInput.removeEventListener("change",m(this,this.comboBox_textInput_changeHandler)),this.textInput.removeEventListener("keyDown",m(this,this.comboBox_textInput_keyDownHandler)),this.textInput.removeEventListener("focusIn",m(this,this.comboBox_textInput_focusInHandler)),this.textInput.removeEventListener("mouseDown",
m(this,this.comboBox_textInput_mouseDownHandler)),this.textInput.removeEventListener("mouseFocusChange",m(this,this.comboBox_textInput_mouseFocusChangeHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},createListView:function(){this.destroyListView();var a=this._listViewFactory!=null?this._listViewFactory:Cd.defaultListViewFactory;this._oldListViewFactory=a;this.listView=
a.create();this.listView.set_focusOwner(this);this.listView.set_focusEnabled(!1);this.listView.get_variant()==null&&this.listView.set_variant(this.get_customListViewVariant()!=null?this.get_customListViewVariant():Cd.CHILD_VARIANT_LIST_VIEW);this.listView.addEventListener("change",m(this,this.comboBox_listView_changeHandler));this.listView.addEventListener("itemTrigger",m(this,this.comboBox_listView_itemTriggerHandler))},destroyListView:function(){this.listView!=null&&(this.listView.removeEventListener("change",
m(this,this.comboBox_listView_changeHandler)),this.listView.removeEventListener("itemTrigger",m(this,this.comboBox_listView_itemTriggerHandler)),this.listView.set_focusOwner(null),this._oldListViewFactory.destroy!=null&&this._oldListViewFactory.destroy(this.listView),this.listView=this._oldListViewFactory=null)},refreshListViewData:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_dataProvider(this._dataProvider);this._ignoreListViewChange=a;this.listView.set_itemRendererRecycler(this._itemRendererRecycler);
this.listView.itemToEnabled=m(this,this.itemToEnabled);this.listView.itemToText=m(this,this.itemToText)},refreshTextInputData:function(){this.textInput.set_prompt(this._prompt)},refreshSelection:function(){var a=this._ignoreListViewChange;this._ignoreListViewChange=!0;this.listView.set_selectedIndex(this._selectedIndex);this._ignoreListViewChange=a;a=this._ignoreTextInputChange;this._ignoreTextInputChange=!0;var b=this._customSelectedItem!=null?this._customSelectedItem:this._selectedItem;b!=null?
this.textInput.set_text(typeof b=="string"?b:this.itemToText(b)):this.textInput.set_text("");this._ignoreTextInputChange=a},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.textInput.set_enabled(this._enabled);this.listView.set_enabled(this._enabled)},comboBoxFilterFunction:function(a){if(this._filterText==null||this._filterText.length==0)return!0;a=typeof a=="string"?a:this.itemToText(a);a=a.toLowerCase();return a.indexOf(this._filterText.toLowerCase())!=-1},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.buttonMeasurements.restore(this.button);this.button.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width()+this.textInput.get_width());a=this.get_explicitHeight();
b&&(a=Math.max(this.button.get_height(),this.textInput.get_height()));b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(c=Math.max(this.button.get_minHeight(),this.textInput.get_minHeight()));return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.set_x(this.actualWidth-this.button.get_width());this.button.set_y(0);this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);
this.textInput.set_x(0);this.textInput.set_y(0);var a=this.actualWidth-this.button.get_width();this.textInput.get_width()!=a&&this.textInput.set_width(a);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.button.validateNow();this.textInput.validateNow()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this.get_open()?this.pendingSelectedIndex:this._selectedIndex;switch(a.keyCode){case 33:--b;
break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 38:--b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b);this.textInput.get_selectionActiveIndex()!=this.textInput.get_selectionAnchorIndex()&&this.textInput.selectRange(this.textInput.get_selectionAnchorIndex(),this.textInput.get_selectionAnchorIndex());this.get_open()&&(this.listView.set_selectedIndex(b),
this.listView.scrollToIndex(b))}},comboBox_textInput_keyDownHandler:function(a){this._enabled&&(this.navigateWithKeyboard(a),a.keyCode==13&&(a.preventDefault(),a=this.listView.itemToItemState(this.listView.get_selectedItem()),a!=null&&Kh.dispatch(this,"itemTrigger",a),this.closeListView()))},comboBox_textInput_changeHandler:function(a){this._ignoreTextInputChange||(this.get_open()||this.openListView(),this._dataProvider!=null&&(this.pendingSelectedIndex=-1,this._filterText=this.textInput.get_text(),
this._dataProvider.refresh()),this.listView.set_visible(this.get_open()&&this._dataProvider!=null&&this._dataProvider.get_length()>0))},comboBox_textInput_mouseFocusChangeHandler:function(a){this.get_focusManager()!=null||a.isDefaultPrevented()||a.target!=null&&!this.textInput.contains(a.target)||a.relatedObject!=null&&!this.listView.contains(a.relatedObject)||a.preventDefault()},comboBox_textInput_focusInHandler:function(a){this._enabled&&this.openListViewOnFocus&&!this.get_open()&&(this.openListView(),
this._ignoreButtonToggleListView=!0,this.addEventListener("enterFrame",m(this,this.comboBox_focus_enterFrameHandler)))},comboBox_focus_enterFrameHandler:function(a){this.removeEventListener("enterFrame",m(this,this.comboBox_focus_enterFrameHandler));this._ignoreButtonToggleListView=!1},comboBox_textInput_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.listView&&!this.listView.contains(a.relatedObject))&&this.closeListView()},comboBox_button_mouseDownHandler:function(a){this.openListViewOnFocus&&
this.get_open()&&this._ignoreButtonToggleListView||this._enabled&&(this.get_open()?this.closeListView():this.openListView())},comboBox_button_touchBeginHandler:function(a){this.openListViewOnFocus&&this.get_open()&&this._ignoreButtonToggleListView||this._enabled&&(a.isPrimaryTouchPoint||(this.get_open()?this.closeListView():this.openListView()))},comboBox_listView_itemTriggerHandler:function(a){this._filterText=null;this.pendingSelectedIndex=a.state.index;this.dispatchEvent(a);this.get_popUpAdapter().get_persistent()||
this.closeListView()},comboBox_listView_changeHandler:function(a){if(!this._ignoreListViewChange)if(this.get_open())this.pendingSelectedIndex=this.listView.get_selectedIndex();else{this.pendingSelectedIndex=-1;this._filterText=null;if(this._selectedIndex!=this.listView.get_selectedIndex()||this._selectedItem!=this.listView.get_selectedItem())this._selectedIndex=this.listView.get_selectedIndex(),this._selectedItem=this.listView.get_selectedItem(),W.dispatch(this,"change");this.setInvalid(x.SELECTION)}},
comboBox_listView_removedFromStageHandler:function(a){this.listView.removeEventListener("removedFromStage",m(this,this.comboBox_listView_removedFromStageHandler));this.textInput.removeEventListener("focusOut",m(this,this.comboBox_textInput_focusOutHandler));this.stage.removeEventListener("mouseDown",m(this,this.comboBox_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.comboBox_stage_touchBeginHandler))},comboBox_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==
null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),this.stage.set_focus(this.textInput))},comboBox_removedFromStageHandler:function(a){this.closeListView()},comboBox_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeListView();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeListView())}},comboBox_stage_mouseDownHandler:function(a){this.hitTestPoint(a.stageX,
a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},comboBox_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.hitTestPoint(a.stageX,a.stageY)||this.listView.hitTestPoint(a.stageX,a.stageY)||this.closeListView()},comboBox_popUpAdapter_openHandler:function(a){W.dispatch(this,"open")},comboBox_popUpAdapter_closeHandler:function(a){this.get_popUpAdapter().removeEventListener("open",m(this,this.comboBox_popUpAdapter_openHandler));this.get_popUpAdapter().removeEventListener("close",
m(this,this.comboBox_popUpAdapter_closeHandler));var b=this.pendingSelectedIndex;a=this._filterText;this.pendingSelectedIndex=-1;this._filterText=null;var c=this._selectedIndex;W.dispatch(this,"close");this._selectedIndex!=c&&(b=this._selectedIndex);c=null;if(b!=-1)c=this._dataProvider.get(b);else if(a!=null){if(b=a.toLowerCase(),this._dataProvider!=null&&this._dataProvider.get_length()>0)for(var d=this._dataProvider.iterator();d.hasNext();){var f=d.next(),g=typeof f=="string"?f:this.itemToText(f);
g=g.toLowerCase();if(g==b){c=f;break}}}else return;b=null;this._allowCustomUserValue&&c==null&&a!=null&&a.length>0&&(b=this.textToItem(a));this._dataProvider!=null&&this._dataProvider.refresh();b!=null?(this._customSelectedItem=b,this._selectedItem=null,this._selectedIndex=-1,W.dispatch(this,"change")):c!=null?this.set_selectedItem(c):this._allowCustomUserValue&&(this._selectedItem=this._customSelectedItem=null,this._selectedIndex=-1,W.dispatch(this,"change"));this.setInvalid(x.SELECTION)},comboBox_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},
comboBox_textInput_mouseDownHandler:function(a){this.textInput.get_editable()||this.textInput.get_selectable()||this.openListView()},__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new Ek);
return this.get_popUpAdapter()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);
return this.get_customTextInputVariant()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);
return this.get_customButtonVariant()},__customListViewVariant:null,get_customListViewVariant:function(){return this.__customListViewVariant},set_customListViewVariant:function(a){if(!this.setStyle("customListViewVariant")||this.__customListViewVariant==a)return this.__customListViewVariant;this._previousClearStyle=m(this,this.clearStyle_customListViewVariant);this.__customListViewVariant=a;this.setInvalid(x.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);
return this.get_customListViewVariant()},get_styleContext:function(){return Cd},__class__:Cd,__properties__:I(wa.prototype.__properties__,{get_open:"get_open",set_listViewFactory:"set_listViewFactory",get_listViewFactory:"get_listViewFactory",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customListViewVariant:"set_customListViewVariant",get_customListViewVariant:"get_customListViewVariant",
set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",
get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_allowCustomUserValue:"set_allowCustomUserValue",get_allowCustomUserValue:"get_allowCustomUserValue",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",get_text:"get_text",get_stageFocusTarget:"get_stageFocusTarget"})});var zo=function(){};r["feathers.core.IDateSelector"]=zo;zo.__name__="feathers.core.IDateSelector";zo.__isInterface__=!0;zo.prototype={get_selectedDate:null,
set_selectedDate:null,__class__:zo,__properties__:{set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate"}};var Rq=function(a,b){this.enabled=!0;this.selected=!1;this.date=a;this.selected=!1};r["feathers.data.DatePickerItemState"]=Rq;Rq.__name__="feathers.data.DatePickerItemState";Rq.prototype={owner:null,date:null,selected:null,enabled:null,__class__:Rq};var Bb=function(){this.__showDatesFromAdjacentMonths=!0;this.__customWeekdayLabelVariant=this.__customDateRendererVariant=this.__customMutedDateRendererVariant=
null;this.__showMonthTitleView=this.__showMonthButtons=this.__showYearButtons=this.__showWeekdayLabels=!0;this.__monthTitleViewPosition=Vb.CENTER;this.__headerGap=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__backgroundSkin=this.__disabledBackgroundSkin=this.__customDecrementMonthButtonVariant=this.__customIncrementMonthButtonVariant=this.__customDecrementYearButtonVariant=this.__customIncrementYearButtonVariant=this.__customMonthTitleViewVariant=null;this.pointerSelectionEnabled=
!0;this._customStartOfWeek=this._previousCustomWeekdayLabelVariant=this._previousCustomDateRendererVariant=this._previousCustomMutedDateRendererVariant=null;this._currentStartOfWeek=0;this._selectedDate=this._currentBackgroundSkin=this._backgroundSkinMeasurements=this._previousCustomDecrementMonthButtonVariant=this._previousCustomIncrementMonthButtonVariant=this._previousCustomDecrementYearButtonVariant=this._previousCustomIncrementYearButtonVariant=this._previousCustomMonthTitleViewVariant=this._requestedLocaleIDName=
this._actualLocaleIDName=this._customMonthNames=this._customWeekdayNames=null;this._ignoreSelectionChange=!1;this._selectable=!0;this._displayedMonth=(new Date).getMonth();this._displayedFullYear=(new Date).getFullYear();this.itemStatePool=new Tb(function(){return new Rq});this.monthTitleViewMeasurements=new Ib;this.incrementYearButtonMeasurements=new Ib;this.decrementYearButtonMeasurements=new Ib;this.incrementMonthButtonMeasurements=new Ib;this.decrementMonthButtonMeasurements=new Ib;this._mutedStorage=
new Sq(null,He.withClass(Mc));this._defaultStorage=new Sq(null,He.withClass(Mc));this.dateRendererToItemState=new Na;this._dayNameLabels=[];this.initializeDatePickerTheme();wa.call(this);this.addEventListener("keyDown",m(this,this.datePicker_keyDownHandler))};r["feathers.controls.DatePicker"]=Bb;Bb.__name__="feathers.controls.DatePicker";Bb.__interfaces__=[ld,zo];Bb.defaultUpdateDateRenderer=function(a,b){u.__implements(a,de)&&a.set_text(L.string(b.date.getDate()))};Bb.defaultResetDateRenderer=function(a,
b){u.__implements(a,de)&&a.set_text(null)};Bb.__super__=wa;Bb.prototype=I(wa.prototype,{dateContainer:null,monthView:null,decrementMonthButton:null,incrementMonthButton:null,decrementYearButton:null,incrementYearButton:null,monthTitleView:null,_dayNameLabels:null,dateRendererToItemState:null,_defaultStorage:null,_mutedStorage:null,decrementMonthButtonMeasurements:null,incrementMonthButtonMeasurements:null,decrementYearButtonMeasurements:null,incrementYearButtonMeasurements:null,monthTitleViewMeasurements:null,
itemStatePool:null,_displayedFullYear:null,get_displayedFullYear:function(){return this._displayedFullYear},set_displayedFullYear:function(a){if(this._displayedFullYear==a)return this._displayedFullYear;this._displayedFullYear=a;this.setInvalid(x.SELECTION);W.dispatch(this,"scroll");return this._displayedFullYear},_displayedMonth:null,get_displayedMonth:function(){return this._displayedMonth},set_displayedMonth:function(a){if(a<0||a>11)throw new oe("displayedMonth must be in the range 0-11");if(this._displayedMonth==
a)return this._displayedMonth;this._displayedMonth=a;this.setInvalid(x.SELECTION);W.dispatch(this,"scroll");return this._displayedMonth},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this._selectedDate==null||this.set_selectedDate(null);this.setInvalid(x.SELECTION);return this._selectable},_ignoreSelectionChange:null,_selectedDate:null,get_selectedDate:function(){return this._selectedDate},
set_selectedDate:function(a){this._selectable||(a=null);if(this._selectedDate==a)return this._selectedDate;this._selectedDate=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedDate},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_oldDecrementMonthButtonFactory:null,_decrementMonthButtonFactory:null,get_decrementMonthButtonFactory:function(){return this._decrementMonthButtonFactory},set_decrementMonthButtonFactory:function(a){if(this._decrementMonthButtonFactory==
a)return this._decrementMonthButtonFactory;this._decrementMonthButtonFactory=a;this.setInvalid(Bb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY);return this._decrementMonthButtonFactory},_previousCustomDecrementMonthButtonVariant:null,_oldIncrementMonthButtonFactory:null,_incrementMonthButtonFactory:null,get_incrementMonthButtonFactory:function(){return this._incrementMonthButtonFactory},set_incrementMonthButtonFactory:function(a){if(this._incrementMonthButtonFactory==a)return this._incrementMonthButtonFactory;
this._incrementMonthButtonFactory=a;this.setInvalid(Bb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY);return this._incrementMonthButtonFactory},_previousCustomIncrementMonthButtonVariant:null,_oldDecrementYearButtonFactory:null,_decrementYearButtonFactory:null,get_decrementYearButtonFactory:function(){return this._decrementYearButtonFactory},set_decrementYearButtonFactory:function(a){if(this._decrementYearButtonFactory==a)return this._decrementYearButtonFactory;this._decrementYearButtonFactory=
a;this.setInvalid(Bb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY);return this._decrementYearButtonFactory},_previousCustomDecrementYearButtonVariant:null,_oldIncrementYearButtonFactory:null,_incrementYearButtonFactory:null,get_incrementYearButtonFactory:function(){return this._incrementYearButtonFactory},set_incrementYearButtonFactory:function(a){if(this._incrementYearButtonFactory==a)return this._incrementYearButtonFactory;this._incrementYearButtonFactory=a;this.setInvalid(Bb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY);
return this._incrementYearButtonFactory},_previousCustomIncrementYearButtonVariant:null,_oldMonthTitleViewFactory:null,_monthTitleViewFactory:null,get_monthTitleViewFactory:function(){return this._monthTitleViewFactory},set_monthTitleViewFactory:function(a){if(this._monthTitleViewFactory==a)return this._monthTitleViewFactory;this._monthTitleViewFactory=a;this.setInvalid(Bb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);return this._monthTitleViewFactory},_previousCustomMonthTitleViewVariant:null,_currentMonthNames:null,
_currentWeekdayNames:null,_currentDateFormatter:null,_requestedLocaleIDName:null,get_requestedLocaleIDName:function(){return this._requestedLocaleIDName},set_requestedLocaleIDName:function(a){if(this._requestedLocaleIDName==a)return this._requestedLocaleIDName;this._requestedLocaleIDName=a;this._actualLocaleIDName=null;this.setInvalid(x.DATA);return this._requestedLocaleIDName},_actualLocaleIDName:null,get_actualLocaleIDName:function(){return this._actualLocaleIDName},setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},_customMonthNames:null,get_customMonthNames:function(){return this._customMonthNames},set_customMonthNames:function(a){if(a!=null&&a.length!=12)throw new rb("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(x.DATA);return this._customMonthNames},_customWeekdayNames:null,get_customWeekdayNames:function(){return this._customWeekdayNames},
set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new rb("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(x.DATA);return this._customWeekdayNames},_currentStartOfWeek:null,_customStartOfWeek:null,get_customStartOfWeek:function(){return this._customStartOfWeek},set_customStartOfWeek:function(a){if(a!=null&&(a<0||a>6))throw new oe("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(x.DATA);return this._customStartOfWeek},_oldWeekdayLabelFactory:null,_weekdayLabelFactory:null,get_weekdayLabelFactory:function(){return this._weekdayLabelFactory},set_weekdayLabelFactory:function(a){if(this._weekdayLabelFactory==a)return this._weekdayLabelFactory;this._weekdayLabelFactory=a;this.setInvalid(Bb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY);return this._weekdayLabelFactory},_previousCustomWeekdayLabelVariant:null,
_previousCustomDateRendererVariant:null,_previousCustomMutedDateRendererVariant:null,get_dateRendererRecycler:function(){return this._defaultStorage.dateRendererRecycler},set_dateRendererRecycler:function(a){if(this._defaultStorage.dateRendererRecycler==a)return this._defaultStorage.dateRendererRecycler;this._defaultStorage.oldDateRendererRecycler=this._defaultStorage.dateRendererRecycler;this._defaultStorage.dateRendererRecycler=a;this._defaultStorage.measurements=null;this._mutedStorage.oldDateRendererRecycler=
this._mutedStorage.dateRendererRecycler;this._mutedStorage.dateRendererRecycler=a;this._mutedStorage.measurements=null;this.setInvalid(Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);return this._defaultStorage.dateRendererRecycler},pointerSelectionEnabled:null,dispose:function(){this.destroyMonthTitleView();this.destroyDecrementMonthButton();this.destroyIncrementMonthButton();this.destroyDecrementYearButton();this.destroyIncrementYearButton();this.refreshInactiveDateRenderers(this._defaultStorage,!0);
this.refreshInactiveDateRenderers(this._mutedStorage,!0);wa.prototype.dispose.call(this)},initializeDatePickerTheme:function(){Ih.initialize()},initialize:function(){this.dateContainer==null&&(this.dateContainer=new sc,this.dateContainer.set_layout(new Ao),this.addChild(this.dateContainer));wa.prototype.initialize.call(this)},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomDateRendererVariant!=this.get_customDateRendererVariant()&&
this.setInvalidationFlag(Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomMutedDateRendererVariant!=this.get_customMutedDateRendererVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomWeekdayLabelVariant!=this.get_customWeekdayLabelVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY);this._previousCustomDecrementMonthButtonVariant!=this.get_customDecrementMonthButtonVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY);
this._previousCustomIncrementMonthButtonVariant!=this.get_customIncrementMonthButtonVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY);this._previousCustomDecrementYearButtonVariant!=this.get_customDecrementYearButtonVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY);this._previousCustomIncrementYearButtonVariant!=this.get_customIncrementYearButtonVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY);
this._previousCustomMonthTitleViewVariant!=this.get_customMonthTitleViewVariant()&&this.setInvalidationFlag(Bb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);var f=this.isInvalid(Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY),g=this.isInvalid(Bb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY),h=this.isInvalid(Bb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY),l=this.isInvalid(Bb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY),k=this.isInvalid(Bb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY),q=this.isInvalid(Bb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY),
w=this.isInvalid(Bb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);(d||c)&&this.refreshBackgroundSkin();w&&this.createMonthTitleView();h&&this.createDecrementMonthButton();l&&this.createIncrementMonthButton();k&&this.createDecrementYearButton();q&&this.createIncrementYearButton();g&&this.createWeekdayLabels();a&&this.refreshLocale();(a||b||f)&&this.refreshDateRenderers();(g||a||d)&&this.refreshWeekdayLabels();(c||w||h||l||k||q)&&this.refreshEnabled();(a||b)&&this.refreshMonthTitle();this.measure();this.layoutChildren();
this._previousCustomDateRendererVariant=this.get_customDateRendererVariant();this._previousCustomMutedDateRendererVariant=this.get_customMutedDateRendererVariant();this._previousCustomMonthTitleViewVariant=this.get_customMonthTitleViewVariant();this._previousCustomWeekdayLabelVariant=this.get_customWeekdayLabelVariant();this._previousCustomDecrementMonthButtonVariant=this.get_customDecrementMonthButtonVariant();this._previousCustomIncrementMonthButtonVariant=this.get_customIncrementMonthButtonVariant();
this._previousCustomDecrementYearButtonVariant=this.get_customDecrementYearButtonVariant();this._previousCustomIncrementYearButtonVariant=this.get_customIncrementYearButtonVariant()},createMonthTitleView:function(){var a=this._monthTitleViewFactory!=null?this._monthTitleViewFactory:Bb.defaultMonthTitleViewFactory;this._oldMonthTitleViewFactory=a;this.monthTitleView=a.create();this.monthTitleView.get_variant()==null&&this.monthTitleView.set_variant(this.get_customMonthTitleViewVariant()!=null?this.get_customMonthTitleViewVariant():
Bb.CHILD_VARIANT_MONTH_TITLE_VIEW);this.monthTitleView.initializeNow();this.monthTitleViewMeasurements.save(this.monthTitleView);this.addChild(this.monthTitleView)},destroyMonthTitleView:function(){this.monthTitleView!=null&&(this._oldMonthTitleViewFactory.destroy!=null&&this._oldMonthTitleViewFactory.destroy(this.monthTitleView),this.monthTitleView=this._oldMonthTitleViewFactory=null)},createDecrementMonthButton:function(){this.destroyDecrementMonthButton();var a=this._decrementMonthButtonFactory!=
null?this._decrementMonthButtonFactory:Bb.defaultDecrementMonthButtonFactory;this._oldDecrementMonthButtonFactory=a;this.decrementMonthButton=a.create();this.decrementMonthButton.get_variant()==null&&this.decrementMonthButton.set_variant(this.get_customDecrementMonthButtonVariant()!=null?this.get_customDecrementMonthButtonVariant():Bb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON);this.decrementMonthButton.initializeNow();this.decrementMonthButtonMeasurements.save(this.decrementMonthButton);this.addChild(this.decrementMonthButton);
this.decrementMonthButton.addEventListener("trigger",m(this,this.datePicker_decrementMonthButton_triggerHandler))},destroyDecrementMonthButton:function(){this.decrementMonthButton!=null&&(this.decrementMonthButton.removeEventListener("trigger",m(this,this.datePicker_decrementMonthButton_triggerHandler)),this._oldDecrementMonthButtonFactory.destroy!=null&&this._oldDecrementMonthButtonFactory.destroy(this.decrementMonthButton),this.decrementMonthButton=this._oldDecrementMonthButtonFactory=null)},createIncrementMonthButton:function(){this.destroyIncrementMonthButton();
var a=this._incrementMonthButtonFactory!=null?this._incrementMonthButtonFactory:Bb.defaultIncrementMonthButtonFactory;this._oldIncrementMonthButtonFactory=a;this.incrementMonthButton=a.create();this.incrementMonthButton.get_variant()==null&&this.incrementMonthButton.set_variant(this.get_customIncrementMonthButtonVariant()!=null?this.get_customIncrementMonthButtonVariant():Bb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON);this.incrementMonthButton.initializeNow();this.incrementMonthButtonMeasurements.save(this.incrementMonthButton);
this.addChild(this.incrementMonthButton);this.incrementMonthButton.addEventListener("trigger",m(this,this.datePicker_incrementMonthButton_triggerHandler))},destroyIncrementMonthButton:function(){this.incrementMonthButton!=null&&(this.incrementMonthButton.removeEventListener("trigger",m(this,this.datePicker_incrementMonthButton_triggerHandler)),this._oldIncrementMonthButtonFactory.destroy!=null&&this._oldIncrementMonthButtonFactory.destroy(this.incrementMonthButton),this.incrementMonthButton=this._oldIncrementMonthButtonFactory=
null)},createDecrementYearButton:function(){this.destroyDecrementYearButton();var a=this._decrementYearButtonFactory!=null?this._decrementYearButtonFactory:Bb.defaultDecrementYearButtonFactory;this._oldDecrementYearButtonFactory=a;this.decrementYearButton=a.create();this.decrementYearButton.get_variant()==null&&this.decrementYearButton.set_variant(this.get_customDecrementYearButtonVariant()!=null?this.get_customDecrementYearButtonVariant():Bb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON);this.decrementYearButton.initializeNow();
this.decrementYearButtonMeasurements.save(this.decrementYearButton);this.addChild(this.decrementYearButton);this.decrementYearButton.addEventListener("trigger",m(this,this.datePicker_decrementYearButton_triggerHandler))},destroyDecrementYearButton:function(){this.decrementYearButton!=null&&(this.decrementYearButton.removeEventListener("trigger",m(this,this.datePicker_decrementYearButton_triggerHandler)),this._oldDecrementYearButtonFactory.destroy!=null&&this._oldDecrementYearButtonFactory.destroy(this.decrementYearButton),
this.decrementYearButton=this._oldDecrementYearButtonFactory=null)},createIncrementYearButton:function(){this.destroyIncrementYearButton();var a=this._incrementYearButtonFactory!=null?this._incrementYearButtonFactory:Bb.defaultIncrementYearButtonFactory;this._oldIncrementYearButtonFactory=a;this.incrementYearButton=a.create();this.incrementYearButton.get_variant()==null&&this.incrementYearButton.set_variant(this.get_customIncrementYearButtonVariant()!=null?this.get_customIncrementYearButtonVariant():
Bb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON);this.incrementYearButton.initializeNow();this.incrementYearButtonMeasurements.save(this.incrementYearButton);this.addChild(this.incrementYearButton);this.incrementYearButton.addEventListener("trigger",m(this,this.datePicker_incrementYearButton_triggerHandler))},destroyIncrementYearButton:function(){this.incrementYearButton!=null&&(this.incrementYearButton.removeEventListener("trigger",m(this,this.datePicker_incrementYearButton_triggerHandler)),this._oldIncrementYearButtonFactory.destroy!=
null&&this._oldIncrementYearButtonFactory.destroy(this.incrementYearButton),this.incrementYearButton=this._oldIncrementYearButtonFactory=null)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.dateContainer.validateNow();this.monthTitleViewMeasurements.restore(this.monthTitleView);
f=this.monthTitleView.get_text();g=this.getMonthText(this.getMonthWithLongestName(),0);this.monthTitleView.set_text(g);this.monthTitleView.validateNow();this.decrementMonthButtonMeasurements.restore(this.decrementMonthButton);this.decrementMonthButton.validateNow();this.incrementMonthButtonMeasurements.restore(this.incrementMonthButton);this.incrementMonthButton.validateNow();this.decrementYearButtonMeasurements.restore(this.decrementYearButton);this.decrementYearButton.validateNow();this.incrementYearButtonMeasurements.restore(this.incrementYearButton);
this.incrementYearButton.validateNow();var h=0;g=0;this.get_showMonthTitleView()&&(h=this.monthTitleView.get_width(),g=this.monthTitleView.get_height());this.get_showMonthButtons()&&(h+=2*this.get_headerGap()+this.decrementMonthButton.get_width()+this.incrementMonthButton.get_width(),g=Math.max(g,Math.max(this.decrementMonthButton.get_height(),this.incrementMonthButton.get_height())));this.get_showYearButtons()&&(h+=2*this.get_headerGap()+this.decrementYearButton.get_width()+this.incrementYearButton.get_width(),
g=Math.max(g,Math.max(this.decrementYearButton.get_height(),this.incrementYearButton.get_height())));var l=this.get_explicitWidth();a&&(l=Math.max(this.dateContainer.get_width(),h),l+=this.get_paddingLeft()+this.get_paddingRight());a=this.get_explicitHeight();b&&(a=g+this.dateContainer.get_height(),a+=this.get_paddingTop()+this.get_paddingBottom());b=this.get_explicitMinWidth();c&&(b=Math.max(this.dateContainer.get_minWidth(),h),b+=this.get_paddingLeft()+this.get_paddingRight());c=this.get_explicitMinHeight();
d&&(c=g+this.dateContainer.get_minHeight(),c+=this.get_paddingTop()+this.get_paddingBottom());this.monthTitleView.set_text(f);return this.saveMeasurements(l,a,b,c)},refreshEnabled:function(){this.monthTitleView.set_enabled(this.get_enabled());this.decrementMonthButton.set_enabled(this.get_enabled());this.incrementMonthButton.set_enabled(this.get_enabled());this.decrementYearButton.set_enabled(this.get_enabled());this.incrementYearButton.set_enabled(this.get_enabled());this.dateContainer.set_enabled(this.get_enabled())},
createWeekdayLabels:function(){for(var a=0,b=this._dayNameLabels;a<b.length;){var c=b[a];++a;this.dateContainer.removeChild(c);this._oldWeekdayLabelFactory.destroy!=null&&this._oldWeekdayLabelFactory.destroy(c)}this._oldWeekdayLabelFactory=null;this._dayNameLabels.length=0;a=this._weekdayLabelFactory!=null?this._weekdayLabelFactory:Bb.defaultWeekdayLabelFactory;b=this.get_customWeekdayLabelVariant()!=null?this.get_customWeekdayLabelVariant():Bb.CHILD_VARIANT_WEEKDAY_LABEL;c=u.__cast(a.create(),bc);
this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,0);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,1);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,2);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=
a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,3);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,4);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,5);this._dayNameLabels.push(c);c=u.__cast(a.create(),bc);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&
c.set_variant(b);this.dateContainer.addChildAt(c,6);this._dayNameLabels.push(c)},refreshWeekdayLabels:function(){for(var a=0,b=this._dayNameLabels.length;a<b;){var c=a++,d=this._dayNameLabels[c];d.set_text(this._currentWeekdayNames[(c+this._currentStartOfWeek)%this._dayNameLabels.length]);d.set_visible(this.get_showWeekdayLabels());d.set_includeInLayout(this.get_showWeekdayLabels())}},refreshDateRenderers:function(){this._defaultStorage.dateRendererRecycler.update==null&&(this._defaultStorage.dateRendererRecycler.update=
Bb.defaultUpdateDateRenderer,this._defaultStorage.dateRendererRecycler.reset==null&&(this._defaultStorage.dateRendererRecycler.reset=Bb.defaultResetDateRenderer));this._mutedStorage.dateRendererRecycler.update==null&&(this._mutedStorage.dateRendererRecycler.update=Bb.defaultUpdateDateRenderer,this._mutedStorage.dateRendererRecycler.reset==null&&(this._mutedStorage.dateRendererRecycler.reset=Bb.defaultResetDateRenderer));var a=this.isInvalid(Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this.refreshInactiveDateRenderers(this._defaultStorage,
a);this.refreshInactiveDateRenderers(this._mutedStorage,a);this.recoverInactiveDateRenderers(this._defaultStorage);this.recoverInactiveDateRenderers(this._mutedStorage);this.renderUnrenderedData();this.freeInactiveDateRenderers(this._defaultStorage);this.freeInactiveDateRenderers(this._mutedStorage)},refreshInactiveDateRenderers:function(a,b){var c=a.inactiveDateRenderers;a.inactiveDateRenderers=a.activeDateRenderers;a.activeDateRenderers=c;if(a.activeDateRenderers.length>0)throw a=u.getClass(this),
new fb(""+a.__name__+": active date renderers should be empty before updating.");b&&(this.recoverInactiveDateRenderers(a),this.freeInactiveDateRenderers(a),a.oldDateRendererRecycler=null)},recoverInactiveDateRenderers:function(a){for(var b=0,c=a.inactiveDateRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.dateRendererToItemState.h[d.__id__];f!=null&&(this.dateRendererToItemState.remove(d),d.removeEventListener("trigger",m(this,this.datePicker_dateRenderer_triggerHandler)),d.removeEventListener("click",
m(this,this.datePicker_dateRenderer_clickHandler)),d.removeEventListener("touchTap",m(this,this.datePicker_dateRenderer_touchTapHandler)),d.removeEventListener("change",m(this,this.datePicker_dateRenderer_changeHandler)),this.resetDateRenderer(d,f,a),a.measurements!=null&&a.measurements.restore(d),this.itemStatePool.release(f))}}},freeInactiveDateRenderers:function(a){for(var b=a.oldDateRendererRecycler!=null?a.oldDateRendererRecycler:a.dateRendererRecycler,c=0,d=a.inactiveDateRenderers;c<d.length;){var f=
d[c];++c;f!=null&&this.destroyDateRenderer(f,b)}a.inactiveDateRenderers.length=0},createDateRenderer:function(a,b){if(b.inactiveDateRenderers.length==0){var c=b.dateRendererRecycler.create();if(u.__implements(c,If)){var d=c;if(d.get_variant()==null){var f=b==this._mutedStorage?this.get_customMutedDateRendererVariant()!=null?this.get_customMutedDateRendererVariant():Bb.CHILD_VARIANT_MUTED_DATE_RENDERER:this.get_customDateRendererVariant()!=null?this.get_customDateRendererVariant():Bb.CHILD_VARIANT_DATE_RENDERER;
d.set_variant(f)}}u.__implements(c,jb)&&c.initializeNow();b.measurements==null&&(b.measurements=new Ib(c))}else c=b.inactiveDateRenderers.shift();this.updateDateRenderer(c,a,b);u.__implements(c,Fh)?c.addEventListener("trigger",m(this,this.datePicker_dateRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.datePicker_dateRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.datePicker_dateRenderer_touchTapHandler)));u.__implements(c,md)&&c.addEventListener("change",m(this,
this.datePicker_dateRenderer_changeHandler));this.dateRendererToItemState.set(c,a);b.activeDateRenderers.push(c);return c},destroyDateRenderer:function(a,b){this.dateContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},populateCurrentItemState:function(a,b){b.owner=this;b.date=a;b.selected=this._selectedDate!=null&&this._displayedFullYear==this._selectedDate.getFullYear()&&this._displayedMonth==this._selectedDate.getMonth()&&a.getFullYear()==this._selectedDate.getFullYear()&&a.getMonth()==
this._selectedDate.getMonth()&&a.getDate()==this._selectedDate.getDate();b.enabled=this._enabled},resetDateRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldDateRendererRecycler!=null?c.oldDateRendererRecycler:c.dateRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshDateRendererProperties(a,Bb.RESET_ITEM_STATE);a.set_visible(!0)},updateDateRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=
!0;c.dateRendererRecycler.update!=null&&c.dateRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshDateRendererProperties(a,b);a.set_visible(this.get_showDatesFromAdjacentMonths()||b.date!=null&&this._displayedFullYear==b.date.getFullYear()&&this._displayedMonth==b.date.getMonth())},refreshDateRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.date);u.__implements(a,
md)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},renderUnrenderedData:function(){var a=-(this._customStartOfWeek!=null?this._customStartOfWeek:0)+(new Date(this._displayedFullYear,this._displayedMonth,1,0,0,0)).getDay();a<0&&(a=0);var b=this._displayedFullYear,c=this._displayedMonth-1;c<0&&(c=11,--b);var d=Fk.getDaysInMonth(this._displayedMonth,this._displayedFullYear),f=Fk.getDaysInMonth(c,b),g=this._displayedFullYear,h=this._displayedMonth;a=f-a+1;a>1&&(h=c,g=b);for(b=0;b<42;){c=b++;
(h<this._displayedMonth||g<this._displayedFullYear)&&a>f&&(a=1,++h,h==12&&(h=0,++g));h==this._displayedMonth&&a>d&&(a=1,++h,h==12&&(h=0,++g));var l=this.itemStatePool.get();this.populateCurrentItemState(new Date(g,h,a,0,0,0),l);var k=h==this._displayedMonth?this._defaultStorage:this._mutedStorage,q=this.createDateRenderer(l,k);this.dateContainer.addChildAt(q,7+c);this.updateDateRenderer(q,l,k);++a}},refreshLocale:function(){this._currentDateFormatter=new Bo(this._requestedLocaleIDName!=null?this._requestedLocaleIDName:
"i-default",1,3);this._actualLocaleIDName=this._currentDateFormatter.actualLocaleIDName;this._currentDateFormatter.setDateTimePattern("MMMM yyyy");this._currentMonthNames=this._customMonthNames;if(this._currentMonthNames==null){var a=this._currentDateFormatter.getMonthNames(0,0);this._currentMonthNames=[];for(a=a.iterator();a.hasNext();){var b=a.next();this._currentMonthNames.push(b)}}this._currentWeekdayNames=this._customWeekdayNames;if(this._currentWeekdayNames==null)for(a=this._currentDateFormatter.getWeekdayNames(2,
1),this._currentWeekdayNames=[],a=a.iterator();a.hasNext();)b=a.next(),this._currentWeekdayNames.push(b.charAt(0));this._currentStartOfWeek=this._customStartOfWeek!=null?this._customStartOfWeek:this._currentDateFormatter.getFirstWeekday()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||
this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),
this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutChildren:function(){this.layoutBackgroundSkin();this.decrementMonthButton.set_visible(this.get_showMonthButtons());this.incrementMonthButton.set_visible(this.get_showMonthButtons());this.decrementYearButton.set_visible(this.get_showYearButtons());this.incrementYearButton.set_visible(this.get_showYearButtons());this.monthTitleView.set_visible(this.get_showMonthTitleView());this.monthTitleView.validateNow();this.decrementMonthButton.validateNow();
this.incrementMonthButton.validateNow();this.decrementYearButton.validateNow();this.incrementYearButton.validateNow();var a=0;this.get_showMonthButtons()&&(a=Math.max(a,Math.max(this.decrementMonthButton.get_height(),this.incrementMonthButton.get_height())));this.get_showYearButtons()&&(a=Math.max(a,Math.max(this.decrementYearButton.get_height(),this.incrementYearButton.get_height())));this.decrementMonthButton.get_height()!=a&&this.decrementMonthButton.set_height(a);this.incrementMonthButton.get_height()!=
a&&this.incrementMonthButton.set_height(a);this.decrementYearButton.get_height()!=a&&this.decrementYearButton.set_height(a);this.incrementYearButton.get_height()!=a&&this.incrementYearButton.set_height(a);this.get_showMonthTitleView()&&(a=Math.max(a,this.monthTitleView.get_height()));switch(this.get_monthTitleViewPosition()._hx_index){case 0:this.monthTitleView.set_x(this.get_paddingLeft());var b=this.actualWidth-this.get_paddingRight();this.get_showYearButtons()&&(b-=this.incrementYearButton.get_width(),
this.incrementYearButton.set_x(b),b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.incrementMonthButton.get_width(),this.incrementMonthButton.set_x(b),b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.decrementMonthButton.get_width(),this.decrementMonthButton.set_x(b),b-=this.get_headerGap());this.get_showYearButtons()&&(b-=this.decrementYearButton.get_width(),this.decrementYearButton.set_x(b),this.get_headerGap());break;case 1:this.monthTitleView.set_x(this.get_paddingLeft()+
(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight()-this.monthTitleView.get_width())/2);b=this.get_paddingLeft();this.get_showYearButtons()&&(this.decrementYearButton.set_x(b),b+=this.decrementYearButton.get_width()+this.get_headerGap());this.get_showMonthButtons()&&(this.decrementMonthButton.set_x(b),this.decrementMonthButton.get_width(),this.get_headerGap());b=this.actualWidth-this.get_paddingRight();this.get_showYearButtons()&&(b-=this.incrementYearButton.get_width(),this.incrementYearButton.set_x(b),
b-=this.get_headerGap());this.get_showMonthButtons()&&(b-=this.incrementMonthButton.get_width(),this.incrementMonthButton.set_x(b),this.get_headerGap());break;case 2:this.monthTitleView.set_x(this.actualWidth-this.get_paddingRight()-this.monthTitleView.get_width());b=this.get_paddingLeft();this.get_showYearButtons()&&(this.decrementYearButton.set_x(b),b+=this.decrementYearButton.get_width()+this.get_headerGap());this.get_showMonthButtons()&&(this.decrementMonthButton.set_x(b),b+=this.decrementMonthButton.get_width()+
this.get_headerGap());this.get_showMonthButtons()&&(this.incrementMonthButton.set_x(b),b+=this.incrementMonthButton.get_width()+this.get_headerGap());this.get_showYearButtons()&&(this.incrementYearButton.set_x(b),this.incrementYearButton.get_width(),this.get_headerGap());break;default:throw new rb("Invalid month position: "+L.string(this.get_monthTitleViewPosition()));}this.get_showMonthTitleView()&&this.monthTitleView.set_y(this.get_paddingTop()+(a-this.monthTitleView.get_height())/2);this.get_showMonthButtons()&&
(this.decrementMonthButton.set_y(this.get_paddingTop()+(a-this.decrementMonthButton.get_height())/2),this.incrementMonthButton.set_y(this.get_paddingTop()+(a-this.incrementMonthButton.get_height())/2));this.get_showYearButtons()&&(this.decrementYearButton.set_y(this.get_paddingTop()+(a-this.decrementYearButton.get_height())/2),this.incrementYearButton.set_y(this.get_paddingTop()+(a-this.incrementYearButton.get_height())/2));this.dateContainer.set_x(this.get_paddingLeft());this.dateContainer.set_y(this.get_paddingTop()+
a);b=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=this.actualHeight-a-this.get_paddingTop()-this.get_paddingBottom();this.dateContainer.get_width()!=b&&this.dateContainer.set_width(b);this.dateContainer.get_height()!=a&&this.dateContainer.set_height(a);this.dateContainer.validateNow()},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&
this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},refreshMonthTitle:function(){this.monthTitleView.set_text(this.getMonthText(this.get_displayedMonth(),this.get_displayedFullYear()))},getMonthWithLongestName:function(){for(var a=0,b=-1,c=0,d=this._currentMonthNames.length;c<d;){var f=
c++,g=this._currentMonthNames[f].length;a<g&&(a=g,b=f)}return b},getMonthText:function(a,b){return this._customMonthNames!=null?""+this._currentMonthNames[a]+" "+Z.lpad(b==null?"null":""+b,"0",4):this._currentDateFormatter.format(new Date(b,a,1,0,0,0))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()){if(this._selectedDate==null)var b=new Date;else{b=this._selectedDate.getMonth();var c=this._selectedDate.getDate();switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:var d=this._selectedDate.getDay();
d!=6&&(c+=6-d);break;case 36:d=this._selectedDate.getDay();d!=0&&(c-=d);break;case 37:--c;break;case 38:c-=7;break;case 39:++c;break;case 40:c+=7;break;default:return}b=new Date(this._selectedDate.getFullYear(),b,c,this._selectedDate.getHours(),this._selectedDate.getMinutes(),this._selectedDate.getSeconds())}if(this._selectedDate==null||this._selectedDate.getTime()!=b.getTime())a.preventDefault(),this.set_selectedDate(b),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())}},
datePicker_decrementMonthButton_triggerHandler:function(a){a=this._displayedMonth;var b=this._displayedFullYear;--a;a<0&&(a=11,--b);this.set_displayedMonth(a);this.set_displayedFullYear(b)},datePicker_incrementMonthButton_triggerHandler:function(a){a=this._displayedMonth;var b=this._displayedFullYear;++a;a>11&&(a=0,++b);this.set_displayedMonth(a);this.set_displayedFullYear(b)},datePicker_decrementYearButton_triggerHandler:function(a){this.set_displayedFullYear(this.get_displayedFullYear()-1)},datePicker_incrementYearButton_triggerHandler:function(a){this.set_displayedFullYear(this.get_displayedFullYear()+
1)},datePicker_dateRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=u.__cast(a.currentTarget,ea),a=this.dateRendererToItemState.h[a.__id__],Ei.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedDate(a.date),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_clickHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,
ea),a=this.dateRendererToItemState.h[a.__id__],Ei.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedDate(a.date),this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_triggerHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,ea),a=this.dateRendererToItemState.h[a.__id__],Ei.dispatch(this,"itemTrigger",a),this._selectable&&(this.set_selectedDate(a.date),
this.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.set_displayedMonth(this.get_selectedDate().getMonth())))},datePicker_dateRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,ea);a=u.__cast(b,md);b=this.dateRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},datePicker_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&
this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a))},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},
__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},__customDecrementMonthButtonVariant:null,get_customDecrementMonthButtonVariant:function(){return this.__customDecrementMonthButtonVariant},set_customDecrementMonthButtonVariant:function(a){if(!this.setStyle("customDecrementMonthButtonVariant")||this.__customDecrementMonthButtonVariant==a)return this.__customDecrementMonthButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementMonthButtonVariant);this.__customDecrementMonthButtonVariant=
a;this.setInvalid(x.STYLES);return this.__customDecrementMonthButtonVariant},clearStyle_customDecrementMonthButtonVariant:function(){this.set_customDecrementMonthButtonVariant(null);return this.get_customDecrementMonthButtonVariant()},__customIncrementMonthButtonVariant:null,get_customIncrementMonthButtonVariant:function(){return this.__customIncrementMonthButtonVariant},set_customIncrementMonthButtonVariant:function(a){if(!this.setStyle("customIncrementMonthButtonVariant")||this.__customIncrementMonthButtonVariant==
a)return this.__customIncrementMonthButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementMonthButtonVariant);this.__customIncrementMonthButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementMonthButtonVariant},clearStyle_customIncrementMonthButtonVariant:function(){this.set_customIncrementMonthButtonVariant(null);return this.get_customIncrementMonthButtonVariant()},__customDecrementYearButtonVariant:null,get_customDecrementYearButtonVariant:function(){return this.__customDecrementYearButtonVariant},
set_customDecrementYearButtonVariant:function(a){if(!this.setStyle("customDecrementYearButtonVariant")||this.__customDecrementYearButtonVariant==a)return this.__customDecrementYearButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementYearButtonVariant);this.__customDecrementYearButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementYearButtonVariant},clearStyle_customDecrementYearButtonVariant:function(){this.set_customDecrementYearButtonVariant(null);return this.get_customDecrementYearButtonVariant()},
__customIncrementYearButtonVariant:null,get_customIncrementYearButtonVariant:function(){return this.__customIncrementYearButtonVariant},set_customIncrementYearButtonVariant:function(a){if(!this.setStyle("customIncrementYearButtonVariant")||this.__customIncrementYearButtonVariant==a)return this.__customIncrementYearButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementYearButtonVariant);this.__customIncrementYearButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementYearButtonVariant},
clearStyle_customIncrementYearButtonVariant:function(){this.set_customIncrementYearButtonVariant(null);return this.get_customIncrementYearButtonVariant()},__customMonthTitleViewVariant:null,get_customMonthTitleViewVariant:function(){return this.__customMonthTitleViewVariant},set_customMonthTitleViewVariant:function(a){if(!this.setStyle("customMonthTitleViewVariant")||this.__customMonthTitleViewVariant==a)return this.__customMonthTitleViewVariant;this._previousClearStyle=m(this,this.clearStyle_customMonthTitleViewVariant);
this.__customMonthTitleViewVariant=a;this.setInvalid(x.STYLES);return this.__customMonthTitleViewVariant},clearStyle_customMonthTitleViewVariant:function(){this.set_customMonthTitleViewVariant(null);return this.get_customMonthTitleViewVariant()},__headerGap:null,get_headerGap:function(){return this.__headerGap},set_headerGap:function(a){if(!this.setStyle("headerGap")||this.__headerGap==a)return this.__headerGap;this._previousClearStyle=m(this,this.clearStyle_headerGap);this.__headerGap=a;this.setInvalid(x.STYLES);
return this.__headerGap},clearStyle_headerGap:function(){this.set_headerGap(0);return this.get_headerGap()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},
__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||
this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,
this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__monthTitleViewPosition:null,get_monthTitleViewPosition:function(){return this.__monthTitleViewPosition},set_monthTitleViewPosition:function(a){if(!this.setStyle("monthTitleViewPosition")||this.__monthTitleViewPosition==a)return this.__monthTitleViewPosition;this._previousClearStyle=m(this,this.clearStyle_monthTitleViewPosition);
this.__monthTitleViewPosition=a;this.setInvalid(x.STYLES);return this.__monthTitleViewPosition},clearStyle_monthTitleViewPosition:function(){this.set_monthTitleViewPosition(Vb.CENTER);return this.get_monthTitleViewPosition()},__showMonthTitleView:null,get_showMonthTitleView:function(){return this.__showMonthTitleView},set_showMonthTitleView:function(a){if(!this.setStyle("showMonthTitleView")||this.__showMonthTitleView==a)return this.__showMonthTitleView;this._previousClearStyle=m(this,this.clearStyle_showMonthTitleView);
this.__showMonthTitleView=a;this.setInvalid(x.STYLES);return this.__showMonthTitleView},clearStyle_showMonthTitleView:function(){this.set_showMonthTitleView(!0);return this.get_showMonthTitleView()},__showMonthButtons:null,get_showMonthButtons:function(){return this.__showMonthButtons},set_showMonthButtons:function(a){if(!this.setStyle("showMonthButtons")||this.__showMonthButtons==a)return this.__showMonthButtons;this._previousClearStyle=m(this,this.clearStyle_showMonthButtons);this.__showMonthButtons=
a;this.setInvalid(x.STYLES);return this.__showMonthButtons},clearStyle_showMonthButtons:function(){this.set_showMonthButtons(!0);return this.get_showMonthButtons()},__showYearButtons:null,get_showYearButtons:function(){return this.__showYearButtons},set_showYearButtons:function(a){if(!this.setStyle("showYearButtons")||this.__showYearButtons==a)return this.__showYearButtons;this._previousClearStyle=m(this,this.clearStyle_showYearButtons);this.__showYearButtons=a;this.setInvalid(x.STYLES);return this.__showYearButtons},
clearStyle_showYearButtons:function(){this.set_showYearButtons(!0);return this.get_showYearButtons()},__showWeekdayLabels:null,get_showWeekdayLabels:function(){return this.__showWeekdayLabels},set_showWeekdayLabels:function(a){if(!this.setStyle("showWeekdayLabels")||this.__showWeekdayLabels==a)return this.__showWeekdayLabels;this._previousClearStyle=m(this,this.clearStyle_showWeekdayLabels);this.__showWeekdayLabels=a;this.setInvalid(x.STYLES);return this.__showWeekdayLabels},clearStyle_showWeekdayLabels:function(){this.set_showWeekdayLabels(!0);
return this.get_showWeekdayLabels()},__customWeekdayLabelVariant:null,get_customWeekdayLabelVariant:function(){return this.__customWeekdayLabelVariant},set_customWeekdayLabelVariant:function(a){if(!this.setStyle("customWeekdayLabelVariant")||this.__customWeekdayLabelVariant==a)return this.__customWeekdayLabelVariant;this._previousClearStyle=m(this,this.clearStyle_customWeekdayLabelVariant);this.__customWeekdayLabelVariant=a;this.setInvalid(x.STYLES);return this.__customWeekdayLabelVariant},clearStyle_customWeekdayLabelVariant:function(){this.set_customWeekdayLabelVariant(null);
return this.get_customWeekdayLabelVariant()},__customDateRendererVariant:null,get_customDateRendererVariant:function(){return this.__customDateRendererVariant},set_customDateRendererVariant:function(a){if(!this.setStyle("customDateRendererVariant")||this.__customDateRendererVariant==a)return this.__customDateRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customDateRendererVariant);this.__customDateRendererVariant=a;this.setInvalid(x.STYLES);return this.__customDateRendererVariant},
clearStyle_customDateRendererVariant:function(){this.set_customDateRendererVariant(null);return this.get_customDateRendererVariant()},__customMutedDateRendererVariant:null,get_customMutedDateRendererVariant:function(){return this.__customMutedDateRendererVariant},set_customMutedDateRendererVariant:function(a){if(!this.setStyle("customMutedDateRendererVariant")||this.__customMutedDateRendererVariant==a)return this.__customMutedDateRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customMutedDateRendererVariant);
this.__customMutedDateRendererVariant=a;this.setInvalid(x.STYLES);return this.__customMutedDateRendererVariant},clearStyle_customMutedDateRendererVariant:function(){this.set_customMutedDateRendererVariant(null);return this.get_customMutedDateRendererVariant()},__showDatesFromAdjacentMonths:null,get_showDatesFromAdjacentMonths:function(){return this.__showDatesFromAdjacentMonths},set_showDatesFromAdjacentMonths:function(a){if(!this.setStyle("showDatesFromAdjacentMonths")||this.__showDatesFromAdjacentMonths==
a)return this.__showDatesFromAdjacentMonths;this._previousClearStyle=m(this,this.clearStyle_showDatesFromAdjacentMonths);this.__showDatesFromAdjacentMonths=a;this.setInvalid(x.STYLES);return this.__showDatesFromAdjacentMonths},clearStyle_showDatesFromAdjacentMonths:function(){this.set_showDatesFromAdjacentMonths(!0);return this.get_showDatesFromAdjacentMonths()},get_styleContext:function(){return Bb},__class__:Bb,__properties__:I(wa.prototype.__properties__,{set_showDatesFromAdjacentMonths:"set_showDatesFromAdjacentMonths",
get_showDatesFromAdjacentMonths:"get_showDatesFromAdjacentMonths",set_dateRendererRecycler:"set_dateRendererRecycler",get_dateRendererRecycler:"get_dateRendererRecycler",set_customMutedDateRendererVariant:"set_customMutedDateRendererVariant",get_customMutedDateRendererVariant:"get_customMutedDateRendererVariant",set_customDateRendererVariant:"set_customDateRendererVariant",get_customDateRendererVariant:"get_customDateRendererVariant",set_customWeekdayLabelVariant:"set_customWeekdayLabelVariant",get_customWeekdayLabelVariant:"get_customWeekdayLabelVariant",
set_weekdayLabelFactory:"set_weekdayLabelFactory",get_weekdayLabelFactory:"get_weekdayLabelFactory",set_customStartOfWeek:"set_customStartOfWeek",get_customStartOfWeek:"get_customStartOfWeek",set_customWeekdayNames:"set_customWeekdayNames",get_customWeekdayNames:"get_customWeekdayNames",set_customMonthNames:"set_customMonthNames",get_customMonthNames:"get_customMonthNames",get_actualLocaleIDName:"get_actualLocaleIDName",set_requestedLocaleIDName:"set_requestedLocaleIDName",get_requestedLocaleIDName:"get_requestedLocaleIDName",
set_showWeekdayLabels:"set_showWeekdayLabels",get_showWeekdayLabels:"get_showWeekdayLabels",set_showYearButtons:"set_showYearButtons",get_showYearButtons:"get_showYearButtons",set_showMonthButtons:"set_showMonthButtons",get_showMonthButtons:"get_showMonthButtons",set_showMonthTitleView:"set_showMonthTitleView",get_showMonthTitleView:"get_showMonthTitleView",set_monthTitleViewPosition:"set_monthTitleViewPosition",get_monthTitleViewPosition:"get_monthTitleViewPosition",set_paddingLeft:"set_paddingLeft",
get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_headerGap:"set_headerGap",get_headerGap:"get_headerGap",set_customMonthTitleViewVariant:"set_customMonthTitleViewVariant",get_customMonthTitleViewVariant:"get_customMonthTitleViewVariant",set_monthTitleViewFactory:"set_monthTitleViewFactory",get_monthTitleViewFactory:"get_monthTitleViewFactory",
set_customIncrementYearButtonVariant:"set_customIncrementYearButtonVariant",get_customIncrementYearButtonVariant:"get_customIncrementYearButtonVariant",set_incrementYearButtonFactory:"set_incrementYearButtonFactory",get_incrementYearButtonFactory:"get_incrementYearButtonFactory",set_customDecrementYearButtonVariant:"set_customDecrementYearButtonVariant",get_customDecrementYearButtonVariant:"get_customDecrementYearButtonVariant",set_decrementYearButtonFactory:"set_decrementYearButtonFactory",get_decrementYearButtonFactory:"get_decrementYearButtonFactory",
set_customIncrementMonthButtonVariant:"set_customIncrementMonthButtonVariant",get_customIncrementMonthButtonVariant:"get_customIncrementMonthButtonVariant",set_incrementMonthButtonFactory:"set_incrementMonthButtonFactory",get_incrementMonthButtonFactory:"get_incrementMonthButtonFactory",set_customDecrementMonthButtonVariant:"set_customDecrementMonthButtonVariant",get_customDecrementMonthButtonVariant:"get_customDecrementMonthButtonVariant",set_decrementMonthButtonFactory:"set_decrementMonthButtonFactory",
get_decrementMonthButtonFactory:"get_decrementMonthButtonFactory",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate",set_selectable:"set_selectable",get_selectable:"get_selectable",set_displayedMonth:"set_displayedMonth",get_displayedMonth:"get_displayedMonth",set_displayedFullYear:"set_displayedFullYear",
get_displayedFullYear:"get_displayedFullYear"})});var Sq=function(a,b){this.inactiveDateRenderers=[];this.activeDateRenderers=[];this.id=a;this.dateRendererRecycler=b};r["feathers.controls._DatePicker.DateRendererStorage"]=Sq;Sq.__name__="feathers.controls._DatePicker.DateRendererStorage";Sq.prototype={id:null,oldDateRendererRecycler:null,dateRendererRecycler:null,activeDateRenderers:null,inactiveDateRenderers:null,measurements:null,__class__:Sq};var bn=function(){};r["feathers.core.IFocusExclusions"]=
bn;bn.__name__="feathers.core.IFocusExclusions";bn.__isInterface__=!0;bn.__interfaces__=[tj];bn.prototype={get_focusExclusions:null,__class__:bn,__properties__:{get_focusExclusions:"get_focusExclusions"}};var Fi=function(a,b){this.__overlaySkin=null;this._clickOverlayToClose=this._swipeCloseEnabled=this._swipeOpenEnabled=this._animateOpenedProperty=!0;this._clickStartX=this._clickStartY=0;this._simulateTouch=!1;this._autoSizeMode=Fe.STAGE;this._pendingAnimation=this._opened=!1;this._pendingOpened=
null;this._pullableEdge=ja.LEFT;this._ignoreDrawerResize=this._ignoreContentResize=!1;this._focusExclusions=[];this.initializeDrawerTheme();wa.call(this);this.set_content(a);this.set_drawer(b);this.addEventListener("addedToStage",m(this,this.drawer_addedToStageHandler))};r["feathers.controls.Drawer"]=Fi;Fi.__name__="feathers.controls.Drawer";Fi.__interfaces__=[bn,mi];Fi.__super__=wa;Fi.prototype=I(wa.prototype,{_focusExclusions:null,get_focusExclusions:function(){return this._edgePuller!=null&&(this._edgePuller.get_opened()||
this._edgePuller.get_active())?this._focusExclusions:null},_edgePuller:null,_drawerMeasurements:null,_ignoreDrawerResize:null,_drawer:null,get_drawer:function(){return this._drawer},set_drawer:function(a){if(this._drawer==a)return this._drawer;this._drawer!=null&&(this._drawer.removeEventListener("resize",m(this,this.drawer_drawer_resizeHandler)),this._drawerMeasurements.restore(this._drawer),this._drawer.parent==this&&this.removeChild(this._drawer));this._drawer=a;this._drawer!=null&&(this._drawer.set_visible(!1),
this.addChild(this._drawer),u.__implements(this._drawer,jb)&&this._drawer.initializeNow(),this._drawerMeasurements==null?this._drawerMeasurements=new Ib(this._drawer):this._drawerMeasurements.save(this._drawer),this._drawer.addEventListener("resize",m(this,this.drawer_drawer_resizeHandler),!1,0,!0));this.setInvalid(x.DATA);return this._drawer},_contentMeasurements:null,_ignoreContentResize:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;
this._content!=null&&(this._content.removeEventListener("resize",m(this,this.drawer_content_resizeHandler)),this._contentMeasurements.restore(this._content),this._content.parent==this&&this.removeChild(this._content),X.remove(this._focusExclusions,this._content));this._content=a;this._content!=null&&(this.addChildAt(this._content,0),u.__implements(this._content,jb)&&this._content.initializeNow(),this._contentMeasurements==null?this._contentMeasurements=new Ib(this._content):this._contentMeasurements.save(this._content),
this._content.addEventListener("resize",m(this,this.drawer_content_resizeHandler),!1,0,!0),this._focusExclusions.push(this._content));this.setInvalid(x.DATA);return this._content},_pullableEdge:null,get_pullableEdge:function(){return this._pullableEdge},set_pullableEdge:function(a){if(this._pullableEdge==a)return this._pullableEdge;this._pullableEdge=a;this.setInvalid(x.DATA);return this._pullableEdge},_pendingOpened:null,_pendingAnimation:null,_opened:null,get_opened:function(){return this._pendingOpened!=
null?this._pendingOpened:this._opened},set_opened:function(a){a?this.openDrawer(this._animateOpenedProperty):this.closeDrawer(this._animateOpenedProperty);return this._pendingOpened!=null?this._pendingOpened:this._opened},_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this.stage!=null&&(this._autoSizeMode==Fe.STAGE?(this.stage.addEventListener("resize",
m(this,this.drawer_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.drawer_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler))));return this._autoSizeMode},_simulateTouch:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=
a;this.setInvalid(x.DATA);return this._simulateTouch},_currentOverlaySkin:null,_overlaySkinMeasurements:null,_overlaySkinAlpha:null,_fallbackOverlaySkin:null,_clickStartX:null,_clickStartY:null,_clickOverlayToClose:null,get_clickOverlayToClose:function(){return this._clickOverlayToClose},set_clickOverlayToClose:function(a){return this._clickOverlayToClose=a},_swipeCloseEnabled:null,get_swipeCloseEnabled:function(){return this._swipeCloseEnabled},set_swipeCloseEnabled:function(a){if(this._swipeCloseEnabled==
a)return this._swipeCloseEnabled;this._swipeCloseEnabled=a;this.setInvalid(x.STATE);return this._swipeCloseEnabled},_swipeOpenEnabled:null,get_swipeOpenEnabled:function(){return this._swipeOpenEnabled},set_swipeOpenEnabled:function(a){if(this._swipeOpenEnabled==a)return this._swipeOpenEnabled;this._swipeOpenEnabled=a;this.setInvalid(x.STATE);return this._swipeOpenEnabled},_animateOpenedProperty:null,get_animateOpenedProperty:function(){return this._animateOpenedProperty},set_animateOpenedProperty:function(a){return this._animateOpenedProperty=
a},dispose:function(){this._content!=null&&this.set_content(null);this._drawer!=null&&this.set_drawer(null);wa.prototype.dispose.call(this)},openDrawer:function(a){a==null&&(a=!0);this._pendingAnimation=a;if(this._pendingOpened==null||!this._pendingOpened){this._pendingOpened=!0;if(this._drawer==null)throw new rb("Cannot set opened property to true because drawer property is null");this.setInvalid(x.DATA)}},closeDrawer:function(a){a==null&&(a=!0);this._pendingAnimation=a;if(this._pendingOpened==null||
this._pendingOpened){this._pendingOpened=!1;if(this._drawer==null)throw new rb("Cannot set opened property to true because drawer property is null");this.setInvalid(x.DATA)}},initializeDrawerTheme:function(){Ut.initialize()},initialize:function(){wa.prototype.initialize.call(this);this._edgePuller==null&&(this._edgePuller=new fg(this._content));this._edgePuller.addEventListener("opening",m(this,this.drawer_edgePuller_openingHandler));this._edgePuller.addEventListener("closing",m(this,this.drawer_edgePuller_closingHandler));
this._edgePuller.addEventListener("open",m(this,this.drawer_edgePuller_openHandler));this._edgePuller.addEventListener("close",m(this,this.drawer_edgePuller_closeHandler));this._edgePuller.addEventListener("cancel",m(this,this.drawer_edgePuller_cancelHandler));this._edgePuller.addEventListener("change",m(this,this.drawer_edgePuller_changeHandler))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);a&&(this._edgePuller.set_target(this._content),this._edgePuller.set_pullableEdge(this._pullableEdge),
this._edgePuller.simulateTouch=this._simulateTouch);c&&this.refreshOverlaySkin();(b||a)&&this.refreshEnabled();this.measure();this.layoutChildren();a&&(this._pendingOpened!=null?(a=this._edgePuller.get_snapDuration(),this._pendingAnimation||this._edgePuller.set_snapDuration(0),this._edgePuller.set_opened(this._pendingOpened),this._pendingAnimation||this._edgePuller.set_snapDuration(a),this._pendingOpened=null):this._edgePuller.set_opened(this._opened))},measure:function(){var a=this.get_explicitWidth()==
null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;if(this._autoSizeMode!=Fe.CONTENT&&this.stage!=null){var h=this.globalToLocal(new Qa);f=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight));g=f.x-h.x;h=f.y-h.y;return this.saveMeasurements(g,h,g,h)}h=null;u.__implements(this._content,Kb)&&(h=this._content);if(this._content!=
null){var l=this._ignoreContentResize;this._ignoreContentResize=!0;Ne.resetFluidlyWithParentValues(this._contentMeasurements,this._content,this.get_explicitWidth(),this.get_explicitHeight(),this.get_explicitMinWidth(),this.get_explicitMinHeight(),this.get_explicitMaxWidth(),this.get_explicitMaxHeight());u.__implements(this._content,oa)&&this._content.validateNow();this._ignoreContentResize=l}l=this.get_explicitWidth();a&&(l=0,this._content!=null&&(l=this._content.get_width()));a=this.get_explicitHeight();
b&&(a=0,this._content!=null&&(a=this._content.get_height()));b=this.get_explicitMinWidth();c&&(b=h!=null?h.get_minWidth():this._contentMeasurements!=null&&this._contentMeasurements.minWidth!=null?this._contentMeasurements.minWidth:0);c=this.get_explicitMinHeight();d&&(c=h!=null?h.get_minHeight():this._contentMeasurements!=null&&this._contentMeasurements.minHeight!=null?this._contentMeasurements.minHeight:0);d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._contentMeasurements!=null&&
this._contentMeasurements.maxWidth!=null?this._contentMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._contentMeasurements!=null&&this._contentMeasurements.maxHeight!=null?this._contentMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},refreshEnabled:function(){this._edgePuller.enabled=this._enabled&&this._drawer!=null&&(this._opened&&this._swipeCloseEnabled||!this._opened&&this._swipeOpenEnabled);u.__implements(this._content,jb)&&
this._content.set_enabled(this._enabled);u.__implements(this._drawer,jb)&&this._drawer.set_enabled(this._enabled)},refreshOverlaySkin:function(){var a=this._currentOverlaySkin;this._currentOverlaySkin=this.getCurrentOverlaySkin();this._currentOverlaySkin!=a&&(this.removeCurrentOverlaySkin(a),this._currentOverlaySkin==null?this._overlaySkinMeasurements=null:(u.__implements(this._currentOverlaySkin,jb)&&this._currentOverlaySkin.initializeNow(),this._overlaySkinMeasurements==null?this._overlaySkinMeasurements=
new Ib(this._currentOverlaySkin):this._overlaySkinMeasurements.save(this._currentOverlaySkin),this._overlaySkinAlpha=this._currentOverlaySkin.get_alpha(),u.__implements(this._currentOverlaySkin,wb)&&this._currentOverlaySkin.set_uiContext(this),this._currentOverlaySkin.addEventListener("mouseDown",m(this,this.drawer_overlaySkin_mouseDownHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("click",m(this,this.drawer_overlaySkin_clickHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("touchBegin",
m(this,this.drawer_overlaySkin_touchBeginHandler),!1,0,!0),this._currentOverlaySkin.addEventListener("touchTap",m(this,this.drawer_overlaySkin_touchTapHandler),!1,0,!0),this._currentOverlaySkin.set_visible(!1),a=-1,this._drawer!=null&&(a=this.getChildIndex(this._drawer)),a==-1&&(a=this.get_numChildren()),this.addChildAt(this._currentOverlaySkin,a)))},getCurrentOverlaySkin:function(){return this.get_overlaySkin()==null?(this._fallbackOverlaySkin==null&&(this._fallbackOverlaySkin=new za,this._fallbackOverlaySkin.get_graphics().beginFill(16711935,
0),this._fallbackOverlaySkin.get_graphics().drawRect(0,0,1,1),this._fallbackOverlaySkin.get_graphics().endFill()),this._fallbackOverlaySkin):this.get_overlaySkin()},removeCurrentOverlaySkin:function(a){a!=null&&(a.removeEventListener("mouseDown",m(this,this.drawer_overlaySkin_mouseDownHandler)),a.removeEventListener("click",m(this,this.drawer_overlaySkin_clickHandler)),a.removeEventListener("touchBegin",m(this,this.drawer_overlaySkin_touchBeginHandler)),a.removeEventListener("touchTap",m(this,this.drawer_overlaySkin_touchTapHandler)),
u.__implements(a,wb)&&a.set_uiContext(null),this._overlaySkinMeasurements.restore(a),this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),a.parent==this&&this.removeChild(a))},layoutChildren:function(){var a=this._ignoreContentResize;this._ignoreContentResize=!0;this._content!=null&&(this._content.set_x(0),this._content.set_y(0),this._content.get_width()!=this.actualWidth&&this._content.set_width(this.actualWidth),this._content.get_height()!=this.actualHeight&&this._content.set_height(this.actualHeight),
u.__implements(this._content,oa)&&this._content.validateNow());this._ignoreContentResize=a;this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_x(0),this._currentOverlaySkin.set_y(0),this._currentOverlaySkin.set_width(this.actualWidth),this._currentOverlaySkin.set_height(this.actualHeight));a=this._ignoreDrawerResize;this._ignoreDrawerResize=!0;if(this._drawer!=null){switch(this._pullableEdge._hx_index){case 0:this._drawer.set_x(0);this._drawer.set_width(this.actualWidth);break;case 1:this._drawer.set_y(0);
this._drawer.set_height(this.actualHeight);break;case 2:this._drawer.set_x(0);this._drawer.set_width(this.actualWidth);break;case 3:this._drawer.set_y(0);this._drawer.set_height(this.actualHeight);break;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}u.__implements(this._drawer,oa)&&this._drawer.validateNow();var b=0;if(this._drawer!=null)switch(this._pullableEdge._hx_index){case 0:b=this._drawer.get_height();break;case 1:b=this._drawer.get_width();break;case 2:b=
this._drawer.get_height();break;case 3:b=this._drawer.get_width();break;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}this._edgePuller.set_maxPullDistance(b)}this._ignoreDrawerResize=a},updateWithPullDistance:function(){switch(this._pullableEdge._hx_index){case 0:this._drawer.set_y(-this._drawer.get_height()+this._edgePuller.get_pullDistance());break;case 1:this._drawer.set_x(this.actualWidth-this._edgePuller.get_pullDistance());break;case 2:this._drawer.set_y(this.actualHeight-
this._edgePuller.get_pullDistance());break;case 3:this._drawer.set_x(-this._drawer.get_width()+this._edgePuller.get_pullDistance());break;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha*(this._edgePuller.get_pullDistance()/this.getMaxPullDistance()))},getMaxPullDistance:function(){if(this._edgePuller.get_maxPullDistance()!=null)return this._edgePuller.get_maxPullDistance();
if(this._content==null)return 0;switch(this._pullableEdge._hx_index){case 0:return this._content.get_height();case 1:return this._content.get_width();case 2:return this._content.get_height();case 3:return this._content.get_width();default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},clearFocusOnOpening:function(){if(this._focusManager!=null){if(this._focusManager.get_focus()==null)return;u.__implements(this._content,ld)&&this._focusManager.get_focus()==this._content?
this._focusManager.set_focus(null):this._content instanceof lb&&this._content.contains(this._focusManager.get_focus())&&this._focusManager.set_focus(null)}this.stage.get_focus()!=null&&(this.stage.get_focus()==this._content||this._content instanceof lb&&this._content.contains(this.stage.get_focus()))&&this.stage.set_focus(this.stage)},drawer_edgePuller_openingHandler:function(a){var b=this._edgePuller.get_touchPointID();if(b!=null){var c=Ad.forStage(this.stage);b=this._edgePuller.get_touchPointIsSimulated()?
c.claimMouse(this):c.claimTouch(b,this);if(!b){a.preventDefault();return}}(b=W.dispatch(this,"opening"))?(this.clearFocusOnOpening(),this.updateWithPullDistance(),this._drawer.set_visible(!0),this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_visible(!0)):a.preventDefault()},drawer_edgePuller_closingHandler:function(a){W.dispatch(this,"closing")?(this.updateWithPullDistance(),this._drawer.set_visible(!0),this._currentOverlaySkin!=null&&this._currentOverlaySkin.set_visible(!0)):a.preventDefault()},
drawer_edgePuller_openHandler:function(a){this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),this._currentOverlaySkin.set_visible(!0));this._opened=!0;W.dispatch(this,"open");this.setInvalid(x.STATE)},drawer_edgePuller_closeHandler:function(a){this._drawer.set_visible(!1);this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),this._currentOverlaySkin.set_visible(!1));this._opened=!1;W.dispatch(this,"close");this.setInvalid(x.STATE)},
drawer_edgePuller_cancelHandler:function(a){this._opened||(this._drawer.set_visible(!1),this._currentOverlaySkin!=null&&(this._currentOverlaySkin.set_alpha(this._overlaySkinAlpha),this._currentOverlaySkin.set_visible(!1)));W.dispatch(this,"cancel");this.setInvalid(x.STATE)},drawer_edgePuller_changeHandler:function(a){this.updateWithPullDistance()},drawer_addedToStageHandler:function(a){this._autoSizeMode==Fe.STAGE&&(this.setInvalid(x.SIZE),this.addEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler)),
this.stage.addEventListener("resize",m(this,this.drawer_stage_resizeHandler)))},drawer_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.drawer_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.drawer_stage_resizeHandler))},drawer_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},drawer_overlaySkin_mouseDownHandler:function(a){this._enabled&&(this._clickStartX=a.localX,this._clickStartY=a.localY)},drawer_overlaySkin_clickHandler:function(a){if(this._enabled&&
this._clickOverlayToClose){var b=Math.abs(a.localY-this._clickStartY);Math.abs(a.localX-this._clickStartX)>Fi.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Fi.MAX_CLICK_DISTANCE_FOR_CLOSE||this.set_opened(!1)}},drawer_overlaySkin_touchBeginHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(this._clickStartX=a.localX,this._clickStartY=a.localY)},drawer_overlaySkin_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint){var b=Math.abs(a.localY-this._clickStartY);Math.abs(a.localX-this._clickStartX)>
Fi.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Fi.MAX_CLICK_DISTANCE_FOR_CLOSE||this.set_opened(!1)}},drawer_drawer_resizeHandler:function(a){this._ignoreDrawerResize||this.setInvalid(x.SIZE)},drawer_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements.save(this.get_content()),this.setInvalid(x.SIZE))},__overlaySkin:null,get_overlaySkin:function(){return this.__overlaySkin},set_overlaySkin:function(a){if(!this.setStyle("overlaySkin")||this.__overlaySkin==a)return this.__overlaySkin;
this._previousClearStyle=m(this,this.clearStyle_overlaySkin);this.__overlaySkin=a;this.setInvalid(x.STYLES);return this.__overlaySkin},clearStyle_overlaySkin:function(){this.set_overlaySkin(null);return this.get_overlaySkin()},get_styleContext:function(){return Fi},__class__:Fi,__properties__:I(wa.prototype.__properties__,{set_animateOpenedProperty:"set_animateOpenedProperty",get_animateOpenedProperty:"get_animateOpenedProperty",set_swipeOpenEnabled:"set_swipeOpenEnabled",get_swipeOpenEnabled:"get_swipeOpenEnabled",
set_swipeCloseEnabled:"set_swipeCloseEnabled",get_swipeCloseEnabled:"get_swipeCloseEnabled",set_clickOverlayToClose:"set_clickOverlayToClose",get_clickOverlayToClose:"get_clickOverlayToClose",set_overlaySkin:"set_overlaySkin",get_overlaySkin:"get_overlaySkin",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_opened:"set_opened",get_opened:"get_opened",set_pullableEdge:"set_pullableEdge",get_pullableEdge:"get_pullableEdge",
set_content:"set_content",get_content:"get_content",set_drawer:"set_drawer",get_drawer:"get_drawer",get_focusExclusions:"get_focusExclusions"})});var cn=function(){this.initializeFormTheme();sc.call(this);this.addEventListener("keyDown",m(this,this.form_keyDownHandler))};r["feathers.controls.Form"]=cn;cn.__name__="feathers.controls.Form";cn.__super__=sc;cn.prototype=I(sc.prototype,{_submitButton:null,get_submitButton:function(){return this._submitButton},set_submitButton:function(a){if(this._submitButton==
a)return this._submitButton;this._submitButton!=null&&this._submitButton.removeEventListener("trigger",m(this,this.form_submitButton_triggerHandler));this._submitButton=a;this._submitButton!=null&&this._submitButton.addEventListener("trigger",m(this,this.form_submitButton_triggerHandler),!1,0,!0);return this._submitButton},submit:function(){yj.dispatch(this,"submit")},dispose:function(){this._submitButton!=null&&this.set_submitButton(null);sc.prototype.dispose.call(this)},initializeFormTheme:function(){Vt.initialize()},
form_keyDownHandler:function(a){if(this._enabled&&a.keyCode==13&&!a.isDefaultPrevented()){for(var b=u.__cast(a.target,ea);b!=this&&b!=null;){if(b instanceof Gi&&!b.submitOnEnterEnabled)return;b=b.parent}a.preventDefault();this.submit()}},form_submitButton_triggerHandler:function(a){this.submit()},get_styleContext:function(){return cn},__class__:cn,__properties__:I(sc.prototype.__properties__,{set_submitButton:"set_submitButton",get_submitButton:"get_submitButton"})});var Gi=function(a,b,c){c==null&&
(c=!1);a==null&&(a="");this.__textPosition=ja.TOP;this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.LEFT;this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=this.__gap=0;this.__embedFonts=!1;this._currentRequiredSkin=this._requiredSkinMeasurements=this._customTextColumnWidth=this._currentBackgroundSkin=this._backgroundSkinMeasurements=this.__requiredSkin=this.__textFormat=this.__styleSheet=
this.__disabledTextFormat=null;this.submitOnEnterEnabled=!0;this._ignoreContentResize=this._selectable=this._required=!1;this._htmlText=this._contentMeasurements=this._currentContent=null;this._updatedTextStyles=this._wrappedOnMeasure=!1;this._previousText=this._previousHTMLText=this._previousTextFormat=this._previousSimpleTextFormat=null;this.initializeFormItemTheme();wa.call(this);this.set_text(a);this.set_content(b);this.set_required(c)};r["feathers.controls.FormItem"]=Gi;Gi.__name__="feathers.controls.FormItem";
Gi.__interfaces__=[tj,de];Gi.__super__=wa;Gi.prototype=I(wa.prototype,{textField:null,_previousText:null,_previousHTMLText:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_updatedTextStyles:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_wrappedOnMeasure:null,_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);this._customTextColumnWidth==
null||this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT||W.dispatch(this,"resize");return this._text},_htmlText:null,get_htmlText:function(){return this._htmlText},set_htmlText:function(a){if(this._htmlText==a)return this._htmlText;this._htmlText=a;this.setInvalid(x.DATA);return this._htmlText},get_baseline:function(){if(this.textField==null)return 0;var a=this._htmlText!=null&&this._htmlText.length>0;this._text!=null&&this._text.length>0||a?a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent:
(this.textField.set_text("\u200b"),a=this.textField.get_y()+this.textField.getLineMetrics(0).ascent,this.textField.set_text(""));var b=0;u.__implements(this._currentContent,de)&&(b=this._currentContent.get_y()+this._currentContent.get_baseline());return Math.max(a,b)},_contentMeasurements:null,_currentContent:null,_ignoreContentResize:null,_content:null,get_content:function(){return this._content},set_content:function(a){if(this._content==a)return this._content;this._content!=null&&this._content.removeEventListener("resize",
m(this,this.formItem_content_resizeHandler));this._content=a;this._content!=null&&this._content.addEventListener("resize",m(this,this.formItem_content_resizeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._content},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.SELECTION);return this._selectable},get_selectionBeginIndex:function(){return this._selectable?this.textField==
null?0:this.textField.get_selectionBeginIndex():-1},get_selectionEndIndex:function(){return this._selectable?this.textField==null?0:this.textField.get_selectionEndIndex():-1},_required:null,get_required:function(){return this._required},set_required:function(a){if(this._required==a)return this._required;this._required=a;this.setInvalid(x.SELECTION);this._customTextColumnWidth==null||this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT||W.dispatch(this,"resize");return this._required},
submitOnEnterEnabled:null,_currentRequiredSkin:null,_requiredSkinMeasurements:null,_customTextColumnWidth:null,get_customTextColumnWidth:function(){return this._customTextColumnWidth},set_customTextColumnWidth:function(a){if(this._customTextColumnWidth==a)return this._customTextColumnWidth;this._customTextColumnWidth=a;this.setInvalid(x.SIZE);return this._customTextColumnWidth},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,getTextMeasuredWidth:function(){var a=this._textMeasuredWidth;
this._currentRequiredSkin!=null&&(a+=this.get_gap()+this._currentRequiredSkin.get_width());return a},getTextMeasuredMaxWidth:function(){if(this._explicitWidth!=null){var a=this.getTextMeasuredWidth(),b=this._explicitWidth;this._currentContent!=null&&(b=u.__implements(this._currentContent,Kb)?b-this._currentContent.get_minWidth():b-this._currentContent.get_width(),b-=this.get_gap());b<0&&(b=0);if(a>b)return b}return 1/0},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);
this.set_paddingLeft(a)},initializeFormItemTheme:function(){Wt.initialize()},initialize:function(){wa.prototype.initialize.call(this);this.textField==null&&(this.textField=new Jc,this.textField.set_multiline(!0),this.addChild(this.textField));this.textField.addEventListener("click",m(this,this.formItem_textField_clickHandler))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedTextStyles=
!1;(f||d)&&this.refreshBackgroundSkin();(f||b)&&this.refreshRequiredSkin();(f||d)&&this.refreshTextStyles();(a||f||d||c)&&this.refreshText(c);(a||f||b)&&this.refreshSelection();a&&this.refreshContent();(a||d)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;
if(!(a||b||c||d||f||g))return!1;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=null;u.__implements(this._currentBackgroundSkin,Kb)&&(h=this._currentBackgroundSkin);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();u.__implements(this._currentRequiredSkin,oa)&&this._currentRequiredSkin.validateNow();var l=null;u.__implements(this._currentContent,Kb)&&(l=this._currentContent);
var k=null;u.__implements(this._currentRequiredSkin,Kb)&&(k=this._currentRequiredSkin);if(this._currentContent!=null){var q=0,w=0;this.get_textPosition()==ja.TOP||this.get_textPosition()==ja.BOTTOM?w=this._textMeasuredHeight+this.get_gap():this._customTextColumnWidth!=null?q=this._customTextColumnWidth+this.get_gap():(q=this._textMeasuredWidth+this.get_gap(),this._currentRequiredSkin!=null&&(q+=this._currentRequiredSkin.get_width()+this.get_gap()));if(this.get_horizontalAlign()==Vb.JUSTIFY||this.get_verticalAlign()==
fc.JUSTIFY){var v=null,z=null,n=null,E=null,H=null,J=null;this.get_horizontalAlign()==Vb.JUSTIFY&&(v=this.get_explicitWidth()!=null?this.get_explicitWidth()-q-this.get_paddingLeft()-this.get_paddingRight():null,n=this.get_explicitMinWidth()!=null?this.get_explicitMinWidth()-q-this.get_paddingLeft()-this.get_paddingRight():null,H=this.get_explicitMaxWidth()!=null?this.get_explicitMaxWidth()-q-this.get_paddingLeft()-this.get_paddingRight():null);this.get_verticalAlign()==fc.JUSTIFY&&(z=this.get_explicitHeight()!=
null?this.get_explicitHeight()-w-this.get_paddingTop()-this.get_paddingBottom():null,E=this.get_explicitMinHeight()!=null?this.get_explicitMinHeight()-w-this.get_paddingLeft()-this.get_paddingRight():null,J=this.get_explicitMaxHeight()!=null?this.get_explicitMaxHeight()-w-this.get_paddingLeft()-this.get_paddingRight():null);Ne.resetFluidlyWithParentValues(this._contentMeasurements,this._currentContent,v,z,n,E,H,J)}else this._contentMeasurements.restore(this._currentContent);q=this._ignoreContentResize;
this._ignoreContentResize=!0;u.__implements(this._currentContent,oa)&&this._currentContent.validateNow();this._ignoreContentResize=q}q=this.get_explicitWidth();a&&(q=this._textMeasuredWidth,this._customTextColumnWidth==null||this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT?k!=null?q+=this.get_gap()+k.get_width():this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.width!=null&&(q+=this.get_gap()+this._requiredSkinMeasurements.width):q=this._customTextColumnWidth,
q+=this.get_paddingLeft()+this.get_paddingRight(),this._currentContent!=null&&(q=this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT?q+(this.get_gap()+this._currentContent.get_width()):Math.max(q,this._currentContent.get_width()+this.get_paddingLeft()+this.get_paddingRight())),this._currentBackgroundSkin!=null&&(q=Math.max(this._currentBackgroundSkin.get_width(),q)));a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight,k!=null?a=Math.max(a,k.get_height()):this._requiredSkinMeasurements!=
null&&this._requiredSkinMeasurements.height!=null&&(a=Math.max(a,this._requiredSkinMeasurements.height)),this._currentContent!=null&&(a=this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT?Math.max(a,this._currentContent.get_height()):a+(this.get_gap()+this._currentContent.get_height())),a+=this.get_paddingTop()+this.get_paddingBottom(),this._currentBackgroundSkin!=null&&(a=Math.max(this._currentBackgroundSkin.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=this._textMeasuredWidth,
this._customTextColumnWidth==null||this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT?k!=null?b+=this.get_gap()+k.get_width():this._requiredSkinMeasurements!=null&&this._requiredSkinMeasurements.width!=null&&(b+=this.get_gap()+this._requiredSkinMeasurements.width):b=this._customTextColumnWidth,b+=this.get_paddingLeft()+this.get_paddingRight(),this._currentContent!=null&&(this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT?(b=l!=null?b+l.get_minWidth():b+this._currentContent.get_width(),
b+=this.get_gap()):b=l!=null?Math.max(b,l.get_minWidth()+this.get_paddingLeft()+this.get_paddingRight()):Math.max(b,this._currentContent.get_width()+this.get_paddingLeft()+this.get_paddingRight())),h!=null?b=Math.max(h.get_minWidth(),b):this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.minWidth!=null&&(b=Math.max(this._backgroundSkinMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight,k!=null?c=Math.max(c,k.get_height()):this._requiredSkinMeasurements!=
null&&this._requiredSkinMeasurements.height!=null&&(c=Math.max(c,this._requiredSkinMeasurements.height)),this._currentContent!=null&&(this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT?c=l!=null?Math.max(c,l.get_minHeight()):Math.max(c,this._currentContent.get_height()):(c=l!=null?c+l.get_minHeight():c+this._currentContent.get_height(),c+=this.get_gap())),c+=this.get_paddingTop()+this.get_paddingBottom(),h!=null?c=Math.max(h.get_minHeight(),c):this._backgroundSkinMeasurements!=null&&
this._backgroundSkinMeasurements.minHeight!=null&&(c=Math.max(this._backgroundSkinMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null?this._backgroundSkinMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxHeight!=null?this._backgroundSkinMeasurements.maxHeight:
1/0);return this.saveMeasurements(q,a,b,c,d,f)},refreshTextStyles:function(){this.textField.get_wordWrap()!=this.get_wordWrap()&&(this.textField.set_wordWrap(this.get_wordWrap()),this._updatedTextStyles=!0);this.textField.get_embedFonts()!=this.get_embedFonts()&&(this.textField.set_embedFonts(this.get_embedFonts()),this._updatedTextStyles=!0);this.textField.get_styleSheet()!=this.get_styleSheet()&&(this.textField.set_styleSheet(this.get_styleSheet()),this._updatedTextStyles=!0);var a=this.getCurrentTextFormat(),
b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.formItem_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.formItem_textFormat_changeHandler),!1,0,!0),this.textField.set_defaultTextFormat(b),this._updatedTextStyles=!0),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshText:function(a){var b=this._text!=null&&this._text.length>0,c=
this._htmlText!=null&&this._htmlText.length>0;this.textField.set_visible(b||c);if(this._text!=this._previousText||this._htmlText!=this._previousHTMLText||this._updatedTextStyles||a)this.textField.set_autoSize(1),c?this.textField.set_text(this._htmlText):b?this.textField.set_text(this._text):this.textField.set_text("\u200b"),this.get_wordWrap()&&this.textField.set_wordWrap(!1),this._textMeasuredWidth=this.textField.get_textWidth()+4,this._wrappedOnMeasure=!1,this.get_wordWrap()&&(a=this.calculateExplicitWidthForTextMeasurement(),
a!=null&&this._textMeasuredWidth>a&&(this.textField.set_wordWrap(!0),this.textField.set_width(a),this._textMeasuredWidth=this.textField.get_width(),this._wrappedOnMeasure=!0)),this._textMeasuredHeight=this.textField.get_height(),this.textField.set_autoSize(2),this.textField.get_wordWrap()!=this.get_wordWrap()&&this.textField.set_wordWrap(this.get_wordWrap()),b||c||this.textField.set_text(""),this._previousText=this._text,this._previousHTMLText=this._htmlText},calculateExplicitWidthForTextMeasurement:function(){var a=
null;this.get_explicitWidth()!=null?a=this.get_explicitWidth():this.get_explicitMaxWidth()!=null?a=this.get_explicitMaxWidth():this._backgroundSkinMeasurements!=null&&this._backgroundSkinMeasurements.maxWidth!=null&&(a=this._backgroundSkinMeasurements.maxWidth);if(a==null)return a;a-=this.get_paddingLeft()+this.get_paddingRight();if(this.get_content()!=null&&(this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT)){var b=this._ignoreContentResize;this._ignoreContentResize=!0;u.__implements(this._content,
oa)&&this._content.validateNow();this._ignoreContentResize=b;a-=this._content.get_width()+this.get_gap()}a<0&&(a=0);return a},refreshSelection:function(){var a=this._selectable&&this._enabled;this.textField.get_selectable()!=a&&this.textField.set_selectable(a)},getCurrentTextFormat:function(){return this.get_styleSheet()!=null?null:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;
this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==
null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshRequiredSkin:function(){var a=this._currentRequiredSkin;this._currentRequiredSkin=this.getCurrentRequiredSkin();this._currentRequiredSkin!=a&&(this.removeCurrentRequiredSkin(a),
this.addCurrentRequiredSkin(this._currentRequiredSkin))},getCurrentRequiredSkin:function(){return this._required?this.get_requiredSkin():null},addCurrentRequiredSkin:function(a){a==null?this._requiredSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._requiredSkinMeasurements==null?this._requiredSkinMeasurements=new Ib(a):this._requiredSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentRequiredSkin:function(a){a!=null&&(u.__implements(a,
wb)&&a.set_uiContext(null),this._requiredSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshContent:function(){var a=this._currentContent;this._currentContent=this._content;this._currentContent!=a&&(a!=null&&(this._contentMeasurements.restore(a),this.removeChild(a)),this._currentContent==null?this._contentMeasurements=null:(u.__implements(this._currentContent,jb)&&this._currentContent.initializeNow(),this._contentMeasurements==null?this._contentMeasurements=new Ib(this._currentContent):
this._contentMeasurements.save(this._currentContent),this.addChild(this._currentContent)))},refreshEnabled:function(){this._currentContent!=null&&u.__implements(this._currentContent,jb)&&this._currentContent.set_enabled(this._enabled)},layoutContent:function(){this.layoutBackgroundSkin();u.__implements(this._currentRequiredSkin,oa)&&this._currentRequiredSkin.validateNow();var a=this._ignoreContentResize;this._ignoreContentResize=!0;u.__implements(this._currentContent,oa)&&this._currentContent.validateNow();
this._ignoreContentResize=a;var b=0;this._currentRequiredSkin!=null&&(b=this.get_gap()+this._currentRequiredSkin.get_width());a=this._textMeasuredWidth;this._customTextColumnWidth==null||this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT||(a=this._customTextColumnWidth-b);var c=this._textMeasuredHeight,d=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();if(this.get_textPosition()==ja.LEFT||this.get_textPosition()==ja.RIGHT)d-=this.get_gap()+b;d<0&&(d=0);a>d&&(a=d);a<
0&&(a=0);var f=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();this.get_textPosition()!=ja.LEFT&&this.get_textPosition()!=ja.RIGHT&&(f-=this.get_gap());f<0&&(f=0);c>f&&(c=f);c<0&&(c=0);switch(this.get_textPosition()._hx_index){case 0:this.textField.set_x(this.get_paddingLeft());this.textField.set_y(this.get_paddingTop());f-=c;break;case 1:this.textField.set_x(this.actualWidth-a-b-this.get_paddingRight());d-=a;break;case 2:this.textField.set_x(this.get_paddingLeft());this.textField.set_y(this.actualHeight-
c-this.get_paddingBottom());f-=c;break;case 3:this.textField.set_x(this.get_paddingLeft());d-=a;break;default:throw new rb("Unknown text position: "+L.string(this.get_textPosition()));}this.textField.set_width(a);var g=this.get_wordWrap();g&&!this._wrappedOnMeasure&&a>=this._textMeasuredWidth&&(g=!1);this.textField.get_wordWrap()!=g&&this.textField.set_wordWrap(g);this.textField.set_height(c);if(this._currentContent!=null){g=this.get_paddingLeft();var h=this.get_paddingRight();switch(this.get_textPosition()._hx_index){case 0:h=
this.textField.get_y()+c+this.get_gap();break;case 1:break;case 2:break;case 3:g=this.textField.get_x()+a+this.get_gap()+b;break;default:throw new rb("Unknown text position: "+L.string(this.get_textPosition()));}this._currentContent.get_width()>d&&this._currentContent.set_width(d);this._currentContent.get_height()>f&&this._currentContent.set_height(f);switch(this.get_horizontalAlign()._hx_index){case 0:this._currentContent.set_x(g);break;case 1:this._currentContent.set_x(g+(d-this._currentContent.get_width())/
2);break;case 2:this._currentContent.set_x(g+d-this._currentContent.get_width());break;case 3:this._currentContent.set_x(g),this._currentContent.set_width(d)}switch(this.get_verticalAlign()._hx_index){case 0:this._currentContent.set_y(h);break;case 1:this._currentContent.set_y(h+(f-this._currentContent.get_height())/2);break;case 2:this._currentContent.set_y(h+f-this._currentContent.get_height());break;case 3:this._currentContent.set_y(h),this._currentContent.set_height(f)}if(this.get_textPosition()==
ja.LEFT||this.get_textPosition()==ja.RIGHT)if(u.__implements(this._currentContent,de))b=this.textField.getLineMetrics(0).ascent+2,d=this._currentContent.get_baseline(),f=Math.max(d,b),g=this._currentContent.get_y(),this.textField.set_y(g+(f-b)),this._currentContent!=null&&this._currentContent.set_y(g+(f-d));else switch(this.get_verticalAlign()._hx_index){case 0:this.textField.set_y(this._currentContent.get_y());break;case 1:this.textField.set_y(this._currentContent.get_y()+(this._currentContent.get_height()-
this.textField.get_height())/2);break;case 2:this.textField.set_y(this._currentContent.get_y()+this._currentContent.get_height()-this.textField.get_height());break;case 3:this.textField.set_y(this._currentContent.get_y())}this._currentRequiredSkin!=null&&(this._currentRequiredSkin.set_y(this.textField.get_y()+(c-this._currentRequiredSkin.get_height())/2),this._currentRequiredSkin.set_x(this.textField.get_x()+a+this.get_gap()))}},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),
this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},formItem_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},formItem_textField_clickHandler:function(a){this._focusManager!=null&&
(a=null,u.__implements(this._currentContent,ld)&&(a=this._currentContent),this._focusManager.set_focus(a))},formItem_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements==null?this._contentMeasurements=new Ib(this._currentContent):this._contentMeasurements.save(this._currentContent),this.setInvalid(x.SIZE))},__requiredSkin:null,get_requiredSkin:function(){return this.__requiredSkin},set_requiredSkin:function(a){if(!this.setStyle("requiredSkin")||this.__requiredSkin==
a)return this.__requiredSkin;this._previousClearStyle=m(this,this.clearStyle_requiredSkin);this.__requiredSkin=a;this.setInvalid(x.STYLES);return this.__requiredSkin},clearStyle_requiredSkin:function(){this.set_requiredSkin(null);return this.get_requiredSkin()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=
a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__styleSheet:null,get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){if(!this.setStyle("styleSheet")||this.__styleSheet==a)return this.__styleSheet;this._previousClearStyle=m(this,this.clearStyle_styleSheet);this.__styleSheet=a;this.setInvalid(x.STYLES);return this.__styleSheet},clearStyle_styleSheet:function(){this.set_styleSheet(null);
return this.get_styleSheet()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},
__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||
this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);
this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},
clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},
__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__horizontalAlign:null,get_horizontalAlign:function(){return this.__horizontalAlign},set_horizontalAlign:function(a){if(!this.setStyle("horizontalAlign")||this.__horizontalAlign==a)return this.__horizontalAlign;
this._previousClearStyle=m(this,this.clearStyle_horizontalAlign);this.__horizontalAlign=a;this.setInvalid(x.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.LEFT);return this.get_horizontalAlign()},__verticalAlign:null,get_verticalAlign:function(){return this.__verticalAlign},set_verticalAlign:function(a){if(!this.setStyle("verticalAlign")||this.__verticalAlign==a)return this.__verticalAlign;this._previousClearStyle=m(this,this.clearStyle_verticalAlign);
this.__verticalAlign=a;this.setInvalid(x.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);return this.get_verticalAlign()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);
return this.get_wordWrap()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,
get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},
__textPosition:null,get_textPosition:function(){return this.__textPosition},set_textPosition:function(a){if(!this.setStyle("textPosition")||this.__textPosition==a)return this.__textPosition;this._previousClearStyle=m(this,this.clearStyle_textPosition);this.__textPosition=a;this.setInvalid(x.STYLES);return this.__textPosition},clearStyle_textPosition:function(){this.set_textPosition(ja.TOP);return this.get_textPosition()},get_styleContext:function(){return Gi},__class__:Gi,__properties__:I(wa.prototype.__properties__,
{set_textPosition:"set_textPosition",get_textPosition:"get_textPosition",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_customTextColumnWidth:"set_customTextColumnWidth",get_customTextColumnWidth:"get_customTextColumnWidth",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",
set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_disabledTextFormat:"set_disabledTextFormat",
get_disabledTextFormat:"get_disabledTextFormat",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_requiredSkin:"set_requiredSkin",get_requiredSkin:"get_requiredSkin",set_required:"set_required",get_required:"get_required",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",get_selectable:"get_selectable",set_content:"set_content",get_content:"get_content",
get_baseline:"get_baseline",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_text:"set_text",get_text:"get_text"})});var Tq=function(a,b,c){b==null&&(b=-1);this.sortOrder=rh.NONE;this.enabled=!0;this.columnIndex=-1;this.column=a;this.columnIndex=b;this.text=c};r["feathers.data.GridViewHeaderState"]=Tq;Tq.__name__="feathers.data.GridViewHeaderState";Tq.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,sortOrder:null,__class__:Tq};var Uq=function(){this.enabled=!0;
this.selected=!1;this.rowIndex=-1};r["feathers.controls._GridView.GridViewRowState"]=Uq;Uq.__name__="feathers.controls._GridView.GridViewRowState";Uq.prototype={owner:null,data:null,rowIndex:null,selected:null,enabled:null,columns:null,cellRendererRecycler:null,customColumnWidths:null,customCellRendererVariant:null,forceItemStateUpdate:null,__class__:Uq};var nc=function(a,b,c){this.__dragDropIndicatorSkin=null;this.__extendedScrollBarY=this.__showHeaderDividersOnlyWhenResizable=!1;this.__customHeaderDividerVariant=
this.__columnDividerFactory=this.__customColumnDividerVariant=this.__layout=this.__columnResizeSkin=this.__headerCornerSkin=null;this.__headerDividerFactory=Ec.withClass(Qb);this.__customCellRendererVariant=this.__customHeaderRendererVariant=null;this.edgeAutoScrollDistance=8;this._dragDropLastUpdateTime=-1;this._droppedOnSelf=!1;this._dragRowIndex=-1;this._dragItem=null;this._dragDropLocalX=this._dragDropLocalY=this._dragMinDistance=0;this._dragEnabled=this._dropEnabled=this._removeOnDragDropComplete=
!1;this._dragFormat=nc.DEFAULT_DRAG_FORMAT_ITEMS;this._pendingScrollDuration=null;this._pendingScrollRowIndex=-1;this._ignoreSelectionChange=this._ignoreLayoutChanges=this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Di(0,0);this._visibleIndices=new Di(0,0);this._virtualCache=[];this._rowLayoutItems=[];this._unrenderedData=[];this.rowStatePool=new Tb(function(){return new Uq});this.headerStatePool=new Tb(function(){return new Tq});this.rowRendererToRowState=new Na;
this.dataToRowRenderer=new Na;this.activeRowRenderers=[];this.inactiveRowRenderers=[];this.headerRendererToHeaderState=new Na;this.dataToHeaderRenderer=new Na;this._sortedColumn=null;this._sortOrder=rh.NONE;this._sortableColumns=this._resizableColumns=!1;this._cellRendererRecycler=He.withClass(Mc);this._virtualLayout=!0;this._selectedItems=[];this._selectedIndices=[];this._selectionAnchorIndex=-1;this._allowMultipleSelection=!1;this._selectedItem=null;this._selectedIndex=-1;this._previousCustomHeaderRendererVariant=
null;this._forceItemStateUpdate=!1;this._autoPopulatedColumns=this._columns=null;this._ignoreDataProviderChanges=!1;this._childFocusEnabled=!0;this._headerScrollRect2=new Ea;this._headerScrollRect1=new Ea;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new Du;this._headerDividerLayoutItems=[];this._defaultHeaderDividerStorage=new Eu(Ec.withClass(Qb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new Fu(He.withClass(Gk));this._resizingHeaderTouchPointIsMouse=
!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeGridViewTheme();ob.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(Ec.withClass(Rf));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.gridViewPort=new Dk,this.addChild(this.gridViewPort),this.set_viewPort(this.gridViewPort));c!=null&&this.addEventListener("change",c)};r["feathers.controls.GridView"]=nc;nc.__name__="feathers.controls.GridView";
nc.__interfaces__=[uo,Lq,dg,ii,Vi];nc.defaultUpdateHeaderRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};nc.defaultResetHeaderRenderer=function(a,b){u.__implements(a,de)&&a.set_text(null)};nc.defaultSortCompareFunction=function(a,b){a=L.string(a).toLowerCase();b=L.string(b).toLowerCase();return a<b?-1:a>b?1:0};nc.__super__=ob;nc.prototype=I(ob.prototype,{_headerContainer:null,_headerContainerLayout:null,_headerResizeContainer:null,_columnDividerContainer:null,_resizingHeaderIndex:null,
_resizingHeaderTouchPointID:null,_resizingHeaderTouchPointIsMouse:null,_resizingHeaderStartStageX:null,_customColumnWidths:null,_defaultHeaderStorage:null,_unrenderedHeaderData:null,_headerLayoutItems:null,_defaultHeaderDividerStorage:null,_headerDividerLayoutItems:null,_defaultColumnDividerStorage:null,_columnDividerLayoutItems:null,_currentHeaderScrollRect:null,_headerScrollRect1:null,_headerScrollRect2:null,_oldHeaderDividerMouseCursor:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=
this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},gridViewPort:null,_ignoreDataProviderChanges:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==
a)return this._dataProvider;this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.gridView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.gridView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.gridView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.gridView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",
m(this,this.gridView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.gridView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.gridView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.gridView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.gridView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",
m(this,this.gridView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length(),this._dataProvider.addEventListener("change",m(this,this.gridView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.gridView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.gridView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",
m(this,this.gridView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.gridView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.gridView_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.gridView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.gridView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",
m(this,this.gridView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.gridView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedIndex(-1);this._autoPopulatedColumns!=null&&(this._autoPopulatedColumns=null,this.set_columns(null));this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_autoPopulatedColumns:null,_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==
a)return this._columns;this._columns!=null&&(this._columns.removeEventListener("change",m(this,this.gridView_columns_changeHandler)),this._columns.removeEventListener("addItem",m(this,this.gridView_columns_addItemHandler)),this._columns.removeEventListener("removeItem",m(this,this.gridView_columns_removeItemHandler)));this._columns=a;this._columns!=null&&(this._columns.addEventListener("change",m(this,this.gridView_columns_changeHandler)),this._columns.addEventListener("addItem",m(this,this.gridView_columns_addItemHandler)),
this._columns.addEventListener("removeItem",m(this,this.gridView_columns_removeItemHandler)));this._customColumnWidths=this._autoPopulatedColumns=null;this.setInvalid(x.DATA);return this._columns},get_rowRendererFactory:function(){return this._rowRendererFactory},set_rowRendererFactory:function(a){if(this._rowRendererFactory==a)return this._rowRendererFactory;this._oldRowRendererFactory=this._rowRendererFactory;this._rowRendererFactory=a;this.setInvalid(nc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);
return this._rowRendererFactory},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.headerRendererRecycler},set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.headerRendererRecycler==a)return this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.oldHeaderRendererRecycler=this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.headerRendererRecycler=a;this.setInvalid(nc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.headerRendererRecycler},
_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_previousCustomHeaderRendererVariant:null,_rowRendererFactory:null,_oldRowRendererFactory:null,_rowRendererMeasurements:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._selectable&&
this._dataProvider!=null||(a=-1);if(this._selectedIndex==a&&this._selectedIndices.length<=1)return this._selectedIndex;if(a==-1)return this._selectedIndex=this._selectionAnchorIndex=-1,this._selectedItem=null,this._selectedIndices.length=0,this._selectedItems.length=0,this.setInvalid(x.SELECTION),W.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._dataProvider.get(this._selectedIndex);this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;
this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;
var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b&&this._selectedIndices.length==1)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this._selectedIndices.length=1;this._selectedIndices[0]=this._selectedIndex;this._selectedItems.length=1;this._selectedItems[0]=this._selectedItem;this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},
_allowMultipleSelection:null,get_allowMultipleSelection:function(){return this._allowMultipleSelection},set_allowMultipleSelection:function(a){if(this._allowMultipleSelection==a)return this._allowMultipleSelection;this._allowMultipleSelection=a;this.setInvalid(x.SELECTION);return this._allowMultipleSelection},_selectionAnchorIndex:null,_selectedIndices:null,get_selectedIndices:function(){return this._selectedIndices},set_selectedIndices:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==
null)return this.set_selectedIndex(-1),this._selectedIndices;if(this._selectedIndices==a)return this._selectedIndices;!this._allowMultipleSelection&&a.length>1&&(a.length=1);this._selectedIndices=a;this._selectedIndex=this._selectedIndices[0];this._selectedItems.length=this._selectedIndices.length;a=0;for(var b=this._selectedIndices.length;a<b;){var c=a++;this._selectedItems[c]=this._dataProvider.get(this._selectedIndices[c])}this._selectedItem=this._selectedItems[0];this._selectionAnchorIndex=this._selectedIndex;
this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndices},_selectedItems:null,get_selectedItems:function(){return this._selectedItems},set_selectedItems:function(a){if(a==null||a.length==0||!this._selectable||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItems;if(this._selectedItems==a)return this._selectedItems;!this._allowMultipleSelection&&a.length>1&&(a.length=1);for(var b=[],c=0;c<a.length;){var d=this._dataProvider.indexOf(a[c]);d==-1?a.splice(c,
1):(b.push(d),++c)}this._selectedIndices=b;this._selectedItems=a;a.length==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._selectedItems[0]);this._selectionAnchorIndex=this._selectedIndex;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndices},_previousLayout:null,_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;
this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},_cellRendererRecycler:null,get_cellRendererRecycler:function(){return this._cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._cellRendererRecycler==a)return this._cellRendererRecycler;this._cellRendererRecycler=a;this.setInvalid(x.DATA);return this._cellRendererRecycler},_sortableColumns:null,get_sortableColumns:function(){return this._sortableColumns},set_sortableColumns:function(a){return this._sortableColumns==
a?this._sortableColumns:this._sortableColumns=a},_resizableColumns:null,get_resizableColumns:function(){return this._resizableColumns},set_resizableColumns:function(a){if(this._resizableColumns==a)return this._resizableColumns;this._resizableColumns=a;this.setInvalid(x.LAYOUT);return this._resizableColumns},_currentColumnResizeSkin:null,_currentHeaderCornerSkin:null,_sortOrder:null,get_sortOrder:function(){return this._sortOrder},set_sortOrder:function(a){this._sortedColumn==null&&(a=rh.NONE);if(this._sortOrder==
a)return this._sortOrder;this._sortOrder=a;this.setInvalid(x.SORT);return this._sortOrder},_sortedColumn:null,get_sortedColumn:function(){return this._sortedColumn},set_sortedColumn:function(a){if(this._sortedColumn==a)return this._sortedColumn;if(this._columns.indexOf(a)==-1)return this._sortedColumn=null,this._sortOrder=rh.NONE,this._sortedColumn;this._sortedColumn=a;this._sortedColumn!=null?this.set_sortOrder(this._sortedColumn.defaultSortOrder):this._sortOrder=rh.NONE;this.setInvalid(x.SORT);
return this._sortedColumn},dataToHeaderRenderer:null,headerRendererToHeaderState:null,inactiveRowRenderers:null,activeRowRenderers:null,dataToRowRenderer:null,rowRendererToRowState:null,headerStatePool:null,rowStatePool:null,_unrenderedData:null,_rowLayoutItems:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedIndex(-1);
return this._selectable},_ignoreSelectionChange:null,_ignoreLayoutChanges:null,_ignoreHeaderLayoutChanges:null,_pendingScrollRowIndex:null,_pendingScrollDuration:null,_dragDropIndicatorSkinMeasurements:null,_dragFormat:null,get_dragFormat:function(){return this._dragFormat},set_dragFormat:function(a){a==null&&(a=nc.DEFAULT_DRAG_FORMAT_ITEMS);return this._dragFormat==a?this._dragFormat:this._dragFormat=a},_dragEnabled:null,get_dragEnabled:function(){return this._dragEnabled},set_dragEnabled:function(a){if(this._dragEnabled==
a)return this._dragEnabled;this._dragEnabled&&this.removeEventListener("dragComplete",m(this,this.gridView_dragCompleteHandler));(this._dragEnabled=a)&&this.addEventListener("dragComplete",m(this,this.gridView_dragCompleteHandler));return this._dragEnabled},_dropEnabled:null,get_dropEnabled:function(){return this._dropEnabled},set_dropEnabled:function(a){if(this._dropEnabled==a)return this._dropEnabled;this._dropEnabled&&(this.removeEventListener("dragEnter",m(this,this.gridView_dragEnterHandler)),
this.removeEventListener("dragExit",m(this,this.gridView_dragExitHandler)),this.removeEventListener("dragMove",m(this,this.gridView_dragMoveHandler)),this.removeEventListener("dragDrop",m(this,this.gridView_dragDropHandler)));if(this._dropEnabled=a)this.addEventListener("dragEnter",m(this,this.gridView_dragEnterHandler)),this.addEventListener("dragExit",m(this,this.gridView_dragExitHandler)),this.addEventListener("dragMove",m(this,this.gridView_dragMoveHandler)),this.addEventListener("dragDrop",m(this,
this.gridView_dragDropHandler));return this._dropEnabled},_removeOnDragDropComplete:null,get_removeOnDragDropComplete:function(){return this._removeOnDragDropComplete},set_removeOnDragDropComplete:function(a){return this._removeOnDragDropComplete=a},_dragDropLocalX:null,_dragDropLocalY:null,_dragMinDistance:null,_dragItem:null,_dragRowIndex:null,_dragRowRenderer:null,_droppedOnSelf:null,_dragDropLastUpdateTime:null,edgeAutoScrollDistance:null,scrollToRowIndex:function(a,b){this._dataProvider!=null&&
this._dataProvider.get_length()!=0&&(this._pendingScrollRowIndex=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemAndColumnToCellRenderer:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellRenderer(b)},columnToHeaderRenderer:function(a){return this.dataToHeaderRenderer.h[a.__id__]},headerRendererToColumn:function(a){a=this.headerRendererToHeaderState.h[a.__id__];return a==null?null:a.column},itemAndColumnToCellState:function(a,
b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellState(b)},dispose:function(){this.refreshInactiveHeaderRenderers(!0);this.refreshInactiveRowRenderers(!0);this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);this.set_columns(null);ob.prototype.dispose.call(this)},initializeGridViewTheme:function(){Xt.initialize()},initialize:function(){ob.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=
new pl,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new sc,this._headerContainer.set_layout(this._headerContainerLayout),this.addChild(this._headerContainer));this._headerResizeContainer==null&&(this._headerResizeContainer=new za,this.addChild(this._headerResizeContainer));this._columnDividerContainer==null&&(this._columnDividerContainer=new za,this._columnDividerContainer.mouseEnabled=!1,this._columnDividerContainer.mouseChildren=!1,
this.addChild(this._columnDividerContainer))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.SORT),d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(nc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var g=this.isInvalid(nc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._defaultHeaderDividerStorage.headerDividerFactory!=this.get_headerDividerFactory()&&
(this._defaultHeaderDividerStorage.oldHeaderDividerFactory=this._defaultHeaderDividerStorage.headerDividerFactory,this._defaultHeaderDividerStorage.headerDividerFactory=this.get_headerDividerFactory(),this.setInvalidationFlag(nc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(nc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));
var h=this.isInvalid(nc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this._defaultColumnDividerStorage.columnDividerFactory!=this.get_columnDividerFactory()&&(this._defaultColumnDividerStorage.oldColumnDividerFactory=this._defaultColumnDividerStorage.columnDividerFactory,this._defaultColumnDividerStorage.columnDividerFactory=this.get_columnDividerFactory(),this.setInvalidationFlag(nc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&
(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(nc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var l=this.isInvalid(nc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.validateColumns();(a||c)&&this.refreshSortedColumn(c);f&&this.refreshHeaderCornerSkin();(f||b)&&this.refreshColumnResizeSkin();(g||d||a||c)&&this.refreshHeaderRenderers();(h||d||a||c)&&this.refreshHeaderDividers();(l||d||a||c)&&this.refreshColumnDividers();b&&
(this._headerResizeContainer.mouseEnabled=this._resizableColumns,this._headerResizeContainer.mouseChildren=this._resizableColumns);if(a||b)a=this._ignoreHeaderLayoutChanges,this._ignoreHeaderLayoutChanges=!0,this._headerContainerLayout.set_customColumnWidths(this._customColumnWidths),this._ignoreHeaderLayoutChanges=a;if(b||f)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._dataProvider!=null&&(this._virtualCache.length=this._dataProvider.get_length())),this.gridViewPort.set_layout(this.get_layout()),
this._previousLayout=this.get_layout();this.gridViewPort.refreshChildren=m(this,this.refreshRowRenderers);for(b=this._invalidationFlags.keys();b.hasNext();)f=b.next(),this.gridViewPort.setInvalid(f);this._allInvalid&&this.gridViewPort.setInvalid();ob.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){ob.prototype.createScroller.call(this);
this.gridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=
!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.gridViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.gridViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=
d;c.getVisibleIndices(this._rowLayoutItems.length,this.gridViewPort.get_visibleWidth(),this.gridViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._rowLayoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},calculateViewPortOffsets:function(a,b){var c=this.topViewPortOffset,d=this.rightViewPortOffset,f=this.bottomViewPortOffset,g=this.leftViewPortOffset;this.get_fixedScrollBars()&&
this.get_showScrollBars()&&ob.prototype.calculateViewPortOffsets.call(this,a,b);if(this._headerContainer!=null){var h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h;
this.topViewPortOffset=c;this.rightViewPortOffset=d;this.bottomViewPortOffset=f;this.leftViewPortOffset=g;this._headerContainer.validateNow();this.topViewPortOffset+=this._headerContainer.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._headerContainer.get_width());this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._headerContainer.get_width());ob.prototype.calculateViewPortOffsets.call(this,a,b);h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=
!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h}},validateColumns:function(){var a=this;if(this._columns==null){var b=null;if(this._dataProvider!=null&&this._dataProvider.get_length()>0){var c=this._dataProvider.get(0);c=A.fields(c);
for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,l=[c[h]];d[h]=new em(l[0],function(k){return function(q){return L.string(A.getProperty(q,k[0]))}}(l))}b=new mg(d)}else b=new mg;this.runWithInvalidationFlagsOnly(function(){a.set_columns(b)});this._autoPopulatedColumns=b}},layoutHeaders:function(){if(this._headerContainer!=null){this._headerContainer.set_x(this.get_paddingLeft());this._headerContainer.set_y(this.get_paddingTop());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();
this._headerContainer.set_width(Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a));this._headerContainer.validateNow();if(ff.fuzzyEquals(this.get_maxScrollX(),this.get_minScrollX()))this._headerContainer.set_scrollRect(null);else{var b=this._scrollRect1;this._currentScrollRect==b&&(b=this._scrollRect2);this._currentScrollRect=b;a<0&&(a=0);var c=this._headerContainer.get_height();c<0&&(c=0);b.setTo(this.get_scrollX()-
this.get_minScrollX(),0,a,c);this._headerContainer.set_scrollRect(b)}this._currentHeaderCornerSkin!=null&&(this.get_fixedScrollBars()&&!this.get_extendedScrollBarY()&&this.scrollBarY!=null&&this.scrollBarY.get_visible()?(this._currentHeaderCornerSkin.set_x(this.scrollBarY.get_x()),this._currentHeaderCornerSkin.set_width(this.scrollBarY.get_width()),this._currentHeaderCornerSkin.set_y(this._headerContainer.get_y()),this._currentHeaderCornerSkin.set_height(this._headerContainer.get_height()),this._currentHeaderCornerSkin.set_visible(!0)):
this._currentHeaderCornerSkin.set_visible(!1))}},layoutHeaderDividers:function(){this._headerResizeContainer.set_x(this._headerContainer.get_x());this._headerResizeContainer.set_y(this._headerContainer.get_y());for(var a=0,b=this._headerDividerLayoutItems.length;a<b;){var c=a++,d=this._headerDividerLayoutItems[c];d.set_visible(!this.get_showHeaderDividersOnlyWhenResizable()||this.get_resizableColumns());u.__implements(d,oa)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-
d.get_width()/2);d.set_y(c.get_y());d.set_height(c.get_height())}},layoutColumnDividers:function(){this._columnDividerContainer.set_x(this._viewPort.get_x());this._columnDividerContainer.set_y(this._viewPort.get_y());for(var a=0,b=this._columnDividerLayoutItems.length;a<b;){var c=a++,d=this._columnDividerLayoutItems[c];u.__implements(d,oa)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(this._viewPort.get_visibleHeight())}},
layoutScrollBars:function(){if(this.get_extendedScrollBarY()){var a=this.topViewPortOffset;this.topViewPortOffset=0;ob.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else ob.prototype.layoutScrollBars.call(this)},refreshHeaderCornerSkin:function(){var a=this._currentHeaderCornerSkin;this._currentHeaderCornerSkin=this.getCurrentHeaderCornerSkin();this._currentHeaderCornerSkin!=a&&(this.removeCurrentHeaderCornerSkin(a),this.addCurrentHeaderCornerSkin(this._currentHeaderCornerSkin))},
getCurrentHeaderCornerSkin:function(){return this.get_headerCornerSkin()},addCurrentHeaderCornerSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshColumnResizeSkin:function(){var a=this._currentColumnResizeSkin;this._currentColumnResizeSkin=this.getCurrentColumnResizeSkin();this._currentColumnResizeSkin!=
a&&(this.removeCurrentColumnResizeSkin(a),this._currentColumnResizeSkin!=null&&(u.__implements(this._currentColumnResizeSkin,jb)&&this._currentColumnResizeSkin.initializeNow(),u.__implements(this._currentColumnResizeSkin,wb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),this._currentColumnResizeSkin instanceof Da&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof lb&&(this._currentColumnResizeSkin.mouseChildren=
!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshHeaderRenderers:function(){var a=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this._headerContainerLayout.set_columns(this._columns);this._ignoreHeaderLayoutChanges=a;this._defaultHeaderStorage.headerRendererRecycler.update==
null&&(this._defaultHeaderStorage.headerRendererRecycler.update=nc.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=nc.defaultResetHeaderRenderer));a=this.isInvalid(nc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>
0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(nc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=
this.isInvalid(nc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive column dividers should be empty after updating.");},refreshInactiveHeaderDividers:function(a){var b=this._defaultHeaderDividerStorage.inactiveHeaderDividers;this._defaultHeaderDividerStorage.inactiveHeaderDividers=
this._defaultHeaderDividerStorage.activeHeaderDividers;this._defaultHeaderDividerStorage.activeHeaderDividers=b;if(this._defaultHeaderDividerStorage.activeHeaderDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active header dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultHeaderDividerStorage.oldHeaderDividerFactory=null)},freeInactiveHeaderDividers:function(){for(var a=this._defaultHeaderDividerStorage.oldHeaderDividerFactory!=null?
this._defaultHeaderDividerStorage.oldHeaderDividerFactory:this._defaultHeaderDividerStorage.headerDividerFactory,b=0,c=this._defaultHeaderDividerStorage.inactiveHeaderDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderDivider(d,a)}this._defaultHeaderDividerStorage.inactiveHeaderDividers.length=0},refreshActiveHeaderDividers:function(){this._headerDividerLayoutItems.length=0;if(this._defaultHeaderDividerStorage.headerDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=
a++,d=this._columns.get(c);d=this.createHeaderDivider(d,c);this._headerDividerLayoutItems[c]=d;this._defaultHeaderDividerStorage.activeHeaderDividers.push(d)}},createHeaderDivider:function(a,b){if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length==0){a=this._defaultHeaderDividerStorage.headerDividerFactory.create();if(u.__implements(a,If)){var c=a;if(c.get_variant()==null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():nc.CHILD_VARIANT_HEADER_DIVIDER;
c.set_variant(d)}}u.__implements(a,jb)&&a.initializeNow();a.addEventListener("rollOver",m(this,this.gridView_headerDivider_rollOverHandler));a.addEventListener("rollOut",m(this,this.gridView_headerDivider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.gridView_headerDivider_mouseDownHandler));a.addEventListener("touchBegin",m(this,this.gridView_headerDivider_touchBeginHandler));this._headerResizeContainer.addChildAt(a,b)}else a=this._defaultHeaderDividerStorage.inactiveHeaderDividers.shift(),
this._headerResizeContainer.setChildIndex(a,b);return a},destroyHeaderDivider:function(a,b){a.removeEventListener("rollOver",m(this,this.gridView_headerDivider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.gridView_headerDivider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.gridView_headerDivider_mouseDownHandler));a.removeEventListener("touchBegin",m(this,this.gridView_headerDivider_touchBeginHandler));this._headerResizeContainer.removeChild(a);b!=null&&b.destroy!=
null&&b.destroy(a)},refreshInactiveColumnDividers:function(a){var b=this._defaultColumnDividerStorage.inactiveColumnDividers;this._defaultColumnDividerStorage.inactiveColumnDividers=this._defaultColumnDividerStorage.activeColumnDividers;this._defaultColumnDividerStorage.activeColumnDividers=b;if(this._defaultColumnDividerStorage.activeColumnDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active column dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),
this._defaultColumnDividerStorage.oldColumnDividerFactory=null)},freeInactiveColumnDividers:function(){for(var a=this._defaultColumnDividerStorage.oldColumnDividerFactory!=null?this._defaultColumnDividerStorage.oldColumnDividerFactory:this._defaultColumnDividerStorage.columnDividerFactory,b=0,c=this._defaultColumnDividerStorage.inactiveColumnDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyColumnDivider(d,a)}this._defaultColumnDividerStorage.inactiveColumnDividers.length=0},refreshActiveColumnDividers:function(){this._columnDividerLayoutItems.length=
0;if(this._defaultColumnDividerStorage.columnDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createColumnDivider(d,c);this._columnDividerLayoutItems[c]=d;this._defaultColumnDividerStorage.activeColumnDividers.push(d)}},createColumnDivider:function(a,b){if(this._defaultColumnDividerStorage.inactiveColumnDividers.length==0){a=this._defaultColumnDividerStorage.columnDividerFactory.create();if(u.__implements(a,If)){var c=a;if(c.get_variant()==
null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():nc.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}u.__implements(a,jb)&&a.initializeNow();this._columnDividerContainer.addChildAt(a,b)}else a=this._defaultColumnDividerStorage.inactiveColumnDividers.shift(),this._columnDividerContainer.setChildIndex(a,b);return a},destroyColumnDivider:function(a,b){this._columnDividerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveHeaderRenderers:function(a){var b=
this._defaultHeaderStorage.inactiveHeaderRenderers;this._defaultHeaderStorage.inactiveHeaderRenderers=this._defaultHeaderStorage.activeHeaderRenderers;this._defaultHeaderStorage.activeHeaderRenderers=b;if(this._defaultHeaderStorage.activeHeaderRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active header renderers should be empty before updating.");a&&(this.recoverInactiveHeaderRenderers(),this.freeInactiveHeaderRenderers(),this._defaultHeaderStorage.oldHeaderRendererRecycler=
null)},recoverInactiveHeaderRenderers:function(){for(var a=0,b=this._defaultHeaderStorage.inactiveHeaderRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.headerRendererToHeaderState.h[c.__id__];if(d!=null){var f=d.column;this.headerRendererToHeaderState.remove(c);this.dataToHeaderRenderer.remove(f);c.removeEventListener("trigger",m(this,this.gridView_headerRenderer_triggerHandler));c.removeEventListener("click",m(this,this.gridView_headerRenderer_clickHandler));c.removeEventListener("touchTap",
m(this,this.gridView_headerRenderer_touchTapHandler));c.removeEventListener("resize",m(this,this.gridView_headerRenderer_resizeHandler));this.resetHeaderRenderer(c,d);this._defaultHeaderStorage.measurements!=null&&this._defaultHeaderStorage.measurements.restore(c);this.headerStatePool.release(d)}}}},freeInactiveHeaderRenderers:function(){for(var a=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler,
b=0,c=this._defaultHeaderStorage.inactiveHeaderRenderers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderRenderer(d,a)}this._defaultHeaderStorage.inactiveHeaderRenderers.length=0},findUnrenderedHeaderData:function(){this._rowLayoutItems.length=0;if(this._columns!=null&&this._columns.get_length()!=0){this._rowLayoutItems.length=this._columns.get_length();for(var a=0,b=this._columns.get_length();a<b;){var c=a++,d=this._columns.get(c),f=this.dataToHeaderRenderer.h[d.__id__];if(f!=null){var g=
this.headerRendererToHeaderState.h[f.__id__];this.populateCurrentHeaderState(d,c,g,this._forceItemStateUpdate)&&this.updateHeaderRenderer(f,g);f.set_visible(!0);this._headerLayoutItems[c]=f;if(!X.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=u.getClass(this),new fb(""+a.__name__+": header renderer map contains bad data for column at index "+c+". This may be caused by duplicate columns, which is not allowed.");this._defaultHeaderStorage.activeHeaderRenderers.push(f)}else this._unrenderedHeaderData.push(d)}}},
renderUnrenderedHeaderData:function(){for(var a=0,b=this._unrenderedHeaderData;a<b.length;){var c=b[a];++a;var d=this._columns.indexOf(c),f=this.headerStatePool.get();this.populateCurrentHeaderState(c,d,f,!0);c=this.createHeaderRenderer(f);c.set_visible(!0);this._headerContainer.addChildAt(c,d);this._headerLayoutItems[d]=c}this._unrenderedHeaderData.length=0},refreshRowRenderers:function(a){this._rowLayoutItems=a;a=this.gridViewPort.isInvalid(nc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);
this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive row renderers should be empty after updating.");},refreshInactiveRowRenderers:function(a){var b=this.inactiveRowRenderers;this.inactiveRowRenderers=this.activeRowRenderers;this.activeRowRenderers=b;if(this.activeRowRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active row renderers should be empty before updating.");
a&&(this.recoverInactiveRowRenderers(),this.freeInactiveRowRenderers(),this._oldRowRendererFactory=null)},recoverInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.rowRendererToRowState.h[c.__id__];if(d!=null){var f=d.data;this.rowRendererToRowState.remove(c);this.dataToRowRenderer.remove(f);c.removeEventListener("cellTrigger",m(this,this.gridView_rowRenderer_cellTriggerHandler));c.removeEventListener("trigger",m(this,this.gridView_rowRenderer_triggerHandler));
c.removeEventListener("mouseDown",m(this,this.gridView_rowRenderer_mouseDownHandler));this.resetRowRenderer(c,d);this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c);this.rowStatePool.release(d)}}}},freeInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;c!=null&&this.destroyRowRenderer(c)}this.inactiveRowRenderers.length=0},findUnrenderedData:function(){this._rowLayoutItems.length=0;this._visibleIndices.start=0;this._visibleIndices.end=
0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._rowLayoutItems.length=this._dataProvider.get_length();if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._dataProvider.get_length(),this.gridViewPort.get_visibleWidth(),
this.gridViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,a=this._dataProvider.get_length(),this._visibleIndices.end=a-1;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){b=this._visibleIndices.start;for(var c=this._visibleIndices.end+1;b<c;){a=b++;var d=this._dataProvider.get(a),f=this.dataToRowRenderer.h[d.__id__];if(f!=null){var g=this.rowRendererToRowState.h[f.__id__];this.populateCurrentRowState(d,a,g,this._forceItemStateUpdate)&&this.updateRowRenderer(f,
g);this._rowLayoutItems[a]=f;if(!X.remove(this.inactiveRowRenderers,f))throw b=u.getClass(this),new fb(""+b.__name__+": row renderer map contains bad data for item at index "+a+". This may be caused by duplicate items in the data provider, which is not allowed.");this.activeRowRenderers.push(f)}else this._unrenderedData.push(d)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._dataProvider.indexOf(c),f=this.rowStatePool.get();this.populateCurrentRowState(c,
d,f,!0);c=this.createRowRenderer(f);c.set_visible(!0);this.activeRowRenderers.push(c);this.gridViewPort.addChild(c);this._rowLayoutItems[d]=c}this._unrenderedData.length=0},createRowRenderer:function(a){if(this.inactiveRowRenderers.length==0){var b=this._rowRendererFactory.create();this._rowRendererMeasurements==null&&(this._rowRendererMeasurements=new Ib(b));b.initializeNow()}else b=this.inactiveRowRenderers.shift();this.updateRowRenderer(b,a);b.set_gridView(this);b.addEventListener("cellTrigger",
m(this,this.gridView_rowRenderer_cellTriggerHandler));b.addEventListener("trigger",m(this,this.gridView_rowRenderer_triggerHandler));b.addEventListener("mouseDown",m(this,this.gridView_rowRenderer_mouseDownHandler));this.rowRendererToRowState.set(b,a);this.dataToRowRenderer.set(a.data,b);return b},destroyRowRenderer:function(a){var b=this._oldRowRendererFactory!=null?this._oldRowRendererFactory:this._rowRendererFactory;a.set_gridView(null);this.gridViewPort.removeChild(a);b.destroy!=null&&b.destroy(a)},
updateRowRenderer:function(a,b){this.refreshRowRendererProperties(a,b)},resetRowRenderer:function(a,b){this.refreshRowRendererProperties(a,nc.RESET_ROW_STATE)},populateCurrentRowState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.rowIndex!=b)c.rowIndex=b,f=!0;a=this._selectedIndices.indexOf(b)!=-1;if(d||c.selected!=a)c.selected=a,f=!0;a=this._enabled;if(d||c.enabled!=a)c.enabled=a,f=!0;a=this._columns;if(d||c.columns!=a)c.columns=a,f=!0;a=this._cellRendererRecycler;
if(d||c.cellRendererRecycler!=a)c.cellRendererRecycler=a,f=!0;a=this._customColumnWidths;if(d||c.customColumnWidths!=a)c.customColumnWidths=a,f=!0;a=this.get_customCellRendererVariant();if(d||c.customCellRendererVariant!=a)c.customCellRendererVariant=a,f=!0;a=this._forceItemStateUpdate;if(d||c.forceItemStateUpdate!=a)c.forceItemStateUpdate=a,f=!0;return f},refreshRowRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;a.set_data(b.data);a.set_rowIndex(b.rowIndex);
a.set_selected(b.selected);a.set_enabled(b.enabled);a.set_columns(b.columns);a.set_cellRendererRecycler(b.cellRendererRecycler);a.set_customColumnWidths(b.customColumnWidths);a.set_customCellRendererVariant(b.customCellRendererVariant);a.set_forceCellStateUpdate(b.forceItemStateUpdate);this._ignoreSelectionChange=c},createHeaderRenderer:function(a){if(this._defaultHeaderStorage.inactiveHeaderRenderers.length==0){var b=this._defaultHeaderStorage.headerRendererRecycler.create();if(u.__implements(b,
If)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():nc.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}u.__implements(b,jb)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Ib(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);u.__implements(b,Fh)?b.addEventListener("trigger",m(this,this.gridView_headerRenderer_triggerHandler)):
(b.addEventListener("click",m(this,this.gridView_headerRenderer_clickHandler)),b.addEventListener("touchTap",m(this,this.gridView_headerRenderer_touchTapHandler)));u.__implements(b,Kb)&&b.addEventListener("resize",m(this,this.gridView_headerRenderer_resizeHandler));this.headerRendererToHeaderState.set(b,a);this.dataToHeaderRenderer.set(a.column,b);this._defaultHeaderStorage.activeHeaderRenderers.push(b);return b},destroyHeaderRenderer:function(a,b){this._headerContainer.removeChild(a);b!=null&&b.destroy!=
null&&b.destroy(a)},populateCurrentHeaderState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;b=a.headerText;if(d||c.text!=b)c.text=b,f=!0;b=this._enabled;if(d||c.enabled!=b)c.enabled=b,f=!0;a=a==this._sortedColumn?this._sortOrder:rh.NONE;if(d||c.sortOrder!=a)c.sortOrder=a,f=!0;return f},updateHeaderRenderer:function(a,b){this._defaultHeaderStorage.headerRendererRecycler.update!=null&&this._defaultHeaderStorage.headerRendererRecycler.update(a,
b);this.refreshHeaderRendererProperties(a,b)},resetHeaderRenderer:function(a,b){var c=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this.refreshHeaderRendererProperties(a,nc.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,Co)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),
a.set_gridViewOwner(b.owner));u.__implements(a,Do)&&a.set_sortOrder(b.sortOrder);u.__implements(a,ji)&&a.set_layoutIndex(b.columnIndex)},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;if(u.__implements(this.get_layout(),wj)){if(a.keyCode!=38&&a.keyCode!=
40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;b=this.get_layout().findNextKeyboardIndex(b,a,!1,this._rowLayoutItems,null,this.gridViewPort.get_visibleWidth(),this.gridViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);var c=this._selectedIndex!=b;if(!c&&b!=-1){var d=this.dataToRowRenderer,f=this._dataProvider.get(b);d.h[f.__id__]==null?c=!0:u.__implements(this.get_layout(),Oe)&&(d=this.get_layout().getNearestScrollPositionForIndex(b,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)&&(c=!0)}c&&(a.preventDefault(),this.set_selectedIndex(b),this._selectedIndex!=-1&&
this.scrollToRowIndex(this._selectedIndex),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handleSelectionChange:function(a,b,c,d){if(b!=-1&&this._selectable){var f=this._selectedItems.indexOf(a);if(this._allowMultipleSelection&&(c||d))if(d){a=this._selectionAnchorIndex;a==-1&&(a=0);f=[];if(b==a)f.unshift(a);else{c=a;do f.unshift(c),c+=a>b?-1:1;while(c!=b);b!=a&&f.unshift(b)}this.set_selectedIndices(f);this._selectionAnchorIndex=a}else f==
-1?(c=this._selectedItems.slice(),c.unshift(a)):(c=this._selectedItems.slice(),c.splice(f,1)),this.set_selectedItems(c),this._selectionAnchorIndex=b;else this.set_selectedItem(a);b!=-1&&this.scrollToRowIndex(b)}else this.set_selectedItem(null)},handlePendingScroll:function(){if(this._pendingScrollRowIndex!=-1){var a=this._pendingScrollRowIndex,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollRowIndex=-1;this._pendingScrollDuration=null;if(this._dataProvider!=null&&
this._dataProvider.get_length()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(u.__implements(this.get_layout(),Oe))d=this.get_layout().getNearestScrollPositionForIndex(a,this._dataProvider.get_length(),this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=this.dataToRowRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-
this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},refreshDragDropIndexIndicator:function(){if(this.get_dragDropIndicatorSkin()!=null&&u.__implements(this.get_layout(),Wi)){u.__implements(this.get_dragDropIndicatorSkin(),jb)&&this.get_dragDropIndicatorSkin().initializeNow();this._dragDropIndicatorSkinMeasurements==null?this._dragDropIndicatorSkinMeasurements=new Ib(this.get_dragDropIndicatorSkin()):
this._dragDropIndicatorSkinMeasurements.save(this.get_dragDropIndicatorSkin());var a=this.get_scrollX()+this._dragDropLocalX-this.leftViewPortOffset,b=this.get_scrollY()+this._dragDropLocalY-this.topViewPortOffset,c=this.get_layout(),d=c.getDragDropIndex(this._rowLayoutItems,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());a=c.getDragDropRegion(this._rowLayoutItems,d,a,b,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight());this.get_dragDropIndicatorSkin().set_x(a.x-
this.get_scrollX()+this.leftViewPortOffset);this.get_dragDropIndicatorSkin().set_y(a.y-this.get_scrollY()+this.topViewPortOffset);a.width==0?this.get_dragDropIndicatorSkin().set_height(a.height):this.get_dragDropIndicatorSkin().set_width(a.width);this.addChild(this.get_dragDropIndicatorSkin())}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):
ob.prototype.baseScrollContainer_keyDownHandler.call(this,a)},gridView_rowRenderer_triggerHandler:function(a){var b=u.__cast(a.currentTarget,Rf);b=this.rowRendererToRowState.h[b.__id__];this.handleSelectionChange(b.data,b.rowIndex,a.ctrlKey,a.shiftKey)},gridView_rowRenderer_cellTriggerHandler:function(a){this.dispatchEvent(a.clone())},gridView_rowRenderer_mouseDownHandler:function(a){if(this._enabled&&this._dragEnabled&&this.stage!=null){a=u.__cast(a.currentTarget,Rf);var b=this.rowRendererToRowState.h[a.__id__];
b!=null&&(this._dragRowRenderer=a,this._dragItem=b.data,this._dragRowIndex=b.rowIndex,this._dragDropLocalX=this.get_mouseX(),this._dragDropLocalY=this.get_mouseY(),this._dragMinDistance=6,this.stage.addEventListener("mouseMove",m(this,this.gridView_stage_pressAndMove_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler),!1,0,!0))}},gridView_stage_pressAndMove_mouseMoveHandler:function(a){var b=this.get_mouseX()-this._dragDropLocalX,
c=this.get_mouseY()-this._dragDropLocalY;if(b>this._dragMinDistance||c>this._dragMinDistance){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.gridView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler));a=[];b=this._allowMultipleSelection?this._selectedIndices.slice():[];b.indexOf(this._dragRowIndex)==-1&&b.push(this._dragRowIndex);b.sort(function(f,g){return f<g?-1:f>g?1:0});for(c=0;c<b.length;){var d=
b[c];++c;a.push(this._dataProvider.get(d))}b=new Nq;b.set(this._dragFormat,a);a=this.rowRendererToRowState.h[this._dragRowRenderer.__id__];c=this._rowRendererFactory.create();this.updateRowRenderer(c,a);c.set_width(this._dragRowRenderer.get_width());c.set_height(this._dragRowRenderer.get_height());Va.startDrag(this,b,c,-this._dragRowRenderer.get_mouseX(),-this._dragRowRenderer.get_mouseY())}},gridView_stage_pressAndMove_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",
m(this,this.gridView_stage_pressAndMove_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.gridView_stage_pressAndMove_mouseUpHandler));this._dragItem=null;this._dragRowIndex=-1;this._dragRowRenderer=null},gridView_dataProvider_changeHandler:function(a){this._ignoreDataProviderChanges||this.setInvalid(x.DATA)},gridView_dataProvider_addItemHandler:function(a){this._virtualCache!=null&&this._virtualCache.splice(a.index,0,null);if(this._selectedIndex!=-1){for(var b=!1,c=0,d=this._selectedIndices.length;c<
d;){var f=c++,g=this._selectedIndices[f];g>=a.index&&(this._selectedIndices[f]=g+1,b=!0)}b&&(this._selectedIndex=this._selectedIndices[0],W.dispatch(this,"change"))}},gridView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&X.remove(this._virtualCache,a.index);if(this._selectedIndex!=-1){for(var b=!1,c=this._selectedIndices.length-1;c>=0;){var d=this._selectedIndices[c];d==a.index?(this._selectedIndices.splice(c,1),this._selectedItems.splice(c,1),b=!0):d>a.index&&(this._selectedIndices[c]=
d-1,b=!0);--c}b&&(this._selectedIndices.length>0?(this._selectedIndex=this._selectedIndices[0],this._selectedItem=this._dataProvider.get(this._selectedIndex)):(this._selectedIndex=-1,this._selectedItem=null),W.dispatch(this,"change"))}},gridView_dataProvider_replaceItemHandler:function(a){this._virtualCache!=null&&(this._virtualCache[a.index]=null);if(this._selectedIndex!=-1)for(var b=0,c=this._selectedIndices.length;b<c;){var d=b++,f=this._selectedIndices[d];if(f==a.index){this._selectedItems[d]=
this._dataProvider.get(f);this._selectedItem=this._selectedItems[0];W.dispatch(this,"change");break}}},gridView_dataProvider_removeAllHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0);this.set_selectedIndex(-1)},gridView_dataProvider_resetHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.set_selectedIndex(-1)},gridView_dataProvider_sortChangeHandler:function(a){this._virtualCache!=null&&
(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},gridView_dataProvider_filterChangeHandler:function(a){this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._dataProvider.get_length());this.refreshSelectedIndicesAfterFilterOrSort()},updateRowRendererForIndex:function(a){this._virtualCache!=null&&(this._virtualCache[a]=null);var b=this._dataProvider.get(a),c=this.dataToRowRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.rowRendererToRowState.h[c.__id__];d.owner!=null&&(c.updateCells(),this.populateCurrentRowState(b,a,d,!0),this.resetRowRenderer(c,d),this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c),d.owner=null,this.setInvalid(x.DATA))}},validateCustomColumnWidths:function(){if(!(this._customColumnWidths==null||this._customColumnWidths.length<this._columns.get_length())){this._customColumnWidths.length>this._columns.get_length()&&(this._customColumnWidths.length=
this._columns.get_length());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a)-this._headerContainerLayout.get_paddingLeft()-this._headerContainerLayout.get_paddingRight();for(var b=0,c=[],d=0,f=this._customColumnWidths.length;d<f;){var g=d++,h=this._columns.get(g);h.width!=null?a-=h.width:(b+=this._customColumnWidths[g],c.push(g))}b!=a&&(this._customColumnWidths=
this._customColumnWidths.slice(),this.distributeWidthToIndices(a-b,c,b),this.setInvalid(x.LAYOUT))}},calculateResizedColumnWidth:function(a){var b=this._columns.get_length();this._customColumnWidths=this._customColumnWidths==null?[]:this._customColumnWidths.slice();this._customColumnWidths.length=b;var c=this._columns.get(this._resizingHeaderIndex);c.width=null;var d=this.dataToHeaderRenderer.h[c.__id__];c=this._columns.get(this._resizingHeaderIndex);var f=this._headerContainer.get_x()+d.get_x()+
c.minWidth,g=this.actualWidth-this.rightViewPortOffset,h=this._headerContainer.get_x()+d.get_x()+d.get_width(),l=Math.min(Math.max(h+a,f),g)-d.get_x()-this._headerContainer.get_x();h=0;a=d.get_width();f=0;g=[];for(var k=0;k<b;){var q=k++;d=this._columns.get(q);q!=this._resizingHeaderIndex&&(q<this._resizingHeaderIndex?(d=this.dataToHeaderRenderer.h[d.__id__],this._customColumnWidths[q]=d.get_width(),h+=d.get_width()):d.width!=null?h+=d.width:(h+=d.minWidth,d=this.dataToHeaderRenderer.h[d.__id__],
d=d.get_width(),f+=d,this._customColumnWidths[q]=d,g[g.length]=q))}g.length==0&&(b=this._resizingHeaderIndex+1,g[0]=b,c=this._columns.get(b),f=c.width,h=h-f+c.minWidth,this._customColumnWidths[b]=f,c.width=null);b=l;d=this._headerContainer.get_width()-h;b>d&&(b=d);b<c.minWidth&&(b=c.minWidth);this._customColumnWidths[this._resizingHeaderIndex]=b;this.distributeWidthToIndices(a-b,g,f);this.setInvalid(x.LAYOUT)},distributeWidthToIndices:function(a,b,c){for(;Math.abs(a)>1;){for(var d=a,f=b.length-1;f>=
0;){var g=b[f],h=this._columns.get(g),l=this.dataToHeaderRenderer.h[h.__id__].get_width(),k=l/c*a,q=this._customColumnWidths[g]+k;q<h.minWidth&&(k+=h.minWidth-q,q=h.minWidth,b.splice(f,1),c-=l);this._customColumnWidths[g]=q;d-=k;--f}a=d}a!=0&&(this._customColumnWidths[this._customColumnWidths.length-1]+=a)},layoutColumnResizeSkin:function(a){if(this._currentColumnResizeSkin!=null){var b=this._columns.get(this._resizingHeaderIndex),c=this.dataToHeaderRenderer.h[b.__id__];b=this._headerContainer.get_x()+
c.get_x()+b.minWidth;var d=this.actualWidth-this.rightViewPortOffset;c=this._headerContainer.get_x()+c.get_x()+c.get_width();a=Math.min(Math.max(c+a,b),d)-this._currentColumnResizeSkin.get_width()/2;this._currentColumnResizeSkin.set_visible(!0);this._currentColumnResizeSkin.set_x(a);this._currentColumnResizeSkin.set_y(this.get_paddingTop());this._currentColumnResizeSkin.set_height(this.actualHeight-this.get_paddingTop()-this.bottomViewPortOffset);this.setChildIndex(this._currentColumnResizeSkin,this.get_numChildren()-
1)}},headerResizeTouchBegin:function(a,b,c,d){if(this._enabled&&this._resizableColumns&&this._resizingHeaderIndex==-1&&this.stage!=null){var f=Ad.forStage(this.stage);if(b?f.claimMouse(c):f.claimTouch(a,c))this._resizingHeaderTouchPointID=a,this._resizingHeaderTouchPointIsMouse=b,this._resizingHeaderIndex=this._headerDividerLayoutItems.indexOf(c),this._resizingHeaderStartStageX=d,this.layoutColumnResizeSkin(0),b?(this.stage.addEventListener("mouseMove",m(this,this.gridView_headerDivider_stage_mouseMoveHandler),
!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.gridView_headerDivider_stage_mouseUpHandler),!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.gridView_headerDivider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.gridView_headerDivider_stage_touchEndHandler),!1,0,!0))}},headerResizeTouchMove:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(a=c-this._resizingHeaderStartStageX,
a*=Qg.getConcatenatedScaleX(this),this.layoutColumnResizeSkin(a))},headerResizeTouchEnd:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.gridView_headerDivider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.gridView_headerDivider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.gridView_headerDivider_stage_touchMoveHandler)),
this.stage.removeEventListener("touchEnd",m(this,this.gridView_headerDivider_stage_touchEndHandler))),this._currentColumnResizeSkin!=null&&this._currentColumnResizeSkin.set_visible(!1),a=c-this._resizingHeaderStartStageX,a*=Qg.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(Id.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=
null))},reverseSortCompareFunction:function(a,b){return-this.sortCompareFunction(a,b)},sortCompareFunction:function(a,b){return this._sortedColumn.sortCompareFunction==null?(a=this._sortedColumn.itemToText(a),b=this._sortedColumn.itemToText(b),nc.defaultSortCompareFunction(a,b)):this._sortedColumn.sortCompareFunction(a,b)},refreshSortedColumn:function(a){if(this._dataProvider!=null){var b=this._ignoreDataProviderChanges;this._ignoreDataProviderChanges=!0;this._sortOrder==rh.ASCENDING?this._dataProvider.set_sortCompareFunction(m(this,
this.sortCompareFunction)):this._sortOrder==rh.DESCENDING?this._dataProvider.set_sortCompareFunction(m(this,this.reverseSortCompareFunction)):(this._dataProvider.get_sortCompareFunction()==m(this,this.sortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.sortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.reverseSortCompareFunction)||this._dataProvider.get_sortCompareFunction()==m(this,this.reverseSortCompareFunction))&&this._dataProvider.set_sortCompareFunction(null);
a&&this._dataProvider.refresh();this._ignoreDataProviderChanges=b}},updateSortedColumn:function(a){this._sortableColumns&&a.defaultSortOrder!=rh.NONE&&(this._sortedColumn!=a?this.set_sortedColumn(a):this.set_sortOrder(this._sortOrder==rh.ASCENDING?rh.DESCENDING:rh.ASCENDING))},gridView_dataProvider_updateItemHandler:function(a){this.updateRowRendererForIndex(a.index)},gridView_dataProvider_updateAllHandler:function(a){a=0;for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateRowRendererForIndex(c)}},
gridView_columns_addItemHandler:function(a){if(this._customColumnWidths!=null){var b=u.__cast(a.addedItem,em);a=a.index;if(!(b.width!=null||a>this._customColumnWidths.length)){this._customColumnWidths.splice(a,0,0);this.get_paddingLeft();this.get_paddingRight();this._viewPort.get_width();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();for(var c=0,d=[],f=0,g=this._customColumnWidths.length;f<
g;){var h=f++;h!=a&&(b=this._columns.get(h),b.width==null&&(c+=this._customColumnWidths[h],d.push(h)))}b=c/(d.length+1);this._customColumnWidths[a]=b;this._customColumnWidths=this._customColumnWidths.slice();this.distributeWidthToIndices(-b,d,c);this.setInvalid(x.LAYOUT)}}},gridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=u.__cast(a.removedItem,em);a=a.index;b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(x.LAYOUT))}},
gridView_columns_changeHandler:function(a){this.setInvalid(x.DATA)},gridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=u.__cast(a.currentTarget,ea),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),tf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,ea),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),tf.dispatchForHeader(this,
"headerTrigger",a))},gridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,ea),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),tf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},gridView_headerDivider_mouseDownHandler:function(a){a=u.__cast(a.currentTarget,Da);this.headerResizeTouchBegin(nc.POINTER_ID_MOUSE,!0,a,a.stage.get_mouseX())},
gridView_headerDivider_stage_mouseMoveHandler:function(a){a=u.__cast(a.currentTarget,cd);this.headerResizeTouchMove(nc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);this.headerResizeTouchEnd(nc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=u.__cast(a.currentTarget,Da);this.headerResizeTouchBegin(a.touchPointID,!1,b,b.stage.get_mouseX())}},gridView_headerDivider_stage_touchMoveHandler:function(a){var b=
u.__cast(a.currentTarget,cd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_stage_touchEndHandler:function(a){var b=u.__cast(a.currentTarget,cd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&Id.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=Id.get_cursor(),Id.set_cursor(Vg.fromLimeCursor($c.RESIZE_WE)))},gridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&
this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(Id.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null)},gridView_dragCompleteHandler:function(a){if(a.dropped)if(this._droppedOnSelf)this._droppedOnSelf=!1;else if(this._removeOnDragDropComplete){a=u.__cast(a.dragData.get(this._dragFormat),Array);for(var b=0;b<a.length;){var c=a[b];++b;this._dataProvider.remove(c)}}},gridView_dragEnterHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&
(a.acceptDrag(this),this.showFocus(!0),this._dragDropLocalX=a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator(),this._dragDropLastUpdateTime=Oa.getTimer(),this.addEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler)))},gridView_dragExitHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.get_dragDropIndicatorSkin().parent==this&&this.removeChild(this.get_dragDropIndicatorSkin()));
this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler))},gridView_dragScroll_enterFrameHandler:function(a){a=Oa.getTimer();var b=a-this._dragDropLastUpdateTime;this._dragDropLastUpdateTime=a;a=this._dragDropLocalX-this.leftViewPortOffset;var c=this._dragDropLocalY-this.topViewPortOffset;b/=2;this.get_maxScrollY()>this.get_minScrollY()&&(b=this.get_scrollY()<this.get_maxScrollY()&&c>this._viewPort.get_visibleHeight()-
this.edgeAutoScrollDistance?b*(1-(this._viewPort.get_visibleHeight()-c)/this.edgeAutoScrollDistance):this.get_scrollY()>this.get_minScrollY()&&c<this.edgeAutoScrollDistance?b*-(1-c/this.edgeAutoScrollDistance):0,b!=0&&(c=this.get_scrollY()+b,c>this.get_maxScrollY()?c=this.get_maxScrollY():c<this.get_minScrollY()&&(c=this.get_minScrollY()),this.set_scrollY(c)));this.get_maxScrollX()>this.get_minScrollX()&&(b=this.get_scrollX()<this.get_maxScrollX()&&a>this._viewPort.get_visibleWidth()-this.edgeAutoScrollDistance?
b*(1-(this._viewPort.get_visibleWidth()-a)/this.edgeAutoScrollDistance):this.get_scrollX()>this.get_minScrollX()&&a<this.edgeAutoScrollDistance?b*-(1-a/this.edgeAutoScrollDistance):0,b!=0&&(a=this.get_scrollX()+b,a>this.get_maxScrollX()?a=this.get_maxScrollX():a<this.get_minScrollX()&&(a=this.get_minScrollX()),this.set_scrollX(a)));this.refreshDragDropIndexIndicator()},gridView_dragMoveHandler:function(a){this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)&&(this._dragDropLocalX=
a.localX,this._dragDropLocalY=a.localY,this.refreshDragDropIndexIndicator())},gridView_dragDropHandler:function(a){this.get_dragDropIndicatorSkin()!=null&&this.get_dragDropIndicatorSkin().parent==this&&(this._dragDropIndicatorSkinMeasurements.restore(this.get_dragDropIndicatorSkin()),this.removeChild(this.get_dragDropIndicatorSkin()));this.showFocus(!1);this._dragDropLastUpdateTime=-1;this.removeEventListener("enterFrame",m(this,this.gridView_dragScroll_enterFrameHandler));this._droppedOnSelf=!1;
if(this._enabled&&this._dropEnabled&&a.dragData.exists(this._dragFormat)){var b=u.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(u.__implements(this.get_layout(),Wi)){c=this.get_layout();var d=this.get_scrollX()+a.localX-this.leftViewPortOffset,f=this.get_scrollY()+a.localY-this.topViewPortOffset;c=c.getDragDropIndex(this._rowLayoutItems,d,f,this._viewPort.get_visibleWidth(),this._viewPort.get_visibleHeight())}d=0;if(a.dragSource==this){for(a=0;a<b.length;)f=b[a],
++a,f=this._dataProvider.indexOf(f),f<c&&--d,this._dataProvider.removeAt(f);this._droppedOnSelf=!0}a=0;for(var g=b.length;a<g;){var h=a++;f=b[h];this._dataProvider.addAt(f,c+d+h)}}},get_styleContext:function(){return nc},__customCellRendererVariant:null,get_customCellRendererVariant:function(){return this.__customCellRendererVariant},set_customCellRendererVariant:function(a){if(!this.setStyle("customCellRendererVariant")||this.__customCellRendererVariant==a)return this.__customCellRendererVariant;
this._previousClearStyle=m(this,this.clearStyle_customCellRendererVariant);this.__customCellRendererVariant=a;this.setInvalid(x.STYLES);return this.__customCellRendererVariant},clearStyle_customCellRendererVariant:function(){this.set_customCellRendererVariant(null);return this.get_customCellRendererVariant()},__customHeaderRendererVariant:null,get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||
this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);return this.get_customHeaderRendererVariant()},__headerDividerFactory:null,get_headerDividerFactory:function(){return this.__headerDividerFactory},
set_headerDividerFactory:function(a){if(!this.setStyle("headerDividerFactory")||this.__headerDividerFactory==a)return this.__headerDividerFactory;this._previousClearStyle=m(this,this.clearStyle_headerDividerFactory);this.__headerDividerFactory=a;this.setInvalid(x.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Ec.withClass(Qb));return this.get_headerDividerFactory()},__customHeaderDividerVariant:null,get_customHeaderDividerVariant:function(){return this.__customHeaderDividerVariant},
set_customHeaderDividerVariant:function(a){if(!this.setStyle("customHeaderDividerVariant")||this.__customHeaderDividerVariant==a)return this.__customHeaderDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderDividerVariant);this.__customHeaderDividerVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderDividerVariant},clearStyle_customHeaderDividerVariant:function(){this.set_customHeaderDividerVariant(null);return this.get_customHeaderDividerVariant()},__columnDividerFactory:null,
get_columnDividerFactory:function(){return this.__columnDividerFactory},set_columnDividerFactory:function(a){if(!this.setStyle("columnDividerFactory")||this.__columnDividerFactory==a)return this.__columnDividerFactory;this._previousClearStyle=m(this,this.clearStyle_columnDividerFactory);this.__columnDividerFactory=a;this.setInvalid(x.STYLES);return this.__columnDividerFactory},clearStyle_columnDividerFactory:function(){this.set_columnDividerFactory(null);return this.get_columnDividerFactory()},__customColumnDividerVariant:null,
get_customColumnDividerVariant:function(){return this.__customColumnDividerVariant},set_customColumnDividerVariant:function(a){if(!this.setStyle("customColumnDividerVariant")||this.__customColumnDividerVariant==a)return this.__customColumnDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customColumnDividerVariant);this.__customColumnDividerVariant=a;this.setInvalid(x.STYLES);return this.__customColumnDividerVariant},clearStyle_customColumnDividerVariant:function(){this.set_customColumnDividerVariant(null);
return this.get_customColumnDividerVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__columnResizeSkin:null,get_columnResizeSkin:function(){return this.__columnResizeSkin},set_columnResizeSkin:function(a){if(!this.setStyle("columnResizeSkin")||
this.__columnResizeSkin==a)return this.__columnResizeSkin;this._previousClearStyle=m(this,this.clearStyle_columnResizeSkin);this.__columnResizeSkin=a;this.setInvalid(x.STYLES);return this.__columnResizeSkin},clearStyle_columnResizeSkin:function(){this.set_columnResizeSkin(null);return this.get_columnResizeSkin()},__headerCornerSkin:null,get_headerCornerSkin:function(){return this.__headerCornerSkin},set_headerCornerSkin:function(a){if(!this.setStyle("headerCornerSkin")||this.__headerCornerSkin==a)return this.__headerCornerSkin;
this._previousClearStyle=m(this,this.clearStyle_headerCornerSkin);this.__headerCornerSkin=a;this.setInvalid(x.STYLES);return this.__headerCornerSkin},clearStyle_headerCornerSkin:function(){this.set_headerCornerSkin(null);return this.get_headerCornerSkin()},__extendedScrollBarY:null,get_extendedScrollBarY:function(){return this.__extendedScrollBarY},set_extendedScrollBarY:function(a){if(!this.setStyle("extendedScrollBarY")||this.__extendedScrollBarY==a)return this.__extendedScrollBarY;this._previousClearStyle=
m(this,this.clearStyle_extendedScrollBarY);this.__extendedScrollBarY=a;this.setInvalid(x.STYLES);return this.__extendedScrollBarY},clearStyle_extendedScrollBarY:function(){this.set_extendedScrollBarY(!1);return this.get_extendedScrollBarY()},__showHeaderDividersOnlyWhenResizable:null,get_showHeaderDividersOnlyWhenResizable:function(){return this.__showHeaderDividersOnlyWhenResizable},set_showHeaderDividersOnlyWhenResizable:function(a){if(!this.setStyle("showHeaderDividersOnlyWhenResizable")||this.__showHeaderDividersOnlyWhenResizable==
a)return this.__showHeaderDividersOnlyWhenResizable;this._previousClearStyle=m(this,this.clearStyle_showHeaderDividersOnlyWhenResizable);this.__showHeaderDividersOnlyWhenResizable=a;this.setInvalid(x.STYLES);return this.__showHeaderDividersOnlyWhenResizable},clearStyle_showHeaderDividersOnlyWhenResizable:function(){this.set_showHeaderDividersOnlyWhenResizable(!1);return this.get_showHeaderDividersOnlyWhenResizable()},__dragDropIndicatorSkin:null,get_dragDropIndicatorSkin:function(){return this.__dragDropIndicatorSkin},
set_dragDropIndicatorSkin:function(a){if(!this.setStyle("dragDropIndicatorSkin")||this.__dragDropIndicatorSkin==a)return this.__dragDropIndicatorSkin;this._previousClearStyle=m(this,this.clearStyle_dragDropIndicatorSkin);this.__dragDropIndicatorSkin=a;this.setInvalid(x.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);return this.get_dragDropIndicatorSkin()},__class__:nc,__properties__:I(ob.prototype.__properties__,{set_removeOnDragDropComplete:"set_removeOnDragDropComplete",
get_removeOnDragDropComplete:"get_removeOnDragDropComplete",set_dropEnabled:"set_dropEnabled",get_dropEnabled:"get_dropEnabled",set_dragEnabled:"set_dragEnabled",get_dragEnabled:"get_dragEnabled",set_dragFormat:"set_dragFormat",get_dragFormat:"get_dragFormat",set_dragDropIndicatorSkin:"set_dragDropIndicatorSkin",get_dragDropIndicatorSkin:"get_dragDropIndicatorSkin",set_showHeaderDividersOnlyWhenResizable:"set_showHeaderDividersOnlyWhenResizable",get_showHeaderDividersOnlyWhenResizable:"get_showHeaderDividersOnlyWhenResizable",
set_extendedScrollBarY:"set_extendedScrollBarY",get_extendedScrollBarY:"get_extendedScrollBarY",set_selectable:"set_selectable",get_selectable:"get_selectable",set_sortedColumn:"set_sortedColumn",get_sortedColumn:"get_sortedColumn",set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder",set_headerCornerSkin:"set_headerCornerSkin",get_headerCornerSkin:"get_headerCornerSkin",set_columnResizeSkin:"set_columnResizeSkin",get_columnResizeSkin:"get_columnResizeSkin",set_resizableColumns:"set_resizableColumns",
get_resizableColumns:"get_resizableColumns",set_sortableColumns:"set_sortableColumns",get_sortableColumns:"get_sortableColumns",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_layout:"set_layout",get_layout:"get_layout",set_selectedItems:"set_selectedItems",get_selectedItems:"get_selectedItems",set_selectedIndices:"set_selectedIndices",get_selectedIndices:"get_selectedIndices",
set_allowMultipleSelection:"set_allowMultipleSelection",get_allowMultipleSelection:"get_allowMultipleSelection",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_customColumnDividerVariant:"set_customColumnDividerVariant",get_customColumnDividerVariant:"get_customColumnDividerVariant",set_columnDividerFactory:"set_columnDividerFactory",get_columnDividerFactory:"get_columnDividerFactory",
set_customHeaderDividerVariant:"set_customHeaderDividerVariant",get_customHeaderDividerVariant:"get_customHeaderDividerVariant",set_headerDividerFactory:"set_headerDividerFactory",get_headerDividerFactory:"get_headerDividerFactory",set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_forceItemStateUpdate:"set_forceItemStateUpdate",
get_forceItemStateUpdate:"get_forceItemStateUpdate",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_rowRendererFactory:"set_rowRendererFactory",get_rowRendererFactory:"get_rowRendererFactory",set_columns:"set_columns",get_columns:"get_columns",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var Fu=function(a){this.inactiveHeaderRenderers=
[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};r["feathers.controls._GridView.HeaderRendererStorage"]=Fu;Fu.__name__="feathers.controls._GridView.HeaderRendererStorage";Fu.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,inactiveHeaderRenderers:null,measurements:null,__class__:Fu};var Eu=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};r["feathers.controls._GridView.HeaderDividerStorage"]=
Eu;Eu.__name__="feathers.controls._GridView.HeaderDividerStorage";Eu.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:Eu};var Du=function(a){this.inactiveColumnDividers=[];this.activeColumnDividers=[];this.columnDividerFactory=a};r["feathers.controls._GridView.ColumnDividerStorage"]=Du;Du.__name__="feathers.controls._GridView.ColumnDividerStorage";Du.prototype={customColumnDividerVariant:null,
oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:Du};var Eo=function(){};r["feathers.controls.IGridViewColumn"]=Eo;Eo.__name__="feathers.controls.IGridViewColumn";Eo.__isInterface__=!0;Eo.prototype={width:null,minWidth:null,__class__:Eo};var em=function(a,b,c){this.defaultSortOrder=rh.ASCENDING;this.cellRendererRecycler=this.sortCompareFunction=null;this.minWidth=0;this.width=null;na.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};r["feathers.controls.GridViewColumn"]=em;em.__name__="feathers.controls.GridViewColumn";em.__interfaces__=[Eo];em.__super__=na;em.prototype=I(na.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,sortCompareFunction:null,defaultSortOrder:null,itemToText:function(a){return L.string(a)},__class__:em});var Fo=function(a,b,c,d,f,g){d==null&&(d=-1);a==null&&(a=Lf.STANDARD);this.enabled=!0;this.selected=!1;this.layoutIndex=-1;this.type=a;this.data=b;this.location=
c;this.layoutIndex=d;this.selected=!1;this.text=g};r["feathers.data.GroupListViewItemState"]=Fo;Fo.__name__="feathers.data.GroupListViewItemState";Fo.prototype={owner:null,type:null,data:null,location:null,layoutIndex:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Fo};var Qc=function(a,b){this._pendingScrollLocation=this._pendingScrollDuration=this.__layout=this.__customHeaderRendererVariant=this.__customItemRendererVariant=null;this._ignoreSelectionChange=this._ignoreLayoutChanges=
!1;this._selectable=this._virtualLayout=this.pointerSelectionEnabled=!0;this._layoutHeaderIndices=[];this._layoutItems=[];this._totalLayoutCount=0;this._tempVisibleIndices=new Di(0,0);this._visibleIndices=new Di(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new Tb(function(){return new Fo});this.itemRendererToItemState=new Na;this.stringDataToItemRenderer=new aa;this.objectDataToItemRenderer=new Na;this._additionalItemStorage=this._additionalHeaderStorage=
null;this._defaultHeaderStorage=new Go(Lf.HEADER,null,He.withClass(Mc));this._defaultItemStorage=new Go(Lf.STANDARD,null,He.withClass(Mc));this._itemRendererRecyclerMap=this._headerRendererRecyclerMap=null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomHeaderRendererVariant=this._previousCustomItemRendererVariant=null;this._childFocusEnabled=!0;this.initializeGroupListViewTheme();ob.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=
null;this.get_viewPort()==null&&(this.groupViewPort=new Dk,this.addChild(this.groupViewPort),this.set_viewPort(this.groupViewPort));this.addEventListener("keyDown",m(this,this.groupListView_keyDownHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.GroupListView"]=Qc;Qc.__name__="feathers.controls.GroupListView";Qc.__interfaces__=[dg,ii];Qc.defaultUpdateItemRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};Qc.defaultResetItemRenderer=function(a,b){u.__implements(a,
de)&&a.set_text(null)};Qc.__super__=ob;Qc.prototype=I(ob.prototype,{groupViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_dataProvider:null,
get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalLayoutCount=this._virtualCache.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.groupListView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.groupListView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.groupListView_dataProvider_removeItemHandler)),
this._dataProvider.removeEventListener("replaceItem",m(this,this.groupListView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.groupListView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.groupListView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.groupListView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.groupListView_dataProvider_sortChangeHandler)),
this._dataProvider.removeEventListener("updateItem",m(this,this.groupListView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.groupListView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalLayoutCount=this.calculateTotalLayoutCount([]),this._virtualCache.length=this._totalLayoutCount,this._dataProvider.addEventListener("change",m(this,this.groupListView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",
m(this,this.groupListView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.groupListView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.groupListView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.groupListView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.groupListView_dataProvider_resetHandler)),this._dataProvider.addEventListener("filterChange",
m(this,this.groupListView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.groupListView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.groupListView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.groupListView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);this.setInvalid(x.DATA);W.dispatch(this,"dataChange");
return this._dataProvider},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;if(a!=null&&a.length!=2)throw new rb("GroupListView selectedLocation must have a length of 2");this._selectedLocation=a;this._selectedItem=this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);
this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,b)==0)return this._selectedItem;this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);
W.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_previousCustomHeaderRendererVariant:null,_previousCustomItemRendererVariant:null,_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},get_itemRendererRecycler:function(){return this._defaultItemStorage.itemRendererRecycler},
set_itemRendererRecycler:function(a){if(this._defaultItemStorage.itemRendererRecycler==a)return this._defaultItemStorage.itemRendererRecycler;this._defaultItemStorage.oldItemRendererRecycler=this._defaultItemStorage.itemRendererRecycler;this._defaultItemStorage.itemRendererRecycler=a;this._defaultItemStorage.measurements=null;this.setInvalid(Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultItemStorage.itemRendererRecycler},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.itemRendererRecycler},
set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.itemRendererRecycler==a)return this._defaultHeaderStorage.itemRendererRecycler;this._defaultHeaderStorage.oldItemRendererRecycler=this._defaultHeaderStorage.itemRendererRecycler;this._defaultHeaderStorage.itemRendererRecycler=a;this.setInvalid(Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.itemRendererRecycler},_itemRendererRecyclerMap:null,_headerRendererRecyclerMap:null,_itemRendererRecyclerIDFunction:null,
get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=a;this._itemRendererRecyclerIDFunction!=null&&this._additionalItemStorage==null&&(this._additionalItemStorage=[]);this.setInvalid(Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_headerRendererRecyclerIDFunction:null,
get_headerRendererRecyclerIDFunction:function(){return this._headerRendererRecyclerIDFunction},set_headerRendererRecyclerIDFunction:function(a){if(this._headerRendererRecyclerIDFunction==a)return this._headerRendererRecyclerIDFunction;this._headerRendererRecyclerIDFunction=a;this._headerRendererRecyclerIDFunction!=null&&this._additionalHeaderStorage==null&&(this._additionalHeaderStorage=[]);this.setInvalid(Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._headerRendererRecyclerIDFunction},
_defaultItemStorage:null,_defaultHeaderStorage:null,_additionalItemStorage:null,_additionalHeaderStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,itemRendererToItemState:null,itemStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_totalLayoutCount:null,_layoutItems:null,_layoutHeaderIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==
a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreLayoutChanges:null,itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},
itemToHeaderText:function(a){return L.string(a)},itemToItemRenderer:function(a){return a==null?null:typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},locationToItemRenderer:function(a){if(this._dataProvider==null||!this.isValidLocation(a))return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__]},getItemRendererRecycler:function(a){return this._itemRendererRecyclerMap==null?null:this._itemRendererRecyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._itemRendererRecyclerMap==null&&(this._itemRendererRecyclerMap=new aa);b==null?(b=this._itemRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._itemRendererRecyclerMap.h[a]=b,this.setInvalid(Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},getHeaderRendererRecycler:function(a){return this._headerRendererRecyclerMap==
null?null:this._headerRendererRecyclerMap.h[a]},setHeaderRendererRecycler:function(a,b){this._headerRendererRecyclerMap==null&&(this._headerRendererRecyclerMap=new aa);b==null?(b=this._headerRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._headerRendererRecyclerMap.h[a]=b,this.setInvalid(Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY))},_pendingScrollLocation:null,_pendingScrollDuration:null,scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=
0&&(this._pendingScrollLocation=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];else{var c=this._dataProvider.locationOf(a);if(c==null)return null;b=new Fo;var d=c.length==1?Lf.HEADER:Lf.STANDARD,f=this.locationToDisplayIndex(c);this.populateCurrentItemState(a,d,c,f,b,!1)}return b},
dispose:function(){this.refreshInactiveItemRenderers(this._defaultItemStorage,!0);if(this._additionalItemStorage!=null)for(var a=0,b=this._additionalItemStorage.length;a<b;){var c=a++;c=this._additionalItemStorage[c];this.refreshInactiveItemRenderers(c,!0)}this.refreshInactiveItemRenderers(this._defaultHeaderStorage,!0);if(this._additionalHeaderStorage!=null)for(a=0,b=this._additionalHeaderStorage.length;a<b;)c=a++,c=this._additionalHeaderStorage[c],this.refreshInactiveItemRenderers(c,!0);this._selectedLocation=
this._selectedItem=null;this.set_dataProvider(null);ob.prototype.dispose.call(this)},initializeGroupListViewTheme:function(){Yt.initialize()},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);
if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount),this.groupViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.groupViewPort.refreshChildren=m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.groupViewPort.setInvalid(b);this._allInvalid&&this.groupViewPort.setInvalid();ob.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();
this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.handlePendingScroll()},createScroller:function(){ob.prototype.createScroller.call(this);this.groupViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=
a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.groupViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.groupViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&u.__implements(this.get_layout(),
Jh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:
!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultItemStorage.itemRendererRecycler.update==null&&(this._defaultItemStorage.itemRendererRecycler.update=Qc.defaultUpdateItemRenderer,this._defaultItemStorage.itemRendererRecycler.reset==null&&(this._defaultItemStorage.itemRendererRecycler.reset=Qc.defaultResetItemRenderer));this._defaultHeaderStorage.itemRendererRecycler.update==null&&(this._defaultHeaderStorage.itemRendererRecycler.update=Qc.defaultUpdateItemRenderer,this._defaultHeaderStorage.itemRendererRecycler.reset==
null&&(this._defaultHeaderStorage.itemRendererRecycler.reset=Qc.defaultResetItemRenderer));if(this._itemRendererRecyclerMap!=null){var b=this._itemRendererRecyclerMap.h;a=b;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Qc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Qc.defaultResetItemRenderer))}}if(this._headerRendererRecyclerMap!=null)for(a=b=this._headerRendererRecyclerMap.h,b=Object.keys(b),c=b.length,d=0;d<c;)f=a[b[d++]],f.update==
null&&f.update==null&&(f.update=Qc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Qc.defaultResetItemRenderer));a=this.groupViewPort.isInvalid(Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);b=this.groupViewPort.isInvalid(Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultItemStorage,a);if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)f=c++,f=this._additionalItemStorage[f],this.refreshInactiveItemRenderers(f,a);this.refreshInactiveItemRenderers(this._defaultHeaderStorage,
b);if(this._additionalHeaderStorage!=null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)f=c++,f=this._additionalHeaderStorage[f],this.refreshInactiveItemRenderers(f,b);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultItemStorage);if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)f=c++,f=this._additionalItemStorage[f],this.recoverInactiveItemRenderers(f);this.recoverInactiveItemRenderers(this._defaultHeaderStorage);if(this._additionalHeaderStorage!=
null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)f=c++,f=this._additionalHeaderStorage[f],this.recoverInactiveItemRenderers(f);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultItemStorage);if(this._defaultItemStorage.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalItemStorage!=null)for(c=0,d=this._additionalItemStorage.length;c<d;)if(f=c++,f=this._additionalItemStorage[f],
this.freeInactiveItemRenderers(f),f.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers "+f.id+" should be empty after updating.");this.freeInactiveItemRenderers(this._defaultHeaderStorage);if(this._defaultHeaderStorage.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header renderers should be empty after updating.");if(this._additionalHeaderStorage!=null)for(c=0,d=this._additionalHeaderStorage.length;c<d;)if(f=
c++,f=this._additionalHeaderStorage[f],this.freeInactiveItemRenderers(f),f.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header renderers "+f.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw b=u.getClass(this),new fb(""+b.__name__+": active "+L.string(a.type)+" renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
a.type==Lf.STANDARD&&(d.removeEventListener("trigger",m(this,this.groupListView_itemRenderer_triggerHandler)),d.removeEventListener("click",m(this,this.groupListView_itemRenderer_clickHandler)),d.removeEventListener("touchTap",m(this,this.groupListView_itemRenderer_touchTapHandler)),d.removeEventListener("change",m(this,this.groupListView_itemRenderer_changeHandler)));d.removeEventListener("resize",m(this,this.groupListView_itemRenderer_resizeHandler));this.resetItemRenderer(d,f,a);a.measurements!=
null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._layoutItems.length=this._totalLayoutCount;this._layoutHeaderIndices.length=0;if(this._virtualLayout&&u.__implements(this.get_layout(),
Jh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._layoutItems.length,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=this._layoutItems.length-1;this.findUnrenderedDataForLocation([],
0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||b>this._visibleIndices.end?(this._layoutItems[b]=null,a.length==1&&this._layoutHeaderIndices.push(b)):this.findItemRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(a.length==1&&this._dataProvider.isBranch(f)&&(b=this.findUnrenderedDataForLocation(a,b),b>this._visibleIndices.end))break;
a.pop()}return b},findItemRenderer:function(a,b,c){var d=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.itemRendererToItemState.h[d.__id__];a=this.populateCurrentItemState(a,b.length==1?Lf.HEADER:Lf.STANDARD,b,c,f,this._forceItemStateUpdate);var g=f.recyclerID,h=this.itemStateToStorage(f);if(h.id!=g)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);
else{a&&this.updateItemRenderer(d,f,h);d.set_visible(!0);this._layoutItems[c]=d;f.type==Lf.HEADER&&this._layoutHeaderIndices.push(c);if(!X.remove(h.inactiveItemRenderers,d))throw c=u.getClass(this),new fb(""+c.__name__+": item renderer map contains bad data for item at location "+L.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");h.activeItemRenderers.push(d)}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=
b[a];++a;var d=this._dataProvider.get(c),f=c.length==1?Lf.HEADER:Lf.STANDARD,g=this._unrenderedLayoutIndices.shift(),h=this.itemStatePool.get();this.populateCurrentItemState(d,f,c,g,h,!0);c=this.createItemRenderer(h);c.set_visible(!0);this.groupViewPort.addChild(c);this._layoutItems[g]=c;f==Lf.HEADER&&this._layoutHeaderIndices.push(g)}this._unrenderedLocations.length=0},createItemRenderer:function(a){var b=this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();
if(u.__implements(c,If)){var d=c;if(d.get_variant()==null){var f=a.type==Lf.HEADER?this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():Qc.CHILD_VARIANT_HEADER_RENDERER:this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Qc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}u.__implements(c,jb)&&c.initializeNow();b.measurements==null&&(b.measurements=new Ib(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);a.type==Lf.STANDARD&&
(u.__implements(c,Fh)?c.addEventListener("trigger",m(this,this.groupListView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.groupListView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.groupListView_itemRenderer_touchTapHandler))),u.__implements(c,md)&&c.addEventListener("change",m(this,this.groupListView_itemRenderer_changeHandler)));u.__implements(c,Kb)&&c.addEventListener("resize",m(this,this.groupListView_itemRenderer_resizeHandler));this.itemRendererToItemState.set(c,
a);a=a.data;typeof a=="string"?this.stringDataToItemRenderer.h[a]=c:this.objectDataToItemRenderer.set(a,c);b.activeItemRenderers.push(c);return c},destroyItemRenderer:function(a,b){this.groupViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemOrHeaderStateToStorage:function(a,b,c,d,f){var g=null;b!=null&&(g=b(a));b=null;if(g!=null&&(c!=null&&(b=c.h[g]),b==null))throw new fb('Item renderer recycler ID "'+g+'" is not registered.');if(b==null)return d;c=0;for(d=f.length;c<d;){var h=c++;
h=f[h];if(h.itemRendererRecycler==b)return h}h=new Go(a.type,g,b);f.push(h);return h},itemStateToStorage:function(a){return a.type==Lf.HEADER?this.itemOrHeaderStateToStorage(a,this._headerRendererRecyclerIDFunction,this._headerRendererRecyclerMap,this._defaultHeaderStorage,this._additionalHeaderStorage):this.itemOrHeaderStateToStorage(a,this._itemRendererRecyclerIDFunction,this._itemRendererRecyclerMap,this._defaultItemStorage,this._additionalItemStorage)},populateCurrentItemState:function(a,b,c,
d,f,g){var h=!1;if(g||f.owner!=this)f.owner=this,h=!0;if(g||f.type!=b)f.type=b,h=!0;if(g||f.data!=a)f.data=a,h=!0;if(g||f.location!=c&&this.compareLocations(f.location,c)!=0)f.location=c,h=!0;if(g||f.layoutIndex!=d)f.layoutIndex=d,h=!0;c=c.length>1&&a==this._selectedItem;if(g||f.selected!=c)f.selected=c,h=!0;c=this._enabled&&this.itemToEnabled(a);if(g||f.enabled!=c)f.enabled=c,h=!0;a=b==Lf.HEADER?this.itemToHeaderText(a):this.itemToText(a);if(g||f.text!=a)f.text=a,h=!0;return h},updateItemRenderer:function(a,
b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},resetItemRenderer:function(a,b,c){c=c.oldItemRendererRecycler!=null?c.oldItemRendererRecycler:c.itemRendererRecycler;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,
Qc.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,ji)&&a.set_layoutIndex(b.layoutIndex);u.__implements(a,Ho)&&(a.set_location(b.location),a.set_groupListViewOwner(b.owner));u.__implements(a,md)&&a.set_selected(b.selected);this._ignoreSelectionChange=c},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=
null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);a.length==1&&this._dataProvider.isBranch(f)&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},containsLocation:function(a,b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},
compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,l=a[h];h=b[h];if(l<h)return-1;if(l>h)return 1}return c<d?-1:c>d?1:0},_currentDisplayIndex:null,displayIndexToLocation:function(a){if(a<0)return null;this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;
this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(b.length==1&&this._dataProvider.isBranch(f)&&(f=this.displayIndexToLocationAtBranch(a,b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a){this._currentDisplayIndex=-1;return this.locationToDisplayIndexAtBranch([],a)},locationToDisplayIndexAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;this._currentDisplayIndex++;a[a.length]=
f;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;f=this._dataProvider.get(a);if(a.length==1&&this._dataProvider.isBranch(f)&&(f=this.locationToDisplayIndexAtBranch(a,b),f!=-1))return f;--a.length}return-1},isValidLocation:function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;if(d<0||d>=this._dataProvider.getLength(b))return!1;b.push(d)}return!0},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._layoutItems.length!=0){var b=null,c=this.locationToDisplayIndex(this._selectedLocation),
d=c;if(u.__implements(this.get_layout(),wj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;d=this.get_layout().findNextKeyboardIndex(d,a,!1,this._layoutItems,this._layoutHeaderIndices,this.groupViewPort.get_visibleWidth(),this.groupViewPort.get_visibleHeight());b=this.displayIndexToLocation(d);if(b==null||b.length!=2)return}else for(var f=!0,g=a.keyCode,h=-1;f;){f=!1;switch(g){case 33:--d;break;case 34:++d;break;case 35:d=
this._layoutItems.length-1;g=38;break;case 36:d=0;g=40;break;case 37:--d;break;case 38:--d;break;case 39:++d;break;case 40:++d;break;default:return}d<0?d=0:d>=this._layoutItems.length&&(d=this._layoutItems.length-1);b=this.displayIndexToLocation(d);if(b.length!=2){if(d==h)return;f=!0}h=d}c=d!=c;c||d==-1||(this.itemToItemRenderer(this._dataProvider.get(b))==null?c=!0:u.__implements(this.get_layout(),Oe)&&(d=this.get_layout().getNearestScrollPositionForIndex(d,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),
this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=d.x||this.get_scrollY()!=d.y)&&(c=!0));c&&(a.preventDefault(),this.set_selectedLocation(b),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handleSelectionChange:function(a,b,c,d){b!=null&&b.length==2&&this._selectable?(this.set_selectedLocation(b),b!=null&&this.scrollToLocation(b)):this.set_selectedItem(null)},
handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(u.__implements(this.get_layout(),Oe))c=this.locationToDisplayIndex(a),d=this.get_layout().getNearestScrollPositionForIndex(c,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),
this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},
baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):ob.prototype.baseScrollContainer_keyDownHandler.call(this,a)},groupListView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selectedItem!=null){var b=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:
this.objectDataToItemRenderer.h[this._selectedItem.__id__];a=null;b!=null&&(a=this.itemRendererToItemState.h[b.__id__]);b=!1;a==null&&(b=!0,a=this.itemStatePool.get());var c=this._selectedLocation.length==1?Lf.HEADER:Lf.STANDARD,d=this.locationToDisplayIndex(this._selectedLocation);this.populateCurrentItemState(this._selectedItem,c,this._selectedLocation,d,a,!0);ni.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},groupListView_itemRenderer_touchTapHandler:function(a){if(this._enabled&&
!a.isPrimaryTouchPoint){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];ni.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_clickHandler:function(a){if(this._enabled){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];ni.dispatch(this,"itemTrigger",b);this._selectable&&this.pointerSelectionEnabled&&this.handleSelectionChange(b.data,
b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_triggerHandler:function(a){if(this._enabled){var b=u.__cast(a.currentTarget,ea);b=this.itemRendererToItemState.h[b.__id__];ni.dispatch(this,"itemTrigger",b);this._selectable&&this.handleSelectionChange(b.data,b.location,a.ctrlKey,a.shiftKey)}},groupListView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},groupListView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,
ea);a=u.__cast(b,md);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},groupListView_dataProvider_changeHandler:function(a){this._totalLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount);this.setInvalid(x.DATA)},groupListView_dataProvider_addItemHandler:function(a){this._selectedLocation!=null&&this.compareLocations(this._selectedLocation,a.location)>=
0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},groupListView_dataProvider_removeItemHandler:function(a){this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},groupListView_dataProvider_replaceItemHandler:function(a){this._selectedLocation!=
null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),W.dispatch(this,"change")))},groupListView_dataProvider_removeAllHandler:function(a){this.set_selectedLocation(null)},groupListView_dataProvider_resetHandler:function(a){this.set_selectedLocation(null)},groupListView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},
groupListView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateItemRendererForLocation:function(a){var b=this.locationToDisplayIndex(a);this._virtualCache!=null&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a),d=a.length==1?Lf.HEADER:Lf.STANDARD;var f=typeof c=="string"?this.stringDataToItemRenderer.h[c]:this.objectDataToItemRenderer.h[c.__id__];if(f==null)this.setInvalid(x.DATA);else{var g=this.itemRendererToItemState.h[f.__id__];if(g.owner!=
null){var h=this.itemStateToStorage(g);this.populateCurrentItemState(c,d,a,b,g,!0);this.resetItemRenderer(f,g,h);h.measurements!=null&&h.measurements.restore(f);g.owner=null;this.setInvalid(x.DATA)}}if(d==Lf.HEADER)for(b=0,c=this._dataProvider.getLength(a);b<c;)d=b++,a.push(d),this.updateItemRendererForLocation(a),a.pop()},groupListView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForLocation(a.location)},groupListView_dataProvider_updateAllHandler:function(a){a=[];for(var b=
0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateItemRendererForLocation(a)}},get_styleContext:function(){return Qc},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__customHeaderRendererVariant:null,
get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);
return this.get_customHeaderRendererVariant()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},
clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:Qc,__properties__:I(ob.prototype.__properties__,{set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_headerRendererRecyclerIDFunction:"set_headerRendererRecyclerIDFunction",get_headerRendererRecyclerIDFunction:"get_headerRendererRecyclerIDFunction",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",
get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_customItemRendererVariant:"set_customItemRendererVariant",get_customItemRendererVariant:"get_customItemRendererVariant",
set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});
var Go=function(a,b,c){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.type=a;this.id=b;this.itemRendererRecycler=c};r["feathers.controls._GroupListView.ItemRendererStorage"]=Go;Go.__name__="feathers.controls._GroupListView.ItemRendererStorage";Go.prototype={type:null,id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:Go};var Vj=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);
this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__indeterminateDuration=.75;this.__indeterminateFillSkin=null;this.__fillMode=Vq.RESIZE;this._backgroundSkinMeasurements=this._currentBackgroundSkin=this._fillSkinMeasurements=this._currentFillSkin=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__fillSkin=this.__disabledFillSkin=null;this._indeterminateActive=this._reversedIndeterminate=this._indeterminate=!1;this._maximum=1;this._value=this._minimum=0;
wa.call(this);this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};r["feathers.controls.supportClasses.BaseProgressBar"]=Vj;Vj.__name__="feathers.controls.supportClasses.BaseProgressBar";Vj.__interfaces__=[jl];Vj.__super__=wa;Vj.prototype=I(wa.prototype,{_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._value=a;this.setInvalid(x.DATA);W.dispatch(this,"change");return this._value},_minimum:null,
get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.get_initialized()&&this._value<this._minimum&&this.set_value(this._minimum);this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.get_initialized()&&this._value>this._maximum&&this.set_value(this._maximum);this.setInvalid(x.DATA);return this._maximum},
_indeterminateActive:null,_lastIndeterminateUpdateTime:null,_reversedIndeterminate:null,_savedIndeterminateFillSkinAlpha:null,_indeterminate:null,get_indeterminate:function(){return this._indeterminate},set_indeterminate:function(a){if(this._indeterminate==a)return this._indeterminate;this._indeterminate=a;this.setInvalid(x.STATE);return this._indeterminate},_backgroundSkinMeasurements:null,_currentBackgroundSkin:null,_fillSkinMeasurements:null,_currentFillSkin:null,setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},update:function(){var a=this.isInvalid(x.STYLES),b=this.isInvalid(x.STATE);if(a||b)this.refreshBackgroundSkin(),this.refreshFillSkin();this.measure();this.layoutContent()},measure:function(){var a=u.getClass(this);throw new ne("Missing override for 'measure' in type "+a.__name__);},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=
a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),
u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},refreshFillSkin:function(){var a=this._currentFillSkin;this._currentFillSkin=this.getCurrentFillSkin();this._currentFillSkin!=a&&(this.removeCurrentFillSkin(a),this.addCurrentFillSkin(this._currentFillSkin));!this._indeterminate&&this._indeterminateActive&&a!=
null?(a.set_alpha(this._savedIndeterminateFillSkinAlpha),this._indeterminateActive=!1,this.removeEventListener("enterFrame",m(this,this.baseProgressBar_enterFrameHandler))):this._indeterminate&&!this._indeterminateActive&&this._currentFillSkin!=null&&(this._savedIndeterminateFillSkinAlpha=this._currentFillSkin.get_alpha(),this._indeterminateActive=!0,this._lastIndeterminateUpdateTime=Oa.getTimer(),this.addEventListener("enterFrame",m(this,this.baseProgressBar_enterFrameHandler)))},getCurrentFillSkin:function(){return this._enabled||
this.get_disabledFillSkin()==null?this._indeterminate&&this.get_indeterminateFillSkin()!=null?this.get_indeterminateFillSkin():this.get_fillSkin():this.get_disabledFillSkin()},addCurrentFillSkin:function(a){a==null?this._fillSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._fillSkinMeasurements==null?this._fillSkinMeasurements=new Ib(a):this._fillSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentFillSkin:function(a){a!=null&&(u.__implements(a,
wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackground();this.layoutFill()},layoutBackground:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutBackground' in type "+a.__name__);},layoutFill:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutFill' in type "+a.__name__);},baseProgressBar_enterFrameHandler:function(a){if(this._enabled&&this.get_visible()&&this._indeterminate){a=Oa.getTimer();var b=
(a-this._lastIndeterminateUpdateTime)/(this.get_indeterminateDuration()*1E3);b>=1&&(b-=Math.floor(b),this._lastIndeterminateUpdateTime=a,this._reversedIndeterminate=!this._reversedIndeterminate);u.__implements(this._currentFillSkin,cm)?this._currentFillSkin.set_indeterminatePosition(b):this._currentFillSkin.set_alpha(this._savedIndeterminateFillSkinAlpha*(this._reversedIndeterminate?1-b:b))}},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==
a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},__fillSkin:null,get_fillSkin:function(){return this.__fillSkin},set_fillSkin:function(a){if(!this.setStyle("fillSkin")||this.__fillSkin==a)return this.__fillSkin;this._previousClearStyle=
m(this,this.clearStyle_fillSkin);this.__fillSkin=a;this.setInvalid(x.STYLES);return this.__fillSkin},clearStyle_fillSkin:function(){this.set_fillSkin(null);return this.get_fillSkin()},__disabledFillSkin:null,get_disabledFillSkin:function(){return this.__disabledFillSkin},set_disabledFillSkin:function(a){if(!this.setStyle("disabledFillSkin")||this.__disabledFillSkin==a)return this.__disabledFillSkin;this._previousClearStyle=m(this,this.clearStyle_disabledFillSkin);this.__disabledFillSkin=a;this.setInvalid(x.STYLES);
return this.__disabledFillSkin},clearStyle_disabledFillSkin:function(){this.set_disabledFillSkin(null);return this.get_disabledFillSkin()},__fillMode:null,get_fillMode:function(){return this.__fillMode},set_fillMode:function(a){if(!this.setStyle("fillMode")||this.__fillMode==a)return this.__fillMode;this._previousClearStyle=m(this,this.clearStyle_fillMode);this.__fillMode=a;this.setInvalid(x.STYLES);return this.__fillMode},clearStyle_fillMode:function(){this.set_fillMode(Vq.RESIZE);return this.get_fillMode()},
__indeterminateFillSkin:null,get_indeterminateFillSkin:function(){return this.__indeterminateFillSkin},set_indeterminateFillSkin:function(a){if(!this.setStyle("indeterminateFillSkin")||this.__indeterminateFillSkin==a)return this.__indeterminateFillSkin;this._previousClearStyle=m(this,this.clearStyle_indeterminateFillSkin);this.__indeterminateFillSkin=a;this.setInvalid(x.STYLES);return this.__indeterminateFillSkin},clearStyle_indeterminateFillSkin:function(){this.set_indeterminateFillSkin(null);return this.get_indeterminateFillSkin()},
__indeterminateDuration:null,get_indeterminateDuration:function(){return this.__indeterminateDuration},set_indeterminateDuration:function(a){if(!this.setStyle("indeterminateDuration")||this.__indeterminateDuration==a)return this.__indeterminateDuration;this._previousClearStyle=m(this,this.clearStyle_indeterminateDuration);this.__indeterminateDuration=a;this.setInvalid(x.STYLES);return this.__indeterminateDuration},clearStyle_indeterminateDuration:function(){this.set_indeterminateDuration(.75);return this.get_indeterminateDuration()},
__paddingTop:null,get_paddingTop:function(){return this.__paddingTop},set_paddingTop:function(a){if(!this.setStyle("paddingTop")||this.__paddingTop==a)return this.__paddingTop;this._previousClearStyle=m(this,this.clearStyle_paddingTop);this.__paddingTop=a;this.setInvalid(x.STYLES);return this.__paddingTop},clearStyle_paddingTop:function(){this.set_paddingTop(0);return this.get_paddingTop()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||
this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);return this.get_paddingRight()},__paddingBottom:null,get_paddingBottom:function(){return this.__paddingBottom},set_paddingBottom:function(a){if(!this.setStyle("paddingBottom")||this.__paddingBottom==a)return this.__paddingBottom;this._previousClearStyle=
m(this,this.clearStyle_paddingBottom);this.__paddingBottom=a;this.setInvalid(x.STYLES);return this.__paddingBottom},clearStyle_paddingBottom:function(){this.set_paddingBottom(0);return this.get_paddingBottom()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__class__:Vj,__properties__:I(wa.prototype.__properties__,{set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_indeterminateDuration:"set_indeterminateDuration",
get_indeterminateDuration:"get_indeterminateDuration",set_indeterminateFillSkin:"set_indeterminateFillSkin",get_indeterminateFillSkin:"get_indeterminateFillSkin",set_fillMode:"set_fillMode",get_fillMode:"get_fillMode",set_disabledFillSkin:"set_disabledFillSkin",get_disabledFillSkin:"get_disabledFillSkin",set_fillSkin:"set_fillSkin",get_fillSkin:"get_fillSkin",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",
get_backgroundSkin:"get_backgroundSkin",set_indeterminate:"set_indeterminate",get_indeterminate:"get_indeterminate",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var Sl=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHProgressBarTheme();Vj.call(this,a,b,c,d)};r["feathers.controls.HProgressBar"]=Sl;Sl.__name__="feathers.controls.HProgressBar";Sl.__super__=Vj;Sl.prototype=
I(Vj.prototype,{_currentMask:null,initializeHProgressBarTheme:function(){au.initialize()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);u.__implements(this._currentBackgroundSkin,
Kb);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();c=this.get_explicitWidth();a&&(c=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.width:0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.height:0);b=this.get_explicitMinWidth();d=this.get_explicitMinHeight();f=this.get_explicitMaxWidth();g=this.get_explicitMaxHeight();return this.saveMeasurements(c,a,b,d,f,g)},layoutBackground:function(){this._currentBackgroundSkin!=
null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},layoutFill:function(){if(this._currentFillSkin!=null){var a=1;this._minimum!=this._maximum&&(a=
(this._value-this._minimum)/(this._maximum-this._minimum),a<0?a=0:a>1&&(a=1));var b=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();a=this._indeterminate?b:Math.round(a*b);this._currentFillSkin.set_x(this.get_paddingLeft());this._currentFillSkin.set_y(this.get_paddingTop());this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());switch(this.get_fillMode()._hx_index){case 0:this._currentFillSkin.set_scrollRect(null);this._currentMask==null&&
(this._currentMask=new db(Ab.SolidColor(16711935)),this.addChild(this._currentMask));this._currentFillSkin.set_mask(this._currentMask);this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight());this._currentMask.set_x(this._currentFillSkin.get_x());this._currentMask.set_y(this._currentFillSkin.get_y());this._currentMask.set_width(a);this._currentMask.set_height(this._currentFillSkin.get_height());break;case 1:this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight());this._currentFillSkin.set_scrollRect(new Ea(0,0,a,this._currentFillSkin.get_height()));break;case 2:this._currentFillSkin.set_mask(null),this._currentFillSkin.set_scrollRect(null),this._currentMask!=null&&(this._currentMask.parent==this&&this.removeChild(this._currentMask),this._currentMask=null),this._fillSkinMeasurements.minWidth!=null&&a<this._fillSkinMeasurements.minWidth?(a=this._fillSkinMeasurements.minWidth,this._currentFillSkin.set_visible(this._value>this._minimum)):
this._currentFillSkin.set_visible(!0),this._currentFillSkin.set_width(a)}u.__implements(this._currentFillSkin,oa)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return Sl},__class__:Sl});var Wj=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__minimumPadding=this.__maximumPadding=0;this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this._pointerStartX=this._pointerStartY=this._thumbStartX=this._thumbStartY=0;this._dragging=!1;this._currentThumbSkin=
this._thumbSkinMeasurements=this._currentTrackSkin=this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=null;this.liveDragging=!0;this._snapInterval=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;this._isDefaultValue=!0;wa.call(this);this.set_tabEnabled(!0);this.set_tabChildren(!1);this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};r["feathers.controls.supportClasses.BaseSlider"]=Wj;Wj.__name__=
"feathers.controls.supportClasses.BaseSlider";Wj.__interfaces__=[ld,jl];Wj.__super__=wa;Wj.prototype=I(wa.prototype,{_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=a;this.setInvalid(x.DATA);!this.liveDragging&&this._dragging||W.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;
this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==
a)return this._snapInterval;this._snapInterval=a;this.setInvalid(x.DATA);return this._snapInterval},liveDragging:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,_secondaryTrackSkinMeasurements:null,_dragging:null,_pointerStartX:null,_pointerStartY:null,_thumbStartX:null,_thumbStartY:null,showFocus:function(a){wa.prototype.showFocus.call(this,a);if(u.__implements(this._currentThumbSkin,ld)){var b=this._currentThumbSkin;
b.get_focusEnabled()&&b.showFocus(a)}},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},initialize:function(){wa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(x.SIZE);var a=this.isInvalid(x.STATE),b=this.isInvalid(x.STYLES);b&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());(a||b)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=
u.getClass(this);throw new ne("Missing override for 'measure' in type "+a.__name__);},refreshThumb:function(){var a=this._currentThumbSkin;this._currentThumbSkin=this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==
null?this._thumbSkinMeasurements=new Ib(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),this.addChild(this._currentThumbSkin),this._currentThumbSkin.addEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),u.__implements(this._currentThumbSkin,wb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(u.__implements(this._currentTrackSkin,jb)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Ib(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),this.addChildAt(this._currentTrackSkin,0),this._currentTrackSkin.addEventListener("mouseDown",
m(this,this.trackSkin_mouseDownHandler)),u.__implements(this._currentTrackSkin,wb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=
null?(u.__implements(this._currentSecondaryTrackSkin,jb)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Ib(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0),this._currentSecondaryTrackSkin.addEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler)),u.__implements(this._currentSecondaryTrackSkin,
wb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.set_enabled(this._enabled);u.__implements(this._currentTrackSkin,jb)&&this._currentTrackSkin.set_enabled(this._enabled);u.__implements(this._currentSecondaryTrackSkin,jb)&&this._currentSecondaryTrackSkin.set_enabled(this._enabled)},layoutContent:function(){this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=
null?this.layoutSplitTrack():this.layoutSingleTrack();this.layoutThumb()},layoutSplitTrack:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=u.getClass(this);throw new ne("Missing override for 'layoutThumb' in type "+a.__name__);},normalizeValue:function(a){var b=0;this._minimum!=
this._maximum&&(b=(a-this._minimum)/(this._maximum-this._minimum),b<0?b=0:b>1&&(b=1));return b},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&(a=ff.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);return a},valueToLocation:function(a){a=u.getClass(this);throw new ne("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=u.getClass(this);throw new ne("Missing override for 'locationToValue' in type "+
a.__name__);},saveThumbStart:function(a,b){a=u.getClass(this);throw new ne("Missing override for 'saveThumbStart' in type "+a.__name__);},thumbSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler),!1,0,!0),this._thumbStartX=this._currentThumbSkin.get_x(),this._thumbStartY=
this._currentThumbSkin.get_y(),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=!0)},thumbSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},thumbSkin_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler));
this._dragging=!1;this.liveDragging||W.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&(this.stage.addEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler),!1,0,!0),this.saveThumbStart(this.get_mouseX(),this.get_mouseY()),this._pointerStartX=this.get_mouseX(),this._pointerStartY=this.get_mouseY(),this._dragging=
!0,a=this.locationToValue(this.get_mouseX(),this.get_mouseY()),a=this.restrictValue(a),this.set_value(a))},trackSkin_stage_mouseMoveHandler:function(a){a=this.locationToValue(this.get_mouseX(),this.get_mouseY());a=this.restrictValue(a);this.set_value(a)},trackSkin_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=
!1;this.liveDragging||W.dispatch(this,"change")},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||this.__thumbSkin==a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||
this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=a;this.setInvalid(x.STYLES);return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=
m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);return this.get_secondaryTrackSkin()},__minimumPadding:null,get_minimumPadding:function(){return this.__minimumPadding},set_minimumPadding:function(a){if(!this.setStyle("minimumPadding")||this.__minimumPadding==a)return this.__minimumPadding;this._previousClearStyle=m(this,this.clearStyle_minimumPadding);
this.__minimumPadding=a;this.setInvalid(x.STYLES);return this.__minimumPadding},clearStyle_minimumPadding:function(){this.set_minimumPadding(0);return this.get_minimumPadding()},__maximumPadding:null,get_maximumPadding:function(){return this.__maximumPadding},set_maximumPadding:function(a){if(!this.setStyle("maximumPadding")||this.__maximumPadding==a)return this.__maximumPadding;this._previousClearStyle=m(this,this.clearStyle_maximumPadding);this.__maximumPadding=a;this.setInvalid(x.STYLES);return this.__maximumPadding},
clearStyle_maximumPadding:function(){this.set_maximumPadding(0);return this.get_maximumPadding()},__class__:Wj,__properties__:I(wa.prototype.__properties__,{set_maximumPadding:"set_maximumPadding",get_maximumPadding:"get_maximumPadding",set_minimumPadding:"set_minimumPadding",get_minimumPadding:"get_minimumPadding",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",set_thumbSkin:"set_thumbSkin",
get_thumbSkin:"get_thumbSkin",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var dn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHSliderTheme();Wj.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.hSlider_keyDownHandler))};r["feathers.controls.HSlider"]=
dn;dn.__name__="feathers.controls.HSlider";dn.__super__=Wj;dn.prototype=I(Wj.prototype,{initializeHSliderTheme:function(){bu.initialize()},valueToLocation:function(a){u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow();a=this.normalizeValue(a);var b=this.actualWidth-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_width());return Math.round(this.get_minimumPadding()+b*a)},locationToValue:function(a,b){b=this.actualWidth-
this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_width());a=a-this._pointerStartX-this.get_minimumPadding();return this._minimum+Math.min(Math.max(0,this._thumbStartX+a),b)/b*(this._maximum-this._minimum)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==
null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,
oa)&&this._currentSecondaryTrackSkin.validateNow());f=this.get_explicitWidth();a&&(f=0,this._currentTrackSkin!=null&&(f+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(f+=this._currentSecondaryTrackSkin.get_width())));a=this.get_explicitHeight();b&&(a=0,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&
a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())));b=this.get_explicitMinWidth();c&&(b=0,this._currentTrackSkin!=null&&(b+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(b+=this._secondaryTrackSkinMeasurements.width)));c=this.get_explicitMinHeight();d&&(c=0,this._currentThumbSkin!=null&&(c+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(c<this._currentTrackSkin.get_height()&&(c=this._currentTrackSkin.get_height()),
this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(c=this._currentSecondaryTrackSkin.get_height())));return this.saveMeasurements(f,a,b,c)},saveThumbStart:function(a,b){var c=this.actualWidth;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_width(),a-=this._currentThumbSkin.get_width()/2);this._thumbStartX=Math.min(c-this.get_maximumPadding(),Math.max(this.get_minimumPadding(),a));this._thumbStartY=b},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());
this._currentThumbSkin!=null&&(u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_width()/2));this._currentTrackSkin.set_x(0);this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(this.actualWidth-a);u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow();
this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)},layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_x(0),this._currentTrackSkin.set_width(this.actualWidth),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/
2))},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this.valueToLocation(this._value);this._currentThumbSkin.set_x(a);this._currentThumbSkin.set_y((this.actualHeight-this.get_thumbSkin().get_height())/2)}},hSlider_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()){var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 37:b-=this._step;break;case 39:b+=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&
(b=this._maximum);a.preventDefault();this.set_value(b)}},get_styleContext:function(){return dn},__class__:dn});var Xj=function(){};r["feathers.controls.IGroupedToggle"]=Xj;Xj.__name__="feathers.controls.IGroupedToggle";Xj.__isInterface__=!0;Xj.__interfaces__=[md];Xj.prototype={get_toggleGroup:null,set_toggleGroup:null,__class__:Xj,__properties__:{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"}};var Mq=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=
a;this.itemRendererRecycler=b};r["feathers.controls._ListView.ItemRendererStorage"]=Mq;Mq.__name__="feathers.controls._ListView.ItemRendererStorage";Mq.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:Mq};var id=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__textInputGap=this.__buttonGap=0;this.__buttonDirection=Xi.HORIZONTAL;this.__textInputPosition=Vb.CENTER;this.__customDecrementButtonVariant=
this.__customIncrementButtonVariant=this.__customTextInputVariant=null;this._pendingTextInputChanges=!1;this._previousCustomDecrementButtonVariant=this._previousCustomIncrementButtonVariant=this._previousCustomTextInputVariant=null;this._editable=this._enableButtonsAtRangeLimits=!0;this._snapInterval=0;this._step=.01;this._maximum=1;this._value=this._minimum=0;this._isDefaultValue=!0;this.textInputMeasurements=new Ib;this.incrementButtonMeasurements=new Ib;this.decrementButtonMeasurements=new Ib;
this.initializeNumericStepperTheme();wa.call(this);this.addEventListener("focusIn",m(this,this.numericStepper_focusInHandler));this.set_minimum(b);this.set_maximum(c);this.set_value(a);d!=null&&this.addEventListener("change",d)};r["feathers.controls.NumericStepper"]=id;id.__name__="feathers.controls.NumericStepper";id.__interfaces__=[hi,jl];id.__super__=wa;id.prototype=I(wa.prototype,{decrementButton:null,incrementButton:null,textInput:null,decrementButtonMeasurements:null,incrementButtonMeasurements:null,
textInputMeasurements:null,_isDefaultValue:null,_value:null,get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._isDefaultValue=!1;this._value=a;this.setInvalid(x.DATA);W.dispatch(this,"change");return this._value},_minimum:null,get_minimum:function(){return this._minimum},set_minimum:function(a){if(this._minimum==a)return this._minimum;this._minimum=a;this.setInvalid(x.DATA);return this._minimum},_maximum:null,get_maximum:function(){return this._maximum},
set_maximum:function(a){if(this._maximum==a)return this._maximum;this._maximum=a;this.setInvalid(x.DATA);return this._maximum},_step:null,get_step:function(){return this._step},set_step:function(a){if(this._step==a)return this._step;this._step=a;this.setInvalid(x.DATA);return this._step},_snapInterval:null,get_snapInterval:function(){return this._snapInterval},set_snapInterval:function(a){if(this._snapInterval==a)return this._snapInterval;this._snapInterval=a;this.setInvalid(x.DATA);return this._snapInterval},
_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_enableButtonsAtRangeLimits:null,get_enableButtonsAtRangeLimits:function(){return this._enableButtonsAtRangeLimits},set_enableButtonsAtRangeLimits:function(a){if(this._enableButtonsAtRangeLimits==a)return this._enableButtonsAtRangeLimits;this._enableButtonsAtRangeLimits=a;this.setInvalid(x.STATE);return this._enableButtonsAtRangeLimits},
_valueFormatFunction:null,get_valueFormatFunction:function(){return this._valueFormatFunction},set_valueFormatFunction:function(a){if(this._valueFormatFunction==a)return this._valueFormatFunction;this._valueFormatFunction=a;this.setInvalid(x.DATA);return this._valueFormatFunction},_valueParseFunction:null,get_valueParseFunction:function(){return this._valueParseFunction},set_valueParseFunction:function(a){if(this._valueParseFunction==a)return this._valueParseFunction;this._valueParseFunction=a;this.setInvalid(x.DATA);
return this._valueParseFunction},get_stageFocusTarget:function(){return this.textInput},_oldDecrementButtonFactory:null,_decrementButtonFactory:null,get_decrementButtonFactory:function(){return this._decrementButtonFactory},set_decrementButtonFactory:function(a){if(this._decrementButtonFactory==a)return this._decrementButtonFactory;this._decrementButtonFactory=a;this.setInvalid(id.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);return this._decrementButtonFactory},_oldIncrementButtonFactory:null,_incrementButtonFactory:null,
get_incrementButtonFactory:function(){return this._incrementButtonFactory},set_incrementButtonFactory:function(a){if(this._incrementButtonFactory==a)return this._incrementButtonFactory;this._incrementButtonFactory=a;this.setInvalid(id.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);return this._incrementButtonFactory},_oldTextInputFactory:null,_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;
this._textInputFactory=a;this.setInvalid(id.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_previousCustomDecrementButtonVariant:null,_previousCustomIncrementButtonVariant:null,_previousCustomTextInputVariant:null,_pendingTextInputChanges:null,showFocus:function(a){wa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},dispose:function(){this.destroyDecrementButton();
this.destroyIncrementButton();this.destroyTextInput();wa.prototype.dispose.call(this)},initializeNumericStepperTheme:function(){hu.initialize()},initialize:function(){wa.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.SIZE);var b=this.isInvalid(x.STATE);this.isInvalid(x.STYLES);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(id.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(id.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&this.setInvalidationFlag(id.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(id.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(id.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY),f=this.isInvalid(id.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
c&&this.createDecrementButton();d&&this.createIncrementButton();f&&this.createTextInput();(b||a)&&this.refreshEnabled();b&&this.refreshEditable();a&&this.refreshMeasureText();a&&this.refreshTextInputData();this.measure();this.layoutContent();this._previousCustomTextInputVariant=this.get_customTextInputVariant();this._previousCustomDecrementButtonVariant=this.get_customDecrementButtonVariant();this._previousCustomIncrementButtonVariant=this.get_customIncrementButtonVariant()},measure:function(){var a=
this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this.decrementButtonMeasurements.restore(this.decrementButton);this.decrementButton.validateNow();this.incrementButtonMeasurements.restore(this.incrementButton);this.incrementButton.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();
f=this.get_explicitWidth();a&&(g=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),f=this.get_buttonDirection()==Xi.VERTICAL?this.get_textInputPosition()==Vb.CENTER?Math.max(this.textInput.get_width(),g):this.textInput.get_width()+this.get_textInputGap()+g:this.get_textInputPosition()==Vb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_width():2*g+this.get_buttonGap()+this.get_textInputGap()+this.textInput.get_width());a=this.get_explicitHeight();b&&(g=Math.max(this.decrementButton.get_height(),
this.incrementButton.get_height()),a=this.get_buttonDirection()==Xi.VERTICAL?this.get_textInputPosition()==Vb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_height():Math.max(this.textInput.get_height(),2*g+this.get_buttonGap()):Math.max(this.textInput.get_height(),g));b=this.get_explicitMinWidth();c&&(g=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),b=this.get_buttonDirection()==Xi.VERTICAL?this.get_textInputPosition()==Vb.CENTER?Math.max(this.textInput.get_minWidth(),
g):this.textInput.get_minWidth()+this.get_textInputGap()+g:this.get_textInputPosition()==Vb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_minWidth():2*g+this.get_buttonGap()+this.get_textInputGap()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(g=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height()),c=this.get_buttonDirection()==Xi.VERTICAL?this.get_textInputPosition()==Vb.CENTER?2*(g+this.get_textInputGap())+this.textInput.get_minHeight():Math.max(this.textInput.get_minHeight(),
2*g+this.get_buttonGap()):Math.max(this.textInput.get_minHeight(),g));return this.saveMeasurements(f,a,b,c)},refreshMeasureText:function(){var a=Math.max(Math.max(L.string(this._minimum|0).length,L.string(this._maximum|0).length),L.string(this._step|0).length)|0,b=(Math.max(Math.max(L.string(ff.roundToPrecision(this._minimum-(this._minimum|0),10)).length,L.string(ff.roundToPrecision(this._maximum-(this._maximum|0),10)).length),L.string(ff.roundToPrecision(this._step-(this._step|0),10)).length)|0)-
2;b<0&&(b=0);var c="",d=0;for(a+=b;d<a;)d++,c+="0";b>0&&(c+=".");this.textInput.set_measureText(c)},refreshEnabled:function(){this.decrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._minimum));this.incrementButton.set_enabled(this._enabled&&(this._enableButtonsAtRangeLimits||this._value!=this._maximum));this.textInput.set_enabled(this._enabled)},refreshEditable:function(){this.textInput.set_editable(this._editable)},refreshTextInputData:function(){var a=
ff.roundToPrecision(this._value,10);this._valueFormatFunction!=null?this.textInput.set_text(this._valueFormatFunction(a)):this.textInput.set_text(a==null?"null":""+a)},parseTextInputValue:function(){var a=this._valueParseFunction!=null?this._valueParseFunction(this.textInput.get_text()):parseFloat(this.textInput.get_text());isNaN(a)||(a=this.restrictValue(a),this.set_value(a));this.setInvalid(x.DATA);this._pendingTextInputChanges=!1},layoutContent:function(){this.decrementButton.validateNow();this.incrementButton.validateNow();
this.textInput.validateNow();this.get_buttonDirection()==Xi.VERTICAL?this.layoutContentWithVerticalButtons():this.layoutContentWithHorizontalButtons()},layoutContentWithHorizontalButtons:function(){var a=Math.max(this.decrementButton.get_width(),this.incrementButton.get_width()),b=this.actualWidth;b=this.get_textInputPosition()==Vb.CENTER?b-2*(a+this.get_textInputGap()):b-(2*a+this.get_buttonGap()+this.get_textInputGap());b=Math.max(0,b);this.textInput.get_width()!=b&&this.textInput.set_width(b);
this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=this.actualHeight&&this.decrementButton.set_height(this.actualHeight);this.incrementButton.get_width()!=a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=this.actualHeight&&this.incrementButton.set_height(this.actualHeight);switch(this.get_textInputPosition()._hx_index){case 0:this.textInput.set_x(0);
this.textInput.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.decrementButton.set_x(this.actualWidth-2*a-this.get_buttonGap());this.decrementButton.set_y(0);break;case 1:this.decrementButton.set_x(0);this.decrementButton.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.textInput.set_x(a+this.get_textInputGap());this.textInput.set_y(0);break;case 2:this.decrementButton.set_x(0);this.decrementButton.set_y(0);this.incrementButton.set_x(a+
this.get_buttonGap());this.incrementButton.set_y(0);this.textInput.set_x(this.actualWidth-b);this.textInput.set_y(0);break;default:throw new rb("Invalid text input position: "+L.string(this.get_textInputPosition()));}},layoutContentWithVerticalButtons:function(){switch(this.get_textInputPosition()._hx_index){case 0:var a=Math.max(this.incrementButton.get_width(),this.decrementButton.get_width()),b=(this.actualHeight-this.get_buttonGap())/2,c=Math.max(0,this.actualWidth-a-this.get_textInputGap());
this.textInput.get_width()!=c&&this.textInput.set_width(c);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.textInput.set_x(0);this.textInput.set_y(0);this.incrementButton.set_x(this.actualWidth-a);this.incrementButton.set_y(0);this.incrementButton.get_width()!=a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=b&&this.incrementButton.set_height(b);this.decrementButton.set_x(this.actualWidth-a);this.decrementButton.set_y(this.actualHeight-
b);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);break;case 1:b=Math.max(this.decrementButton.get_height(),this.incrementButton.get_height());a=Math.max(0,this.actualHeight-2*(b+this.get_textInputGap()));this.incrementButton.set_x(0);this.incrementButton.set_y(0);this.incrementButton.get_width()!=this.actualWidth&&this.incrementButton.set_width(this.actualWidth);this.incrementButton.get_height()!=b&&
this.incrementButton.set_height(b);this.textInput.set_x(0);this.textInput.set_y(b+this.get_textInputGap());this.textInput.get_width()!=this.actualWidth&&this.textInput.set_width(this.actualWidth);this.textInput.get_height()!=a&&this.textInput.set_height(a);this.decrementButton.set_x(0);this.decrementButton.set_y(this.actualHeight-b);this.decrementButton.get_width()!=this.actualWidth&&this.decrementButton.set_width(this.actualWidth);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);
break;case 2:a=Math.max(this.incrementButton.get_width(),this.decrementButton.get_width());b=(this.actualHeight-this.get_buttonGap())/2;c=Math.max(0,this.actualWidth-a-this.get_textInputGap());this.textInput.get_width()!=c&&this.textInput.set_width(c);this.textInput.get_height()!=this.actualHeight&&this.textInput.set_height(this.actualHeight);this.textInput.set_x(this.actualWidth-c);this.textInput.set_y(0);this.incrementButton.set_x(0);this.incrementButton.set_y(0);this.incrementButton.get_width()!=
a&&this.incrementButton.set_width(a);this.incrementButton.get_height()!=b&&this.incrementButton.set_height(b);this.decrementButton.set_x(0);this.decrementButton.set_y(this.actualHeight-b);this.decrementButton.get_width()!=a&&this.decrementButton.set_width(a);this.decrementButton.get_height()!=b&&this.decrementButton.set_height(b);break;default:throw new rb("Invalid text input position: "+L.string(this.get_textInputPosition()));}},createDecrementButton:function(){this.destroyDecrementButton();var a=
this._decrementButtonFactory!=null?this._decrementButtonFactory:id.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&this.decrementButton.set_variant(this.get_customDecrementButtonVariant()!=null?this.get_customDecrementButtonVariant():id.CHILD_VARIANT_DECREMENT_BUTTON);this.decrementButton.get_text()==null&&this.decrementButton.set_text("-");this.decrementButton.addEventListener("mouseDown",m(this,this.numericStepper_decrementButton_mouseDownHandler));
this.decrementButton.addEventListener("touchBegin",m(this,this.numericStepper_decrementButton_touchBeginHandler));this.decrementButton.initializeNow();this.decrementButtonMeasurements.save(this.decrementButton);this.addChild(this.decrementButton)},destroyDecrementButton:function(){this.decrementButton!=null&&(this.decrementButton.removeEventListener("mouseDown",m(this,this.numericStepper_decrementButton_mouseDownHandler)),this.decrementButton.removeEventListener("touchBegin",m(this,this.numericStepper_decrementButton_touchBeginHandler)),
this.removeChild(this.decrementButton),this._oldDecrementButtonFactory.destroy!=null&&this._oldDecrementButtonFactory.destroy(this.decrementButton),this.decrementButton=this._oldDecrementButtonFactory=null)},createIncrementButton:function(){this.destroyIncrementButton();var a=this._incrementButtonFactory!=null?this._incrementButtonFactory:id.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&this.incrementButton.set_variant(this.get_customIncrementButtonVariant()!=
null?this.get_customIncrementButtonVariant():id.CHILD_VARIANT_INCREMENT_BUTTON);this.incrementButton.get_text()==null&&this.incrementButton.set_text("+");this.incrementButton.addEventListener("mouseDown",m(this,this.numericStepper_incrementButton_mouseDownHandler));this.incrementButton.addEventListener("touchBegin",m(this,this.numericStepper_incrementButton_touchBeginHandler));this.incrementButton.initializeNow();this.incrementButtonMeasurements.save(this.incrementButton);this.addChild(this.incrementButton)},
destroyIncrementButton:function(){this.incrementButton!=null&&(this.incrementButton.removeEventListener("mouseDown",m(this,this.numericStepper_incrementButton_mouseDownHandler)),this.incrementButton.removeEventListener("touchBegin",m(this,this.numericStepper_incrementButton_touchBeginHandler)),this.removeChild(this.incrementButton),this._oldIncrementButtonFactory.destroy!=null&&this._oldIncrementButtonFactory.destroy(this.incrementButton),this.incrementButton=this._oldIncrementButtonFactory=null)},
createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:id.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.get_variant()==null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():id.CHILD_VARIANT_TEXT_INPUT);this.textInput.addEventListener("keyDown",m(this,this.numericStepper_textInput_keyDownHandler));this.textInput.addEventListener("change",m(this,this.numericStepper_textInput_changeHandler));
this.textInput.addEventListener("focusIn",m(this,this.numericStepper_textInput_focusInHandler));this.textInput.addEventListener("focusOut",m(this,this.numericStepper_textInput_focusOutHandler));this.textInput.initializeNow();this.textInputMeasurements.save(this.textInput);this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=null&&(this.textInput.removeEventListener("keyDown",m(this,this.numericStepper_textInput_keyDownHandler)),this.textInput.removeEventListener("change",m(this,
this.numericStepper_textInput_changeHandler)),this.textInput.removeEventListener("focusIn",m(this,this.numericStepper_textInput_focusInHandler)),this.textInput.removeEventListener("focusOut",m(this,this.numericStepper_textInput_focusOutHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},restrictValue:function(a){this._snapInterval!=0&&a!=this._minimum&&a!=this._maximum&&
(a=ff.roundToNearest(a,this._snapInterval));a<this._minimum?a=this._minimum:a>this._maximum&&(a=this._maximum);return a},decrement:function(){var a=this._value-this._step;a=this.restrictValue(a);this.set_value(a)},increment:function(){var a=this._value+this._step;a=this.restrictValue(a);this.set_value(a)},numericStepper_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),this.stage.set_focus(this.textInput))},
canKeyCodeUpdateValue:function(a){return a!=38&&a!=40&&a!=36?a==35:!0},updateValueWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._enabled&&this.canKeyCodeUpdateValue(a.keyCode)){this.parseTextInputValue();var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 38:b+=this._step;break;case 40:b-=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&(b=this._maximum);a.preventDefault();this.set_value(b);this.textInput.get_selectionActiveIndex()!=
this.textInput.get_selectionAnchorIndex()&&this.textInput.selectRange(this.textInput.get_selectionAnchorIndex(),this.textInput.get_selectionAnchorIndex())}},numericStepper_decrementButton_mouseDownHandler:function(a){this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.decrement()},numericStepper_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&
this.decrement()},numericStepper_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.increment()},numericStepper_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&this.increment()},numericStepper_textInput_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&
(a.keyCode==13?(a.preventDefault(),this.parseTextInputValue()):this.updateValueWithKeyboard(a))},numericStepper_textInput_focusInHandler:function(a){this._pendingTextInputChanges=!1},numericStepper_textInput_changeHandler:function(a){this._pendingTextInputChanges=!0},numericStepper_textInput_focusOutHandler:function(a){this._pendingTextInputChanges&&this.parseTextInputValue()},__customDecrementButtonVariant:null,get_customDecrementButtonVariant:function(){return this.__customDecrementButtonVariant},
set_customDecrementButtonVariant:function(a){if(!this.setStyle("customDecrementButtonVariant")||this.__customDecrementButtonVariant==a)return this.__customDecrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDecrementButtonVariant);this.__customDecrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDecrementButtonVariant},clearStyle_customDecrementButtonVariant:function(){this.set_customDecrementButtonVariant(null);return this.get_customDecrementButtonVariant()},
__customIncrementButtonVariant:null,get_customIncrementButtonVariant:function(){return this.__customIncrementButtonVariant},set_customIncrementButtonVariant:function(a){if(!this.setStyle("customIncrementButtonVariant")||this.__customIncrementButtonVariant==a)return this.__customIncrementButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customIncrementButtonVariant);this.__customIncrementButtonVariant=a;this.setInvalid(x.STYLES);return this.__customIncrementButtonVariant},clearStyle_customIncrementButtonVariant:function(){this.set_customIncrementButtonVariant(null);
return this.get_customIncrementButtonVariant()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);
return this.get_customTextInputVariant()},__textInputPosition:null,get_textInputPosition:function(){return this.__textInputPosition},set_textInputPosition:function(a){if(!this.setStyle("textInputPosition")||this.__textInputPosition==a)return this.__textInputPosition;this._previousClearStyle=m(this,this.clearStyle_textInputPosition);this.__textInputPosition=a;this.setInvalid(x.STYLES);return this.__textInputPosition},clearStyle_textInputPosition:function(){this.set_textInputPosition(Vb.CENTER);return this.get_textInputPosition()},
__buttonDirection:null,get_buttonDirection:function(){return this.__buttonDirection},set_buttonDirection:function(a){if(!this.setStyle("buttonDirection")||this.__buttonDirection==a)return this.__buttonDirection;this._previousClearStyle=m(this,this.clearStyle_buttonDirection);this.__buttonDirection=a;this.setInvalid(x.STYLES);return this.__buttonDirection},clearStyle_buttonDirection:function(){this.set_buttonDirection(Xi.HORIZONTAL);return this.get_buttonDirection()},__textInputGap:null,get_textInputGap:function(){return this.__textInputGap},
set_textInputGap:function(a){if(!this.setStyle("textInputGap")||this.__textInputGap==a)return this.__textInputGap;this._previousClearStyle=m(this,this.clearStyle_textInputGap);this.__textInputGap=a;this.setInvalid(x.STYLES);return this.__textInputGap},clearStyle_textInputGap:function(){this.set_textInputGap(0);return this.get_textInputGap()},__buttonGap:null,get_buttonGap:function(){return this.__buttonGap},set_buttonGap:function(a){if(!this.setStyle("buttonGap")||this.__buttonGap==a)return this.__buttonGap;
this._previousClearStyle=m(this,this.clearStyle_buttonGap);this.__buttonGap=a;this.setInvalid(x.STYLES);return this.__buttonGap},clearStyle_buttonGap:function(){this.set_buttonGap(0);return this.get_buttonGap()},__class__:id,__properties__:I(wa.prototype.__properties__,{set_buttonGap:"set_buttonGap",get_buttonGap:"get_buttonGap",set_textInputGap:"set_textInputGap",get_textInputGap:"get_textInputGap",set_buttonDirection:"set_buttonDirection",get_buttonDirection:"get_buttonDirection",set_textInputPosition:"set_textInputPosition",
get_textInputPosition:"get_textInputPosition",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_customIncrementButtonVariant:"set_customIncrementButtonVariant",get_customIncrementButtonVariant:"get_customIncrementButtonVariant",set_customDecrementButtonVariant:"set_customDecrementButtonVariant",get_customDecrementButtonVariant:"get_customDecrementButtonVariant",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",
set_incrementButtonFactory:"set_incrementButtonFactory",get_incrementButtonFactory:"get_incrementButtonFactory",set_decrementButtonFactory:"set_decrementButtonFactory",get_decrementButtonFactory:"get_decrementButtonFactory",get_stageFocusTarget:"get_stageFocusTarget",set_valueParseFunction:"set_valueParseFunction",get_valueParseFunction:"get_valueParseFunction",set_valueFormatFunction:"set_valueFormatFunction",get_valueFormatFunction:"get_valueFormatFunction",set_enableButtonsAtRangeLimits:"set_enableButtonsAtRangeLimits",
get_enableButtonsAtRangeLimits:"get_enableButtonsAtRangeLimits",set_editable:"set_editable",get_editable:"get_editable",set_snapInterval:"set_snapInterval",get_snapInterval:"get_snapInterval",set_step:"set_step",get_step:"get_step",set_maximum:"set_maximum",get_maximum:"get_maximum",set_minimum:"set_minimum",get_minimum:"get_minimum",set_value:"set_value",get_value:"get_value"})});var Wg=function(a,b){a==null&&(a=-1);this.__customToggleButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=
null;this._currentItemState=new Gu;this._ignoreChildChanges=!1;this._layoutResult=new Cg;this._layoutMeasurements=new Ib;this._interactionMode=en.PREVIOUS_NEXT;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=!1;this._layoutItems=[];this.activeToggleButtons=[];this.inactiveToggleButtons=[];this._toggleButtonRecycler=He.withClass(Yc);this._previousCustomToggleButtonVariant=null;this._selectedIndex=this._maxSelectedIndex=-1;this.initializePageIndicatorTheme();
wa.call(this);this.mouseChildren=this._interactionMode==en.PRECISE;this.set_tabEnabled(!0);this.set_tabChildren(!1);this.set_maxSelectedIndex(a);this.addEventListener("click",m(this,this.pageIndicator_clickHandler));this.addEventListener("touchTap",m(this,this.pageIndicator_touchTapHandler));this.addEventListener("keyDown",m(this,this.pageIndicator_keyDownHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.PageIndicator"]=Wg;Wg.__name__="feathers.controls.PageIndicator";Wg.__interfaces__=
[ld,Vi];Wg.__super__=wa;Wg.prototype=I(wa.prototype,{_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){if(this._selectedIndex==a)return this._selectedIndex;if(a<-1||a>this._maxSelectedIndex)throw new oe("Index "+a+" is out of range "+this._maxSelectedIndex+" for PageIndicator.");this._selectedIndex=a;this.setInvalid(x.DATA);W.dispatch(this,"change");return this._selectedIndex},_maxSelectedIndex:null,get_maxSelectedIndex:function(){return this._maxSelectedIndex},
set_maxSelectedIndex:function(a){if(this._maxSelectedIndex==a)return this._maxSelectedIndex;this._maxSelectedIndex=a;this.setInvalid(x.DATA);this._maxSelectedIndex>=0&&this._selectedIndex<0?this.set_selectedIndex(0):this.get_selectedIndex()>this._maxSelectedIndex&&this.set_selectedIndex(this._maxSelectedIndex);return this._maxSelectedIndex},_previousCustomToggleButtonVariant:null,_oldToggleButtonRecycler:null,_toggleButtonRecycler:null,get_toggleButtonRecycler:function(){return this._toggleButtonRecycler},
set_toggleButtonRecycler:function(a){if(this._toggleButtonRecycler==a)return this._toggleButtonRecycler;this._oldToggleButtonRecycler=this._toggleButtonRecycler;this._toggleButtonRecycler=a;this.setInvalid(Wg.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);return this._toggleButtonRecycler},inactiveToggleButtons:null,activeToggleButtons:null,_layoutItems:null,_ignoreSelectionChange:null,_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_interactionMode:null,get_interactionMode:function(){return this._interactionMode},
set_interactionMode:function(a){if(this._interactionMode==a)return this._interactionMode;this._interactionMode=a;this.mouseChildren=this._interactionMode==en.PRECISE;return this._interactionMode},_layoutMeasurements:null,_layoutResult:null,_ignoreChildChanges:null,_currentItemState:null,indexToToggleButton:function(a){return a<0||a>=this.activeToggleButtons.length?null:this.activeToggleButtons[a]},dispose:function(){this.refreshInactiveToggleButtons(!0);this.set_maxSelectedIndex(-1);wa.prototype.dispose.call(this)},
initializePageIndicatorTheme:function(){iu.initialize()},update:function(){this.isInvalid(x.DATA);var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomToggleButtonVariant!=this.get_customToggleButtonVariant()&&this.setInvalidationFlag(Wg.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);var f=this.isInvalid(Wg.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&
this.refreshToggleButtons();this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomToggleButtonVariant=this.get_customToggleButtonVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){if(!(this.get_layout()instanceof Gh||this.get_layout()instanceof Bg))throw new rb("PageIndicator must use HorizontalLayout or VerticalLayout");var a=this._ignoreChildChanges;
this._ignoreChildChanges=!0;this._layoutResult.reset();this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this.activeToggleButtons;a<b.length;){var c=b[a];++a;c.validateNow()}},refreshToggleButtons:function(){this._layoutItems.length=
0;this._layoutItems.length=this._maxSelectedIndex+1;var a=this.isInvalid(Wg.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);this.refreshInactiveToggleButtons(a);this.recoverInactiveToggleButtons();a=0;for(var b=this._maxSelectedIndex+1;a<b;){var c=a++,d=this.createToggleButton(c);this._layoutItems[c]=d}this.freeInactiveToggleButtons();if(this.inactiveToggleButtons.length>0)throw a=u.getClass(this),new fb(a.__name__+": inactive item renderers should be empty after updating.");},refreshInactiveToggleButtons:function(a){var b=
this.inactiveToggleButtons;this.inactiveToggleButtons=this.activeToggleButtons;this.activeToggleButtons=b;if(this.activeToggleButtons.length>0)throw a=u.getClass(this),new fb(a.__name__+": active item renderers should be empty before updating.");a&&(this.recoverInactiveToggleButtons(),this.freeInactiveToggleButtons(),this._oldToggleButtonRecycler=null)},recoverInactiveToggleButtons:function(){for(var a=this._oldToggleButtonRecycler!=null?this._oldToggleButtonRecycler:this._toggleButtonRecycler,b=
0,c=this.inactiveToggleButtons;b<c.length;){var d=c[b];++b;if(d!=null){d.removeEventListener("change",m(this,this.pageIndicator_toggleButton_changeHandler));this._currentItemState.owner=this;this._currentItemState.index=-1;this._currentItemState.selected=!1;this._currentItemState.enabled=!0;var f=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;a.reset!=null&&a.reset(d,this._currentItemState);d.set_selected(this._currentItemState.selected);d.set_enabled(this._currentItemState.enabled);this._ignoreSelectionChange=
f}}},freeInactiveToggleButtons:function(){for(var a=this._oldToggleButtonRecycler!=null?this._oldToggleButtonRecycler:this._toggleButtonRecycler,b=0,c=this.inactiveToggleButtons;b<c.length;){var d=c[b];++b;d!=null&&this.destroyToggleButton(d,a)}this.inactiveToggleButtons.length=0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},
getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin==null?(this.get_graphics().clear(),this.get_graphics().beginFill(16711935,0),this.get_graphics().drawRect(0,0,this.actualWidth,this.actualHeight),this.get_graphics().endFill()):(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&
this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},createToggleButton:function(a){var b=this._currentBackgroundSkin!=null?1:0;if(this.inactiveToggleButtons.length==0){var c=this._toggleButtonRecycler.create();if(c.get_variant()==null){var d=this.get_customToggleButtonVariant()!=null?this.get_customToggleButtonVariant():
Wg.CHILD_VARIANT_TOGGLE_BUTTON;c.set_variant(d)}c.initializeNow();this.addChildAt(c,a+b)}else c=this.inactiveToggleButtons.shift(),this.setChildIndex(c,a+b);this.refreshToggleButtonProperties(c,a);c.addEventListener("change",m(this,this.pageIndicator_toggleButton_changeHandler));this.activeToggleButtons.push(c);return c},destroyToggleButton:function(a,b){this.removeChild(a);b.destroy!=null&&b.destroy(a)},populateCurrentItemState:function(a){this._currentItemState.owner=this;this._currentItemState.index=
a;this._currentItemState.selected=a==this._selectedIndex;this._currentItemState.enabled=this._enabled},refreshToggleButtonProperties:function(a,b){this.populateCurrentItemState(b);b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this._toggleButtonRecycler.update!=null&&this._toggleButtonRecycler.update(a,this._currentItemState);a.set_selected(this._currentItemState.selected);a.set_enabled(this._currentItemState.enabled);this._ignoreSelectionChange=b},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()){var b=
this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._maxSelectedIndex;break;case 36:b=0;break;case 37:--b;break;case 38:if(a.keyLocation==4)return;++b;break;case 39:++b;break;case 40:if(a.keyLocation==4)return;--b;break;default:return}b<0?b=0:b>this._maxSelectedIndex&&(b=this._maxSelectedIndex);a.preventDefault();this.set_selectedIndex(b)}},pageIndicator_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},pageIndicator_toggleButton_changeHandler:function(a){this._ignoreSelectionChange||
(a=u.__cast(a.currentTarget,Yc),a.get_selected()?this.set_selectedIndex(this.activeToggleButtons.indexOf(a)):a.set_selected(!0))},handleClickOrTap:function(a,b){var c=this._selectedIndex;if(c!=-1){var d=this.activeToggleButtons[c];this.get_layout()instanceof Bg?b<d.get_y()?--c:b>d.get_y()+d.get_height()&&++c:a<d.get_x()?--c:a>d.get_x()+d.get_width()&&++c}c<0?c=0:c>this._maxSelectedIndex&&(c=this._maxSelectedIndex);this.set_selectedIndex(c)},pageIndicator_clickHandler:function(a){this._enabled&&this._interactionMode==
en.PREVIOUS_NEXT&&this.handleClickOrTap(a.localX,a.localY)},pageIndicator_touchTapHandler:function(a){this._enabled&&this._interactionMode==en.PREVIOUS_NEXT&&(a.isPrimaryTouchPoint||this.handleClickOrTap(a.localX,a.localY))},__customToggleButtonVariant:null,get_customToggleButtonVariant:function(){return this.__customToggleButtonVariant},set_customToggleButtonVariant:function(a){if(!this.setStyle("customToggleButtonVariant")||this.__customToggleButtonVariant==a)return this.__customToggleButtonVariant;
this._previousClearStyle=m(this,this.clearStyle_customToggleButtonVariant);this.__customToggleButtonVariant=a;this.setInvalid(x.STYLES);return this.__customToggleButtonVariant},clearStyle_customToggleButtonVariant:function(){this.set_customToggleButtonVariant(null);return this.get_customToggleButtonVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);
this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);
return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Wg},__class__:Wg,__properties__:I(wa.prototype.__properties__,{set_interactionMode:"set_interactionMode",get_interactionMode:"get_interactionMode",set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_toggleButtonRecycler:"set_toggleButtonRecycler",
get_toggleButtonRecycler:"get_toggleButtonRecycler",set_customToggleButtonVariant:"set_customToggleButtonVariant",get_customToggleButtonVariant:"get_customToggleButtonVariant",set_maxSelectedIndex:"set_maxSelectedIndex",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex"})});var en=O["feathers.controls.PageIndicatorInteractionMode"]={__ename__:"feathers.controls.PageIndicatorInteractionMode",__constructs__:null,PREVIOUS_NEXT:{_hx_name:"PREVIOUS_NEXT",
_hx_index:0,__enum__:"feathers.controls.PageIndicatorInteractionMode",toString:D},PRECISE:{_hx_name:"PRECISE",_hx_index:1,__enum__:"feathers.controls.PageIndicatorInteractionMode",toString:D}};en.__constructs__=[en.PREVIOUS_NEXT,en.PRECISE];var Kd=function(){this.__customTextInputVariant=this.__customButtonVariant=this.__customDatePickerVariant=null;this.__popUpAdapter=new Ek;this.openDatePickerOnFocus=!1;this._previousCustomTextInputVariant=this._previousCustomButtonVariant=this._previousCustomDatePickerVariant=
this._requestedLocaleIDName=this._actualLocaleIDName=this._customMonthNames=this._customWeekdayNames=this._customStartOfWeek=this._filterText=null;this._ignoreTextInputChange=this._ignoreDatePickerChange=!1;this._selectedDate=null;this.textInputMeasurements=new Ib;this.buttonMeasurements=new Ib;this.initializePopUpDatePickerTheme();wa.call(this);this.addEventListener("focusIn",m(this,this.popUpDatePicker_focusInHandler))};r["feathers.controls.PopUpDatePicker"]=Kd;Kd.__name__="feathers.controls.PopUpDatePicker";
Kd.__interfaces__=[hi,ld,zo];Kd.__super__=wa;Kd.prototype=I(wa.prototype,{button:null,textInput:null,datePicker:null,buttonMeasurements:null,textInputMeasurements:null,get_stageFocusTarget:function(){return this.textInput},_currentDateFormatter:null,_selectedDate:null,get_selectedDate:function(){return this._selectedDate},set_selectedDate:function(a){if(this._selectedDate==a)return this._selectedDate;this._selectedDate=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedDate},
_prompt:null,get_prompt:function(){return this._prompt},set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},_ignoreTextInputChange:null,_ignoreDatePickerChange:null,_previousCustomTextInputVariant:null,_previousCustomButtonVariant:null,_previousCustomDatePickerVariant:null,_oldButtonFactory:null,_buttonFactory:null,get_buttonFactory:function(){return this._buttonFactory},set_buttonFactory:function(a){if(this._buttonFactory==a)return this._buttonFactory;
this._buttonFactory=a;this.setInvalid(Kd.INVALIDATION_FLAG_BUTTON_FACTORY);return this._buttonFactory},_oldTextInputFactory:null,_textInputFactory:null,get_textInputFactory:function(){return this._textInputFactory},set_textInputFactory:function(a){if(this._textInputFactory==a)return this._textInputFactory;this._textInputFactory=a;this.setInvalid(Kd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_oldDatePickerFactory:null,_datePickerFactory:null,get_datePickerFactory:function(){return this._datePickerFactory},
set_datePickerFactory:function(a){if(this._datePickerFactory==a)return this._datePickerFactory;this._datePickerFactory=a;this.setInvalid(Kd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);return this._datePickerFactory},_requestedLocaleIDName:null,get_requestedLocaleIDName:function(){return this._requestedLocaleIDName},set_requestedLocaleIDName:function(a){if(this._requestedLocaleIDName==a)return this._requestedLocaleIDName;this._requestedLocaleIDName=a;this._actualLocaleIDName=null;this.setInvalid(x.DATA);
return this._requestedLocaleIDName},_actualLocaleIDName:null,get_actualLocaleIDName:function(){return this._actualLocaleIDName},_customMonthNames:null,get_customMonthNames:function(){return this._customMonthNames},set_customMonthNames:function(a){if(a!=null&&a.length!=12)throw new rb("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(x.DATA);return this._customMonthNames},_customWeekdayNames:null,
get_customWeekdayNames:function(){return this._customWeekdayNames},set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new rb("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(x.DATA);return this._customWeekdayNames},_customStartOfWeek:null,get_customStartOfWeek:function(){return this._customStartOfWeek},set_customStartOfWeek:function(a){if(a!=null&&(a<0||a>6))throw new oe("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(x.DATA);return this._customStartOfWeek},get_open:function(){return this.datePicker!=null?this.datePicker.parent!=null:!1},_filterText:null,showFocus:function(a){wa.prototype.showFocus.call(this,a);this.textInput!=null&&this.textInput.showFocus(a)},openDatePickerOnFocus:null,openDatePicker:function(){if(!this.get_open()&&this.stage!=null){this.validateNow();this.get_popUpAdapter().addEventListener("open",
m(this,this.popUpDatePicker_popUpAdapter_openHandler));this.get_popUpAdapter().addEventListener("close",m(this,this.popUpDatePicker_popUpAdapter_closeHandler));this.get_popUpAdapter().open(this.datePicker,this);if(this.get_selectedDate()!=null)this.datePicker.set_displayedFullYear(this.get_selectedDate().getFullYear()),this.datePicker.set_displayedMonth(this.get_selectedDate().getMonth());else{var a=new Date;this.datePicker.set_displayedFullYear(a.getFullYear());this.datePicker.set_displayedMonth(a.getMonth())}this.datePicker.validateNow();
this.textInput.addEventListener("focusOut",m(this,this.popUpDatePicker_textInput_focusOutHandler));this.datePicker.addEventListener("removedFromStage",m(this,this.popUpDatePicker_datePicker_removedFromStageHandler));this.stage.addEventListener("mouseDown",m(this,this.popUpDatePicker_stage_mouseDownHandler),!1,0,!0);this.stage.addEventListener("touchBegin",m(this,this.popUpDatePicker_stage_touchBeginHandler),!1,0,!0);this.datePicker.get_focusManager()!=null?this.datePicker.get_focusManager().set_focus(this.datePicker):
this.stage.set_focus(this.datePicker)}},closeDatePicker:function(){this.get_open()&&this.get_popUpAdapter().close()},dispose:function(){this.destroyButton();this.destroyTextInput();this.destroyDatePicker();wa.prototype.dispose.call(this)},initializePopUpDatePickerTheme:function(){Zm.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(Kd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Kd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomDatePickerVariant!=this.get_customDatePickerVariant()&&this.setInvalidationFlag(Kd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);var d=this.isInvalid(Kd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Kd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid(Kd.INVALIDATION_FLAG_DATE_PICKER_FACTORY);d&&this.createButton();f&&this.createTextInput();g&&this.createDatePicker();
a&&this.refreshLocale();(a||b||g)&&this.refreshDatePickerData();(a||b||f)&&this.refreshTextInputData();(c||g||d||f)&&this.refreshEnabled();this.measure();this.layoutChildren();this._previousCustomTextInputVariant=this.get_customTextInputVariant();this._previousCustomButtonVariant=this.get_customButtonVariant();this._previousCustomDatePickerVariant=this.get_customDatePickerVariant()},createButton:function(){this.destroyButton();var a=this._buttonFactory!=null?this._buttonFactory:Kd.defaultButtonFactory;
this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Kd.CHILD_VARIANT_BUTTON);this.button.set_focusEnabled(!1);this.button.addEventListener("mouseDown",m(this,this.popUpDatePicker_button_mouseDownHandler));this.button.addEventListener("touchBegin",m(this,this.popUpDatePicker_button_touchBeginHandler));this.button.initializeNow();this.buttonMeasurements.save(this.button);this.addChild(this.button)},
destroyButton:function(){this.button!=null&&(this.button.removeEventListener("mouseDown",m(this,this.popUpDatePicker_button_mouseDownHandler)),this.button.removeEventListener("touchBegin",m(this,this.popUpDatePicker_button_touchBeginHandler)),this.removeChild(this.button),this._oldButtonFactory.destroy!=null&&this._oldButtonFactory.destroy(this.button),this.button=this._oldButtonFactory=null)},createTextInput:function(){this.destroyTextInput();var a=this._textInputFactory!=null?this._textInputFactory:
Kd.defaultTextInputFactory;this._oldTextInputFactory=a;this.textInput=a.create();this.textInput.set_editable(!1);this.textInput.get_variant()==null&&this.textInput.set_variant(this.get_customTextInputVariant()!=null?this.get_customTextInputVariant():Kd.CHILD_VARIANT_TEXT_INPUT);this.textInput.initializeNow();this.textInputMeasurements.save(this.textInput);this.textInput.addEventListener("mouseDown",m(this,this.popUpDatePicker_textInput_mouseDownHandler));this.addChild(this.textInput)},destroyTextInput:function(){this.textInput!=
null&&(this.textInput.removeEventListener("mouseDown",m(this,this.popUpDatePicker_textInput_mouseDownHandler)),this.removeChild(this.textInput),this._oldTextInputFactory.destroy!=null&&this._oldTextInputFactory.destroy(this.textInput),this.textInput=this._oldTextInputFactory=null)},createDatePicker:function(){this.destroyDatePicker();var a=this._datePickerFactory!=null?this._datePickerFactory:Kd.defaultDatePickerFactory;this._oldDatePickerFactory=a;this.datePicker=a.create();this.datePicker.set_focusOwner(this);
this.datePicker.set_focusEnabled(!1);this.datePicker.get_variant()==null&&this.datePicker.set_variant(this.get_customDatePickerVariant()!=null?this.get_customDatePickerVariant():Kd.CHILD_VARIANT_DATE_PICKER);this.datePicker.addEventListener("change",m(this,this.popUpDatePicker_datePicker_changeHandler));this.datePicker.addEventListener("itemTrigger",m(this,this.popUpDatePicker_datePicker_itemTriggerHandler))},destroyDatePicker:function(){this.datePicker!=null&&(this.datePicker.removeEventListener("change",
m(this,this.popUpDatePicker_datePicker_changeHandler)),this.datePicker.removeEventListener("itemTrigger",m(this,this.popUpDatePicker_datePicker_itemTriggerHandler)),this.datePicker.set_focusOwner(null),this._oldDatePickerFactory.destroy!=null&&this._oldDatePickerFactory.destroy(this.datePicker),this.datePicker=this._oldDatePickerFactory=null)},refreshLocale:function(){this._currentDateFormatter=new Bo(this._requestedLocaleIDName!=null?this._requestedLocaleIDName:"i-default",4,3);this._actualLocaleIDName=
this._currentDateFormatter.actualLocaleIDName},refreshDatePickerData:function(){var a=this._ignoreDatePickerChange;this._ignoreDatePickerChange=!0;this.datePicker.set_requestedLocaleIDName(this._requestedLocaleIDName);this.datePicker.set_selectedDate(this._selectedDate);this.datePicker.set_customMonthNames(this._customMonthNames);this.datePicker.set_customWeekdayNames(this._customWeekdayNames);this.datePicker.set_customStartOfWeek(this._customStartOfWeek);this._ignoreDatePickerChange=a},refreshTextInputData:function(){this.textInput.set_prompt(this._prompt);
this._selectedDate!=null?this.textInput.set_text(this._currentDateFormatter.format(this._selectedDate)):this.textInput.set_text("")},refreshEnabled:function(){this.button.set_enabled(this._enabled);this.textInput.set_enabled(this._enabled);this.datePicker.set_enabled(this._enabled)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==
null;if(!(a||b||c||d||f||g))return!1;this.buttonMeasurements.restore(this.button);this.button.validateNow();this.textInputMeasurements.restore(this.textInput);this.textInput.validateNow();f=this.get_explicitWidth();a&&(f=this.button.get_width()+this.textInput.get_width());a=this.get_explicitHeight();b&&(a=Math.max(this.button.get_height(),this.textInput.get_height()));b=this.get_explicitMinWidth();c&&(b=this.button.get_minWidth()+this.textInput.get_minWidth());c=this.get_explicitMinHeight();d&&(c=
Math.max(this.button.get_minHeight(),this.textInput.get_minHeight()));return this.saveMeasurements(f,a,b,c)},layoutChildren:function(){this.button.validateNow();this.button.set_x(this.actualWidth-this.button.get_width());this.button.set_y(0);this.button.get_height()!=this.actualHeight&&this.button.set_height(this.actualHeight);this.textInput.set_x(0);this.textInput.set_y(0);var a=this.actualWidth-this.button.get_width();this.textInput.get_width()!=a&&this.textInput.set_width(a);this.textInput.get_height()!=
this.actualHeight&&this.textInput.set_height(this.actualHeight);this.button.validateNow();this.textInput.validateNow()},popUpDatePicker_textInput_focusOutHandler:function(a){(a.relatedObject==null||a.relatedObject!=this.datePicker&&!this.datePicker.contains(a.relatedObject))&&this.closeDatePicker()},popUpDatePicker_button_mouseDownHandler:function(a){this._enabled&&(this.get_open()?this.closeDatePicker():this.openDatePicker())},popUpDatePicker_button_touchBeginHandler:function(a){this._enabled&&(a.isPrimaryTouchPoint||
(this.get_open()?this.closeDatePicker():this.openDatePicker()))},popUpDatePicker_datePicker_changeHandler:function(a){this._ignoreDatePickerChange||this.set_selectedDate(this.datePicker.get_selectedDate())},popUpDatePicker_datePicker_itemTriggerHandler:function(a){this.dispatchEvent(a);this.get_popUpAdapter()!=null&&this.get_popUpAdapter().get_persistent()||this.closeDatePicker()},popUpDatePicker_datePicker_removedFromStageHandler:function(a){this.textInput.removeEventListener("focusOut",m(this,this.popUpDatePicker_textInput_focusOutHandler));
this.datePicker.removeEventListener("removedFromStage",m(this,this.popUpDatePicker_datePicker_removedFromStageHandler));this.stage.removeEventListener("mouseDown",m(this,this.popUpDatePicker_stage_mouseDownHandler));this.stage.removeEventListener("touchBegin",m(this,this.popUpDatePicker_stage_touchBeginHandler))},popUpDatePicker_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textInput==null||this.textInput.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),
this.stage.set_focus(this.textInput))},popUpDatePicker_removedFromStageHandler:function(a){this.closeDatePicker()},popUpDatePicker_keyUpHandler:function(a){if(this._enabled)switch(a.keyCode){case 27:if(a.isDefaultPrevented())break;if(!this.get_open())break;a.preventDefault();this.closeDatePicker();break;case 1073742094:!a.isDefaultPrevented()&&this.get_open()&&(a.preventDefault(),this.closeDatePicker())}},popUpDatePicker_stage_mouseDownHandler:function(a){this.hitTestPoint(a.stageX,a.stageY)||this.datePicker.hitTestPoint(a.stageX,
a.stageY)||this.closeDatePicker()},popUpDatePicker_stage_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this.hitTestPoint(a.stageX,a.stageY)||this.datePicker.hitTestPoint(a.stageX,a.stageY)||this.closeDatePicker()},popUpDatePicker_popUpAdapter_openHandler:function(a){W.dispatch(this,"open")},popUpDatePicker_popUpAdapter_closeHandler:function(a){this.get_popUpAdapter().removeEventListener("open",m(this,this.popUpDatePicker_popUpAdapter_openHandler));this.get_popUpAdapter().removeEventListener("close",
m(this,this.popUpDatePicker_popUpAdapter_closeHandler));W.dispatch(this,"close")},popUpDatePicker_textInput_mouseDownHandler:function(a){this.get_enabled()&&this.openDatePicker()},__popUpAdapter:null,get_popUpAdapter:function(){return this.__popUpAdapter},set_popUpAdapter:function(a){if(!this.setStyle("popUpAdapter")||this.__popUpAdapter==a)return this.__popUpAdapter;this._previousClearStyle=m(this,this.clearStyle_popUpAdapter);this.__popUpAdapter=a;this.setInvalid(x.STYLES);return this.__popUpAdapter},
clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new Ek);return this.get_popUpAdapter()},__customTextInputVariant:null,get_customTextInputVariant:function(){return this.__customTextInputVariant},set_customTextInputVariant:function(a){if(!this.setStyle("customTextInputVariant")||this.__customTextInputVariant==a)return this.__customTextInputVariant;this._previousClearStyle=m(this,this.clearStyle_customTextInputVariant);this.__customTextInputVariant=a;this.setInvalid(x.STYLES);return this.__customTextInputVariant},
clearStyle_customTextInputVariant:function(){this.set_customTextInputVariant(null);return this.get_customTextInputVariant()},__customButtonVariant:null,get_customButtonVariant:function(){return this.__customButtonVariant},set_customButtonVariant:function(a){if(!this.setStyle("customButtonVariant")||this.__customButtonVariant==a)return this.__customButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customButtonVariant);this.__customButtonVariant=a;this.setInvalid(x.STYLES);return this.__customButtonVariant},
clearStyle_customButtonVariant:function(){this.set_customButtonVariant(null);return this.get_customButtonVariant()},__customDatePickerVariant:null,get_customDatePickerVariant:function(){return this.__customDatePickerVariant},set_customDatePickerVariant:function(a){if(!this.setStyle("customDatePickerVariant")||this.__customDatePickerVariant==a)return this.__customDatePickerVariant;this._previousClearStyle=m(this,this.clearStyle_customDatePickerVariant);this.__customDatePickerVariant=a;this.setInvalid(x.STYLES);
return this.__customDatePickerVariant},clearStyle_customDatePickerVariant:function(){this.set_customDatePickerVariant(null);return this.get_customDatePickerVariant()},get_styleContext:function(){return Kd},__class__:Kd,__properties__:I(wa.prototype.__properties__,{get_open:"get_open",set_customStartOfWeek:"set_customStartOfWeek",get_customStartOfWeek:"get_customStartOfWeek",set_customWeekdayNames:"set_customWeekdayNames",get_customWeekdayNames:"get_customWeekdayNames",set_customMonthNames:"set_customMonthNames",
get_customMonthNames:"get_customMonthNames",get_actualLocaleIDName:"get_actualLocaleIDName",set_requestedLocaleIDName:"set_requestedLocaleIDName",get_requestedLocaleIDName:"get_requestedLocaleIDName",set_datePickerFactory:"set_datePickerFactory",get_datePickerFactory:"get_datePickerFactory",set_textInputFactory:"set_textInputFactory",get_textInputFactory:"get_textInputFactory",set_buttonFactory:"set_buttonFactory",get_buttonFactory:"get_buttonFactory",set_customDatePickerVariant:"set_customDatePickerVariant",
get_customDatePickerVariant:"get_customDatePickerVariant",set_customButtonVariant:"set_customButtonVariant",get_customButtonVariant:"get_customButtonVariant",set_customTextInputVariant:"set_customTextInputVariant",get_customTextInputVariant:"get_customTextInputVariant",set_popUpAdapter:"set_popUpAdapter",get_popUpAdapter:"get_popUpAdapter",set_prompt:"set_prompt",get_prompt:"get_prompt",set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate",get_stageFocusTarget:"get_stageFocusTarget"})});
var Vq=O["feathers.controls.ProgressBarFillMode"]={__ename__:"feathers.controls.ProgressBarFillMode",__constructs__:null,MASK:{_hx_name:"MASK",_hx_index:0,__enum__:"feathers.controls.ProgressBarFillMode",toString:D},SCROLL_RECT:{_hx_name:"SCROLL_RECT",_hx_index:1,__enum__:"feathers.controls.ProgressBarFillMode",toString:D},RESIZE:{_hx_name:"RESIZE",_hx_index:2,__enum__:"feathers.controls.ProgressBarFillMode",toString:D}};Vq.__constructs__=[Vq.MASK,Vq.SCROLL_RECT,Vq.RESIZE];var Io=function(){this._requireSelection=
!0;this._selectedIndex=-1;this._ignoreChanges=!1;this._items=[];na.call(this)};r["feathers.core.ToggleGroup"]=Io;Io.__name__="feathers.core.ToggleGroup";Io.__interfaces__=[ii,Vi];Io.__super__=na;Io.prototype=I(na.prototype,{_items:null,get_numItems:function(){return this._items.length},_ignoreChanges:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){var b=this._items.length;if(a<-1||a>b)throw new oe("Index "+a+" is out of range "+b+" for ToggleGroup.");
b=this._selectedIndex!=a;this._selectedIndex=a;var c=this._ignoreChanges;this._ignoreChanges=!0;for(var d=0,f=this._items.length;d<f;){var g=d++;this._items[g].set_selected(g==a)}this._ignoreChanges=c;b&&W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._items.length-1},get_selectedItem:function(){return this._selectedIndex==-1?null:this._items[this._selectedIndex]},set_selectedItem:function(a){this.set_selectedIndex(this._items.indexOf(a));return this.get_selectedItem()},
_requireSelection:null,get_requireSelection:function(){return this._requireSelection},set_requireSelection:function(a){if(this._requireSelection==a)return this._requireSelection;(this._requireSelection=a)&&this._selectedIndex==-1&&this._items.length>0&&this.set_selectedIndex(0);return this._requireSelection},addItem:function(a){if(a==null)throw new rb("IToggle passed to ToggleGroup addItem() must not be null.");if(this._items.indexOf(a)!=-1)throw new fb("Cannot add an item to a ToggleGroup more than once.");
this._items.push(a);a.get_selected()?this.set_selectedItem(a):this._selectedIndex<0&&this._requireSelection?this.set_selectedItem(a):a.set_selected(!1);a.addEventListener("change",m(this,this.item_changeHandler),!1,0,!0);u.__implements(a,Xj)&&a.set_toggleGroup(this)},removeItem:function(a){var b=this._items.indexOf(a);b!=-1&&(X.remove(this._items,a),a.removeEventListener("change",m(this,this.item_changeHandler)),u.__implements(a,Xj)&&a.set_toggleGroup(null),this._selectedIndex>b?this.set_selectedIndex(this.get_selectedIndex()-
1):this.get_selectedIndex()==b&&(this._requireSelection?(a=this._items.length-1,this._selectedIndex>a?this.set_selectedIndex(a):W.dispatch(this,"change")):this.set_selectedIndex(-1)))},removeAllItems:function(){for(var a=0,b=this._items;a<b.length;){var c=b[a];++a;c.removeEventListener("change",m(this,this.item_changeHandler));u.__implements(c,Xj)&&c.set_toggleGroup(null)}this._items.length=0;this.set_selectedIndex(-1)},hasItem:function(a){return this._items.indexOf(a)!=-1},getItemAt:function(a){if(a<
0||a>=this._items.length)throw new oe("The supplied index is out of bounds.");return this._items[a]},getItemIndex:function(a){return this._items.indexOf(a)},setItemIndex:function(a,b){var c=this._items.indexOf(a);if(c<0)throw new rb("Attempting to set index of an item that has not been added to this ToggleGroup.");c!=b&&(X.remove(this._items,a),this._items.splice(b,0,a),this._selectedIndex>=0&&(this._selectedIndex==c?this.set_selectedIndex(b):c<this._selectedIndex&&b>this._selectedIndex?this.set_selectedIndex(this.get_selectedIndex()-
1):c>this._selectedIndex&&b<this._selectedIndex&&this.set_selectedIndex(this.get_selectedIndex()+1)))},item_changeHandler:function(a){if(!this._ignoreChanges){a=u.__cast(a.currentTarget,md);var b=this._items.indexOf(a);a.get_selected()||this._requireSelection&&this._selectedIndex==b?this.set_selectedIndex(b):a.get_selected()||this.set_selectedIndex(-1)}},__class__:Io,__properties__:{set_requireSelection:"set_requireSelection",get_requireSelection:"get_requireSelection",set_selectedItem:"set_selectedItem",
get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",get_numItems:"get_numItems"}});var Yi=function(a,b,c){b==null&&(b=!1);this._toggleGroup=null;this.initializeRadioTheme();Yc.call(this,a,b);Yc.prototype.set_toggleable.call(this,!0);this.addEventListener("addedToStage",m(this,this.radio_addedToStageHandler));this.addEventListener("keyDown",m(this,this.radio_keyDownHandler));c!=null&&this.addEventListener("change",
c)};r["feathers.controls.Radio"]=Yi;Yi.__name__="feathers.controls.Radio";Yi.__interfaces__=[Xj];Yi.__super__=Yc;Yi.prototype=I(Yc.prototype,{set_toggleable:function(a){throw new fb("Radio toggleable must always be true");},_toggleGroup:null,get_toggleGroup:function(){return this._toggleGroup},set_toggleGroup:function(a){if(this._toggleGroup==a)return this._toggleGroup;a==null&&this._toggleGroup!=Yi.defaultRadioGroup&&this.stage!=null&&(a=Yi.defaultRadioGroup);this._toggleGroup!=null&&this._toggleGroup.hasItem(this)&&
this._toggleGroup.removeItem(this);this._toggleGroup=a;this._toggleGroup==null||this._toggleGroup.hasItem(this)||this._toggleGroup.addItem(this);return this._toggleGroup},dispose:function(){this._toggleGroup!=null&&this.set_toggleGroup(null);Yc.prototype.dispose.call(this)},initializeRadioTheme:function(){lu.initialize()},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._toggleGroup!=null&&a.keyLocation!=4){var b=this._toggleGroup.getItemIndex(this);if(b!=-1){for(var c=!0,d=-1;c;){c=
!1;switch(a.keyCode){case 37:--b;break;case 38:--b;break;case 39:++b;break;case 40:++b;break;default:return}b<0?b=0:b>=this._toggleGroup.get_numItems()&&(b=this._toggleGroup.get_numItems()-1);if(!this._toggleGroup.getItemAt(b).get_enabled()){if(b==d)return;c=!0}d=b}a.preventDefault();this._toggleGroup.set_selectedIndex(b);a=u.__cast(this._toggleGroup.get_selectedItem(),ld);this._focusManager!=null?(this._focusManager.set_focus(a),a.showFocus(!0)):this.stage.set_focus(u.__cast(a,Da))}}},radio_addedToStageHandler:function(a){this._toggleGroup==
null&&this.set_toggleGroup(Yi.defaultRadioGroup);this.addEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler))},radio_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler));this._toggleGroup==Yi.defaultRadioGroup&&this._toggleGroup.removeItem(this)},radio_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},get_styleContext:function(){return Yi},__class__:Yi,__properties__:I(Yc.prototype.__properties__,
{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"})});var uj=O["feathers.controls.ScrollMode"]={__ename__:"feathers.controls.ScrollMode",__constructs__:null,SCROLL_RECT:{_hx_name:"SCROLL_RECT",_hx_index:0,__enum__:"feathers.controls.ScrollMode",toString:D},MASK:{_hx_name:"MASK",_hx_index:1,__enum__:"feathers.controls.ScrollMode",toString:D},MASKLESS:{_hx_name:"MASKLESS",_hx_index:2,__enum__:"feathers.controls.ScrollMode",toString:D}};uj.__constructs__=[uj.SCROLL_RECT,uj.MASK,uj.MASKLESS];
var Ee=O["feathers.controls.ScrollPolicy"]={__ename__:"feathers.controls.ScrollPolicy",__constructs__:null,ON:{_hx_name:"ON",_hx_index:0,__enum__:"feathers.controls.ScrollPolicy",toString:D},OFF:{_hx_name:"OFF",_hx_index:1,__enum__:"feathers.controls.ScrollPolicy",toString:D},AUTO:{_hx_name:"AUTO",_hx_index:2,__enum__:"feathers.controls.ScrollPolicy",toString:D}};Ee.__constructs__=[Ee.ON,Ee.OFF,Ee.AUTO];var Jo=function(a,b,c,d){b==null&&(b=-1);this.enabled=!0;this.selected=!1;this.index=-1;this.data=
a;this.index=b;this.selected=!1;this.text=d};r["feathers.data.TabBarItemState"]=Jo;Jo.__name__="feathers.data.TabBarItemState";Jo.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Jo};var ye=function(a,b){this.__customTabVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Cg;this._layoutMeasurements=new Ib;this._currentBackgroundSkin=this._backgroundSkinMeasurements=
null;this._ignoreSelectionChange=!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=new Tb(function(){return new Jo});this.tabToItemState=new Na;this.stringDataToTab=new aa;this.objectDataToTab=new Na;this._additionalStorage=null;this._defaultStorage=new Wq(null,He.withClass(Yc));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._selectedItem=this._previousCustomTabVariant=null;this._selectedIndex=-1;this._dataProvider=null;this.initializeTabBarTheme();wa.call(this);this.set_dataProvider(a);
this.set_tabEnabled(!0);this.set_tabChildren(!1);this.addEventListener("keyDown",m(this,this.tabBar_keyDownHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.TabBar"]=ye;ye.__name__="feathers.controls.TabBar";ye.__interfaces__=[ld,ii,Vi];ye.defaultUpdateTab=function(a,b){a.set_text(b.text)};ye.defaultResetTab=function(a,b){a.set_text(null)};ye.__super__=wa;ye.prototype=I(wa.prototype,{_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==
a)return this._dataProvider;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.tabBar_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.tabBar_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.tabBar_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.tabBar_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",
m(this,this.tabBar_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.tabBar_dataProvider_resetHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.tabBar_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.tabBar_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.tabBar_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",
m(this,this.tabBar_dataProvider_updateAllHandler)));var b=this._selectedIndex,c=this._selectedItem;this._dataProvider=a;this._dataProvider!=null&&(this._dataProvider.addEventListener("change",m(this,this.tabBar_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.tabBar_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.tabBar_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.tabBar_dataProvider_replaceItemHandler)),
this._dataProvider.addEventListener("removeAll",m(this,this.tabBar_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.tabBar_dataProvider_resetHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.tabBar_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.tabBar_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.tabBar_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",
m(this,this.tabBar_dataProvider_updateAllHandler)));this._dataProvider==null||this._dataProvider.get_length()==0?(this._selectedIndex=-1,this._selectedItem=null):(this._selectedIndex=0,this._selectedItem=this._dataProvider.get(0));if(this._selectedIndex!=b||this._selectedItem!=c)this.setInvalid(x.SELECTION),W.dispatch(this,"change");this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==
null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;if(a==-1)return this._selectedIndex=-1,this._selectedItem=null,this.setInvalid(x.SELECTION),W.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},
set_selectedItem:function(a){if(a==null||this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;var b=this._dataProvider.indexOf(a);if(b==-1)return this.set_selectedIndex(-1),this._selectedItem;if(this._selectedItem==a&&this._selectedIndex==b)return this._selectedItem;this._selectedIndex=b;this._selectedItem=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_previousCustomTabVariant:null,get_tabRecycler:function(){return this._defaultStorage.tabRecycler},
set_tabRecycler:function(a){if(this._defaultStorage.tabRecycler==a)return this._defaultStorage.tabRecycler;this._defaultStorage.oldTabRecycler=this._defaultStorage.tabRecycler;this._defaultStorage.tabRecycler=a;this.setInvalid(ye.INVALIDATION_FLAG_TAB_FACTORY);return this._defaultStorage.tabRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;
this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,_tabRecyclerIDFunction:null,get_tabRecyclerIDFunction:function(){return this._tabRecyclerIDFunction},set_tabRecyclerIDFunction:function(a){if(this._tabRecyclerIDFunction==a)return this._tabRecyclerIDFunction;this._tabRecyclerIDFunction=a;this.setInvalid(ye.INVALIDATION_FLAG_TAB_FACTORY);return this._tabRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToTab:null,stringDataToTab:null,
tabToItemState:null,itemStatePool:null,_unrenderedData:null,_layoutItems:null,_ignoreSelectionChange:null,itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},_currentBackgroundSkin:null,_backgroundSkinMeasurements:null,_layoutMeasurements:null,_layoutResult:null,_ignoreChildChanges:null,itemToTab:function(a){return a==null?null:typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__]},indexToTab:function(a){if(this._dataProvider==null||a<0||a>=this._dataProvider.get_length())return null;
a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__]},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToTab.h[a]:this.objectDataToTab.h[a.__id__];if(b!=null)b=this.tabToItemState.h[b.__id__];else{var c=this._dataProvider.indexOf(a);if(c==-1)return null;b=new Jo;this.populateCurrentItemState(a,c,b,!1)}return b},getTabRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},
setTabRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new aa);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(ye.INVALIDATION_FLAG_TAB_FACTORY))},dispose:function(){this.refreshInactiveTabs(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveTabs(this._additionalStorage[c],!0)}this._selectedItem=null;this._selectedIndex=
-1;this.set_dataProvider(null);wa.prototype.dispose.call(this)},initializeTabBarTheme:function(){ou.initialize()},update:function(){var a=this.isInvalid(x.DATA);this.isInvalid(x.LAYOUT);var b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomTabVariant!=this.get_customTabVariant()&&this.setInvalidationFlag(ye.INVALIDATION_FLAG_TAB_FACTORY);var f=this.isInvalid(ye.INVALIDATION_FLAG_TAB_FACTORY);(d||c)&&this.refreshBackgroundSkin();(f||b||c||a)&&this.refreshTabs();
this.refreshViewPortBounds();this.handleLayout();this.handleLayoutResult();this.layoutBackgroundSkin();this.validateChildren();this._previousCustomTabVariant=this.get_customTabVariant()},refreshViewPortBounds:function(){this._layoutMeasurements.save(this)},handleLayout:function(){var a=this._ignoreChildChanges;this._ignoreChildChanges=!0;this._layoutResult.reset();this.get_layout()!=null&&this.get_layout().layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this._ignoreChildChanges=
a},handleLayoutResult:function(){var a=this._layoutResult.viewPortWidth,b=this._layoutResult.viewPortHeight;this.saveMeasurements(a,b,a,b)},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;if(!u.__implements(c,oa))break;c.validateNow()}},refreshTabs:function(){this.get_tabRecycler().update==null&&(this.get_tabRecycler().update=ye.defaultUpdateTab,this.get_tabRecycler().reset==null&&(this.get_tabRecycler().reset=ye.defaultResetTab));if(this._recyclerMap!=null)for(var a=
this._recyclerMap.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=ye.defaultUpdateTab,f.reset==null&&(f.reset=ye.defaultResetTab))}a=this.isInvalid(ye.INVALIDATION_FLAG_TAB_FACTORY);this.refreshInactiveTabs(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveTabs(d,a);this.findUnrenderedData();this.recoverInactiveTabs(this._defaultStorage);if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveTabs(d);this.renderUnrenderedData();this.freeInactiveTabs(this._defaultStorage);if(this._defaultStorage.inactiveTabs.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive tabs should be empty after updating.");if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveTabs(d),d.inactiveTabs.length>0)throw a=
u.getClass(this),new fb(""+a.__name__+": inactive tabs "+d.id+" should be empty after updating.");},refreshInactiveTabs:function(a,b){var c=a.inactiveTabs;a.inactiveTabs=a.activeTabs;a.activeTabs=c;if(a.activeTabs.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active tabs should be empty before updating.");b&&(this.recoverInactiveTabs(a),this.freeInactiveTabs(a))},recoverInactiveTabs:function(a){var b=0;for(a=a.inactiveTabs;b<a.length;){var c=a[b];++b;if(c!=null){var d=this.tabToItemState.h[c.__id__];
if(d!=null){var f=d.data;this.tabToItemState.remove(c);if(typeof f=="string"){var g=this.stringDataToTab;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}else this.objectDataToTab.remove(f);c.removeEventListener("trigger",m(this,this.tabBar_tab_triggerHandler));c.removeEventListener("change",m(this,this.tabBar_tab_changeHandler));this.resetTab(c,d);this.itemStatePool.release(d)}}}},freeInactiveTabs:function(a){for(var b=0,c=a.inactiveTabs;b<c.length;){var d=c[b];++b;d!=null&&this.destroyTab(d)}a.inactiveTabs.length=
0},refreshBackgroundSkin:function(){var a=this._currentBackgroundSkin;this._currentBackgroundSkin=this.getCurrentBackgroundSkin();this._currentBackgroundSkin!=a&&(this.removeCurrentBackgroundSkin(a),this.addCurrentBackgroundSkin(this._currentBackgroundSkin))},getCurrentBackgroundSkin:function(){return this._enabled||this.get_disabledBackgroundSkin()==null?this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a==null?this._backgroundSkinMeasurements=null:
(u.__implements(a,jb)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Ib(a):this._backgroundSkinMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),this._backgroundSkinMeasurements.restore(a),a.parent==this&&this.removeChild(a))},layoutBackgroundSkin:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),
this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},findUnrenderedData:function(){this._layoutItems.length=0;if(this._dataProvider!=null&&this._dataProvider.get_length()!=0){this._layoutItems.length=
this._dataProvider.get_length();for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._dataProvider.get_length();b<c;){var d=b++,f=this._dataProvider.get(d);var g=typeof f=="string"?this.stringDataToTab.h[f]:this.objectDataToTab.h[f.__id__];if(g!=null){var h=this.tabToItemState.h[g.__id__],l=this.populateCurrentItemState(f,d,h,this._forceItemStateUpdate),k=h.recyclerID,q=this.itemStateToStorage(h);if(q.id!=k)this._unrenderedData.push(f);else{l&&this.updateTab(g,h,q);this._layoutItems[d]=g;this.setChildIndex(g,
d+a);if(!X.remove(q.inactiveTabs,g))throw a=u.getClass(this),new fb(""+a.__name__+": tab renderer map contains bad data for item at index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");q.activeTabs.push(g)}}else this._unrenderedData.push(f)}}},renderUnrenderedData:function(){for(var a=this._currentBackgroundSkin!=null?1:0,b=0,c=this._unrenderedData;b<c.length;){var d=c[b];++b;var f=this._dataProvider.indexOf(d),g=this.itemStatePool.get();this.populateCurrentItemState(d,
f,g,!0);d=this.createTab(g);this.addChildAt(d,f+a);this._layoutItems[f]=d}this._unrenderedData.length=0},createTab:function(a){var b=this.itemStateToStorage(a);if(b.inactiveTabs.length==0){var c=this.get_tabRecycler().create();if(c.get_variant()==null){var d=this.get_customTabVariant()!=null?this.get_customTabVariant():ye.CHILD_VARIANT_TAB;c.set_variant(d)}c.initializeNow()}else c=b.inactiveTabs.shift();this.updateTab(c,a,b);c.addEventListener("trigger",m(this,this.tabBar_tab_triggerHandler));c.addEventListener("change",
m(this,this.tabBar_tab_changeHandler));this.tabToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToTab.h[a]=c:this.objectDataToTab.set(a,c);b.activeTabs.push(c);return c},destroyTab:function(a){this.removeChild(a);this.get_tabRecycler().destroy!=null&&this.get_tabRecycler().destroy(a)},itemStateToStorage:function(a){var b=null;this._tabRecyclerIDFunction!=null&&(b=this._tabRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new fb('Item renderer recycler ID "'+
b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<d;){var f=c++;f=this._additionalStorage[f];if(f.tabRecycler==a)return f}f=new Wq(b,a);this._additionalStorage.push(f);return f},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=this,f=!0;if(d||c.data!=a)c.data=a,f=!0;if(d||c.index!=b)c.index=b,f=!0;b=a==this._selectedItem;if(d||c.selected!=b)c.selected=
b,f=!0;b=this._enabled&&this.itemToEnabled(a);if(d||c.enabled!=b)c.enabled=b,f=!0;a=this.itemToText(a);if(d||c.text!=a)c.text=a,f=!0;return f},updateTab:function(a,b,c){b.recyclerID=c.id;c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_tabRecycler().update!=null&&this.get_tabRecycler().update(a,b);this._ignoreSelectionChange=c;this.refreshTabProperties(a,b)},resetTab:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.get_tabRecycler()!=null&&this.get_tabRecycler().reset!=
null&&this.get_tabRecycler().reset(a,b);this._ignoreSelectionChange=c;this.refreshTabProperties(a,ye.RESET_TAB_STATE)},refreshTabProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,ji)&&a.set_layoutIndex(b.index);a.set_selected(b.selected);a.set_enabled(b.enabled);this._ignoreSelectionChange=c},refreshSelectedIndicesAfterFilterOrSort:function(){this._selectedIndex!=
-1&&this.set_selectedIndex(this._dataProvider.indexOf(this._selectedItem))},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._dataProvider!=null&&this._dataProvider.get_length()!=0){var b=this._selectedIndex;switch(a.keyCode){case 33:--b;break;case 34:++b;break;case 35:b=this._dataProvider.get_length()-1;break;case 36:b=0;break;case 37:--b;break;case 38:if(a.keyLocation==4)return;--b;break;case 39:++b;break;case 40:if(a.keyLocation==4)return;++b;break;default:return}b<0?b=0:b>=this._dataProvider.get_length()&&
(b=this._dataProvider.get_length()-1);a.preventDefault();this.set_selectedIndex(b)}},tabBar_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},tabBar_tab_triggerHandler:function(a){a=u.__cast(a.currentTarget,Yc);zj.dispatch(this,"itemTrigger",this.tabToItemState.h[a.__id__])},tabBar_tab_changeHandler:function(a){this._ignoreSelectionChange||(a=u.__cast(a.currentTarget,Yc),a.get_selected()?this.set_selectedItem(this.tabToItemState.h[a.__id__].data):a.set_selected(!0))},tabBar_dataProvider_changeHandler:function(a){this.setInvalid(x.DATA)},
tabBar_dataProvider_addItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex>=a.index&&(this._selectedIndex++,W.dispatch(this,"change"))},tabBar_dataProvider_removeItemHandler:function(a){this._selectedIndex!=-1&&(this._selectedIndex==a.index?(a.index==this._dataProvider.get_length()&&(this._selectedIndex=this._dataProvider.get_length()-1),this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex),W.dispatch(this,"change")):this._selectedIndex>a.index&&
(this._selectedIndex--,W.dispatch(this,"change")))},tabBar_dataProvider_replaceItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex==a.index&&(this._selectedItem=this._dataProvider.get(this._selectedIndex),W.dispatch(this,"change"))},tabBar_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1)},tabBar_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1)},tabBar_dataProvider_sortChangeHandler:function(a){this.refreshSelectedIndicesAfterFilterOrSort()},tabBar_dataProvider_filterChangeHandler:function(a){this.refreshSelectedIndicesAfterFilterOrSort()},
updateTabForIndex:function(a){var b=this._dataProvider.get(a);var c=typeof b=="string"?this.stringDataToTab.h[b]:this.objectDataToTab.h[b.__id__];if(c==null)this.setInvalid(x.DATA);else{var d=this.tabToItemState.h[c.__id__];d.owner!=null&&(this.itemStateToStorage(d),this.populateCurrentItemState(b,a,d,!0),this.resetTab(c,d),d.owner=null,this.setInvalid(x.DATA))}},tabBar_dataProvider_updateItemHandler:function(a){this.updateTabForIndex(a.index)},tabBar_dataProvider_updateAllHandler:function(a){a=0;
for(var b=this._dataProvider.get_length();a<b;){var c=a++;this.updateTabForIndex(c)}},__customTabVariant:null,get_customTabVariant:function(){return this.__customTabVariant},set_customTabVariant:function(a){if(!this.setStyle("customTabVariant")||this.__customTabVariant==a)return this.__customTabVariant;this._previousClearStyle=m(this,this.clearStyle_customTabVariant);this.__customTabVariant=a;this.setInvalid(x.STYLES);return this.__customTabVariant},clearStyle_customTabVariant:function(){this.set_customTabVariant(null);
return this.get_customTabVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__backgroundSkin:null,get_backgroundSkin:function(){return this.__backgroundSkin},set_backgroundSkin:function(a){if(!this.setStyle("backgroundSkin")||
this.__backgroundSkin==a)return this.__backgroundSkin;this._previousClearStyle=m(this,this.clearStyle_backgroundSkin);this.__backgroundSkin=a;this.setInvalid(x.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__disabledBackgroundSkin:null,get_disabledBackgroundSkin:function(){return this.__disabledBackgroundSkin},set_disabledBackgroundSkin:function(a){if(!this.setStyle("disabledBackgroundSkin")||this.__disabledBackgroundSkin==
a)return this.__disabledBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_disabledBackgroundSkin);this.__disabledBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return ye},__class__:ye,__properties__:I(wa.prototype.__properties__,{set_disabledBackgroundSkin:"set_disabledBackgroundSkin",get_disabledBackgroundSkin:"get_disabledBackgroundSkin",
set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",set_layout:"set_layout",get_layout:"get_layout",set_tabRecyclerIDFunction:"set_tabRecyclerIDFunction",get_tabRecyclerIDFunction:"get_tabRecyclerIDFunction",set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_tabRecycler:"set_tabRecycler",get_tabRecycler:"get_tabRecycler",set_customTabVariant:"set_customTabVariant",get_customTabVariant:"get_customTabVariant",set_selectedItem:"set_selectedItem",
get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var Wq=function(a,b){this.inactiveTabs=[];this.activeTabs=[];this.id=a;this.tabRecycler=b};r["feathers.controls._TabBar.TabStorage"]=Wq;Wq.__name__="feathers.controls._TabBar.TabStorage";Wq.prototype={id:null,oldTabRecycler:null,tabRecycler:null,activeTabs:null,inactiveTabs:null,
__class__:Wq};var df=function(a,b,c){a==null&&(a="");this.__customErrorCalloutVariant=null;this.__showPromptWhenEmptyAndFocused=!0;this.__textPaddingTop=this.__textPaddingRight=this.__textPaddingBottom=this.__textPaddingLeft=0;this.__wordWrap=!0;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=this.__promptTextFormat=null;this.__smoothScrolling=!1;this.__errorFocusRectSkin=null;this._stateToSkin=new Ye;this._ignoreViewPortTextChange=!1;this._previousCustomErrorCalloutVariant=null;
this._maxChars=0;this._stateToTextFormat=new Ye;this._errorString=null;this._errorStatePriority=this._focusedStatePriority=0;this._displayAsPassword=!1;this._currentState=re.ENABLED;this._editable=this._selectable=!0;this._updatedPromptStyles=!1;this._previousTextFormat=this._previousSimpleTextFormat=this._previousPrompt=this._previousPromptTextFormat=this._previousSimplePromptTextFormat=null;this.initializeTextAreaTheme();ob.call(this);this.set_text(a);this.set_prompt(b);this.set_tabEnabled(!0);
this.set_tabChildren(!1);this.focusRect=null;this.get_viewPort()==null&&(this.textFieldViewPort=new Ko,this.textFieldViewPort.set_wordWrap(!0),this.textFieldViewPort.set_multiline(!0),this.textFieldViewPort.addEventListener("change",m(this,this.textArea_viewPort_changeHandler)),this.addChild(this.textFieldViewPort),this.set_viewPort(this.textFieldViewPort));this.addEventListener("focusIn",m(this,this.textArea_focusInHandler));this.addEventListener("focusOut",m(this,this.textArea_focusOutHandler));
c!=null&&this.addEventListener("change",c)};r["feathers.controls.TextArea"]=df;df.__name__="feathers.controls.TextArea";df.__interfaces__=[hi,de,mh];df.__super__=ob;df.prototype=I(ob.prototype,{textFieldViewPort:null,promptTextField:null,errorStringCallout:null,_previousTextFormat:null,_previousSimpleTextFormat:null,_previousPrompt:null,_previousPromptTextFormat:null,_previousSimplePromptTextFormat:null,_updatedPromptStyles:null,_promptTextMeasuredWidth:null,_promptTextMeasuredHeight:null,get_tabEnabled:function(){return this._enabled?
this.get_rawTabEnabled():!1},_editable:null,get_editable:function(){return this._editable},set_editable:function(a){if(this._editable==a)return this._editable;this._editable=a;this.setInvalid(x.STATE);return this._editable},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;this._selectable=a;this.setInvalid(x.DATA);return this._selectable},_currentState:null,get_currentState:function(){return this._currentState},
set_enabled:function(a){ob.prototype.set_enabled.call(this,a);this.refreshState();return this._enabled},_text:null,get_text:function(){return this._text},set_text:function(a){if(a==null){if(this._text.length==0)return this._text;a=""}if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);W.dispatch(this,"change");return this._text},get_baseline:function(){return this.textFieldViewPort==null?0:this.get_paddingTop()+this.textFieldViewPort.get_baseline()},_prompt:null,get_prompt:function(){return this._prompt},
set_prompt:function(a){if(this._prompt==a)return this._prompt;this._prompt=a;this.setInvalid(x.DATA);return this._prompt},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;
this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_errorStatePriority:null,get_errorStatePriority:function(){return this._errorStatePriority},set_errorStatePriority:function(a){if(this._errorStatePriority==a)return this._errorStatePriority;this._errorStatePriority=a;this.setInvalid(x.STATE);return this._errorStatePriority},_focusedStatePriority:null,get_focusedStatePriority:function(){return this._errorStatePriority},set_focusedStatePriority:function(a){if(this._focusedStatePriority==
a)return this._focusedStatePriority;this._focusedStatePriority=a;this.setInvalid(x.STATE);return this._focusedStatePriority},_errorString:null,get_errorString:function(){return this._errorString},set_errorString:function(a){if(this._errorString==a)return this._errorString;this._errorString=a;this.refreshState();this.setInvalid(x.DATA);return this._errorString},get_errorStringCalloutOpen:function(){return this.errorStringCallout!=null?this.errorStringCallout.parent!=null:!1},_stateToTextFormat:null,
get_selectionAnchorIndex:function(){return this.textFieldViewPort.get_selectionAnchorIndex()},get_selectionActiveIndex:function(){return this.textFieldViewPort.get_selectionActiveIndex()},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_oldErrorCalloutFactory:null,_errorCalloutFactory:null,get_errorCalloutFactory:function(){return this._errorCalloutFactory},
set_errorCalloutFactory:function(a){if(this._errorCalloutFactory==a)return this._errorCalloutFactory;this._errorCalloutFactory=a;this.setInvalid(df.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);return this._errorCalloutFactory},_previousCustomErrorCalloutVariant:null,_ignoreViewPortTextChange:null,get_measureViewPort:function(){return!1},get_stageFocusTarget:function(){return this.textFieldViewPort},_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,
b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},getTextFormatForState:function(a){return this._stateToTextFormat.get(a)},setTextFormatForState:function(a,b){this.setStyle("setTextFormatForState",a)&&(b==null?this._stateToTextFormat.remove(a):this._stateToTextFormat.set(a,b),
this.setInvalid(x.STYLES))},selectRange:function(a,b){this.textFieldViewPort.selectRange(a,b)},selectAll:function(){this.textFieldViewPort.selectRange(0,this._text.length)},setTextPadding:function(a){this.set_textPaddingTop(a);this.set_textPaddingRight(a);this.set_textPaddingBottom(a);this.set_textPaddingLeft(a)},showFocus:function(a){ob.prototype.showFocus.call(this,a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();ob.prototype.dispose.call(this)},initializeTextAreaTheme:function(){qu.initialize()},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(df.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var f=this.isInvalid(df.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);this._updatedPromptStyles=!1;(f||a)&&this.createErrorCallout();(a||c)&&this.refreshPrompt();(a||d||c)&&this.refreshPromptStyles();(a||d||b)&&this.refreshPromptText(b);
d&&(this.refreshTextStyles(),this.textFieldViewPort.set_embedFonts(this.get_embedFonts()),this.textFieldViewPort.set_wordWrap(this.get_wordWrap()),this.textFieldViewPort.set_paddingTop(this.get_textPaddingTop()),this.textFieldViewPort.set_paddingRight(this.get_textPaddingRight()),this.textFieldViewPort.set_paddingBottom(this.get_textPaddingBottom()),this.textFieldViewPort.set_paddingLeft(this.get_textPaddingLeft()),this.textFieldViewPort.set_smoothScrolling(this.get_smoothScrolling()));a&&(b=this._ignoreViewPortTextChange,
this._ignoreViewPortTextChange=!0,this.textFieldViewPort.set_text(this._text),this._ignoreViewPortTextChange=b,this.textFieldViewPort.set_restrict(this.___restrict),this.textFieldViewPort.set_maxChars(this._maxChars),this.textFieldViewPort.set_displayAsPassword(this._displayAsPassword),this._editable?this.textFieldViewPort.set_selectable(this._enabled):this.textFieldViewPort.set_selectable(this._enabled&&this._selectable));c&&(this.textFieldViewPort.set_enabled(this._enabled),this.textFieldViewPort.set_textFieldType(this._editable?
1:0));ob.prototype.update.call(this);(f||c||a)&&this.refreshErrorString();this._previousCustomErrorCalloutVariant=this.get_customErrorCalloutVariant()},layoutChildren:function(){ob.prototype.layoutChildren.call(this);this.layoutPrompt()},addCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(this);ob.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&(u.__implements(a,Td)&&a.set_stateContext(null),ob.prototype.removeCurrentBackgroundSkin.call(this,
a))},refreshTextStyles:function(){var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimpleTextFormat&&(this._previousTextFormat!=null&&this._previousTextFormat.removeEventListener("change",m(this,this.textArea_textFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textArea_textFormat_changeHandler),!1,0,!0),this.textFieldViewPort.set_textFormat(b)),this._previousTextFormat=a,this._previousSimpleTextFormat=b)},refreshPrompt:function(){this._prompt==
null?this.promptTextField!=null&&(this.removeChild(this.promptTextField),this.promptTextField=null):(this.promptTextField==null&&(this.promptTextField=new Jc,this.promptTextField.set_selectable(!1),this.promptTextField.set_mouseWheelEnabled(!1),this.promptTextField.mouseEnabled=!1,this.promptTextField.set_multiline(!0),this.addChildAt(this.promptTextField,this.getChildIndex(this.textFieldViewPort))),this.promptTextField.set_visible(this._text.length==0&&(this.get_currentState()!=re.FOCUSED||this.get_showPromptWhenEmptyAndFocused())))},
refreshPromptText:function(a){this._prompt!=null&&(this._prompt!=this._previousPrompt||this._updatedPromptStyles||a)&&(this.promptTextField.set_autoSize(1),(a=this._prompt.length>0)?this.promptTextField.set_text(this._prompt):this.promptTextField.set_text("\u200b"),this.promptTextField.set_wordWrap(!1),this._promptTextMeasuredWidth=this.promptTextField.get_width(),this._promptTextMeasuredHeight=this.promptTextField.get_height(),this.promptTextField.set_autoSize(2),this.promptTextField.set_wordWrap(!0),
a||this.promptTextField.set_text(""),this._previousPrompt=this._prompt)},refreshPromptStyles:function(){if(this._prompt!=null){this.promptTextField.get_embedFonts()!=this.get_embedFonts()&&(this.promptTextField.set_embedFonts(this.get_embedFonts()),this._updatedPromptStyles=!0);var a=this.getCurrentPromptTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSimplePromptTextFormat&&(this._previousPromptTextFormat!=null&&this._previousPromptTextFormat.removeEventListener("change",m(this,
this.textArea_promptTextFormat_changeHandler)),a!=null&&(a.addEventListener("change",m(this,this.textArea_promptTextFormat_changeHandler),!1,0,!0),this.promptTextField.set_defaultTextFormat(b),this._updatedPromptStyles=!0),this._previousPromptTextFormat=a,this._previousSimplePromptTextFormat=b)}},getCurrentPromptTextFormat:function(){var a=this.get_promptTextFormat();this._enabled||this.get_disabledTextFormat()==null||(a=this.get_disabledTextFormat());a==null&&(a=this.get_textFormat());return a},
refreshErrorString:function(){this.errorStringCallout!=null&&(this.errorStringCallout.set_text(this._errorString),this._currentState==re.FOCUSED&&this.errorStringCallout.parent==null?Ub.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=re.FOCUSED&&this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout))},layoutPrompt:function(){if(this._prompt!=null){this.promptTextField.set_x(this.leftViewPortOffset+this.get_textPaddingLeft());this.promptTextField.set_y(this.topViewPortOffset+
this.get_textPaddingTop());var a=this.get_viewPort().get_visibleWidth()-this.get_textPaddingLeft()-this.get_textPaddingRight();a<0&&(a=0);this._promptTextMeasuredWidth>a?this.promptTextField.set_width(a):this.promptTextField.set_width(this._promptTextMeasuredWidth);a=this.get_viewPort().get_visibleHeight()-this.get_textPaddingTop()-this.get_textPaddingBottom();a<0&&(a=0);this.promptTextField.set_height(a)}},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=
null?a:ob.prototype.getCurrentBackgroundSkin.call(this)},getCurrentTextFormat:function(){var a=this._stateToTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},createErrorCallout:function(){this.destroyErrorCallout();if(this._errorString!=null&&this._errorString.length!=0){var a=this._errorCalloutFactory!=null?this._errorCalloutFactory:df.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=
a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():df.CHILD_VARIANT_ERROR_CALLOUT);this.errorStringCallout.set_origin(this);this.errorStringCallout.closeOnPointerOutside=!1}},destroyErrorCallout:function(){this.errorStringCallout!=null&&(this.errorStringCallout.parent!=null&&this.errorStringCallout.parent.removeChild(this.errorStringCallout),this._oldErrorCalloutFactory.destroy!=
null&&this._oldErrorCalloutFactory.destroy(this.errorStringCallout),this.errorStringCallout=this._oldErrorCalloutFactory=null)},changeState:function(a){this._enabled||(a=re.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():ob.prototype.getCurrentFocusRectSkin.call(this)},refreshState:function(){if(this._enabled){var a=
this.stage!=null&&this.stage.get_focus()==this.textFieldViewPort.get_textField(),b=this._errorString!=null;a&&(!b||this._focusedStatePriority>=this._errorStatePriority)?this.changeState(re.FOCUSED):this._errorString!=null?this.changeState(re.ERROR):this.changeState(re.ENABLED)}else this.changeState(re.DISABLED)},textArea_focusInHandler:function(a){this.stage==null||this.stage.get_focus()==null||this.textFieldViewPort==null||this.textFieldViewPort.contains(this.stage.get_focus())||(a.stopImmediatePropagation(),
this.stage.set_focus(this.textFieldViewPort));this.refreshState()},textArea_focusOutHandler:function(a){this.refreshState()},baseScrollContainer_keyDownHandler:function(a){},textArea_viewPort_changeHandler:function(a){this._ignoreViewPortTextChange||this.set_text(this.textFieldViewPort.get_text())},textArea_textFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},textArea_promptTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},get_styleContext:function(){return df},__errorFocusRectSkin:null,
get_errorFocusRectSkin:function(){return this.__errorFocusRectSkin},set_errorFocusRectSkin:function(a){if(!this.setStyle("errorFocusRectSkin")||this.__errorFocusRectSkin==a)return this.__errorFocusRectSkin;this._previousClearStyle=m(this,this.clearStyle_errorFocusRectSkin);this.__errorFocusRectSkin=a;this.setInvalid(x.STYLES);return this.__errorFocusRectSkin},clearStyle_errorFocusRectSkin:function(){this.set_errorFocusRectSkin(null);return this.get_errorFocusRectSkin()},__smoothScrolling:null,get_smoothScrolling:function(){return this.__smoothScrolling},
set_smoothScrolling:function(a){if(!this.setStyle("smoothScrolling")||this.__smoothScrolling==a)return this.__smoothScrolling;this._previousClearStyle=m(this,this.clearStyle_smoothScrolling);this.__smoothScrolling=a;this.setInvalid(x.STYLES);return this.__smoothScrolling},clearStyle_smoothScrolling:function(){this.set_smoothScrolling(!1);return this.get_smoothScrolling()},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||
this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=
m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},__promptTextFormat:null,get_promptTextFormat:function(){return this.__promptTextFormat},set_promptTextFormat:function(a){if(!this.setStyle("promptTextFormat")||this.__promptTextFormat==a)return this.__promptTextFormat;this._previousClearStyle=m(this,this.clearStyle_promptTextFormat);
this.__promptTextFormat=a;this.setInvalid(x.STYLES);return this.__promptTextFormat},clearStyle_promptTextFormat:function(){this.set_promptTextFormat(null);return this.get_promptTextFormat()},__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);
return this.get_embedFonts()},__wordWrap:null,get_wordWrap:function(){return this.__wordWrap},set_wordWrap:function(a){if(!this.setStyle("wordWrap")||this.__wordWrap==a)return this.__wordWrap;this._previousClearStyle=m(this,this.clearStyle_wordWrap);this.__wordWrap=a;this.setInvalid(x.STYLES);return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!0);return this.get_wordWrap()},__textPaddingTop:null,get_textPaddingTop:function(){return this.__textPaddingTop},set_textPaddingTop:function(a){if(!this.setStyle("textPaddingTop")||
this.__textPaddingTop==a)return this.__textPaddingTop;this._previousClearStyle=m(this,this.clearStyle_textPaddingTop);this.__textPaddingTop=a;this.setInvalid(x.STYLES);return this.__textPaddingTop},clearStyle_textPaddingTop:function(){this.set_textPaddingTop(0);return this.get_textPaddingTop()},__textPaddingRight:null,get_textPaddingRight:function(){return this.__textPaddingRight},set_textPaddingRight:function(a){if(!this.setStyle("textPaddingRight")||this.__textPaddingRight==a)return this.__textPaddingRight;
this._previousClearStyle=m(this,this.clearStyle_textPaddingRight);this.__textPaddingRight=a;this.setInvalid(x.STYLES);return this.__textPaddingRight},clearStyle_textPaddingRight:function(){this.set_textPaddingRight(0);return this.get_textPaddingRight()},__textPaddingBottom:null,get_textPaddingBottom:function(){return this.__textPaddingBottom},set_textPaddingBottom:function(a){if(!this.setStyle("textPaddingBottom")||this.__textPaddingBottom==a)return this.__textPaddingBottom;this._previousClearStyle=
m(this,this.clearStyle_textPaddingBottom);this.__textPaddingBottom=a;this.setInvalid(x.STYLES);return this.__textPaddingBottom},clearStyle_textPaddingBottom:function(){this.set_textPaddingBottom(0);return this.get_textPaddingBottom()},__textPaddingLeft:null,get_textPaddingLeft:function(){return this.__textPaddingLeft},set_textPaddingLeft:function(a){if(!this.setStyle("textPaddingLeft")||this.__textPaddingLeft==a)return this.__textPaddingLeft;this._previousClearStyle=m(this,this.clearStyle_textPaddingLeft);
this.__textPaddingLeft=a;this.setInvalid(x.STYLES);return this.__textPaddingLeft},clearStyle_textPaddingLeft:function(){this.set_textPaddingLeft(0);return this.get_textPaddingLeft()},__showPromptWhenEmptyAndFocused:null,get_showPromptWhenEmptyAndFocused:function(){return this.__showPromptWhenEmptyAndFocused},set_showPromptWhenEmptyAndFocused:function(a){if(!this.setStyle("showPromptWhenEmptyAndFocused")||this.__showPromptWhenEmptyAndFocused==a)return this.__showPromptWhenEmptyAndFocused;this._previousClearStyle=
m(this,this.clearStyle_showPromptWhenEmptyAndFocused);this.__showPromptWhenEmptyAndFocused=a;this.setInvalid(x.STYLES);return this.__showPromptWhenEmptyAndFocused},clearStyle_showPromptWhenEmptyAndFocused:function(){this.set_showPromptWhenEmptyAndFocused(!0);return this.get_showPromptWhenEmptyAndFocused()},__customErrorCalloutVariant:null,get_customErrorCalloutVariant:function(){return this.__customErrorCalloutVariant},set_customErrorCalloutVariant:function(a){if(!this.setStyle("customErrorCalloutVariant")||
this.__customErrorCalloutVariant==a)return this.__customErrorCalloutVariant;this._previousClearStyle=m(this,this.clearStyle_customErrorCalloutVariant);this.__customErrorCalloutVariant=a;this.setInvalid(x.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},__class__:df,__properties__:I(ob.prototype.__properties__,{get_stageFocusTarget:"get_stageFocusTarget",set_customErrorCalloutVariant:"set_customErrorCalloutVariant",
get_customErrorCalloutVariant:"get_customErrorCalloutVariant",set_errorCalloutFactory:"set_errorCalloutFactory",get_errorCalloutFactory:"get_errorCalloutFactory",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_showPromptWhenEmptyAndFocused:"set_showPromptWhenEmptyAndFocused",get_showPromptWhenEmptyAndFocused:"get_showPromptWhenEmptyAndFocused",set_textPaddingLeft:"set_textPaddingLeft",
get_textPaddingLeft:"get_textPaddingLeft",set_textPaddingBottom:"set_textPaddingBottom",get_textPaddingBottom:"get_textPaddingBottom",set_textPaddingRight:"set_textPaddingRight",get_textPaddingRight:"get_textPaddingRight",set_textPaddingTop:"set_textPaddingTop",get_textPaddingTop:"get_textPaddingTop",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_promptTextFormat:"set_promptTextFormat",get_promptTextFormat:"get_promptTextFormat",
set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_smoothScrolling:"set_smoothScrolling",get_smoothScrolling:"get_smoothScrolling",get_errorStringCalloutOpen:"get_errorStringCalloutOpen",set_errorString:"set_errorString",get_errorString:"get_errorString",set_focusedStatePriority:"set_focusedStatePriority",get_focusedStatePriority:"get_focusedStatePriority",set_errorStatePriority:"set_errorStatePriority",
get_errorStatePriority:"get_errorStatePriority",set_errorFocusRectSkin:"set_errorFocusRectSkin",get_errorFocusRectSkin:"get_errorFocusRectSkin",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_prompt:"set_prompt",get_prompt:"get_prompt",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text",get_currentState:"get_currentState",set_selectable:"set_selectable",get_selectable:"get_selectable",
set_editable:"set_editable",get_editable:"get_editable"})});var re=O["feathers.controls.TextInputState"]={__ename__:"feathers.controls.TextInputState",__constructs__:null,ENABLED:{_hx_name:"ENABLED",_hx_index:0,__enum__:"feathers.controls.TextInputState",toString:D},DISABLED:{_hx_name:"DISABLED",_hx_index:1,__enum__:"feathers.controls.TextInputState",toString:D},FOCUSED:{_hx_name:"FOCUSED",_hx_index:2,__enum__:"feathers.controls.TextInputState",toString:D},ERROR:{_hx_name:"ERROR",_hx_index:3,__enum__:"feathers.controls.TextInputState",
toString:D}};re.__constructs__=[re.ENABLED,re.DISABLED,re.FOCUSED,re.ERROR];var Nb=O["feathers.controls.ToggleButtonState"]={__ename__:"feathers.controls.ToggleButtonState",__constructs__:null,UP:(G=function(a){return{_hx_index:0,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:D}},G._hx_name="UP",G.__params__=["selected"],G),HOVER:(G=function(a){return{_hx_index:1,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:D}},G._hx_name="HOVER",G.__params__=["selected"],
G),DOWN:(G=function(a){return{_hx_index:2,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:D}},G._hx_name="DOWN",G.__params__=["selected"],G),DISABLED:(G=function(a){return{_hx_index:3,selected:a,__enum__:"feathers.controls.ToggleButtonState",toString:D}},G._hx_name="DISABLED",G.__params__=["selected"],G)};Nb.__constructs__=[Nb.UP,Nb.HOVER,Nb.DOWN,Nb.DISABLED];var uk=function(a,b){a==null&&(a=!1);this.__toggleEase=lh.easeOut;this.__toggleDuration=.25;this.__paddingRight=this.__paddingLeft=
0;this.__thumbSkin=this.__trackSkin=this.__secondaryTrackSkin=null;this.__embedFonts=!1;this.__textFormat=this.__disabledTextFormat=null;this._ignoreClick=this._animateSelectionChange=!1;this._currentThumbSkin=this._thumbSkinMeasurements=this._currentTrackSkin=this._trackSkinMeasurements=this._currentSecondaryTrackSkin=this._secondaryTrackSkinMeasurements=this._toggleTween=null;this._onTextMeasuredWidth=this._onTextMeasuredHeight=this._offTextMeasuredWidth=this._offTextMeasuredHeight=0;this._updatedOnTextStyles=
this._updatedOffTextStyles=!1;this._onText=this._offText=this._previousOnText=this._previousOffText=this._previousOnTextFormat=this._previousOnSimpleTextFormat=this._previousOffTextFormat=this._previousOffSimpleTextFormat=null;this._selected=!1;this.initializeToggleSwitchTheme();wa.call(this);this.set_selected(a);this.mouseChildren=!1;this.set_buttonMode(!0);this.useHandCursor=!1;this.set_tabEnabled(!0);this.set_tabChildren(!1);this.focusRect=null;this.addEventListener("keyDown",m(this,this.toggleSwitch_keyDownHandler));
this.addEventListener("mouseDown",m(this,this.toggleSwitch_mouseDownHandler));this.addEventListener("click",m(this,this.toggleSwitch_clickHandler));this.addEventListener("touchTap",m(this,this.toggleSwitch_touchTapHandler));b!=null&&this.addEventListener("change",b)};r["feathers.controls.ToggleSwitch"]=uk;uk.__name__="feathers.controls.ToggleSwitch";uk.__interfaces__=[ld,md];uk.__super__=wa;uk.prototype=I(wa.prototype,{onTextField:null,offTextField:null,_selected:null,get_selected:function(){return this._selected},
set_selected:function(a){this._animateSelectionChange=!1;if(this._selected==a)return this._selected;this._selected=a;W.dispatch(this,"change");this.setInvalid(x.SELECTION);return this._selected},_onText:null,get_onText:function(){return this._onText},set_onText:function(a){if(this._onText==a)return this._onText;this._onText=a;this.setInvalid(x.DATA);return this._onText},_offText:null,get_offText:function(){return this._offText},set_offText:function(a){if(this._offText==a)return this._offText;this._offText=
a;this.setInvalid(x.DATA);return this._offText},_previousOnText:null,_previousOffText:null,_previousOnTextFormat:null,_previousOnSimpleTextFormat:null,_previousOffTextFormat:null,_previousOffSimpleTextFormat:null,_updatedOnTextStyles:null,_updatedOffTextStyles:null,_onTextMeasuredWidth:null,_onTextMeasuredHeight:null,_offTextMeasuredWidth:null,_offTextMeasuredHeight:null,_currentThumbSkin:null,_thumbSkinMeasurements:null,_currentTrackSkin:null,_trackSkinMeasurements:null,_currentSecondaryTrackSkin:null,
_secondaryTrackSkinMeasurements:null,_toggleTween:null,_dragStartX:null,_ignoreClick:null,_animateSelectionChange:null,setSelectionWithAnimation:function(a){if(this._selected==a)return this._selected;this.set_selected(a);this._animateSelectionChange=!0;return this._selected},setPadding:function(a){this.set_paddingRight(a);this.set_paddingLeft(a)},initializeToggleSwitchTheme:function(){uu.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),
d=this.isInvalid(x.STATE),f=this.isInvalid(x.STYLES);this._updatedOffTextStyles=this._updatedOnTextStyles=!1;f&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());a&&this.refreshTextFields();(a||f||d)&&this.refreshTextStyles();if(a||f||d||c)this.refreshOnText(c),this.refreshOffText(c);(b||f)&&this.refreshSelection();(d||f)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=
null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow());c=this.get_explicitWidth();a&&(c=0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_width(),this._currentSecondaryTrackSkin!=null&&(c+=this._currentSecondaryTrackSkin.get_width())),this.onTextField!=null&&(a=this._onTextMeasuredWidth,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<
a&&(c=a)),this.offTextField!=null&&(a=this._offTextMeasuredWidth,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_width()),c<a&&(c=a)));a=this.get_explicitHeight();b&&(a=0,this._currentThumbSkin!=null&&(a+=this._currentThumbSkin.get_height()),this._currentTrackSkin!=null&&(a<this._currentTrackSkin.get_height()&&(a=this._currentTrackSkin.get_height()),this._currentSecondaryTrackSkin!=null&&a<this._currentSecondaryTrackSkin.get_height()&&(a=this._currentSecondaryTrackSkin.get_height())),
this.onTextField!=null&&a<this._onTextMeasuredHeight&&(a=this._onTextMeasuredHeight),this.offTextField!=null&&a<this._offTextMeasuredHeight&&(a=this._offTextMeasuredHeight));return this.saveMeasurements(c,a,c,a,c,a)},refreshTextFields:function(){if(this._onText==null)this.onTextField!=null&&(this.removeChild(this.onTextField),this.onTextField=null);else if(this.onTextField==null){var a=0;this._currentSecondaryTrackSkin!=null?a=2:this._currentTrackSkin!=null&&(a=1);this.onTextField=new Jc;this.addChildAt(this.onTextField,
a)}this._offText==null?this.offTextField!=null&&(this.removeChild(this.offTextField),this.offTextField=null):this.offTextField==null&&(a=0,this._currentSecondaryTrackSkin!=null?a=2:this._currentTrackSkin!=null&&(a=1),this.offTextField=new Jc,this.addChildAt(this.offTextField,a))},refreshTextStyles:function(){var a=this.getCurrentTextFormat(),b=a!=null?a.toSimpleTextFormat():null;this.offTextField!=null&&(this.offTextField.get_embedFonts()!=this.get_embedFonts()&&(this.offTextField.set_embedFonts(this.get_embedFonts()),
this._updatedOffTextStyles=!0),b!=this._previousOffSimpleTextFormat&&(this._previousOffTextFormat!=null&&this._previousOffTextFormat.removeEventListener("change",m(this,this.toggleSwitch_offTextFormat_changeHandler)),this.offTextField.get_caretIndex()!=-1&&this.offTextField.get_selectionBeginIndex()!=this.offTextField.get_selectionEndIndex()&&this.offTextField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.toggleSwitch_offTextFormat_changeHandler),!1,0,!0),this.offTextField.set_defaultTextFormat(b),
this._updatedOffTextStyles=!0),this._previousOffTextFormat=a,this._previousOffSimpleTextFormat=b));this.onTextField!=null&&(this.onTextField.get_embedFonts()!=this.get_embedFonts()&&(this.onTextField.set_embedFonts(this.get_embedFonts()),this._updatedOnTextStyles=!0),b!=this._previousOnSimpleTextFormat&&(this._previousOnTextFormat!=null&&this._previousOnTextFormat.removeEventListener("change",m(this,this.toggleSwitch_onTextFormat_changeHandler)),this.onTextField.get_caretIndex()!=-1&&this.onTextField.get_selectionBeginIndex()!=
this.onTextField.get_selectionEndIndex()&&this.onTextField.setSelection(0,0),a!=null&&(a.addEventListener("change",m(this,this.toggleSwitch_onTextFormat_changeHandler),!1,0,!0),this.onTextField.set_defaultTextFormat(b),this._updatedOnTextStyles=!0),this._previousOnTextFormat=a,this._previousOnSimpleTextFormat=b))},refreshOnText:function(a){if(this.onTextField!=null){var b=this._onText!=null&&this._onText.length>0;if(this._onText!=this._previousOnText||this._updatedOnTextStyles||a)this.onTextField.set_autoSize(1),
b?this.onTextField.set_text(this._onText):this.onTextField.set_text("\u200b"),this._onTextMeasuredWidth=this.onTextField.get_textWidth()+4,this._onTextMeasuredHeight=this.onTextField.get_height(),this.onTextField.set_autoSize(2),b||this.onTextField.set_text(""),this._previousOnText=this._onText}},refreshOffText:function(a){if(this.offTextField!=null){var b=this._offText!=null&&this._offText.length>0;if(this._offText!=this._previousOffText||this._updatedOffTextStyles||a)this.offTextField.set_autoSize(1),
b?this.offTextField.set_text(this._offText):this.offTextField.set_text("\u200b"),this._offTextMeasuredWidth=this.offTextField.get_textWidth()+4,this._offTextMeasuredHeight=this.offTextField.get_height(),this.offTextField.set_autoSize(2),b||this.offTextField.set_text(""),this._previousOffText=this._offText}},getCurrentTextFormat:function(){return this._enabled||this.get_disabledTextFormat()==null?this.get_textFormat():this.get_disabledTextFormat()},refreshThumb:function(){var a=this._currentThumbSkin;
this._currentThumbSkin=this.get_thumbSkin();this._currentThumbSkin!=a&&(a!=null&&a.parent==this&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a)),this._currentThumbSkin!=null?(u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==null?this._thumbSkinMeasurements=new Ib(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),u.__implements(this._currentThumbSkin,wb)&&this._currentThumbSkin.set_uiContext(this),
this.addChild(this._currentThumbSkin)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=null&&a.parent==this&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a)),this._currentTrackSkin!=null?(u.__implements(this._currentTrackSkin,jb)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Ib(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),
u.__implements(this._currentTrackSkin,wb)&&this._currentTrackSkin.set_uiContext(this),this.addChildAt(this._currentTrackSkin,0)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&a.parent==this&&(u.__implements(a,wb)&&a.set_uiContext(null),this.removeChild(a)),this._currentSecondaryTrackSkin!=null?(u.__implements(this._currentSecondaryTrackSkin,
jb)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Ib(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,wb)&&this._currentSecondaryTrackSkin.set_uiContext(this),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0)):this._secondaryTrackSkinMeasurements=null)},refreshSelection:function(){u.__implements(this._currentThumbSkin,
md)&&this._currentThumbSkin.set_selected(this._selected);u.__implements(this._currentTrackSkin,md)&&this._currentTrackSkin.set_selected(this._selected);u.__implements(this._currentSecondaryTrackSkin,md)&&this._currentSecondaryTrackSkin.set_selected(this._selected);this._toggleTween!=null&&(ua.stop(this._toggleTween,null,!1,!1),this._toggleTween=null)},refreshEnabled:function(){u.__implements(this._currentThumbSkin,jb)&&this._currentThumbSkin.set_enabled(this._enabled);u.__implements(this._currentTrackSkin,
jb)&&this._currentTrackSkin.set_enabled(this._enabled);u.__implements(this._currentSecondaryTrackSkin,jb)&&this._currentSecondaryTrackSkin.set_enabled(this._enabled)},layoutContent:function(){this.layoutThumb();this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null?this.layoutSplitTrack():this.layoutSingleTrack();this.layoutText()},layoutText:function(){if(this.onTextField!=null){var a=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingLeft()-this.get_paddingRight(),
b=this._onTextMeasuredWidth;b>a&&(b=a);this.onTextField.set_width(b);this.onTextField.set_x(this.get_paddingLeft()+(a-b)/2);a=(this.actualHeight-this._onTextMeasuredHeight)/2;a<0&&(a=0);this.onTextField.set_y(a);this.onTextField.set_visible(this._currentThumbSkin.get_x()>=this.onTextField.get_x())}this.offTextField!=null&&(a=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingLeft()-this.get_paddingRight(),b=this._offTextMeasuredWidth,b>a&&(b=a),this.offTextField.set_width(b),this.offTextField.set_x(this.actualWidth-
this.get_paddingRight()-a+(a-b)/2),a=(this.actualHeight-this._offTextMeasuredHeight)/2,a<0&&(a=0),this.offTextField.set_y(a),this.offTextField.set_visible(this._currentThumbSkin.get_x()+this._currentThumbSkin.get_width()<=this.offTextField.get_x()+b))},layoutThumb:function(){var a=this;if(this._currentThumbSkin!=null){u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow();var b=this.get_paddingLeft();this._selected&&(b=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingRight());
this._animateSelectionChange?(this._toggleTween=ua.update(function(c){return a._currentThumbSkin.set_x(c)},this.get_toggleDuration(),[this._currentThumbSkin.get_x()],[b],!0),this._toggleTween.ease(this.get_toggleEase()),this._toggleTween.onUpdate(m(this,this.toggleTween_onUpdate)),this._toggleTween.onComplete(m(this,this.toggleTween_onComplete))):this._toggleTween==null&&this._currentThumbSkin.set_x(b);this._currentThumbSkin.set_y((this.actualHeight-this._currentThumbSkin.get_height())/2);this._animateSelectionChange=
!1}},layoutSplitTrack:function(){if(this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=null){var a=this._currentThumbSkin.get_x()+this._currentThumbSkin.get_width()/2;this._currentTrackSkin.set_x(0);this._currentTrackSkin.set_width(a);this._currentSecondaryTrackSkin.set_x(a);this._currentSecondaryTrackSkin.set_width(this.actualWidth-a);u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow();
this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/2);this._currentSecondaryTrackSkin.set_y((this.actualHeight-this._currentSecondaryTrackSkin.get_height())/2)}},layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_x(0),this._currentTrackSkin.set_width(this.actualWidth),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_y((this.actualHeight-this._currentTrackSkin.get_height())/
2))},toggleSwitch_keyDownHandler:function(a){!this._enabled||this.get_buttonMode()&&this.focusRect==1||a.keyCode!=32&&a.keyCode!=13||(a.preventDefault(),this.dispatchEvent(new Bc("click")))},toggleSwitch_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Ad.forStage(this.stage).claimMouse(this)&&(this._dragStartX=this.get_mouseX(),this._ignoreClick=!1,this.stage.addEventListener("mouseMove",m(this,this.toggleSwitch_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",
m(this,this.toggleSwitch_stage_mouseUpHandler),!1,0,!0))},toggleSwitch_clickHandler:function(a){this._enabled&&!this._ignoreClick&&this.setSelectionWithAnimation(!this._selected)},toggleSwitch_touchTapHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&!this._ignoreClick&&this.setSelectionWithAnimation(!this._selected)},toggleSwitch_stage_mouseMoveHandler:function(a){if(this._enabled){a=(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight())/2;var b=this.get_mouseX()-this._dragStartX,
c=this._selected;b>=a?c=!0:b<=-a&&(c=!1);this._selected!=c&&(this._ignoreClick=!0,this._dragStartX=this.get_mouseX(),this.setSelectionWithAnimation(c))}},toggleSwitch_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);a.removeEventListener("mouseMove",m(this,this.toggleSwitch_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.toggleSwitch_stage_mouseUpHandler))},toggleTween_onUpdate:function(){this.layoutContent()},toggleTween_onComplete:function(){this._toggleTween=
null},toggleSwitch_onTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},toggleSwitch_offTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},__textFormat:null,get_textFormat:function(){return this.__textFormat},set_textFormat:function(a){if(!this.setStyle("textFormat")||this.__textFormat==a)return this.__textFormat;this._previousClearStyle=m(this,this.clearStyle_textFormat);this.__textFormat=a;this.setInvalid(x.STYLES);return this.__textFormat},clearStyle_textFormat:function(){this.set_textFormat(null);
return this.get_textFormat()},__disabledTextFormat:null,get_disabledTextFormat:function(){return this.__disabledTextFormat},set_disabledTextFormat:function(a){if(!this.setStyle("disabledTextFormat")||this.__disabledTextFormat==a)return this.__disabledTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledTextFormat);this.__disabledTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledTextFormat},clearStyle_disabledTextFormat:function(){this.set_disabledTextFormat(null);return this.get_disabledTextFormat()},
__embedFonts:null,get_embedFonts:function(){return this.__embedFonts},set_embedFonts:function(a){if(!this.setStyle("embedFonts")||this.__embedFonts==a)return this.__embedFonts;this._previousClearStyle=m(this,this.clearStyle_embedFonts);this.__embedFonts=a;this.setInvalid(x.STYLES);return this.__embedFonts},clearStyle_embedFonts:function(){this.set_embedFonts(!1);return this.get_embedFonts()},__thumbSkin:null,get_thumbSkin:function(){return this.__thumbSkin},set_thumbSkin:function(a){if(!this.setStyle("thumbSkin")||
this.__thumbSkin==a)return this.__thumbSkin;this._previousClearStyle=m(this,this.clearStyle_thumbSkin);this.__thumbSkin=a;this.setInvalid(x.STYLES);return this.__thumbSkin},clearStyle_thumbSkin:function(){this.set_thumbSkin(null);return this.get_thumbSkin()},__trackSkin:null,get_trackSkin:function(){return this.__trackSkin},set_trackSkin:function(a){if(!this.setStyle("trackSkin")||this.__trackSkin==a)return this.__trackSkin;this._previousClearStyle=m(this,this.clearStyle_trackSkin);this.__trackSkin=
a;this.setInvalid(x.STYLES);return this.__trackSkin},clearStyle_trackSkin:function(){this.set_trackSkin(null);return this.get_trackSkin()},__secondaryTrackSkin:null,get_secondaryTrackSkin:function(){return this.__secondaryTrackSkin},set_secondaryTrackSkin:function(a){if(!this.setStyle("secondaryTrackSkin")||this.__secondaryTrackSkin==a)return this.__secondaryTrackSkin;this._previousClearStyle=m(this,this.clearStyle_secondaryTrackSkin);this.__secondaryTrackSkin=a;this.setInvalid(x.STYLES);return this.__secondaryTrackSkin},
clearStyle_secondaryTrackSkin:function(){this.set_secondaryTrackSkin(null);return this.get_secondaryTrackSkin()},__paddingRight:null,get_paddingRight:function(){return this.__paddingRight},set_paddingRight:function(a){if(!this.setStyle("paddingRight")||this.__paddingRight==a)return this.__paddingRight;this._previousClearStyle=m(this,this.clearStyle_paddingRight);this.__paddingRight=a;this.setInvalid(x.STYLES);return this.__paddingRight},clearStyle_paddingRight:function(){this.set_paddingRight(0);
return this.get_paddingRight()},__paddingLeft:null,get_paddingLeft:function(){return this.__paddingLeft},set_paddingLeft:function(a){if(!this.setStyle("paddingLeft")||this.__paddingLeft==a)return this.__paddingLeft;this._previousClearStyle=m(this,this.clearStyle_paddingLeft);this.__paddingLeft=a;this.setInvalid(x.STYLES);return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__toggleDuration:null,get_toggleDuration:function(){return this.__toggleDuration},
set_toggleDuration:function(a){if(!this.setStyle("toggleDuration")||this.__toggleDuration==a)return this.__toggleDuration;this._previousClearStyle=m(this,this.clearStyle_toggleDuration);this.__toggleDuration=a;this.setInvalid(x.STYLES);return this.__toggleDuration},clearStyle_toggleDuration:function(){this.set_toggleDuration(.25);return this.get_toggleDuration()},__toggleEase:null,get_toggleEase:function(){return this.__toggleEase},set_toggleEase:function(a){if(!this.setStyle("toggleEase")||this.__toggleEase==
a)return this.__toggleEase;this._previousClearStyle=m(this,this.clearStyle_toggleEase);this.__toggleEase=a;this.setInvalid(x.STYLES);return this.__toggleEase},clearStyle_toggleEase:function(){this.set_toggleEase(lh.easeOut);return this.get_toggleEase()},get_styleContext:function(){return uk},__class__:uk,__properties__:I(wa.prototype.__properties__,{set_toggleEase:"set_toggleEase",get_toggleEase:"get_toggleEase",set_toggleDuration:"set_toggleDuration",get_toggleDuration:"get_toggleDuration",set_paddingLeft:"set_paddingLeft",
get_paddingLeft:"get_paddingLeft",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_secondaryTrackSkin:"set_secondaryTrackSkin",get_secondaryTrackSkin:"get_secondaryTrackSkin",set_trackSkin:"set_trackSkin",get_trackSkin:"get_trackSkin",set_thumbSkin:"set_thumbSkin",get_thumbSkin:"get_thumbSkin",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_disabledTextFormat:"set_disabledTextFormat",get_disabledTextFormat:"get_disabledTextFormat",set_textFormat:"set_textFormat",
get_textFormat:"get_textFormat",set_offText:"set_offText",get_offText:"get_offText",set_onText:"set_onText",get_onText:"get_onText",set_selected:"set_selected",get_selected:"get_selected"})});var Xq=function(a,b,c){b==null&&(b=-1);this.enabled=!0;this.columnIndex=-1;this.column=a;this.columnIndex=b;this.text=c};r["feathers.data.TreeGridViewHeaderState"]=Xq;Xq.__name__="feathers.data.TreeGridViewHeaderState";Xq.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,__class__:Xq};
var Yq=function(){this.enabled=!0;this.branch=this.opened=this.selected=!1;this.layoutIndex=-1;this.rowLocation=null};r["feathers.controls._TreeGridView.TreeGridViewRowState"]=Yq;Yq.__name__="feathers.controls._TreeGridView.TreeGridViewRowState";Yq.prototype={owner:null,data:null,rowLocation:null,layoutIndex:null,branch:null,opened:null,selected:null,enabled:null,columns:null,cellRendererRecycler:null,customColumnWidths:null,customCellRendererVariant:null,forceItemStateUpdate:null,__class__:Yq};var vc=
function(a,b,c){this.__extendedScrollBarY=this.__showHeaderDividersOnlyWhenResizable=!1;this.__customHeaderDividerVariant=this.__columnDividerFactory=this.__customColumnDividerVariant=this.__layout=this.__columnResizeSkin=this.__headerCornerSkin=null;this.__headerDividerFactory=Ec.withClass(Qb);this._pendingScrollLocation=this._pendingScrollDuration=this.__customCellRendererVariant=this.__customHeaderRendererVariant=null;this._ignoreSelectionChange=this._ignoreOpenedChange=this._ignoreLayoutChanges=
this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Di(0,0);this._visibleIndices=new Di(0,0);this._virtualCache=[];this._totalRowLayoutCount=0;this._rowLayoutItems=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.rowStatePool=new Tb(function(){return new Yq});this.headerStatePool=new Tb(function(){return new Xq});this.rowRendererToRowState=new Na;this.dataToRowRenderer=new Na;this.activeRowRenderers=[];this.inactiveRowRenderers=[];this.headerRendererToHeaderState=
new Na;this.dataToHeaderRenderer=new Na;this._resizableColumns=!1;this._cellRendererRecycler=He.withClass(uf);this._virtualLayout=!0;this._selectedLocation=this._selectedItem=null;this._forceItemStateUpdate=!1;this._autoPopulatedColumns=this._columns=this._previousCustomHeaderRendererVariant=null;this.openBranches=[];this._childFocusEnabled=!0;this._headerScrollRect2=new Ea;this._headerScrollRect1=new Ea;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new Hu;this._headerDividerLayoutItems=
[];this._defaultHeaderDividerStorage=new Iu(Ec.withClass(Qb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new Ju(He.withClass(Gk));this._resizingHeaderTouchPointIsMouse=!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeTreeGridViewTheme();ob.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(He.withClass(Mf));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==
null&&(this.treeGridViewPort=new Dk,this.addChild(this.treeGridViewPort),this.set_viewPort(this.treeGridViewPort));c!=null&&this.addEventListener("change",c)};r["feathers.controls.TreeGridView"]=vc;vc.__name__="feathers.controls.TreeGridView";vc.__interfaces__=[dg,ii];vc.defaultUpdateHeaderRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};vc.defaultResetHeaderRenderer=function(a,b){u.__implements(a,de)&&a.set_text(null)};vc.__super__=ob;vc.prototype=I(ob.prototype,{_headerContainer:null,
_headerContainerLayout:null,_headerResizeContainer:null,_columnDividerContainer:null,_resizingHeaderIndex:null,_resizingHeaderTouchPointID:null,_resizingHeaderTouchPointIsMouse:null,_resizingHeaderStartStageX:null,_customColumnWidths:null,_defaultHeaderStorage:null,_unrenderedHeaderData:null,_headerLayoutItems:null,_defaultHeaderDividerStorage:null,_headerDividerLayoutItems:null,_defaultColumnDividerStorage:null,_columnDividerLayoutItems:null,_currentHeaderScrollRect:null,_headerScrollRect1:null,
_headerScrollRect2:null,_oldHeaderDividerMouseCursor:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},openBranches:null,treeGridViewPort:null,
_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalRowLayoutCount=this._virtualCache.length=0;this.openBranches.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.treeGridView_dataProvider_changeHandler)),this._dataProvider.removeEventListener("addItem",m(this,this.treeGridView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",
m(this,this.treeGridView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.treeGridView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.treeGridView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.treeGridView_dataProvider_resetHandler)),this._dataProvider.removeEventListener("filterChange",m(this,this.treeGridView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",
m(this,this.treeGridView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.treeGridView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.treeGridView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalRowLayoutCount=this.calculateTotalLayoutCount([]),this._virtualCache.length=this._totalRowLayoutCount,this._dataProvider.addEventListener("change",m(this,this.treeGridView_dataProvider_changeHandler)),
this._dataProvider.addEventListener("addItem",m(this,this.treeGridView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.treeGridView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.treeGridView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,this.treeGridView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.treeGridView_dataProvider_resetHandler)),
this._dataProvider.addEventListener("filterChange",m(this,this.treeGridView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.treeGridView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.treeGridView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,this.treeGridView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);
this._autoPopulatedColumns!=null&&(this._autoPopulatedColumns=null,this.set_columns(null));this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_autoPopulatedColumns:null,_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==a)return this._columns;this._columns!=null&&(this._columns.removeEventListener("change",m(this,this.treeGridView_columns_changeHandler)),this._columns.removeEventListener("addItem",m(this,this.treeGridView_columns_addItemHandler)),
this._columns.removeEventListener("removeItem",m(this,this.treeGridView_columns_removeItemHandler)));this._columns=a;this._columns!=null&&(this._columns.addEventListener("change",m(this,this.treeGridView_columns_changeHandler)),this._columns.addEventListener("addItem",m(this,this.treeGridView_columns_addItemHandler)),this._columns.addEventListener("removeItem",m(this,this.treeGridView_columns_removeItemHandler)));this._customColumnWidths=this._autoPopulatedColumns=null;this.setInvalid(x.DATA);return this._columns},
get_rowRendererFactory:function(){return this._rowRendererFactory},set_rowRendererFactory:function(a){if(this._rowRendererFactory==a)return this._rowRendererFactory;this._oldRowRendererFactory=this._rowRendererFactory;this._rowRendererFactory=a;this.setInvalid(vc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);return this._rowRendererFactory},get_headerRendererRecycler:function(){return this._defaultHeaderStorage.headerRendererRecycler},set_headerRendererRecycler:function(a){if(this._defaultHeaderStorage.headerRendererRecycler==
a)return this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.oldHeaderRendererRecycler=this._defaultHeaderStorage.headerRendererRecycler;this._defaultHeaderStorage.headerRendererRecycler=a;this.setInvalid(vc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);return this._defaultHeaderStorage.headerRendererRecycler},_previousCustomHeaderRendererVariant:null,_rowRendererFactory:null,_oldRowRendererFactory:null,_rowRendererMeasurements:null,_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},
set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;this._selectedLocation=a;this._selectedItem=
this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,b)==0)return this._selectedItem;
this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},_cellRendererRecycler:null,get_cellRendererRecycler:function(){return this._cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._cellRendererRecycler==
a)return this._cellRendererRecycler;this._cellRendererRecycler=a;this.setInvalid(x.DATA);return this._cellRendererRecycler},_resizableColumns:null,get_resizableColumns:function(){return this._resizableColumns},set_resizableColumns:function(a){if(this._resizableColumns==a)return this._resizableColumns;this._resizableColumns=a;this.setInvalid(x.LAYOUT);return this._resizableColumns},_currentColumnResizeSkin:null,_currentHeaderCornerSkin:null,dataToHeaderRenderer:null,headerRendererToHeaderState:null,
inactiveRowRenderers:null,activeRowRenderers:null,dataToRowRenderer:null,rowRendererToRowState:null,headerStatePool:null,rowStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_rowLayoutItems:null,_totalRowLayoutCount:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);
return this._selectable},_ignoreSelectionChange:null,_ignoreOpenedChange:null,_ignoreLayoutChanges:null,_ignoreHeaderLayoutChanges:null,_currentDisplayIndex:null,_pendingScrollLocation:null,_pendingScrollDuration:null,scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=0&&(this._pendingScrollLocation=a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},itemAndColumnToCellRenderer:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];
return a==null?null:a.columnToCellRenderer(b)},columnToHeaderRenderer:function(a){return this.dataToHeaderRenderer.h[a.__id__]},headerRendererToColumn:function(a){a=this.headerRendererToHeaderState.h[a.__id__];return a==null?null:a.column},isBranchOpen:function(a){return this._dataProvider!=null&&this._dataProvider.contains(a)?this._dataProvider.isBranch(a)?this.openBranches.indexOf(a)!=-1:!1:!1},toggleBranch:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==
null)throw new rb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new rb("Cannot open item because it is not a branch.");var d=this.openBranches.indexOf(a)!=-1;b&&d||!b&&!d||(d=this.locationToDisplayIndex(c,!1),this.toggleBranchInternal(a,c,d,b),this._totalRowLayoutCount=this.calculateTotalLayoutCount([]))},toggleChildrenOf:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new rb("Cannot open branch because it is not in the data provider.");
if(!this._dataProvider.isBranch(a))throw new rb("Cannot open item because it is not a branch.");var d=this.locationToDisplayIndex(c,!1);this.toggleChildrenOfInternal(a,c,d,b);this._totalRowLayoutCount=this.calculateTotalLayoutCount([])},itemAndColumnToCellState:function(a,b){if(a==null)return null;a=this.dataToRowRenderer.h[a.__id__];return a==null?null:a.columnToCellState(b)},dispose:function(){this.refreshInactiveHeaderRenderers(!0);this.refreshInactiveRowRenderers(!0);this._selectedLocation=this._selectedItem=
null;this.set_dataProvider(null);this.set_columns(null);ob.prototype.dispose.call(this)},initializeTreeGridViewTheme:function(){wu.initialize()},initialize:function(){ob.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=new pl,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new sc,this._headerContainer.set_layout(this._headerContainerLayout),this.addChild(this._headerContainer));this._headerResizeContainer==
null&&(this._headerResizeContainer=new za,this.addChild(this._headerResizeContainer));this._columnDividerContainer==null&&(this._columnDividerContainer=new za,this._columnDividerContainer.mouseEnabled=!1,this._columnDividerContainer.mouseChildren=!1,this.addChild(this._columnDividerContainer))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.LAYOUT),c=this.isInvalid(x.STATE),d=this.isInvalid(x.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&
this.setInvalidationFlag(vc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var f=this.isInvalid(vc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._defaultHeaderDividerStorage.headerDividerFactory!=this.get_headerDividerFactory()&&(this._defaultHeaderDividerStorage.oldHeaderDividerFactory=this._defaultHeaderDividerStorage.headerDividerFactory,this._defaultHeaderDividerStorage.headerDividerFactory=this.get_headerDividerFactory(),this.setInvalidationFlag(vc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=
this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(vc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));var g=this.isInvalid(vc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this._defaultColumnDividerStorage.columnDividerFactory!=this.get_columnDividerFactory()&&(this._defaultColumnDividerStorage.oldColumnDividerFactory=this._defaultColumnDividerStorage.columnDividerFactory,this._defaultColumnDividerStorage.columnDividerFactory=
this.get_columnDividerFactory(),this.setInvalidationFlag(vc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(vc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var h=this.isInvalid(vc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.validateColumns();d&&this.refreshHeaderCornerSkin();(d||
b)&&this.refreshColumnResizeSkin();(f||c||a)&&this.refreshHeaderRenderers();(g||c||a)&&this.refreshHeaderDividers();(h||c||a)&&this.refreshColumnDividers();b&&(this._headerResizeContainer.mouseEnabled=this._resizableColumns,this._headerResizeContainer.mouseChildren=this._resizableColumns);if(a||b)a=this._ignoreHeaderLayoutChanges,this._ignoreHeaderLayoutChanges=!0,this._headerContainerLayout.set_customColumnWidths(this._customColumnWidths),this._ignoreHeaderLayoutChanges=a;if(b||d)this._previousLayout!=
this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalRowLayoutCount),this.treeGridViewPort.set_layout(this.get_layout()),this._previousLayout=this.get_layout();this.treeGridViewPort.refreshChildren=m(this,this.refreshRowRenderers);for(b=this._invalidationFlags.keys();b.hasNext();)d=b.next(),this.treeGridViewPort.setInvalid(d);this._allInvalid&&this.treeGridViewPort.setInvalid();ob.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();
this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){ob.prototype.createScroller.call(this);this.treeGridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();
this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.treeGridViewPort.get_snapPositionsX();this.scroller.snapPositionsY=this.treeGridViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&
u.__implements(this.get_layout(),Jh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._rowLayoutItems.length,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight(),this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._rowLayoutItems.length-1;return a==this._tempVisibleIndices.start?
b!=this._tempVisibleIndices.end:!0},calculateViewPortOffsets:function(a,b){var c=this.topViewPortOffset,d=this.rightViewPortOffset,f=this.bottomViewPortOffset,g=this.leftViewPortOffset;this.get_fixedScrollBars()&&this.get_showScrollBars()&&ob.prototype.calculateViewPortOffsets.call(this,a,b);if(this._headerContainer!=null){var h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),
this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=h;this.topViewPortOffset=c;this.rightViewPortOffset=d;this.bottomViewPortOffset=f;this.leftViewPortOffset=g;this._headerContainer.validateNow();this.topViewPortOffset+=this._headerContainer.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._headerContainer.get_width());this.chromeMeasuredMinWidth=
Math.max(this.chromeMeasuredMinWidth,this._headerContainer.get_width());ob.prototype.calculateViewPortOffsets.call(this,a,b);h=this._ignoreHeaderLayoutChanges;this._ignoreHeaderLayoutChanges=!0;this.get_scrollBarYPosition()._hx_index==3?(this._headerContainerLayout.set_paddingLeft(this.leftViewPortOffset),this._headerContainerLayout.set_paddingRight(0)):(this._headerContainerLayout.set_paddingLeft(0),this._headerContainerLayout.set_paddingRight(this.rightViewPortOffset));this._ignoreHeaderLayoutChanges=
h}},validateColumns:function(){var a=this;if(this._columns==null){var b=null;if(this._dataProvider!=null&&this._dataProvider.getLength()>0){var c=this._dataProvider.get([0]);c=A.fields(c);for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,l=[c[h]];d[h]=new fm(l[0],function(k){return function(q){return L.string(A.getProperty(q,k[0]))}}(l))}b=new mg(d)}else b=new mg;this.runWithInvalidationFlagsOnly(function(){a.set_columns(b)});this._autoPopulatedColumns=b}},layoutHeaders:function(){if(this._headerContainer!=
null){this._headerContainer.set_x(this.get_paddingLeft());this._headerContainer.set_y(this.get_paddingTop());var a=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();this._headerContainer.set_width(Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a));this._headerContainer.validateNow();if(ff.fuzzyEquals(this.get_maxScrollX(),this.get_minScrollX()))this._headerContainer.set_scrollRect(null);else{var b=this._scrollRect1;
this._currentScrollRect==b&&(b=this._scrollRect2);this._currentScrollRect=b;a<0&&(a=0);var c=this._headerContainer.get_height();c<0&&(c=0);b.setTo(this.get_scrollX()-this.get_minScrollX(),0,a,c);this._headerContainer.set_scrollRect(b)}this._currentHeaderCornerSkin!=null&&(this.get_fixedScrollBars()&&!this.get_extendedScrollBarY()&&this.scrollBarY!=null&&this.scrollBarY.get_visible()?(this._currentHeaderCornerSkin.set_x(this.scrollBarY.get_x()),this._currentHeaderCornerSkin.set_width(this.scrollBarY.get_width()),
this._currentHeaderCornerSkin.set_y(this._headerContainer.get_y()),this._currentHeaderCornerSkin.set_height(this._headerContainer.get_height()),this._currentHeaderCornerSkin.set_visible(!0)):this._currentHeaderCornerSkin.set_visible(!1))}},layoutHeaderDividers:function(){this._headerResizeContainer.set_x(this._headerContainer.get_x());this._headerResizeContainer.set_y(this._headerContainer.get_y());for(var a=0,b=this._headerDividerLayoutItems.length;a<b;){var c=a++,d=this._headerDividerLayoutItems[c];
d.set_visible(!this.get_showHeaderDividersOnlyWhenResizable()||this.get_resizableColumns());u.__implements(d,oa)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(c.get_height())}},layoutColumnDividers:function(){this._columnDividerContainer.set_x(this._viewPort.get_x());this._columnDividerContainer.set_y(this._viewPort.get_y());for(var a=0,b=this._columnDividerLayoutItems.length;a<b;){var c=a++,d=this._columnDividerLayoutItems[c];
u.__implements(d,oa)&&d.validateNow();c=this._headerLayoutItems[c];d.set_x(c.get_x()+c.get_width()-d.get_width()/2);d.set_y(c.get_y());d.set_height(this._viewPort.get_visibleHeight())}},layoutScrollBars:function(){if(this.get_extendedScrollBarY()){var a=this.topViewPortOffset;this.topViewPortOffset=0;ob.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else ob.prototype.layoutScrollBars.call(this)},refreshHeaderCornerSkin:function(){var a=this._currentHeaderCornerSkin;this._currentHeaderCornerSkin=
this.getCurrentHeaderCornerSkin();this._currentHeaderCornerSkin!=a&&(this.removeCurrentHeaderCornerSkin(a),this.addCurrentHeaderCornerSkin(this._currentHeaderCornerSkin))},getCurrentHeaderCornerSkin:function(){return this.get_headerCornerSkin()},addCurrentHeaderCornerSkin:function(a){a!=null&&(u.__implements(a,jb)&&a.initializeNow(),u.__implements(a,wb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==
this&&this.removeChild(a))},refreshColumnResizeSkin:function(){var a=this._currentColumnResizeSkin;this._currentColumnResizeSkin=this.getCurrentColumnResizeSkin();this._currentColumnResizeSkin!=a&&(this.removeCurrentColumnResizeSkin(a),this._currentColumnResizeSkin!=null&&(u.__implements(this._currentColumnResizeSkin,jb)&&this._currentColumnResizeSkin.initializeNow(),u.__implements(this._currentColumnResizeSkin,wb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),
this._currentColumnResizeSkin instanceof Da&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof lb&&(this._currentColumnResizeSkin.mouseChildren=!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshHeaderRenderers:function(){var a=this._ignoreHeaderLayoutChanges;
this._ignoreHeaderLayoutChanges=!0;this._headerContainerLayout.set_columns(this._columns);this._ignoreHeaderLayoutChanges=a;this._defaultHeaderStorage.headerRendererRecycler.update==null&&(this._defaultHeaderStorage.headerRendererRecycler.update=vc.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=vc.defaultResetHeaderRenderer));a=this.isInvalid(vc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);
this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(vc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();
if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=this.isInvalid(vc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive column dividers should be empty after updating.");
},refreshInactiveHeaderDividers:function(a){var b=this._defaultHeaderDividerStorage.inactiveHeaderDividers;this._defaultHeaderDividerStorage.inactiveHeaderDividers=this._defaultHeaderDividerStorage.activeHeaderDividers;this._defaultHeaderDividerStorage.activeHeaderDividers=b;if(this._defaultHeaderDividerStorage.activeHeaderDividers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active header dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultHeaderDividerStorage.oldHeaderDividerFactory=
null)},freeInactiveHeaderDividers:function(){for(var a=this._defaultHeaderDividerStorage.oldHeaderDividerFactory!=null?this._defaultHeaderDividerStorage.oldHeaderDividerFactory:this._defaultHeaderDividerStorage.headerDividerFactory,b=0,c=this._defaultHeaderDividerStorage.inactiveHeaderDividers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderDivider(d,a)}this._defaultHeaderDividerStorage.inactiveHeaderDividers.length=0},refreshActiveHeaderDividers:function(){this._headerDividerLayoutItems.length=
0;if(this._defaultHeaderDividerStorage.headerDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createHeaderDivider(d,c);this._headerDividerLayoutItems[c]=d;this._defaultHeaderDividerStorage.activeHeaderDividers.push(d)}},createHeaderDivider:function(a,b){if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length==0){a=this._defaultHeaderDividerStorage.headerDividerFactory.create();if(u.__implements(a,If)){var c=a;if(c.get_variant()==
null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():vc.CHILD_VARIANT_HEADER_DIVIDER;c.set_variant(d)}}u.__implements(a,jb)&&a.initializeNow();a.addEventListener("rollOver",m(this,this.treeGridView_headerDivider_rollOverHandler));a.addEventListener("rollOut",m(this,this.treeGridView_headerDivider_rollOutHandler));a.addEventListener("mouseDown",m(this,this.treeGridView_headerDivider_mouseDownHandler));a.addEventListener("touchBegin",m(this,this.treeGridView_headerDivider_touchBeginHandler));
this._headerResizeContainer.addChildAt(a,b)}else a=this._defaultHeaderDividerStorage.inactiveHeaderDividers.shift(),this._headerResizeContainer.setChildIndex(a,b);return a},destroyHeaderDivider:function(a,b){a.removeEventListener("rollOver",m(this,this.treeGridView_headerDivider_rollOverHandler));a.removeEventListener("rollOut",m(this,this.treeGridView_headerDivider_rollOutHandler));a.removeEventListener("mouseDown",m(this,this.treeGridView_headerDivider_mouseDownHandler));a.removeEventListener("touchBegin",
m(this,this.treeGridView_headerDivider_touchBeginHandler));this._headerResizeContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveColumnDividers:function(a){var b=this._defaultColumnDividerStorage.inactiveColumnDividers;this._defaultColumnDividerStorage.inactiveColumnDividers=this._defaultColumnDividerStorage.activeColumnDividers;this._defaultColumnDividerStorage.activeColumnDividers=b;if(this._defaultColumnDividerStorage.activeColumnDividers.length>0)throw a=u.getClass(this),
new fb(""+a.__name__+": active column dividers should be empty before updating.");a&&(this.freeInactiveHeaderDividers(),this._defaultColumnDividerStorage.oldColumnDividerFactory=null)},freeInactiveColumnDividers:function(){for(var a=this._defaultColumnDividerStorage.oldColumnDividerFactory!=null?this._defaultColumnDividerStorage.oldColumnDividerFactory:this._defaultColumnDividerStorage.columnDividerFactory,b=0,c=this._defaultColumnDividerStorage.inactiveColumnDividers;b<c.length;){var d=c[b];++b;
d!=null&&this.destroyColumnDivider(d,a)}this._defaultColumnDividerStorage.inactiveColumnDividers.length=0},refreshActiveColumnDividers:function(){this._columnDividerLayoutItems.length=0;if(this._defaultColumnDividerStorage.columnDividerFactory!=null)for(var a=0,b=this._columns.get_length()-1;a<b;){var c=a++,d=this._columns.get(c);d=this.createColumnDivider(d,c);this._columnDividerLayoutItems[c]=d;this._defaultColumnDividerStorage.activeColumnDividers.push(d)}},createColumnDivider:function(a,b){if(this._defaultColumnDividerStorage.inactiveColumnDividers.length==
0){a=this._defaultColumnDividerStorage.columnDividerFactory.create();if(u.__implements(a,If)){var c=a;if(c.get_variant()==null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():vc.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}u.__implements(a,jb)&&a.initializeNow();this._columnDividerContainer.addChildAt(a,b)}else a=this._defaultColumnDividerStorage.inactiveColumnDividers.shift(),this._columnDividerContainer.setChildIndex(a,b);return a},destroyColumnDivider:function(a,
b){this._columnDividerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},refreshInactiveHeaderRenderers:function(a){var b=this._defaultHeaderStorage.inactiveHeaderRenderers;this._defaultHeaderStorage.inactiveHeaderRenderers=this._defaultHeaderStorage.activeHeaderRenderers;this._defaultHeaderStorage.activeHeaderRenderers=b;if(this._defaultHeaderStorage.activeHeaderRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active header renderers should be empty before updating.");
a&&(this.recoverInactiveHeaderRenderers(),this.freeInactiveHeaderRenderers(),this._defaultHeaderStorage.oldHeaderRendererRecycler=null)},recoverInactiveHeaderRenderers:function(){for(var a=0,b=this._defaultHeaderStorage.inactiveHeaderRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.headerRendererToHeaderState.h[c.__id__];if(d!=null){var f=d.column;this.headerRendererToHeaderState.remove(c);this.dataToHeaderRenderer.remove(f);c.removeEventListener("trigger",m(this,this.treeGridView_headerRenderer_triggerHandler));
c.removeEventListener("click",m(this,this.treeGridView_headerRenderer_clickHandler));c.removeEventListener("touchTap",m(this,this.treeGridView_headerRenderer_touchTapHandler));c.removeEventListener("resize",m(this,this.treeGridView_headerRenderer_resizeHandler));this.resetHeaderRenderer(c,d);this._defaultHeaderStorage.measurements!=null&&this._defaultHeaderStorage.measurements.restore(c);this.headerStatePool.release(d)}}}},freeInactiveHeaderRenderers:function(){for(var a=this._defaultHeaderStorage.oldHeaderRendererRecycler!=
null?this._defaultHeaderStorage.oldHeaderRendererRecycler:this._defaultHeaderStorage.headerRendererRecycler,b=0,c=this._defaultHeaderStorage.inactiveHeaderRenderers;b<c.length;){var d=c[b];++b;d!=null&&this.destroyHeaderRenderer(d,a)}this._defaultHeaderStorage.inactiveHeaderRenderers.length=0},findUnrenderedHeaderData:function(){this._rowLayoutItems.length=0;if(this._columns!=null&&this._columns.get_length()!=0){this._rowLayoutItems.length=this._columns.get_length();for(var a=0,b=this._columns.get_length();a<
b;){var c=a++,d=this._columns.get(c),f=this.dataToHeaderRenderer.h[d.__id__];if(f!=null){var g=this.headerRendererToHeaderState.h[f.__id__];this.populateCurrentHeaderState(d,c,g,this._forceItemStateUpdate)&&this.updateHeaderRenderer(f,g);f.set_visible(!0);this._headerLayoutItems[c]=f;if(!X.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=u.getClass(this),new fb(""+a.__name__+": header renderer map contains bad data for column at index "+c+". This may be caused by duplicate columns, which is not allowed.");
this._defaultHeaderStorage.activeHeaderRenderers.push(f)}else this._unrenderedHeaderData.push(d)}}},renderUnrenderedHeaderData:function(){for(var a=0,b=this._unrenderedHeaderData;a<b.length;){var c=b[a];++a;var d=this._columns.indexOf(c),f=this.headerStatePool.get();this.populateCurrentHeaderState(c,d,f,!0);c=this.createHeaderRenderer(f);c.set_visible(!0);this._headerContainer.addChildAt(c,d);this._headerLayoutItems[d]=c}this._unrenderedHeaderData.length=0},refreshRowRenderers:function(a){this._rowLayoutItems=
a;a=this.treeGridViewPort.isInvalid(vc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive row renderers should be empty after updating.");},refreshInactiveRowRenderers:function(a){var b=this.inactiveRowRenderers;this.inactiveRowRenderers=this.activeRowRenderers;
this.activeRowRenderers=b;if(this.activeRowRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active row renderers should be empty before updating.");a&&(this.recoverInactiveRowRenderers(),this.freeInactiveRowRenderers(),this._oldRowRendererFactory=null)},recoverInactiveRowRenderers:function(){for(var a=0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;if(c!=null){var d=this.rowRendererToRowState.h[c.__id__];if(d!=null){var f=d.data;this.rowRendererToRowState.remove(c);this.dataToRowRenderer.remove(f);
c.removeEventListener("cellTrigger",m(this,this.treeGridView_rowRenderer_cellTriggerHandler));c.removeEventListener("trigger",m(this,this.treeGridView_rowRenderer_triggerHandler));c.removeEventListener("open",m(this,this.treeGridView_rowRenderer_openHandler));c.removeEventListener("close",m(this,this.treeGridView_rowRenderer_closeHandler));this.resetRowRenderer(c,d);this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(c);this.rowStatePool.release(d)}}}},freeInactiveRowRenderers:function(){for(var a=
0,b=this.inactiveRowRenderers;a<b.length;){var c=b[a];++a;c!=null&&this.destroyRowRenderer(c)}this.inactiveRowRenderers.length=0},findUnrenderedData:function(){this._rowLayoutItems.length=0;this._rowLayoutItems.length=this._totalRowLayoutCount;if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);
this._ignoreLayoutChanges=b;a.getVisibleIndices(this._rowLayoutItems.length,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=this._rowLayoutItems.length-1;this.findUnrenderedDataForLocation([],0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||
b>this._visibleIndices.end?this._rowLayoutItems[b]=null:this.findRowRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.findUnrenderedDataForLocation(a,b),b>this._visibleIndices.end))break;a.pop()}return b},findRowRenderer:function(a,b,c){var d=this.dataToRowRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.rowRendererToRowState.h[d.__id__];
this.populateCurrentRowState(a,b,c,f,this._forceItemStateUpdate)&&this.updateRowRenderer(d,f);d.set_visible(!0);this._rowLayoutItems[c]=d;if(!X.remove(this.inactiveRowRenderers,d))throw a=u.getClass(this),new fb(""+a.__name__+": row renderer map contains bad data for item at location "+L.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");this.activeRowRenderers.push(d)}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=
b[a];++a;var d=this._unrenderedLayoutIndices.shift(),f=this._dataProvider.get(c),g=this.rowStatePool.get();this.populateCurrentRowState(f,c,d,g,!0);c=this.createRowRenderer(g);c.set_visible(!0);this.treeGridViewPort.addChild(c);this._rowLayoutItems[d]=c}this._unrenderedLocations.length=0},createRowRenderer:function(a){if(this.inactiveRowRenderers.length==0){var b=this._rowRendererFactory.create();this._rowRendererMeasurements==null&&(this._rowRendererMeasurements=new Ib(b));b.initializeNow()}else b=
this.inactiveRowRenderers.shift();this.updateRowRenderer(b,a);b.set_treeGridView(this);b.addEventListener("cellTrigger",m(this,this.treeGridView_rowRenderer_cellTriggerHandler));b.addEventListener("trigger",m(this,this.treeGridView_rowRenderer_triggerHandler));b.addEventListener("open",m(this,this.treeGridView_rowRenderer_openHandler));b.addEventListener("close",m(this,this.treeGridView_rowRenderer_closeHandler));this.rowRendererToRowState.set(b,a);this.dataToRowRenderer.set(a.data,b);this.activeRowRenderers.push(b);
return b},destroyRowRenderer:function(a){var b=this._oldRowRendererFactory!=null?this._oldRowRendererFactory:this._rowRendererFactory;a.set_treeGridView(null);this.treeGridViewPort.removeChild(a);b.destroy!=null&&b.destroy(a)},updateRowRenderer:function(a,b){this.refreshRowRendererProperties(a,b)},resetRowRenderer:function(a,b){this.refreshRowRendererProperties(a,vc.RESET_ROW_STATE)},populateCurrentRowState:function(a,b,c,d,f){var g=!1;if(f||d.owner!=this)d.owner=this,g=!0;if(f||d.data!=a)d.data=
a,g=!0;if(f||d.rowLocation!=b&&this.compareLocations(d.rowLocation,b)!=0)d.rowLocation=b,g=!0;if(f||d.layoutIndex!=c)d.layoutIndex=c,g=!0;c=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(f||d.branch!=c)d.branch=c,g=!0;a=d.branch&&this.openBranches.indexOf(a)!=-1;if(f||d.opened!=a)d.opened=a,g=!0;b=this.compareLocations(b,this._selectedLocation)==0;if(f||d.selected!=b)d.selected=b,g=!0;b=this._enabled;if(f||d.enabled!=b)d.enabled=b,g=!0;b=this._columns;if(f||d.columns!=b)d.columns=b,g=
!0;b=this._cellRendererRecycler;if(f||d.cellRendererRecycler!=b)d.cellRendererRecycler=b,g=!0;b=this._customColumnWidths;if(f||d.customColumnWidths!=b)d.customColumnWidths=b,g=!0;b=this.get_customCellRendererVariant();if(f||d.customCellRendererVariant!=b)d.customCellRendererVariant=b,g=!0;b=this._forceItemStateUpdate;if(f||d.forceItemStateUpdate!=b)d.forceItemStateUpdate=b,g=!0;return g},populateCurrentRowCellState:function(a,b,c,d,f,g,h){var l=!1;if(h||g.owner!=this)g.owner=this,l=!0;if(h||g.data!=
a)g.data=a,l=!0;if(h||g.rowLocation!=b&&this.compareLocations(g.rowLocation,b)!=0)g.rowLocation=b,l=!0;if(h||g.columnIndex!=d)g.columnIndex=d,l=!0;if(h||g.column!=c)g.column=c,l=!0;if(h||g.layoutIndex!=f)g.layoutIndex=f,l=!0;d=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(h||g.branch!=d)g.branch=d,l=!0;d=g.branch&&this.openBranches.indexOf(a)!=-1;if(h||g.opened!=d)g.opened=d,l=!0;b=this.compareLocations(b,this._selectedLocation)==0;if(h||g.selected!=b)g.selected=b,l=!0;b=this._enabled;
if(h||g.enabled!=b)g.enabled=b,l=!0;a=c!=null?c.itemToText(a):null;if(h||g.text!=a)g.text=a,l=!0;return l},refreshRowRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;a.set_data(b.data);a.set_rowLocation(b.rowLocation);a.set_layoutIndex(b.layoutIndex);a.set_branch(b.branch);a.set_opened(b.opened);a.set_selected(b.selected);a.set_enabled(b.enabled);a.set_columns(b.columns);a.set_cellRendererRecycler(b.cellRendererRecycler);
a.set_customCellRendererVariant(b.customCellRendererVariant);a.set_customColumnWidths(b.customColumnWidths);a.set_forceCellStateUpdate(b.forceItemStateUpdate);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},createHeaderRenderer:function(a){if(this._defaultHeaderStorage.inactiveHeaderRenderers.length==0){var b=this._defaultHeaderStorage.headerRendererRecycler.create();if(u.__implements(b,If)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():
vc.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}u.__implements(b,jb)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Ib(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);u.__implements(b,Fh)?b.addEventListener("trigger",m(this,this.treeGridView_headerRenderer_triggerHandler)):(b.addEventListener("click",m(this,this.treeGridView_headerRenderer_clickHandler)),b.addEventListener("touchTap",
m(this,this.treeGridView_headerRenderer_touchTapHandler)));u.__implements(b,Kb)&&b.addEventListener("resize",m(this,this.treeGridView_headerRenderer_resizeHandler));this.headerRendererToHeaderState.set(b,a);this.dataToHeaderRenderer.set(a.column,b);this._defaultHeaderStorage.activeHeaderRenderers.push(b);return b},destroyHeaderRenderer:function(a,b){this._headerContainer.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},populateCurrentHeaderState:function(a,b,c,d){var f=!1;if(d||c.owner!=this)c.owner=
this,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;a=a.headerText;if(d||c.text!=a)c.text=a,f=!0;a=this._enabled;if(d||c.enabled!=a)c.enabled=a,f=!0;return f},updateHeaderRenderer:function(a,b){this._defaultHeaderStorage.headerRendererRecycler.update!=null&&this._defaultHeaderStorage.headerRendererRecycler.update(a,b);this.refreshHeaderRendererProperties(a,b)},resetHeaderRenderer:function(a,b){var c=this._defaultHeaderStorage.oldHeaderRendererRecycler!=null?this._defaultHeaderStorage.oldHeaderRendererRecycler:
this._defaultHeaderStorage.headerRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this.refreshHeaderRendererProperties(a,vc.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,Lo)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_treeGridViewOwner(b.owner));u.__implements(a,ji)&&a.set_layoutIndex(b.columnIndex)},displayIndexToLocation:function(a){this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,
[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(f=this.displayIndexToLocationAtBranch(a,b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a,b){this._currentDisplayIndex=-1;var c=null;b&&(c=[]);return this.locationToDisplayIndexAtBranch([],
a,c)},locationToDisplayIndexAtBranch:function(a,b,c){c!=null&&c.push(b[a.length]);for(var d=0,f=this._dataProvider.getLength(a);d<f;){var g=d++;this._currentDisplayIndex++;a[a.length]=g;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;g=this._dataProvider.get(a);if(this._dataProvider.isBranch(g))if(this.openBranches.indexOf(g)!=-1){if(g=this.locationToDisplayIndexAtBranch(a,b,c),g!=-1)return g}else if(c!=null&&this.compareLocations(c,a)==0)return this._currentDisplayIndex;--a.length}c!=
null&&c.pop();return-1},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._rowLayoutItems.length!=0){var b=this.locationToDisplayIndex(this._selectedLocation,!1),c=b;if(u.__implements(this.get_layout(),wj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;c=this.get_layout().findNextKeyboardIndex(c,a,!1,this._rowLayoutItems,null,this.treeGridViewPort.get_visibleWidth(),this.treeGridViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--c;
break;case 34:++c;break;case 35:c=this._rowLayoutItems.length-1;break;case 36:c=0;break;case 37:--c;break;case 38:--c;break;case 39:++c;break;case 40:++c;break;default:return}c<0?c=0:c>=this._rowLayoutItems.length&&(c=this._rowLayoutItems.length-1);b=c!=b;var d=null;if(!b&&c!=-1){d=this.displayIndexToLocation(c);var f=this.dataToRowRenderer,g=this._dataProvider.get(d);f.h[g.__id__]==null?b=!0:u.__implements(this.get_layout(),Oe)&&(f=this.get_layout().getNearestScrollPositionForIndex(c,this._rowLayoutItems.length,
this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),this.get_scrollX()!=f.x||this.get_scrollY()!=f.y)&&(b=!0)}b&&(a.preventDefault(),d==null&&(d=this.displayIndexToLocation(c)),this.set_selectedLocation(d),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):this.stage!=null&&this.stage.set_focus(this))}},handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,
b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(u.__implements(this.get_layout(),Oe))c=this.locationToDisplayIndex(a,!0),d=this.get_layout().getNearestScrollPositionForIndex(c,this._rowLayoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);
a=this.dataToRowRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},toggleBranchInternal:function(a,b,c,d){var f=this.dataToRowRenderer.h[a.__id__],g=null;f!=null&&(g=this.rowRendererToRowState.h[f.__id__]);var h=!1;
g==null&&(h=!0,g=this.rowStatePool.get());g.rowLocation=b;g.layoutIndex=c;var l=this.openBranches.indexOf(a)!=-1;d&&!l?(this.openBranches.push(a),this.populateCurrentRowState(a,b,c,g,!0),c=this.insertChildrenIntoVirtualCache(b,c),f!=null&&this.updateRowRenderer(f,g),d=new gm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),Je.dispatchForCell(this,"branchOpen",d)):!d&&l&&(X.remove(this.openBranches,a),this.populateCurrentRowState(a,b,c,g,!0),this.removeChildrenFromVirtualCache(b,c),f!=null&&this.updateRowRenderer(f,
g),d=new gm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),Je.dispatchForCell(this,"branchClose",d));h&&this.rowStatePool.release(g);this.setInvalid(x.DATA);return c},toggleChildrenOfInternal:function(a,b,c,d){c=this.toggleBranchInternal(a,b,c,d);a=0;for(var f=this._dataProvider.getLength(b);a<f;){var g=a++;b.push(g);g=this._dataProvider.get(b);this._dataProvider.isBranch(g)&&this.toggleChildrenOfInternal(g,b,c,d);b.pop()}},refreshOpenBranchesFromDataProviderChange:function(a,b){if(a!=null)for(var c=
this.openBranches.length-1;c>=0;){var d=this.openBranches[c];d==a?a!=b&&this.openBranches.splice(c,1):(this._dataProvider.locationOf(d)==null&&this.openBranches.splice(c,1),--c)}},baseScrollContainer_keyDownHandler:function(a){this._selectable?this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):ob.prototype.baseScrollContainer_keyDownHandler.call(this,a)},treeGridView_rowRenderer_triggerHandler:function(a){this._selectable&&
(a=u.__cast(a.currentTarget,Mf),this.set_selectedLocation(this.rowRendererToRowState.h[a.__id__].rowLocation.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation))},treeGridView_rowRenderer_cellTriggerHandler:function(a){this.dispatchEvent(a.clone())},treeGridView_rowRenderer_openHandler:function(a){this._ignoreOpenedChange||(a=u.__cast(a.currentTarget,Mf),this.toggleBranch(this.rowRendererToRowState.h[a.__id__].data,!0))},treeGridView_rowRenderer_closeHandler:function(a){this._ignoreOpenedChange||
(a=u.__cast(a.currentTarget,Mf),this.toggleBranch(this.rowRendererToRowState.h[a.__id__].data,!1))},treeGridView_dataProvider_changeHandler:function(a){this._totalRowLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalRowLayoutCount);this.setInvalid(x.DATA)},treeGridView_dataProvider_addItemHandler:function(a){this._selectedLocation!=null&&this.compareLocations(this._selectedLocation,a.location)>=0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},
treeGridView_dataProvider_removeItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},treeGridView_dataProvider_replaceItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,
a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),W.dispatch(this,"change")))},treeGridView_dataProvider_removeAllHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},treeGridView_dataProvider_resetHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},
treeGridView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},treeGridView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateRowRendererForLocation:function(a){var b=this.locationToDisplayIndex(a,!1);this._virtualCache!=null&&b!=-1&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a),d=this.dataToRowRenderer.h[c.__id__];if(d==null)this.setInvalid(x.DATA);else{var f=this.rowRendererToRowState.h[d.__id__];
f.owner!=null&&(d.updateCells(),this.populateCurrentRowState(c,a,b,f,!0),this.resetRowRenderer(d,f),this._rowRendererMeasurements!=null&&this._rowRendererMeasurements.restore(d),f.owner=null,this.setInvalid(x.DATA))}},validateCustomColumnWidths:function(){if(!(this._customColumnWidths==null||this._customColumnWidths.length<this._columns.get_length())){this._customColumnWidths.length>this._columns.get_length()&&(this._customColumnWidths.length=this._columns.get_length());var a=this.actualWidth-this.get_paddingLeft()-
this.get_paddingRight();a=Math.max(this._viewPort.get_width()+this._headerContainerLayout.get_paddingLeft()+this._headerContainerLayout.get_paddingRight(),a)-this._headerContainerLayout.get_paddingLeft()-this._headerContainerLayout.get_paddingRight();for(var b=0,c=[],d=0,f=this._customColumnWidths.length;d<f;){var g=d++,h=this._columns.get(g);h.width!=null?a-=h.width:(b+=this._customColumnWidths[g],c.push(g))}b!=a&&(this._customColumnWidths=this._customColumnWidths.slice(),this.distributeWidthToIndices(a-
b,c,b),this.setInvalid(x.LAYOUT))}},calculateResizedColumnWidth:function(a){var b=this._columns.get_length();this._customColumnWidths=this._customColumnWidths==null?[]:this._customColumnWidths.slice();this._customColumnWidths.length=b;var c=this._columns.get(this._resizingHeaderIndex);c.width=null;var d=this.dataToHeaderRenderer.h[c.__id__];c=this._columns.get(this._resizingHeaderIndex);var f=this._headerContainer.get_x()+d.get_x()+c.minWidth,g=this.actualWidth-this.rightViewPortOffset,h=this._headerContainer.get_x()+
d.get_x()+d.get_width(),l=Math.min(Math.max(h+a,f),g)-d.get_x()-this._headerContainer.get_x();h=0;a=d.get_width();f=0;g=[];for(var k=0;k<b;){var q=k++;d=this._columns.get(q);q!=this._resizingHeaderIndex&&(q<this._resizingHeaderIndex?(d=this.dataToHeaderRenderer.h[d.__id__],this._customColumnWidths[q]=d.get_width(),h+=d.get_width()):d.width!=null?h+=d.width:(h+=d.minWidth,d=this.dataToHeaderRenderer.h[d.__id__],d=d.get_width(),f+=d,this._customColumnWidths[q]=d,g[g.length]=q))}g.length==0&&(b=this._resizingHeaderIndex+
1,g[0]=b,c=this._columns.get(b),f=c.width,h=h-f+c.minWidth,this._customColumnWidths[b]=f,c.width=null);b=l;d=this._headerContainer.get_width()-h;b>d&&(b=d);b<c.minWidth&&(b=c.minWidth);this._customColumnWidths[this._resizingHeaderIndex]=b;this.distributeWidthToIndices(a-b,g,f);this.setInvalid(x.LAYOUT)},distributeWidthToIndices:function(a,b,c){for(;Math.abs(a)>1;){for(var d=a,f=b.length-1;f>=0;){var g=b[f],h=this._columns.get(g),l=this.dataToHeaderRenderer.h[h.__id__].get_width(),k=l/c*a,q=this._customColumnWidths[g]+
k;q<h.minWidth&&(k+=h.minWidth-q,q=h.minWidth,b.splice(f,1),c-=l);this._customColumnWidths[g]=q;d-=k;--f}a=d}a!=0&&(this._customColumnWidths[this._customColumnWidths.length-1]+=a)},layoutColumnResizeSkin:function(a){if(this._currentColumnResizeSkin!=null){var b=this._columns.get(this._resizingHeaderIndex),c=this.dataToHeaderRenderer.h[b.__id__];b=this._headerContainer.get_x()+c.get_x()+b.minWidth;var d=this.actualWidth-this.rightViewPortOffset;c=this._headerContainer.get_x()+c.get_x()+c.get_width();
a=Math.min(Math.max(c+a,b),d)-this._currentColumnResizeSkin.get_width()/2;this._currentColumnResizeSkin.set_visible(!0);this._currentColumnResizeSkin.set_x(a);this._currentColumnResizeSkin.set_y(this.get_paddingTop());this._currentColumnResizeSkin.set_height(this.actualHeight-this.get_paddingTop()-this.bottomViewPortOffset);this.setChildIndex(this._currentColumnResizeSkin,this.get_numChildren()-1)}},headerResizeTouchBegin:function(a,b,c,d){if(this._enabled&&this._resizableColumns&&this._resizingHeaderIndex==
-1&&this.stage!=null){var f=Ad.forStage(this.stage);if(b?f.claimMouse(c):f.claimTouch(a,c))this._resizingHeaderTouchPointID=a,this._resizingHeaderTouchPointIsMouse=b,this._resizingHeaderIndex=this._headerDividerLayoutItems.indexOf(c),this._resizingHeaderStartStageX=d,this.layoutColumnResizeSkin(0),b?(this.stage.addEventListener("mouseMove",m(this,this.treeGridView_headerDivider_stage_mouseMoveHandler),!1,0,!0),this.stage.addEventListener("mouseUp",m(this,this.treeGridView_headerDivider_stage_mouseUpHandler),
!1,0,!0)):(this.stage.addEventListener("touchMove",m(this,this.treeGridView_headerDivider_stage_touchMoveHandler),!1,0,!0),this.stage.addEventListener("touchEnd",m(this,this.treeGridView_headerDivider_stage_touchEndHandler),!1,0,!0))}},headerResizeTouchMove:function(a,b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(a=c-this._resizingHeaderStartStageX,a*=Qg.getConcatenatedScaleX(this),this.layoutColumnResizeSkin(a))},headerResizeTouchEnd:function(a,
b,c){this._resizingHeaderTouchPointID!=null&&this._resizingHeaderTouchPointID==a&&this._resizingHeaderTouchPointIsMouse==b&&(b?(this.stage.removeEventListener("mouseMove",m(this,this.treeGridView_headerDivider_stage_mouseMoveHandler)),this.stage.removeEventListener("mouseUp",m(this,this.treeGridView_headerDivider_stage_mouseUpHandler))):(this.stage.removeEventListener("touchMove",m(this,this.treeGridView_headerDivider_stage_touchMoveHandler)),this.stage.removeEventListener("touchEnd",m(this,this.treeGridView_headerDivider_stage_touchEndHandler))),
this._currentColumnResizeSkin!=null&&this._currentColumnResizeSkin.set_visible(!1),a=c-this._resizingHeaderStartStageX,a*=Qg.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(Id.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null))},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=
null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},insertChildrenIntoVirtualCache:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);
++b;this._virtualCache.splice(b,0,null);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.insertChildrenIntoVirtualCache(a,b));a.pop()}return b},removeChildrenFromVirtualCache:function(a,b){var c=this._dataProvider.getLength(a);++b;for(var d=0;d<c;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&this.removeChildrenFromVirtualCache(a,b);this._virtualCache.splice(b,1);a.pop()}},containsLocation:function(a,
b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,l=a[h];h=b[h];if(l<h)return-1;if(l>h)return 1}return c<d?-1:c>d?1:0},treeGridView_dataProvider_updateItemHandler:function(a){this.updateRowRendererForLocation(a.location)},treeGridView_dataProvider_updateAllHandler:function(a){a=
[];for(var b=0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateRowRendererForLocation(a)}},treeGridView_columns_addItemHandler:function(a){if(this._customColumnWidths!=null){var b=u.__cast(a.addedItem,fm);a=a.index;if(!(b.width!=null||a>this._customColumnWidths.length)){this._customColumnWidths.splice(a,0,0);this.get_paddingLeft();this.get_paddingRight();this._viewPort.get_width();this._headerContainerLayout.get_paddingLeft();this._headerContainerLayout.get_paddingRight();this._headerContainerLayout.get_paddingLeft();
this._headerContainerLayout.get_paddingRight();for(var c=0,d=[],f=0,g=this._customColumnWidths.length;f<g;){var h=f++;h!=a&&(b=this._columns.get(h),b.width==null&&(c+=this._customColumnWidths[h],d.push(h)))}b=c/(d.length+1);this._customColumnWidths[a]=b;this._customColumnWidths=this._customColumnWidths.slice();this.distributeWidthToIndices(-b,d,c);this.setInvalid(x.LAYOUT)}}},treeGridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=u.__cast(a.removedItem,fm);a=a.index;
b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(x.LAYOUT))}},treeGridView_columns_changeHandler:function(a){this.setInvalid(x.DATA)},treeGridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=u.__cast(a.currentTarget,ea),Je.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,
ea),Je.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,ea),Je.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},treeGridView_headerDivider_mouseDownHandler:function(a){a=u.__cast(a.currentTarget,Da);this.headerResizeTouchBegin(vc.POINTER_ID_MOUSE,
!0,a,a.stage.get_mouseX())},treeGridView_headerDivider_stage_mouseMoveHandler:function(a){a=u.__cast(a.currentTarget,cd);this.headerResizeTouchMove(vc.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_stage_mouseUpHandler:function(a){a=u.__cast(a.currentTarget,cd);this.headerResizeTouchEnd(vc.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=u.__cast(a.currentTarget,Da);this.headerResizeTouchBegin(a.touchPointID,
!1,b,b.stage.get_mouseX())}},treeGridView_headerDivider_stage_touchMoveHandler:function(a){var b=u.__cast(a.currentTarget,cd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_stage_touchEndHandler:function(a){var b=u.__cast(a.currentTarget,cd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&Id.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=
Id.get_cursor(),Id.set_cursor(Vg.fromLimeCursor($c.RESIZE_WE)))},treeGridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(Id.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null)},get_styleContext:function(){return vc},__customCellRendererVariant:null,get_customCellRendererVariant:function(){return this.__customCellRendererVariant},set_customCellRendererVariant:function(a){if(!this.setStyle("customCellRendererVariant")||
this.__customCellRendererVariant==a)return this.__customCellRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customCellRendererVariant);this.__customCellRendererVariant=a;this.setInvalid(x.STYLES);return this.__customCellRendererVariant},clearStyle_customCellRendererVariant:function(){this.set_customCellRendererVariant(null);return this.get_customCellRendererVariant()},__customHeaderRendererVariant:null,get_customHeaderRendererVariant:function(){return this.__customHeaderRendererVariant},
set_customHeaderRendererVariant:function(a){if(!this.setStyle("customHeaderRendererVariant")||this.__customHeaderRendererVariant==a)return this.__customHeaderRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderRendererVariant);this.__customHeaderRendererVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderRendererVariant},clearStyle_customHeaderRendererVariant:function(){this.set_customHeaderRendererVariant(null);return this.get_customHeaderRendererVariant()},__headerDividerFactory:null,
get_headerDividerFactory:function(){return this.__headerDividerFactory},set_headerDividerFactory:function(a){if(!this.setStyle("headerDividerFactory")||this.__headerDividerFactory==a)return this.__headerDividerFactory;this._previousClearStyle=m(this,this.clearStyle_headerDividerFactory);this.__headerDividerFactory=a;this.setInvalid(x.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Ec.withClass(Qb));return this.get_headerDividerFactory()},
__customHeaderDividerVariant:null,get_customHeaderDividerVariant:function(){return this.__customHeaderDividerVariant},set_customHeaderDividerVariant:function(a){if(!this.setStyle("customHeaderDividerVariant")||this.__customHeaderDividerVariant==a)return this.__customHeaderDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customHeaderDividerVariant);this.__customHeaderDividerVariant=a;this.setInvalid(x.STYLES);return this.__customHeaderDividerVariant},clearStyle_customHeaderDividerVariant:function(){this.set_customHeaderDividerVariant(null);
return this.get_customHeaderDividerVariant()},__columnDividerFactory:null,get_columnDividerFactory:function(){return this.__columnDividerFactory},set_columnDividerFactory:function(a){if(!this.setStyle("columnDividerFactory")||this.__columnDividerFactory==a)return this.__columnDividerFactory;this._previousClearStyle=m(this,this.clearStyle_columnDividerFactory);this.__columnDividerFactory=a;this.setInvalid(x.STYLES);return this.__columnDividerFactory},clearStyle_columnDividerFactory:function(){this.set_columnDividerFactory(null);
return this.get_columnDividerFactory()},__customColumnDividerVariant:null,get_customColumnDividerVariant:function(){return this.__customColumnDividerVariant},set_customColumnDividerVariant:function(a){if(!this.setStyle("customColumnDividerVariant")||this.__customColumnDividerVariant==a)return this.__customColumnDividerVariant;this._previousClearStyle=m(this,this.clearStyle_customColumnDividerVariant);this.__customColumnDividerVariant=a;this.setInvalid(x.STYLES);return this.__customColumnDividerVariant},
clearStyle_customColumnDividerVariant:function(){this.set_customColumnDividerVariant(null);return this.get_customColumnDividerVariant()},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__columnResizeSkin:null,
get_columnResizeSkin:function(){return this.__columnResizeSkin},set_columnResizeSkin:function(a){if(!this.setStyle("columnResizeSkin")||this.__columnResizeSkin==a)return this.__columnResizeSkin;this._previousClearStyle=m(this,this.clearStyle_columnResizeSkin);this.__columnResizeSkin=a;this.setInvalid(x.STYLES);return this.__columnResizeSkin},clearStyle_columnResizeSkin:function(){this.set_columnResizeSkin(null);return this.get_columnResizeSkin()},__headerCornerSkin:null,get_headerCornerSkin:function(){return this.__headerCornerSkin},
set_headerCornerSkin:function(a){if(!this.setStyle("headerCornerSkin")||this.__headerCornerSkin==a)return this.__headerCornerSkin;this._previousClearStyle=m(this,this.clearStyle_headerCornerSkin);this.__headerCornerSkin=a;this.setInvalid(x.STYLES);return this.__headerCornerSkin},clearStyle_headerCornerSkin:function(){this.set_headerCornerSkin(null);return this.get_headerCornerSkin()},__extendedScrollBarY:null,get_extendedScrollBarY:function(){return this.__extendedScrollBarY},set_extendedScrollBarY:function(a){if(!this.setStyle("extendedScrollBarY")||
this.__extendedScrollBarY==a)return this.__extendedScrollBarY;this._previousClearStyle=m(this,this.clearStyle_extendedScrollBarY);this.__extendedScrollBarY=a;this.setInvalid(x.STYLES);return this.__extendedScrollBarY},clearStyle_extendedScrollBarY:function(){this.set_extendedScrollBarY(!1);return this.get_extendedScrollBarY()},__showHeaderDividersOnlyWhenResizable:null,get_showHeaderDividersOnlyWhenResizable:function(){return this.__showHeaderDividersOnlyWhenResizable},set_showHeaderDividersOnlyWhenResizable:function(a){if(!this.setStyle("showHeaderDividersOnlyWhenResizable")||
this.__showHeaderDividersOnlyWhenResizable==a)return this.__showHeaderDividersOnlyWhenResizable;this._previousClearStyle=m(this,this.clearStyle_showHeaderDividersOnlyWhenResizable);this.__showHeaderDividersOnlyWhenResizable=a;this.setInvalid(x.STYLES);return this.__showHeaderDividersOnlyWhenResizable},clearStyle_showHeaderDividersOnlyWhenResizable:function(){this.set_showHeaderDividersOnlyWhenResizable(!1);return this.get_showHeaderDividersOnlyWhenResizable()},__class__:vc,__properties__:I(ob.prototype.__properties__,
{set_showHeaderDividersOnlyWhenResizable:"set_showHeaderDividersOnlyWhenResizable",get_showHeaderDividersOnlyWhenResizable:"get_showHeaderDividersOnlyWhenResizable",set_extendedScrollBarY:"set_extendedScrollBarY",get_extendedScrollBarY:"get_extendedScrollBarY",set_selectable:"set_selectable",get_selectable:"get_selectable",set_headerCornerSkin:"set_headerCornerSkin",get_headerCornerSkin:"get_headerCornerSkin",set_columnResizeSkin:"set_columnResizeSkin",get_columnResizeSkin:"get_columnResizeSkin",
set_resizableColumns:"set_resizableColumns",get_resizableColumns:"get_resizableColumns",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",set_forceItemStateUpdate:"set_forceItemStateUpdate",
get_forceItemStateUpdate:"get_forceItemStateUpdate",set_customColumnDividerVariant:"set_customColumnDividerVariant",get_customColumnDividerVariant:"get_customColumnDividerVariant",set_columnDividerFactory:"set_columnDividerFactory",get_columnDividerFactory:"get_columnDividerFactory",set_customHeaderDividerVariant:"set_customHeaderDividerVariant",get_customHeaderDividerVariant:"get_customHeaderDividerVariant",set_headerDividerFactory:"set_headerDividerFactory",get_headerDividerFactory:"get_headerDividerFactory",
set_customHeaderRendererVariant:"set_customHeaderRendererVariant",get_customHeaderRendererVariant:"get_customHeaderRendererVariant",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_headerRendererRecycler:"set_headerRendererRecycler",get_headerRendererRecycler:"get_headerRendererRecycler",set_rowRendererFactory:"set_rowRendererFactory",get_rowRendererFactory:"get_rowRendererFactory",set_columns:"set_columns",get_columns:"get_columns",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var Ju=function(a){this.inactiveHeaderRenderers=[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};r["feathers.controls._TreeGridView.HeaderRendererStorage"]=Ju;Ju.__name__="feathers.controls._TreeGridView.HeaderRendererStorage";Ju.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,
inactiveHeaderRenderers:null,measurements:null,__class__:Ju};var Iu=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};r["feathers.controls._TreeGridView.HeaderDividerStorage"]=Iu;Iu.__name__="feathers.controls._TreeGridView.HeaderDividerStorage";Iu.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:Iu};var Hu=function(a){this.inactiveColumnDividers=
[];this.activeColumnDividers=[];this.columnDividerFactory=a};r["feathers.controls._TreeGridView.ColumnDividerStorage"]=Hu;Hu.__name__="feathers.controls._TreeGridView.ColumnDividerStorage";Hu.prototype={customColumnDividerVariant:null,oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:Hu};var fm=function(a,b,c){this.cellRendererRecycler=null;this.minWidth=0;this.width=null;na.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};r["feathers.controls.TreeGridViewColumn"]=fm;fm.__name__="feathers.controls.TreeGridViewColumn";fm.__interfaces__=[Eo];fm.__super__=na;fm.prototype=I(na.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,itemToText:function(a){return L.string(a)},__class__:fm});var Mo=function(a,b,c,d,f,g){d==null&&(d=!1);c==null&&(c=-1);this.enabled=!0;this.branch=this.opened=this.selected=!1;this.layoutIndex=-1;this.data=a;this.location=b;this.layoutIndex=c;this.branch=
d;this.selected=!1;this.text=g};r["feathers.data.TreeViewItemState"]=Mo;Mo.__name__="feathers.data.TreeViewItemState";Mo.prototype={owner:null,data:null,location:null,layoutIndex:null,branch:null,opened:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Mo};var Vd=function(a,b){this._pendingScrollLocation=this._pendingScrollDuration=this.__layout=this.__customItemRendererVariant=null;this._ignoreSelectionChange=this._ignoreOpenedChange=this._ignoreLayoutChanges=!1;this._selectable=
this._virtualLayout=this.pointerSelectionEnabled=!0;this._totalLayoutCount=0;this._layoutItems=[];this._tempVisibleIndices=new Di(0,0);this._visibleIndices=new Di(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new Tb(function(){return new Mo});this.itemRendererToItemState=new Na;this.stringDataToItemRenderer=new aa;this.objectDataToItemRenderer=new Na;this._additionalStorage=null;this._defaultStorage=new Zq(null,He.withClass(uf));this._recyclerMap=
null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomItemRendererVariant=null;this.openBranches=[];this._childFocusEnabled=!0;this.initializeTreeViewTheme();ob.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.treeViewPort=new Dk,this.addChild(this.treeViewPort),this.set_viewPort(this.treeViewPort));b!=null&&this.addEventListener("change",b)};r["feathers.controls.TreeView"]=Vd;Vd.__name__="feathers.controls.TreeView";
Vd.__interfaces__=[dg,ii];Vd.defaultUpdateItemRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};Vd.defaultResetItemRenderer=function(a,b){u.__implements(a,de)&&a.set_text(null)};Vd.__super__=ob;Vd.prototype=I(ob.prototype,{treeViewPort:null,get_tabEnabled:function(){return(this._selectable||this.get_maxScrollY()!=this.get_minScrollY()||this.get_maxScrollX()!=this.get_minScrollX())&&this._enabled?this.get_rawTabEnabled():!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?
this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},openBranches:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;this._totalLayoutCount=this._virtualCache.length=0;this.openBranches.length=0;this._dataProvider!=null&&(this._dataProvider.removeEventListener("change",m(this,this.treeView_dataProvider_changeHandler)),
this._dataProvider.removeEventListener("addItem",m(this,this.treeView_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.treeView_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.treeView_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.treeView_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.treeView_dataProvider_resetHandler)),
this._dataProvider.removeEventListener("filterChange",m(this,this.treeView_dataProvider_filterChangeHandler)),this._dataProvider.removeEventListener("sortChange",m(this,this.treeView_dataProvider_sortChangeHandler)),this._dataProvider.removeEventListener("updateItem",m(this,this.treeView_dataProvider_updateItemHandler)),this._dataProvider.removeEventListener("updateAll",m(this,this.treeView_dataProvider_updateAllHandler)));this._dataProvider=a;this._dataProvider!=null&&(this._totalLayoutCount=this.calculateTotalLayoutCount([]),
this._virtualCache.length=this._totalLayoutCount,this._dataProvider.addEventListener("change",m(this,this.treeView_dataProvider_changeHandler)),this._dataProvider.addEventListener("addItem",m(this,this.treeView_dataProvider_addItemHandler)),this._dataProvider.addEventListener("removeItem",m(this,this.treeView_dataProvider_removeItemHandler)),this._dataProvider.addEventListener("replaceItem",m(this,this.treeView_dataProvider_replaceItemHandler)),this._dataProvider.addEventListener("removeAll",m(this,
this.treeView_dataProvider_removeAllHandler)),this._dataProvider.addEventListener("reset",m(this,this.treeView_dataProvider_resetHandler)),this._dataProvider.addEventListener("filterChange",m(this,this.treeView_dataProvider_filterChangeHandler)),this._dataProvider.addEventListener("sortChange",m(this,this.treeView_dataProvider_sortChangeHandler)),this._dataProvider.addEventListener("updateItem",m(this,this.treeView_dataProvider_updateItemHandler)),this._dataProvider.addEventListener("updateAll",m(this,
this.treeView_dataProvider_updateAllHandler)));this.set_scrollX(0);this.set_scrollY(0);this.set_selectedLocation(null);this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._dataProvider},_selectedLocation:null,get_selectedLocation:function(){return this._selectedLocation},set_selectedLocation:function(a){this._selectable&&this._dataProvider!=null||(a=null);if(this._selectedLocation==a||this.compareLocations(this._selectedLocation,a)==0)return this._selectedLocation;this._selectedLocation=
a;this._selectedItem=this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedLocation},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(a==null||!this._selectable||this._dataProvider==null)return this.set_selectedLocation(null),this._selectedItem;var b=this._dataProvider.locationOf(a);if(this._selectedItem==a&&this.compareLocations(this._selectedLocation,
b)==0)return this._selectedItem;this._selectedItem=a;this._selectedLocation=b;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selectedItem},_previousLayout:null,_previousCustomItemRendererVariant:null,get_itemRendererRecycler:function(){return this._defaultStorage.itemRendererRecycler},set_itemRendererRecycler:function(a){if(this._defaultStorage.itemRendererRecycler==a)return this._defaultStorage.itemRendererRecycler;this._defaultStorage.oldItemRendererRecycler=this._defaultStorage.itemRendererRecycler;
this._defaultStorage.itemRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._defaultStorage.itemRendererRecycler},_forceItemStateUpdate:null,get_forceItemStateUpdate:function(){return this._forceItemStateUpdate},set_forceItemStateUpdate:function(a){if(this._forceItemStateUpdate==a)return this._forceItemStateUpdate;this._forceItemStateUpdate=a;this.setInvalid(x.DATA);return this._forceItemStateUpdate},_recyclerMap:null,
_itemRendererRecyclerIDFunction:null,get_itemRendererRecyclerIDFunction:function(){return this._itemRendererRecyclerIDFunction},set_itemRendererRecyclerIDFunction:function(a){if(this._itemRendererRecyclerIDFunction==a)return this._itemRendererRecyclerIDFunction;this._itemRendererRecyclerIDFunction=a;this.setInvalid(Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);return this._itemRendererRecyclerIDFunction},_defaultStorage:null,_additionalStorage:null,objectDataToItemRenderer:null,stringDataToItemRenderer:null,
itemRendererToItemState:null,itemStatePool:null,_unrenderedLocations:null,_unrenderedLayoutIndices:null,_virtualCache:null,_visibleIndices:null,_tempVisibleIndices:null,_layoutItems:null,_totalLayoutCount:null,_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;(this._selectable=a)||this.set_selectedLocation(null);return this._selectable},_virtualLayout:null,get_virtualLayout:function(){return this._virtualLayout},
set_virtualLayout:function(a){if(this._virtualLayout=a)return this._virtualLayout;this._virtualLayout=a;this.setInvalid(x.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreOpenedChange:null,_ignoreLayoutChanges:null,_currentDisplayIndex:null,_pendingScrollLocation:null,_pendingScrollDuration:null,itemToText:function(a){return L.string(a)},itemToEnabled:function(a){return!0},isBranchOpen:function(a){return this._dataProvider!=null&&this._dataProvider.contains(a)?
this._dataProvider.isBranch(a)?this.openBranches.indexOf(a)!=-1:!1:!1},toggleBranch:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new rb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new rb("Cannot open item because it is not a branch.");var d=this.openBranches.indexOf(a)!=-1;b&&d||!b&&!d||(d=this.locationToDisplayIndex(c,!1),this.toggleBranchInternal(a,c,d,b),this._totalLayoutCount=this.calculateTotalLayoutCount([]))},
toggleChildrenOf:function(a,b){var c=this._dataProvider!=null?this._dataProvider.locationOf(a):null;if(c==null)throw new rb("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new rb("Cannot open item because it is not a branch.");var d=this.locationToDisplayIndex(c,!1);this.toggleChildrenOfInternal(a,c,d,b);this._totalLayoutCount=this.calculateTotalLayoutCount([])},itemToItemRenderer:function(a){return a==null?null:typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__]},itemRendererToItem:function(a){if(a==null)return null;a=this.itemRendererToItemState.h[a.__id__];return a==null?null:a.data},locationToItemRenderer:function(a){if(this._dataProvider==null||!this.isValidLocation(a))return null;a=this._dataProvider.get(a);return typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__]},scrollToLocation:function(a,b){this._dataProvider!=null&&this._dataProvider.getLength()!=0&&(this._pendingScrollLocation=
a,this._pendingScrollDuration=b,this.setInvalid(x.SCROLL))},getItemRendererRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new aa);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY))},itemToItemState:function(a){if(a==null)return null;var b=typeof a=="string"?this.stringDataToItemRenderer.h[a]:
this.objectDataToItemRenderer.h[a.__id__];if(b!=null)b=this.itemRendererToItemState.h[b.__id__];else{var c=this._dataProvider.locationOf(a);if(c==null)return null;b=new Mo;var d=this.locationToDisplayIndex(c,!1);this.populateCurrentItemState(a,c,d,b,!1)}return b},dispose:function(){this.refreshInactiveItemRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveItemRenderers(this._additionalStorage[c],!0)}this._selectedLocation=
this._selectedItem=null;this.set_dataProvider(null);ob.prototype.dispose.call(this)},initializeTreeViewTheme:function(){xu.initialize()},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);if(a||b)this._previousLayout!=this.get_layout()&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount),this.treeViewPort.set_layout(this.get_layout()),
this._previousLayout=this.get_layout();this.treeViewPort.refreshChildren=m(this,this.refreshItemRenderers);for(a=this._invalidationFlags.keys();a.hasNext();)b=a.next(),this.treeViewPort.setInvalid(b);this._allInvalid&&this.treeViewPort.setInvalid();ob.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){ob.prototype.createScroller.call(this);this.treeViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){ob.prototype.refreshScrollerValues.call(this);
if(u.__implements(this.get_layout(),Oe)){var a=this.get_layout();this.scroller.forceElasticTop=a.get_elasticTop();this.scroller.forceElasticRight=a.get_elasticRight();this.scroller.forceElasticBottom=a.get_elasticBottom();this.scroller.forceElasticLeft=a.get_elasticLeft()}else this.scroller.forceElasticTop=!1,this.scroller.forceElasticRight=!1,this.scroller.forceElasticBottom=!1,this.scroller.forceElasticLeft=!1;this.scroller.snapPositionsX=this.treeViewPort.get_snapPositionsX();this.scroller.snapPositionsY=
this.treeViewPort.get_snapPositionsY()},needsScrollMeasurement:function(){var a=this._visibleIndices.start,b=this._visibleIndices.end;if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var c=this.get_layout(),d=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;c.set_scrollX(this.scroller.get_scrollX());c.set_scrollY(this.scroller.get_scrollY());this._ignoreLayoutChanges=d;c.getVisibleIndices(this._layoutItems.length,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight(),
this._tempVisibleIndices)}else this._tempVisibleIndices.start=0,this._tempVisibleIndices.end=this._layoutItems.length-1;return a==this._tempVisibleIndices.start?b!=this._tempVisibleIndices.end:!0},refreshItemRenderers:function(a){this._layoutItems=a;this._defaultStorage.itemRendererRecycler.update==null&&(this._defaultStorage.itemRendererRecycler.update=Vd.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=Vd.defaultResetItemRenderer));
if(this._recyclerMap!=null){a=this._recyclerMap.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];f.update==null&&f.update==null&&(f.update=Vd.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Vd.defaultResetItemRenderer))}}a=this.treeViewPort.isInvalid(Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);this.refreshInactiveItemRenderers(this._defaultStorage,a);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.refreshInactiveItemRenderers(d,
a);this.findUnrenderedData();this.recoverInactiveItemRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(b=0,c=this._additionalStorage.length;b<c;)d=b++,d=this._additionalStorage[d],this.recoverInactiveItemRenderers(d);this.renderUnrenderedData();this.freeInactiveItemRenderers(this._defaultStorage);if(this._defaultStorage.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers should be empty after updating.");if(this._additionalStorage!=
null)for(b=0,c=this._additionalStorage.length;b<c;)if(d=b++,d=this._additionalStorage[d],this.freeInactiveItemRenderers(d),d.inactiveItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive item renderers "+d.id+" should be empty after updating.");},refreshInactiveItemRenderers:function(a,b){var c=a.inactiveItemRenderers;a.inactiveItemRenderers=a.activeItemRenderers;a.activeItemRenderers=c;if(a.activeItemRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active item renderers should be empty before updating.");
b&&(this.recoverInactiveItemRenderers(a),this.freeInactiveItemRenderers(a),a.oldItemRendererRecycler=null)},recoverInactiveItemRenderers:function(a){for(var b=0,c=a.inactiveItemRenderers;b<c.length;){var d=c[b];++b;if(d!=null){var f=this.itemRendererToItemState.h[d.__id__];if(f!=null){var g=f.data;this.itemRendererToItemState.remove(d);if(typeof g=="string"){var h=this.stringDataToItemRenderer;Object.prototype.hasOwnProperty.call(h.h,g)&&delete h.h[g]}else this.objectDataToItemRenderer.remove(g);
d.removeEventListener("trigger",m(this,this.treeView_itemRenderer_triggerHandler));d.removeEventListener("click",m(this,this.treeView_itemRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.treeView_itemRenderer_touchTapHandler));d.removeEventListener("change",m(this,this.treeView_itemRenderer_changeHandler));d.removeEventListener("resize",m(this,this.treeView_itemRenderer_resizeHandler));d.removeEventListener("open",m(this,this.treeView_itemRenderer_openHandler));d.removeEventListener("close",
m(this,this.treeView_itemRenderer_closeHandler));this.resetItemRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.itemStatePool.release(f)}}}},freeInactiveItemRenderers:function(a){for(var b=a.oldItemRendererRecycler!=null?a.oldItemRendererRecycler:a.itemRendererRecycler,c=0,d=a.inactiveItemRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyItemRenderer(f,b)}a.inactiveItemRenderers.length=0},findUnrenderedData:function(){this._layoutItems.length=0;this._layoutItems.length=
this._totalLayoutCount;if(this._virtualLayout&&u.__implements(this.get_layout(),Jh)){var a=this.get_layout(),b=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;a.set_scrollX(this.scroller.get_scrollX());a.set_scrollY(this.scroller.get_scrollY());a.set_virtualCache(this._virtualCache);this._ignoreLayoutChanges=b;a.getVisibleIndices(this._layoutItems.length,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight(),this._visibleIndices)}else this._visibleIndices.start=0,this._visibleIndices.end=
this._layoutItems.length-1;this.findUnrenderedDataForLocation([],0)},findUnrenderedDataForLocation:function(a,b){if(this._dataProvider==null)return b;for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);f=this._dataProvider.get(a);b<this._visibleIndices.start||b>this._visibleIndices.end?this._layoutItems[b]=null:this.findItemRenderer(f,a.slice(),b);++b;if(b>this._visibleIndices.end)break;if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.findUnrenderedDataForLocation(a,
b),b>this._visibleIndices.end))break;a.pop()}return b},findItemRenderer:function(a,b,c){var d=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(d==null)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);else{var f=this.itemRendererToItemState.h[d.__id__];a=this.populateCurrentItemState(a,b,c,f,this._forceItemStateUpdate);var g=f.recyclerID,h=this.itemStateToStorage(f);if(h.id!=g)this._unrenderedLocations.push(b),this._unrenderedLayoutIndices.push(c);
else{a&&this.updateItemRenderer(d,f,h);d.set_visible(!0);this._layoutItems[c]=d;if(!X.remove(h.inactiveItemRenderers,d))throw c=u.getClass(this),new fb(""+c.__name__+": item renderer map contains bad data for item at location "+L.string(b)+". This may be caused by duplicate items in the data provider, which is not allowed.");h.activeItemRenderers.push(d)}}},populateCurrentItemState:function(a,b,c,d,f){var g=!1;if(f||d.owner!=this)d.owner=this,g=!0;if(f||d.data!=a)d.data=a,g=!0;if(f||d.location!=b&&
this.compareLocations(d.location,b)!=0)d.location=b,g=!0;if(f||d.layoutIndex!=c)d.layoutIndex=c,g=!0;b=this._dataProvider!=null&&this._dataProvider.isBranch(a);if(f||d.branch!=b)d.branch=b,g=!0;b=d.branch&&this.openBranches.indexOf(a)!=-1;if(f||d.opened!=b)d.opened=b,g=!0;b=a==this._selectedItem;if(f||d.selected!=b)d.selected=b,g=!0;b=this._enabled&&this.itemToEnabled(a);if(f||d.enabled!=b)d.enabled=b,g=!0;a=this.itemToText(a);if(f||d.text!=a)d.text=a,g=!0;return g},updateItemRenderer:function(a,
b,c){b.recyclerID=c.id;var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c.itemRendererRecycler.update!=null&&c.itemRendererRecycler.update(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,b)},resetItemRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c=c.oldItemRendererRecycler!=
null?c.oldItemRendererRecycler:c.itemRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshItemRendererProperties(a,Vd.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,md)&&a.set_selected(b.selected);
u.__implements(a,Hk)&&a.set_branch(b.branch);u.__implements(a,hm)&&a.set_hierarchyDepth(b.location!=null?b.location.length-1:0);u.__implements(a,No)&&(a.set_location(b.location),a.set_treeViewOwner(b.owner));u.__implements(a,ji)&&a.set_layoutIndex(b.layoutIndex);u.__implements(a,mi)&&a.set_opened(b.opened);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedLocations;a<b.length;){var c=b[a];++a;var d=this._unrenderedLayoutIndices.shift(),
f=this._dataProvider.get(c),g=this.itemStatePool.get();this.populateCurrentItemState(f,c,d,g,!0);c=this.createItemRenderer(g);c.set_visible(!0);this.treeViewPort.addChild(c);this._layoutItems[d]=c}this._unrenderedLocations.length=0},createItemRenderer:function(a){var b=this.itemStateToStorage(a);if(b.inactiveItemRenderers.length==0){var c=b.itemRendererRecycler.create();if(u.__implements(c,If)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():
Vd.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}u.__implements(c,jb)&&c.initializeNow();b.measurements==null&&(b.measurements=new Ib(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);u.__implements(c,Fh)?c.addEventListener("trigger",m(this,this.treeView_itemRenderer_triggerHandler)):(c.addEventListener("click",m(this,this.treeView_itemRenderer_clickHandler)),c.addEventListener("touchTap",m(this,this.treeView_itemRenderer_touchTapHandler)));u.__implements(c,md)&&c.addEventListener("change",
m(this,this.treeView_itemRenderer_changeHandler));u.__implements(c,Kb)&&c.addEventListener("resize",m(this,this.treeView_itemRenderer_resizeHandler));u.__implements(c,mi)&&(c.addEventListener("open",m(this,this.treeView_itemRenderer_openHandler)),c.addEventListener("close",m(this,this.treeView_itemRenderer_closeHandler)));this.itemRendererToItemState.set(c,a);a=a.data;typeof a=="string"?this.stringDataToItemRenderer.h[a]=c:this.objectDataToItemRenderer.set(a,c);b.activeItemRenderers.push(c);return c},
destroyItemRenderer:function(a,b){this.treeViewPort.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},itemStateToStorage:function(a){var b=null;this._itemRendererRecyclerIDFunction!=null&&(b=this._itemRendererRecyclerIDFunction(a));a=null;if(b!=null&&(this._recyclerMap!=null&&(a=this._recyclerMap.h[b]),a==null))throw new fb('Item renderer recycler ID "'+b+'" is not registered.');if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var c=0,d=this._additionalStorage.length;c<
d;){var f=c++;f=this._additionalStorage[f];if(f.itemRendererRecycler==a)return f}f=new Zq(b,a);this._additionalStorage.push(f);return f},refreshSelectedLocationAfterFilterOrSort:function(){this._selectedLocation!=null&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},calculateTotalLayoutCount:function(a){if(this._dataProvider==null)return 0;for(var b=this._dataProvider.getLength(a),c=b,d=0;d<b;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&
this.openBranches.indexOf(f)!=-1&&(c+=this.calculateTotalLayoutCount(a));a.pop()}return c},insertChildrenIntoVirtualCache:function(a,b){for(var c=0,d=this._dataProvider.getLength(a);c<d;){var f=c++;a.push(f);++b;this._virtualCache.splice(b,0,null);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(b=this.insertChildrenIntoVirtualCache(a,b));a.pop()}return b},removeChildrenFromVirtualCache:function(a,b){var c=this._dataProvider.getLength(a);++b;for(var d=
0;d<c;){var f=d++;a.push(f);f=this._dataProvider.get(a);this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&this.removeChildrenFromVirtualCache(a,b);this._virtualCache.splice(b,1);a.pop()}},containsLocation:function(a,b){if(a==null||b==null||a.length>=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=
0;g<f;){var h=g++,l=a[h];h=b[h];if(l<h)return-1;if(l>h)return 1}return c<d?-1:c>d?1:0},displayIndexToLocation:function(a){this._currentDisplayIndex=-1;return this.displayIndexToLocationAtBranch(a,[])},displayIndexToLocationAtBranch:function(a,b){for(var c=0,d=this._dataProvider.getLength(b);c<d;){var f=c++;this._currentDisplayIndex++;b[b.length]=f;if(this._currentDisplayIndex==a)return b;f=this._dataProvider.get(b);if(this._dataProvider.isBranch(f)&&this.openBranches.indexOf(f)!=-1&&(f=this.displayIndexToLocationAtBranch(a,
b),f!=null))return f;--b.length}return null},locationToDisplayIndex:function(a,b){this._currentDisplayIndex=-1;var c=null;b&&(c=[]);return this.locationToDisplayIndexAtBranch([],a,c)},locationToDisplayIndexAtBranch:function(a,b,c){c!=null&&c.push(b[a.length]);for(var d=0,f=this._dataProvider.getLength(a);d<f;){var g=d++;this._currentDisplayIndex++;a[a.length]=g;if(this.compareLocations(a,b)==0)return this._currentDisplayIndex;g=this._dataProvider.get(a);if(this._dataProvider.isBranch(g))if(this.openBranches.indexOf(g)!=
-1){if(g=this.locationToDisplayIndexAtBranch(a,b,c),g!=-1)return g}else if(c!=null&&this.compareLocations(c,a)==0)return this._currentDisplayIndex;--a.length}c!=null&&c.pop();return-1},navigateWithKeyboard:function(a){if(!a.isDefaultPrevented()&&this._layoutItems.length!=0){var b=this.locationToDisplayIndex(this._selectedLocation,!1),c=b;if(u.__implements(this.get_layout(),wj)){if(a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39&&a.keyCode!=33&&a.keyCode!=34&&a.keyCode!=36&&a.keyCode!=35)return;
c=this.get_layout().findNextKeyboardIndex(c,a,!1,this._layoutItems,null,this.treeViewPort.get_visibleWidth(),this.treeViewPort.get_visibleHeight())}else switch(a.keyCode){case 33:--c;break;case 34:++c;break;case 35:c=this._layoutItems.length-1;break;case 36:c=0;break;case 37:--c;break;case 38:--c;break;case 39:++c;break;case 40:++c;break;default:return}c<0?c=0:c>=this._layoutItems.length&&(c=this._layoutItems.length-1);b=c!=b;var d=null;if(!b&&c!=-1)if(d=this.displayIndexToLocation(c),this.itemToItemRenderer(this._dataProvider.get(d))==
null)b=!0;else if(u.__implements(this.get_layout(),Oe)){var f=this.get_layout().getNearestScrollPositionForIndex(c,this._layoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight());if(this.get_scrollX()!=f.x||this.get_scrollY()!=f.y)b=!0}b&&(a.preventDefault(),d==null&&(d=this.displayIndexToLocation(c)),this.set_selectedLocation(d),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation),this._focusManager!=null?this._focusManager.set_focus(this):
this.stage!=null&&this.stage.set_focus(this))}},handlePendingScroll:function(){if(this._pendingScrollLocation!=null){var a=this._pendingScrollLocation,b=this._pendingScrollDuration!=null?this._pendingScrollDuration:0;this._pendingScrollDuration=this._pendingScrollLocation=null;if(this._dataProvider!=null&&this._dataProvider.getLength()!=0){var c=this.get_scrollX(),d=this.get_scrollY();if(u.__implements(this.get_layout(),Oe))c=this.locationToDisplayIndex(a,!0),d=this.get_layout().getNearestScrollPositionForIndex(c,
this._layoutItems.length,this.get_viewPort().get_visibleWidth(),this.get_viewPort().get_visibleHeight()),c=d.x,d=d.y;else{a=this._dataProvider.get(a);a=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];if(a==null)return;var f=a.get_x(),g=f+a.get_width()-this.get_viewPort().get_visibleWidth();c<g?c=g:c>f&&(c=f);f=a.get_y();a=f+a.get_height()-this.get_viewPort().get_visibleHeight();d<a?d=a:d>f&&(d=f)}b==0?(this.scroller.stop(),this.scroller.set_scrollX(c),
this.scroller.set_scrollY(d)):this.scroller.throwTo(c,d,b)}}},baseScrollContainer_keyDownHandler:function(a){if(!this._selectable)ob.prototype.baseScrollContainer_keyDownHandler.call(this,a);else if(this._enabled&&!a.isDefaultPrevented()&&this._dataProvider!=null&&!(this.stage!=null&&this.stage.get_focus()instanceof Jc&&this.stage.get_focus().get_type()==1)){if(a.keyCode==37){if(this._dataProvider.isBranch(this._selectedItem)&&this.openBranches.indexOf(this._selectedItem)!=-1){this.toggleBranch(this._selectedItem,
!1);return}var b=this._selectedLocation.slice();b.pop();b.length>0&&this.set_selectedLocation(b)}if(a.keyCode==39&&this._dataProvider.isBranch(this._selectedItem)){if(this.openBranches.indexOf(this._selectedItem)==-1){this.toggleBranch(this._selectedItem,!0);return}this._dataProvider.getLength(this._selectedLocation)>0&&(b=this._selectedLocation.slice(),b.push(0),this.set_selectedLocation(b))}if(a.keyCode==13&&this._selectedItem!=null){var c=typeof this._selectedItem=="string"?this.stringDataToItemRenderer.h[this._selectedItem]:
this.objectDataToItemRenderer.h[this._selectedItem.__id__];b=null;c!=null&&(b=this.itemRendererToItemState.h[c.__id__]);c=!1;b==null&&(c=!0,b=this.itemStatePool.get());var d=this.locationToDisplayIndex(this._selectedLocation,!1);this.populateCurrentItemState(this._selectedItem,this._selectedLocation,d,b,!0);Dg.dispatch(this,"itemTrigger",b);c&&this.itemStatePool.release(b)}this._selectedLocation!=null&&a.keyCode==32?this._dataProvider.isBranch(this._selectedItem)&&(a.preventDefault(),this.toggleBranch(this._selectedItem,
this.openBranches.indexOf(this._selectedItem)==-1)):this.navigateWithKeyboard(a)}},isValidLocation:function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;if(d<0||d>=this._dataProvider.getLength(b))return!1;b.push(d)}return!0},toggleBranchInternal:function(a,b,c,d){var f=typeof a=="string"?this.stringDataToItemRenderer.h[a]:this.objectDataToItemRenderer.h[a.__id__];var g=null;f!=null&&(g=this.itemRendererToItemState.h[f.__id__]);var h=!1;g==null&&(h=!0,g=this.itemStatePool.get());g.location=b;g.layoutIndex=
c;var l=this.openBranches.indexOf(a)!=-1;d&&!l?(this.openBranches.push(a),this.populateCurrentItemState(a,b,c,g,!0),c=this.insertChildrenIntoVirtualCache(b,c),f!=null&&(a=this.itemStateToStorage(g),this.updateItemRenderer(f,g,a)),Dg.dispatch(this,"branchOpen",g)):!d&&l&&(X.remove(this.openBranches,a),this.populateCurrentItemState(a,b,c,g,!0),this.removeChildrenFromVirtualCache(b,c),f!=null&&(a=this.itemStateToStorage(g),this.updateItemRenderer(f,g,a)),Dg.dispatch(this,"branchClose",g));h&&this.itemStatePool.release(g);
this.setInvalid(x.DATA);return c},toggleChildrenOfInternal:function(a,b,c,d){c=this.toggleBranchInternal(a,b,c,d);a=0;for(var f=this._dataProvider.getLength(b);a<f;){var g=a++;b.push(g);g=this._dataProvider.get(b);this._dataProvider.isBranch(g)&&this.toggleChildrenOfInternal(g,b,c,d);b.pop()}},refreshOpenBranchesFromDataProviderChange:function(a,b){if(a!=null)for(var c=this.openBranches.length-1;c>=0;){var d=this.openBranches[c];d==a?a!=b&&this.openBranches.splice(c,1):(this._dataProvider.locationOf(d)==
null&&this.openBranches.splice(c,1),--c)}},treeView_itemRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=u.__cast(a.currentTarget,ea),a=this.itemRendererToItemState.h[a.__id__],Dg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_clickHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,
ea),a=this.itemRendererToItemState.h[a.__id__],Dg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_triggerHandler:function(a){this._enabled&&(a=u.__cast(a.currentTarget,ea),a=this.itemRendererToItemState.h[a.__id__],Dg.dispatch(this,"itemTrigger",a),this._selectable&&this.pointerSelectionEnabled&&(this.set_selectedLocation(a.location.slice()),
this._selectedLocation!=null&&this.scrollToLocation(this._selectedLocation)))},treeView_itemRenderer_resizeHandler:function(a){this._validating||this.setInvalid(x.LAYOUT)},treeView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,ea);a=u.__cast(b,md);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},treeView_itemRenderer_openHandler:function(a){this._ignoreOpenedChange||(a=u.__cast(a.currentTarget,
ea),this.toggleBranch(this.itemRendererToItemState.h[a.__id__].data,!0))},treeView_itemRenderer_closeHandler:function(a){this._ignoreOpenedChange||(a=u.__cast(a.currentTarget,ea),this.toggleBranch(this.itemRendererToItemState.h[a.__id__].data,!1))},treeView_dataProvider_changeHandler:function(a){this._totalLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount);this.setInvalid(x.DATA)},treeView_dataProvider_addItemHandler:function(a){this._selectedLocation!=
null&&this.compareLocations(this._selectedLocation,a.location)>=0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))},treeView_dataProvider_removeItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):(a=this.compareLocations(this._selectedLocation,a.location),a==0?this.set_selectedLocation(null):a>0&&this.set_selectedLocation(this._dataProvider.locationOf(this._selectedItem))))},
treeView_dataProvider_replaceItemHandler:function(a){this.refreshOpenBranchesFromDataProviderChange(a.removedItem,a.addedItem);this._selectedLocation!=null&&(this.containsLocation(a.location,this._selectedLocation)?this.set_selectedLocation(null):this.compareLocations(this._selectedLocation,a.location)==0&&(this._selectedItem=this._dataProvider.get(a.location),W.dispatch(this,"change")))},treeView_dataProvider_removeAllHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},
treeView_dataProvider_resetHandler:function(a){this.openBranches.length=0;this.set_selectedLocation(null)},treeView_dataProvider_sortChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},treeView_dataProvider_filterChangeHandler:function(a){this.refreshSelectedLocationAfterFilterOrSort()},updateItemRendererForLocation:function(a){var b=this.locationToDisplayIndex(a,!1);this._virtualCache!=null&&b!=-1&&(this._virtualCache[b]=null);var c=this._dataProvider.get(a);var d=typeof c==
"string"?this.stringDataToItemRenderer.h[c]:this.objectDataToItemRenderer.h[c.__id__];if(d==null)this.setInvalid(x.DATA);else{var f=this.itemRendererToItemState.h[d.__id__];if(f.owner!=null){var g=this.itemStateToStorage(f);this.populateCurrentItemState(c,a,b,f,!0);this.resetItemRenderer(d,f,g);g.measurements!=null&&g.measurements.restore(d);f.owner=null;this.setInvalid(x.DATA)}}if(this._dataProvider.isBranch(c))for(b=0,c=this._dataProvider.getLength(a);b<c;)d=b++,a.push(d),this.updateItemRendererForLocation(a),
a.pop()},treeView_dataProvider_updateItemHandler:function(a){this.updateItemRendererForLocation(a.location)},treeView_dataProvider_updateAllHandler:function(a){a=[];for(var b=0,c=this._dataProvider.getLength();b<c;){var d=b++;a[0]=d;this.updateItemRendererForLocation(a)}},get_styleContext:function(){return Vd},__layout:null,get_layout:function(){return this.__layout},set_layout:function(a){if(!this.setStyle("layout")||this.__layout==a)return this.__layout;this._previousClearStyle=m(this,this.clearStyle_layout);
this.__layout=a;this.setInvalid(x.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__customItemRendererVariant:null,get_customItemRendererVariant:function(){return this.__customItemRendererVariant},set_customItemRendererVariant:function(a){if(!this.setStyle("customItemRendererVariant")||this.__customItemRendererVariant==a)return this.__customItemRendererVariant;this._previousClearStyle=m(this,this.clearStyle_customItemRendererVariant);this.__customItemRendererVariant=
a;this.setInvalid(x.STYLES);return this.__customItemRendererVariant},clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:Vd,__properties__:I(ob.prototype.__properties__,{set_virtualLayout:"set_virtualLayout",get_virtualLayout:"get_virtualLayout",set_selectable:"set_selectable",get_selectable:"get_selectable",set_itemRendererRecyclerIDFunction:"set_itemRendererRecyclerIDFunction",get_itemRendererRecyclerIDFunction:"get_itemRendererRecyclerIDFunction",
set_forceItemStateUpdate:"set_forceItemStateUpdate",get_forceItemStateUpdate:"get_forceItemStateUpdate",set_itemRendererRecycler:"set_itemRendererRecycler",get_itemRendererRecycler:"get_itemRendererRecycler",set_customItemRendererVariant:"set_customItemRendererVariant",get_customItemRendererVariant:"get_customItemRendererVariant",set_layout:"set_layout",get_layout:"get_layout",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",set_selectedLocation:"set_selectedLocation",get_selectedLocation:"get_selectedLocation",
set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"})});var Zq=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=a;this.itemRendererRecycler=b};r["feathers.controls._TreeView.ItemRendererStorage"]=Zq;Zq.__name__="feathers.controls._TreeView.ItemRendererStorage";Zq.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,
inactiveItemRenderers:null,measurements:null,__class__:Zq};var fn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVProgressBarTheme();Vj.call(this,a,b,c,d)};r["feathers.controls.VProgressBar"]=fn;fn.__name__="feathers.controls.VProgressBar";fn.__super__=Vj;fn.prototype=I(Vj.prototype,{_currentMask:null,initializeVProgressBarTheme:function(){zu.initialize()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._backgroundSkinMeasurements!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);u.__implements(this._currentBackgroundSkin,Kb);u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow();c=this.get_explicitWidth();a&&(c=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.width:
0);a=this.get_explicitHeight();b&&(a=this._currentBackgroundSkin!=null?this._backgroundSkinMeasurements.height:0);b=this.get_explicitMinWidth();d=this.get_explicitMinHeight();f=this.get_explicitMaxWidth();g=this.get_explicitMaxHeight();return this.saveMeasurements(c,a,b,d,f,g)},layoutBackground:function(){this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.set_x(0),this._currentBackgroundSkin.set_y(0),this._currentBackgroundSkin.get_width()!=this.actualWidth&&this._currentBackgroundSkin.set_width(this.actualWidth),
this._currentBackgroundSkin.get_height()!=this.actualHeight&&this._currentBackgroundSkin.set_height(this.actualHeight),u.__implements(this._currentBackgroundSkin,oa)&&this._currentBackgroundSkin.validateNow())},layoutFill:function(){if(this._currentFillSkin!=null){var a=1;this._minimum!=this._maximum&&(a=(this._value-this._minimum)/(this._maximum-this._minimum),a<0?a=0:a>1&&(a=1));var b=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom();a=this._indeterminate?b:Math.round(a*b);this._currentFillSkin.set_x(this.get_paddingLeft());
this._currentFillSkin.set_width(this.actualWidth-this.get_paddingLeft()-this.get_paddingRight());switch(this.get_fillMode()._hx_index){case 0:this._currentFillSkin.set_scrollRect(null);this._currentMask==null&&(this._currentMask=new db(Ab.SolidColor(16711935)),this.addChild(this._currentMask));this._currentFillSkin.set_mask(this._currentMask);this._currentFillSkin.set_y(this.get_paddingTop());this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());this._currentMask.set_x(this._currentFillSkin.get_x());
this._currentMask.set_y(this.actualHeight-this.get_paddingBottom()-a);this._currentMask.set_width(this._currentFillSkin.get_width());this._currentMask.set_height(a);break;case 1:this._currentFillSkin.set_y(this.actualHeight-this.get_paddingBottom()-a);this._currentFillSkin.set_height(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom());this._currentFillSkin.set_scrollRect(new Ea(0,this._currentFillSkin.get_height()-a,this._currentFillSkin.get_width(),a));break;case 2:this._currentFillSkin.set_mask(null),
this._currentFillSkin.set_scrollRect(null),this._currentMask!=null&&(this._currentMask.parent==this&&this.removeChild(this._currentMask),this._currentMask=null),this._fillSkinMeasurements.minHeight!=null&&a<this._fillSkinMeasurements.minHeight?(a=this._fillSkinMeasurements.minHeight,this._currentFillSkin.set_visible(this._value>this._minimum)):this._currentFillSkin.set_visible(!0),this._currentFillSkin.set_y(this.actualHeight-this.get_paddingBottom()-a),this._currentFillSkin.set_height(a)}u.__implements(this._currentFillSkin,
oa)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return fn},__class__:fn});var gn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVSliderTheme();Wj.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.vSlider_keyDownHandler))};r["feathers.controls.VSlider"]=gn;gn.__name__="feathers.controls.VSlider";gn.__super__=Wj;gn.prototype=I(Wj.prototype,{initializeVSliderTheme:function(){Au.initialize()},valueToLocation:function(a){u.__implements(this._currentThumbSkin,
oa)&&this._currentThumbSkin.validateNow();a=this.normalizeValue(a);var b=this.actualHeight-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(b-=this._currentThumbSkin.get_height());return Math.round(this.get_maximumPadding()+b*(1-a))},locationToValue:function(a,b){a=this.actualHeight-this.get_minimumPadding()-this.get_maximumPadding();this._currentThumbSkin!=null&&(a-=this._currentThumbSkin.get_height());b=b-this._pointerStartY-this.get_maximumPadding();return this._minimum+
(1-Math.min(Math.max(0,this._thumbStartY+b),a)/a)*(this._maximum-this._minimum)},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentThumbSkin!=null&&(this._thumbSkinMeasurements.restore(this._currentThumbSkin),u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow());
this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow());f=this.get_explicitWidth();a&&(f=0,this._currentThumbSkin!=null&&(f+=this._currentThumbSkin.get_width()),this._currentTrackSkin!=
null&&(f<this._currentTrackSkin.get_width()&&(f=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&f<this._currentSecondaryTrackSkin.get_width()&&(f=this._currentSecondaryTrackSkin.get_width())));a=this.get_explicitHeight();b&&(a=0,this._currentTrackSkin!=null&&(a+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(a+=this._currentSecondaryTrackSkin.get_height())));b=this.get_explicitMinWidth();c&&(b=0,this._currentThumbSkin!=null&&(b+=this._currentThumbSkin.get_width()),
this._currentTrackSkin!=null&&(b<this._currentTrackSkin.get_width()&&(b=this._currentTrackSkin.get_width()),this._currentSecondaryTrackSkin!=null&&b<this._currentSecondaryTrackSkin.get_width()&&(b=this._currentSecondaryTrackSkin.get_width())));c=this.get_explicitMinHeight();d&&(c=0,this._currentTrackSkin!=null&&(c+=this._currentTrackSkin.get_height(),this._currentSecondaryTrackSkin!=null&&(c+=this._secondaryTrackSkinMeasurements.height)));return this.saveMeasurements(f,a,b,c)},saveThumbStart:function(a,
b){var c=this.actualHeight;this._currentThumbSkin!=null&&(c-=this._currentThumbSkin.get_height(),b-=this._currentThumbSkin.get_height()/2);this._thumbStartX=a;this._thumbStartY=Math.min(c-this.get_maximumPadding(),Math.max(this.get_minimumPadding(),b))},layoutSplitTrack:function(){var a=this.valueToLocation(this.get_value());this._currentThumbSkin!=null&&(u.__implements(this._currentThumbSkin,oa)&&this._currentThumbSkin.validateNow(),a+=Math.round(this._currentThumbSkin.get_height()/2));this._currentSecondaryTrackSkin.set_y(0);
this._currentSecondaryTrackSkin.set_height(a);this._currentTrackSkin.set_y(a);this._currentTrackSkin.set_height(this.actualHeight-a);u.__implements(this._currentSecondaryTrackSkin,oa)&&this._currentSecondaryTrackSkin.validateNow();u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow();this._currentSecondaryTrackSkin.set_x((this.actualWidth-this._currentSecondaryTrackSkin.get_width())/2);this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2)},
layoutSingleTrack:function(){this._currentTrackSkin!=null&&(this._currentTrackSkin.set_y(0),this._currentTrackSkin.set_height(this.actualHeight),u.__implements(this._currentTrackSkin,oa)&&this._currentTrackSkin.validateNow(),this._currentTrackSkin.set_x((this.actualWidth-this._currentTrackSkin.get_width())/2))},layoutThumb:function(){if(this._currentThumbSkin!=null){var a=this.valueToLocation(this._value);this._currentThumbSkin.set_x((this.actualWidth-this._currentThumbSkin.get_width())/2);this._currentThumbSkin.set_y(a)}},
vSlider_keyDownHandler:function(a){if(!a.isDefaultPrevented()&&this._enabled){var b=this._value;switch(a.keyCode){case 35:b=this._maximum;break;case 36:b=this._minimum;break;case 38:b+=this._step;break;case 40:b-=this._step;break;default:return}b<this._minimum?b=this._minimum:b>this._maximum&&(b=this._maximum);a.preventDefault();this.set_value(b)}},get_styleContext:function(){return gn},__class__:gn});var ph=function(){};r["feathers.controls.dataRenderers.IDataRenderer"]=ph;ph.__name__="feathers.controls.dataRenderers.IDataRenderer";
ph.__isInterface__=!0;ph.__interfaces__=[jb];ph.prototype={get_data:null,set_data:null,__class__:ph,__properties__:{set_data:"set_data",get_data:"get_data"}};var Oo=function(a,b,c,d,f){c==null&&(c=-1);b==null&&(b=-1);this.enabled=!0;this.selected=!1;this.rowIndex=this.columnIndex=-1;this.data=a;this.rowIndex=b;this.columnIndex=c;this.selected=!1;this.text=f};r["feathers.data.GridViewCellState"]=Oo;Oo.__name__="feathers.data.GridViewCellState";Oo.prototype={owner:null,data:null,rowIndex:null,columnIndex:null,
column:null,selected:null,text:null,enabled:null,__class__:Oo};var Rf=function(){this._customCellRendererVariant=null;this._forceCellStateUpdate=!1;this._data=this._columns=null;this._rowIndex=-1;this._selected=this._ignoreSelectionChange=!1;this._currentState=Nb.UP(!1);this.cellStatePool=new Tb(function(){return new Oo});this._cellRendererToCellState=new Na;this._columnToCellRenderer=new Na;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new $q;sc.call(this)};r["feathers.controls.dataRenderers.GridViewRowRenderer"]=
Rf;Rf.__name__="feathers.controls.dataRenderers.GridViewRowRenderer";Rf.__interfaces__=[mh,ph,md,Fh];Rf.defaultUpdateCellRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};Rf.defaultResetCellRenderer=function(a,b){u.__implements(a,de)&&a.set_text(null)};Rf.__super__=sc;Rf.prototype=I(sc.prototype,{_defaultStorage:null,_additionalStorage:null,_unrenderedData:null,_columnToCellRenderer:null,_cellRendererToCellState:null,cellStatePool:null,_currentState:null,get_currentState:function(){return this._currentState},
set_enabled:function(a){sc.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Nb.UP(a.selected))):this.changeState(Nb.DISABLED(this._selected));return this._enabled},_gridView:null,get_gridView:function(){return this._gridView},set_gridView:function(a){if(this._gridView==a)return this._gridView;this._gridView!=null&&this._gridView.removeEventListener("keyDown",m(this,this.gridViewRowRenderer_gridView_keyDownHandler));this._gridView=a;if(this._gridView!=
null)this._gridView.addEventListener("keyDown",m(this,this.gridViewRowRenderer_gridView_keyDownHandler),!1,0,!0);else if(this.refreshInactiveCellRenderers(this._defaultStorage,!0),this._additionalStorage!=null){a=0;for(var b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}}this.setInvalid(x.DATA);return this._gridView},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;
this._selected=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selected},_ignoreSelectionChange:null,_rowIndex:null,get_rowIndex:function(){return this._rowIndex},set_rowIndex:function(a){if(this._rowIndex==a)return this._rowIndex;this._rowIndex=a;this.setInvalid(x.DATA);return this._rowIndex},_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);return this._data},_columns:null,get_columns:function(){return this._columns},
set_columns:function(a){if(this._columns==a)return this._columns;this._columns!=null&&this._columns.removeEventListener("change",m(this,this.gridViewRowRenderer_columns_changeHandler));this._columns=a;this._columns!=null&&this._columns.addEventListener("change",m(this,this.gridViewRowRenderer_columns_changeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._columns},get_cellRendererRecycler:function(){return this._defaultStorage.cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._defaultStorage.cellRendererRecycler==
a)return this._defaultStorage.cellRendererRecycler;this._defaultStorage.oldCellRendererRecycler=this._defaultStorage.cellRendererRecycler;this._defaultStorage.cellRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Rf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._defaultStorage.cellRendererRecycler},_forceCellStateUpdate:null,get_forceCellStateUpdate:function(){return this._forceCellStateUpdate},set_forceCellStateUpdate:function(a){if(this._forceCellStateUpdate==a)return this._forceCellStateUpdate;
this._forceCellStateUpdate=a;this.setInvalid(x.DATA);return this._forceCellStateUpdate},_customCellRendererVariant:null,get_customCellRendererVariant:function(){return this._customCellRendererVariant},set_customCellRendererVariant:function(a){if(this._customCellRendererVariant==a)return this._customCellRendererVariant;this._customCellRendererVariant=a;this.setInvalid(Rf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._customCellRendererVariant},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},
set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=a;this.setInvalid(x.DATA);return this._customColumnWidths},_rowLayout:null,_pointerToState:null,_keyToState:null,dispose:function(){this.refreshInactiveCellRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}sc.prototype.dispose.call(this)},
columnToCellRenderer:function(a){return a==null?null:this._columnToCellRenderer.h[a.__id__]},columnToCellState:function(a){if(a==null)return null;var b=this._columnToCellRenderer.h[a.__id__];if(b!=null)b=this._cellRendererToCellState.h[b.__id__];else{var c=this._columns.indexOf(a);if(c==-1)return null;b=new Oo;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){sc.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new Yl(this,m(this,this.changeState),
Nb.UP(!1),Nb.DOWN(!1),Nb.HOVER(!1)),this._pointerToState.set_customHitTest(m(this,this.customHitTest)));this._keyToState==null&&(this._keyToState=new Wm(this,m(this,this.changeState),Nb.UP(!1),Nb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new pl,this.set_layout(this._rowLayout))},changeState:function(a){this._enabled||(a=Nb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Nb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Nb.HOVER(this._selected));
break;case 2:b=a.selected;this._selected!=b&&(a=Nb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Nb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(this);sc.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(null);sc.prototype.removeCurrentBackgroundSkin.call(this,
a)},updateCells:function(){for(var a=0,b=this._columns.get_length();a<b;){var c=a++;this.updateCellRendererForColumnIndex(c)}},update:function(){this.preLayout();sc.prototype.update.call(this)},preLayout:function(){this._rowLayout.set_columns(this._columns);this._rowLayout.set_customColumnWidths(this._customColumnWidths);this._defaultStorage.cellRendererRecycler.update==null&&(this._defaultStorage.cellRendererRecycler.update=Rf.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=Rf.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=Rf.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=Rf.defaultResetCellRenderer))}this.refreshInactiveCellRenderers(this._defaultStorage,!1);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<
b;){var c=a++;c=this._additionalStorage[c];this.refreshInactiveCellRenderers(c,!1)}this.findUnrenderedData();this.recoverInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],this.recoverInactiveCellRenderers(c);this.renderUnrenderedData();this.freeInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],
this.freeInactiveCellRenderers(c);if(this._defaultStorage.inactiveCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive cell renderers should be empty after updating.");if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)if(c=a++,c=this._additionalStorage[c],c.inactiveCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive cell renderers should be empty after updating.");},refreshInactiveCellRenderers:function(a,b){var c=
a.inactiveCellRenderers;a.inactiveCellRenderers=a.activeCellRenderers;a.activeCellRenderers=c;if(a.activeCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active cell renderers should be empty before updating.");b&&(this.recoverInactiveCellRenderers(a),this.freeInactiveCellRenderers(a),a.oldCellRendererRecycler=null)},findUnrenderedData:function(){for(var a=0,b=0,c=this._columns.get_length();b<c;){var d=b++,f=this._columns.get(d),g=this._columnToCellRenderer.h[f.__id__];if(g!=
null){var h=this.cellRendererRecyclerToStorage(f.cellRendererRecycler),l=this._cellRendererToCellState.h[g.__id__];this.populateCurrentItemState(f,d,l,this._forceCellStateUpdate)&&this.updateCellRenderer(g,l,h);this.setChildIndex(g,a);if(!X.remove(h.inactiveCellRenderers,g))throw a=u.getClass(this),new fb(""+a.__name__+": cell renderer map contains bad data for item at row index "+this._rowIndex+" and column index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");
h.activeCellRenderers.push(g);++a}else this._unrenderedData.push(d)}},cellRendererRecyclerToStorage:function(a){if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var b=0,c=this._additionalStorage.length;b<c;){var d=b++;d=this._additionalStorage[d];if(d.cellRendererRecycler==a)return d}d=new $q(a);this._additionalStorage.push(d);return d},recoverInactiveCellRenderers:function(a){for(var b=0,c=a.inactiveCellRenderers;b<c.length;){var d=c[b];++b;if(d!=
null){var f=this._cellRendererToCellState.h[d.__id__];if(f!=null){var g=f.column;this._cellRendererToCellState.remove(d);this._columnToCellRenderer.remove(g);d.removeEventListener("click",m(this,this.gridViewRowRenderer_cellRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.gridViewRowRenderer_cellRenderer_touchTapHandler));d.removeEventListener("trigger",m(this,this.gridViewRowRenderer_cellRenderer_triggerHandler));d.removeEventListener("change",m(this,this.gridViewRowRenderer_cellRenderer_changeHandler));
this.resetCellRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.cellStatePool.release(f)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._columns.get(c),f=this.cellStatePool.get();this.populateCurrentItemState(d,c,f,!0);d=this.createCellRenderer(f);this.addChildAt(d,c)}this._unrenderedData.length=0},freeInactiveCellRenderers:function(a){for(var b=a.oldCellRendererRecycler!=null?a.oldCellRendererRecycler:a.cellRendererRecycler,
c=0,d=a.inactiveCellRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyCellRenderer(f,b)}a.inactiveCellRenderers.length=0},createCellRenderer:function(a){var b=a.column,c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);if(c.inactiveCellRenderers.length==0){var d=c.cellRendererRecycler.create();if(u.__implements(d,If)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():nc.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}u.__implements(d,
jb)&&d.initializeNow();c.measurements==null&&(c.measurements=new Ib(d))}else d=c.inactiveCellRenderers.shift();c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);this.updateCellRenderer(d,a,c);u.__implements(d,Fh)?d.addEventListener("trigger",m(this,this.gridViewRowRenderer_cellRenderer_triggerHandler)):(d.addEventListener("click",m(this,this.gridViewRowRenderer_cellRenderer_clickHandler)),d.addEventListener("touchTap",m(this,this.gridViewRowRenderer_cellRenderer_touchTapHandler)));u.__implements(d,
md)&&d.addEventListener("change",m(this,this.gridViewRowRenderer_cellRenderer_changeHandler));u.__implements(d,Kb)&&d.addEventListener("resize",m(this,this.gridViewRowRenderer_cellRenderer_resizeHandler));this._cellRendererToCellState.set(d,a);this._columnToCellRenderer.set(b,d);c.activeCellRenderers.push(d);return d},destroyCellRenderer:function(a,b){this.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},updateCellRendererForColumnIndex:function(a){var b=this._columns.get(a),c=this._columnToCellRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.cellRendererRecyclerToStorage(b.cellRendererRecycler),f=this._cellRendererToCellState.h[c.__id__];f.owner!=null&&(this.populateCurrentItemState(b,a,f,!0),this.resetCellRenderer(c,f,d),f.owner=null,this.setInvalid(x.DATA))}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this._gridView)c.owner=this._gridView,f=!0;if(d||c.data!=this._data)c.data=this._data,f=!0;if(d||c.rowIndex!=this._rowIndex)c.rowIndex=this._rowIndex,f=!0;if(d||
c.columnIndex!=b)c.columnIndex=b,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.selected!=this._selected)c.selected=this._selected,f=!0;if(d||c.enabled!=this._enabled)c.enabled=this._enabled,f=!0;a=this._rowIndex!=-1?a.itemToText(this._data):null;if(d||c.text!=a)c.text=a,f=!0;return f},updateCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c.cellRendererRecycler.update!=null&&c.cellRendererRecycler.update(a,b);this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,
b)},resetCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;c=c.oldCellRendererRecycler!=null?c.oldCellRendererRecycler:c.cellRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,Rf.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);
u.__implements(a,md)&&a.set_selected(b.selected);u.__implements(a,Po)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowIndex(b.rowIndex),a.set_gridViewOwner(b.owner));u.__implements(a,ji)&&a.set_layoutIndex(b.rowIndex);u.__implements(a,im)&&a.set_pointerTarget(b.rowIndex==-1?null:this);this._ignoreSelectionChange=c},customHitTest:function(a,b){if(this.stage==null)return!1;if(this.mouseChildren&&(a=this.stage.getObjectsUnderPoint(new Qa(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=
null&&a!=this;){if((!(a instanceof Da)||a.mouseEnabled)&&u.__implements(a,ld)&&(b=a,b.parent!=this&&b.get_focusEnabled()))return!1;a=a.parent}return!0},gridViewRowRenderer_cellRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint&&this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);tf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);$e.dispatchFromTouchEvent(this,a)}},gridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);tf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);$e.dispatchFromMouseEvent(this,a)}},gridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);tf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},gridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(x.LAYOUT)},gridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,ea);a=u.__cast(b,md);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},gridViewRowRenderer_gridView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==32||a.keyCode==13)&&this._selected){a=this._columns.get(0);var b=this.columnToCellRenderer(a),c=null;b!=null&&(c=this._cellRendererToCellState.h[b.__id__]);
b=!1;c==null&&(b=!0,c=this.cellStatePool.get());this.populateCurrentItemState(a,0,c,!0);tf.dispatchForCell(this,"cellTrigger",c);b&&this.cellStatePool.release(c)}},gridViewRowRenderer_columns_changeHandler:function(a){this.setInvalid(x.DATA)},get_styleContext:function(){return Rf},__class__:Rf,__properties__:I(sc.prototype.__properties__,{set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",
set_forceCellStateUpdate:"set_forceCellStateUpdate",get_forceCellStateUpdate:"get_forceCellStateUpdate",set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_columns:"set_columns",get_columns:"get_columns",set_data:"set_data",get_data:"get_data",set_rowIndex:"set_rowIndex",get_rowIndex:"get_rowIndex",set_selected:"set_selected",get_selected:"get_selected",set_gridView:"set_gridView",get_gridView:"get_gridView",get_currentState:"get_currentState"})});
var $q=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};r["feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage"]=$q;$q.__name__="feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage";$q.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:$q};var im=function(){};r["feathers.core.IPointerDelegate"]=im;im.__name__="feathers.core.IPointerDelegate";
im.__isInterface__=!0;im.prototype={get_pointerTarget:null,set_pointerTarget:null,__class__:im,__properties__:{set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget"}};var ji=function(){};r["feathers.layout.ILayoutIndexObject"]=ji;ji.__name__="feathers.layout.ILayoutIndexObject";ji.__isInterface__=!0;ji.prototype={get_layoutIndex:null,set_layoutIndex:null,__class__:ji,__properties__:{set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex"}};var Mc=function(){this.__accessoryView=
null;this.__showSecondaryText=this.__showHoverAndDownStates=!0;this.__secondaryTextFormat=this.__disabledSecondaryTextFormat=this.__selectedSecondaryTextFormat=this.__alternateBackgroundSkin=null;this._stateToSecondaryTextFormat=new Ye;this._ignoreAccessoryResizes=!1;this._layoutIndex=-1;this._childFocusEnabled=!0;this._secondaryHtmlText=null;this._updatedSecondaryTextStyles=!1;this._previousSecondaryText=this._previousSecondaryHTMLText=this._previousSecondaryTextFormat=this._previousSecondarySimpleTextFormat=
null;this.initializeItemRendererTheme();Yc.call(this);this.mouseChildren=!0;this.set_buttonMode(!1);this.set_toggleable(!1);this.set_tabEnabled(!1);this.set_tabChildren(!0)};r["feathers.controls.dataRenderers.ItemRenderer"]=Mc;Mc.__name__="feathers.controls.dataRenderers.ItemRenderer";Mc.__interfaces__=[im,ph,ji,dg];Mc.__super__=Yc;Mc.prototype=I(Yc.prototype,{_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);
W.dispatch(this,"dataChange");return this._data},secondaryTextField:null,_secondaryTextMeasuredWidth:null,_secondaryTextMeasuredHeight:null,_previousSecondaryText:null,_previousSecondaryHTMLText:null,_previousSecondaryTextFormat:null,_previousSecondarySimpleTextFormat:null,_updatedSecondaryTextStyles:null,_secondaryText:null,get_secondaryText:function(){return this._secondaryText},set_secondaryText:function(a){if(this._secondaryText==a)return this._secondaryText;this._secondaryText=a;this.setInvalid(x.DATA);
return this._secondaryText},_secondaryHtmlText:null,get_secondaryHtmlText:function(){return this._secondaryHtmlText},set_secondaryHtmlText:function(a){if(this._secondaryHtmlText==a)return this._secondaryHtmlText;this._secondaryHtmlText=a;this.setInvalid(x.DATA);return this._secondaryHtmlText},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=
a},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);return this._layoutIndex},_pointerTarget:null,get_pointerTarget:function(){return this._pointerTarget},set_pointerTarget:function(a){if(this._pointerTarget==a)return this._pointerTarget;this._pointerTarget=a;this.setInvalid(x.DATA);return this._pointerTarget},_ignoreAccessoryResizes:null,
_accessoryViewMeasurements:null,_currentAccessoryView:null,get_baseline:function(){if(this.textField==null)return 0;var a=this._text!=null&&this._text.length>0,b=this._htmlText!=null&&this._htmlText.length>0;if(!this.get_showText()||!a&&!b){a=this.textField.get_y();if(!this.get_showText()||this._text==null&&this._htmlText==null)if(this._currentIcon!=null)a=this._currentIcon.get_y()+(this._currentIcon.get_height()-this._textMeasuredHeight)/2;else if(this._currentBackgroundSkin!=null)a=(this._currentBackgroundSkin.get_height()-
this._textMeasuredHeight)/2;else return 0;this.textField.set_text("\u200b");a+=this.textField.getLineMetrics(0).ascent;this.textField.set_text("");return a}return this.textField.get_y()+this.textField.getLineMetrics(0).ascent},_stateToSecondaryTextFormat:null,getSecondaryTextFormatForState:function(a){return this._stateToSecondaryTextFormat.get(a)},setSecondaryTextFormatForState:function(a,b){this.setStyle("setSecondaryTextFormatForState",a)&&(b==null?this._stateToSecondaryTextFormat.remove(a):this._stateToSecondaryTextFormat.set(a,
b),this.setInvalid(x.STYLES))},initializeItemRendererTheme:function(){cu.initialize()},dispose:function(){this.set_data(null);this.set_layoutIndex(-1);this.set_pointerTarget(null);Yc.prototype.dispose.call(this)},initialize:function(){Yc.prototype.initialize.call(this);this._pointerToState.set_customHitTest(m(this,this.customHitTest));this._pointerTrigger.set_customHitTest(m(this,this.customHitTest))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.STATE),
d=this.isInvalid(x.STYLES);this._updatedSecondaryTextStyles=!1;a&&(this._pointerToState.set_target(this._pointerTarget!=null?this._pointerTarget:this),this.refreshSecondaryTextField());(a||d||c)&&this.refreshSecondaryTextStyles();(d||c)&&this.refreshAccessoryView();(a||d||c||b)&&this.refreshSecondaryText(b);Yc.prototype.update.call(this)},refreshInteractivity:function(){Yc.prototype.refreshInteractivity.call(this);this._pointerToState.set_enabled(this.get_showHoverAndDownStates());this._keyToState.set_enabled(this.get_showHoverAndDownStates())},
refreshSecondaryTextField:function(){this._secondaryText==null&&this._secondaryHtmlText==null?(this.secondaryTextField!=null&&(this.removeChild(this.secondaryTextField),this.secondaryTextField=null),this._previousSecondarySimpleTextFormat=this._previousSecondaryTextFormat=this._previousSecondaryHTMLText=this._previousSecondaryText=null):this.secondaryTextField==null&&(this.secondaryTextField=new Jc,this.secondaryTextField.set_selectable(!1),this.secondaryTextField.set_multiline(!0),this.addChild(this.secondaryTextField))},
refreshSecondaryTextStyles:function(){if(this.secondaryTextField!=null){this.secondaryTextField.get_embedFonts()!=this.get_embedFonts()&&(this.secondaryTextField.set_embedFonts(this.get_embedFonts()),this._updatedSecondaryTextStyles=!0);var a=this.getCurrentSecondaryTextFormat(),b=a!=null?a.toSimpleTextFormat():null;b!=this._previousSecondarySimpleTextFormat&&(this._previousSecondaryTextFormat!=null&&this._previousSecondaryTextFormat.removeEventListener("change",m(this,this.itemRenderer_secondaryTextFormat_changeHandler)),
a!=null&&(a.addEventListener("change",m(this,this.itemRenderer_secondaryTextFormat_changeHandler),!1,0,!0),this.secondaryTextField.set_defaultTextFormat(b),this._updatedSecondaryTextStyles=!0),this._previousSecondaryTextFormat=a,this._previousSecondarySimpleTextFormat=b)}},refreshSecondaryText:function(a){if(this.secondaryTextField!=null){var b=this.get_showSecondaryText()&&this._secondaryText!=null&&this._secondaryText.length>0,c=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>
0;this.secondaryTextField.set_visible(b||c);if(this._secondaryText!=this._previousSecondaryText||this._secondaryHtmlText!=this._previousSecondaryHTMLText||this._updatedSecondaryTextStyles||a)this.secondaryTextField.set_autoSize(1),c?this.secondaryTextField.set_htmlText(this._secondaryHtmlText):b?this.secondaryTextField.set_text(this._secondaryText):this.secondaryTextField.set_text("\u200b"),this._secondaryTextMeasuredWidth=this.secondaryTextField.get_width(),this._secondaryTextMeasuredHeight=this.secondaryTextField.get_height(),
this.secondaryTextField.set_autoSize(2),b||c||this.secondaryTextField.set_text(""),this._previousSecondaryText=this._secondaryText,this._previousSecondaryHTMLText=this._secondaryHtmlText}},getCurrentSecondaryTextFormat:function(){var a=this._stateToSecondaryTextFormat.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledSecondaryTextFormat()==null?this._selected&&this.get_selectedSecondaryTextFormat()!=null?this.get_selectedSecondaryTextFormat():this.get_secondaryTextFormat():
this.get_disabledSecondaryTextFormat()},refreshAccessoryView:function(){var a=this._currentAccessoryView;this._currentAccessoryView=this.getCurrentAccessoryView();this._currentAccessoryView!=a&&(this.removeCurrentAccessoryView(a),this.addCurrentAccessoryView(this._currentAccessoryView))},getCurrentAccessoryView:function(){return this.get_accessoryView()},removeCurrentAccessoryView:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.itemRenderer_accessoryView_resizeHandler)),u.__implements(a,
wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._accessoryViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentAccessoryView:function(a){a==null?this._accessoryViewMeasurements=null:(u.__implements(a,jb)&&a.initializeNow(),this._accessoryViewMeasurements==null?this._accessoryViewMeasurements=new Ib(a):this._accessoryViewMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),u.__implements(a,Td)&&a.set_stateContext(this),a.addEventListener("resize",
m(this,this.itemRenderer_accessoryView_resizeHandler),!1,0,!0),this.addChild(a))},customHitTest:function(a,b){var c=this._pointerTarget;c=c instanceof lb?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Qa(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Da&&!a.mouseEnabled||!u.__implements(a,ld)||(b=a,this._pointerTarget!=null&&b.parent==this._pointerTarget||!b.get_focusEnabled())))return!1;a=a.parent}return!0},
refreshTextFieldDimensions:function(a){var b=this._ignoreIconResizes;this._ignoreIconResizes=!0;u.__implements(this._currentIcon,oa)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=b;b=this.get_showText()&&this._text!=null;var c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0;if(b||c){b=this.actualWidth;
c=this.actualHeight;a&&(b=0,a=this.get_explicitWidth(),a==null&&(a=this.get_explicitMaxWidth()),a!=null&&(b=a),c=0,a=this.get_explicitHeight(),a==null&&(a=this.get_explicitMaxHeight()),a!=null&&(c=a));b-=this.get_paddingLeft()+this.get_paddingRight();c-=this.get_paddingTop()+this.get_paddingBottom();a=this.get_gap();a==1/0&&(a=this.get_minGap());if(this._currentIcon!=null){if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==
ja.TOP||this.get_iconPosition()==ja.BOTTOM)c-=this._currentIcon.get_height()+a}this.hasAccessoryViewInLayout()&&(b-=this._currentAccessoryView.get_width()+a);this.secondaryTextField!=null&&(c-=this._secondaryTextMeasuredHeight+a);b>this._textMeasuredWidth&&(b=this._textMeasuredWidth);c>this._textMeasuredHeight&&(c=this._textMeasuredHeight);b<0&&(b=0);c<0&&(c=0);this.textField.set_width(b);(a=this.get_wordWrap())&&!this._wrappedOnMeasure&&b>=this._textMeasuredWidth&&(a=!1);this.textField.get_wordWrap()!=
a&&this.textField.set_wordWrap(a);this.textField.set_height(c)}},calculateExplicitWidthForTextMeasurement:function(){var a=Yc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());if(this.hasAccessoryViewInLayout()){var c=this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=c;a-=this._currentAccessoryView.get_width()+
b}a<0&&(a=0);return a},measureContentWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)d=Math.max(d,this._secondaryTextMeasuredWidth);if(this.hasAccessoryViewInLayout()){var h=
this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;if(b||c||f||g)d+=a;d+=this._currentAccessoryView.get_width()}if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=
Math.max(d,this._currentIcon.get_width());return d},measureContentHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)if(d+=this._secondaryTextMeasuredHeight,b||c)d+=a;if(this.hasAccessoryViewInLayout()){var h=
this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());
return d},measureContentMinWidth:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredWidth:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)d=Math.max(d,this._secondaryTextMeasuredWidth);if(this.hasAccessoryViewInLayout()){var h=this._ignoreAccessoryResizes;
this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;if(b||c||f||g)d+=a;d+=this._currentAccessoryView.get_width()}if(this._currentIcon!=null)if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)d=Math.max(d,this._currentIcon.get_width());
return d},measureContentMinHeight:function(){var a=this.get_gap();a==1/0&&(a=this.get_minGap());var b=this.get_showText()&&this._text!=null,c=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,d=b||c?this._textMeasuredHeight:0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0;if(f||g)if(d+=this._secondaryTextMeasuredHeight,b||c)d+=a;if(this.hasAccessoryViewInLayout()){var h=this._ignoreAccessoryResizes;
this._ignoreAccessoryResizes=!0;u.__implements(this._currentAccessoryView,oa)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},hasAccessoryViewInLayout:function(){return this._currentAccessoryView==
null?!1:u.__implements(this._currentAccessoryView,dc)?this._currentAccessoryView.get_includeInLayout():!0},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_alternateBackgroundSkin()!=null&&this._layoutIndex%2==1?this.get_alternateBackgroundSkin():this.get_backgroundSkin()},layoutChildren:function(){this.refreshTextFieldDimensions(!1);var a=!1,b=this.get_gap();
b==1/0&&(b=this.get_minGap(),a=!0);var c=this.get_showText()&&this._text!=null,d=this.get_showText()&&this._htmlText!=null&&this._htmlText.length>0,f=this.get_showSecondaryText()&&this._secondaryText!=null,g=this.get_showSecondaryText()&&this._secondaryHtmlText!=null&&this._secondaryHtmlText.length>0,h=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight(),l=this.actualHeight-this.get_paddingTop()-this.get_paddingBottom(),k=c||d?this._textMeasuredWidth:0,q=c||d?this._textMeasuredHeight:0;
(f||g)&&this.secondaryTextField!=null&&(k=Math.max(k,this._secondaryTextMeasuredWidth),q+=this._secondaryTextMeasuredHeight+b);if(this._currentIcon!=null){if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)k+=b+this._currentIcon.get_width();if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)q+=b+this._currentIcon.get_height()}var w=a&&(c||d||f||g)&&this._currentIcon!=null&&(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM);a=a&&(c||d||f||
g)&&this._currentIcon!=null&&(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT);if(this.hasAccessoryViewInLayout()){this._currentAccessoryView.set_x(this.actualWidth-this.get_paddingRight()-this._currentAccessoryView.get_width());switch(this.get_verticalAlign()._hx_index){case 0:this._currentAccessoryView.set_y(this.get_paddingTop());break;case 1:this._currentAccessoryView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(l-this._currentAccessoryView.get_height())/2));
break;case 2:this._currentAccessoryView.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+l-this._currentAccessoryView.get_height()));break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));}h-=this._currentAccessoryView.get_width()+b}if(this._currentIcon!=null){if(this.get_iconPosition()==ja.TOP||this.get_iconPosition()==ja.BOTTOM)switch(this.get_horizontalAlign()._hx_index){case 0:this._currentIcon.set_x(this.get_paddingLeft());break;case 1:this._currentIcon.set_x(Math.max(this.get_paddingLeft(),
this.get_paddingLeft()+(h-this._currentIcon.get_height())/2));break;case 2:this._currentIcon.set_x(Math.max(this.get_paddingLeft(),this.get_paddingLeft()+h-this._currentIcon.get_width()));break;default:throw new rb("Unknown horizontal align: "+L.string(this.get_horizontalAlign()));}if(this.get_iconPosition()==ja.LEFT||this.get_iconPosition()==ja.RIGHT)switch(this.get_verticalAlign()._hx_index){case 0:this._currentIcon.set_y(this.get_paddingTop());break;case 1:this._currentIcon.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(l-this._currentIcon.get_height())/2));break;case 2:this._currentIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+l-this._currentIcon.get_height()));break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));}}this.get_paddingLeft();this.get_paddingTop();if(a)k=this.get_paddingLeft();else switch(this.get_horizontalAlign()._hx_index){case 0:k=this.get_paddingLeft();break;case 1:k=Math.max(this.get_paddingLeft(),this.get_paddingLeft()+
(h-k)/2);break;case 2:k=Math.max(this.get_paddingLeft(),this.get_paddingLeft()+h-k);break;default:throw new rb("Unknown horizontal align: "+L.string(this.get_horizontalAlign()));}if(w)q=this.get_paddingTop();else switch(this.get_verticalAlign()._hx_index){case 0:q=this.get_paddingTop();break;case 1:q=Math.max(this.get_paddingTop(),this.get_paddingTop()+(l-q)/2);break;case 2:q=Math.max(this.get_paddingTop(),this.get_paddingTop()+l-q);break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));
}this._currentIcon!=null&&(this.get_iconPosition()==ja.LEFT?(this._currentIcon.set_x(k),k+=b+this._currentIcon.get_width()):this.get_iconPosition()==ja.TOP&&(this._currentIcon.set_y(q),q+=b+this._currentIcon.get_height()));var v=0,z=0,n=h;this._currentIcon==null||this.get_iconPosition()!=ja.LEFT&&this.get_iconPosition()!=ja.RIGHT||(n-=b+this._currentIcon.get_width());if(c||d)if(this.textField.set_x(k),this.textField.set_y(q),q+=this._textMeasuredHeight+b,v=Math.max(v,this.textField.get_width()),z+=
this.textField.get_height(),f||g)z+=b;(f||g)&&this.secondaryTextField!=null&&(this.secondaryTextField.set_x(k),this.secondaryTextField.set_y(q),n=this._secondaryTextMeasuredWidth<n?this._secondaryTextMeasuredWidth:n,n<0&&(n=0),this.secondaryTextField.set_width(n),q+=this._secondaryTextMeasuredHeight+b,v=Math.max(v,n),z+=this.secondaryTextField.get_height());a&&this.get_iconPosition()==ja.LEFT?((c||d)&&this.textField.set_x(Math.max(this.textField.get_x(),this.get_paddingLeft()+h-v)),(f||g)&&this.secondaryTextField.set_x(Math.max(this.secondaryTextField.get_x(),
this.get_paddingLeft()+h-v))):w&&this.get_iconPosition()==ja.TOP&&((c||d)&&this.textField.set_y(Math.max(this.textField.get_y(),this.get_paddingTop()+l-z)),(f||g)&&this.secondaryTextField.set_y(this.get_paddingTop()+l-this.secondaryTextField.get_height()));if(c||d||f||g)k+=v+b;this._currentIcon!=null&&(this.get_iconPosition()==ja.RIGHT&&(a?this._currentIcon.set_x(Math.max(k,this.get_paddingLeft()+h-this._currentIcon.get_width())):this._currentIcon.set_x(k)),this.get_iconPosition()==ja.BOTTOM&&(w?
this._currentIcon.set_y(Math.max(q,this.get_paddingTop()+l-this._currentIcon.get_height())):this._currentIcon.set_y(q)))},itemRenderer_secondaryTextFormat_changeHandler:function(a){this.setInvalid(x.STYLES)},itemRenderer_accessoryView_resizeHandler:function(a){this._ignoreAccessoryResizes||this.setInvalid(x.STYLES)},__secondaryTextFormat:null,get_secondaryTextFormat:function(){return this.__secondaryTextFormat},set_secondaryTextFormat:function(a){if(!this.setStyle("secondaryTextFormat")||this.__secondaryTextFormat==
a)return this.__secondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_secondaryTextFormat);this.__secondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__secondaryTextFormat},clearStyle_secondaryTextFormat:function(){this.set_secondaryTextFormat(null);return this.get_secondaryTextFormat()},__disabledSecondaryTextFormat:null,get_disabledSecondaryTextFormat:function(){return this.__disabledSecondaryTextFormat},set_disabledSecondaryTextFormat:function(a){if(!this.setStyle("disabledSecondaryTextFormat")||
this.__disabledSecondaryTextFormat==a)return this.__disabledSecondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_disabledSecondaryTextFormat);this.__disabledSecondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__disabledSecondaryTextFormat},clearStyle_disabledSecondaryTextFormat:function(){this.set_disabledSecondaryTextFormat(null);return this.get_disabledSecondaryTextFormat()},__selectedSecondaryTextFormat:null,get_selectedSecondaryTextFormat:function(){return this.__selectedSecondaryTextFormat},
set_selectedSecondaryTextFormat:function(a){if(!this.setStyle("selectedSecondaryTextFormat")||this.__selectedSecondaryTextFormat==a)return this.__selectedSecondaryTextFormat;this._previousClearStyle=m(this,this.clearStyle_selectedSecondaryTextFormat);this.__selectedSecondaryTextFormat=a;this.setInvalid(x.STYLES);return this.__selectedSecondaryTextFormat},clearStyle_selectedSecondaryTextFormat:function(){this.set_selectedSecondaryTextFormat(null);return this.get_selectedSecondaryTextFormat()},__alternateBackgroundSkin:null,
get_alternateBackgroundSkin:function(){return this.__alternateBackgroundSkin},set_alternateBackgroundSkin:function(a){if(!this.setStyle("alternateBackgroundSkin")||this.__alternateBackgroundSkin==a)return this.__alternateBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_alternateBackgroundSkin);this.__alternateBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__alternateBackgroundSkin},clearStyle_alternateBackgroundSkin:function(){this.set_alternateBackgroundSkin(null);return this.get_alternateBackgroundSkin()},
__showSecondaryText:null,get_showSecondaryText:function(){return this.__showSecondaryText},set_showSecondaryText:function(a){if(!this.setStyle("showSecondaryText")||this.__showSecondaryText==a)return this.__showSecondaryText;this._previousClearStyle=m(this,this.clearStyle_showSecondaryText);this.__showSecondaryText=a;this.setInvalid(x.STYLES);return this.__showSecondaryText},clearStyle_showSecondaryText:function(){this.set_showSecondaryText(!0);return this.get_showSecondaryText()},__showHoverAndDownStates:null,
get_showHoverAndDownStates:function(){return this.__showHoverAndDownStates},set_showHoverAndDownStates:function(a){if(!this.setStyle("showHoverAndDownStates")||this.__showHoverAndDownStates==a)return this.__showHoverAndDownStates;this._previousClearStyle=m(this,this.clearStyle_showHoverAndDownStates);this.__showHoverAndDownStates=a;this.setInvalid(x.STYLES);return this.__showHoverAndDownStates},clearStyle_showHoverAndDownStates:function(){this.set_showHoverAndDownStates(!0);return this.get_showHoverAndDownStates()},
__accessoryView:null,get_accessoryView:function(){return this.__accessoryView},set_accessoryView:function(a){if(!this.setStyle("accessoryView")||this.__accessoryView==a)return this.__accessoryView;this._previousClearStyle=m(this,this.clearStyle_accessoryView);this.__accessoryView=a;this.setInvalid(x.STYLES);return this.__accessoryView},clearStyle_accessoryView:function(){this.set_accessoryView(null);return this.get_accessoryView()},get_styleContext:function(){return Mc},__class__:Mc,__properties__:I(Yc.prototype.__properties__,
{set_accessoryView:"set_accessoryView",get_accessoryView:"get_accessoryView",set_showHoverAndDownStates:"set_showHoverAndDownStates",get_showHoverAndDownStates:"get_showHoverAndDownStates",set_showSecondaryText:"set_showSecondaryText",get_showSecondaryText:"get_showSecondaryText",set_alternateBackgroundSkin:"set_alternateBackgroundSkin",get_alternateBackgroundSkin:"get_alternateBackgroundSkin",set_selectedSecondaryTextFormat:"set_selectedSecondaryTextFormat",get_selectedSecondaryTextFormat:"get_selectedSecondaryTextFormat",
set_disabledSecondaryTextFormat:"set_disabledSecondaryTextFormat",get_disabledSecondaryTextFormat:"get_disabledSecondaryTextFormat",set_secondaryTextFormat:"set_secondaryTextFormat",get_secondaryTextFormat:"get_secondaryTextFormat",set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",set_secondaryHtmlText:"set_secondaryHtmlText",
get_secondaryHtmlText:"get_secondaryHtmlText",set_secondaryText:"set_secondaryText",get_secondaryText:"get_secondaryText",set_data:"set_data",get_data:"get_data"})});var hn=function(){};r["feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer"]=hn;hn.__name__="feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer";hn.__isInterface__=!0;hn.__interfaces__=[jb];hn.prototype={get_showHierarchy:null,set_showHierarchy:null,__class__:hn,__properties__:{set_showHierarchy:"set_showHierarchy",
get_showHierarchy:"get_showHierarchy"}};var hm=function(){};r["feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer"]=hm;hm.__name__="feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer";hm.__isInterface__=!0;hm.__interfaces__=[jb];hm.prototype={get_hierarchyDepth:null,set_hierarchyDepth:null,__class__:hm,__properties__:{set_hierarchyDepth:"set_hierarchyDepth",get_hierarchyDepth:"get_hierarchyDepth"}};var Hk=function(){};r["feathers.controls.dataRenderers.IHierarchicalItemRenderer"]=
Hk;Hk.__name__="feathers.controls.dataRenderers.IHierarchicalItemRenderer";Hk.__isInterface__=!0;Hk.__interfaces__=[jb];Hk.prototype={get_branch:null,set_branch:null,__class__:Hk,__properties__:{set_branch:"set_branch",get_branch:"get_branch"}};var uf=function(){this.__branchIcon=this.__branchOpenIcon=this.__branchClosedIcon=this.__leafIcon=this.__customDisclosureButtonVariant=null;this.__indentation=0;this._previousCustomDisclosureButtonVariant=null;this._ignoreBranchOrLeafIconResizes=!1;this._showHierarchy=
!0;this._branch=this._opened=this._ignoreOpenCloseChange=!1;this._hierarchyDepth=0;this.initializeHierarchicalItemRendererTheme();Mc.call(this)};r["feathers.controls.dataRenderers.HierarchicalItemRenderer"]=uf;uf.__name__="feathers.controls.dataRenderers.HierarchicalItemRenderer";uf.__interfaces__=[mi,hn,hm,Hk];uf.__super__=Mc;uf.prototype=I(Mc.prototype,{_hierarchyDepth:null,get_hierarchyDepth:function(){return this._hierarchyDepth},set_hierarchyDepth:function(a){if(this._hierarchyDepth==a)return this._hierarchyDepth;
this._hierarchyDepth=a;this.setInvalid(x.DATA);return this._hierarchyDepth},_branch:null,get_branch:function(){return this._branch},set_branch:function(a){if(this._branch==a)return this._branch;this._branch=a;this.setInvalid(x.DATA);return this._branch},_opened:null,get_opened:function(){return this._opened},set_opened:function(a){if(this._opened==a)return this._opened;this._opened=a;this.setInvalid(x.DATA);this._opened?W.dispatch(this,"open"):W.dispatch(this,"close");return this._opened},_ignoreOpenCloseChange:null,
_showHierarchy:null,get_showHierarchy:function(){return this._showHierarchy},set_showHierarchy:function(a){if(this._showHierarchy==a)return this._showHierarchy;this._showHierarchy=a;this.setInvalid(x.DATA);return this._showHierarchy},_currentBranchOrLeafIcon:null,_branchOrLeafIconMeasurements:null,_ignoreBranchOrLeafIconResizes:null,disclosureButton:null,_previousCustomDisclosureButtonVariant:null,_oldDisclosureButtonFactory:null,_disclosureButtonFactory:null,get_disclosureButtonFactory:function(){return this._disclosureButtonFactory},
set_disclosureButtonFactory:function(a){if(this._disclosureButtonFactory==a)return this._disclosureButtonFactory;this._disclosureButtonFactory=a;this.setInvalid(uf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);return this._disclosureButtonFactory},dispose:function(){this.destroyDisclosureButton();Mc.prototype.dispose.call(this)},initializeHierarchicalItemRendererTheme:function(){Bk.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STATE),c=this.isInvalid(x.STYLES);this._previousCustomDisclosureButtonVariant!=
this.get_customDisclosureButtonVariant()&&this.setInvalidationFlag(uf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);var d=this.isInvalid(uf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);d&&this.createDisclosureButton();(c||b||a)&&this.refreshBranchOrLeafIcon();a&&this.refreshBranchOrLeafStatus();(b||d)&&this.disclosureButton.set_enabled(this._enabled);(a||d)&&this.refreshOpenedState();Mc.prototype.update.call(this);this._previousCustomDisclosureButtonVariant=this.get_customDisclosureButtonVariant()},
calculateExplicitWidthForTextMeasurement:function(){var a=Mc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null||!this._showHierarchy)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a-=c;this.disclosureButton.validateNow();a-=this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(c=this._ignoreBranchOrLeafIconResizes,this._ignoreBranchOrLeafIconResizes=!0,u.__implements(this._currentBranchOrLeafIcon,
oa)&&this._currentBranchOrLeafIcon.validateNow(),this._ignoreBranchOrLeafIconResizes=c,a-=this._currentBranchOrLeafIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=Mc.prototype.measureContentWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;u.__implements(this._currentBranchOrLeafIcon,oa)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=
b;b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a+=c+this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(a+=this._currentBranchOrLeafIcon.get_width()+b);return a},measureContentMinWidth:function(){var a=Mc.prototype.measureContentMinWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;u.__implements(this._currentBranchOrLeafIcon,
oa)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=b;b=this.get_gap();b==1/0&&(b=this.get_minGap());var c=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;a+=c+this.disclosureButton.get_width()+b;this._currentBranchOrLeafIcon!=null&&(a+=this._currentBranchOrLeafIcon.get_width()+b);return a},layoutChildren:function(){var a=this;if(this._showHierarchy){this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=
!0;u.__implements(this._currentBranchOrLeafIcon,oa)&&this._currentBranchOrLeafIcon.validateNow();this._ignoreBranchOrLeafIconResizes=b;var c=this.get_paddingLeft();b=this.get_gap();b==1/0&&(b=this.get_minGap());var d=b,f=b,g=this._showHierarchy?this.get_indentation()*this._hierarchyDepth:0;this.runWithoutInvalidation(function(){var h=c+g+a.disclosureButton.get_width()+d;a._currentBranchOrLeafIcon!=null&&(h+=a._currentBranchOrLeafIcon.get_width()+f);a.set_paddingLeft(h)});Mc.prototype.layoutChildren.call(this);
this.runWithoutInvalidation(function(){a.set_paddingLeft(c)});this.disclosureButton.set_x(this.get_paddingLeft()+g);switch(this.get_verticalAlign()._hx_index){case 0:this.disclosureButton.set_y(this.get_paddingTop());break;case 1:this.disclosureButton.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this.disclosureButton.get_height())/2));break;case 2:this.disclosureButton.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+
this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this.disclosureButton.get_height()));break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));}if(this._currentBranchOrLeafIcon!=null)switch(this._currentBranchOrLeafIcon.set_x(this.disclosureButton.get_x()+this.disclosureButton.get_width()+d),this.get_verticalAlign()._hx_index){case 0:this._currentBranchOrLeafIcon.set_y(this.get_paddingTop());break;case 1:this._currentBranchOrLeafIcon.set_y(Math.max(this.get_paddingTop(),
this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentBranchOrLeafIcon.get_height())/2));break;case 2:this._currentBranchOrLeafIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentBranchOrLeafIcon.get_height()));break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));}}else Mc.prototype.layoutChildren.call(this)},createDisclosureButton:function(){this.destroyDisclosureButton();
var a=this._disclosureButtonFactory!=null?this._disclosureButtonFactory:uf.defaultDisclosureButtonFactory;this._oldDisclosureButtonFactory=a;this.disclosureButton=a.create();this.disclosureButton.get_variant()==null&&this.disclosureButton.set_variant(this.get_customDisclosureButtonVariant()!=null?this.get_customDisclosureButtonVariant():uf.CHILD_VARIANT_DISCLOSURE_BUTTON);this.disclosureButton.set_tabEnabled(!1);this.disclosureButton.addEventListener("change",m(this,this.hierarchicalItemRenderer_disclosureButton_changeHandler));
this.disclosureButton.initializeNow();this.addChild(this.disclosureButton)},destroyDisclosureButton:function(){this.disclosureButton!=null&&(this.disclosureButton.removeEventListener("change",m(this,this.hierarchicalItemRenderer_disclosureButton_changeHandler)),this.removeChild(this.disclosureButton),this._oldDisclosureButtonFactory.destroy!=null&&this._oldDisclosureButtonFactory.destroy(this.disclosureButton),this.disclosureButton=this._oldDisclosureButtonFactory=null)},refreshBranchOrLeafIcon:function(){var a=
this._currentBranchOrLeafIcon;this._currentBranchOrLeafIcon=this.getCurrentBranchOrLeafIcon();this._currentBranchOrLeafIcon!=null&&this._currentBranchOrLeafIcon.set_visible(this._showHierarchy);this._currentBranchOrLeafIcon!=a&&(this.removeCurrentBranchOrLeafIcon(a),this.addCurrentBranchOrLeafIcon(this._currentBranchOrLeafIcon))},getCurrentBranchOrLeafIcon:function(){return this._branch?this._opened&&this.get_branchOpenIcon()!=null?this.get_branchOpenIcon():this._opened||this.get_branchClosedIcon()==
null?this.get_branchIcon():this.get_branchClosedIcon():this.get_leafIcon()},removeCurrentBranchOrLeafIcon:function(a){a!=null&&(a.removeEventListener("resize",m(this,this.hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler)),u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._branchOrLeafIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentBranchOrLeafIcon:function(a){a==null?this._branchOrLeafIconMeasurements=null:(u.__implements(a,
jb)&&a.initializeNow(),this._branchOrLeafIconMeasurements==null?this._branchOrLeafIconMeasurements=new Ib(a):this._branchOrLeafIconMeasurements.save(a),u.__implements(a,wb)&&a.set_uiContext(this),u.__implements(a,Td)&&a.set_stateContext(this),a.addEventListener("resize",m(this,this.hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler),!1,0,!0),this.addChild(a))},refreshBranchOrLeafStatus:function(){this.disclosureButton.set_visible(this._showHierarchy&&this._branch)},refreshOpenedState:function(){var a=
this._ignoreOpenCloseChange;this._ignoreOpenCloseChange=!0;this.disclosureButton.set_selected(this._opened);this._ignoreOpenCloseChange=a},hierarchicalItemRenderer_disclosureButton_changeHandler:function(a){this._ignoreOpenCloseChange||this.set_opened(this.disclosureButton.get_selected())},hierarchicalItemRenderer_branchOrLeafIcon_resizeHandler:function(a){this._ignoreBranchOrLeafIconResizes||this.setInvalid(x.STYLES)},get_styleContext:function(){return uf},__indentation:null,get_indentation:function(){return this.__indentation},
set_indentation:function(a){if(!this.setStyle("indentation")||this.__indentation==a)return this.__indentation;this._previousClearStyle=m(this,this.clearStyle_indentation);this.__indentation=a;this.setInvalid(x.STYLES);return this.__indentation},clearStyle_indentation:function(){this.set_indentation(0);return this.get_indentation()},__branchIcon:null,get_branchIcon:function(){return this.__branchIcon},set_branchIcon:function(a){if(!this.setStyle("branchIcon")||this.__branchIcon==a)return this.__branchIcon;
this._previousClearStyle=m(this,this.clearStyle_branchIcon);this.__branchIcon=a;this.setInvalid(x.STYLES);return this.__branchIcon},clearStyle_branchIcon:function(){this.set_branchIcon(null);return this.get_branchIcon()},__branchOpenIcon:null,get_branchOpenIcon:function(){return this.__branchOpenIcon},set_branchOpenIcon:function(a){if(!this.setStyle("branchOpenIcon")||this.__branchOpenIcon==a)return this.__branchOpenIcon;this._previousClearStyle=m(this,this.clearStyle_branchOpenIcon);this.__branchOpenIcon=
a;this.setInvalid(x.STYLES);return this.__branchOpenIcon},clearStyle_branchOpenIcon:function(){this.set_branchOpenIcon(null);return this.get_branchOpenIcon()},__branchClosedIcon:null,get_branchClosedIcon:function(){return this.__branchClosedIcon},set_branchClosedIcon:function(a){if(!this.setStyle("branchClosedIcon")||this.__branchClosedIcon==a)return this.__branchClosedIcon;this._previousClearStyle=m(this,this.clearStyle_branchClosedIcon);this.__branchClosedIcon=a;this.setInvalid(x.STYLES);return this.__branchClosedIcon},
clearStyle_branchClosedIcon:function(){this.set_branchClosedIcon(null);return this.get_branchClosedIcon()},__leafIcon:null,get_leafIcon:function(){return this.__leafIcon},set_leafIcon:function(a){if(!this.setStyle("leafIcon")||this.__leafIcon==a)return this.__leafIcon;this._previousClearStyle=m(this,this.clearStyle_leafIcon);this.__leafIcon=a;this.setInvalid(x.STYLES);return this.__leafIcon},clearStyle_leafIcon:function(){this.set_leafIcon(null);return this.get_leafIcon()},__customDisclosureButtonVariant:null,
get_customDisclosureButtonVariant:function(){return this.__customDisclosureButtonVariant},set_customDisclosureButtonVariant:function(a){if(!this.setStyle("customDisclosureButtonVariant")||this.__customDisclosureButtonVariant==a)return this.__customDisclosureButtonVariant;this._previousClearStyle=m(this,this.clearStyle_customDisclosureButtonVariant);this.__customDisclosureButtonVariant=a;this.setInvalid(x.STYLES);return this.__customDisclosureButtonVariant},clearStyle_customDisclosureButtonVariant:function(){this.set_customDisclosureButtonVariant(null);
return this.get_customDisclosureButtonVariant()},__class__:uf,__properties__:I(Mc.prototype.__properties__,{set_disclosureButtonFactory:"set_disclosureButtonFactory",get_disclosureButtonFactory:"get_disclosureButtonFactory",set_customDisclosureButtonVariant:"set_customDisclosureButtonVariant",get_customDisclosureButtonVariant:"get_customDisclosureButtonVariant",set_leafIcon:"set_leafIcon",get_leafIcon:"get_leafIcon",set_branchClosedIcon:"set_branchClosedIcon",get_branchClosedIcon:"get_branchClosedIcon",
set_branchOpenIcon:"set_branchOpenIcon",get_branchOpenIcon:"get_branchOpenIcon",set_branchIcon:"set_branchIcon",get_branchIcon:"get_branchIcon",set_indentation:"set_indentation",get_indentation:"get_indentation",set_showHierarchy:"set_showHierarchy",get_showHierarchy:"get_showHierarchy",set_opened:"set_opened",get_opened:"get_opened",set_branch:"set_branch",get_branch:"get_branch",set_hierarchyDepth:"set_hierarchyDepth",get_hierarchyDepth:"get_hierarchyDepth"})});var Po=function(){};r["feathers.controls.dataRenderers.IGridViewCellRenderer"]=
Po;Po.__name__="feathers.controls.dataRenderers.IGridViewCellRenderer";Po.__isInterface__=!0;Po.__interfaces__=[jb];Po.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_rowIndex:null,set_rowIndex:null,get_gridViewOwner:null,set_gridViewOwner:null,__class__:Po,__properties__:{set_gridViewOwner:"set_gridViewOwner",get_gridViewOwner:"get_gridViewOwner",set_rowIndex:"set_rowIndex",get_rowIndex:"get_rowIndex",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",
set_column:"set_column",get_column:"get_column"}};var Co=function(){};r["feathers.controls.dataRenderers.IGridViewHeaderRenderer"]=Co;Co.__name__="feathers.controls.dataRenderers.IGridViewHeaderRenderer";Co.__isInterface__=!0;Co.__interfaces__=[jb];Co.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_gridViewOwner:null,set_gridViewOwner:null,__class__:Co,__properties__:{set_gridViewOwner:"set_gridViewOwner",get_gridViewOwner:"get_gridViewOwner",set_columnIndex:"set_columnIndex",
get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var Ho=function(){};r["feathers.controls.dataRenderers.IGroupListViewItemRenderer"]=Ho;Ho.__name__="feathers.controls.dataRenderers.IGroupListViewItemRenderer";Ho.__isInterface__=!0;Ho.__interfaces__=[jb];Ho.prototype={get_location:null,set_location:null,get_groupListViewOwner:null,set_groupListViewOwner:null,__class__:Ho,__properties__:{set_groupListViewOwner:"set_groupListViewOwner",get_groupListViewOwner:"get_groupListViewOwner",
set_location:"set_location",get_location:"get_location"}};var wo=function(){};r["feathers.controls.dataRenderers.IListViewItemRenderer"]=wo;wo.__name__="feathers.controls.dataRenderers.IListViewItemRenderer";wo.__isInterface__=!0;wo.__interfaces__=[jb];wo.prototype={get_index:null,set_index:null,get_listViewOwner:null,set_listViewOwner:null,__class__:wo,__properties__:{set_listViewOwner:"set_listViewOwner",get_listViewOwner:"get_listViewOwner",set_index:"set_index",get_index:"get_index"}};var Qo=
function(){};r["feathers.controls.dataRenderers.ITreeGridViewCellRenderer"]=Qo;Qo.__name__="feathers.controls.dataRenderers.ITreeGridViewCellRenderer";Qo.__isInterface__=!0;Qo.__interfaces__=[Hk];Qo.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_rowLocation:null,set_rowLocation:null,get_treeGridViewOwner:null,set_treeGridViewOwner:null,__class__:Qo,__properties__:{set_treeGridViewOwner:"set_treeGridViewOwner",get_treeGridViewOwner:"get_treeGridViewOwner",
set_rowLocation:"set_rowLocation",get_rowLocation:"get_rowLocation",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var Lo=function(){};r["feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer"]=Lo;Lo.__name__="feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer";Lo.__isInterface__=!0;Lo.__interfaces__=[jb];Lo.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_treeGridViewOwner:null,
set_treeGridViewOwner:null,__class__:Lo,__properties__:{set_treeGridViewOwner:"set_treeGridViewOwner",get_treeGridViewOwner:"get_treeGridViewOwner",set_columnIndex:"set_columnIndex",get_columnIndex:"get_columnIndex",set_column:"set_column",get_column:"get_column"}};var No=function(){};r["feathers.controls.dataRenderers.ITreeViewItemRenderer"]=No;No.__name__="feathers.controls.dataRenderers.ITreeViewItemRenderer";No.__isInterface__=!0;No.__interfaces__=[Hk];No.prototype={get_location:null,set_location:null,
get_treeViewOwner:null,set_treeViewOwner:null,__class__:No,__properties__:{set_treeViewOwner:"set_treeViewOwner",get_treeViewOwner:"get_treeViewOwner",set_location:"set_location",get_location:"get_location"}};var ql=function(){this.__selectedBackgroundSkin=this.__alternateBackgroundSkin=null;this.__showHoverAndDownStates=!0;this._stateToSkin=new Ye;this._pointerToState=null;this._selected=!1;this._layoutIndex=-1;this._currentState=Nb.UP(!1);this.initializeLayoutGroupItemRendererTheme();sc.call(this)};
r["feathers.controls.dataRenderers.LayoutGroupItemRenderer"]=ql;ql.__name__="feathers.controls.dataRenderers.LayoutGroupItemRenderer";ql.__interfaces__=[im,md,ph,ji,mh];ql.__super__=sc;ql.prototype=I(sc.prototype,{_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);W.dispatch(this,"dataChange");return this._data},_currentState:null,get_currentState:function(){return this._currentState},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},
set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);return this._layoutIndex},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=a;this.setInvalid(x.DATA);this.setInvalid(x.STYLES);W.dispatch(this,"change");this.changeState(this.get_currentState());return this._selected},_pointerTarget:null,get_pointerTarget:function(){return this._pointerTarget},
set_pointerTarget:function(a){if(this._pointerTarget==a)return this._pointerTarget;this._pointerTarget=a;this.setInvalid(x.DATA);return this._pointerTarget},_pointerToState:null,_stateToSkin:null,getSkinForState:function(a){return this._stateToSkin.get(a)},setSkinForState:function(a,b){if(this.setStyle("setSkinForState",a)){var c=this._stateToSkin.get(a);c!=null&&c==this._currentBackgroundSkin&&(this.removeCurrentBackgroundSkin(c),this._currentBackgroundSkin=null);b==null?this._stateToSkin.remove(a):
this._stateToSkin.set(a,b);this.setInvalid(x.STYLES)}},initializeLayoutGroupItemRendererTheme:function(){fu.initialize()},initialize:function(){sc.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new Yl(this,m(this,this.changeState),Nb.UP(!1),Nb.DOWN(!1),Nb.HOVER(!1)));this._pointerToState.set_customHitTest(m(this,this.customHitTest))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.STYLES);a&&this._pointerToState.set_target(this._pointerTarget!=
null?this._pointerTarget:this);b&&this.refreshInteractivity();sc.prototype.update.call(this)},refreshInteractivity:function(){this._pointerToState.set_enabled(this.get_showHoverAndDownStates())},customHitTest:function(a,b){var c=this._pointerTarget;c=c instanceof lb?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Qa(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Da&&!a.mouseEnabled||!u.__implements(a,
ld)||(b=a,this._pointerTarget!=null&&b.parent==this._pointerTarget||!b.get_focusEnabled())))return!1;a=a.parent}return!0},changeState:function(a){this._enabled||(a=Nb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Nb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Nb.HOVER(this._selected));break;case 2:b=a.selected;this._selected!=b&&(a=Nb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Nb.DISABLED(this._selected))}this._currentState!=
a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},getCurrentBackgroundSkin:function(){var a=this._stateToSkin.get(this._currentState);return a!=null?a:this._enabled||this.get_disabledBackgroundSkin()==null?this._selected&&this.get_selectedBackgroundSkin()!=null?this.get_selectedBackgroundSkin():this.get_alternateBackgroundSkin()!=null&&this._layoutIndex%2==1?this.get_alternateBackgroundSkin():this.get_backgroundSkin():this.get_disabledBackgroundSkin()},addCurrentBackgroundSkin:function(a){a!=
null&&u.__implements(a,Td)&&a.set_stateContext(this);sc.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(null);sc.prototype.removeCurrentBackgroundSkin.call(this,a)},get_styleContext:function(){return ql},__showHoverAndDownStates:null,get_showHoverAndDownStates:function(){return this.__showHoverAndDownStates},set_showHoverAndDownStates:function(a){if(!this.setStyle("showHoverAndDownStates")||this.__showHoverAndDownStates==
a)return this.__showHoverAndDownStates;this._previousClearStyle=m(this,this.clearStyle_showHoverAndDownStates);this.__showHoverAndDownStates=a;this.setInvalid(x.STYLES);return this.__showHoverAndDownStates},clearStyle_showHoverAndDownStates:function(){this.set_showHoverAndDownStates(!0);return this.get_showHoverAndDownStates()},__selectedBackgroundSkin:null,get_selectedBackgroundSkin:function(){return this.__selectedBackgroundSkin},set_selectedBackgroundSkin:function(a){if(!this.setStyle("selectedBackgroundSkin")||
this.__selectedBackgroundSkin==a)return this.__selectedBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_selectedBackgroundSkin);this.__selectedBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__selectedBackgroundSkin},clearStyle_selectedBackgroundSkin:function(){this.set_selectedBackgroundSkin(null);return this.get_selectedBackgroundSkin()},__alternateBackgroundSkin:null,get_alternateBackgroundSkin:function(){return this.__alternateBackgroundSkin},set_alternateBackgroundSkin:function(a){if(!this.setStyle("alternateBackgroundSkin")||
this.__alternateBackgroundSkin==a)return this.__alternateBackgroundSkin;this._previousClearStyle=m(this,this.clearStyle_alternateBackgroundSkin);this.__alternateBackgroundSkin=a;this.setInvalid(x.STYLES);return this.__alternateBackgroundSkin},clearStyle_alternateBackgroundSkin:function(){this.set_alternateBackgroundSkin(null);return this.get_alternateBackgroundSkin()},__class__:ql,__properties__:I(sc.prototype.__properties__,{set_alternateBackgroundSkin:"set_alternateBackgroundSkin",get_alternateBackgroundSkin:"get_alternateBackgroundSkin",
set_selectedBackgroundSkin:"set_selectedBackgroundSkin",get_selectedBackgroundSkin:"get_selectedBackgroundSkin",set_showHoverAndDownStates:"set_showHoverAndDownStates",get_showHoverAndDownStates:"get_showHoverAndDownStates",set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget",set_selected:"set_selected",get_selected:"get_selected",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",get_currentState:"get_currentState",set_data:"set_data",get_data:"get_data"})});
var Do=function(){};r["feathers.data.ISortOrderObserver"]=Do;Do.__name__="feathers.data.ISortOrderObserver";Do.__isInterface__=!0;Do.prototype={get_sortOrder:null,set_sortOrder:null,__class__:Do,__properties__:{set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder"}};var Gk=function(){this.__sortAscendingIcon=this.__sortDescendingIcon=null;this._sortOrder=rh.NONE;this.initializeSortOrderHeaderRendererTheme();Mc.call(this);this.set_toggleable(!1)};r["feathers.controls.dataRenderers.SortOrderHeaderRenderer"]=
Gk;Gk.__name__="feathers.controls.dataRenderers.SortOrderHeaderRenderer";Gk.__interfaces__=[Do];Gk.__super__=Mc;Gk.prototype=I(Mc.prototype,{_sortOrder:null,get_sortOrder:function(){return this._sortOrder},set_sortOrder:function(a){if(this._sortOrder==a)return this._sortOrder;this._sortOrder=a;this.setInvalid(x.DATA);return this._sortOrder},_currentSortOrderIcon:null,_sortOrderIconMeasurements:null,initializeSortOrderHeaderRendererTheme:function(){Vv.initialize()},update:function(){var a=this.isInvalid(x.DATA),
b=this.isInvalid(x.STATE);(this.isInvalid(x.STYLES)||b||a)&&this.refreshSortOrderIcon();Mc.prototype.update.call(this)},calculateExplicitWidthForTextMeasurement:function(){var a=Mc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(u.__implements(this._currentSortOrderIcon,oa)&&this._currentSortOrderIcon.validateNow(),a-=this._currentSortOrderIcon.get_width()+b);a<0&&(a=0);return a},
measureContentWidth:function(){var a=Mc.prototype.measureContentWidth.call(this);u.__implements(this._currentSortOrderIcon,oa)&&this._currentSortOrderIcon.validateNow();var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(a+=this._currentSortOrderIcon.get_width()+b);return a},measureContentMinWidth:function(){var a=Mc.prototype.measureContentMinWidth.call(this);u.__implements(this._currentSortOrderIcon,oa)&&this._currentSortOrderIcon.validateNow();var b=this.get_gap();
b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(a+=this._currentSortOrderIcon.get_width()+b);return a},layoutChildren:function(){var a=this;u.__implements(this._currentSortOrderIcon,oa)&&this._currentSortOrderIcon.validateNow();var b=this.get_paddingRight(),c=this.get_gap();c==1/0&&(c=this.get_minGap());this.runWithoutInvalidation(function(){var d=b;a._currentSortOrderIcon!=null&&(d+=a._currentSortOrderIcon.get_width()+c);a.set_paddingRight(d)});Mc.prototype.layoutChildren.call(this);
this.runWithoutInvalidation(function(){a.set_paddingRight(b)});if(this._currentSortOrderIcon!=null)switch(this._currentSortOrderIcon.set_x(this.actualWidth-this.get_paddingRight()-this._currentSortOrderIcon.get_width()),this.get_verticalAlign()._hx_index){case 0:this._currentSortOrderIcon.set_y(this.get_paddingTop());break;case 1:this._currentSortOrderIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+(this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentSortOrderIcon.get_height())/
2));break;case 2:this._currentSortOrderIcon.set_y(Math.max(this.get_paddingTop(),this.get_paddingTop()+this.actualHeight-this.get_paddingTop()-this.get_paddingBottom()-this._currentSortOrderIcon.get_height()));break;default:throw new rb("Unknown vertical align: "+L.string(this.get_verticalAlign()));}},refreshSortOrderIcon:function(){var a=this._currentSortOrderIcon;this._currentSortOrderIcon=this.getCurrentSortOrderIcon();this._currentSortOrderIcon!=a&&(this.removeCurrentSortOrderIcon(a),this._currentSortOrderIcon==
null?this._sortOrderIconMeasurements=null:(u.__implements(this._currentSortOrderIcon,jb)&&this._currentSortOrderIcon.initializeNow(),this._sortOrderIconMeasurements==null?this._sortOrderIconMeasurements=new Ib(this._currentSortOrderIcon):this._sortOrderIconMeasurements.save(this._currentSortOrderIcon),u.__implements(this._currentSortOrderIcon,wb)&&this._currentSortOrderIcon.set_uiContext(this),u.__implements(this._currentSortOrderIcon,Td)&&this._currentSortOrderIcon.set_stateContext(this),this.addChild(this._currentSortOrderIcon)))},
getCurrentSortOrderIcon:function(){switch(this._sortOrder._hx_index){case 0:return this.get_sortAscendingIcon();case 1:return this.get_sortDescendingIcon();default:return null}},removeCurrentSortOrderIcon:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._sortOrderIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},get_styleContext:function(){return Gk},__sortAscendingIcon:null,get_sortAscendingIcon:function(){return this.__sortAscendingIcon},
set_sortAscendingIcon:function(a){if(!this.setStyle("sortAscendingIcon")||this.__sortAscendingIcon==a)return this.__sortAscendingIcon;this._previousClearStyle=m(this,this.clearStyle_sortAscendingIcon);this.__sortAscendingIcon=a;this.setInvalid(x.STYLES);return this.__sortAscendingIcon},clearStyle_sortAscendingIcon:function(){this.set_sortAscendingIcon(null);return this.get_sortAscendingIcon()},__sortDescendingIcon:null,get_sortDescendingIcon:function(){return this.__sortDescendingIcon},set_sortDescendingIcon:function(a){if(!this.setStyle("sortDescendingIcon")||
this.__sortDescendingIcon==a)return this.__sortDescendingIcon;this._previousClearStyle=m(this,this.clearStyle_sortDescendingIcon);this.__sortDescendingIcon=a;this.setInvalid(x.STYLES);return this.__sortDescendingIcon},clearStyle_sortDescendingIcon:function(){this.set_sortDescendingIcon(null);return this.get_sortDescendingIcon()},__class__:Gk,__properties__:I(Mc.prototype.__properties__,{set_sortDescendingIcon:"set_sortDescendingIcon",get_sortDescendingIcon:"get_sortDescendingIcon",set_sortAscendingIcon:"set_sortAscendingIcon",
get_sortAscendingIcon:"get_sortAscendingIcon",set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder"})});var gm=function(a,b,c,d,f,g,h,l){g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=-1);c==null&&(c=-1);this.enabled=!0;this.branch=this.opened=this.selected=!1;this.columnIndex=this.layoutIndex=-1;this.rowLocation=null;this.data=a;this.rowLocation=b;this.columnIndex=c;this.layoutIndex=d;this.branch=f;this.opened=g;this.selected=!1;this.text=l};r["feathers.data.TreeGridViewCellState"]=gm;gm.__name__=
"feathers.data.TreeGridViewCellState";gm.prototype={owner:null,data:null,rowLocation:null,columnIndex:null,layoutIndex:null,branch:null,opened:null,column:null,selected:null,text:null,enabled:null,__class__:gm};var Mf=function(){this._customCellRendererVariant=null;this._forceCellStateUpdate=!1;this._data=this._columns=null;this._branch=this._opened=!1;this._layoutIndex=-1;this._rowLocation=null;this._selected=this._ignoreSelectionChange=this._ignoreOpenedChange=!1;this._currentState=Nb.UP(!1);this.cellStatePool=
new Tb(function(){return new gm});this._cellRendererToCellState=new Na;this._columnToCellRenderer=new Na;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new ar;sc.call(this)};r["feathers.controls.dataRenderers.TreeGridViewRowRenderer"]=Mf;Mf.__name__="feathers.controls.dataRenderers.TreeGridViewRowRenderer";Mf.__interfaces__=[mh,ph,md,Fh];Mf.defaultUpdateCellRenderer=function(a,b){u.__implements(a,de)&&a.set_text(b.text)};Mf.defaultResetCellRenderer=function(a,b){u.__implements(a,
de)&&a.set_text(null)};Mf.__super__=sc;Mf.prototype=I(sc.prototype,{_defaultStorage:null,_additionalStorage:null,_unrenderedData:null,_columnToCellRenderer:null,_cellRendererToCellState:null,cellStatePool:null,_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){sc.prototype.set_enabled.call(this,a);this._enabled?(a=this._currentState,a._hx_index==3&&this.changeState(Nb.UP(a.selected))):this.changeState(Nb.DISABLED(this._selected));return this._enabled},
_treeGridView:null,get_treeGridView:function(){return this._treeGridView},set_treeGridView:function(a){if(this._treeGridView==a)return this._treeGridView;this._treeGridView!=null&&this._treeGridView.removeEventListener("keyDown",m(this,this.treeGridViewRowRenderer_treeGridView_keyDownHandler));this._treeGridView=a;if(this._treeGridView!=null)this._treeGridView.addEventListener("keyDown",m(this,this.treeGridViewRowRenderer_treeGridView_keyDownHandler),!1,0,!0);else if(this.refreshInactiveCellRenderers(this._defaultStorage,
!0),this._additionalStorage!=null){a=0;for(var b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}}this.setInvalid(x.DATA);return this._treeGridView},_selected:null,get_selected:function(){return this._selected},set_selected:function(a){if(this._selected==a)return this._selected;this._selected=a;this.setInvalid(x.SELECTION);W.dispatch(this,"change");return this._selected},_ignoreSelectionChange:null,_ignoreOpenedChange:null,_rowLocation:null,
get_rowLocation:function(){return this._rowLocation},set_rowLocation:function(a){if(this._rowLocation==a)return this._rowLocation;this._rowLocation=a;this.setInvalid(x.DATA);return this._rowLocation},_layoutIndex:null,get_layoutIndex:function(){return this._layoutIndex},set_layoutIndex:function(a){if(this._layoutIndex==a)return this._layoutIndex;this._layoutIndex=a;this.setInvalid(x.DATA);return this._layoutIndex},_branch:null,get_branch:function(){return this._branch},set_branch:function(a){if(this._branch==
a)return this._branch;this._branch=a;this.setInvalid(x.DATA);return this._branch},_opened:null,get_opened:function(){return this._branch},set_opened:function(a){if(this._opened==a)return this._opened;this._opened=a;this.setInvalid(x.DATA);return this._opened},_data:null,get_data:function(){return this._data},set_data:function(a){if(this._data==a)return this._data;this._data=a;this.setInvalid(x.DATA);return this._data},_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==
a)return this._columns;this._columns!=null&&this._columns.removeEventListener("change",m(this,this.treeGridViewRowRenderer_columns_changeHandler));this._columns=a;this._columns!=null&&this._columns.addEventListener("change",m(this,this.treeGridViewRowRenderer_columns_changeHandler),!1,0,!0);this.setInvalid(x.DATA);return this._columns},get_cellRendererRecycler:function(){return this._defaultStorage.cellRendererRecycler},set_cellRendererRecycler:function(a){if(this._defaultStorage.cellRendererRecycler==
a)return this._defaultStorage.cellRendererRecycler;this._defaultStorage.oldCellRendererRecycler=this._defaultStorage.cellRendererRecycler;this._defaultStorage.cellRendererRecycler=a;this._defaultStorage.measurements=null;this.setInvalid(Mf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._defaultStorage.cellRendererRecycler},_forceCellStateUpdate:null,get_forceCellStateUpdate:function(){return this._forceCellStateUpdate},set_forceCellStateUpdate:function(a){if(this._forceCellStateUpdate==a)return this._forceCellStateUpdate;
this._forceCellStateUpdate=a;this.setInvalid(x.DATA);return this._forceCellStateUpdate},_customCellRendererVariant:null,get_customCellRendererVariant:function(){return this._customCellRendererVariant},set_customCellRendererVariant:function(a){if(this._customCellRendererVariant==a)return this._customCellRendererVariant;this._customCellRendererVariant=a;this.setInvalid(Mf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY);return this._customCellRendererVariant},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},
set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=a;this.setInvalid(x.DATA);return this._customColumnWidths},_rowLayout:null,_pointerToState:null,_keyToState:null,dispose:function(){this.refreshInactiveCellRenderers(this._defaultStorage,!0);if(this._additionalStorage!=null)for(var a=0,b=this._additionalStorage.length;a<b;){var c=a++;this.refreshInactiveCellRenderers(this._additionalStorage[c],!0)}sc.prototype.dispose.call(this)},
columnToCellRenderer:function(a){return a==null?null:this._columnToCellRenderer.h[a.__id__]},columnToCellState:function(a){if(a==null)return null;var b=this._columnToCellRenderer.h[a.__id__];if(b!=null)b=this._cellRendererToCellState.h[b.__id__];else{var c=this._columns.indexOf(a);if(c==-1)return null;b=new gm;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){sc.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new Yl(this,m(this,this.changeState),
Nb.UP(!1),Nb.DOWN(!1),Nb.HOVER(!1)),this._pointerToState.set_customHitTest(m(this,this.customHitTest)));this._keyToState==null&&(this._keyToState=new Wm(this,m(this,this.changeState),Nb.UP(!1),Nb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new pl,this.set_layout(this._rowLayout))},changeState:function(a){this._enabled||(a=Nb.DISABLED(this._selected));switch(a._hx_index){case 0:var b=a.selected;this._selected!=b&&(a=Nb.UP(this._selected));break;case 1:b=a.selected;this._selected!=b&&(a=Nb.HOVER(this._selected));
break;case 2:b=a.selected;this._selected!=b&&(a=Nb.DOWN(this._selected));break;case 3:b=a.selected,this._selected!=b&&(a=Nb.DISABLED(this._selected))}this._currentState!=a&&(this._currentState=a,this.setInvalid(x.STATE),W.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(this);sc.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&u.__implements(a,Td)&&a.set_stateContext(null);sc.prototype.removeCurrentBackgroundSkin.call(this,
a)},updateCells:function(){for(var a=0,b=this._columns.get_length();a<b;){var c=a++;this.updateCellRendererForColumnIndex(c)}},update:function(){this.preLayout();sc.prototype.update.call(this)},preLayout:function(){this._rowLayout.set_columns(this._columns);this._rowLayout.set_customColumnWidths(this._customColumnWidths);this._defaultStorage.cellRendererRecycler.update==null&&(this._defaultStorage.cellRendererRecycler.update=Mf.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=Mf.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=Mf.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=Mf.defaultResetCellRenderer))}this.refreshInactiveCellRenderers(this._defaultStorage,!1);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<
b;){var c=a++;c=this._additionalStorage[c];this.refreshInactiveCellRenderers(c,!1)}this.findUnrenderedData();this.recoverInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],this.recoverInactiveCellRenderers(c);this.renderUnrenderedData();this.freeInactiveCellRenderers(this._defaultStorage);if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)c=a++,c=this._additionalStorage[c],
this.freeInactiveCellRenderers(c);if(this._defaultStorage.inactiveCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive cell renderers should be empty after updating.");if(this._additionalStorage!=null)for(a=0,b=this._additionalStorage.length;a<b;)if(c=a++,c=this._additionalStorage[c],c.inactiveCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": inactive cell renderers should be empty after updating.");},refreshInactiveCellRenderers:function(a,b){var c=
a.inactiveCellRenderers;a.inactiveCellRenderers=a.activeCellRenderers;a.activeCellRenderers=c;if(a.activeCellRenderers.length>0)throw a=u.getClass(this),new fb(""+a.__name__+": active cell renderers should be empty before updating.");b&&(this.recoverInactiveCellRenderers(a),this.freeInactiveCellRenderers(a),a.oldCellRendererRecycler=null)},findUnrenderedData:function(){for(var a=0,b=0,c=this._columns.get_length();b<c;){var d=b++,f=this._columns.get(d),g=this._columnToCellRenderer.h[f.__id__];if(g!=
null){var h=this.cellRendererRecyclerToStorage(f.cellRendererRecycler),l=this._cellRendererToCellState.h[g.__id__];this.populateCurrentItemState(f,d,l,this._forceCellStateUpdate)&&this.updateCellRenderer(g,l,h);this.setChildIndex(g,a);if(!X.remove(h.inactiveCellRenderers,g))throw a=u.getClass(this),new fb(""+a.__name__+": cell renderer map contains bad data for item at row location "+L.string(this._rowLocation)+" and column index "+d+". This may be caused by duplicate items in the data provider, which is not allowed.");
h.activeCellRenderers.push(g);++a}else this._unrenderedData.push(d)}},cellRendererRecyclerToStorage:function(a){if(a==null)return this._defaultStorage;this._additionalStorage==null&&(this._additionalStorage=[]);for(var b=0,c=this._additionalStorage.length;b<c;){var d=b++;d=this._additionalStorage[d];if(d.cellRendererRecycler==a)return d}d=new ar(a);this._additionalStorage.push(d);return d},recoverInactiveCellRenderers:function(a){for(var b=0,c=a.inactiveCellRenderers;b<c.length;){var d=c[b];++b;if(d!=
null){var f=this._cellRendererToCellState.h[d.__id__];if(f!=null){var g=f.column;this._cellRendererToCellState.remove(d);this._columnToCellRenderer.remove(g);d.removeEventListener("click",m(this,this.treeGridViewRowRenderer_cellRenderer_clickHandler));d.removeEventListener("touchTap",m(this,this.treeGridViewRowRenderer_cellRenderer_touchTapHandler));d.removeEventListener("trigger",m(this,this.treeGridViewRowRenderer_cellRenderer_triggerHandler));d.removeEventListener("change",m(this,this.treeGridViewRowRenderer_cellRenderer_changeHandler));
d.removeEventListener("resize",m(this,this.treeGridViewRowRenderer_cellRenderer_resizeHandler));d.removeEventListener("open",m(this,this.treeGridViewRowRenderer_cellRenderer_openHandler));d.removeEventListener("close",m(this,this.treeGridViewRowRenderer_cellRenderer_closeHandler));this.resetCellRenderer(d,f,a);a.measurements!=null&&a.measurements.restore(d);this.cellStatePool.release(f)}}}},renderUnrenderedData:function(){for(var a=0,b=this._unrenderedData;a<b.length;){var c=b[a];++a;var d=this._columns.get(c),
f=this.cellStatePool.get();this.populateCurrentItemState(d,c,f,!0);d=this.createCellRenderer(f);this.addChildAt(d,c)}this._unrenderedData.length=0},freeInactiveCellRenderers:function(a){for(var b=a.oldCellRendererRecycler!=null?a.oldCellRendererRecycler:a.cellRendererRecycler,c=0,d=a.inactiveCellRenderers;c<d.length;){var f=d[c];++c;f!=null&&this.destroyCellRenderer(f,b)}a.inactiveCellRenderers.length=0},createCellRenderer:function(a){var b=a.column,c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);
if(c.inactiveCellRenderers.length==0){var d=c.cellRendererRecycler.create();if(u.__implements(d,If)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():vc.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}u.__implements(d,jb)&&d.initializeNow();c.measurements==null&&(c.measurements=new Ib(d))}else d=c.inactiveCellRenderers.shift();c=this.cellRendererRecyclerToStorage(b.cellRendererRecycler);this.updateCellRenderer(d,a,c);u.__implements(d,
Fh)?d.addEventListener("trigger",m(this,this.treeGridViewRowRenderer_cellRenderer_triggerHandler)):(d.addEventListener("click",m(this,this.treeGridViewRowRenderer_cellRenderer_clickHandler)),d.addEventListener("touchTap",m(this,this.treeGridViewRowRenderer_cellRenderer_touchTapHandler)));u.__implements(d,md)&&d.addEventListener("change",m(this,this.treeGridViewRowRenderer_cellRenderer_changeHandler));u.__implements(d,Kb)&&d.addEventListener("resize",m(this,this.treeGridViewRowRenderer_cellRenderer_resizeHandler));
u.__implements(d,mi)&&(d.addEventListener("open",m(this,this.treeGridViewRowRenderer_cellRenderer_openHandler)),d.addEventListener("close",m(this,this.treeGridViewRowRenderer_cellRenderer_closeHandler)));this._cellRendererToCellState.set(d,a);this._columnToCellRenderer.set(b,d);c.activeCellRenderers.push(d);return d},destroyCellRenderer:function(a,b){this.removeChild(a);b!=null&&b.destroy!=null&&b.destroy(a)},updateCellRendererForColumnIndex:function(a){var b=this._columns.get(a),c=this._columnToCellRenderer.h[b.__id__];
if(c==null)this.setInvalid(x.DATA);else{var d=this.cellRendererRecyclerToStorage(b.cellRendererRecycler),f=this._cellRendererToCellState.h[c.__id__];f.owner!=null&&(this.populateCurrentItemState(b,a,f,!0),this.resetCellRenderer(c,f,d),f.owner=null,this.setInvalid(x.DATA))}},populateCurrentItemState:function(a,b,c,d){var f=!1;if(d||c.owner!=this._treeGridView)c.owner=this._treeGridView,f=!0;if(d||c.data!=this._data)c.data=this._data,f=!0;if(d||c.rowLocation!=this._rowLocation&&this.compareLocations(c.rowLocation,
this._rowLocation)!=0)c.rowLocation=this._rowLocation,f=!0;if(d||c.columnIndex!=b)c.columnIndex=b,f=!0;if(d||c.column!=a)c.column=a,f=!0;if(d||c.layoutIndex!=this._layoutIndex)c.layoutIndex=this._layoutIndex,f=!0;if(d||c.branch!=this._branch)c.branch=this._branch,f=!0;if(d||c.opened!=this._opened)c.opened=this._opened,f=!0;if(d||c.selected!=this._selected)c.selected=this._selected,f=!0;if(d||c.enabled!=this._enabled)c.enabled=this._enabled,f=!0;a=this._rowLocation!=null?a.itemToText(this._data):null;
if(d||c.text!=a)c.text=a,f=!0;return f},updateCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;c.cellRendererRecycler.update!=null&&c.cellRendererRecycler.update(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,b)},resetCellRenderer:function(a,b,c){var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var f=this._ignoreOpenedChange;this._ignoreOpenedChange=
!0;c=c.oldCellRendererRecycler!=null?c.oldCellRendererRecycler:c.cellRendererRecycler;c!=null&&c.reset!=null&&c.reset(a,b);this._ignoreOpenedChange=f;this._ignoreSelectionChange=d;this.refreshCellRendererProperties(a,Mf.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;u.__implements(a,jb)&&a.set_enabled(b.enabled);u.__implements(a,ph)&&a.set_data(b.data);u.__implements(a,
md)&&a.set_selected(b.selected);u.__implements(a,Hk)&&a.set_branch(b.branch);u.__implements(a,hn)&&a.set_showHierarchy(b.columnIndex==0);u.__implements(a,hm)&&a.set_hierarchyDepth(b.rowLocation!=null?b.rowLocation.length-1:0);u.__implements(a,Qo)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowLocation(b.rowLocation),a.set_treeGridViewOwner(b.owner));u.__implements(a,ji)&&a.set_layoutIndex(b.layoutIndex);u.__implements(a,mi)&&a.set_opened(b.opened);u.__implements(a,im)&&a.set_pointerTarget(b.rowLocation==
null?null:this);this._ignoreOpenedChange=d;this._ignoreSelectionChange=c},compareLocations:function(a,b){var c=a==null,d=b==null;if(c&&d)return 0;if(c)return 1;if(d)return-1;c=a.length;d=b.length;var f=c;d<f&&(f=d);for(var g=0;g<f;){var h=g++,l=a[h];h=b[h];if(l<h)return-1;if(l>h)return 1}return c<d?-1:c>d?1:0},customHitTest:function(a,b){if(this.stage==null)return!1;if(this.mouseChildren&&(a=this.stage.getObjectsUnderPoint(new Qa(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=null&&
a!=this;){if((!(a instanceof Da)||a.mouseEnabled)&&u.__implements(a,ld)&&(b=a,b.parent!=this&&b.get_focusEnabled()))return!1;a=a.parent}return!0},treeGridViewRowRenderer_cellRenderer_touchTapHandler:function(a){if(this._enabled&&!a.isPrimaryTouchPoint&&this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);Je.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);$e.dispatchFromTouchEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);Je.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);$e.dispatchFromMouseEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=u.__cast(a.currentTarget,ea);Je.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},treeGridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(x.LAYOUT)},treeGridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=u.__cast(a.currentTarget,ea);a=u.__cast(b,md);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(x.SELECTION)}},treeGridViewRowRenderer_cellRenderer_openHandler:function(a){this._ignoreOpenedChange||this.dispatchEvent(a.clone())},treeGridViewRowRenderer_cellRenderer_closeHandler:function(a){this._ignoreOpenedChange||this.dispatchEvent(a.clone())},
treeGridViewRowRenderer_treeGridView_keyDownHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()){if(this._selected&&a.keyCode==37){if(this._branch&&this._opened){this.get_treeGridView().toggleBranch(this._data,!1);return}var b=this._rowLocation.slice();b.pop();b.length>0&&this.get_treeGridView().set_selectedLocation(b)}if(this._selected&&a.keyCode==39&&this._branch){if(!this._opened){this.get_treeGridView().toggleBranch(this._data,!0);return}this.get_treeGridView().get_dataProvider().getLength(this._rowLocation)>
0&&(b=this._rowLocation.slice(),b.push(0),this.get_treeGridView().set_selectedLocation(b))}if(this._selected&&a.keyCode==13){b=this._columns.get(0);var c=this.columnToCellRenderer(b),d=null;c!=null&&(d=this._cellRendererToCellState.h[c.__id__]);c=!1;d==null&&(c=!0,d=this.cellStatePool.get());this.populateCurrentItemState(b,0,d,!0);Je.dispatchForCell(this,"cellTrigger",d);c&&this.cellStatePool.release(d)}this._selected&&a.keyCode==32&&this._branch&&(a.preventDefault(),this.get_treeGridView().toggleBranch(this._data,
!this._opened))}},treeGridViewRowRenderer_columns_changeHandler:function(a){this.setInvalid(x.DATA)},get_styleContext:function(){return Mf},__class__:Mf,__properties__:I(sc.prototype.__properties__,{set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_customCellRendererVariant:"set_customCellRendererVariant",get_customCellRendererVariant:"get_customCellRendererVariant",set_forceCellStateUpdate:"set_forceCellStateUpdate",get_forceCellStateUpdate:"get_forceCellStateUpdate",
set_cellRendererRecycler:"set_cellRendererRecycler",get_cellRendererRecycler:"get_cellRendererRecycler",set_columns:"set_columns",get_columns:"get_columns",set_data:"set_data",get_data:"get_data",set_opened:"set_opened",get_opened:"get_opened",set_branch:"set_branch",get_branch:"get_branch",set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex",set_rowLocation:"set_rowLocation",get_rowLocation:"get_rowLocation",set_selected:"set_selected",get_selected:"get_selected",set_treeGridView:"set_treeGridView",
get_treeGridView:"get_treeGridView",get_currentState:"get_currentState"})});var ar=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};r["feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage"]=ar;ar.__name__="feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage";ar.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:ar};
var Dd=function(){this.chromeMeasuredMaxHeight=1/0;this.chromeMeasuredHeight=this.chromeMeasuredMinHeight=0;this.chromeMeasuredMaxWidth=1/0;this.topContentOffset=this.rightContentOffset=this.bottomContentOffset=this.leftContentOffset=this.chromeMeasuredWidth=this.chromeMeasuredMinWidth=0;this._autoSizeMode=Fe.STAGE;this._waitingForTransitionFrameCount=0;this._clearAfterTransition=this._waitingForDelayedTransition=!1;this._nextViewInTransitionMeasurements=new Ib;this._previousViewInTransitionMeasurements=
new Ib;this._addedItems=new aa;this._addedItemIDs=[];this._activeViewMeasurements=new Ib;this._childFocusEnabled=!0;wa.call(this);this._viewsContainer=this;this.addEventListener("addedToStage",m(this,this.baseNavigator_addedToStageHandler))};r["feathers.controls.navigators.BaseNavigator"]=Dd;Dd.__name__="feathers.controls.navigators.BaseNavigator";Dd.__interfaces__=[dg];Dd.defaultTransition=function(a,b){return new Ro(a)};Dd.__super__=wa;Dd.prototype=I(wa.prototype,{_activeItemID:null,get_activeItemID:function(){return this._activeItemID},
_activeItemView:null,get_activeItemView:function(){return this._activeItemView},_transitionActive:null,get_transitionActive:function(){return this._transitionActive},get_tabEnabled:function(){return!1},_childFocusEnabled:null,get_childFocusEnabled:function(){return this._enabled&&!this._transitionActive?this._childFocusEnabled:!1},set_childFocusEnabled:function(a){return this._childFocusEnabled==a?this._childFocusEnabled:this._childFocusEnabled=a},_viewsContainer:null,_activeViewMeasurements:null,
_addedItemIDs:null,_addedItems:null,_previousViewInTransition:null,_previousViewInTransitionID:null,_previousViewInTransitionMeasurements:null,_nextViewInTransition:null,_nextViewInTransitionID:null,_nextViewInTransitionMeasurements:null,_pendingItemID:null,_pendingItemTransition:null,_clearAfterTransition:null,_delayedTransition:null,_waitingForDelayedTransition:null,_waitingTransition:null,_waitingForTransitionFrameCount:null,_activeTransition:null,_autoSizeMode:null,get_autoSizeMode:function(){return this._autoSizeMode},
set_autoSizeMode:function(a){if(this._autoSizeMode==a)return this._autoSizeMode;this._autoSizeMode=a;this.setInvalid(x.SIZE);this._activeItemView!=null&&(this._autoSizeMode==Fe.STAGE?this._activeItemView.removeEventListener("resize",m(this,this.activeItemView_resizeHandler)):this._activeItemView.addEventListener("resize",m(this,this.activeItemView_resizeHandler)));this.stage!=null&&(this._autoSizeMode==Fe.STAGE?(this.stage.addEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),
this.addEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler))):(this.stage.removeEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),this.removeEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler))));return this._autoSizeMode},topContentOffset:null,rightContentOffset:null,bottomContentOffset:null,leftContentOffset:null,chromeMeasuredWidth:null,chromeMeasuredMinWidth:null,chromeMeasuredMaxWidth:null,chromeMeasuredHeight:null,
chromeMeasuredMinHeight:null,chromeMeasuredMaxHeight:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());this._activeItemView=this._activeItemID=null;this.removeAllItems();wa.prototype.dispose.call(this)},
removeAllItems:function(){this._activeTransition!=null&&(this._clearAfterTransition=!1,this._pendingItemTransition=this._pendingItemID=null,this._activeTransition.toEnd());this._activeItemView!=null&&(this.clearActiveItemInternal(null),W.dispatch(this,"clear"));this._addedItems.h=Object.create(null);this._addedItemIDs.length=0},hasItem:function(a){return Object.prototype.hasOwnProperty.call(this._addedItems.h,a)},getItemIDs:function(a){a==null&&(a=[]);for(var b=Object.keys(this._addedItems.h),c=b.length,
d=0;d<c;){var f=b[d++];a.push(f)}return a},update:function(){this.isInvalid(x.SIZE);this.chromeMeasuredMinWidth=this.chromeMeasuredWidth=this.leftContentOffset=this.bottomContentOffset=this.rightContentOffset=this.topContentOffset=0;this.chromeMeasuredMaxWidth=1/0;this.chromeMeasuredMinHeight=this.chromeMeasuredHeight=0;this.chromeMeasuredMaxHeight=1/0;this.measure();this.layoutContent()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==
null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=this._autoSizeMode==Fe.CONTENT||this.stage==null,l=0,k=0;if(!h){k=this.globalToLocal(new Qa);var q=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight));l=q.x-k.x;k=q.y-k.y}q=null;u.__implements(this._activeItemView,Kb)&&(q=this._activeItemView);var w=null,v=null;this._transitionActive&&(u.__implements(this._previousViewInTransition,
Kb)&&(w=this._previousViewInTransition),u.__implements(this._nextViewInTransition,Kb)&&(v=this._nextViewInTransition));if(this._transitionActive){h&&(this._previousViewInTransition!=null&&this._previousViewInTransitionMeasurements.restore(this._previousViewInTransition),this._nextViewInTransition!=null&&this._nextViewInTransitionMeasurements.restore(this._nextViewInTransition));if(a)h||(z=l-this.leftContentOffset-this.rightContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_width()!=
z&&this._previousViewInTransition.set_width(z),this._nextViewInTransition!=null&&this._nextViewInTransition.get_width()!=z&&this._nextViewInTransition.set_width(z));else{var z=this.get_explicitWidth()-this.leftContentOffset-this.rightContentOffset;this._previousViewInTransition!=null&&this._previousViewInTransition.get_width()!=z&&this._previousViewInTransition.set_width(z);this._nextViewInTransition!=null&&this._nextViewInTransition.get_width()!=z&&this._nextViewInTransition.set_width(z)}b?h||(z=
k-this.topContentOffset-this.leftContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_height()!=z&&this._previousViewInTransition.set_height(z),this._nextViewInTransition!=null&&this._nextViewInTransition.get_height()!=z&&this._nextViewInTransition.set_height(z)):(z=this.get_explicitHeight()-this.topContentOffset-this.leftContentOffset,this._previousViewInTransition!=null&&this._previousViewInTransition.get_height()!=z&&this._previousViewInTransition.set_height(z),
this._nextViewInTransition!=null&&this._nextViewInTransition.get_height()!=z&&this._nextViewInTransition.set_height(z))}else this._activeItemView!=null&&(h&&this._activeViewMeasurements.restore(this._activeItemView),a?h||(z=l-this.leftContentOffset-this.rightContentOffset,this._activeItemView.get_width()!=z&&this._activeItemView.set_width(z)):(z=this.get_explicitWidth()-this.leftContentOffset-this.rightContentOffset,this._activeItemView.get_width()!=z&&this._activeItemView.set_width(z)),b?h||(z=k-
this.topContentOffset-this.leftContentOffset,this._activeItemView.get_height()!=z&&this._activeItemView.set_height(z)):(z=this.get_explicitHeight()-this.topContentOffset-this.leftContentOffset,this._activeItemView.get_height()!=z&&this._activeItemView.set_height(z)));this._transitionActive?(u.__implements(this._previousViewInTransition,oa)&&this._previousViewInTransition.validateNow(),u.__implements(this._nextViewInTransition,oa)&&this._nextViewInTransition.validateNow()):u.__implements(this._activeItemView,
oa)&&this._activeItemView.validateNow();z=this.get_explicitWidth();a&&(h?(z=0,this._transitionActive?(this._previousViewInTransition!=null&&z<this._previousViewInTransition.get_width()&&(z=this._previousViewInTransition.get_width()),this._nextViewInTransition!=null&&z<this._nextViewInTransition.get_width()&&(z=this._nextViewInTransition.get_width())):this._activeItemView!=null&&(z=this._activeItemView.get_width()),z<this.chromeMeasuredWidth&&(z=this.chromeMeasuredWidth),z+=this.rightContentOffset+
this.leftContentOffset):z=l);a=this.get_explicitHeight();b&&(h?(a=0,this._transitionActive?(this._previousViewInTransition!=null&&a<this._previousViewInTransition.get_height()&&(a=this._previousViewInTransition.get_height()),this._nextViewInTransition!=null&&a<this._nextViewInTransition.get_height()&&(a=this._nextViewInTransition.get_height())):this._activeItemView!=null&&(a=this._activeItemView.get_height()),a<this.chromeMeasuredHeight&&(a=this.chromeMeasuredHeight),a+=this.topContentOffset+this.bottomContentOffset):
a=k);b=this.get_explicitMinWidth();c&&(h?(b=0,this._transitionActive?(w!=null&&b<w.get_minWidth()?b=w.get_minWidth():this._previousViewInTransition!=null&&b<this._previousViewInTransition.get_width()&&(b=this._previousViewInTransition.get_width()),v!=null&&b<v.get_minWidth()?b=v.get_minWidth():this._nextViewInTransition!=null&&b<this._nextViewInTransition.get_width()&&(b=this._nextViewInTransition.get_width())):q!=null?b=q.get_minWidth():this._activeItemView!=null&&(b=this._activeItemView.get_width()),
b<this.chromeMeasuredMinWidth&&(b=this.chromeMeasuredMinWidth),b+=this.rightContentOffset+this.leftContentOffset):b=l);c=this.get_explicitMinHeight();d&&(h?(c=0,this._transitionActive?(w!=null&&c<w.get_minHeight()?c=w.get_minHeight():this._previousViewInTransition!=null&&c<this._previousViewInTransition.get_height()&&(c=this._previousViewInTransition.get_height()),v!=null&&c<v.get_minHeight()?c=v.get_minHeight():this._nextViewInTransition!=null&&c<this._nextViewInTransition.get_height()&&(c=this._nextViewInTransition.get_height())):
q!=null?c=q.get_minHeight():this._activeItemView!=null&&(c=this._activeItemView.get_height()),c<this.chromeMeasuredMinHeight&&(c=this.chromeMeasuredMinHeight),c+=this.topContentOffset+this.bottomContentOffset):c=k);d=this.get_explicitMaxWidth();f&&(h?(d=1/0,this._transitionActive?(w!=null&&d<w.get_maxWidth()?d=w.get_maxWidth():this._previousViewInTransition!=null&&d<this._previousViewInTransition.get_width()&&(d=this._previousViewInTransition.get_width()),v!=null&&d<v.get_maxWidth()?d=v.get_maxWidth():
this._nextViewInTransition!=null&&d<this._nextViewInTransition.get_width()&&(d=this._nextViewInTransition.get_width())):q!=null?d=q.get_maxWidth():this._activeItemView!=null&&(d=this._activeItemView.get_width()),d>this.chromeMeasuredMaxWidth&&(d=this.chromeMeasuredMaxWidth),d+=this.rightContentOffset+this.leftContentOffset):d=l);f=this.get_explicitMaxHeight();g&&(h?(f=1/0,this._transitionActive?(w!=null&&f>w.get_maxHeight()?f=w.get_maxHeight():this._previousViewInTransition!=null&&f>this._previousViewInTransition.get_height()&&
(f=this._previousViewInTransition.get_height()),v!=null&&f>v.get_maxHeight()?f=v.get_maxHeight():this._nextViewInTransition!=null&&f>this._nextViewInTransition.get_height()&&(f=this._nextViewInTransition.get_height())):q!=null?f=q.get_maxHeight():this._activeItemView!=null&&(f=this._activeItemView.get_height()),f>this.chromeMeasuredMaxHeight&&(f=this.chromeMeasuredMaxHeight),f+=this.topContentOffset+this.bottomContentOffset):f=k);return this.saveMeasurements(z,a,b,c,d,f)},layoutContent:function(){var a=
this.actualWidth-this.leftContentOffset-this.rightContentOffset,b=this.actualHeight-this.topContentOffset-this.bottomContentOffset;this._viewsContainer!=null&&this._viewsContainer!=this&&(this._viewsContainer.set_x(this.leftContentOffset),this._viewsContainer.set_y(this.topContentOffset),this._viewsContainer.set_width(a),this._viewsContainer.set_height(b));this._activeItemView!=null&&(this._viewsContainer!=null&&this._viewsContainer!=this?(this._activeItemView.set_x(0),this._activeItemView.set_y(0)):
(this._activeItemView.set_x(this.leftContentOffset),this._activeItemView.set_y(this.topContentOffset)),this._activeItemView.get_width()!=a&&this._activeItemView.set_width(a),this._activeItemView.get_height()!=b&&this._activeItemView.set_height(b),u.__implements(this._activeItemView,oa)&&this._activeItemView.validateNow());this._nextViewInTransition!=null&&(this._viewsContainer!=null&&this._viewsContainer!=this?(this._nextViewInTransition.set_x(0),this._nextViewInTransition.set_y(0)):(this._nextViewInTransition.set_x(this.leftContentOffset),
this._nextViewInTransition.set_y(this.topContentOffset)),this._nextViewInTransition.get_width()!=a&&this._nextViewInTransition.set_width(a),this._nextViewInTransition.get_height()!=b&&this._nextViewInTransition.set_height(b),u.__implements(this._nextViewInTransition,oa)&&this._nextViewInTransition.validateNow());this._viewsContainer!=this&&u.__implements(this._viewsContainer,oa)&&this._viewsContainer.validateNow()},getView:function(a){throw new fb("Missing override of BaseNavigator.getView()");},
disposeView:function(a,b){throw new fb("Missing override of BaseNavigator.disposeView()");},transitionComplete:function(){},transitionCancel:function(){},addItemInternal:function(a,b){if(Object.prototype.hasOwnProperty.call(this._addedItems.h,a))throw new rb("Item with id '"+a+"' already defined. Cannot add two items with the same id.");this._addedItems.h[a]=b;this._addedItemIDs.push(a)},removeItemInternal:function(a){if(!Object.prototype.hasOwnProperty.call(this._addedItems.h,a))throw new rb("Item with id '"+
a+"' cannot be removed because this id has not been added.");if(this._transitionActive&&(a==this._previousViewInTransitionID||a==this._activeItemID))throw new fb("Cannot remove an item while it is transitioning in or out.");a==this._activeItemID&&(this.clearActiveItemInternal(null),W.dispatch(this,"clear"));var b=this._addedItems.h[a],c=this._addedItems;Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a];X.remove(this._addedItemIDs,a);return b},clearFocusFromPreviousView:function(){if(this._previousViewInTransition!=
null){if(this._focusManager!=null){if(this._focusManager.get_focus()==null)return;u.__implements(this._previousViewInTransition,ld)&&this._focusManager.get_focus()==this._previousViewInTransition?this._focusManager.set_focus(null):this._previousViewInTransition instanceof lb&&this._previousViewInTransition.contains(u.__cast(this._focusManager.get_focus(),ea))&&this._focusManager.set_focus(null)}this.stage.get_focus()!=null&&(this.stage.get_focus()==this._previousViewInTransition||this._previousViewInTransition instanceof
lb&&this._previousViewInTransition.contains(this.stage.get_focus()))&&this.stage.set_focus(this.stage)}},showItemInternal:function(a,b){if(!this.hasItem(a))throw new rb("Item with id '"+a+"' cannot be displayed because this id has not been added.");if(this._transitionActive)return this._pendingItemID=a,this._pendingItemTransition=b,this._clearAfterTransition=!1,null;this._previousViewInTransition=this._activeItemView;this._previousViewInTransitionID=this._activeItemID;var c=this._previousViewInTransitionMeasurements;
this._previousViewInTransitionMeasurements=this._activeViewMeasurements;this._activeViewMeasurements=c;this.clearFocusFromPreviousView();this._transitionActive=!0;this._nextViewInTransition=this.getView(a);this._nextViewInTransitionMeasurements.save(this._nextViewInTransition);if(this._nextViewInTransition==null)throw new fb("Failed to display navigator item with id '"+a+"'. Call to getView() incorrectly returned null.");this._nextViewInTransitionID=a;this._autoSizeMode!=Fe.CONTENT&&this.stage!=null||
this._nextViewInTransition.addEventListener("resize",m(this,this.activeItemView_resizeHandler));a=this._previousViewInTransition==this._nextViewInTransition;this._viewsContainer.addChild(this._nextViewInTransition);u.__implements(this._nextViewInTransition,jb)&&this._nextViewInTransition.initializeNow();this.setInvalid(x.SELECTION);this._validationQueue!=null&&this._validationQueue.get_validating()?this._validationQueue.validateNow():this._validating||this.validateNow();a?(this._activeItemView=this._nextViewInTransition,
this._activeItemID=this._nextViewInTransitionID,c=this._activeViewMeasurements,this._activeViewMeasurements=this._nextViewInTransitionMeasurements,this._nextViewInTransitionMeasurements=c,this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=null,this._transitionActive=!1,this._activeTransition=null,W.dispatch(this,"change")):this.startTransition(b);return this._activeItemView},clearActiveItemInternal:function(a){if(this._activeItemView!=
null)if(this._transitionActive)this._pendingItemID=null,this._pendingItemTransition=a,this._clearAfterTransition=!0;else{this.clearFocusFromPreviousView();this._transitionActive=!0;this._previousViewInTransition=this._activeItemView;this._previousViewInTransitionID=this._activeItemID;var b=this._previousViewInTransitionMeasurements;this._previousViewInTransitionMeasurements=this._activeViewMeasurements;this._activeViewMeasurements=b;this._nextViewInTransitionID=this._nextViewInTransition=null;this.setInvalid(x.SELECTION);
this.startTransition(a)}},startTransition:function(a){Lh.dispatch(this,"transitionStart",this._previousViewInTransitionID,this._previousViewInTransition,this._nextViewInTransitionID,this._nextViewInTransition);a!=null&&a!=Dd.defaultTransition?(this._nextViewInTransition!=null&&this._nextViewInTransition.set_visible(!1),this._waitingForTransitionFrameCount=0,this._waitingTransition=a,this.addEventListener("enterFrame",m(this,this.baseNavigator_transitionWait_enterFrameHandler))):(this._nextViewInTransition!=
null&&this._nextViewInTransition.set_visible(!0),this._activeTransition=Dd.defaultTransition(this._previousViewInTransition,this._nextViewInTransition),this._activeTransition.addEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.addEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.play())},startWaitingTransition:function(){this.removeEventListener("enterFrame",m(this,this.baseNavigator_transitionWait_enterFrameHandler));this._nextViewInTransition!=
null&&this._nextViewInTransition.set_visible(!0);var a=this._waitingTransition;this._waitingTransition=null;this._activeTransition=a(this._previousViewInTransition,this._nextViewInTransition);this._activeTransition.addEventListener("complete",m(this,this.transition_completeHandler));this._activeTransition.addEventListener("cancel",m(this,this.transition_cancelHandler));this._activeTransition.play()},baseNavigator_addedToStageHandler:function(a){this._autoSizeMode==Fe.STAGE&&(this.setInvalid(x.SIZE),
this.stage.addEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler)),this.addEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler)))},baseNavigator_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.baseNavigator_removedFromStageHandler));this.stage.removeEventListener("resize",m(this,this.baseNavigator_stage_resizeHandler))},baseNavigator_transitionWait_enterFrameHandler:function(a){this._waitingForTransitionFrameCount<
2?this._waitingForTransitionFrameCount++:this.startWaitingTransition()},baseNavigator_stage_resizeHandler:function(a){this.setInvalid(x.SIZE)},activeItemView_resizeHandler:function(a){this._validating||this._autoSizeMode!=Fe.CONTENT||this.setInvalid(x.SIZE)},transition_completeHandler:function(a){this._activeTransition=null;this._transitionActive=this._clearAfterTransition||this._pendingItemID!=null;this.transitionComplete();this._previousViewInTransition!=null&&(this._previousViewInTransition.removeEventListener("resize",
m(this,this.activeItemView_resizeHandler)),this._viewsContainer.removeChild(this._previousViewInTransition),this._previousViewInTransitionMeasurements.restore(this._previousViewInTransition),this.disposeView(this._previousViewInTransitionID,this._previousViewInTransition));a=this._nextViewInTransition;var b=this._nextViewInTransitionID,c=this._previousViewInTransition,d=this._previousViewInTransitionID;this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=
null;this._activeItemView=a;this._activeItemID=b;var f=this._activeViewMeasurements;this._activeViewMeasurements=this._nextViewInTransitionMeasurements;this._nextViewInTransitionMeasurements=f;Lh.dispatch(this,"transitionComplete",d,c,b,a);W.dispatch(this,"change");this.setInvalid(x.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||a instanceof Da&&this.stage.set_focus(u.__cast(a,Da));this._transitionActive=!1;a=this._pendingItemTransition;this._pendingItemTransition=
null;this._clearAfterTransition?(this._clearAfterTransition=!1,this.clearActiveItemInternal(a)):this._pendingItemID!=null&&(b=this._pendingItemID,this._pendingItemID=null,this.showItemInternal(b,a))},transition_cancelHandler:function(a){this._activeTransition=null;this._transitionActive=this._clearAfterTransition||this._pendingItemID!=null;this._nextViewInTransition!=null&&(this._viewsContainer.removeChild(this._nextViewInTransition),this._nextViewInTransitionMeasurements.restore(this._nextViewInTransition),
this.disposeView(this._nextViewInTransitionID,this._nextViewInTransition));a=this._nextViewInTransition;var b=this._nextViewInTransitionID,c=this._previousViewInTransition,d=this._previousViewInTransitionID;this._nextViewInTransitionID=this._nextViewInTransition=this._previousViewInTransitionID=this._previousViewInTransition=null;this._activeItemView=c;this._activeItemID=d;var f=this._activeViewMeasurements;this._activeViewMeasurements=this._previousViewInTransitionMeasurements;this._previousViewInTransitionMeasurements=
f;this.transitionCancel();Lh.dispatch(this,"transitionCancel",d,c,b,a);W.dispatch(this,"change");this.setInvalid(x.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||this._activeItemView instanceof Da&&this.stage.set_focus(u.__cast(this._activeItemView,Da));this._transitionActive=!1;a=this._pendingItemTransition;this._pendingItemTransition=null;this._clearAfterTransition?(this._clearAfterTransition=!1,this.clearActiveItemInternal(a)):this._pendingItemID!=null&&
(b=this._pendingItemID,this._pendingItemID=null,this.showItemInternal(b,a))},__class__:Dd,__properties__:I(wa.prototype.__properties__,{set_autoSizeMode:"set_autoSizeMode",get_autoSizeMode:"get_autoSizeMode",set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled",get_transitionActive:"get_transitionActive",get_activeItemView:"get_activeItemView",get_activeItemID:"get_activeItemID"})});var og=function(){this.internalID=L.string(og.internalIDCounter);og.internalIDCounter++};
r["feathers.controls.navigators.PageItem"]=og;og.__name__="feathers.controls.navigators.PageItem";og.withClass=function(a){var b=new og;b.viewFactory=jm.fromClass(a);return b};og.withFunction=function(a){var b=new og;b.viewFactory=jm.fromFunction(a);return b};og.withDisplayObject=function(a){var b=new og;b.viewFactory=jm.fromDisplayObject(a);return b};og.withFactory=function(a){var b=new og;b.viewFactory=a;return b};og.prototype={internalID:null,viewFactory:null,getView:function(a){return this.viewFactory.create()},
returnView:function(a){this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},__class__:og};var sh=function(a){this.__customPageIndicatorVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__pageIndicatorPosition=ja.BOTTOM;this._ignoreSelectionChange=!1;this._previousCustomPageIndicatorVariant=null;this._simulateTouch=!1;this._swipeEnabled=!0;this._selectedItem=null;this._activeItemIndex=this._selectedIndex=-1;this.initializePageNavigatorTheme();this.set_dataProvider(a);
Dd.call(this);this._viewsContainer=new sc;this.addChild(this._viewsContainer)};r["feathers.controls.navigators.PageNavigator"]=sh;sh.__name__="feathers.controls.navigators.PageNavigator";sh.__interfaces__=[ii,Vi];sh.__super__=Dd;sh.prototype=I(Dd.prototype,{pageIndicator:null,_previousEdgePuller:null,_nextEdgePuller:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;if(this._dataProvider!=null)if(this._dataProvider.removeEventListener("addItem",
m(this,this.pageNavigator_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.pageNavigator_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.pageNavigator_dataProvider_replaceItemHandler)),this._dataProvider.removeEventListener("removeAll",m(this,this.pageNavigator_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.pageNavigator_dataProvider_resetHandler)),a==null)this.removeAllItems();
else for(var b=this._dataProvider.iterator();b.hasNext();){var c=b.next();this.removeItemInternal(c.internalID)}this._dataProvider=a;if(this._dataProvider!=null){for(b=this._dataProvider.iterator();b.hasNext();)c=b.next(),this.addItemInternal(c.internalID,c);this._dataProvider.addEventListener("addItem",m(this,this.pageNavigator_dataProvider_addItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeItem",m(this,this.pageNavigator_dataProvider_removeItemHandler),!1,0,!0);this._dataProvider.addEventListener("replaceItem",
m(this,this.pageNavigator_dataProvider_replaceItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeAll",m(this,this.pageNavigator_dataProvider_removeAllHandler),!1,0,!0);this._dataProvider.addEventListener("reset",m(this,this.pageNavigator_dataProvider_resetHandler),!1,0,!0)}this.setInvalid(x.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);W.dispatch(this,"dataChange");return this._dataProvider},_activeItemIndex:null,
_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);this.setInvalid(x.SELECTION);return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},
set_selectedItem:function(a){if(this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;this.set_selectedIndex(this._dataProvider.indexOf(a));return this._selectedItem},_swipeEnabled:null,get_swipeEnabled:function(){return this._swipeEnabled},set_swipeEnabled:function(a){if(this._swipeEnabled==a)return this._swipeEnabled;this._swipeEnabled=a;this.setInvalid(x.DATA);return this._swipeEnabled},_simulateTouch:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==
a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_previousCustomPageIndicatorVariant:null,_oldPageIndicatorFactory:null,_pageIndicatorFactory:null,get_pageIndicatorFactory:function(){return this._pageIndicatorFactory},set_pageIndicatorFactory:function(a){if(this._pageIndicatorFactory==a)return this._pageIndicatorFactory;this._pageIndicatorFactory=a;this.setInvalid(sh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);return this._pageIndicatorFactory},
_ignoreSelectionChange:null,_dragTransitionContext:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());this.destroyPageIndicator();this._activeItemView=this._activeItemID=null;this.set_dataProvider(null);
Dd.prototype.dispose.call(this)},initialize:function(){Dd.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new fg(this,ja.LEFT),this._previousEdgePuller.addEventListener("opening",m(this,this.pageNavigator_previousEdgePuller_openingHandler)),this._previousEdgePuller.addEventListener("cancel",m(this,this.pageNavigator_previousEdgePuller_cancelHandler)),this._previousEdgePuller.addEventListener("open",m(this,this.pageNavigator_previousEdgePuller_openHandler)));
this._nextEdgePuller==null&&(this._nextEdgePuller=new fg(this,ja.RIGHT),this._nextEdgePuller.addEventListener("opening",m(this,this.pageNavigator_nextEdgePuller_openingHandler)),this._nextEdgePuller.addEventListener("cancel",m(this,this.pageNavigator_nextEdgePuller_cancelHandler)),this._nextEdgePuller.addEventListener("open",m(this,this.pageNavigator_nextEdgePuller_openHandler)))},initializePageNavigatorTheme:function(){ju.initialize()},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);
this._previousCustomPageIndicatorVariant!=this.get_customPageIndicatorVariant()&&this.setInvalidationFlag(sh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);var c=this.isInvalid(sh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);c&&this.createPageIndicator();a&&(this._previousEdgePuller.simulateTouch=this._simulateTouch,this._nextEdgePuller.simulateTouch=this._simulateTouch);(a||b||c)&&this.refreshSelection();Dd.prototype.update.call(this);this._previousCustomPageIndicatorVariant=this.get_customPageIndicatorVariant()},
measure:function(){this.get_explicitWidth()!=null?this.pageIndicator.set_width(this.get_explicitWidth()):this._autoSizeMode==Fe.STAGE&&this.stage!=null?this.pageIndicator.set_width(this.stage.stageWidth):this.pageIndicator.resetWidth();this.pageIndicator.validateNow();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this.pageIndicator.get_width());switch(this.get_pageIndicatorPosition()._hx_index){case 0:this.topContentOffset+=this.pageIndicator.get_height()+this.get_gap();break;case 2:this.bottomContentOffset+=
this.pageIndicator.get_height()+this.get_gap();break;default:throw new rb("Invalid pageIndicatorPosition "+L.string(this.get_pageIndicatorPosition()));}return Dd.prototype.measure.call(this)},createPageIndicator:function(){this.destroyPageIndicator();var a=this._pageIndicatorFactory!=null?this._pageIndicatorFactory:sh.defaultPageIndicatorFactory;this._oldPageIndicatorFactory=a;this.pageIndicator=a.create();this.pageIndicator.get_variant()==null&&this.pageIndicator.set_variant(this.get_customPageIndicatorVariant()!=
null?this.get_customPageIndicatorVariant():sh.CHILD_VARIANT_PAGE_INDICATOR);this.pageIndicator.addEventListener("change",m(this,this.pageNavigator_pageIndicator_changeHandler));this.addChild(this.pageIndicator)},destroyPageIndicator:function(){this.pageIndicator!=null&&(this.pageIndicator.removeEventListener("change",m(this,this.pageNavigator_pageIndicator_changeHandler)),this.removeChild(this.pageIndicator),this._oldPageIndicatorFactory.destroy!=null&&this._oldPageIndicatorFactory.destroy(this.pageIndicator),
this.pageIndicator=this._oldPageIndicatorFactory=null)},layoutContent:function(){this.pageIndicator.set_x(0);this.pageIndicator.set_width(this.actualWidth);this.pageIndicator.validateNow();switch(this.get_pageIndicatorPosition()._hx_index){case 0:this.pageIndicator.set_y(0);break;case 2:this.pageIndicator.set_y(this.actualHeight-this.pageIndicator.get_height());break;default:throw new rb("Invalid pageIndicatorPosition "+L.string(this.get_pageIndicatorPosition()));}Dd.prototype.layoutContent.call(this)},
getView:function(a){return u.__cast(this._addedItems.h[a],og).getView(this)},disposeView:function(a,b){u.__cast(this._addedItems.h[a],og).returnView(b)},refreshSelection:function(){var a=this,b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.pageIndicator.set_maxSelectedIndex(this.get_maxSelectedIndex());this.pageIndicator.set_selectedIndex(this._selectedIndex);this._ignoreSelectionChange=b;if(this._selectedItem==null)this._activeItemIndex=-1,this.get_activeItemID()!=null&&this.clearActiveItemInternal();
else if(this._selectedItem!=null&&(b=this._activeItemIndex,this._activeItemIndex=this._selectedIndex,!this._previousEdgePuller.get_active()&&!this._nextEdgePuller.get_active()&&(this._transitionActive?this._nextViewInTransitionID:this._activeItemID)!=this._selectedItem.internalID)){var c=null;b!=-1&&b!=this._selectedIndex&&(c=b<this._selectedIndex?this.get_nextTransition():this.get_previousTransition());this.runWithInvalidationFlagsOnly(function(){a.showItemInternal(a._selectedItem.internalID,c)})}b=
this._enabled&&this._swipeEnabled&&this._selectedIndex>0&&!this._nextEdgePuller.get_active();this._previousEdgePuller.enabled=b;b=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex()&&!this._previousEdgePuller.get_active();this._nextEdgePuller.enabled=b},startPreviousDragTransition:function(a,b){var c=this;a=this.get_previousTransition()(a,b);this._previousEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new rl(a,this._previousEdgePuller,
"change",function(d){return c._dragTransitionContext.set_position(c._previousEdgePuller.get_pullDistance()/c.actualWidth)})},startNextDragTransition:function(a,b){var c=this;a=this.get_nextTransition()(a,b);this._nextEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new rl(a,this._nextEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._nextEdgePuller.get_pullDistance()/c.actualWidth)})},pageNavigator_pageIndicator_changeHandler:function(a){this._ignoreSelectionChange||
this.set_selectedIndex(this.pageIndicator.get_selectedIndex())},pageNavigator_dataProvider_addItemHandler:function(a){var b=u.__cast(a.addedItem,og);this.addItemInternal(b.internalID,b);this.setInvalid(x.DATA);this._selectedIndex>=a.index?this.set_selectedIndex(this.get_selectedIndex()+1):this._selectedIndex==-1&&this.set_selectedIndex(0)},pageNavigator_dataProvider_removeItemHandler:function(a){var b=u.__cast(a.removedItem,og);this.removeItemInternal(b.internalID);this.setInvalid(x.DATA);this._dataProvider.get_length()==
0?this.set_selectedIndex(-1):this._selectedIndex>=a.index&&this.set_selectedIndex(this.get_selectedIndex()-1)},pageNavigator_dataProvider_replaceItemHandler:function(a){var b=u.__cast(a.addedItem,og),c=u.__cast(a.removedItem,og);this.removeItemInternal(c.internalID);this.addItemInternal(b.internalID,b);this.setInvalid(x.DATA);this._selectedIndex==a.index&&this.set_selectedItem(this._dataProvider.get(this._selectedIndex))},pageNavigator_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1);
a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},pageNavigator_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1);a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},pageNavigator_previousEdgePuller_openingHandler:function(a){var b=this._selectedIndex-1;if(b<0)a.preventDefault();else{var c=this._previousEdgePuller.get_touchPointID();
if(c!=null){var d=Ad.forStage(this.stage);if(this._previousEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_previousTransition()!=null?(this._nextEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startPreviousDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},pageNavigator_previousEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"cancel"))},pageNavigator_previousEdgePuller_openHandler:function(a){a=this._previousEdgePuller.get_snapDuration();this._previousEdgePuller.set_snapDuration(0);this._previousEdgePuller.set_opened(!1);this._previousEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()-
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"complete"))},pageNavigator_nextEdgePuller_openingHandler:function(a){var b=this._selectedIndex+1;if(b>this.get_maxSelectedIndex())a.preventDefault();else{var c=this._nextEdgePuller.get_touchPointID();
if(c!=null){var d=Ad.forStage(this.stage);if(this._nextEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_nextTransition()!=null?(this._previousEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startNextDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},pageNavigator_nextEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"cancel"))},pageNavigator_nextEdgePuller_openHandler:function(a){a=this._nextEdgePuller.get_snapDuration();this._nextEdgePuller.set_snapDuration(0);this._nextEdgePuller.set_opened(!1);this._nextEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()+
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"complete"))},get_styleContext:function(){return sh},__pageIndicatorPosition:null,get_pageIndicatorPosition:function(){return this.__pageIndicatorPosition},set_pageIndicatorPosition:function(a){if(!this.setStyle("pageIndicatorPosition")||
this.__pageIndicatorPosition==a)return this.__pageIndicatorPosition;this._previousClearStyle=m(this,this.clearStyle_pageIndicatorPosition);this.__pageIndicatorPosition=a;this.setInvalid(x.STYLES);return this.__pageIndicatorPosition},clearStyle_pageIndicatorPosition:function(){this.set_pageIndicatorPosition(ja.BOTTOM);return this.get_pageIndicatorPosition()},__previousTransition:null,get_previousTransition:function(){return this.__previousTransition},set_previousTransition:function(a){if(!this.setStyle("previousTransition")||
this.__previousTransition==a)return this.__previousTransition;this._previousClearStyle=m(this,this.clearStyle_previousTransition);this.__previousTransition=a;this.setInvalid(x.STYLES);return this.__previousTransition},clearStyle_previousTransition:function(){this.set_previousTransition(null);return this.get_previousTransition()},__nextTransition:null,get_nextTransition:function(){return this.__nextTransition},set_nextTransition:function(a){if(!this.setStyle("nextTransition")||this.__nextTransition==
a)return this.__nextTransition;this._previousClearStyle=m(this,this.clearStyle_nextTransition);this.__nextTransition=a;this.setInvalid(x.STYLES);return this.__nextTransition},clearStyle_nextTransition:function(){this.set_nextTransition(null);return this.get_nextTransition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},
clearStyle_gap:function(){this.set_gap(0);return this.get_gap()},__customPageIndicatorVariant:null,get_customPageIndicatorVariant:function(){return this.__customPageIndicatorVariant},set_customPageIndicatorVariant:function(a){if(!this.setStyle("customPageIndicatorVariant")||this.__customPageIndicatorVariant==a)return this.__customPageIndicatorVariant;this._previousClearStyle=m(this,this.clearStyle_customPageIndicatorVariant);this.__customPageIndicatorVariant=a;this.setInvalid(x.STYLES);return this.__customPageIndicatorVariant},
clearStyle_customPageIndicatorVariant:function(){this.set_customPageIndicatorVariant(null);return this.get_customPageIndicatorVariant()},__class__:sh,__properties__:I(Dd.prototype.__properties__,{set_pageIndicatorFactory:"set_pageIndicatorFactory",get_pageIndicatorFactory:"get_pageIndicatorFactory",set_customPageIndicatorVariant:"set_customPageIndicatorVariant",get_customPageIndicatorVariant:"get_customPageIndicatorVariant",set_gap:"set_gap",get_gap:"get_gap",set_nextTransition:"set_nextTransition",
get_nextTransition:"get_nextTransition",set_previousTransition:"set_previousTransition",get_previousTransition:"get_previousTransition",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_swipeEnabled:"set_swipeEnabled",get_swipeEnabled:"get_swipeEnabled",set_pageIndicatorPosition:"set_pageIndicatorPosition",get_pageIndicatorPosition:"get_pageIndicatorPosition",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",
set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var oi=function(){this._viewToEvents=new Na};r["feathers.controls.navigators.Route"]=oi;oi.__name__="feathers.controls.navigators.Route";oi.withClass=function(a,b,c,d,f){var g=new oi;g.path=a;g.viewFactory=Ec.withClass(b);g.actions=c;g.updateState=d;g.saveData=f;return g};oi.withFunction=function(a,b,c,d,f){var g=new oi;g.path=a;g.viewFactory=Ec.withFunction(b);
g.actions=c;g.updateState=d;g.saveData=f;return g};oi.withDisplayObject=function(a,b,c,d,f){var g=new oi;g.path=a;g.viewFactory=Ec.withDisplayObject(b);g.actions=c;g.updateState=d;g.saveData=f;return g};oi.withFactory=function(a,b,c,d,f){var g=new oi;g.path=a;g.viewFactory=b;g.actions=c;g.updateState=d;g.saveData=f;return g};oi.withRedirect=function(a,b){var c=new oi;c.path=a;c.redirectTo=b;return c};oi.prototype={path:null,updateState:function(a,b){},saveData:function(a){return null},viewFactory:null,
redirectTo:null,actions:null,_viewToEvents:null,setAction:function(a,b){this.actions==null&&(this.actions=new aa);b==null?(b=this.actions,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):this.actions.h[a]=b},getView:function(a){var b=this.viewFactory.create();a=this.addActionListeners(b,a);this._viewToEvents.set(b,a);return b},returnView:function(a){this.removeEventsFromView(a,this._viewToEvents.h[a.__id__]);this._viewToEvents.remove(a);this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},
addActionListeners:function(a,b){var c=[];if(this.actions==null)return c;for(var d=Object.keys(this.actions.h),f=d.length,g=0;g<f;){var h=d[g++],l=this.createActionEventListener(this.actions.h[h],b);a.addEventListener(h,l);c.push(new Ku(h,l))}return c},performAction:function(a,b,c){switch(a._hx_index){case 0:b=a.url;var d=a.newHistoryState;a=a.transition;c.push(b,d,a);break;case 1:b=a.url;d=a.newHistoryState;a=a.transition;c.replace(b,d,a);break;case 2:a=a.transition;c.goBack(a);break;case 3:a=a.transition;
c.goForward(a);break;case 4:c.go(a.n);break;case 5:c=a.callback;c(b);break;case 6:return c=a.callback,c(b)}return null},createActionEventListener:function(a,b){var c=this;return function(d){if(!b.get_transitionActive())for(var f=a;f!=null;)f=c.performAction(f,d,b)}},removeEventsFromView:function(a,b){for(var c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d.eventType,d.listener)}},__class__:oi};var Ku=function(a,b){this.eventType=a;this.listener=b};r["feathers.controls.navigators._Route.ViewListener"]=
Ku;Ku.__name__="feathers.controls.navigators._Route.ViewListener";Ku.prototype={eventType:null,listener:null,__class__:Ku};var jn=O["feathers.controls.navigators.RouterAction"]={__ename__:"feathers.controls.navigators.RouterAction",__constructs__:null,Push:(G=function(a,b,c){return{_hx_index:0,url:a,newHistoryState:b,transition:c,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="Push",G.__params__=["url","newHistoryState","transition"],G),Replace:(G=function(a,b,c){return{_hx_index:1,
url:a,newHistoryState:b,transition:c,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="Replace",G.__params__=["url","newHistoryState","transition"],G),GoBack:(G=function(a){return{_hx_index:2,transition:a,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="GoBack",G.__params__=["transition"],G),GoForward:(G=function(a){return{_hx_index:3,transition:a,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="GoForward",G.__params__=
["transition"],G),Go:(G=function(a,b){return{_hx_index:4,n:a,transition:b,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="Go",G.__params__=["n","transition"],G),Listener:(G=function(a){return{_hx_index:5,callback:a,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="Listener",G.__params__=["callback"],G),NewAction:(G=function(a){return{_hx_index:6,callback:a,__enum__:"feathers.controls.navigators.RouterAction",toString:D}},G._hx_name="NewAction",
G.__params__=["callback"],G)};jn.__constructs__=[jn.Push,jn.Replace,jn.GoBack,jn.GoForward,jn.Go,jn.Listener,jn.NewAction];var kn=function(){this.__forwardTransition=this.__backTransition=this.__replaceTransition=null;this._cachedPaths=new aa;this._preferHashRouting=!1;this.basePath=this._savedGoTransition=null;this.historyDepth=0;this.initializeRouterNavigatorTheme();Dd.call(this);this.addEventListener("addedToStage",m(this,this.routerNavigator_addedToStageHandler));this.addEventListener("removedFromStage",
m(this,this.routerNavigator_removedFromStageHandler))};r["feathers.controls.navigators.RouterNavigator"]=kn;kn.__name__="feathers.controls.navigators.RouterNavigator";kn.__super__=Dd;kn.prototype=I(Dd.prototype,{htmlWindow:null,historyDepth:null,basePath:null,_savedGoTransition:null,_preferHashRouting:null,get_preferHashRouting:function(){return this._preferHashRouting},set_preferHashRouting:function(a){if(this._preferHashRouting==a)return this._preferHashRouting;if(this._activeItemView!=null)throw new rb("Must set preferHashRouting before a view is displayed");
return this._preferHashRouting=a},initializeRouterNavigatorTheme:function(){mu.initialize()},addRoute:function(a){a.path==null&&(a.path="");this.addItemInternal(a.path,a);if(this.stage!=null&&this.get_activeItemView()==null){var b=this.matchRoute();b==a&&(a.redirectTo!=null?this.redirect(a):this.showItemInternal(b.path,null))}},push:function(a,b,c){if(this._activeItemView!=null){var d=null,f=this._addedItems.h[this._activeItemID];f.saveData!=null&&(d=f.saveData(this._activeItemView));f=this.htmlWindow.history.state;
f==null?f={depth:this.historyDepth,state:null,viewData:d}:f.viewData=d;var g=this.getPathname();d=g+this.get_location().search;this.basePath==null||Z.startsWith(g,this.basePath+"/")||(d=!Z.startsWith(g,"/"),g=this.basePath+(d?"/":"")+g,d=g+this.get_location().search);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+this.get_location().search+"#"+g;this.htmlWindow.history.replaceState(f,null,d)}d=a.split("?");a=d[0];f="";d.length>1&&(f="?"+
d[1]);d=a+f;this.basePath==null||Z.startsWith(a,this.basePath+"/")||(d=!Z.startsWith(a,"/"),a=this.basePath+(d?"/":"")+a,d=a+f);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+f+"#"+a;this.historyDepth++;this.htmlWindow.history.pushState({depth:this.historyDepth,state:b,viewData:null},null,d);c==null&&(c=this.get_forwardTransition());return this.matchRouteAndShow(c)},replace:function(a,b,c){var d=a.split("?");a=d[0];var f="";d.length>1&&(f=
"?"+d[1]);d=a+f;this.basePath==null||Z.startsWith(a,this.basePath+"/")||(d=!Z.startsWith(a,"/"),a=this.basePath+(d?"/":"")+a,d=a+f);if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:")d=this.htmlWindow.location.pathname+f+"#"+a;this.htmlWindow.history.replaceState({depth:this.historyDepth,state:b,viewData:null},null,d);c==null&&(c=this.get_replaceTransition());return this.matchRouteAndShow(c)},go:function(a,b){if(a==0)return this.get_activeItemView();b==null&&(b=a<0?this.get_backTransition():
this.get_forwardTransition());this._savedGoTransition=b;this.htmlWindow.history.go(a);return null},goBack:function(a){return this.go(-1,a)},goForward:function(a){return this.go(1,a)},routerNavigator_addedToStageHandler:function(a){this.htmlWindow=u.__cast(sa,Window);this.htmlWindow.addEventListener("popstate",m(this,this.htmlWindow_popstateHandler));this.matchRouteAndShow(null)},get_location:function(){return this.htmlWindow.location},get_pathname:function(){return this.getPathname()},_cachedPaths:null,
getURLVariables:function(){var a=this.get_location().search;a.length>0&&(a=X.substr(a,1,null));try{return Rl._new(a)}catch(b){return Rb.lastError=b,Rl._new()}},getPathname:function(){if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:"){var a=this.htmlWindow.location.hash;a=a.length==0?"/":X.substr(a,1,null)}else a=this.htmlWindow.location.pathname;this.basePath!=null&&Z.startsWith(a,this.basePath+"/")&&(a=X.substr(a,this.basePath.length,null));return a},redirect:function(a){var b=
a.redirectTo,c=a.path;a=Object.create(null);if(c!=null&&c.length>0)for(var d=this.getMatcher(c),f=0,g=d.keys.length;f<g;){var h=f++;c=d.keys[h];a[c.name]=d.ereg.matched(h+1)}d=Object.keys(a);f=d.length;for(g=0;g<f;)c=d[g++],b=Z.replace(b,":name",a[c]);this.replace(b)},getMatcher:function(a){var b=this._cachedPaths.h[a];b==null&&(b=th.toEReg(a,{end:!0}),this._cachedPaths.h[a]=b);return b},matchRoute:function(){for(var a=this.getPathname(),b=0,c=this._addedItemIDs;b<c.length;){var d=c[b];++b;if(d==
null||d.length==0||this.getMatcher(d).ereg.match(a))return this._addedItems.h[d]}return null},matchRouteAndShow:function(a){var b=this.matchRoute();if(b!=null)return b.redirectTo!=null?(this.redirect(b),null):this.showItemInternal(b.path,a);this.clearActiveItemInternal(null);return null},getView:function(a){a=u.__cast(this._addedItems.h[a],oi);var b=a.path,c=new aa;if(b!=null&&b.length>0){b=this.getMatcher(b);for(var d=0,f=b.keys.length;d<f;){var g=d++,h=b.keys[g].name;g=b.ereg.matched(g+1);c.h[h]=
g}}c=new Lu(a.path,this.getPathname(),c);b=a.getView(this);d=this.htmlWindow.history.state;c.historyState=d!=null?d.state:null;c.data=d!=null?d.viewData:null;c.urlVariables=this.getURLVariables();a.updateState!=null&&a.updateState(b,c);b.addEventListener("link",m(this,this.routerNavigator_activeView_linkHandler));return b},disposeView:function(a,b){b.removeEventListener("link",m(this,this.routerNavigator_activeView_linkHandler));u.__cast(this._addedItems.h[a],oi).returnView(b)},routerNavigator_removedFromStageHandler:function(a){this.htmlWindow!=
null&&(this.htmlWindow.removeEventListener("popstate",m(this,this.htmlWindow_popstateHandler)),this.htmlWindow=null)},routerNavigator_activeView_linkHandler:function(a){!a.isDefaultPrevented()&&Z.startsWith(a.text,"router:")&&(a.preventDefault(),a=X.substr(a.text,7,null),this.push(a))},htmlWindow_popstateHandler:function(a){a.preventDefault();a=this.historyDepth;var b=this.htmlWindow.history.state;b!=null&&b.depth!=null&&(a=b.depth);b=this._savedGoTransition;this._savedGoTransition=null;this._activeItemView!=
null&&b==null&&(this.historyDepth>a?b=this.get_backTransition():this.historyDepth<a&&(b=this.get_forwardTransition()));this.historyDepth=a;this.matchRouteAndShow(b)},get_styleContext:function(){return kn},__forwardTransition:null,get_forwardTransition:function(){return this.__forwardTransition},set_forwardTransition:function(a){if(!this.setStyle("forwardTransition")||this.__forwardTransition==a)return this.__forwardTransition;this._previousClearStyle=m(this,this.clearStyle_forwardTransition);this.__forwardTransition=
a;this.setInvalid(x.STYLES);return this.__forwardTransition},clearStyle_forwardTransition:function(){this.set_forwardTransition(null);return this.get_forwardTransition()},__backTransition:null,get_backTransition:function(){return this.__backTransition},set_backTransition:function(a){if(!this.setStyle("backTransition")||this.__backTransition==a)return this.__backTransition;this._previousClearStyle=m(this,this.clearStyle_backTransition);this.__backTransition=a;this.setInvalid(x.STYLES);return this.__backTransition},
clearStyle_backTransition:function(){this.set_backTransition(null);return this.get_backTransition()},__replaceTransition:null,get_replaceTransition:function(){return this.__replaceTransition},set_replaceTransition:function(a){if(!this.setStyle("replaceTransition")||this.__replaceTransition==a)return this.__replaceTransition;this._previousClearStyle=m(this,this.clearStyle_replaceTransition);this.__replaceTransition=a;this.setInvalid(x.STYLES);return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);
return this.get_replaceTransition()},__class__:kn,__properties__:I(Dd.prototype.__properties__,{get_pathname:"get_pathname",get_location:"get_location",set_preferHashRouting:"set_preferHashRouting",get_preferHashRouting:"get_preferHashRouting",set_replaceTransition:"set_replaceTransition",get_replaceTransition:"get_replaceTransition",set_backTransition:"set_backTransition",get_backTransition:"get_backTransition",set_forwardTransition:"set_forwardTransition",get_forwardTransition:"get_forwardTransition"})});
var km=O["feathers.controls.navigators.StackAction"]={__ename__:"feathers.controls.navigators.StackAction",__constructs__:null,Push:(G=function(a,b,c){return{_hx_index:0,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="Push",G.__params__=["id","inject","transition"],G),Replace:(G=function(a,b,c){return{_hx_index:1,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="Replace",G.__params__=["id",
"inject","transition"],G),Pop:(G=function(a,b){return{_hx_index:2,returnedObject:a,transition:b,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="Pop",G.__params__=["returnedObject","transition"],G),PopMultiple:(G=function(a,b,c){return{_hx_index:3,count:a,returnedObject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="PopMultiple",G.__params__=["count","returnedObject","transition"],G),PopToRoot:(G=function(a,b){return{_hx_index:4,
returnedObject:a,transition:b,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="PopToRoot",G.__params__=["returnedObject","transition"],G),PopToRootAndReplace:(G=function(a,b,c){return{_hx_index:5,id:a,inject:b,transition:c,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="PopToRootAndReplace",G.__params__=["id","inject","transition"],G),Listener:(G=function(a){return{_hx_index:6,callback:a,__enum__:"feathers.controls.navigators.StackAction",toString:D}},
G._hx_name="Listener",G.__params__=["callback"],G),NewAction:(G=function(a){return{_hx_index:7,callback:a,__enum__:"feathers.controls.navigators.StackAction",toString:D}},G._hx_name="NewAction",G.__params__=["callback"],G)};km.__constructs__=[km.Push,km.Replace,km.Pop,km.PopMultiple,km.PopToRoot,km.PopToRootAndReplace,km.Listener,km.NewAction];var pi=function(){this._viewToEvents=new Na};r["feathers.controls.navigators.StackItem"]=pi;pi.__name__="feathers.controls.navigators.StackItem";pi.withClass=
function(a,b,c,d,f,g){var h=new pi;h.id=a;h.viewFactory=jm.fromClass(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};pi.withFunction=function(a,b,c,d,f,g){var h=new pi;h.id=a;h.viewFactory=jm.fromFunction(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};pi.withDisplayObject=function(a,b,c,d,f,g){var h=new pi;h.id=a;h.viewFactory=jm.fromDisplayObject(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};pi.withFactory=function(a,b,
c,d,f,g){var h=new pi;h.id=a;h.viewFactory=b;h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};pi.prototype={id:null,viewFactory:null,actions:null,returnHandlers:null,pushTransition:null,popTransition:null,_viewToEvents:null,setAction:function(a,b){this.actions==null&&(this.actions=new aa);b==null?(b=this.actions,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):this.actions.h[a]=b},saveData:function(a){return null},restoreData:function(a,b){},getView:function(a){var b=
this.viewFactory.create();a=this.addActionListeners(b,a);this._viewToEvents.set(b,a);return b},returnView:function(a){this.removeEventsFromView(a,this._viewToEvents.h[a.__id__]);this._viewToEvents.remove(a);this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},addActionListeners:function(a,b){var c=[];if(this.actions==null)return c;for(var d=Object.keys(this.actions.h),f=d.length,g=0;g<f;){var h=d[g++],l=this.createActionEventListener(this.actions.h[h],b);a.addEventListener(h,l);c.push(new Mu(h,
l))}return c},performAction:function(a,b,c){switch(a._hx_index){case 0:b=a.id;var d=a.inject;a=a.transition;c.pushItem(b,d,a);break;case 1:b=a.id;d=a.inject;a=a.transition;c.replaceItem(b,d,a);break;case 2:b=a.returnedObject;a=a.transition;c.popItem(b,a);break;case 3:d=a.count;b=a.returnedObject;a=a.transition;c.popMultipleItems(d,b,a);break;case 4:b=a.returnedObject;a=a.transition;c.popToRootItem(b,a);break;case 5:b=a.id;d=a.inject;a=a.transition;c.popToRootItemAndReplace(b,d,a);break;case 6:c=a.callback;
c(b);break;case 7:return c=a.callback,c(b)}return null},createActionEventListener:function(a,b){var c=this;return function(d){if(!b.get_transitionActive())for(var f=a;f!=null;)f=c.performAction(f,d,b)}},removeEventsFromView:function(a,b){for(var c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d.eventType,d.listener)}},__class__:pi};var Mu=function(a,b){this.eventType=a;this.listener=b};r["feathers.controls.navigators._StackItem.ViewListener"]=Mu;Mu.__name__="feathers.controls.navigators._StackItem.ViewListener";
Mu.prototype={eventType:null,listener:null,__class__:Mu};var ln=function(){this._poppedHistoryItems=this.__pushTransition=this.__popTransition=this.__replaceTransition=null;this.savedIsPop=!1;this._popSwipeActiveEdgeSize=30;this._popSwipeEnabled=this._simulateTouch=!1;this._history=[];this.initializeStackNavigatorTheme();Dd.call(this);this.addEventListener("initialize",m(this,this.stackNavigator_initializeHandler));this.addEventListener("addedToStage",m(this,this.stackNavigator_addedToStageHandler));
this.addEventListener("removedFromStage",m(this,this.stackNavigator_removedFromStageHandler))};r["feathers.controls.navigators.StackNavigator"]=ln;ln.__name__="feathers.controls.navigators.StackNavigator";ln.__super__=Dd;ln.prototype=I(Dd.prototype,{_backEdgePuller:null,_dragTransitionContext:null,_history:null,_tempRootItemID:null,get_stackSize:function(){return this._history.length},get_rootItemID:function(){return this._history.length>0?this._history[0].id:this._tempRootItemID},set_rootItemID:function(a){if(!this.get_initialized())return this._tempRootItemID=
a;this._tempRootItemID=null;this._history.length=0;if(a==null)return this.clearActiveItemInternal(null),null;var b=new lm(a,null,null,null);this._history.push(b);this.showItemWithInjectAndReturnedObject(a,null,null,null,null,!1);return a},_popSwipeEnabled:null,get_popSwipeEnabled:function(){return this._popSwipeEnabled},set_popSwipeEnabled:function(a){if(this._popSwipeEnabled==a)return this._popSwipeEnabled;this._popSwipeEnabled=a;this.setInvalid(x.DATA);return this._popSwipeEnabled},_simulateTouch:null,
get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_popSwipeActiveEdgeSize:null,get_popSwipeActiveEdgeSize:function(){return this._popSwipeActiveEdgeSize},set_popSwipeActiveEdgeSize:function(a){if(this._popSwipeActiveEdgeSize==a)return this._popSwipeActiveEdgeSize;this._popSwipeActiveEdgeSize=a;this.setInvalid(x.DATA);return this._popSwipeActiveEdgeSize},
savedInject:null,savedReturnedObject:null,savedIsPop:null,savedRestoreData:null,savedViewData:null,_poppedHistoryItems:null,initializeStackNavigatorTheme:function(){nu.initialize()},addItem:function(a){this.addItemInternal(a.id,a)},removeItem:function(a){for(var b=0,c=this._history;b<c.length;){var d=c[b];++b;d.id==a&&X.remove(this._history,d)}d=this.removeItemInternal(a);return u.__cast(d,pi)},removeAllItems:function(){this._history.length=0;Dd.prototype.removeAllItems.call(this)},getItem:function(a){a=
this._addedItems.h[a];return a==null?null:u.__cast(a,pi)},pushItem:function(a,b,c){c==null&&(c=this.getItem(a),c=c!=null&&c.pushTransition!=null?c.pushTransition:this.get_pushTransition());if(this._activeItemView!=null){var d=null,f=this._addedItems.h[this._activeItemID];f.saveData!=null&&(d=f.saveData(this._activeItemView));f=this._history[this._history.length-1];f.viewData=d}f=new lm(a,b,null,c);this._history.push(f);return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},popItem:function(a,
b){if(this._history.length<=1)return this.get_activeItemView();if(b==null){var c=this.getItem(this.get_activeItemID());b=c!=null&&c.popTransition!=null?c.popTransition:this.get_popTransition()}this._poppedHistoryItems=[this._history.pop()];c=this._history[this._history.length-1];return this.showItemWithInjectAndReturnedObject(c.id,b,c.inject,a,c.viewData,!0)},popMultipleItems:function(a,b,c){if(a<=0)throw new oe("popMultipleItems() must be called with a value greater than zero");if(c==null){var d=
this.getItem(this.get_activeItemID());c=d!=null&&d.popTransition!=null?d.popTransition:this.get_popTransition()}d=this._history.length-a;if(d<1)throw new oe("popMultipleItems() called with value larger than available history. Received "+a+". Expected less than "+this._history.length+".");this._poppedHistoryItems=this._history.slice(d);this._history.length=d;d=this._history[this._history.length-1];return this.showItemWithInjectAndReturnedObject(d.id,c,d.inject,b,d.viewData,!0)},popToRootItem:function(a,
b){if(this._history.length<=1)return this.get_activeItemView();b==null&&(b=this.get_popTransition());this._poppedHistoryItems=this._history.slice(1);this._history.length=1;var c=this._history[0];return this.showItemWithInjectAndReturnedObject(c.id,b,c.inject,a,null,!0)},popAll:function(a){this._history.length!=0&&(a==null&&(a=this.get_popTransition()),this._poppedHistoryItems=this._history.slice(),this._history.length=0,this.clearActiveItemInternal(a))},replaceItem:function(a,b,c){c==null&&(c=this.get_replaceTransition());
var d=new lm(a,b,null,c);this._history[this._history.length-1]=d;return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},popToRootItemAndReplace:function(a,b,c){c==null&&(c=this.get_popTransition());this._history.length=1;this._history[0]=new lm(a,b,null,c);return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},initialize:function(){Dd.prototype.initialize.call(this);this._backEdgePuller==null&&(this._backEdgePuller=new fg(this,ja.LEFT),this._backEdgePuller.addEventListener("opening",
m(this,this.stackNavigator_backEdgePuller_openingHandler)),this._backEdgePuller.addEventListener("cancel",m(this,this.stackNavigator_backEdgePuller_cancelHandler)),this._backEdgePuller.addEventListener("open",m(this,this.stackNavigator_backEdgePuller_openHandler)))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);if(a||b)a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1,this._backEdgePuller.enabled=a,this._backEdgePuller.set_activeBorderSize(this._popSwipeActiveEdgeSize),
this._backEdgePuller.simulateTouch=this._simulateTouch;Dd.prototype.update.call(this)},getView:function(a){var b=u.__cast(this._addedItems.h[a],pi);a=b.getView(this);this.savedInject!=null&&this.savedInject(a);b.restoreData!=null&&b.restoreData(a,this.savedViewData);if(this.savedIsPop&&(b=b.returnHandlers,b!=null&&Object.prototype.hasOwnProperty.call(b.h,this._previousViewInTransitionID)))b.h[this._previousViewInTransitionID](a,this.savedReturnedObject);return a},disposeView:function(a,b){u.__cast(this._addedItems.h[a],
pi).returnView(b)},transitionComplete:function(){this._poppedHistoryItems=null},transitionCancel:function(){if(this._poppedHistoryItems!=null){for(var a=0,b=this._poppedHistoryItems;a<b.length;){var c=b[a];++a;this._history.push(c)}this._poppedHistoryItems=null}},showItemWithInjectAndReturnedObject:function(a,b,c,d,f,g){this.savedInject=c;this.savedReturnedObject=d;this.savedViewData=f;this.savedIsPop=g;a=this.showItemInternal(a,b);this.savedReturnedObject=this.savedInject=null;this.savedIsPop=!1;
this.savedViewData=null;return a},startBackDragTransition:function(a,b){var c=this;a=this.get_popTransition()(a,b);this._backEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new rl(a,this._backEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._backEdgePuller.get_pullDistance()/c.actualWidth)})},stackNavigator_initializeHandler:function(a){if(this._tempRootItemID!=null){a=this._tempRootItemID;this._tempRootItemID=null;var b=new lm(a,null,
null,null);this._history.push(b);this.showItemWithInjectAndReturnedObject(a,null,null,null,null,!1)}},stackNavigator_addedToStageHandler:function(a){this.stage.addEventListener("keyUp",m(this,this.stackNavigator_stage_keyUpHandler),!1,0,!0)},stackNavigator_removedFromStageHandler:function(a){this.stage.removeEventListener("keyUp",m(this,this.stackNavigator_stage_keyUpHandler))},stackNavigator_stage_backKeyUpHandler:function(a){a.isDefaultPrevented()||this._history.length<=1||(a.preventDefault(),this.popItem())},
stackNavigator_stage_keyUpHandler:function(a){this._enabled&&a.keyCode==1073742094&&this.stackNavigator_stage_backKeyUpHandler(a)},stackNavigator_backEdgePuller_openingHandler:function(a){if(this.get_stackSize()<=1)a.preventDefault();else{var b=this._backEdgePuller.get_touchPointID();if(b!=null){var c=Ad.forStage(this.stage);if(this._backEdgePuller.get_touchPointIsSimulated()?!c.claimMouse(this):!c.claimTouch(b,this)){a.preventDefault();return}}this.get_popTransition()!=null?this.popItem(null,m(this,
this.startBackDragTransition)):(a.preventDefault(),this.popItem())}},stackNavigator_backEdgePuller_cancelHandler:function(a){a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"cancel"));a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1;this._backEdgePuller.enabled=a},stackNavigator_backEdgePuller_openHandler:function(a){a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,
"complete"));a=this._backEdgePuller.get_snapDuration();this._backEdgePuller.set_snapDuration(0);this._backEdgePuller.set_opened(!1);this._backEdgePuller.set_snapDuration(a);a=this._enabled&&this._popSwipeEnabled&&this.get_stackSize()>1;this._backEdgePuller.enabled=a},get_styleContext:function(){return ln},__pushTransition:null,get_pushTransition:function(){return this.__pushTransition},set_pushTransition:function(a){if(!this.setStyle("pushTransition")||this.__pushTransition==a)return this.__pushTransition;
this._previousClearStyle=m(this,this.clearStyle_pushTransition);this.__pushTransition=a;this.setInvalid(x.STYLES);return this.__pushTransition},clearStyle_pushTransition:function(){this.set_pushTransition(null);return this.get_pushTransition()},__popTransition:null,get_popTransition:function(){return this.__popTransition},set_popTransition:function(a){if(!this.setStyle("popTransition")||this.__popTransition==a)return this.__popTransition;this._previousClearStyle=m(this,this.clearStyle_popTransition);
this.__popTransition=a;this.setInvalid(x.STYLES);return this.__popTransition},clearStyle_popTransition:function(){this.set_popTransition(null);return this.get_popTransition()},__replaceTransition:null,get_replaceTransition:function(){return this.__replaceTransition},set_replaceTransition:function(a){if(!this.setStyle("replaceTransition")||this.__replaceTransition==a)return this.__replaceTransition;this._previousClearStyle=m(this,this.clearStyle_replaceTransition);this.__replaceTransition=a;this.setInvalid(x.STYLES);
return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);return this.get_replaceTransition()},__class__:ln,__properties__:I(Dd.prototype.__properties__,{set_popSwipeActiveEdgeSize:"set_popSwipeActiveEdgeSize",get_popSwipeActiveEdgeSize:"get_popSwipeActiveEdgeSize",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",set_popSwipeEnabled:"set_popSwipeEnabled",get_popSwipeEnabled:"get_popSwipeEnabled",set_rootItemID:"set_rootItemID",
get_rootItemID:"get_rootItemID",get_stackSize:"get_stackSize",set_replaceTransition:"set_replaceTransition",get_replaceTransition:"get_replaceTransition",set_popTransition:"set_popTransition",get_popTransition:"get_popTransition",set_pushTransition:"set_pushTransition",get_pushTransition:"get_pushTransition"})});var lm=function(a,b,c,d){this.id=a;this.inject=b;this.viewData=c;this.transition=d};r["feathers.controls.navigators._StackNavigator.HistoryItem"]=lm;lm.__name__="feathers.controls.navigators._StackNavigator.HistoryItem";
lm.prototype={id:null,inject:null,viewData:null,transition:null,__class__:lm};var eg=function(){this.internalID=L.string(eg.internalIDCounter);eg.internalIDCounter++};r["feathers.controls.navigators.TabItem"]=eg;eg.__name__="feathers.controls.navigators.TabItem";eg.withClass=function(a,b){var c=new eg;c.text=a;c.viewFactory=jm.fromClass(b);return c};eg.withFunction=function(a,b){var c=new eg;c.text=a;c.viewFactory=jm.fromFunction(b);return c};eg.withDisplayObject=function(a,b){var c=new eg;c.text=
a;c.viewFactory=jm.fromDisplayObject(b);return c};eg.withFactory=function(a,b){var c=new eg;c.text=a;c.viewFactory=b;return c};eg.prototype={internalID:null,text:null,viewFactory:null,getView:function(a){return this.viewFactory.create()},returnView:function(a){this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},__class__:eg};var Tg=function(a){this.__customTabBarVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__tabBarPosition=ja.BOTTOM;this._ignoreSelectionChange=
!1;this._previousCustomTabBarVariant=null;this._swipeEnabled=this._simulateTouch=!1;this._selectedItem=null;this._activeItemIndex=this._selectedIndex=-1;this.initializeTabNavigatorTheme();Dd.call(this);this.set_dataProvider(a);this._viewsContainer=new sc;this.addChild(this._viewsContainer)};r["feathers.controls.navigators.TabNavigator"]=Tg;Tg.__name__="feathers.controls.navigators.TabNavigator";Tg.__interfaces__=[ii,Vi];Tg.__super__=Dd;Tg.prototype=I(Dd.prototype,{tabBar:null,_previousEdgePuller:null,
_nextEdgePuller:null,_dataProvider:null,get_dataProvider:function(){return this._dataProvider},set_dataProvider:function(a){if(this._dataProvider==a)return this._dataProvider;if(this._dataProvider!=null)if(this._dataProvider.removeEventListener("addItem",m(this,this.tabNavigator_dataProvider_addItemHandler)),this._dataProvider.removeEventListener("removeItem",m(this,this.tabNavigator_dataProvider_removeItemHandler)),this._dataProvider.removeEventListener("replaceItem",m(this,this.tabNavigator_dataProvider_replaceItemHandler)),
this._dataProvider.removeEventListener("removeAll",m(this,this.tabNavigator_dataProvider_removeAllHandler)),this._dataProvider.removeEventListener("reset",m(this,this.tabNavigator_dataProvider_resetHandler)),a==null)this.removeAllItems();else for(var b=this._dataProvider.iterator();b.hasNext();){var c=b.next();this.removeItemInternal(c.internalID)}this._dataProvider=a;if(this._dataProvider!=null){for(b=this._dataProvider.iterator();b.hasNext();)c=b.next(),this.addItemInternal(c.internalID,c);this._dataProvider.addEventListener("addItem",
m(this,this.tabNavigator_dataProvider_addItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeItem",m(this,this.tabNavigator_dataProvider_removeItemHandler),!1,0,!0);this._dataProvider.addEventListener("replaceItem",m(this,this.tabNavigator_dataProvider_replaceItemHandler),!1,0,!0);this._dataProvider.addEventListener("removeAll",m(this,this.tabNavigator_dataProvider_removeAllHandler),!1,0,!0);this._dataProvider.addEventListener("reset",m(this,this.tabNavigator_dataProvider_resetHandler),
!1,0,!0)}this.setInvalid(x.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);W.dispatch(this,"dataChange");return this._dataProvider},_activeItemIndex:null,_selectedIndex:null,get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){this._dataProvider==null&&(a=-1);if(this._selectedIndex==a)return this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._selectedIndex==-1?null:this._dataProvider.get(this._selectedIndex);
this.setInvalid(x.SELECTION);return this._selectedIndex},get_maxSelectedIndex:function(){return this._dataProvider==null?-1:this._dataProvider.get_length()-1},_selectedItem:null,get_selectedItem:function(){return this._selectedItem},set_selectedItem:function(a){if(this._dataProvider==null)return this.set_selectedIndex(-1),this._selectedItem;this.set_selectedIndex(this._dataProvider.indexOf(a));return this._selectedItem},_swipeEnabled:null,get_swipeEnabled:function(){return this._swipeEnabled},set_swipeEnabled:function(a){if(this._swipeEnabled==
a)return this._swipeEnabled;this._swipeEnabled=a;this.setInvalid(x.DATA);return this._swipeEnabled},_simulateTouch:null,_dragTransitionContext:null,get_simulateTouch:function(){return this._simulateTouch},set_simulateTouch:function(a){if(this._simulateTouch==a)return this._simulateTouch;this._simulateTouch=a;this.setInvalid(x.DATA);return this._simulateTouch},_previousCustomTabBarVariant:null,_oldTabBarFactory:null,_tabBarFactory:null,get_tabBarFactory:function(){return this._tabBarFactory},set_tabBarFactory:function(a){if(this._tabBarFactory==
a)return this._tabBarFactory;this._tabBarFactory=a;this.setInvalid(Tg.INVALIDATION_FLAG_TAB_BAR_FACTORY);return this._tabBarFactory},_ignoreSelectionChange:null,dispose:function(){this._pendingItemTransition=this._pendingItemID=null;this._transitionActive=!1;this._activeTransition!=null&&(this._activeTransition.removeEventListener("complete",m(this,this.transition_completeHandler)),this._activeTransition.removeEventListener("cancel",m(this,this.transition_cancelHandler)),this._activeTransition.stop());
this.destroyTabBar();this._activeItemView=this._activeItemID=null;this.set_dataProvider(null);Dd.prototype.dispose.call(this)},initialize:function(){Dd.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new fg(this,ja.LEFT),this._previousEdgePuller.addEventListener("opening",m(this,this.tabNavigator_previousEdgePuller_openingHandler)),this._previousEdgePuller.addEventListener("cancel",m(this,this.tabNavigator_previousEdgePuller_cancelHandler)),this._previousEdgePuller.addEventListener("open",
m(this,this.tabNavigator_previousEdgePuller_openHandler)));this._nextEdgePuller==null&&(this._nextEdgePuller=new fg(this,ja.RIGHT),this._nextEdgePuller.addEventListener("opening",m(this,this.tabNavigator_nextEdgePuller_openingHandler)),this._nextEdgePuller.addEventListener("cancel",m(this,this.tabNavigator_nextEdgePuller_cancelHandler)),this._nextEdgePuller.addEventListener("open",m(this,this.tabNavigator_nextEdgePuller_openHandler)))},itemToText:function(a){return a.text},initializeTabNavigatorTheme:function(){pu.initialize()},
update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION);this._previousCustomTabBarVariant!=this.get_customTabBarVariant()&&this.setInvalidationFlag(Tg.INVALIDATION_FLAG_TAB_BAR_FACTORY);var c=this.isInvalid(Tg.INVALIDATION_FLAG_TAB_BAR_FACTORY);c&&this.createTabBar();if(a||c){this.tabBar.itemToText=m(this,this.itemToText);var d=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.tabBar.set_dataProvider(this._dataProvider);this._ignoreSelectionChange=d}a&&(this._previousEdgePuller.simulateTouch=
this._simulateTouch,this._nextEdgePuller.simulateTouch=this._simulateTouch);(a||b||c)&&this.refreshSelection();Dd.prototype.update.call(this);this._previousCustomTabBarVariant=this.get_customTabBarVariant()},measure:function(){this.get_explicitWidth()!=null?this.tabBar.set_width(this.get_explicitWidth()):this._autoSizeMode==Fe.STAGE&&this.stage!=null?this.tabBar.set_width(this.stage.stageWidth):this.tabBar.resetWidth();this.tabBar.validateNow();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,
this.tabBar.get_width());switch(this.get_tabBarPosition()._hx_index){case 0:this.topContentOffset+=this.tabBar.get_height()+this.get_gap();break;case 2:this.bottomContentOffset+=this.tabBar.get_height()+this.get_gap();break;default:throw new rb("Invalid tabBarPosition "+L.string(this.get_tabBarPosition()));}return Dd.prototype.measure.call(this)},createTabBar:function(){this.destroyTabBar();var a=this._tabBarFactory!=null?this._tabBarFactory:Tg.defaultTabBarFactory;this._oldTabBarFactory=a;this.tabBar=
a.create();this.tabBar.get_variant()==null&&this.tabBar.set_variant(this.get_customTabBarVariant()!=null?this.get_customTabBarVariant():Tg.CHILD_VARIANT_TAB_BAR);this.tabBar.addEventListener("itemTrigger",m(this,this.tabNavigator_tabBar_itemTriggerHandler));this.tabBar.addEventListener("change",m(this,this.tabNavigator_tabBar_changeHandler));this.addChild(this.tabBar)},destroyTabBar:function(){this.tabBar!=null&&(this.tabBar.removeEventListener("itemTrigger",m(this,this.tabNavigator_tabBar_itemTriggerHandler)),
this.tabBar.removeEventListener("change",m(this,this.tabNavigator_tabBar_changeHandler)),this.removeChild(this.tabBar),this._oldTabBarFactory.destroy!=null&&this._oldTabBarFactory.destroy(this.tabBar),this.tabBar=this._oldTabBarFactory=null)},layoutContent:function(){this.tabBar.set_x(0);this.tabBar.set_width(this.actualWidth);this.tabBar.validateNow();switch(this.get_tabBarPosition()._hx_index){case 0:this.tabBar.set_y(0);break;case 2:this.tabBar.set_y(this.actualHeight-this.tabBar.get_height());
break;default:throw new rb("Invalid tabBarPosition "+L.string(this.get_tabBarPosition()));}Dd.prototype.layoutContent.call(this)},getView:function(a){return u.__cast(this._addedItems.h[a],eg).getView(this)},disposeView:function(a,b){u.__cast(this._addedItems.h[a],eg).returnView(b)},refreshSelection:function(){var a=this,b=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;this.tabBar.set_selectedIndex(this._selectedIndex);this._ignoreSelectionChange=b;if(this._selectedItem==null)this._activeItemIndex=
-1,this.get_activeItemID()!=null&&this.clearActiveItemInternal();else if(this._selectedItem!=null&&(b=this._activeItemIndex,this._activeItemIndex=this._selectedIndex,!this._previousEdgePuller.get_active()&&!this._nextEdgePuller.get_active()&&(this._transitionActive?this._nextViewInTransitionID:this._activeItemID)!=this._selectedItem.internalID)){var c=null;b!=-1&&b!=this._selectedIndex&&(c=b<this._selectedIndex?this.get_nextTransition():this.get_previousTransition());this.runWithInvalidationFlagsOnly(function(){a.showItemInternal(a._selectedItem.internalID,
c)})}b=this._enabled&&this._swipeEnabled&&this._selectedIndex>0&&!this._nextEdgePuller.get_active();this._previousEdgePuller.enabled=b;b=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex()&&!this._previousEdgePuller.get_active();this._nextEdgePuller.enabled=b},startPreviousDragTransition:function(a,b){var c=this;a=this.get_previousTransition()(a,b);this._previousEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new rl(a,this._previousEdgePuller,
"change",function(d){return c._dragTransitionContext.set_position(c._previousEdgePuller.get_pullDistance()/c.actualWidth)})},startNextDragTransition:function(a,b){var c=this;a=this.get_nextTransition()(a,b);this._nextEdgePuller.set_snapDuration(a.get_duration());return this._dragTransitionContext=new rl(a,this._nextEdgePuller,"change",function(d){return c._dragTransitionContext.set_position(c._nextEdgePuller.get_pullDistance()/c.actualWidth)})},tabNavigator_tabBar_changeHandler:function(a){this._ignoreSelectionChange||
this.set_selectedIndex(this.tabBar.get_selectedIndex())},tabNavigator_tabBar_itemTriggerHandler:function(a){this.dispatchEvent(a)},tabNavigator_dataProvider_addItemHandler:function(a){var b=u.__cast(a.addedItem,eg);this.addItemInternal(b.internalID,b);this._selectedIndex>=a.index?this.set_selectedIndex(this.get_selectedIndex()+1):this._selectedIndex==-1&&this.set_selectedIndex(0)},tabNavigator_dataProvider_removeItemHandler:function(a){var b=u.__cast(a.removedItem,eg);this.removeItemInternal(b.internalID);
this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this._selectedIndex>=a.index&&this.set_selectedIndex(this.get_selectedIndex()-1)},tabNavigator_dataProvider_replaceItemHandler:function(a){var b=u.__cast(a.addedItem,eg),c=u.__cast(a.removedItem,eg);this.removeItemInternal(c.internalID);this.addItemInternal(b.internalID,b);this._selectedIndex==a.index&&this.set_selectedItem(this._dataProvider.get(this._selectedIndex))},tabNavigator_dataProvider_removeAllHandler:function(a){this.set_selectedIndex(-1);
a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},tabNavigator_dataProvider_resetHandler:function(a){this.set_selectedIndex(-1);a=Object.keys(this._addedItems.h);for(var b=a.length,c=0;c<b;){var d=a[c++];this.removeItemInternal(this._addedItems.h[d].internalID)}},tabNavigator_previousEdgePuller_openingHandler:function(a){var b=this._selectedIndex-1;if(b<0)a.preventDefault();else{var c=this._previousEdgePuller.get_touchPointID();
if(c!=null){var d=Ad.forStage(this.stage);if(this._previousEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_previousTransition()!=null?(this._nextEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startPreviousDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},tabNavigator_previousEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"cancel"))},tabNavigator_previousEdgePuller_openHandler:function(a){a=this._previousEdgePuller.get_snapDuration();this._previousEdgePuller.set_snapDuration(0);this._previousEdgePuller.set_opened(!1);this._previousEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()-
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"complete"))},tabNavigator_nextEdgePuller_openingHandler:function(a){var b=this._selectedIndex+1;if(b>this.get_maxSelectedIndex())a.preventDefault();else{var c=this._nextEdgePuller.get_touchPointID();
if(c!=null){var d=Ad.forStage(this.stage);if(this._nextEdgePuller.get_touchPointIsSimulated()?!d.claimMouse(this):!d.claimTouch(c,this)){a.preventDefault();return}}this.get_nextTransition()!=null?(this._previousEdgePuller.enabled=!1,a=this._dataProvider.get(b),this.showItemInternal(a.internalID,m(this,this.startNextDragTransition))):(a.preventDefault(),this.set_selectedIndex(b))}},tabNavigator_nextEdgePuller_cancelHandler:function(a){this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&
this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"cancel"))},tabNavigator_nextEdgePuller_openHandler:function(a){a=this._nextEdgePuller.get_snapDuration();this._nextEdgePuller.set_snapDuration(0);this._nextEdgePuller.set_opened(!1);this._nextEdgePuller.set_snapDuration(a);this.set_selectedIndex(this.get_selectedIndex()+
1);this._previousEdgePuller.enabled=this._enabled&&this._swipeEnabled&&this._selectedIndex>0;a=this._enabled&&this._swipeEnabled&&this._selectedIndex<this.get_maxSelectedIndex();this._nextEdgePuller.enabled=a;a=this._dragTransitionContext;this._dragTransitionContext=null;a!=null&&(a.set_dispatcher(null),W.dispatch(a,"complete"))},get_styleContext:function(){return Tg},__tabBarPosition:null,get_tabBarPosition:function(){return this.__tabBarPosition},set_tabBarPosition:function(a){if(!this.setStyle("tabBarPosition")||
this.__tabBarPosition==a)return this.__tabBarPosition;this._previousClearStyle=m(this,this.clearStyle_tabBarPosition);this.__tabBarPosition=a;this.setInvalid(x.STYLES);return this.__tabBarPosition},clearStyle_tabBarPosition:function(){this.set_tabBarPosition(ja.BOTTOM);return this.get_tabBarPosition()},__previousTransition:null,get_previousTransition:function(){return this.__previousTransition},set_previousTransition:function(a){if(!this.setStyle("previousTransition")||this.__previousTransition==
a)return this.__previousTransition;this._previousClearStyle=m(this,this.clearStyle_previousTransition);this.__previousTransition=a;this.setInvalid(x.STYLES);return this.__previousTransition},clearStyle_previousTransition:function(){this.set_previousTransition(null);return this.get_previousTransition()},__nextTransition:null,get_nextTransition:function(){return this.__nextTransition},set_nextTransition:function(a){if(!this.setStyle("nextTransition")||this.__nextTransition==a)return this.__nextTransition;
this._previousClearStyle=m(this,this.clearStyle_nextTransition);this.__nextTransition=a;this.setInvalid(x.STYLES);return this.__nextTransition},clearStyle_nextTransition:function(){this.set_nextTransition(null);return this.get_nextTransition()},__gap:null,get_gap:function(){return this.__gap},set_gap:function(a){if(!this.setStyle("gap")||this.__gap==a)return this.__gap;this._previousClearStyle=m(this,this.clearStyle_gap);this.__gap=a;this.setInvalid(x.STYLES);return this.__gap},clearStyle_gap:function(){this.set_gap(0);
return this.get_gap()},__customTabBarVariant:null,get_customTabBarVariant:function(){return this.__customTabBarVariant},set_customTabBarVariant:function(a){if(!this.setStyle("customTabBarVariant")||this.__customTabBarVariant==a)return this.__customTabBarVariant;this._previousClearStyle=m(this,this.clearStyle_customTabBarVariant);this.__customTabBarVariant=a;this.setInvalid(x.STYLES);return this.__customTabBarVariant},clearStyle_customTabBarVariant:function(){this.set_customTabBarVariant(null);return this.get_customTabBarVariant()},
__class__:Tg,__properties__:I(Dd.prototype.__properties__,{set_tabBarFactory:"set_tabBarFactory",get_tabBarFactory:"get_tabBarFactory",set_customTabBarVariant:"set_customTabBarVariant",get_customTabBarVariant:"get_customTabBarVariant",set_gap:"set_gap",get_gap:"get_gap",set_nextTransition:"set_nextTransition",get_nextTransition:"get_nextTransition",set_previousTransition:"set_previousTransition",get_previousTransition:"get_previousTransition",set_simulateTouch:"set_simulateTouch",get_simulateTouch:"get_simulateTouch",
set_swipeEnabled:"set_swipeEnabled",get_swipeEnabled:"get_swipeEnabled",set_tabBarPosition:"set_tabBarPosition",get_tabBarPosition:"get_tabBarPosition",set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem",get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_dataProvider:"set_dataProvider",get_dataProvider:"get_dataProvider"})});var So=function(){};r["feathers.controls.popups.IPopUpAdapter"]=So;So.__name__="feathers.controls.popups.IPopUpAdapter";
So.__isInterface__=!0;So.__interfaces__=[qb];So.prototype={get_active:null,get_persistent:null,open:null,close:null,__class__:So,__properties__:{get_persistent:"get_persistent",get_active:"get_active"}};var Ek=function(){this._ignoreContentResizing=this._ignoreOriginResizing=!1;this._contentMeasurements=new Ib;this.closeOnPointerActiveOutside=!1;this._fitContentToOriginWidth=!0;this.modal=!1;this._gap=0;this.content=this.origin=null;na.call(this)};r["feathers.controls.popups.DropDownPopUpAdapter"]=
Ek;Ek.__name__="feathers.controls.popups.DropDownPopUpAdapter";Ek.__interfaces__=[So];Ek.__super__=na;Ek.prototype=I(na.prototype,{content:null,origin:null,get_active:function(){return this.content!=null},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;this.get_active()&&this.layout();return this._gap},modal:null,_fitContentToOriginWidth:null,get_fitContentToOriginWidth:function(){return this._fitContentToOriginWidth},set_fitContentToOriginWidth:function(a){if(this._fitContentToOriginWidth==
a)return this._fitContentToOriginWidth;this._fitContentToOriginWidth=a;this.get_active()&&this.layout();return this._fitContentToOriginWidth},get_persistent:function(){return!1},closeOnPointerActiveOutside:null,_stage:null,_prevOriginX:null,_prevOriginY:null,_contentMeasurements:null,_ignoreContentResizing:null,_ignoreOriginResizing:null,open:function(a,b){if(this.get_active())throw new fb("Pop-up adapter is already open. Close the previous content before opening new content.");if(b.stage==null)throw new fb("Pop-up adapter failed to open because the origin is not added to the stage.");
this._stage=b.stage;this._stage.addEventListener("mouseDown",m(this,this.dropDownPopUpAdapter_stage_mouseDownHandler),!1,0,!0);this._stage.addEventListener("touchBegin",m(this,this.dropDownPopUpAdapter_stage_touchBeginHandler),!1,0,!0);this._stage.addEventListener("resize",m(this,this.dropDownPopUpAdapter_stage_resizeHandler),!1,0,!0);this.content=a;this.content.addEventListener("enterFrame",m(this,this.dropDownPopUpAdapter_content_enterFrameHandler),!1,0,!0);this.content.addEventListener("resize",
m(this,this.dropDownPopUpAdapter_content_resizeHandler),!1,0,!0);this.content.addEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_content_removedFromStageHandler),!1,0,!0);this.origin=b;this.origin.addEventListener("resize",m(this,this.dropDownPopUpAdapter_origin_resizeHandler),!1,0,!0);this.origin.addEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_origin_removedFromStageHandler),!1,0,!0);Ub.addPopUp(this.content,this.origin,this.modal,!1);this.get_active()&&(u.__implements(this.content,
oa)&&(a=this._ignoreContentResizing,this._ignoreContentResizing=!0,this.content.validateNow(),this._ignoreContentResizing=a),this._contentMeasurements.save(this.content),this.layout(),W.dispatch(this,"open"))},close:function(){if(this.get_active()){this._stage.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_stage_resizeHandler));this._stage.removeEventListener("mouseDown",m(this,this.dropDownPopUpAdapter_stage_mouseDownHandler));this._stage.addEventListener("touchBegin",m(this,this.dropDownPopUpAdapter_stage_touchBeginHandler));
this.content.removeEventListener("enterFrame",m(this,this.dropDownPopUpAdapter_content_enterFrameHandler));this.content.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_content_resizeHandler));this.content.removeEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_content_removedFromStageHandler));this.origin.removeEventListener("resize",m(this,this.dropDownPopUpAdapter_origin_resizeHandler));this.origin.removeEventListener("removedFromStage",m(this,this.dropDownPopUpAdapter_origin_removedFromStageHandler));
var a=this.content;this._stage=this.content=this.origin=null;a.parent!=null&&a.parent.removeChild(a);this._contentMeasurements.restore(a);W.dispatch(this,"close")}},layout:function(){if(u.__implements(this.origin,oa)){var a=this._ignoreOriginResizing;this._ignoreOriginResizing=!0;this.origin.validateNow();this._ignoreOriginResizing=a}var b=Ub.forStage(this._stage).get_root();a=new Qa(this.origin.get_x(),this.origin.get_y());a=this.origin.parent.localToGlobal(a);a=b.globalToLocal(a);var c=new Qa(this.origin.get_x()+
this.origin.get_width(),this.origin.get_y()+this.origin.get_height());c=this.origin.parent.localToGlobal(c);c=b.globalToLocal(c);this._prevOriginX=a.x;this._prevOriginY=a.y;var d=Math.max(0,c.x-a.x),f=!1;if(this._fitContentToOriginWidth&&u.__implements(this.content,Kb)){var g=this.content;g.get_minWidth()<d&&(g.set_minWidth(d),f=!0)}g=this._ignoreContentResizing;this._ignoreContentResizing=!0;u.__implements(this.content,oa)&&this.content.validateNow();this._fitContentToOriginWidth&&!f&&this.content.get_width()<
d&&this.content.set_width(d);this._ignoreContentResizing=g;d=b.globalToLocal(new Qa);b=b.globalToLocal(new Qa(this._stage.stageWidth,this._stage.stageHeight));f=a.x;f<d.x?f=d.x:f+this.content.get_width()>b.x&&(f=Math.max(d.x,b.x-this.content.get_width()));this.content.set_x(f);c=c.y+this._gap;c+this.content.get_height()>b.y&&(c=Math.max(d.y,a.y-this._gap-this.content.get_height()));this.content.set_y(c)},dropDownPopUpAdapter_origin_removedFromStageHandler:function(a){this.get_active()&&this.close()},
dropDownPopUpAdapter_content_removedFromStageHandler:function(a){this.get_active()&&this.close()},dropDownPopUpAdapter_stage_resizeHandler:function(a){this.get_active()&&(a=u.__cast(a.currentTarget,cd),Uj.forStage(a).validateNow(),this.layout())},dropDownPopUpAdapter_content_resizeHandler:function(a){this.get_active()&&!this._ignoreContentResizing&&this.layout()},dropDownPopUpAdapter_origin_resizeHandler:function(a){this.get_active()&&!this._ignoreOriginResizing&&this.layout()},dropDownPopUpAdapter_content_enterFrameHandler:function(a){if(this.get_active()){a=
Ub.forStage(this._stage).get_root();var b=new Qa(this.origin.get_x(),this.origin.get_y());b=this.origin.parent.localToGlobal(b);b=a.globalToLocal(b);b.x==this._prevOriginX&&b.y==this._prevOriginY||this.layout()}},dropDownPopUpAdapter_stage_mouseDownHandler:function(a){if(this.closeOnPointerActiveOutside){a=u.__cast(a.target,ea);if(this.content instanceof lb){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof lb){if(b=this.origin,b.contains(a))return}else if(this.origin==
a)return;this.close()}},dropDownPopUpAdapter_stage_touchBeginHandler:function(a){if(this.closeOnPointerActiveOutside&&!a.isPrimaryTouchPoint){a=u.__cast(a.target,ea);if(this.content instanceof lb){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof lb){if(b=this.origin,b.contains(a))return}else if(this.origin==a)return;this.close()}},__class__:Ek,__properties__:{get_persistent:"get_persistent",set_fitContentToOriginWidth:"set_fitContentToOriginWidth",
get_fitContentToOriginWidth:"get_fitContentToOriginWidth",set_gap:"set_gap",get_gap:"get_gap",get_active:"get_active"}});var Yj=function(){};r["feathers.controls.supportClasses.IViewPort"]=Yj;Yj.__name__="feathers.controls.supportClasses.IViewPort";Yj.__isInterface__=!0;Yj.__interfaces__=[Kb,oa,jb];Yj.prototype={get_visibleWidth:null,set_visibleWidth:null,get_visibleHeight:null,set_visibleHeight:null,get_minVisibleWidth:null,set_minVisibleWidth:null,get_minVisibleHeight:null,set_minVisibleHeight:null,
get_maxVisibleWidth:null,set_maxVisibleWidth:null,get_maxVisibleHeight:null,set_maxVisibleHeight:null,get_scrollX:null,set_scrollX:null,get_scrollY:null,set_scrollY:null,__class__:Yj,__properties__:{set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleHeight:"set_minVisibleHeight",
get_minVisibleHeight:"get_minVisibleHeight",set_minVisibleWidth:"set_minVisibleWidth",get_minVisibleWidth:"get_minVisibleWidth",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth"}};var Dk=function(){this._layoutActive=this._layoutChanged=!1;this._snapPositionsX=this._snapPositionsY=null;this._scrollX=this._scrollY=0;this._ignoreLayoutChanges=!1;this._layoutResult=new Cg;this._layoutMeasurements=new Ib;
this._layoutItems=[];this._explicitVisibleHeight=this._layout=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._actualMinVisibleWidth=0;wa.call(this);this._viewPortBackground=new za;this._viewPortBackground.get_graphics().beginFill(16711935,0);this._viewPortBackground.get_graphics().drawRect(0,0,1,1);this._viewPortBackground.get_graphics().endFill();
this.addChildAt(this._viewPortBackground,0)};r["feathers.controls.supportClasses.AdvancedLayoutViewPort"]=Dk;Dk.__name__="feathers.controls.supportClasses.AdvancedLayoutViewPort";Dk.__interfaces__=[Yj];Dk.__super__=wa;Dk.prototype=I(wa.prototype,{_viewPortBackground:null,_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==
a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;
if(a==null)throw new rb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;
this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=
0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==a)return this._maxVisibleHeight;if(a==null)throw new rb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);
return this._explicitVisibleWidth},_layout:null,get_layout:function(){return this._layout},set_layout:function(a){if(this._layout==a)return this._layout;this._layout!=null&&(this._layout.removeEventListener("change",m(this,this.advancedLayoutViewPort_layout_changeHandler)),this._layout.removeEventListener("scroll",m(this,this.advancedLayoutViewPort_layout_scrollHandler)));this._layout=a;this._layout!=null&&(this._layout.addEventListener("change",m(this,this.advancedLayoutViewPort_layout_changeHandler)),
this._layout.addEventListener("scroll",m(this,this.advancedLayoutViewPort_layout_scrollHandler)));this.setInvalid(x.LAYOUT);return this._layout},_layoutItems:null,_layoutMeasurements:null,_layoutResult:null,_ignoreLayoutChanges:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==
a)return this._scrollY;this._scrollY=a;this.setInvalid(x.SCROLL);return this._scrollY},_snapPositionsX:null,get_snapPositionsX:function(){return this._snapPositionsX},_snapPositionsY:null,get_snapPositionsY:function(){return this._snapPositionsY},_scroller:null,get_scroller:function(){return this._scroller},set_scroller:function(a){return this._scroller==a?this._scroller:this._scroller=a},_layoutActive:null,_layoutChanged:null,refreshChildren:function(a){},update:function(){var a=this;this.refreshLayoutMeasurements();
this.refreshLayoutProperties();this.runWithInvalidationFlagsOnly(function(){a._layoutActive=!0;var b=0;do if(a._layoutChanged=!1,a.refreshLayout(),a._invalidationFlags.clear(),a._allInvalid=!1,++b,b>=10){a._layoutActive=!1;b=u.getClass(a.parent).__name__;var c=a._layout!=null?u.getClass(a._layout).__name__:"The layout";throw new fb(""+b+" is stuck in an infinite loop during layout. "+c+" may be dispatching Event.CHANGE too frequently.");}while(a._layoutChanged);a._layoutActive=!1})},refreshLayout:function(){this.refreshChildren(this._layoutItems);
this._layoutResult.reset();this._layout!=null&&this._layout.layout(this._layoutItems,this._layoutMeasurements,this._layoutResult);this.handleLayoutResult()},refreshLayoutProperties:function(){var a=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;if(u.__implements(this._layout,Oe)){var b=this._layout;b.set_scrollX(this._scrollX);b.set_scrollY(this._scrollY)}this._ignoreLayoutChanges=a},refreshLayoutMeasurements:function(){var a=this._explicitMinVisibleWidth==null,b=this._explicitMinVisibleHeight==
null,c=this._maxVisibleWidth==null,d=this._maxVisibleHeight==null;this._layoutMeasurements.width=this._explicitVisibleWidth;this._layoutMeasurements.height=this._explicitVisibleHeight;var f=this._explicitMinVisibleWidth;a&&(f=0);a=this._explicitMinVisibleHeight;b&&(a=0);b=this._maxVisibleWidth;c&&(b=1/0);c=this._maxVisibleHeight;d&&(c=1/0);this._layoutMeasurements.minWidth=f;this._layoutMeasurements.minHeight=a;this._layoutMeasurements.maxWidth=b;this._layoutMeasurements.maxHeight=c},handleLayoutResult:function(){this.saveMeasurements(this._layoutResult.contentWidth,
this._layoutResult.contentHeight,this._layoutResult.contentMinWidth,this._layoutResult.contentMinHeight);var a=this._layoutResult.viewPortHeight;this._actualVisibleWidth=this._layoutResult.viewPortWidth;this._actualVisibleHeight=a;this._actualMinVisibleWidth=this._layoutResult.contentMinWidth;this._actualMinVisibleHeight=this._layoutResult.contentMinHeight;this._viewPortBackground.set_x(Math.min(this.get_scrollX(),0));this._viewPortBackground.set_y(Math.min(this.get_scrollY(),0));this._viewPortBackground.set_width(Math.max(this.actualWidth,
this._actualVisibleWidth));this._viewPortBackground.set_height(Math.max(this.actualHeight,this._actualVisibleHeight));u.__implements(this.get_layout(),mn)?(a=this.get_layout(),this._snapPositionsX=a.getSnapPositionsX(this._layoutItems,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsX),this._snapPositionsY=a.getSnapPositionsY(this._layoutItems,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsY)):this._snapPositionsY=this._snapPositionsX=null},advancedLayoutViewPort_layout_changeHandler:function(a){this._ignoreLayoutChanges||
(this._layoutActive?this._layoutChanged=!0:this.setInvalid(x.LAYOUT))},advancedLayoutViewPort_layout_scrollHandler:function(a){this._scroller!=null&&this._scroller.get_scrolling()&&(this._scroller.applyLayoutShift(a.x,a.y),this._layoutActive?this._layoutChanged=!0:this.setInvalid(x.LAYOUT))},__class__:Dk,__properties__:I(wa.prototype.__properties__,{set_scroller:"set_scroller",get_scroller:"get_scroller",get_snapPositionsY:"get_snapPositionsY",get_snapPositionsX:"get_snapPositionsX",set_scrollY:"set_scrollY",
get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_layout:"set_layout",get_layout:"get_layout",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",
set_minVisibleWidth:"set_minVisibleWidth",get_minVisibleWidth:"get_minVisibleWidth"})});var no=function(){this._manageChildVisibility=!1;this._snapPositionsX=this._snapPositionsY=null;this._scrollX=this._scrollY=0;this._explicitVisibleHeight=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._actualMinVisibleWidth=0;sc.call(this);this._viewPortBackground=
new za;this._viewPortBackground.get_graphics().beginFill(16711935,0);this._viewPortBackground.get_graphics().drawRect(0,0,1,1);this._viewPortBackground.get_graphics().endFill();this._addChildAt(this._viewPortBackground,0)};r["feathers.controls.supportClasses.LayoutViewPort"]=no;no.__name__="feathers.controls.supportClasses.LayoutViewPort";no.__interfaces__=[Yj];no.__super__=sc;no.prototype=I(sc.prototype,{_viewPortBackground:null,_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==
null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,
get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;if(a==null)throw new rb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==
null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==
a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==
a)return this._maxVisibleHeight;if(a==null)throw new rb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==
a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;(this._manageChildVisibility||u.__implements(this._currentLayout,Oe))&&this.setInvalid(x.LAYOUT);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==
a)return this._scrollY;this._scrollY=a;(this._manageChildVisibility||u.__implements(this._currentLayout,Oe))&&this.setInvalid(x.LAYOUT);return this._scrollY},_snapPositionsX:null,get_snapPositionsX:function(){return this._snapPositionsX},_snapPositionsY:null,get_snapPositionsY:function(){return this._snapPositionsY},refreshViewPortBounds:function(){var a=this._explicitVisibleWidth==null,b=this._explicitVisibleHeight==null,c=this._explicitMinVisibleWidth==null,d=this._explicitMinVisibleHeight==null,
f=this._maxVisibleWidth==null,g=this._maxVisibleHeight==null;this._currentBackgroundSkin!=null&&Ne.resetFluidlyWithParent(this._backgroundSkinMeasurements,this._currentBackgroundSkin,this);var h=this.get_autoSizeMode()==Fe.CONTENT||this.stage==null,l=0,k=0;if(!h){k=this.globalToLocal(new Qa);var q=this.globalToLocal(new Qa(this.stage.stageWidth,this.stage.stageHeight));l=q.x-k.x;k=q.y-k.y}this._layoutMeasurements.width=a&&!h?l:this._explicitVisibleWidth;this._layoutMeasurements.height=b&&!h?k:this._explicitVisibleHeight;
a=this._explicitMinVisibleWidth;c&&(a=0);c=this._explicitMinVisibleHeight;d&&(c=0);d=this._maxVisibleWidth;f&&(d=1/0);f=this._maxVisibleHeight;g&&(f=1/0);this._currentBackgroundSkin!=null&&(this._currentBackgroundSkin.get_width()>a&&(a=this._currentBackgroundSkin.get_width()),this._currentBackgroundSkin.get_height()>c&&(c=this._currentBackgroundSkin.get_height()));this._layoutMeasurements.minWidth=a;this._layoutMeasurements.minHeight=c;this._layoutMeasurements.maxWidth=d;this._layoutMeasurements.maxHeight=
f},handleCustomLayout:function(){var a=this._ignoreLayoutChanges;this._ignoreLayoutChanges=!0;if(u.__implements(this._currentLayout,Oe)){var b=this._currentLayout;b.set_scrollX(this._scrollX);b.set_scrollY(this._scrollY)}this._ignoreLayoutChanges=a;sc.prototype.handleCustomLayout.call(this)},handleLayoutResult:function(){this.saveMeasurements(this._layoutResult.contentWidth,this._layoutResult.contentHeight,this._layoutResult.contentMinWidth,this._layoutResult.contentMinHeight);var a=this._layoutResult.viewPortHeight;
this._actualVisibleWidth=this._layoutResult.viewPortWidth;this._actualVisibleHeight=a;this._actualMinVisibleWidth=this._layoutResult.contentMinWidth;this._actualMinVisibleHeight=this._layoutResult.contentMinHeight;this._viewPortBackground.set_x(Math.min(this.get_scrollX(),0));this._viewPortBackground.set_y(Math.min(this.get_scrollY(),0));this._viewPortBackground.set_width(Math.max(this.actualWidth,this._actualVisibleWidth));this._viewPortBackground.set_height(Math.max(this.actualHeight,this._actualVisibleHeight));
u.__implements(this.get_layout(),mn)?(a=this.get_layout(),this._snapPositionsX=a.getSnapPositionsX(this.items,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsX),this._snapPositionsY=a.getSnapPositionsY(this.items,this._actualVisibleWidth,this._actualVisibleHeight,this._snapPositionsY)):this._snapPositionsY=this._snapPositionsX=null},_manageChildVisibility:null,get_manageChildVisibility:function(){return this._manageChildVisibility},set_manageChildVisibility:function(a){if(this._manageChildVisibility==
a)return this._manageChildVisibility;if(this._manageChildVisibility=a)this.setInvalid(x.LAYOUT);else{a=0;for(var b=this.items;a<b.length;){var c=b[a];++a;c.set_visible(!0)}}return this._manageChildVisibility},update:function(){var a=this.isInvalid(x.LAYOUT),b=this.isInvalid(x.SIZE),c=this.isInvalid(x.SCROLL);sc.prototype.update.call(this);if((a||b||c)&&this._manageChildVisibility){a=this._scrollX+this._actualVisibleWidth;b=this._scrollY+this._actualVisibleHeight;c=0;for(var d=this.items;c<d.length;){var f=
d[c];++c;f.set_visible(!(f.get_x()>a||f.get_x()+f.get_width()<this._scrollX||f.get_y()>b||f.get_y()+f.get_height()<this._scrollY))}}},refreshChildVisibility:function(){if(this._manageChildVisibility)for(var a=this._scrollX+this._actualVisibleWidth,b=this._scrollY+this._actualVisibleHeight,c=0,d=this.items;c<d.length;){var f=d[c];++c;f.set_visible(!(f.get_x()>a||f.get_x()+f.get_width()<this._scrollX||f.get_y()>b||f.get_y()+f.get_height()<this._scrollY))}},removeChild:function(a){this._manageChildVisibility&&
a!=null&&a.set_visible(!0);return sc.prototype.removeChild.call(this,a)},removeChildAt:function(a){a=sc.prototype.removeChildAt.call(this,a);this._manageChildVisibility&&a!=null&&a.set_visible(!0);return a},__class__:no,__properties__:I(sc.prototype.__properties__,{set_manageChildVisibility:"set_manageChildVisibility",get_manageChildVisibility:"get_manageChildVisibility",get_snapPositionsY:"get_snapPositionsY",get_snapPositionsX:"get_snapPositionsX",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",
set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleWidth:"set_minVisibleWidth",
get_minVisibleWidth:"get_minVisibleWidth"})});var Ko=function(){this._textFieldHasFocus=this._ignoreTextFieldScroll=!1;this._pendingSelectionAnchorIndex=this._pendingSelectionActiveIndex=-1;this._scrollX=this._scrollY=0;this._explicitVisibleHeight=null;this._actualVisibleHeight=0;this._maxVisibleHeight=1/0;this._actualMinVisibleHeight=0;this._explicitVisibleWidth=null;this._actualVisibleWidth=0;this._maxVisibleWidth=1/0;this._explicitMinVisibleWidth=null;this._paddingTop=this._paddingRight=this._paddingBottom=
this._paddingLeft=this._actualMinVisibleWidth=0;this._embedFonts=!1;this._previousText=this._previousTextFormat=this._previousWidth=this._savedLineMetrics=null;this._smoothScrolling=this._updatedTextStyles=!1;this._selectable=!0;this._maxChars=0;this._wordWrap=this._multiline=this._displayAsPassword=!1;this._textFieldType=0;wa.call(this);this.addEventListener("focusIn",m(this,this.textFieldViewPort_focusInHandler))};r["feathers.controls.supportClasses.TextFieldViewPort"]=Ko;Ko.__name__="feathers.controls.supportClasses.TextFieldViewPort";
Ko.__interfaces__=[hi,tj,de,Yj];Ko.__super__=wa;Ko.prototype=I(wa.prototype,{_textField:null,get_textField:function(){return this._textField},_textFieldType:null,get_textFieldType:function(){return this._textFieldType},set_textFieldType:function(a){if(this._textFieldType==a)return this._textFieldType;this._textFieldType=a;this.setInvalid(x.DATA);return this._textFieldType},_text:null,get_text:function(){return this._text},set_text:function(a){if(this._text==a)return this._text;this._text=a;this.setInvalid(x.DATA);
W.dispatch(this,"change");return this._text},get_baseline:function(){if(this._textField==null)return 0;if(!(this._text!=null&&this._text.length>0)){this.get_textField().set_text("\u200b");var a=this.get_textField().get_y()+this.get_textField().getLineMetrics(0).ascent;this.get_textField().set_text("");return a}return this._textField.get_y()+this._textField.getLineMetrics(0).ascent},_wordWrap:null,get_wordWrap:function(){return this._wordWrap},set_wordWrap:function(a){if(this._wordWrap==a)return this._wordWrap;
this._wordWrap=a;this.setInvalid(x.DATA);return this._wordWrap},_multiline:null,get_multiline:function(){return this._multiline},set_multiline:function(a){if(this._multiline==a)return this._multiline;this._multiline=a;this.setInvalid(x.DATA);return this._multiline},___restrict:null,get_restrict:function(){return this.___restrict},set_restrict:function(a){if(this.___restrict==a)return this.___restrict;this.___restrict=a;this.setInvalid(x.DATA);return this.___restrict},_displayAsPassword:null,get_displayAsPassword:function(){return this._displayAsPassword},
set_displayAsPassword:function(a){if(this._displayAsPassword==a)return this._displayAsPassword;this._displayAsPassword=a;this.setInvalid(x.DATA);return this._displayAsPassword},_maxChars:null,get_maxChars:function(){return this._maxChars},set_maxChars:function(a){if(this._maxChars==a)return this._maxChars;this._maxChars=a;this.setInvalid(x.DATA);return this._maxChars},_selectable:null,get_selectable:function(){return this._selectable},set_selectable:function(a){if(this._selectable==a)return this._selectable;
this._selectable=a;this.setInvalid(x.DATA);return this._selectable},_smoothScrolling:null,get_smoothScrolling:function(){return this._smoothScrolling},set_smoothScrolling:function(a){if(this._smoothScrolling==a)return this._smoothScrolling;this._smoothScrolling=a;this.setInvalid(x.DATA);return this._smoothScrolling},_updatedTextStyles:null,_previousText:null,_previousTextFormat:null,_previousWidth:null,_savedLineMetrics:null,_textMeasuredWidth:null,_textMeasuredHeight:null,_textFormat:null,get_textFormat:function(){return this._textFormat},
set_textFormat:function(a){if(this._textFormat==a)return this._textFormat;this._textFormat=a;this.setInvalid(x.STYLES);return this._textFormat},_embedFonts:null,get_embedFonts:function(){return this._embedFonts},set_embedFonts:function(a){if(this._embedFonts==a)return this._embedFonts;this._embedFonts=a;this.setInvalid(x.STYLES);return this._embedFonts},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=
a;this.setInvalid(x.STYLES);return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;this.setInvalid(x.STYLES);return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;this.setInvalid(x.STYLES);return this._paddingBottom},
_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;this.setInvalid(x.STYLES);return this._paddingLeft},get_stageFocusTarget:function(){return this._textField},_actualMinVisibleWidth:null,_explicitMinVisibleWidth:null,get_minVisibleWidth:function(){return this._explicitMinVisibleWidth==null?this._actualMinVisibleWidth:this._explicitMinVisibleWidth},set_minVisibleWidth:function(a){if(this._explicitMinVisibleWidth==
a)return this._explicitMinVisibleWidth;var b=this._explicitMinVisibleWidth;this._explicitMinVisibleWidth=a;a==null?(this._actualMinVisibleWidth=0,this.setInvalid(x.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleWidth},_maxVisibleWidth:null,get_maxVisibleWidth:function(){return this._maxVisibleWidth},set_maxVisibleWidth:function(a){if(this._maxVisibleWidth==a)return this._maxVisibleWidth;
if(a==null)throw new rb("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(x.SIZE);return this._maxVisibleWidth},_actualVisibleWidth:null,_explicitVisibleWidth:null,get_visibleWidth:function(){return this._explicitVisibleWidth==null?this._actualVisibleWidth:this._explicitVisibleWidth},set_visibleWidth:function(a){if(this._explicitVisibleWidth==a)return this._explicitVisibleWidth;
this._explicitVisibleWidth=a;this._actualVisibleWidth!=a&&this.setInvalid(x.SIZE);return this._explicitVisibleWidth},_actualMinVisibleHeight:null,_explicitMinVisibleHeight:null,get_minVisibleHeight:function(){return this._explicitMinVisibleHeight==null?this._actualMinVisibleHeight:this._explicitMinVisibleHeight},set_minVisibleHeight:function(a){if(this._explicitMinVisibleHeight==a)return this._explicitMinVisibleHeight;var b=this._explicitMinVisibleHeight;this._explicitMinVisibleHeight=a;a==null?(this._actualMinVisibleHeight=
0,this.setInvalid(x.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE));return this._explicitMinVisibleHeight},_maxVisibleHeight:null,get_maxVisibleHeight:function(){return this._maxVisibleHeight},set_maxVisibleHeight:function(a){if(this._maxVisibleHeight==a)return this._maxVisibleHeight;if(a==null)throw new rb("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(x.SIZE);return this._maxVisibleHeight},_actualVisibleHeight:null,_explicitVisibleHeight:null,get_visibleHeight:function(){return this._explicitVisibleHeight==null?this._actualVisibleHeight:this._explicitVisibleHeight},set_visibleHeight:function(a){if(this._explicitVisibleHeight==a)return this._explicitVisibleHeight;this._explicitVisibleHeight=a;this._actualVisibleHeight!=a&&this.setInvalid(x.SIZE);
return this._explicitVisibleWidth},_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;this.setInvalid(x.SCROLL);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==a)return this._scrollY;this._scrollY=a;this.setInvalid(x.SCROLL);return this._scrollY},_pendingSelectionAnchorIndex:null,get_selectionAnchorIndex:function(){return this._textField!=
null&&this._pendingSelectionAnchorIndex==-1?this._textField.get_caretIndex()==this._textField.get_selectionBeginIndex()?this._textField.get_selectionEndIndex():this._textField.get_selectionBeginIndex():this._pendingSelectionAnchorIndex},_pendingSelectionActiveIndex:null,get_selectionActiveIndex:function(){return this._textField!=null&&this._pendingSelectionActiveIndex==-1?this._textField.get_caretIndex():this._pendingSelectionActiveIndex},_textFieldHasFocus:null,_ignoreTextFieldScroll:null,setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},selectRange:function(a,b){this._pendingSelectionAnchorIndex=a;this._pendingSelectionActiveIndex=b;this.setInvalid(x.SELECTION)},initialize:function(){wa.prototype.initialize.call(this);this._textField==null&&(this._textField=new Jc,this.addChild(this._textField));this._textField.set_selectable(!0);this._textField.set_tabEnabled(!1);this._textField.set_mouseWheelEnabled(!1);this._textField.addEventListener("change",m(this,
this.textFieldViewPort_textField_changeHandler));this._textField.addEventListener("scroll",m(this,this.textFieldViewPort_textField_scrollHandler));this._textField.addEventListener("focusIn",m(this,this.textFieldViewPort_textField_focusInHandler));this._textField.addEventListener("focusOut",m(this,this.textFieldViewPort_textField_focusOutHandler))},update:function(){var a=this.isInvalid(x.DATA),b=this.isInvalid(x.SELECTION),c=this.isInvalid(x.SIZE),d=this.isInvalid(x.STYLES);this._updatedTextStyles=
!1;var f=this._ignoreTextFieldScroll;this._ignoreTextFieldScroll=!0;d&&this.refreshTextStyles();(a||c||d)&&this.refreshText();this.measure();b&&this.refreshSelection();this.layoutTextField();this._ignoreTextFieldScroll=f},measureSelf:function(){var a=this._explicitVisibleWidth==null,b=this.get_explicitHeight()==null,c=this._explicitMinVisibleWidth==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;var h=
this._explicitVisibleWidth;a&&(h=this._paddingLeft+this._paddingRight);a=this.get_explicitHeight();b&&(a=this._textMeasuredHeight+this._paddingTop+this._paddingBottom);b=this._explicitMinVisibleWidth;c&&(b=this._paddingLeft+this._paddingRight);c=this.get_explicitMinHeight();d&&(c=this._textMeasuredHeight+this._paddingTop+this._paddingBottom);d=this.get_explicitMaxWidth();f&&(d=1/0);f=this.get_explicitMaxHeight();g&&(f=1/0);return this.saveMeasurements(h,a,b,c,d,f)},measure:function(){var a=this.measureSelf(),
b=this._explicitVisibleHeight==null,c=this._explicitMinVisibleWidth==null,d=this._explicitMinVisibleHeight==null;this._actualVisibleWidth=this._explicitVisibleWidth==null?this.actualWidth:this._explicitVisibleWidth;this._actualVisibleHeight=b?this.actualHeight:this._explicitVisibleHeight;this._actualMinVisibleWidth=c?this.actualMinWidth:this._explicitMinVisibleWidth;this._actualMinVisibleHeight=d?this.actualMinHeight:this._explicitMinVisibleHeight;return a},refreshTextStyles:function(){this._textField.get_embedFonts()!=
this._embedFonts&&(this._textField.set_embedFonts(this._embedFonts),this._updatedTextStyles=!0);this._textFormat!=this._previousTextFormat&&(this._textField.set_defaultTextFormat(this._textFormat),this._updatedTextStyles=!0,this._previousTextFormat=this._textFormat)},refreshText:function(){var a=this._enabled?this._textFieldType:0;this._textField.get_type()!=a&&this._textField.set_type(a);a=this._explicitVisibleWidth!=null&&this._wordWrap;this._textField.get_wordWrap()!=a&&(this._textField.set_wordWrap(a),
this._updatedTextStyles=!0);this._textField.get_multiline()!=this._multiline&&(this._textField.set_multiline(this._multiline),this._updatedTextStyles=!0);this._textField.set_restrict(this.___restrict);this._textField.set_displayAsPassword(this._displayAsPassword);this._textField.set_maxChars(this._maxChars);this._textField.set_selectable(this._selectable);a=this._explicitVisibleWidth;a!=null&&(a-=this._paddingLeft+this._paddingRight,a<0&&(a=0));if(this._text!=this._previousText||this._updatedTextStyles||
a!=this._previousWidth){a!=null&&this._textField.set_width(a);this._textField.set_autoSize(1);var b=this._text!=null&&this._text.length>0;b?this._textField.set_text(this._text):this._textField.set_text("\u200b");this._savedLineMetrics=this._textField.getLineMetrics(0);this._textMeasuredWidth=this._textField.get_width();this._textMeasuredHeight=4+(this._savedLineMetrics.height+this._savedLineMetrics.leading)*this._textField.get_numLines();this._textField.set_autoSize(2);b||this._textField.set_text("");
this._previousText=this._text;this._previousWidth=a}},refreshSelection:function(){if(this._pendingSelectionActiveIndex!=-1||this._pendingSelectionAnchorIndex!=-1){var a=this._pendingSelectionAnchorIndex,b=this._pendingSelectionActiveIndex;this._pendingSelectionActiveIndex=this._pendingSelectionAnchorIndex=-1;this._textField.setSelection(a,b)}},layoutTextField:function(){if(this._smoothScrolling){this._textField.set_x(this._paddingLeft);this._textField.set_y(this._paddingTop);var a=Math.max(this.actualHeight,
this._actualVisibleHeight),b=Math.max(this.actualWidth,this._actualVisibleWidth)-this._paddingLeft-this._paddingRight;b<0&&(b=0);this._textField.set_width(b);a=a-this._paddingTop-this._paddingBottom;a<0&&(a=0);this._textField.set_height(a);this._textField.set_scrollV(1)}else this._textField.set_x(this._paddingLeft+this._scrollX),this._textField.set_y(this._paddingTop+this._scrollY),b=this._actualVisibleWidth-this._paddingLeft-this._paddingRight,b<0&&(b=0),this._textField.set_width(b),a=this._actualVisibleHeight-
this._paddingTop-this._paddingBottom,a<0&&(a=0),this._textField.set_height(a),this._textField.get_textHeight(),a=Math.max(0,this.actualWidth-this._actualVisibleWidth),b=Math.max(0,this.actualHeight-this._actualVisibleHeight),this._textField.get_maxScrollV()==1||b==0?this._textField.set_scrollV(1):this._textField.set_scrollV(1+Math.ceil(this._scrollY/(this._savedLineMetrics.height+this._savedLineMetrics.leading))),this._textField.get_maxScrollH()==0||a==0?this._textField.set_scrollH(0):this._textField.set_scrollH(Math.round(this._textField.get_maxScrollH()*
(this._scrollX/a)))},textFieldViewPort_textField_changeHandler:function(a){a.stopPropagation();this.set_text(this._textField.get_text());if(this._textFieldHasFocus&&(a=u.__cast(this.parent,ob),a.validateNow(),a.get_maxScrollY()>0)){var b=this._textField.get_caretIndex();if(b==this._textField.get_length()){if(b==0)return;--b;var c=this._textField.getLineIndexOfChar(b);b=this._textField.get_text().charAt(b);b!="\n"&&b!="\r"||++c}else c=this._textField.getLineIndexOfChar(b);if(this._smoothScrolling){b=
this._savedLineMetrics.height+this._savedLineMetrics.leading;c=a.get_maxScrollY()-(this._textField.get_numLines()-c-1)*b;b=c+(this._textField.get_numLines()-Math.floor(this.get_visibleHeight()/b))*b;var d=this._scrollY;c-d>0?d=c:d-b>0&&(d=b);a.set_scrollY(d)}else this._textField.get_maxScrollV()>1&&(c=this._textField.get_maxScrollV()-(this._textField.get_numLines()-c-1),b=c+(this._textField.get_numLines()-this._textField.get_maxScrollV()),b>this._textField.get_maxScrollV()&&(b=this._textField.get_maxScrollV()),
d=this._textField.get_scrollV(),c-d>0?d=c:d-b>0&&(d=b),d!=this._textField.get_scrollV()&&a.set_scrollY((d-1)*(this._savedLineMetrics.height+this._savedLineMetrics.leading)))}},textFieldViewPort_textField_focusInHandler:function(a){this._textFieldHasFocus=!0},textFieldViewPort_textField_focusOutHandler:function(a){this._textFieldHasFocus=!1},textFieldViewPort_textField_scrollHandler:function(a){this._ignoreTextFieldScroll||this._smoothScrolling||(a=u.__cast(this.parent,ob),a.get_maxScrollY()>0&&this._textField.get_maxScrollV()>
1&&a.set_scrollY((this._textField.get_scrollV()-1)*(this._savedLineMetrics.height+this._savedLineMetrics.leading)))},textFieldViewPort_focusInHandler:function(a){this.stage!=null&&this.stage.get_focus()!=this._textField&&(a.stopImmediatePropagation(),this.stage.set_focus(this._textField))},__class__:Ko,__properties__:I(wa.prototype.__properties__,{get_selectionActiveIndex:"get_selectionActiveIndex",get_selectionAnchorIndex:"get_selectionAnchorIndex",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",
set_scrollX:"set_scrollX",get_scrollX:"get_scrollX",set_visibleHeight:"set_visibleHeight",get_visibleHeight:"get_visibleHeight",set_maxVisibleHeight:"set_maxVisibleHeight",get_maxVisibleHeight:"get_maxVisibleHeight",set_minVisibleHeight:"set_minVisibleHeight",get_minVisibleHeight:"get_minVisibleHeight",set_visibleWidth:"set_visibleWidth",get_visibleWidth:"get_visibleWidth",set_maxVisibleWidth:"set_maxVisibleWidth",get_maxVisibleWidth:"get_maxVisibleWidth",set_minVisibleWidth:"set_minVisibleWidth",
get_minVisibleWidth:"get_minVisibleWidth",get_stageFocusTarget:"get_stageFocusTarget",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_textFormat:"set_textFormat",get_textFormat:"get_textFormat",set_smoothScrolling:"set_smoothScrolling",
get_smoothScrolling:"get_smoothScrolling",set_selectable:"set_selectable",get_selectable:"get_selectable",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_restrict:"set_restrict",get_restrict:"get_restrict",set_multiline:"set_multiline",get_multiline:"get_multiline",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text",set_textFieldType:"set_textFieldType",
get_textFieldType:"get_textFieldType",get_textField:"get_textField"})});var nn=function(){};r["feathers.core.IFocusManager"]=nn;nn.__name__="feathers.core.IFocusManager";nn.__isInterface__=!0;nn.__interfaces__=[qb];nn.prototype={get_root:null,get_focus:null,set_focus:null,get_focusPane:null,get_showFocusIndicator:null,get_enabled:null,set_enabled:null,findNextFocus:null,dispose:null,__class__:nn,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled",get_showFocusIndicator:"get_showFocusIndicator",
get_focusPane:"get_focusPane",set_focus:"set_focus",get_focus:"get_focus",get_root:"get_root"}};var sl=function(a){this._showFocusIndicator=this._cancelMouseFocusChange=!1;this._root=this._focusPane=null;this._enabled=!0;na.call(this);this.set_root(a)};r["feathers.core.DefaultFocusManager"]=sl;sl.__name__="feathers.core.DefaultFocusManager";sl.__interfaces__=[nn];sl.__super__=na;sl.prototype=I(na.prototype,{_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==
a)return this._enabled;if(a&&this._root==null)throw new fb("Cannot enable focus manager without a root container.");this._enabled=a;this._root.stage!=null&&(this._enabled?this.restoreFocus():this.set_focus(null));return this._enabled},_root:null,get_root:function(){return this._root},set_root:function(a){if(this._root==a)return this._root;this._root!=null&&(this.clearFocusManager(this._root),this._root.removeEventListener("addedToStage",m(this,this.defaultFocusManager_root_addedToStageHandler)),this._root.removeEventListener("removedFromStage",
m(this,this.defaultFocusManager_root_removedFromStageHandler)),this._root.removeEventListener("added",m(this,this.defaultFocusManager_root_addedHandler)),this._root.removeEventListener("removed",m(this,this.defaultFocusManager_root_removedHandler)),this._root.removeEventListener("mouseDown",m(this,this.defaultFocusManager_root_mouseDownCaptureHandler),!0),this._root.removeEventListener("focusIn",m(this,this.defaultFocusManager_root_focusInCaptureHandler),!0),this._root.removeEventListener("mouseFocusChange",
m(this,this.defaultFocusManager_root_mouseFocusChangeHandler)),this._root.removeEventListener("activate",m(this,this.defaultFocusManager_root_activateHandler)),this._root.removeEventListener("deactivate",m(this,this.defaultFocusManager_root_deactivateHandler)),this.handleRootRemovedFromStage(this._root.stage));this._root=a;this._root!=null&&(this.handleRootAddedToStage(this._root),this.setFocusManager(this._root),this._root.addEventListener("addedToStage",m(this,this.defaultFocusManager_root_addedToStageHandler),
!1,0,!0),this._root.addEventListener("removedFromStage",m(this,this.defaultFocusManager_root_removedFromStageHandler),!1,0,!0),this._root.addEventListener("added",m(this,this.defaultFocusManager_root_addedHandler),!1,0,!0),this._root.addEventListener("removed",m(this,this.defaultFocusManager_root_removedHandler),!1,0,!0),this._root.addEventListener("mouseDown",m(this,this.defaultFocusManager_root_mouseDownCaptureHandler),!0,0,!0),this._root.addEventListener("focusIn",m(this,this.defaultFocusManager_root_focusInCaptureHandler),
!0,0,!0),this._root.addEventListener("mouseFocusChange",m(this,this.defaultFocusManager_root_mouseFocusChangeHandler),!1,0,!0),this._root.addEventListener("activate",m(this,this.defaultFocusManager_root_activateHandler),!1,0,!0),this._root.addEventListener("deactivate",m(this,this.defaultFocusManager_root_deactivateHandler),!1,0,!0));return this._root},_focusPane:null,get_focusPane:function(){this._focusPane==null&&(this._focusPane=new za,this._focusPane.mouseEnabled=!1,this._focusPane.mouseChildren=
!1,this._focusPane.set_tabEnabled(!1),this._focusPane.set_tabChildren(!1),Ub.forStage(this._root.stage).addPopUp(this._focusPane,!1,!1));return this._focusPane},_showFocusIndicator:null,get_showFocusIndicator:function(){return this._showFocusIndicator},_focusToRestore:null,get_focus:function(){return this._root.stage==null?null:this.findFocusForDisplayObject(this._root.stage.get_focus())},set_focus:function(a){if(this._enabled&&this._root.stage!=null&&this.findFocusForDisplayObject(this._root.stage.get_focus())==
a)return this.setStageFocus(u.__cast(a,Da)),this.get_focus();if(a!=null&&a.get_focusManager()!=this)throw new rb("Failed to change focus. Object is not managed by this focus manager: "+L.string(a));this._enabled&&this._root.stage!=null&&this.setStageFocus(u.__cast(a,Da));return this.get_focus()},_wrapObject:null,_cancelMouseFocusChange:null,dispose:function(){this.get_focus()!=null&&this.set_focus(null);this._focusPane!=null&&(this._focusPane.parent!=null&&this._focusPane.parent.removeChild(this._focusPane),
this._focusPane=null);var a=this._root;this.set_root(null);this._root=a;W.dispatch(this,"clear");this._root=null},findNextFocus:function(a){a==null&&(a=!1);return this.findNextFocusInternal(a).newFocus},findNextFocusInternal:function(a){a==null&&(a=!1);var b=null,c=!1,d=this.get_focus();d!=null&&d.get_focusOwner()!=null?(a=d.get_focusOwner(),a!=null&&a.get_focusManager()!=this&&(a=null),a!=null&&(b=a)):a?(d!=null&&d.parent!=null&&(b=this.findPreviousContainerFocus(d.parent,u.__cast(d,ea),!0)),b==
null&&(b=this.findPreviousChildFocus(this._root),c=d!=null)):(d!=null&&(u.__implements(d,dg)&&d.get_childFocusEnabled()?b=this.findNextContainerFocus(u.__cast(d,lb),null,!0):d.parent!=null&&(b=this.findNextContainerFocus(d.parent,u.__cast(d,ea),!0))),b==null&&(b=this.findNextChildFocus(this._root),c=d!=null));return new mm(b,c)},findNextRelativeFocusInternal:function(a){switch(a){case 37:a=ja.LEFT;break;case 38:a=ja.TOP;break;case 39:a=ja.RIGHT;break;case 40:a=ja.BOTTOM;break;default:return new mm(null,
!1)}var b=this.get_focus(),c=on.findAllFocusableObjects(this._root);if(b==null)return c.length>0?new mm(c[0],!1):new mm(null,!1);for(var d=b,f=u.__cast(b,ea).getBounds(b.stage),g=0;g<c.length;){var h=c[g];++g;h!=b&&this.isValidFocus(h)&&qi.isBetterFocusForRelativePosition(u.__cast(h,ea),u.__cast(d,ea),f,a)&&(d=h)}return new mm(d,!1)},isValidFocusWithKeyboard:function(a){return a instanceof Da&&!a.get_tabEnabled()?!1:this.isValidFocus(a)},isValidFocus:function(a,b){b==null&&(b=!1);return a==null||
a.stage==null||a.get_focusManager()!=this||!a.get_focusEnabled()||!a.get_visible()||u.__implements(a,jb)&&!a.get_enabled()||!b&&Ub.forStage(this._root.stage).hasModalPopUps()&&(a=u.__cast(a,ea),!Wv.isTopLevelPopUpOrIsContainedByTopLevelPopUp(a))?!1:!0},setFocusManager:function(a){u.__implements(a,tj)&&a.set_focusManager(this);a=a instanceof lb?a:null;if(a!=null){for(var b=0,c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);this.setFocusManager(d)}if(u.__implements(a,ei)){c=a.get_focusExtrasBefore();
if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.setFocusManager(d);c=a.get_focusExtrasAfter();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.setFocusManager(d)}}},clearFocusManager:function(a){if(u.__implements(a,tj)&&a.get_focusManager()==this){a==this._focusToRestore&&(this._focusToRestore=null);if(this.get_focus()==a){var b=null;u.__implements(a,ld)&&(b=a.get_focusOwner());b!=null&&b.get_focusManager()!=this&&(b=null);this.set_focus(b)}a.set_focusManager(null)}a=a instanceof lb?a:null;if(a!=null){b=
0;for(var c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);this.clearFocusManager(d)}if(u.__implements(a,ei)){c=a.get_focusExtrasBefore();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.clearFocusManager(d);c=a.get_focusExtrasAfter();if(c!=null)for(b=0;b<c.length;)d=c[b],++b,this.clearFocusManager(d)}}},findPreviousContainerFocus:function(a,b,c){var d=a;u.__implements(a,Yj)&&!u.__implements(a,dg)&&(d=a.parent);var f=b==null;if(u.__implements(d,ei)){var g=d.get_focusExtrasAfter();if(g!=null){var h=
g.length-1;if(!f){var l=g.indexOf(b);l!=-1&&(h=l-1,f=!0)}if(f)for(;h>=0;){l=g[h];l=this.findPreviousChildFocus(l);if(l!=null)return l;--h}}}h=a.get_numChildren()-1;if(!f){g=-1;try{g=a.getChildIndex(b)}catch(k){Rb.lastError=k}g!=-1&&(h=g-1,f=!0)}if(f)for(;h>=0;){l=a.getChildAt(h);l=this.findPreviousChildFocus(l);if(l!=null)return l;--h}if(u.__implements(d,ei)&&(g=d.get_focusExtrasBefore(),g!=null&&(h=g.length-1,f||(l=g.indexOf(b),l!=-1&&(h=l-1,f=!0)),f)))for(;h>=0;){l=g[h];l=this.findPreviousChildFocus(l);
if(l!=null)return l;--h}return c&&d!=this._root?u.__implements(d,ld)&&(a=d,this.isValidFocusWithKeyboard(a))?a:this.findPreviousContainerFocus(d.parent,d,!0):null},findNextContainerFocus:function(a,b,c){var d=a;u.__implements(a,Yj)&&!u.__implements(a,dg)&&(d=a.parent);var f=b==null,g=null;u.__implements(d,bn)&&(g=d.get_focusExclusions());if(u.__implements(d,ei)){var h=d.get_focusExtrasBefore();if(h!=null){var l=0;if(!f){var k=h.indexOf(b);k!=-1&&(l=k+1,f=!0)}if(f)for(k=h.length;l<k;){var q=l++;q=
h[q];if(g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),q!=null)return q}}}l=0;if(!f){h=-1;try{h=a.getChildIndex(b)}catch(w){Rb.lastError=w}h!=-1&&(l=h+1,f=!0)}if(f)for(k=a.get_numChildren();l<k;)if(q=l++,q=a.getChildAt(q),g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),q!=null)return q;if(u.__implements(d,ei)&&(h=d.get_focusExtrasAfter(),h!=null&&(l=0,f||(k=h.indexOf(b),k!=-1&&(l=k+1,f=!0)),f)))for(k=h.length;l<k;)if(q=l++,q=h[q],g==null||g.indexOf(q)==-1)if(q=this.findNextChildFocus(q),
q!=null)return q;return c&&d!=this._root&&d.parent!=null&&(q=this.findNextContainerFocus(d.parent,d,!0),q!=null)?q:null},findPreviousChildFocus:function(a){var b=a instanceof lb?a:null;if(b!=null){var c=!u.__implements(b,ld);!c&&u.__implements(b,dg)&&(c=b.get_childFocusEnabled());if(c&&(b=this.findPreviousContainerFocus(b,null,!1),b!=null))return b}if(u.__implements(a,ld)&&this.isValidFocusWithKeyboard(a)){if(!u.__implements(a,Xj))return a;b=a.get_toggleGroup();if(b==null||u.__implements(b.get_selectedItem(),
ld)&&(a=b.get_selectedItem(),this.get_focus()!=a))return a}return null},findNextChildFocus:function(a){if(u.__implements(a,ld)&&this.isValidFocusWithKeyboard(a)){if(!u.__implements(a,Xj))return a;var b=a.get_toggleGroup();if(b==null)return a;if(u.__implements(b.get_selectedItem(),ld)&&(b=b.get_selectedItem(),this.get_focus()!=b))return b}a=a instanceof lb?a:null;return a!=null&&(b=!u.__implements(a,ld),!b&&u.__implements(a,dg)&&(b=a.get_childFocusEnabled()),b&&(a=this.findNextContainerFocus(a,null,
!1),a!=null))?a:null},setStageFocus:function(a){for(;u.__implements(a,hi);){var b=a.get_stageFocusTarget();if(b==null)break;a=b}a==null&&(a=this._root.stage);this._root.stage.window!=null&&this._root.stage.get_focus()!=a&&this._root.stage.set_focus(a)},handleRootAddedToStage:function(a){a=this._root.stage;a!=null&&(a.stageFocusRect=!1,this._enabled&&a.get_focus()==null&&a.set_focus(a),this._root.addEventListener("keyDown",m(this,this.defaultFocusManager_root_keyDownHandler),!1,0,!0),this._root.addEventListener("keyFocusChange",
m(this,this.defaultFocusManager_root_keyFocusChangeHandler),!1,0,!0))},handleRootRemovedFromStage:function(a){this.set_focus(null);this._root.stage!=null&&(this._root.removeEventListener("keyDown",m(this,this.defaultFocusManager_root_keyDownHandler)),this._root.removeEventListener("keyFocusChange",m(this,this.defaultFocusManager_root_keyFocusChangeHandler)))},defaultFocusManager_root_addedToStageHandler:function(a){this.handleRootAddedToStage(u.__cast(a.currentTarget,ea))},defaultFocusManager_root_removedFromStageHandler:function(a){this.handleRootRemovedFromStage(u.__cast(a.currentTarget,
ea))},restoreFocus:function(){this._root.stage!=null&&this._focusToRestore!=null&&this.isValidFocus(this._focusToRestore)&&this.set_focus(this._focusToRestore)},shouldBeManaged:function(a){if(a==this._root)return!0;var b=a.parent,c=!1;try{c=b.getChildIndex(a)!=-1}catch(l){Rb.lastError=l}if(c&&u.__implements(b,Yj)&&!u.__implements(b,dg))b=b.parent;else if(!c&&u.__implements(b,ei)){var d=b;if(d.get_focusExtrasBefore()!=null)for(var f=0,g=d.get_focusExtrasBefore();f<g.length;){var h=g[f];++f;if(h==a){c=
!0;break}if(h instanceof lb&&(c=h.contains(h)))break}if(!c&&d.get_focusExtrasAfter()!=null)for(f=0,g=d.get_focusExtrasAfter();f<g.length;){h=g[f];++f;if(h==a){c=!0;break}if(h instanceof lb&&(c=h.contains(h)))break}}return c?b!=null&&b!=this._root?this.shouldBeManaged(b):!0:!1},defaultFocusManager_root_addedHandler:function(a){a=u.__cast(a.target,ea);this._focusPane==null||this._focusPane!=a&&!this._focusPane.contains(a)?(this.shouldBeManaged(a)&&this.setFocusManager(a),a=null,this._root.stage!=null&&
(a=this.findFocusForDisplayObject(this._root.stage.get_focus(),!0)),a==null||this.isValidFocus(a)||this.set_focus(null)):Ub.forStage(this._root.stage).addPopUp(this._focusPane,!1,!1)},defaultFocusManager_root_removedHandler:function(a){a=u.__cast(a.target,ea);this.clearFocusManager(a)},defaultFocusManager_root_mouseFocusChangeHandler:function(a){if(a.isDefaultPrevented())this._cancelMouseFocusChange=!0;else if(this._enabled){this._showFocusIndicator=!1;var b=a.relatedObject;b=b instanceof Jc?b:null;
if(b!=null){if(b.get_type()==1||b.get_selectable())return;for(var c=u.__cast(this.findFocusForDisplayObject(b),ea);u.__implements(c,hi);){var d=c.get_stageFocusTarget();if(d==null)break;c=d}if(b==c)return}a.preventDefault()}},handleKeyDownFocusWrapping:function(a){ud.playerType=="StandAlone"||ud.playerType=="Desktop"||!this._enabled||a.isDefaultPrevented()||a.keyCode!=9&&a.keyCode!=0||(this._wrapObject!=null&&(this._wrapObject.get_tabIndex()==sl.WRAP_OBJECT_HIGH_TAB_INDEX&&this._wrapObject.set_tabIndex(-1),
this._wrapObject=null),this.findNextFocusInternal(a.shiftKey).wrapped&&(this._wrapObject=this._root.stage.get_focus(),this._wrapObject!=null&&this._wrapObject.get_tabIndex()==-1&&this._wrapObject.set_tabIndex(a.shiftKey?0:sl.WRAP_OBJECT_HIGH_TAB_INDEX)))},handleDPadArrowKeys:function(a){a.keyLocation!=4||a.keyCode!=38&&a.keyCode!=40&&a.keyCode!=37&&a.keyCode!=39||a.isDefaultPrevented()||(this._showFocusIndicator=!0,a=this.findNextRelativeFocusInternal(a.keyCode),this.set_focus(a.newFocus))},defaultFocusManager_root_keyDownHandler:function(a){this.handleKeyDownFocusWrapping(a);
this.handleDPadArrowKeys(a)},defaultFocusManager_root_keyFocusChangeHandler:function(a){if(this._enabled&&!a.isDefaultPrevented()&&(a.keyCode==9||a.keyCode==0)){this._showFocusIndicator=!0;var b=this.findNextFocusInternal(a.shiftKey);this.set_focus(b.newFocus);this._wrapObject==null?a.preventDefault():this._wrapObject instanceof Jc&&this._wrapObject.get_type()==1&&a.preventDefault()}},findFocusForDisplayObject:function(a,b){b==null&&(b=!1);if(a==null)return null;var c=null;do{if(u.__implements(a,
ld)){var d=a;this.isValidFocus(d,b)?c!=null&&u.__implements(d,dg)&&d.get_childFocusEnabled()||(c=d):d.get_focusOwner()!=null&&this.isValidFocus(d.get_focusOwner(),b)&&(c=d.get_focusOwner(),a=u.__cast(d,ea))}if(a==this._root)break;a=a.parent}while(a!=null);return c},defaultFocusManager_root_mouseDownCaptureHandler:function(a){this._showFocusIndicator=!1;this._cancelMouseFocusChange?this._cancelMouseFocusChange=!1:this._enabled&&(a=this.findFocusForDisplayObject(a.target),this.set_focus(a))},defaultFocusManager_root_focusInCaptureHandler:function(a){this._enabled&&
(this._focusToRestore=this.findFocusForDisplayObject(u.__cast(a.target,ea)))},defaultFocusManager_root_activateHandler:function(a){this._enabled&&this.restoreFocus()},defaultFocusManager_root_deactivateHandler:function(a){this._enabled&&this.set_focus(null)},__class__:sl,__properties__:{set_focus:"set_focus",get_focus:"get_focus",get_showFocusIndicator:"get_showFocusIndicator",get_focusPane:"get_focusPane",set_root:"set_root",get_root:"get_root",set_enabled:"set_enabled",get_enabled:"get_enabled"}});
var mm=function(a,b){this.newFocus=a;this.wrapped=b};r["feathers.core._DefaultFocusManager.FocusResult"]=mm;mm.__name__="feathers.core._DefaultFocusManager.FocusResult";mm.prototype={newFocus:null,wrapped:null,__class__:mm};var br=function(){};r["feathers.core.IPopUpManager"]=br;br.__name__="feathers.core.IPopUpManager";br.__isInterface__=!0;br.prototype={get_overlayFactory:null,set_overlayFactory:null,get_root:null,set_root:null,get_popUpCount:null,get_topLevelPopUpCount:null,getPopUpAt:null,isPopUp:null,
isTopLevelPopUp:null,isModal:null,hasModalPopUps:null,addPopUp:null,removePopUp:null,removeAllPopUps:null,centerPopUp:null,bringToFront:null,__class__:br,__properties__:{get_topLevelPopUpCount:"get_topLevelPopUpCount",get_popUpCount:"get_popUpCount",set_root:"set_root",get_root:"get_root",set_overlayFactory:"set_overlayFactory",get_overlayFactory:"get_overlayFactory"}};var pn=function(a){this._popUpToOverlay=new Na;this._centeredPopUps=[];this.popUps=[];this._ignoreRemoval=!1;this.set_root(a)};r["feathers.core.DefaultPopUpManager"]=
pn;pn.__name__="feathers.core.DefaultPopUpManager";pn.__interfaces__=[br];pn.defaultOverlayFactory=function(){var a=new za;a.get_graphics().beginFill(8421504,.75);a.get_graphics().drawRect(0,0,1,1);a.get_graphics().endFill();return a};pn.prototype={_ignoreRemoval:null,_root:null,get_root:function(){return this._root},set_root:function(a){if(this._root==a)return this._root;if(a.stage==null)throw new rb("DefaultPopUpManager root's stage property must not be null.");var b=this._ignoreRemoval;this._ignoreRemoval=
!0;for(var c=0,d=this.popUps;c<d.length;){var f=d[c];++c;this._root.removeChild(f);var g=this._popUpToOverlay.h[f.__id__];g!=null&&this._root.removeChild(g)}this._ignoreRemoval=b;this._root=a;c=0;for(d=this.popUps;c<d.length;)f=d[c],++c,g=this._popUpToOverlay.h[f.__id__],g!=null&&this._root.addChild(g),this._root.addChild(f);return this._root},popUps:null,_centeredPopUps:null,_popUpToOverlay:null,_overlayFactory:null,get_overlayFactory:function(){return this._overlayFactory},set_overlayFactory:function(a){return this._overlayFactory==
a?this._overlayFactory:this._overlayFactory=a},get_popUpCount:function(){return this.popUps.length},get_topLevelPopUpCount:function(){for(var a=0,b=this.popUps.length-1;b>=0;){++a;if(this._popUpToOverlay.h[this.popUps[b].__id__]!=null)break;--b}return a},getPopUpAt:function(a){return this.popUps[a]},isPopUp:function(a){return this.popUps.indexOf(a)!=-1},isTopLevelPopUp:function(a){for(var b=this.popUps.length-1;b>=0;){var c=this.popUps[b];if(c==a)return!0;if(this._popUpToOverlay.h[c.__id__]!=null)break;
--b}return!1},isModal:function(a){return a==null?!1:this._popUpToOverlay.h[a.__id__]!=null},hasModalPopUps:function(){return this._popUpToOverlay.keys().hasNext()},addPopUp:function(a,b,c,d){c==null&&(c=!0);b==null&&(b=!0);var f=this.popUps.indexOf(a);f!=-1&&(this.cleanupOverlay(a),this.popUps.splice(f,1));b&&(d==null&&(d=this._overlayFactory),d==null&&(d=pn.defaultOverlayFactory),b=d(),f=this._root.stage,d=this._root.globalToLocal(new Qa),f=this._root.globalToLocal(new Qa(f.stageWidth,f.stageHeight)),
b.set_x(d.x),b.set_y(d.y),b.set_width(f.x-d.x),b.set_height(f.y-d.y),this._root.addChild(b),this._popUpToOverlay.set(a,b));this.popUps.push(a);b=this._root.addChild(a);if(a.parent==null)return this.cleanupOverlay(a),X.remove(this.popUps,a),null;a.addEventListener("removedFromStage",m(this,this.defaultPopUpManager_popUp_removedFromStageHandler));this.popUps.length==1&&this._root.stage.addEventListener("resize",m(this,this.defaultPopUpManager_stage_resizeHandler),!1,0,!0);c&&(u.__implements(a,Kb)&&
a.addEventListener("resize",m(this,this.defaultPopUpManager_popUp_resizeHandler)),this._centeredPopUps.push(a),this.centerPopUp(a));return b},removePopUp:function(a){return this.popUps.indexOf(a)==-1?a:this._root.removeChild(a)},removeAllPopUps:function(){for(var a=this.popUps.slice(),b=0;b<a.length;){var c=a[b];++b;this.isPopUp(c)&&this.removePopUp(c)}},centerPopUp:function(a){u.__implements(a,oa)&&a.validateNow();var b=this._root.stage,c=this._root.globalToLocal(new Qa);b=this._root.globalToLocal(new Qa(b.stageWidth,
b.stageHeight));a.set_x(c.x+(b.x-c.x-a.get_width())/2);a.set_y(c.y+(b.y-c.y-a.get_height())/2)},bringToFront:function(a){if(!X.remove(this.popUps,a))throw new Ld("Not a popup");this.popUps.push(a);var b=this._popUpToOverlay.h[a.__id__];b!=null&&this._root.setChildIndex(b,this._root.get_numChildren()-1);this._root.setChildIndex(a,this._root.get_numChildren()-1)},cleanupOverlay:function(a){var b=this._popUpToOverlay.h[a.__id__];b!=null&&(this._root.removeChild(b),this._popUpToOverlay.remove(a))},defaultPopUpManager_popUp_removedFromStageHandler:function(a){this._ignoreRemoval||
(a=u.__cast(a.currentTarget,ea),a.removeEventListener("removedFromStage",m(this,this.defaultPopUpManager_popUp_removedFromStageHandler)),X.remove(this.popUps,a),this.cleanupOverlay(a),this.popUps.length==0&&this._root.stage.removeEventListener("resize",m(this,this.defaultPopUpManager_stage_resizeHandler)))},defaultPopUpManager_popUp_resizeHandler:function(a){a=u.__cast(a.currentTarget,ea);this.centerPopUp(a)},defaultPopUpManager_stage_resizeHandler:function(a){var b=u.__cast(a.currentTarget,cd);a=
this._root.globalToLocal(new Qa);b=this._root.globalToLocal(new Qa(b.stageWidth,b.stageHeight));for(var c=0,d=this.popUps;c<d.length;){var f=d[c];++c;f=this._popUpToOverlay.h[f.__id__];f!=null&&(f.set_x(a.x),f.set_y(a.y),f.set_width(b.x-a.x),f.set_height(b.y-a.y))}c=0;for(d=this._centeredPopUps;c<d.length;)f=d[c],++c,this.centerPopUp(f)},__class__:pn,__properties__:{get_topLevelPopUpCount:"get_topLevelPopUpCount",get_popUpCount:"get_popUpCount",set_overlayFactory:"set_overlayFactory",get_overlayFactory:"get_overlayFactory",
set_root:"set_root",get_root:"get_root"}};var cr=function(){};r["feathers.core.IToolTipManager"]=cr;cr.__name__="feathers.core.IToolTipManager";cr.__isInterface__=!0;cr.prototype={get_root:null,dispose:null,__class__:cr,__properties__:{get_root:"get_root"}};var Ik=function(a){this._offsetX=this._offsetY=0;this._hideTime=-1;this._delay=.5;this._delayTimeoutID=null;this.initializeToolTipStyles();this._root=a;this._root.addEventListener("mouseMove",m(this,this.defaultToolTipManager_root_mouseMoveHandler),
!1,0,!0)};r["feathers.core.DefaultToolTipManager"]=Ik;Ik.__name__="feathers.core.DefaultToolTipManager";Ik.__interfaces__=[cr];Ik.prototype={_root:null,get_root:function(){return this._root},_target:null,_toolTip:null,_toolTipStageX:null,_toolTipStageY:null,_delayTimeoutID:null,_delay:null,_hideTime:null,_offsetX:null,_offsetY:null,dispose:function(){this.clearTarget();this._root!=null&&(this._root.removeEventListener("mouseMove",m(this,this.defaultToolTipManager_root_mouseMoveHandler)),this._root=
null)},initializeToolTipStyles:function(){vu.initialize()},clearTarget:function(){this.hideToolTip();this._target!=null&&(this._target.removeEventListener("mouseDown",m(this,this.defaultToolTipManager_target_mouseDownHandler)),this._target.removeEventListener("rightMouseDown",m(this,this.defaultToolTipManager_target_rightMouseDownHandler)),this._target.removeEventListener("middleMouseDown",m(this,this.defaultToolTipManager_target_middleMouseDownHandler)),this._target.removeEventListener("rollOut",
m(this,this.defaultToolTipManager_target_rollOutHandler)),this._target.removeEventListener("removedFromStage",m(this,this.defaultToolTipManager_target_removedFromStageHandler)),this._target=null)},hideToolTip:function(){this._delayTimeoutID!=null&&(Oa.clearTimeout(this._delayTimeoutID),this._delayTimeoutID=null);this._toolTip!=null&&this._toolTip.parent!=null&&(Ub.removePopUp(u.__cast(this._toolTip,ea)),this._hideTime=Oa.getTimer())},hoverDelayCallback:function(){this._delayTimeoutID=null;if(this._target.get_toolTip()!=
null){if(this._toolTip==null){var a=new bc;a.set_variant(Ik.CHILD_VARIANT_TOOL_TIP);this._toolTip=a}this._toolTip instanceof Da&&(a=this._toolTip,a.mouseEnabled=!1,a.set_tabEnabled(!1));this._toolTip instanceof lb&&(this._toolTip.mouseChildren=!1);u.__implements(this._toolTip,If)&&(a=this._toolTip,a.get_variant()==null&&a.set_variant(Ik.CHILD_VARIANT_TOOL_TIP));this._toolTip.set_text(this._target.get_toolTip());u.__implements(this._toolTip,oa)&&this._toolTip.validateNow();var b=this._target.stage,
c=Ub.forStage(b);a=c.get_root().globalToLocal(new Qa(this._toolTipStageX,this._toolTipStageY));b=c.get_root().globalToLocal(new Qa(b.stageWidth,b.stageHeight));c=a.x+this._offsetX;c<0?c=0:c+this._toolTip.get_width()>b.x&&(c=b.x-this._toolTip.get_width());a=a.y-this._toolTip.get_height()+this._offsetY;a<0?a=0:a+this._toolTip.get_height()>b.y&&(a=b.y-this._toolTip.get_height());this._toolTip.set_x(c);this._toolTip.set_y(a);Ub.addPopUp(u.__cast(this._toolTip,ea),u.__cast(this._target,ea),!1,!1)}},defaultToolTipManager_root_mouseMoveHandler:function(a){if(!a.buttonDown){for(var b=
u.__cast(a.target,ea);b!=null&&!u.__implements(b,jb);)b=b.parent;u.__implements(b,jb)?this._target==b?(this._toolTipStageX=a.stageX,this._toolTipStageY=a.stageY):(this.clearTarget(),this._target=b,this._target.get_toolTip()==null?this._target=null:(this._target.addEventListener("mouseDown",m(this,this.defaultToolTipManager_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("rightMouseDown",m(this,this.defaultToolTipManager_target_rightMouseDownHandler),!1,0,!0),this._target.addEventListener("middleMouseDown",
m(this,this.defaultToolTipManager_target_middleMouseDownHandler),!1,0,!0),this._target.addEventListener("rollOut",m(this,this.defaultToolTipManager_target_rollOutHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.defaultToolTipManager_target_removedFromStageHandler),!1,0,!0),this._toolTipStageX=a.stageX,this._toolTipStageY=a.stageY,this._delayTimeoutID=Oa.setTimeout(m(this,this.hoverDelayCallback),this._delay*1E3|0))):this.clearTarget()}},defaultToolTipManager_target_mouseDownHandler:function(a){this.hideToolTip()},
defaultToolTipManager_target_rightMouseDownHandler:function(a){this.hideToolTip()},defaultToolTipManager_target_middleMouseDownHandler:function(a){this.hideToolTip()},defaultToolTipManager_target_rollOutHandler:function(a){this.clearTarget()},defaultToolTipManager_target_removedFromStageHandler:function(a){this.clearTarget()},__class__:Ik,__properties__:{get_root:"get_root"}};var lo=O["feathers.core._FeathersControl.StyleDefinition"]={__ename__:"feathers.core._FeathersControl.StyleDefinition",__constructs__:null,
Name:(G=function(a){return{_hx_index:0,name:a,__enum__:"feathers.core._FeathersControl.StyleDefinition",toString:D}},G._hx_name="Name",G.__params__=["name"],G),NameAndState:(G=function(a,b){return{_hx_index:1,name:a,state:b,__enum__:"feathers.core._FeathersControl.StyleDefinition",toString:D}},G._hx_name="NameAndState",G.__params__=["name","state"],G)};lo.__constructs__=[lo.Name,lo.NameAndState];var sd=function(){};r["feathers.core.FocusManager"]=sd;sd.__name__="feathers.core.FocusManager";sd.__properties__=
{set_focusManagerFactory:"set_focusManagerFactory",get_focusManagerFactory:"get_focusManagerFactory"};sd.defaultFocusManagerFactory=function(a){return new sl(a)};sd.get_focusManagerFactory=function(){return sd._focusManagerFactory};sd.set_focusManagerFactory=function(a){a==null&&(sd._focusManagerFactory=sd.defaultFocusManagerFactory);if(sd._focusManagerFactory==a)return sd._focusManagerFactory;sd._focusManagerFactory=a;return sd._focusManagerFactory};sd.hasRoot=function(a){return sd.stageToManager.h.__keys__[a.__id__]!=
null};sd.addRoot=function(a){if(a==null)throw new rb("FocusManager stage argument must not be null.");if(sd.stageToManager.h.__keys__[a.__id__]!=null)throw new rb("Focus manager root already exists");var b=sd.get_focusManagerFactory();b==null&&(b=sd.defaultFocusManagerFactory);b=b(a);b.addEventListener("clear",sd.focusManager_clearHandler,!1,0,!0);sd.stageToManager.set(a,b);return b};sd.removeRoot=function(a){a=sd.stageToManager.h[a.__id__];a!=null&&a.dispose()};sd.dispose=function(){for(var a=sd.stageToManager.keys();a.hasNext();){var b=
a.next();sd.stageToManager.h[b.__id__].dispose();sd.stageToManager.remove(b)}};sd.setFocus=function(a){var b=a.get_focusManager();if(b==null)throw new rb("Cannot set focus because focus manager is null.");b.set_focus(a)};sd.focusManager_clearHandler=function(a){a=u.__cast(a.currentTarget,nn);a.removeEventListener("clear",sd.focusManager_clearHandler);a=a.get_root();a=a instanceof cd?a:null;a!=null&&sd.stageToManager.remove(a)};sd.prototype={FocusManager:function(){},__class__:sd};var To=function(){};
r["feathers.core.IScaleManager"]=To;To.__name__="feathers.core.IScaleManager";To.__isInterface__=!0;To.__interfaces__=[qb];To.prototype={get_target:null,set_target:null,getScale:null,getBounds:null,__class__:To,__properties__:{set_target:"set_target",get_target:"get_target"}};var Ub=function(){};r["feathers.core.PopUpManager"]=Ub;Ub.__name__="feathers.core.PopUpManager";Ub.__properties__={get_popUpCount:"get_popUpCount",set_root:"set_root"};Ub.set_root=function(a){Ub.forStage(a.stage).set_root(a);
return a};Ub.get_popUpCount=function(){for(var a=0,b=Ub.stageToManager.iterator();b.hasNext();){var c=b.next();a+=c.get_popUpCount()}return a};Ub.forStage=function(a){if(a==null)throw new rb("PopUpManager stage argument must not be null.");var b=Ub.stageToManager.h[a.__id__];b==null&&(b=Ub.popUpManagerFactory,b==null&&(b=Ub.defaultPopUpManagerFactory),b=b(a),Ub.stageToManager.set(a,b));return b};Ub.dispose=function(){Ub.removeAllPopUps();for(var a=Ub.stageToManager.keys();a.hasNext();){var b=a.next();
Ub.stageToManager.remove(b)}};Ub.addPopUp=function(a,b,c,d,f){d==null&&(d=!0);c==null&&(c=!0);if(b==null)throw new rb("The pop-up's owner must not be null.");b=b.stage;if(b==null)throw new rb("The stage property of a pop-up's owner must not be null.");return Ub.forStage(b).addPopUp(a,c,d,f)};Ub.removePopUp=function(a){var b=a.stage;return b==null?a:Ub.forStage(b).removePopUp(a)};Ub.removeAllPopUps=function(){for(var a=Ub.stageToManager.iterator();a.hasNext();)a.next().removeAllPopUps()};Ub.centerPopUp=
function(a){var b=a.stage;if(b==null)throw new rb("A pop-up's stage property must not be null.");Ub.forStage(b).centerPopUp(a)};Ub.bringToFront=function(a){var b=a.stage;if(b==null)throw new rb("A pop-up's stage property must not be null.");Ub.forStage(b).bringToFront(a)};Ub.isPopUp=function(a){if(a==null)return!1;var b=a.stage;return b==null?!1:Ub.forStage(b).isPopUp(a)};Ub.isModal=function(a){if(a==null)return!1;var b=a.stage;return b==null?!1:Ub.forStage(b).isModal(a)};Ub.isTopLevelPopUp=function(a){if(a==
null)return!1;var b=a.stage;return b==null?!1:Ub.forStage(b).isTopLevelPopUp(a)};Ub.defaultPopUpManagerFactory=function(a){return new pn(a)};var Uo=function(a){na.call(this);this._scaler=a};r["feathers.core.ScreenDensityScaleManager"]=Uo;Uo.__name__="feathers.core.ScreenDensityScaleManager";Uo.__interfaces__=[To];Uo.__super__=na;Uo.prototype=I(na.prototype,{_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this.removeTargetStageListeners(),
this._target.removeEventListener("addedToStage",m(this,this.screenDensityScaleManager_target_addedToStageHandler)),this._target.removeEventListener("removedFromStage",m(this,this.screenDensityScaleManager_target_removedFromStageHandler)));this._target=a;this._target!=null&&(this._target.addEventListener("addedToStage",m(this,this.screenDensityScaleManager_target_addedToStageHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.screenDensityScaleManager_target_removedFromStageHandler),
!1,0,!0),this.addTargetStageListeners());W.dispatch(this,"change");return this._target},_scaler:null,get_scaler:function(){return this._scaler},set_scaler:function(a){if(this._scaler==a)return this._scaler;this._scaler=a;W.dispatch(this,"change");return this._scaler},getScale:function(){var a=1;if(this._target==null)return a;var b=u.__cast(sa,Window).document.getElementById("viewport");if(b!=null&&b.localName=="meta"&&(b=b.getAttribute("content"),b.indexOf("user-scalable=no")!=-1)){var c=new sb("initial-scale=(\\d(?:\\.\\d+)?)",
"");c.match(b)&&(b=parseFloat(c.matched(1)),a*=1/b)}return a},getBounds:function(){var a=new Ea;if(this._target==null)return a;var b=this._target.stage;if(b==null)return a;var c=Math.floor(this._target.get_scaleX())!=this._target.get_scaleX(),d=Math.floor(b.stageWidth);c&&(d=ff.roundDownToNearest(d,2));a.width=d;b=Math.floor(b.stageHeight);c&&(b=ff.roundDownToNearest(b,2));a.height=b;return a},addTargetStageListeners:function(){this._target!=null&&this._target.stage!=null&&this._target.stage.addEventListener("resize",
m(this,this.screenDensityScaleManager_stage_resizeHandler),!1,0,!0)},removeTargetStageListeners:function(){this._target!=null&&this._target.stage!=null&&this._target.stage.removeEventListener("resize",m(this,this.screenDensityScaleManager_stage_resizeHandler))},screenDensityScaleManager_target_addedToStageHandler:function(a){this.addTargetStageListeners()},screenDensityScaleManager_target_removedFromStageHandler:function(a){this.removeTargetStageListeners()},screenDensityScaleManager_stage_resizeHandler:function(a){W.dispatch(this,
"change")},__class__:Uo,__properties__:{set_scaler:"set_scaler",get_scaler:"get_scaler",set_target:"set_target",get_target:"get_target"}});var Ud=function(){};r["feathers.core.ToolTipManager"]=Ud;Ud.__name__="feathers.core.ToolTipManager";Ud.__properties__={set_toolTipManagerFactory:"set_toolTipManagerFactory",get_toolTipManagerFactory:"get_toolTipManagerFactory"};Ud.defaultToolTipManagerFactory=function(a){return new Ik(a)};Ud.get_toolTipManagerFactory=function(){return Ud._toolTipManagerFactory};
Ud.set_toolTipManagerFactory=function(a){a==null&&(Ud._toolTipManagerFactory=Ud.defaultToolTipManagerFactory);if(Ud._toolTipManagerFactory==a)return Ud._toolTipManagerFactory;Ud._toolTipManagerFactory=a;return Ud._toolTipManagerFactory};Ud.hasRoot=function(a){return Ud.stageToManager.h.__keys__[a.__id__]!=null};Ud.forRoot=function(a){return Ud.stageToManager.h[a.__id__]};Ud.addRoot=function(a){if(a==null)throw new rb("ToolTipManager stage argument must not be null.");if(Ud.stageToManager.h.__keys__[a.__id__]!=
null)throw new rb("Tool tip manager root already exists");var b=Ud.get_toolTipManagerFactory();b==null&&(b=Ud.defaultToolTipManagerFactory);b=b(a);Ud.stageToManager.set(a,b);return b};Ud.removeRoot=function(a){var b=Ud.stageToManager.h[a.__id__];b!=null&&(b.dispose(),Ud.stageToManager.remove(a))};Ud.dispose=function(){for(var a=Ud.stageToManager.keys();a.hasNext();){var b=a.next();Ud.stageToManager.remove(b)}};Ud.prototype={ToolTipManager:function(){},__class__:Ud};var Uj=function(a){this._validating=
!1;this._queue=[];this._stage=null;this._stage=a;this._stage.addEventListener("render",m(this,this.validationQueue_stage_renderHandler),!1,-1E3,!0)};r["feathers.core.ValidationQueue"]=Uj;Uj.__name__="feathers.core.ValidationQueue";Uj.forStage=function(a){if(a==null)return null;Uj.STAGE_TO_VALIDATION_QUEUE.h.__keys__[a.__id__]==null&&Uj.STAGE_TO_VALIDATION_QUEUE.set(a,new Uj(a));return Uj.STAGE_TO_VALIDATION_QUEUE.h[a.__id__]};Uj.prototype={_stage:null,_queue:null,_validating:null,get_validating:function(){return this._validating},
dispose:function(){this._stage!=null&&(this._stage.removeEventListener("render",m(this,this.validationQueue_stage_renderHandler)),this._stage=null)},addControl:function(a){if(this._queue.indexOf(a)==-1){var b=this._queue.length;if(this._validating){var c=a.get_depth();for(--b;b>=0;){var d=this._queue[b].get_depth();if(c>=d)break;--b}++b;this._queue.splice(b,0,a)}else this._queue[b]=a,this._stage.invalidate()}},validateNow:function(){if(!this._validating){var a=this._queue.length;if(a!=0){this._validating=
!0;for(a>1&&this._queue.sort(function(b,c){b=c.get_depth()-b.get_depth();return b>0?-1:b<0?1:0});this._queue.length>0;)a=this._queue.shift(),a.get_depth()<0||a.validateNow();this._validating=!1}}},validationQueue_stage_renderHandler:function(a){this.validateNow()},__class__:Uj,__properties__:{get_validating:"get_validating"}};var qn=function(){};r["openfl.utils.IExternalizable"]=qn;qn.__name__="openfl.utils.IExternalizable";qn.__isInterface__=!0;qn.prototype={readExternal:null,writeExternal:null,
__class__:qn};var Vo=function(){};r["feathers.data.IFlatCollection"]=Vo;Vo.__name__="feathers.data.IFlatCollection";Vo.__isInterface__=!0;Vo.__interfaces__=[qb];Vo.prototype={get_length:null,get_filterFunction:null,set_filterFunction:null,get_sortCompareFunction:null,set_sortCompareFunction:null,get:null,set:null,add:null,addAt:null,addAll:null,addAllAt:null,reset:null,remove:null,removeAt:null,removeAll:null,indexOf:null,contains:null,updateAt:null,updateAll:null,iterator:null,refresh:null,__class__:Vo,
__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction",get_length:"get_length"}};var mg=function(a){this._filterFunction=this._sortCompareFunction=null;this._pendingRefresh=!1;this._filterAndSortData=this._array=null;na.call(this);a==null&&(a=[]);this.set_array(a)};r["feathers.data.ArrayCollection"]=mg;mg.__name__="feathers.data.ArrayCollection";mg.__interfaces__=
[qn,Vo];mg.__super__=na;mg.prototype=I(na.prototype,{_filterAndSortData:null,_array:null,get_array:function(){return this._array},set_array:function(a){if(this._array==a)return this._array;a==null&&(a=[]);this._array=a;wd.dispatch(this,"reset",-1);W.dispatch(this,"change");return this._array},get_length:function(){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?this._filterAndSortData.length:this._array.length},_pendingRefresh:null,_filterFunction:null,get_filterFunction:function(){return this._filterFunction},
set_filterFunction:function(a){if(this._filterFunction==a)return this._filterFunction;this._filterFunction=a;this._pendingRefresh=!0;wd.dispatch(this,"filterChange",-1);W.dispatch(this,"change");return this._filterFunction},_sortCompareFunction:null,get_sortCompareFunction:function(){return this._sortCompareFunction},set_sortCompareFunction:function(a){if(this._sortCompareFunction==a)return this._sortCompareFunction;this._sortCompareFunction=a;this._pendingRefresh=!0;wd.dispatch(this,"sortChange",
-1);W.dispatch(this,"change");return this._sortCompareFunction},get:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new oe("Failed to get item at index "+a+". Expected a value between 0 and "+(this.get_length()-1)+".");return this._filterAndSortData!=null?this._filterAndSortData[a]:this._array[a]},set:function(a,b){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>this.get_length())throw new oe("Failed to set item at index "+a+". Expected a value between 0 and "+
this.get_length()+".");if(this._filterAndSortData!=null){var c=this._array.length,d=null;a<this._filterAndSortData.length&&(d=this._filterAndSortData[a],c=this._array.indexOf(d));this._array[c]=b;if(this._filterFunction!=null){c=this._filterFunction(b);a<this._filterAndSortData.length?(c?(this._filterAndSortData[a]=b,wd.dispatch(this,"replaceItem",a,b,d)):(this._filterAndSortData.splice(a,1),wd.dispatch(this,"removeItem",a,null,d)),W.dispatch(this,"change")):c&&(this._filterAndSortData[this._filterAndSortData.length]=
b,wd.dispatch(this,"addItem",a,b),W.dispatch(this,"change"));return}if(this._sortCompareFunction!=null){X.remove(this._filterAndSortData,d);c=this.getSortedInsertionIndex(b);this._filterAndSortData[c]=b;wd.dispatch(this,"replaceItem",a,b,d);W.dispatch(this,"change");return}}a<this._array.length?(d=this._array[a],this._array[a]=b,wd.dispatch(this,"replaceItem",a,b,d)):(this._array[a]=b,wd.dispatch(this,"addItem",a,b));W.dispatch(this,"change")},add:function(a){this.addAtInternal(a,this.get_length(),
!0)},addAt:function(a,b){this.addAtInternal(a,b,!0)},addAll:function(a){for(a=a.iterator();a.hasNext();){var b=a.next();this.add(b)}},addAllAt:function(a,b){if(b<0||b>this.get_length())throw new oe("Failed to add collection at index "+b+". Expected a value between 0 and "+this.get_length()+".");for(a=a.iterator();a.hasNext();){var c=a.next();this.addAt(c,b);++b}},reset:function(a){this._pendingRefresh&&this.refreshFilterAndSort();this._filterAndSortData!=null&&(this._filterAndSortData.length=0);this._array.length=
0;if(a!=null)for(a=a.iterator();a.hasNext();){var b=a.next();this.addAtInternal(b,this.get_length(),!1)}wd.dispatch(this,"reset",-1);W.dispatch(this,"change")},remove:function(a){this._pendingRefresh&&this.refreshFilterAndSort();var b=this.indexOf(a);b!=-1&&(this._filterAndSortData!=null&&X.remove(this._filterAndSortData,a),X.remove(this._array,a),wd.dispatch(this,"removeItem",b,null,a),W.dispatch(this,"change"))},removeAt:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new oe("Failed to remove item at index "+
a+". Expected a value between 0 and "+(this.get_length()-1)+".");if(this._filterAndSortData!=null){var b=this._filterAndSortData[a];X.remove(this._filterAndSortData,b)}else b=this._array[a];X.remove(this._array,b);wd.dispatch(this,"removeItem",a,null,b);W.dispatch(this,"change");return b},removeAll:function(){this._pendingRefresh&&this.refreshFilterAndSort();this._array.length!=0&&(this._filterAndSortData!=null&&(this._filterAndSortData.length=0),this._array.length=0,wd.dispatch(this,"removeAll",
-1),W.dispatch(this,"change"))},indexOf:function(a){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?this._filterAndSortData.indexOf(a):this._array.indexOf(a)},contains:function(a){return this.indexOf(a)!=-1},iterator:function(){this._pendingRefresh&&this.refreshFilterAndSort();return this._filterAndSortData!=null?new zg(this._filterAndSortData):new zg(this._array)},updateAt:function(a){if(a<0||a>=this.get_length())throw new oe("Failed to update item at index "+
a+". Expected a value between 0 and "+(this.get_length()-1)+".");wd.dispatch(this,"updateItem",a);this.refresh()},updateAll:function(){wd.dispatch(this,"updateAll",-1);this.refresh()},refresh:function(){if(this._filterFunction!=null||this._sortCompareFunction!=null)this._pendingRefresh=!0,this._filterFunction!=null&&wd.dispatch(this,"filterChange",-1),this._sortCompareFunction!=null&&wd.dispatch(this,"sortChange",-1),W.dispatch(this,"change")},find:function(a){for(var b=0,c=this.get_length();b<c;){var d=
b++,f=this.get(d);if(a(f,d,this))return f}return null},findIndex:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(a(f,d,this))return d}return-1},some:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(a(f,d,this))return!0}return!1},every:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);if(!a(f,d,this))return!1}return!0},forEach:function(a){for(var b=0,c=this.get_length();b<c;){var d=b++,f=this.get(d);a(f,d,this)}},map:function(a){for(var b=
[],c=0,d=this.get_length();c<d;){var f=c++,g=this.get(f);b.push(a(g,f,this))}return new mg(b)},readExternal:function(a){a=a.readObject();this.set_array(a instanceof Array?a:null)},writeExternal:function(a){a.writeObject(this.get_array())},refreshFilterAndSort:function(){this._pendingRefresh=!1;var a=this._filterAndSortData;this._filterAndSortData=null;if(this._filterFunction!=null){a!=null?a.length=0:a=[];for(var b=0,c=this._array.length;b<c;){var d=b++;d=this._array[d];this._filterFunction(d)&&a.push(d)}this._filterAndSortData=
a}else if(this._sortCompareFunction!=null){if(a!=null)for(a.length=this._array.length,b=0,c=this._array.length;b<c;)d=b++,a[d]=this._array[d];else a=this._array.slice(0);this._filterAndSortData=a}this._sortCompareFunction!=null&&this._filterAndSortData.sort(this._sortCompareFunction)},toArray:function(){return this._filterAndSortData!=null?this._filterAndSortData.slice():this._array.slice()},getSortedInsertionIndex:function(a){if(this._sortCompareFunction==null)return this._filterAndSortData.length;
for(var b=0,c=this._filterAndSortData.length;b<c;){var d=b++;if(this._sortCompareFunction(a,this._filterAndSortData[d])<1)return d}return this._filterAndSortData.length},addAtInternal:function(a,b,c){this._pendingRefresh&&this.refreshFilterAndSort();if(b<0||b>this.get_length())throw new oe("Failed to add item at index "+b+". Expected a value between 0 and "+this.get_length()+".");if(this._filterAndSortData!=null){var d=this._array.length;b<this._filterAndSortData.length&&(d=this._array.indexOf(this._filterAndSortData[b]));
this._array.splice(d,0,a);d=!0;this._filterFunction!=null&&(d=this._filterFunction(a));d&&(d=b,this._sortCompareFunction!=null&&(d=this.getSortedInsertionIndex(a)),this._filterAndSortData.splice(d,0,a),c&&(wd.dispatch(this,"addItem",b,a),W.dispatch(this,"change")))}else this._array.splice(b,0,a),c&&(wd.dispatch(this,"addItem",b,a),W.dispatch(this,"change"))},__class__:mg,__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",set_filterFunction:"set_filterFunction",
get_filterFunction:"get_filterFunction",get_length:"get_length",set_array:"set_array",get_array:"get_array"}});var Lf=O["feathers.data.GroupListViewItemType"]={__ename__:"feathers.data.GroupListViewItemType",__constructs__:null,STANDARD:{_hx_name:"STANDARD",_hx_index:0,__enum__:"feathers.data.GroupListViewItemType",toString:D},HEADER:{_hx_name:"HEADER",_hx_index:1,__enum__:"feathers.data.GroupListViewItemType",toString:D}};Lf.__constructs__=[Lf.STANDARD,Lf.HEADER];var dr=function(){};r["feathers.data.IHierarchicalCollection"]=
dr;dr.__name__="feathers.data.IHierarchicalCollection";dr.__isInterface__=!0;dr.__interfaces__=[qb];dr.prototype={get_filterFunction:null,set_filterFunction:null,get_sortCompareFunction:null,set_sortCompareFunction:null,get:null,set:null,getLength:null,locationOf:null,contains:null,isBranch:null,addAt:null,remove:null,removeAt:null,removeAll:null,updateAt:null,updateAll:null,__class__:dr,__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",
set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction"}};var Gu=function(a,b){a==null&&(a=-1);this.enabled=!0;this.selected=!1;this.index=-1;this.index=a;this.selected=!1};r["feathers.data.PageIndicatorItemState"]=Gu;Gu.__name__="feathers.data.PageIndicatorItemState";Gu.prototype={owner:null,index:null,selected:null,enabled:null,__class__:Gu};var Lu=function(a,b,c,d,f){this.pattern=a;this.pathname=b;this.params=c;this.historyState=d;this.data=f};r["feathers.data.RouteState"]=
Lu;Lu.__name__="feathers.data.RouteState";Lu.prototype={pattern:null,pathname:null,params:null,urlVariables:null,historyState:null,data:null,__class__:Lu};var rh=O["feathers.data.SortOrder"]={__ename__:"feathers.data.SortOrder",__constructs__:null,ASCENDING:{_hx_name:"ASCENDING",_hx_index:0,__enum__:"feathers.data.SortOrder",toString:D},DESCENDING:{_hx_name:"DESCENDING",_hx_index:1,__enum__:"feathers.data.SortOrder",toString:D},NONE:{_hx_name:"NONE",_hx_index:2,__enum__:"feathers.data.SortOrder",
toString:D}};rh.__constructs__=[rh.ASCENDING,rh.DESCENDING,rh.NONE];var Nq=function(){this._data=new aa};r["feathers.dragDrop.DragData"]=Nq;Nq.__name__="feathers.dragDrop.DragData";Nq.prototype={_data:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this._data.h,a)},get:function(a){return this._data.h[a]},set:function(a,b){this._data.h[a]=b},remove:function(a){var b=this._data;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},__class__:Nq};var Va=function(){};
r["feathers.dragDrop.DragDropManager"]=Va;Va.__name__="feathers.dragDrop.DragDropManager";Va.__properties__={get_dragging:"get_dragging"};Va.get_dragging=function(){return Va.dragData!=null};Va.startDrag=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);Va.get_dragging()&&Va.cancelDrag();if(a==null)throw new rb("Drag source must not be null.");if(b==null)throw new rb("Drag data must not be null.");Va.dragSource=a;Va.dragData=b;Va.dragAvatar=c;Va.dragAvatarOffsetX=d;Va.dragAvatarOffsetY=f;a=u.__cast(a,
ea);Va._dragSourceStage=a.stage;Va.dragAvatar==null&&(Va._dragSourceBitmapData=new uc(Math.ceil(a.get_width()*1),Math.ceil(a.get_height()*1)),c=new S,c.scale(1,1),Va._dragSourceBitmapData.draw(a,c),Va.dragAvatar=new cg(Va._dragSourceBitmapData),Va.dragAvatar.set_alpha(.75),Va.dragAvatar.set_scaleX(1),Va.dragAvatar.set_scaleY(1));Va.dragAvatar instanceof Da&&(a=Va.dragAvatar,Va._oldDragAvatarMouseEnabled=a.mouseEnabled,a.mouseEnabled=!1);Va.dragAvatar instanceof lb&&(a=Va.dragAvatar,Va._oldDragAvatarMouseChildren=
a.mouseChildren,a.mouseChildren=!1);Va.dragAvatar.set_x(Va._dragSourceStage.get_mouseX()+Va.dragAvatarOffsetX);Va.dragAvatar.set_y(Va._dragSourceStage.get_mouseY()+Va.dragAvatarOffsetY);Ub.addPopUp(Va.dragAvatar,Va._dragSourceStage,!1,!1);Va._dragSourceStage.addEventListener("mouseMove",Va.dragDropManager_stage_mouseMoveHandler,!1,0,!0);Va._dragSourceStage.addEventListener("mouseUp",Va.dragDropManager_stage_mouseUpHandler,!1,0,!0);Nf.dispatch(Va.dragSource,"dragStart",b,!1,null,null,Va.dragSource);
Va.updateDropTarget(Va._dragSourceStage,Va._dragSourceStage.get_mouseX(),Va._dragSourceStage.get_mouseY())};Va.acceptDrag=function(a){if(Va.currentDropTarget!=a)throw new rb("Drop target cannot accept a drag at this time. Acceptance may only happen after the DragDropEvent.DRAG_ENTER event is dispatched and before the DragDropEvent.DRAG_EXIT event is dispatched.");Va.dropAccepted=!0};Va.cancelDrag=function(){Va.get_dragging()&&Va.completeDrag(!1)};Va.completeDrag=function(a){if(!Va.get_dragging())throw new fb("Drag cannot be completed because none is currently active.");
Va.currentDropTarget!=null&&(Nf.dispatch(Va.currentDropTarget,"dragExit",Va.dragData,!1,Va._dropTargetLocalX,Va._dropTargetLocalY,Va.dragSource),Va.currentDropTarget=null);var b=Va.dragSource,c=Va.dragData;Va.cleanup();Nf.dispatch(b,"dragComplete",c,a,null,null,b)};Va.cleanup=function(){Va._dragSourceStage!=null&&(Va._dragSourceStage.removeEventListener("mouseMove",Va.dragDropManager_stage_mouseMoveHandler),Va._dragSourceStage.removeEventListener("mouseUp",Va.dragDropManager_stage_mouseUpHandler),
Va._dragSourceStage=null);Va._dragSourceBitmapData!=null&&(Va._dragSourceBitmapData.dispose(),Va._dragSourceBitmapData=null);Va.dragAvatar!=null&&(Ub.isPopUp(Va.dragAvatar)&&Ub.removePopUp(Va.dragAvatar),Va.dragAvatar instanceof Da&&(Va.dragAvatar.mouseEnabled=Va._oldDragAvatarMouseEnabled),Va.dragAvatar instanceof lb&&(Va.dragAvatar.mouseChildren=Va._oldDragAvatarMouseChildren),Va.dragAvatar=null);Va.dragSource=null;Va.dragData=null};Va.updateDropTarget=function(a,b,c){b=new Qa(b,c);c=null;a=a.getObjectsUnderPoint(b);
for(var d=0;d<a.length;){var f=a[d];++d;if(!(f instanceof Da)||f.mouseEnabled){for(;f!=null;){if(u.__implements(f,uo)){c=f;break}f=f.parent}if(c!=null)break}}c!=null&&(b=c.globalToLocal(b));c!=Va.currentDropTarget?(Va.currentDropTarget!=null&&Nf.dispatch(Va.currentDropTarget,"dragExit",Va.dragData,!1,Va._dropTargetLocalX,Va._dropTargetLocalY,Va.dragSource),Va.currentDropTarget=c,Va.dropAccepted=!1,Va.currentDropTarget!=null&&(Va._dropTargetLocalX=b.x,Va._dropTargetLocalY=b.y,Nf.dispatch(Va.currentDropTarget,
"dragEnter",Va.dragData,!1,Va._dropTargetLocalX,Va._dropTargetLocalY,Va.dragSource))):Va.currentDropTarget!=null&&(Va._dropTargetLocalX=b.x,Va._dropTargetLocalY=b.y,Nf.dispatch(Va.currentDropTarget,"dragMove",Va.dragData,!1,Va._dropTargetLocalX,Va._dropTargetLocalY,Va.dragSource))};Va.dragDropManager_stage_mouseMoveHandler=function(a){a=u.__cast(a.currentTarget,cd);Va.dragAvatar!=null&&(Va.dragAvatar.set_x(a.get_mouseX()+Va.dragAvatarOffsetX),Va.dragAvatar.set_y(a.get_mouseY()+Va.dragAvatarOffsetY));
Va.updateDropTarget(a,a.get_mouseX(),a.get_mouseY())};Va.dragDropManager_stage_mouseUpHandler=function(a){a=!1;Va.currentDropTarget!=null&&Va.dropAccepted&&(Nf.dispatch(Va.currentDropTarget,"dragDrop",Va.dragData,!0,Va._dropTargetLocalX,Va._dropTargetLocalY,Va.dragSource),a=!0);Va.currentDropTarget=null;Va.completeDrag(a)};var xj=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.ButtonBarEvent"]=xj;xj.__name__="feathers.events.ButtonBarEvent";xj.dispatch=function(a,b,c){var d=xj._pool.get();
d.type=b;d.state=c;a=a.dispatchEvent(d);xj._pool.release(d);return a};xj.__super__=ka;xj.prototype=I(ka.prototype,{state:null,clone:function(){return new xj(this.type,this.state)},__class__:xj});var Ei=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.DatePickerEvent"]=Ei;Ei.__name__="feathers.events.DatePickerEvent";Ei.dispatch=function(a,b,c){var d=Ei._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Ei._pool.release(d);return a};Ei.__super__=ka;Ei.prototype=I(ka.prototype,
{state:null,clone:function(){return new Ei(this.type,this.state)},__class__:Ei});var Nf=function(a,b,c,d,f,g){ka.call(this,a,!1,this.cancelable);this.dragData=b;this.dropped=c;this.localX=d;this.localY=f;this.dragSource=g};r["feathers.events.DragDropEvent"]=Nf;Nf.__name__="feathers.events.DragDropEvent";Nf.dispatch=function(a,b,c,d,f,g,h){var l=Nf._pool.get();l.type=b;l.dragData=c;l.dropped=d;l.localX=f;l.localY=g;l.dragSource=h;a=a.dispatchEvent(l);Nf._pool.release(l);return a};Nf.__super__=ka;Nf.prototype=
I(ka.prototype,{dragData:null,dropped:null,localX:null,localY:null,dragSource:null,acceptDrag:function(a){Va.acceptDrag(a)},clone:function(){return new Nf(this.type,this.dragData,this.dropped,this.localX,this.localY,this.dragSource)},__class__:Nf});var W=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c)};r["feathers.events.FeathersEvent"]=W;W.__name__="feathers.events.FeathersEvent";W.dispatch=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);var f=W._pool.get();f.type=b;f.bubbles=
c;f.cancelable=d;a=a.dispatchEvent(f);W._pool.release(f);return a};W.__super__=ka;W.prototype=I(ka.prototype,{clone:function(){return new W(this.type,this.bubbles,this.cancelable)},__class__:W});var wd=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);ka.call(this,a,f,g);this.index=b;this.addedItem=c;this.removedItem=d};r["feathers.events.FlatCollectionEvent"]=wd;wd.__name__="feathers.events.FlatCollectionEvent";wd.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var l=wd._pool.get();
l.type=b;l.index=c;l.addedItem=d;l.removedItem=f;l.bubbles=g;l.cancelable=h;a=a.dispatchEvent(l);wd._pool.release(l);return a};wd.__super__=ka;wd.prototype=I(ka.prototype,{index:null,addedItem:null,removedItem:null,clone:function(){return new wd(this.type,this.index,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:wd});var yj=function(a){ka.call(this,a,!1,!1)};r["feathers.events.FormEvent"]=yj;yj.__name__="feathers.events.FormEvent";yj.dispatch=function(a,b){var c=yj._pool.get();
c.type=b;a=a.dispatchEvent(c);yj._pool.release(c);return a};yj.__super__=ka;yj.prototype=I(ka.prototype,{clone:function(){return new yj(this.type)},__class__:yj});var tf=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.GridViewEvent"]=tf;tf.__name__="feathers.events.GridViewEvent";tf.dispatchForCell=function(a,b,c){var d=tf._cellPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);tf._cellPool.release(d);return a};tf.dispatchForHeader=function(a,b,c){var d=tf._headerPool.get();d.type=
b;d.state=c;a=a.dispatchEvent(d);tf._headerPool.release(d);return a};tf.__super__=ka;tf.prototype=I(ka.prototype,{state:null,clone:function(){return new tf(this.type,this.state)},__class__:tf});var ni=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.GroupListViewEvent"]=ni;ni.__name__="feathers.events.GroupListViewEvent";ni.dispatch=function(a,b,c){var d=ni._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);ni._pool.release(d);return a};ni.__super__=ka;ni.prototype=I(ka.prototype,
{state:null,clone:function(){return new ni(this.type,this.state)},__class__:ni});var Eg=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);ka.call(this,a,f,g);this.location=b;this.addedItem=c;this.removedItem=d};r["feathers.events.HierarchicalCollectionEvent"]=Eg;Eg.__name__="feathers.events.HierarchicalCollectionEvent";Eg.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var l=Eg._pool.get();l.type=b;l.location=c;l.addedItem=d;l.removedItem=f;l.bubbles=g;l.cancelable=h;a=a.dispatchEvent(l);
Eg._pool.release(l);return a};Eg.__super__=ka;Eg.prototype=I(ka.prototype,{location:null,addedItem:null,removedItem:null,clone:function(){return new Eg(this.type,this.location,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:Eg});var Kh=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.ListViewEvent"]=Kh;Kh.__name__="feathers.events.ListViewEvent";Kh.dispatch=function(a,b,c){var d=Kh._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Kh._pool.release(d);
return a};Kh.__super__=ka;Kh.prototype=I(ka.prototype,{state:null,clone:function(){return new Kh(this.type,this.state)},__class__:Kh});var Bd=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.x=d;this.y=f};r["feathers.events.ScrollEvent"]=Bd;Bd.__name__="feathers.events.ScrollEvent";Bd.dispatch=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=!1);c==null&&(c=!1);var h=Bd._pool.get();h.type=b;h.bubbles=c;h.cancelable=d;h.x=f;h.y=
g;a=a.dispatchEvent(h);Bd._pool.release(h);return a};Bd.__super__=ka;Bd.prototype=I(ka.prototype,{x:null,y:null,clone:function(){return new Bd(this.type,this.bubbles,this.cancelable,this.x,this.y)},__class__:Bd});var nh=function(a,b){ka.call(this,a);this.affectsTarget=b!=null?b:nh.defaultAffectsTarget};r["feathers.events.StyleProviderEvent"]=nh;nh.__name__="feathers.events.StyleProviderEvent";nh.dispatch=function(a,b,c){var d=nh._pool.get();d.type=b;d.affectsTarget=c!=null?c:nh.defaultAffectsTarget;
a=a.dispatchEvent(d);nh._pool.release(d);return a};nh.defaultAffectsTarget=function(a){return!0};nh.__super__=ka;nh.prototype=I(ka.prototype,{affectsTarget:null,clone:function(){return new nh(this.type,this.affectsTarget)},__class__:nh});var zj=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.TabBarEvent"]=zj;zj.__name__="feathers.events.TabBarEvent";zj.dispatch=function(a,b,c){var d=zj._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);zj._pool.release(d);return a};zj.__super__=
ka;zj.prototype=I(ka.prototype,{state:null,clone:function(){return new zj(this.type,this.state)},__class__:zj});var Lh=function(a,b,c,d,f){ka.call(this,a,!1,!1);this.previousViewID=b;this.previousView=c;this.nextViewID=d;this.nextView=f};r["feathers.events.TransitionEvent"]=Lh;Lh.__name__="feathers.events.TransitionEvent";Lh.dispatch=function(a,b,c,d,f,g){var h=Lh._pool.get();h.type=b;h.bubbles=!1;h.cancelable=!1;h.previousViewID=c;h.previousView=d;h.nextViewID=f;h.nextView=g;a=a.dispatchEvent(h);
Lh._pool.release(h);return a};Lh.__super__=ka;Lh.prototype=I(ka.prototype,{previousView:null,previousViewID:null,nextView:null,nextViewID:null,clone:function(){return new Lh(this.type,this.previousViewID,this.previousView,this.nextViewID,this.nextView)},__class__:Lh});var Je=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.TreeGridViewEvent"]=Je;Je.__name__="feathers.events.TreeGridViewEvent";Je.dispatchForCell=function(a,b,c){var d=Je._cellPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);
Je._cellPool.release(d);return a};Je.dispatchForHeader=function(a,b,c){var d=Je._headerPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Je._headerPool.release(d);return a};Je.__super__=ka;Je.prototype=I(ka.prototype,{state:null,clone:function(){return new Je(this.type,this.state)},__class__:Je});var Dg=function(a,b){ka.call(this,a,!1,!1);this.state=b};r["feathers.events.TreeViewEvent"]=Dg;Dg.__name__="feathers.events.TreeViewEvent";Dg.dispatch=function(a,b,c){var d=Dg._pool.get();d.type=b;d.state=
c;a=a.dispatchEvent(d);Dg._pool.release(d);return a};Dg.__super__=ka;Dg.prototype=I(ka.prototype,{state:null,clone:function(){return new Dg(this.type,this.state)},__class__:Dg});var $e=function(a,b,c,d,f,g,h,l,k,q,w,v,z,n,E){E==null&&(E=!1);n==null&&(n=!1);z==null&&(z=!1);v==null&&(v=!1);q==null&&(q=1);k==null&&(k=0);l==null&&(l=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=f;this.localX=
g;this.localY=h;this.stageY=this.stageX=NaN;this.sizeX=l;this.sizeY=k;this.pressure=q;this.relatedObject=w;this.ctrlKey=v;this.altKey=z;this.shiftKey=n;this.commandKey=E};r["feathers.events.TriggerEvent"]=$e;$e.__name__="feathers.events.TriggerEvent";$e.dispatchFromMouseEvent=function(a,b){var c=$e._pool.get();c=$e.fromMouseEvent(b,c);a=a.dispatchEvent(c);$e._pool.release(c);return a};$e.dispatchFromTouchEvent=function(a,b){var c=$e._pool.get();c=$e.fromTouchEvent(b,c);a=a.dispatchEvent(c);$e._pool.release(c);
return a};$e.fromMouseEvent=function(a,b){if(a.type!="click")throw new rb("TriggerEvent.fromMouseEvent() requires MouseEvent.CLICK");if(b!=null)return b.type="trigger",b.bubbles=!1,b.cancelable=a.cancelable,b.touchPointID=-1,b.isPrimaryTouchPoint=!1,b.localX=a.localX,b.localY=a.localY,b.stageX=a.stageX,b.stageY=a.stageY,b.sizeX=0,b.sizeY=0,b.pressure=1,b.relatedObject=a.relatedObject,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.commandKey=a.commandKey,b;b=new $e("trigger",!1,a.cancelable,
-1,!1,a.localX,a.localY,0,0,1,a.relatedObject,a.ctrlKey,a.altKey,a.shiftKey,Object.prototype.hasOwnProperty.call(a,"commandKey")&&A.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};$e.fromTouchEvent=function(a,b){if(a.type!="touchTap")throw new rb("TriggerEvent.fromTouchEvent() requires TouchEvent.TOUCH_TAP");if(b!=null)return b.type="trigger",b.bubbles=!1,b.cancelable=a.cancelable,b.touchPointID=a.touchPointID,b.isPrimaryTouchPoint=a.isPrimaryTouchPoint,b.localX=a.localX,b.localY=
a.localY,b.stageX=a.stageX,b.stageY=a.stageY,b.sizeX=a.sizeX,b.sizeY=a.sizeY,b.pressure=a.pressure,b.relatedObject=a.relatedObject,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.commandKey=a.commandKey,b;b=new $e("trigger",!1,a.cancelable,a.touchPointID,a.isPrimaryTouchPoint,a.localX,a.localY,a.sizeX,a.sizeY,a.pressure,a.relatedObject,a.ctrlKey,a.altKey,a.shiftKey,Object.prototype.hasOwnProperty.call(a,"commandKey")&&A.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};
$e.__super__=ka;$e.prototype=I(ka.prototype,{touchPointID:null,isPrimaryTouchPoint:null,altKey:null,commandKey:null,ctrlKey:null,controlKey:null,shiftKey:null,localX:null,localY:null,sizeX:null,sizeY:null,pressure:null,stageX:null,stageY:null,relatedObject:null,clone:function(){var a=new $e(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey);
a.stageX=this.stageX;a.stageY=this.stageY;return a},__class__:$e});var Cq={fromGradientBoxTransform:function(a){switch(a._hx_index){case 0:var b=a.rotation;return function(v,z,n,E,H){n=new S;n.createGradientBox(v,z,b,E,H);return n};case 1:var c=a.rotation;return function(v,z,n,E,H){n=new S;n.createGradientBox(v,z,c*Math.PI/180,E,H);return n};case 2:var d=a.tx,f=a.ty;return function(v,z,n,E,H){E=new S;E.createGradientBox(v,z,n,d,f);return E};case 3:var g=a.rotation,h=a.tx,l=a.ty;return function(v,
z,n,E,H){n=new S;n.createGradientBox(v,z,g,h,l);return n};case 4:var k=a.rotation,q=a.tx,w=a.ty;return function(v,z,n,E,H){n=new S;n.createGradientBox(v,z,k*Math.PI/180,q,w);return n}}},fromRadians:function(a){return function(b,c,d,f,g){d=new S;d.createGradientBox(b,c,a,f,g);return d}},fromMatrix:function(a){return function(b,c,d,f,g){return a}}},Ab=O["feathers.graphics.FillStyle"]={__ename__:"feathers.graphics.FillStyle",__constructs__:null,SolidColor:(G=function(a,b){return{_hx_index:0,color:a,
alpha:b,__enum__:"feathers.graphics.FillStyle",toString:D}},G._hx_name="SolidColor",G.__params__=["color","alpha"],G),Bitmap:(G=function(a,b,c,d){return{_hx_index:1,bitmapData:a,matrix:b,repeat:c,smoothing:d,__enum__:"feathers.graphics.FillStyle",toString:D}},G._hx_name="Bitmap",G.__params__=["bitmapData","matrix","repeat","smoothing"],G),Gradient:(G=function(a,b,c,d,f,g,h,l){return{_hx_index:2,type:a,colors:b,alphas:c,ratios:d,matrix:f,spreadMethod:g,interpolationMethod:h,focalPointRatio:l,__enum__:"feathers.graphics.FillStyle",
toString:D}},G._hx_name="Gradient",G.__params__="type colors alphas ratios matrix spreadMethod interpolationMethod focalPointRatio".split(" "),G),None:{_hx_name:"None",_hx_index:3,__enum__:"feathers.graphics.FillStyle",toString:D}};Ab.__constructs__=[Ab.SolidColor,Ab.Bitmap,Ab.Gradient,Ab.None];var er=O["feathers.graphics.GradientBoxTransform"]={__ename__:"feathers.graphics.GradientBoxTransform",__constructs__:null,RotateRadians:(G=function(a){return{_hx_index:0,rotation:a,__enum__:"feathers.graphics.GradientBoxTransform",
toString:D}},G._hx_name="RotateRadians",G.__params__=["rotation"],G),RotateDegrees:(G=function(a){return{_hx_index:1,rotation:a,__enum__:"feathers.graphics.GradientBoxTransform",toString:D}},G._hx_name="RotateDegrees",G.__params__=["rotation"],G),Translate:(G=function(a,b){return{_hx_index:2,tx:a,ty:b,__enum__:"feathers.graphics.GradientBoxTransform",toString:D}},G._hx_name="Translate",G.__params__=["tx","ty"],G),RotateRadiansAndTranslate:(G=function(a,b,c){return{_hx_index:3,rotation:a,tx:b,ty:c,
__enum__:"feathers.graphics.GradientBoxTransform",toString:D}},G._hx_name="RotateRadiansAndTranslate",G.__params__=["rotation","tx","ty"],G),RotateDegreesAndTranslate:(G=function(a,b,c){return{_hx_index:4,rotation:a,tx:b,ty:c,__enum__:"feathers.graphics.GradientBoxTransform",toString:D}},G._hx_name="RotateDegreesAndTranslate",G.__params__=["rotation","tx","ty"],G)};er.__constructs__=[er.RotateRadians,er.RotateDegrees,er.Translate,er.RotateRadiansAndTranslate,er.RotateDegreesAndTranslate];var kc=O["feathers.graphics.LineStyle"]=
{__ename__:"feathers.graphics.LineStyle",__constructs__:null,SolidColor:(G=function(a,b,c,d,f,g,h,l){return{_hx_index:0,thickness:a,color:b,alpha:c,pixelHinting:d,scaleMode:f,caps:g,joints:h,miterLimit:l,__enum__:"feathers.graphics.LineStyle",toString:D}},G._hx_name="SolidColor",G.__params__="thickness color alpha pixelHinting scaleMode caps joints miterLimit".split(" "),G),Bitmap:(G=function(a,b,c,d,f){return{_hx_index:1,thickness:a,bitmapData:b,matrix:c,repeat:d,smooth:f,__enum__:"feathers.graphics.LineStyle",
toString:D}},G._hx_name="Bitmap",G.__params__=["thickness","bitmapData","matrix","repeat","smooth"],G),Gradient:(G=function(a,b,c,d,f,g,h,l,k){return{_hx_index:2,thickness:a,type:b,colors:c,alphas:d,ratios:f,matrix:g,spreadMethod:h,interpolationMethod:l,focalPointRatio:k,__enum__:"feathers.graphics.LineStyle",toString:D}},G._hx_name="Gradient",G.__params__="thickness type colors alphas ratios matrix spreadMethod interpolationMethod focalPointRatio".split(" "),G),None:{_hx_name:"None",_hx_index:3,
__enum__:"feathers.graphics.LineStyle",toString:D}};kc.__constructs__=[kc.SolidColor,kc.Bitmap,kc.Gradient,kc.None];var Xg=function(){};r["feathers.layout.ILayout"]=Xg;Xg.__name__="feathers.layout.ILayout";Xg.__isInterface__=!0;Xg.__interfaces__=[qb];Xg.prototype={layout:null,__class__:Xg};var Sm=function(){na.call(this)};r["feathers.layout.AnchorLayout"]=Sm;Sm.__name__="feathers.layout.AnchorLayout";Sm.__interfaces__=[Xg];Sm.__super__=na;Sm.prototype=I(na.prototype,{layout:function(a,b,c){for(var d=
0;d<a.length;){var f=a[d];++d;if(u.__implements(f,dc)){var g=f;if(!g.get_includeInLayout())continue;var h=null;g!=null&&g.get_layoutData()instanceof Hd&&(h=g.get_layoutData());if(h!=null){if(b.width!=null){var l=h.get_left(),k=h.get_right();l!=null&&k!=null&&l.get_relativeTo()==null&&k.get_relativeTo()==null&&f.set_width(b.width-l.get_value()-k.get_value())}b.height!=null&&(l=h.get_top(),k=h.get_bottom(),l!=null&&k!=null&&l.get_relativeTo()==null&&k.get_relativeTo()==null&&f.set_height(b.height-l.get_value()-
k.get_value()))}}u.__implements(f,oa)&&f.validateNow()}k=l=0;for(var q=[];q.length<a.length;){var w=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof Hd&&(h=g.get_layoutData());u.__implements(f,oa)&&f.validateNow();if(h==null)h=f.get_x()+f.get_width(),l<h&&(l=h),h=f.get_y()+f.get_height(),k<h&&(k=h);else{if(h.get_top()!=null){var v=h.get_top(),z=v.get_value();
g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}f.set_y(z);g!=null&&f.set_y(f.get_y()+(g.get_y()+g.get_height()))}if(h.get_left()!=null){v=h.get_left();z=v.get_value();g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}f.set_x(z);g!=null&&f.set_x(f.get_x()+(g.get_x()+g.get_width()))}if(h.get_verticalCenter()==null){z=f.get_y()+f.get_height();
if(h.get_bottom()!=null){v=h.get_bottom();var n=v.get_value();z=h.get_top()!=null?z+n:f.get_height()+n}k<z&&(k=z)}else z=f.get_height(),k<z&&(k=z);h.get_horizontalCenter()==null?(z=f.get_x()+f.get_width(),h.get_right()!=null&&(v=h.get_right(),n=v.get_value(),z=h.get_left()!=null?z+n:f.get_width()+n),l<z&&(l=z)):(h=f.get_width(),l<h&&(l=h))}q.push(f)}if(w==q.length)throw new fb("relativeTo circular reference detected");}for(var E=n=z=0,H=!0;H;){H=!1;b.width!=null?z=b.width:(z=l,b.minWidth!=null&&z<
b.minWidth?z=b.minWidth:b.maxWidth!=null&&z>b.maxWidth&&(z=b.maxWidth));b.height!=null?n=b.height:(n=k,b.minHeight!=null&&n<b.minHeight?n=b.minHeight:b.maxHeight!=null&&n>b.maxHeight&&(n=b.maxHeight));for(q.length=0;q.length<a.length;){w=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof Hd&&(h=g.get_layoutData());if(h!=null){if(h.get_top()!=null){v=h.get_top();
g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}v=v.get_value();g!=null&&(v+=g.get_y()+g.get_height());f.set_y(v)}if(h.get_left()!=null){v=h.get_left();g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}v=v.get_value();g!=null&&(v+=g.get_x()+g.get_width());f.set_x(v)}if(h.get_bottom()!=null){v=h.get_bottom();g=v.get_relativeTo();
if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}v=v.get_value();var J=n;g!=null&&(J=g.get_y());if(h.get_top()==null)f.set_y(J-v-f.get_height());else if(g=J-v-f.get_y(),g<0&&(g=0),f.get_height()!=g&&(f.set_height(g),b.width==null&&u.__implements(f,oa)&&(f.validateNow(),g=f.get_x()+f.get_width(),l<g))){l=g;H=!0;break}}else h.get_verticalCenter()!=null&&f.set_y(h.get_verticalCenter()+(n-f.get_height())/2);if(h.get_right()!=null){v=h.get_right();
g=v.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new fb("relativeTo must have the same parent");continue}v=v.get_value();J=z;g!=null&&(J=g.get_x());if(h.get_left()==null)f.set_x(J-v-f.get_width());else if(h=J-v-f.get_x(),h<0&&(h=0),f.get_width()!=h&&(f.set_width(h),b.height==null&&u.__implements(f,oa)&&(f.validateNow(),h=f.get_y()+f.get_height(),k<h))){k=h;H=!0;break}}else h.get_horizontalCenter()!=null&&f.set_x(h.get_horizontalCenter()+(z-f.get_width())/2)}q.push(f)}if(!H&&
w==q.length)throw new fb("relativeTo circular reference detected");}if(H&&(++E,E>a.length))throw new fb("AnchorLayout is stuck in an infinite loop.");}c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=z;c.contentHeight=n;c.viewPortWidth=z;c.viewPortHeight=n;return c},__class__:Sm});var Wo=function(a,b){a==null&&(a=0);na.call(this);this._value=a;this._relativeTo=b};r["feathers.layout.Anchor"]=Wo;Wo.__name__="feathers.layout.Anchor";Wo.__super__=na;Wo.prototype=I(na.prototype,{_value:null,
get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._value=a;W.dispatch(this,"change");return this._value},_relativeTo:null,get_relativeTo:function(){return this._relativeTo},set_relativeTo:function(a){if(this._relativeTo==a)return this._relativeTo;this._relativeTo=a;W.dispatch(this,"change");return this._relativeTo},__class__:Wo,__properties__:{set_relativeTo:"set_relativeTo",get_relativeTo:"get_relativeTo",set_value:"set_value",get_value:"get_value"}});
var Fg={fromPixels:function(a){return new Wo(a)},fromDisplayObject:function(a){return new Wo(0,a)}},Xo=function(){};r["feathers.layout.ILayoutData"]=Xo;Xo.__name__="feathers.layout.ILayoutData";Xo.__isInterface__=!0;Xo.__interfaces__=[qb];var Hd=function(a,b,c,d,f,g){this._top=this._right=this._bottom=this._left=this._horizontalCenter=this._verticalCenter=null;na.call(this);this.set_top(a);this.set_right(b);this.set_bottom(c);this.set_left(d);this.set_horizontalCenter(f);this.set_verticalCenter(g)};
r["feathers.layout.AnchorLayoutData"]=Hd;Hd.__name__="feathers.layout.AnchorLayoutData";Hd.__interfaces__=[Xo];Hd.center=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(null,null,null,null,a,b)};Hd.fill=function(a){a==null&&(a=0);return new Hd(Fg.fromPixels(a),Fg.fromPixels(a),Fg.fromPixels(a),Fg.fromPixels(a))};Hd.fillHorizontal=function(a){a==null&&(a=0);return new Hd(null,Fg.fromPixels(a),null,Fg.fromPixels(a))};Hd.fillVertical=function(a){a==null&&(a=0);return new Hd(Fg.fromPixels(a),
null,Fg.fromPixels(a),null)};Hd.topLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(Fg.fromPixels(a),null,null,Fg.fromPixels(b))};Hd.topCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(Fg.fromPixels(a),null,null,null,b)};Hd.topRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(Fg.fromPixels(a),Fg.fromPixels(b))};Hd.middleLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(null,null,null,Fg.fromPixels(b),null,a)};Hd.middleRight=function(a,b){b==
null&&(b=0);a==null&&(a=0);return new Hd(null,Fg.fromPixels(b),null,null,null,a)};Hd.bottomLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(null,null,Fg.fromPixels(a),Fg.fromPixels(b))};Hd.bottomCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(null,null,Fg.fromPixels(a),null,b)};Hd.bottomRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new Hd(null,Fg.fromPixels(b),Fg.fromPixels(a))};Hd.__super__=na;Hd.prototype=I(na.prototype,{_top:null,get_top:function(){return this._top},
set_top:function(a){if(this._top==a)return this._top;if(this._top!=null){var b=this._top;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._top=a;this._top!=null&&(b=this._top,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));W.dispatch(this,"change");return this._top},_right:null,get_right:function(){return this._right},set_right:function(a){if(this._right==a)return this._right;if(this._right!=null){var b=this._right;b.removeEventListener("change",
m(this,this.anchorLayoutData_anchor_changeHandler))}this._right=a;this._right!=null&&(b=this._right,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));W.dispatch(this,"change");return this._right},_bottom:null,get_bottom:function(){return this._bottom},set_bottom:function(a){if(this._bottom==a)return this._bottom;if(this._bottom!=null){var b=this._bottom;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._bottom=a;this._bottom!=
null&&(b=this._bottom,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),!1,0,!0));W.dispatch(this,"change");return this._bottom},_left:null,get_left:function(){return this._left},set_left:function(a){if(this._left==a)return this._left;if(this._left!=null){var b=this._left;b.removeEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler))}this._left=a;this._left!=null&&(b=this._left,b.addEventListener("change",m(this,this.anchorLayoutData_anchor_changeHandler),
!1,0,!0));W.dispatch(this,"change");return this._left},_horizontalCenter:null,get_horizontalCenter:function(){return this._horizontalCenter},set_horizontalCenter:function(a){if(this._horizontalCenter==a)return this._horizontalCenter;this._horizontalCenter=a;W.dispatch(this,"change");return this._horizontalCenter},_verticalCenter:null,get_verticalCenter:function(){return this._verticalCenter},set_verticalCenter:function(a){if(this._verticalCenter==a)return this._verticalCenter;this._verticalCenter=
a;W.dispatch(this,"change");return this._verticalCenter},anchorLayoutData_anchor_changeHandler:function(a){W.dispatch(this,"change")},__class__:Hd,__properties__:{set_verticalCenter:"set_verticalCenter",get_verticalCenter:"get_verticalCenter",set_horizontalCenter:"set_horizontalCenter",get_horizontalCenter:"get_horizontalCenter",set_left:"set_left",get_left:"get_left",set_bottom:"set_bottom",get_bottom:"get_bottom",set_right:"set_right",get_right:"get_right",set_top:"set_top",get_top:"get_top"}});
var Fe=O["feathers.layout.AutoSizeMode"]={__ename__:"feathers.layout.AutoSizeMode",__constructs__:null,STAGE:{_hx_name:"STAGE",_hx_index:0,__enum__:"feathers.layout.AutoSizeMode",toString:D},CONTENT:{_hx_name:"CONTENT",_hx_index:1,__enum__:"feathers.layout.AutoSizeMode",toString:D}};Fe.__constructs__=[Fe.STAGE,Fe.CONTENT];var Ao=function(){this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._horizontalGap=this._verticalGap=0;na.call(this)};r["feathers.layout.CalendarGridLayout"]=
Ao;Ao.__name__="feathers.layout.CalendarGridLayout";Ao.__interfaces__=[Xg];Ao.__super__=na;Ao.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=
a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},
_horizontalGap:null,get_horizontalGap:function(){return this._horizontalGap},set_horizontalGap:function(a){if(this._horizontalGap==a)return this._horizontalGap;this._horizontalGap=a;W.dispatch(this,"change");return this._horizontalGap},_verticalGap:null,get_verticalGap:function(){return this._verticalGap},set_verticalGap:function(a){if(this._verticalGap==a)return this._verticalGap;this._verticalGap=a;W.dispatch(this,"change");return this._verticalGap},setPadding:function(a){this.set_paddingTop(a);
this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},setGap:function(a){this.set_horizontalGap(a);this.set_verticalGap(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d];++d;if(u.__implements(f,dc)){var g=f;if(!g.get_includeInLayout())continue}u.__implements(f,oa)&&f.validateNow()}var h=0,l=0;for(d=0;d<a.length;){f=a[d];++d;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout()))continue;h=Math.max(h,f.get_width());l=Math.max(l,f.get_height())}h<0&&(h=0);l<0&&(l=
0);d=Math.ceil(a.length/7);var k=b.width;k!=null?h=(k-this._paddingLeft-this._paddingRight-this._horizontalGap*7+this._horizontalGap)/7:(k=this._paddingLeft+this._paddingRight+7*(h+this._horizontalGap)-this._horizontalGap,b.minWidth!=null&&k<b.minWidth?k=b.minWidth:b.maxWidth!=null&&k>b.maxWidth&&(k=b.maxWidth));var q=b.height;q!=null?l=(q-this._paddingTop-this._paddingBottom-this._verticalGap*d+this._verticalGap)/d:(q=this._paddingTop+this._paddingBottom+d*(l+this._verticalGap)-this._verticalGap,
b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight));b=0;var w=this._paddingLeft,v=this._paddingTop;d=0;for(var z=a.length;d<z;){f=d++;f=a[f];if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout()))continue;f.get_width()!=h&&f.set_width(h);f.get_height()!=l&&f.set_height(l);b>=7&&(w=this._paddingLeft,v+=l+this._verticalGap,b=0);f.set_x(w);f.set_y(v);w+=h+this._horizontalGap;++b}this.get_paddingBottom();c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=
k;c.contentHeight=q;c.viewPortWidth=k;c.viewPortHeight=q;return c},validateItems:function(a,b){for(b=0;b<a.length;){var c=a[b];++b;(!u.__implements(c,dc)||c.get_includeInLayout())&&u.__implements(c,oa)&&c.validateNow()}},__class__:Ao,__properties__:{set_verticalGap:"set_verticalGap",get_verticalGap:"get_verticalGap",set_horizontalGap:"set_horizontalGap",get_horizontalGap:"get_horizontalGap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",
set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Xi=O["feathers.layout.Direction"]={__ename__:"feathers.layout.Direction",__constructs__:null,VERTICAL:{_hx_name:"VERTICAL",_hx_index:0,__enum__:"feathers.layout.Direction",toString:D},HORIZONTAL:{_hx_name:"HORIZONTAL",_hx_index:1,__enum__:"feathers.layout.Direction",toString:D},NONE:{_hx_name:"NONE",_hx_index:2,__enum__:"feathers.layout.Direction",toString:D}};
Xi.__constructs__=[Xi.VERTICAL,Xi.HORIZONTAL,Xi.NONE];var Yo=function(){this._verticalAlign=fc.TOP;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;na.call(this)};r["feathers.layout.FormLayout"]=Yo;Yo.__name__="feathers.layout.FormLayout";Yo.__interfaces__=[Xg];Yo.__super__=na;Yo.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=
a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},
_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;W.dispatch(this,"change");return this._gap},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==
a)return this._verticalAlign;this._verticalAlign=a;W.dispatch(this,"change");return this._verticalAlign},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d];++d;var g=f instanceof Gi?f:null;g!=null&&g.set_customTextColumnWidth(null);u.__implements(f,oa)&&f.validateNow()}var h=1/0,l=1/0,k=0,q=0;for(d=0;d<a.length;){f=a[d];++d;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout()))continue;
g=f instanceof Gi?f:null;if(g!=null)switch(g.get_textPosition()._hx_index){case 1:q=Math.max(q,g.getTextMeasuredWidth());l=Math.min(l,g.getTextMeasuredMaxWidth());break;case 3:k=Math.max(k,g.getTextMeasuredWidth()),h=Math.min(h,g.getTextMeasuredMaxWidth())}}k>h&&(k=h);q>l&&(q=l);h=0;l=this._paddingTop;for(d=0;d<a.length;){f=a[d];++d;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout()))continue;g=f instanceof Gi?f:null;if(g!=null){switch(g.get_textPosition()._hx_index){case 1:g.set_customTextColumnWidth(q);
break;case 3:g.set_customTextColumnWidth(k);break;default:g.set_customTextColumnWidth(null)}u.__implements(f,oa)&&f.validateNow()}h<f.get_width()&&(h=f.get_width());f.set_x(this._paddingLeft);f.set_y(l);l+=f.get_height()+this._gap}h+=this._paddingLeft+this._paddingRight;l+=this._paddingBottom;a.length>0&&(l-=this._gap);k=h;b.width!=null?k=b.width:b.minWidth!=null&&k<b.minWidth?k=b.minWidth:b.maxWidth!=null&&k>b.maxWidth&&(k=b.maxWidth);q=l;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?
q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);for(d=0;d<a.length;){f=a[d];++d;if(u.__implements(f,dc)&&(g=f,!g.get_includeInLayout()))continue;f.set_width(k-this._paddingLeft-this._paddingRight)}d=l-this._paddingTop-this._paddingBottom;if(this._verticalAlign==fc.BOTTOM||this._verticalAlign==fc.MIDDLE)if(f=q-this._paddingTop-this._paddingBottom,!(d>=f))for(b=0,this._verticalAlign==fc.BOTTOM?b=f-d:this._verticalAlign==fc.MIDDLE&&(b=(f-d)/2),d=0;d<a.length;){f=a[d];++d;if(u.__implements(f,
dc)&&(g=f,!g.get_includeInLayout()))continue;f.set_y(Math.max(this._paddingTop,f.get_y()+b))}h<k&&(h=k);l<q&&(l=q);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=l;c.viewPortWidth=k;c.viewPortHeight=q;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b];++b;var d=c instanceof Gi?c:null;d!=null&&d.set_customTextColumnWidth(null);u.__implements(c,oa)&&c.validateNow()}},applyHorizontalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(u.__implements(d,
dc)){var f=d;if(!f.get_includeInLayout())continue}d.set_width(b-this._paddingLeft-this._paddingRight)}},applyVerticalAlign:function(a,b,c){if(this._verticalAlign==fc.BOTTOM||this._verticalAlign==fc.MIDDLE){var d=c-this._paddingTop-this._paddingBottom;if(!(b>=d))for(c=0,this._verticalAlign==fc.BOTTOM?c=d-b:this._verticalAlign==fc.MIDDLE&&(c=(d-b)/2),b=0;b<a.length;){d=a[b];++b;if(u.__implements(d,dc)){var f=d;if(!f.get_includeInLayout())continue}d.set_y(Math.max(this._paddingTop,d.get_y()+c))}}},__class__:Yo,
__properties__:{set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var pl=function(){this._heightResetEnabled=!0;this._paddingLeft=this._paddingRight=0;na.call(this)};
r["feathers.layout.GridViewRowLayout"]=pl;pl.__name__="feathers.layout.GridViewRowLayout";pl.__interfaces__=[Xg];pl.__super__=na;pl.prototype=I(na.prototype,{_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==
a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_columns:null,get_columns:function(){return this._columns},set_columns:function(a){if(this._columns==a)return this._columns;this._columns=a;W.dispatch(this,"change");return this._columns},_customColumnWidths:null,get_customColumnWidths:function(){return this._customColumnWidths},set_customColumnWidths:function(a){if(this._customColumnWidths==a)return this._customColumnWidths;this._customColumnWidths=
a;W.dispatch(this,"change");return this._customColumnWidths},_heightResetEnabled:null,get_heightResetEnabled:function(){return this._heightResetEnabled},set_heightResetEnabled:function(a){if(this._heightResetEnabled==a)return this._heightResetEnabled;this._heightResetEnabled=a;W.dispatch(this,"change");return this._heightResetEnabled},setPadding:function(a){this.set_paddingRight(a);this.set_paddingLeft(a)},layout:function(a,b,c){this.applyColumnWidths(a,b.width,b.minWidth,b.maxWidth);for(var d=this._paddingLeft,
f=0,g=0;g<a.length;){var h=a[g];++g;this._heightResetEnabled&&b.height==null&&u.__implements(h,Kb)&&h.resetHeight();u.__implements(h,oa)&&h.validateNow();f<h.get_height()&&(f=h.get_height());h.set_x(d);d+=h.get_width()}var l=d+=this._paddingRight;b.width!=null?l=b.width:b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth);var k=f;b.height!=null?k=b.height:b.minHeight!=null&&k<b.minHeight?k=b.minHeight:b.maxHeight!=null&&k>b.maxHeight&&(k=b.maxHeight);for(g=0;g<
a.length;)h=a[g],++g,h.set_height(k);d<l&&(d=l);f<k&&(f=k);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=d;c.contentHeight=f;c.viewPortWidth=l;c.viewPortHeight=k;return c},applyViewPortHeight:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;d.set_height(b)}},applyColumnWidths:function(a,b,c,d){for(var f=[],g=0,h=0,l=0,k=0,q=this._columns.get_length();k<q;){var w=k++,v=this._columns.get(w),z=v.width,n=a[w];if(z!=null)n.set_width(z),u.__implements(n,oa)&&n.validateNow();else if(this._customColumnWidths!=
null&&w<this._customColumnWidths.length)n.set_width(this._customColumnWidths[w]),u.__implements(n,oa)&&n.validateNow();else{z=100;var E=0;u.__implements(n,Kb)&&(u.__implements(n,oa)&&n.validateNow(),E=n.get_minWidth());E=Math.max(v.minWidth,E);l=Math.max(E,l);h+=z;f.push(w);continue}g+=n.get_width()}g+=this._paddingLeft+this._paddingRight;b==null&&(b=g+f.length*l,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=g;b<0&&(b=0);do{c=!1;d=0;g=b/h;for(k=0;k<f.length;)l=f[k],++k,n=a[l],v=this._columns.get(l),z=
100,q=Math.floor(g*z),v=v.minWidth,v>b&&(v=b),q<v&&(q=v,b-=q,h-=z,X.remove(f,l),c=!0),n.set_width(q),u.__implements(n,oa)&&n.validateNow(),d+=q;c||(b-=d)}while(c);b>0&&f.length>0&&(l=f[f.length-1],a=a[l],a.set_width(a.get_width()+b))},__class__:pl,__properties__:{set_heightResetEnabled:"set_heightResetEnabled",get_heightResetEnabled:"get_heightResetEnabled",set_customColumnWidths:"set_customColumnWidths",get_customColumnWidths:"get_customColumnWidths",set_columns:"set_columns",get_columns:"get_columns",
set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft"}});var ro=function(){this._fallbackFluidIndex=-1;this._verticalAlign=fc.JUSTIFY;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=0;na.call(this)};r["feathers.layout.HDividedBoxLayout"]=ro;ro.__name__="feathers.layout.HDividedBoxLayout";ro.__interfaces__=[Xg];ro.__super__=na;ro.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},
set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==
a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=
a;W.dispatch(this,"change");return this._verticalAlign},_customItemWidths:null,get_customItemWidths:function(){return this._customItemWidths},set_customItemWidths:function(a){if(this._customItemWidths==a)return this._customItemWidths;this._customItemWidths=a;W.dispatch(this,"change");return this._customItemWidths},_fallbackFluidIndex:null,get_fallbackFluidIndex:function(){return this._fallbackFluidIndex},set_fallbackFluidIndex:function(a){if(this._fallbackFluidIndex==a)return this._fallbackFluidIndex;
this._fallbackFluidIndex=a;W.dispatch(this,"change");return this._fallbackFluidIndex},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=a[d],g=null;d>0&&(g=a[d-1]);if(!u.__implements(f,dc)||f.get_includeInLayout()){if(this._customItemWidths!=null&&d<this._customItemWidths.length){var h=this._customItemWidths[d];h!=null&&f.set_width(h)}u.__implements(f,oa)&&f.validateNow();
u.__implements(g,oa)&&g.validateNow()}d+=2}this.applyPercentWidth(a,b.width,b.minWidth,b.maxWidth);h=this._paddingLeft;var l=0;for(d=0;d<a.length;){f=a[d];g=null;d>0&&(g=a[d-1]);if(!u.__implements(f,dc)||f.get_includeInLayout())u.__implements(g,oa)&&g.validateNow(),g!=null&&g.get_visible()&&(g.set_x(h),h+=g.get_width()),u.__implements(f,oa)&&f.validateNow(),l<f.get_height()&&(l=f.get_height()),f.set_x(h),h+=f.get_width();d+=2}h+=this._paddingRight;l+=this._paddingTop+this._paddingBottom;f=h;b.width!=
null?f=b.width:b.minWidth!=null&&f<b.minWidth?f=b.minWidth:b.maxWidth!=null&&f>b.maxWidth&&(f=b.maxWidth);var k=l;b.height!=null?k=b.height:b.minHeight!=null&&k<b.minHeight?k=b.minHeight:b.maxHeight!=null&&k>b.maxHeight&&(k=b.maxHeight);this.applyPercentHeight(a,k);for(d=0;d<a.length;){g=null;d>0&&(g=a[d-1]);if(g!=null)switch(this._verticalAlign._hx_index){case 0:g.set_y(this._paddingTop);break;case 1:g.set_y(Math.max(this._paddingTop,this._paddingTop+(k-this._paddingTop-this._paddingBottom-g.get_height())/
2));break;case 2:g.set_y(Math.max(this._paddingTop,this._paddingTop+(k-this._paddingTop-this._paddingBottom)-g.get_height()));break;case 3:g.set_y(this._paddingTop),g.set_height(k-this._paddingTop-this._paddingBottom)}d+=2}h<f&&(h=f);l<k&&(l=k);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=l;c.viewPortWidth=f;c.viewPortHeight=k;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b],d=null;b>0&&(d=a[b-1]);if(!u.__implements(c,dc)||c.get_includeInLayout()){if(this._customItemWidths!=
null&&b<this._customItemWidths.length){var f=this._customItemWidths[b];f!=null&&c.set_width(f)}u.__implements(c,oa)&&c.validateNow();u.__implements(d,oa)&&d.validateNow()}b+=2}},applyVerticalAlign:function(a,b){for(var c=0;c<a.length;){var d=null;c>0&&(d=a[c-1]);if(d!=null)switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+(b-this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,
this._paddingTop+(b-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(b-this._paddingTop-this._paddingBottom)}c+=2}},applyPercentWidth:function(a,b,c,d){for(var f=[],g=[],h=0,l=0,k=0,q=this._fallbackFluidIndex,w=-1,v=0;v<a.length;){var z=a[v],n=null;v>0&&(n=a[v-1]);if(u.__implements(z,dc)&&!z.get_includeInLayout())q==v&&(q=-1);else{n!=null&&n.get_visible()&&(h+=n.get_width());w=v;n=Math.floor(v/2);var E=!0;this._customItemWidths!=null&&n<this._customItemWidths.length&&
(n=this._customItemWidths[n],n!=null&&(E=!1,z.set_width(n),f.push(v),u.__implements(z,oa)&&z.validateNow()));if(E){E=100;if(u.__implements(z,Kb)){var H=z;z=H.get_explicitMinWidth();z!=null&&(l+=z)}k+=E;g.push(v)}else h+=z.get_width()}v+=2}h+=this._paddingLeft+this._paddingRight;b==null&&(b=h+l,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=h;do{h=!1;l=0;v=b/k;v<0&&(v=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],E=100,n=Math.floor(v*E),H=null,u.__implements(z,Kb)&&(H=z,H=H.get_explicitMinWidth()),H!=null&&(H>
b&&(H=b),n<H&&(n=H,b-=n,k-=E,X.remove(g,d),h=!0)),z.set_width(n),u.__implements(z,oa)&&z.validateNow(),l+=n;h||(b-=l)}while(h);if(b>0&&g.length>0)d=g[g.length-1],a=a[d],a.set_width(a.get_width()+b);else if(b!=0){if(q==-1||w<q)q=w;q!=-1&&(g=a[q],n=g.get_width()+b,n<0?(b=n,n=0,X.remove(f,q)):b=0,g.set_width(n));if(b!=0)for(q=b/f.length,c=0;c<f.length;)d=f[c],++c,z=a[d],z.set_width(z.get_width()+q)}},applyPercentHeight:function(a,b){b=b-this._paddingTop-this._paddingBottom;for(var c=0;c<a.length;){var d=
a[c];if(!u.__implements(d,dc)||d.get_includeInLayout()){var f=b;if(u.__implements(d,Kb)){var g=d,h=g.get_explicitMinHeight();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxHeight();g!=null&&f>g&&(f=g)}d.set_height(f)}c+=2}},__class__:ro,__properties__:{set_fallbackFluidIndex:"set_fallbackFluidIndex",get_fallbackFluidIndex:"get_fallbackFluidIndex",set_customItemWidths:"set_customItemWidths",get_customItemWidths:"get_customItemWidths",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",
set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Vb=O["feathers.layout.HorizontalAlign"]={__ename__:"feathers.layout.HorizontalAlign",__constructs__:null,LEFT:{_hx_name:"LEFT",_hx_index:0,__enum__:"feathers.layout.HorizontalAlign",toString:D},CENTER:{_hx_name:"CENTER",
_hx_index:1,__enum__:"feathers.layout.HorizontalAlign",toString:D},RIGHT:{_hx_name:"RIGHT",_hx_index:2,__enum__:"feathers.layout.HorizontalAlign",toString:D},JUSTIFY:{_hx_name:"JUSTIFY",_hx_index:3,__enum__:"feathers.layout.HorizontalAlign",toString:D}};Vb.__constructs__=[Vb.LEFT,Vb.CENTER,Vb.RIGHT,Vb.JUSTIFY];var Wi=function(){};r["feathers.layout.IDragDropLayout"]=Wi;Wi.__name__="feathers.layout.IDragDropLayout";Wi.__isInterface__=!0;Wi.__interfaces__=[Xg];Wi.prototype={getDragDropIndex:null,getDragDropRegion:null,
__class__:Wi};var Zo=function(){this._verticalAlign=fc.TOP;this._minItemWidth=0;this._maxItemWidth=1/0;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;na.call(this)};r["feathers.layout.HorizontalDistributedLayout"]=Zo;Zo.__name__="feathers.layout.HorizontalDistributedLayout";Zo.__interfaces__=[Wi,Xg];Zo.__super__=na;Zo.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==
a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=
a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;W.dispatch(this,"change");return this._gap},_maxItemWidth:null,get_maxItemWidth:function(){return this._maxItemWidth},
set_maxItemWidth:function(a){if(this._maxItemWidth==a)return this._maxItemWidth;this._maxItemWidth=a;W.dispatch(this,"change");return this._maxItemWidth},_minItemWidth:null,get_minItemWidth:function(){return this._minItemWidth},set_minItemWidth:function(a){if(this._minItemWidth==a)return this._minItemWidth;this._minItemWidth=a;W.dispatch(this,"change");return this._minItemWidth},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==
a)return this._verticalAlign;this._verticalAlign=a;W.dispatch(this,"change");return this._verticalAlign},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){this.applyDistributedWidth(a,b.width,b.minWidth,b.maxWidth);for(var d=this._paddingLeft,f=0,g=0;g<a.length;){var h=a[g];++g;if(u.__implements(h,dc)){var l=h;if(!l.get_includeInLayout())continue}u.__implements(h,oa)&&h.validateNow();f<h.get_height()&&(f=
h.get_height());h.set_x(d);d+=h.get_width()+this._gap}d+=this._paddingRight;a.length>0&&(d-=this._gap);f+=this._paddingTop+this._paddingBottom;var k=d;b.width!=null?k=b.width:b.minWidth!=null&&k<b.minWidth?k=b.minWidth:b.maxWidth!=null&&k>b.maxWidth&&(k=b.maxWidth);var q=f;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);for(g=0;g<a.length;){h=a[g];++g;if(u.__implements(h,dc)&&(l=h,!l.get_includeInLayout()))continue;switch(this._verticalAlign._hx_index){case 0:h.set_y(this._paddingTop);
break;case 1:h.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom-h.get_height())/2));break;case 2:h.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom)-h.get_height()));break;case 3:h.set_y(this._paddingTop),h.set_height(q-this._paddingTop-this._paddingBottom)}}d<k&&(d=k);f<q&&(f=q);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=d;c.contentHeight=f;c.viewPortWidth=k;c.viewPortHeight=q;return c},getDragDropIndex:function(a,
b,c,d,f){c=this._paddingLeft;d=0;for(f=a.length;d<f;){var g=d++,h=a[g];if(!u.__implements(h,dc)||h.get_includeInLayout()){u.__implements(h,oa)&&h.validateNow();h=h.get_width();if(b<c+h/2)return g;c+=h+this._gap}}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){d=b;!(b<0)&&d>a.length&&(d=a.length);b=this._paddingLeft;for(c=0;c<d;)if(f=c++,f=a[f],!u.__implements(f,dc)||f.get_includeInLayout())u.__implements(f,oa)&&f.validateNow(),b+=f.get_width()+this._gap;h==null?h=new Ea(b,0,0,g):h.setTo(b,
0,0,g);return h},applyDistributedWidth:function(a,b,c,d){for(var f=0,g=0,h=0,l=0;l<a.length;){var k=a[l];++l;if(u.__implements(k,dc)){var q=k;if(!q.get_includeInLayout())continue}u.__implements(k,oa)&&k.validateNow();k=u.__implements(k,Kb)?k.get_minWidth():k.get_width();f<k&&(f=k);g+=100;++h}b!=null?l=b:(l=this._paddingLeft+this._paddingRight+(f+this._gap)*h-this._gap,c!=null&&l<c?l=c:d!=null&&l>d&&(l=d));l-=this._paddingLeft+this._paddingRight+this._gap*(h-1);l<0&&(l=0);c=l/g;for(l=0;l<a.length;){k=
a[l];++l;if(u.__implements(k,dc)&&(q=k,!q.get_includeInLayout()))continue;d=c*100;d<this._minItemWidth?d=this._minItemWidth:d>this._maxItemWidth&&(d=this._maxItemWidth);k.set_width(d);u.__implements(k,oa)&&k.validateNow()}},applyVerticalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(u.__implements(d,dc)){var f=d;if(!f.get_includeInLayout())continue}switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+
(b-this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,this._paddingTop+(b-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(b-this._paddingTop-this._paddingBottom)}}},__class__:Zo,__properties__:{set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minItemWidth:"set_minItemWidth",get_minItemWidth:"get_minItemWidth",set_maxItemWidth:"set_maxItemWidth",get_maxItemWidth:"get_maxItemWidth",
set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Gh=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=fc.TOP;this._horizontalAlign=Vb.LEFT;this._paddingTop=
this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;na.call(this)};r["feathers.layout.HorizontalLayout"]=Gh;Gh.__name__="feathers.layout.HorizontalLayout";Gh.__interfaces__=[Wi,Xg];Gh.__super__=na;Gh.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},
set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==
a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;W.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==a)return this._minGap;this._minGap=a;W.dispatch(this,"change");return this._minGap},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},
set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;W.dispatch(this,"change");return this._horizontalAlign},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;W.dispatch(this,"change");return this._verticalAlign},_justifyResetEnabled:null,get_justifyResetEnabled:function(){return this._justifyResetEnabled},set_justifyResetEnabled:function(a){if(this._justifyResetEnabled==
a)return this._justifyResetEnabled;this._justifyResetEnabled=a;W.dispatch(this,"change");return this._justifyResetEnabled},_percentWidthResetEnabled:null,get_percentWidthResetEnabled:function(){return this._percentWidthResetEnabled},set_percentWidthResetEnabled:function(a){if(this._percentWidthResetEnabled==a)return this._percentWidthResetEnabled;this._percentWidthResetEnabled=a;W.dispatch(this,"change");return this._percentWidthResetEnabled},_percentHeightResetEnabled:null,get_percentHeightResetEnabled:function(){return this._percentHeightResetEnabled},
set_percentHeightResetEnabled:function(a){if(this._percentHeightResetEnabled==a)return this._percentHeightResetEnabled;this._percentHeightResetEnabled=a;W.dispatch(this,"change");return this._percentHeightResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/0;f&&(d=this._minGap);var g=this._verticalAlign==fc.JUSTIFY,h=b.width;h!=null&&(h-=this._paddingLeft+this._paddingRight);
var l=b.height;l!=null&&(l-=this._paddingTop+this._paddingBottom);for(f=0;f<a.length;){var k=a[f];++f;var q=null,w=null;if(u.__implements(k,dc)){var v=k;if(!v.get_includeInLayout())continue;v=v.get_layoutData();v=v instanceof Yg?v:null;v!=null&&(q=v.get_percentWidth(),w=v.get_percentHeight())}g?l!=null?k.set_height(l):this._justifyResetEnabled&&u.__implements(k,Kb)&&k.resetHeight():l!=null?w!=null&&(w<0?w=0:w>100&&(w=100),k.set_height(w/100*l)):w!=null&&this._percentHeightResetEnabled&&u.__implements(k,
Kb)&&k.resetHeight();q!=null&&this._percentWidthResetEnabled&&h==null&&u.__implements(k,Kb)&&k.resetWidth();u.__implements(k,oa)&&k.validateNow();g&&l==null&&b.maxHeight!=null&&(q=b.maxHeight-this._paddingTop-this._paddingBottom,k.get_height()>q&&(k.set_height(q),u.__implements(k,oa)&&k.validateNow()))}this.applyPercentWidth(a,b.width,b.minWidth,b.maxWidth,d);g=this._paddingLeft;for(f=h=0;f<a.length;){k=a[f];++f;v=null;if(u.__implements(k,dc)){w=k;if(!w.get_includeInLayout())continue;v=w.get_layoutData();
v=v instanceof Yg?v:null}u.__implements(k,oa)&&k.validateNow();v!=null&&v.get_marginLeft()!=null&&(g+=v.get_marginLeft());h<k.get_height()&&(h=k.get_height());k.set_x(g);g+=k.get_width()+d;v!=null&&v.get_marginRight()!=null&&(g+=v.get_marginRight())}g+=this._paddingRight;a.length>0&&(g-=d);h+=this._paddingTop+this._paddingBottom;l=g;b.width!=null?l=b.width:b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth);q=h;b.height!=null?q=b.height:b.minHeight!=null&&q<
b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight);this.applyPercentHeight(a,q);for(f=0;f<a.length;){k=a[f];++f;if(u.__implements(k,dc)&&(w=k,!w.get_includeInLayout()))continue;switch(this._verticalAlign._hx_index){case 0:k.set_y(this._paddingTop);break;case 1:k.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom-k.get_height())/2));break;case 2:k.set_y(Math.max(this._paddingTop,this._paddingTop+(q-this._paddingTop-this._paddingBottom)-
k.get_height()));break;case 3:k.set_y(this._paddingTop),k.set_height(q-this._paddingTop-this._paddingBottom)}}k=g-this._paddingLeft-this._paddingRight;d=b=0;w=l-this._paddingLeft-this._paddingRight;if(f=this._gap==1/0)d=this._minGap,a.length>1&&w>k&&(d+=(w-k)/(a.length-1)),d-=this._minGap;else{switch(this._horizontalAlign._hx_index){case 0:b=0;break;case 1:b=(w-k)/2;break;case 2:b=w-k;break;default:throw new rb("Unknown horizontal align: "+L.string(this._horizontalAlign));}b<0&&(b=0)}if(b!=0||d!=
0)for(f=0;f<a.length;){k=a[f];++f;if(u.__implements(k,dc)&&(w=k,!w.get_includeInLayout()))continue;k.set_x(Math.max(this._paddingLeft,k.get_x()+b));b+=d}g<l&&(g=l);h<q&&(h=q);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=g;c.contentHeight=h;c.viewPortWidth=l;c.viewPortHeight=q;return c},getDragDropIndex:function(a,b,c,d,f){c=this._gap;this._gap==1/0&&(c=this._minGap);d=this._paddingLeft;f=0;for(var g=a.length;f<g;){var h=f++,l=a[h];if(!u.__implements(l,dc)||l.get_includeInLayout()){u.__implements(l,
oa)&&l.validateNow();l=l.get_width();if(b<d+l/2)return h;d+=l+c}}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);f=b;f<0?f=0:f>a.length&&(f=a.length);b=this._paddingLeft;for(d=0;d<f;){var l=d++;l=a[l];if(!u.__implements(l,dc)||l.get_includeInLayout())u.__implements(l,oa)&&l.validateNow(),b+=l.get_width()+c}h==null?h=new Ea(b,0,0,g):h.setTo(b,0,0,g);return h},validateItems:function(a,b){var c=this._verticalAlign==fc.JUSTIFY,d=b.width;d!=null&&
(d-=this._paddingLeft+this._paddingRight);var f=b.height;f!=null&&(f-=this._paddingTop+this._paddingBottom);for(var g=0;g<a.length;){var h=a[g];++g;var l=null,k=null;if(u.__implements(h,dc)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof Yg?q:null;q!=null&&(l=q.get_percentWidth(),k=q.get_percentHeight())}c?f!=null?h.set_height(f):this._justifyResetEnabled&&u.__implements(h,Kb)&&h.resetHeight():f!=null?k!=null&&(k<0?k=0:k>100&&(k=100),h.set_height(k/100*f)):k!=null&&
this._percentHeightResetEnabled&&u.__implements(h,Kb)&&h.resetHeight();l!=null&&this._percentWidthResetEnabled&&d==null&&u.__implements(h,Kb)&&h.resetWidth();u.__implements(h,oa)&&h.validateNow();c&&f==null&&b.maxHeight!=null&&(l=b.maxHeight-this._paddingTop-this._paddingBottom,h.get_height()>l&&(h.set_height(l),u.__implements(h,oa)&&h.validateNow()))}},applyVerticalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(u.__implements(d,dc)){var f=d;if(!f.get_includeInLayout())continue}switch(this._verticalAlign._hx_index){case 0:d.set_y(this._paddingTop);
break;case 1:d.set_y(Math.max(this._paddingTop,this._paddingTop+(c-this._paddingTop-this._paddingBottom-d.get_height())/2));break;case 2:d.set_y(Math.max(this._paddingTop,this._paddingTop+(c-this._paddingTop-this._paddingBottom)-d.get_height()));break;case 3:d.set_y(this._paddingTop),d.set_height(c-this._paddingTop-this._paddingBottom)}}},applyHorizontalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingLeft-this._paddingRight;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-
1)),f-=this._minGap;else{switch(this._horizontalAlign._hx_index){case 0:d=0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new rb("Unknown horizontal align: "+L.string(this._horizontalAlign));}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(u.__implements(c,dc)){var g=c;if(!g.get_includeInLayout())continue}c.set_x(Math.max(this._paddingLeft,c.get_x()+b));b+=f}},applyPercentWidth:function(a,b,c,d,f){for(var g=[],h=0,l=0,k=0,q=0;q<a.length;){var w=a[q];++q;if(u.__implements(w,
dc)){var v=w;if(!v.get_includeInLayout())continue;var z=v.get_layoutData(),n=z instanceof Yg?z:null;if(n!=null&&(z=n.get_percentWidth(),z!=null)){z<0&&(z=0);u.__implements(v,Kb)&&(w=v,l+=w.get_minWidth());k+=z;n.get_marginLeft()!=null&&(h+=n.get_marginLeft());n.get_marginRight()!=null&&(h+=n.get_marginRight());h+=f;g.push(v);continue}}h+=w.get_width()+f}h=h-f+(this._paddingLeft+this._paddingRight);k<100&&(k=100);b!=null?a=b:(a=h+l,c!=null&&a<c?a=c:d!=null&&a>d&&(a=d));a-=h;a<0&&(a=0);for(c=!0;c;)for(c=
!1,d=a/k,q=0;q<g.length;)v=g[q],++q,n=u.__cast(v.get_layoutData(),Yg),z=n.get_percentWidth(),z<0&&(z=0),n=d*z,u.__implements(v,Kb)&&(w=v,w=w.get_explicitMinWidth(),w!=null&&w>a&&(w=a),n<w&&(n=w,a-=n,k-=z,X.remove(g,v),c=!0)),u.__cast(v,ea).set_width(n),u.__implements(v,oa)&&v.validateNow()},applyPercentHeight:function(a,b){b=b-this._paddingTop-this._paddingBottom;for(var c=0;c<a.length;){var d=a[c];++c;if(u.__implements(d,dc)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),f=f instanceof
Yg?f:null,f!=null&&(f=f.get_percentHeight(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(u.__implements(d,Kb)){var g=d,h=g.get_explicitMinHeight();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxHeight();g!=null&&f>g&&(f=g)}d.set_height(f)}}}},__class__:Gh,__properties__:{set_percentHeightResetEnabled:"set_percentHeightResetEnabled",get_percentHeightResetEnabled:"get_percentHeightResetEnabled",set_percentWidthResetEnabled:"set_percentWidthResetEnabled",get_percentWidthResetEnabled:"get_percentWidthResetEnabled",
set_justifyResetEnabled:"set_justifyResetEnabled",get_justifyResetEnabled:"get_justifyResetEnabled",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",
get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var Yg=function(a,b){this._percentWidth=this._percentHeight=this._marginLeft=this._marginRight=null;na.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};r["feathers.layout.HorizontalLayoutData"]=Yg;Yg.__name__="feathers.layout.HorizontalLayoutData";Yg.__interfaces__=[Xo];Yg.fill=function(){return new Yg(100,100)};Yg.fillHorizontal=function(a){a==null&&(a=100);return new Yg(a,null)};
Yg.fillVertical=function(a){a==null&&(a=100);return new Yg(null,a)};Yg.__super__=na;Yg.prototype=I(na.prototype,{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;W.dispatch(this,"change");return this._percentWidth},_percentHeight:null,get_percentHeight:function(){return this._percentHeight},set_percentHeight:function(a){if(this._percentHeight==a)return this._percentHeight;
this._percentHeight=a;W.dispatch(this,"change");return this._percentHeight},_marginLeft:null,get_marginLeft:function(){return this._marginLeft},set_marginLeft:function(a){if(this._marginLeft==a)return this._marginLeft;this._marginLeft=a;W.dispatch(this,"change");return this._marginLeft},_marginRight:null,get_marginRight:function(){return this._marginRight},set_marginRight:function(a){if(this._marginRight==a)return this._marginRight;this._marginRight=a;W.dispatch(this,"change");return this._marginRight},
__class__:Yg,__properties__:{set_marginRight:"set_marginRight",get_marginRight:"get_marginRight",set_marginLeft:"set_marginLeft",get_marginLeft:"get_marginLeft",set_percentHeight:"set_percentHeight",get_percentHeight:"get_percentHeight",set_percentWidth:"set_percentWidth",get_percentWidth:"get_percentWidth"}});var wj=function(){};r["feathers.layout.IKeyboardNavigationLayout"]=wj;wj.__name__="feathers.layout.IKeyboardNavigationLayout";wj.__isInterface__=!0;wj.__interfaces__=[Xg];wj.prototype={findNextKeyboardIndex:null,
__class__:wj};var Oe=function(){};r["feathers.layout.IScrollLayout"]=Oe;Oe.__name__="feathers.layout.IScrollLayout";Oe.__isInterface__=!0;Oe.__interfaces__=[Xg];Oe.prototype={get_scrollX:null,set_scrollX:null,get_scrollY:null,set_scrollY:null,get_elasticTop:null,get_elasticRight:null,get_elasticBottom:null,get_elasticLeft:null,getNearestScrollPositionForIndex:null,__class__:Oe,__properties__:{get_elasticLeft:"get_elasticLeft",get_elasticBottom:"get_elasticBottom",get_elasticRight:"get_elasticRight",
get_elasticTop:"get_elasticTop",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}};var mn=function(){};r["feathers.layout.ISnapLayout"]=mn;mn.__name__="feathers.layout.ISnapLayout";mn.__isInterface__=!0;mn.__interfaces__=[Xg];mn.prototype={getSnapPositionsX:null,getSnapPositionsY:null,__class__:mn};var Jh=function(){};r["feathers.layout.IVirtualLayout"]=Jh;Jh.__name__="feathers.layout.IVirtualLayout";Jh.__isInterface__=!0;Jh.__interfaces__=[Oe];
Jh.prototype={get_virtualCache:null,set_virtualCache:null,getVisibleIndices:null,__class__:Jh,__properties__:{set_virtualCache:"set_virtualCache",get_virtualCache:"get_virtualCache"}};var Di=function(a,b){this.start=a;this.end=b};r["feathers.layout.VirtualLayoutRange"]=Di;Di.__name__="feathers.layout.VirtualLayoutRange";Di.prototype={start:null,end:null,__class__:Di};var Cg=function(){this.reset()};r["feathers.layout.LayoutBoundsResult"]=Cg;Cg.__name__="feathers.layout.LayoutBoundsResult";Cg.prototype=
{contentX:null,contentY:null,viewPortWidth:null,viewPortHeight:null,contentWidth:null,contentHeight:null,contentMinWidth:null,contentMinHeight:null,contentMaxWidth:null,contentMaxHeight:null,reset:function(){this.contentMinHeight=this.contentMinWidth=this.contentHeight=this.contentWidth=this.contentY=this.contentX=0;this.contentMaxWidth=1/0;this.contentMaxHeight=1/0;this.viewPortHeight=this.viewPortWidth=0},__class__:Cg};var Ib=function(a){this.width=this.height=this.minWidth=this.minHeight=this.maxWidth=
this.maxHeight=null;this.save(a)};r["feathers.layout.Measurements"]=Ib;Ib.__name__="feathers.layout.Measurements";Ib.prototype={save:function(a){a==null?this.maxHeight=this.maxWidth=this.minHeight=this.minWidth=this.height=this.width=null:u.__implements(a,Kb)?(this.width=a.get_explicitWidth(),this.height=a.get_explicitHeight(),this.minWidth=a.get_explicitMinWidth(),this.minHeight=a.get_explicitMinHeight(),this.maxWidth=a.get_explicitMaxWidth(),this.maxHeight=a.get_explicitMaxHeight()):(this.width=
a.get_width(),this.height=a.get_height(),this.minWidth=this.width,this.minHeight=this.height,this.maxWidth=this.width,this.maxHeight=this.height)},restore:function(a){u.__implements(a,Kb)?(this.width==null?a.resetWidth():a.set_width(this.width),this.height==null?a.resetHeight():a.set_height(this.height),this.minWidth==null?a.resetMinWidth():a.set_minWidth(this.minWidth),this.minHeight==null?a.resetMinHeight():a.set_minHeight(this.minHeight),this.maxWidth==null?a.resetMaxWidth():a.set_maxWidth(this.maxWidth),
this.maxHeight==null?a.resetMaxHeight():a.set_maxHeight(this.maxHeight)):(this.width!=null&&a.set_width(this.width),this.height!=null&&a.set_height(this.height))},width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,__class__:Ib};var ja=O["feathers.layout.RelativePosition"]={__ename__:"feathers.layout.RelativePosition",__constructs__:null,TOP:{_hx_name:"TOP",_hx_index:0,__enum__:"feathers.layout.RelativePosition",toString:D},RIGHT:{_hx_name:"RIGHT",_hx_index:1,__enum__:"feathers.layout.RelativePosition",
toString:D},BOTTOM:{_hx_name:"BOTTOM",_hx_index:2,__enum__:"feathers.layout.RelativePosition",toString:D},LEFT:{_hx_name:"LEFT",_hx_index:3,__enum__:"feathers.layout.RelativePosition",toString:D},MANUAL:{_hx_name:"MANUAL",_hx_index:4,__enum__:"feathers.layout.RelativePosition",toString:D}};ja.__constructs__=[ja.TOP,ja.RIGHT,ja.BOTTOM,ja.LEFT,ja.MANUAL];var so=function(){this._fallbackFluidIndex=-1;this._horizontalAlign=Vb.JUSTIFY;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=
0;na.call(this)};r["feathers.layout.VDividedBoxLayout"]=so;so.__name__="feathers.layout.VDividedBoxLayout";so.__interfaces__=[Xg];so.__super__=na;so.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==
a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=
a;W.dispatch(this,"change");return this._paddingLeft},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;W.dispatch(this,"change");return this._horizontalAlign},_customItemHeights:null,get_customItemHeights:function(){return this._customItemHeights},set_customItemHeights:function(a){if(this._customItemHeights==a)return this._customItemHeights;this._customItemHeights=
a;W.dispatch(this,"change");return this._customItemHeights},_fallbackFluidIndex:null,get_fallbackFluidIndex:function(){return this._fallbackFluidIndex},set_fallbackFluidIndex:function(a){if(this._fallbackFluidIndex==a)return this._fallbackFluidIndex;this._fallbackFluidIndex=a;W.dispatch(this,"change");return this._fallbackFluidIndex},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){for(var d=0;d<a.length;){var f=
a[d],g=null;d>0&&(g=a[d-1]);if(!u.__implements(f,dc)||f.get_includeInLayout()){if(this._customItemHeights!=null&&d<this._customItemHeights.length){var h=this._customItemHeights[d];h!=null&&f.set_height(h)}u.__implements(f,oa)&&f.validateNow();u.__implements(g,oa)&&g.validateNow()}d+=2}this.applyPercentHeight(a,b.height,b.minHeight,b.maxHeight);h=0;var l=this._paddingTop;for(d=0;d<a.length;){f=a[d];g=null;d>0&&(g=a[d-1]);if(!u.__implements(f,dc)||f.get_includeInLayout())u.__implements(g,oa)&&g.validateNow(),
g!=null&&g.get_visible()&&(g.set_y(l),l+=g.get_height()),u.__implements(f,oa)&&f.validateNow(),h<f.get_width()&&(h=f.get_width()),f.set_y(l),l+=f.get_height();d+=2}h+=this._paddingLeft+this._paddingRight;l+=this._paddingBottom;f=h;b.width!=null?f=b.width:b.minWidth!=null&&f<b.minWidth?f=b.minWidth:b.maxWidth!=null&&f>b.maxWidth&&(f=b.maxWidth);var k=l;b.height!=null?k=b.height:b.minHeight!=null&&k<b.minHeight?k=b.minHeight:b.maxHeight!=null&&k>b.maxHeight&&(k=b.maxHeight);this.applyPercentWidth(a,
f);for(d=0;d<a.length;){g=null;d>0&&(g=a[d-1]);if(g!=null)switch(this._horizontalAlign._hx_index){case 0:g.set_x(this._paddingLeft);break;case 1:g.set_x(Math.max(this._paddingLeft,this._paddingLeft+(f-this._paddingLeft-this._paddingRight-g.get_width())/2));break;case 2:g.set_x(Math.max(this._paddingLeft,this._paddingLeft+(f-this._paddingLeft-this._paddingRight)-g.get_width()));break;case 3:g.set_x(this._paddingLeft),g.set_width(f-this._paddingLeft-this._paddingRight)}d+=2}h<f&&(h=f);l<k&&(l=k);c==
null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=h;c.contentHeight=l;c.viewPortWidth=f;c.viewPortHeight=k;return c},validateItems:function(a){for(var b=0;b<a.length;){var c=a[b],d=null;b>0&&(d=a[b-1]);if(!u.__implements(c,dc)||c.get_includeInLayout()){if(this._customItemHeights!=null&&b<this._customItemHeights.length){var f=this._customItemHeights[b];f!=null&&c.set_height(f)}u.__implements(c,oa)&&c.validateNow();u.__implements(d,oa)&&d.validateNow()}b+=2}},applyHorizontalAlign:function(a,
b){for(var c=0;c<a.length;){var d=null;c>0&&(d=a[c-1]);if(d!=null)switch(this._horizontalAlign._hx_index){case 0:d.set_x(this._paddingLeft);break;case 1:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(b-this._paddingLeft-this._paddingRight-d.get_width())/2));break;case 2:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(b-this._paddingLeft-this._paddingRight)-d.get_width()));break;case 3:d.set_x(this._paddingLeft),d.set_width(b-this._paddingLeft-this._paddingRight)}c+=2}},applyPercentHeight:function(a,
b,c,d){for(var f=[],g=[],h=0,l=0,k=0,q=this._fallbackFluidIndex,w=-1,v=0;v<a.length;){var z=a[v],n=null;v>0&&(n=a[v-1]);if(u.__implements(z,dc)&&!z.get_includeInLayout())q==v&&(q=-1);else{w=v;n!=null&&n.get_visible()&&(h+=n.get_height());n=Math.floor(v/2);var E=!0;this._customItemHeights!=null&&n<this._customItemHeights.length&&(n=this._customItemHeights[n],n!=null&&(E=!1,z.set_height(n),f.push(v),u.__implements(z,oa)&&z.validateNow()));if(E){E=100;if(u.__implements(z,Kb)){var H=z;z=H.get_explicitMinHeight();
z!=null&&(l+=z)}k+=E;g.push(v)}else h+=z.get_height()}v+=2}h+=this._paddingTop+this._paddingBottom;b==null&&(b=h+l,c!=null&&b<c?b=c:d!=null&&b>d&&(b=d));b-=h;do{h=!1;l=0;v=b/k;v<0&&(v=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],E=100,n=Math.floor(v*E),H=null,u.__implements(z,Kb)&&(H=z,H=H.get_explicitMinHeight()),H!=null&&(H>b&&(H=b),n<H&&(n=H,b-=n,k-=E,X.remove(g,d),h=!0)),z.set_height(n),u.__implements(z,oa)&&z.validateNow(),l+=n;h||(b-=l)}while(h);if(b>0&&g.length>0)d=g[g.length-1],a=a[d],a.set_height(a.get_height()+
b);else if(b!=0){if(q==-1||w<q)q=w;q!=-1&&(g=a[q],n=g.get_height()+b,n<0?(b=n,n=0,X.remove(f,q)):b=0,g.set_height(n));if(b!=0)for(q=b/f.length,c=0;c<f.length;)d=f[c],++c,z=a[d],z.set_height(z.get_height()+q)}},applyPercentWidth:function(a,b){b=b-this._paddingLeft-this._paddingRight;for(var c=0;c<a.length;){var d=a[c];if(!u.__implements(d,dc)||d.get_includeInLayout()){var f=b;if(u.__implements(d,Kb)){var g=d,h=g.get_explicitMinWidth();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxWidth();g!=
null&&f>g&&(f=g)}d.set_width(f)}c+=2}},__class__:so,__properties__:{set_fallbackFluidIndex:"set_fallbackFluidIndex",get_fallbackFluidIndex:"get_fallbackFluidIndex",set_customItemHeights:"set_customItemHeights",get_customItemHeights:"get_customItemHeights",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",
get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});var fc=O["feathers.layout.VerticalAlign"]={__ename__:"feathers.layout.VerticalAlign",__constructs__:null,TOP:{_hx_name:"TOP",_hx_index:0,__enum__:"feathers.layout.VerticalAlign",toString:D},MIDDLE:{_hx_name:"MIDDLE",_hx_index:1,__enum__:"feathers.layout.VerticalAlign",toString:D},BOTTOM:{_hx_name:"BOTTOM",_hx_index:2,__enum__:"feathers.layout.VerticalAlign",toString:D},JUSTIFY:{_hx_name:"JUSTIFY",
_hx_index:3,__enum__:"feathers.layout.VerticalAlign",toString:D}};fc.__constructs__=[fc.TOP,fc.MIDDLE,fc.BOTTOM,fc.JUSTIFY];var Bg=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=fc.TOP;this._horizontalAlign=Vb.LEFT;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;na.call(this)};r["feathers.layout.VerticalLayout"]=Bg;Bg.__name__="feathers.layout.VerticalLayout";Bg.__interfaces__=
[Wi,Xg];Bg.__super__=na;Bg.prototype=I(na.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,
get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==
a)return this._gap;this._gap=a;W.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==a)return this._minGap;this._minGap=a;W.dispatch(this,"change");return this._minGap},_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;W.dispatch(this,"change");return this._horizontalAlign},
_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;W.dispatch(this,"change");return this._verticalAlign},_justifyResetEnabled:null,get_justifyResetEnabled:function(){return this._justifyResetEnabled},set_justifyResetEnabled:function(a){if(this._justifyResetEnabled==a)return this._justifyResetEnabled;this._justifyResetEnabled=a;W.dispatch(this,"change");return this._justifyResetEnabled},
_percentWidthResetEnabled:null,get_percentWidthResetEnabled:function(){return this._percentWidthResetEnabled},set_percentWidthResetEnabled:function(a){if(this._percentWidthResetEnabled==a)return this._percentWidthResetEnabled;this._percentWidthResetEnabled=a;W.dispatch(this,"change");return this._percentWidthResetEnabled},_percentHeightResetEnabled:null,get_percentHeightResetEnabled:function(){return this._percentHeightResetEnabled},set_percentHeightResetEnabled:function(a){if(this._percentHeightResetEnabled==
a)return this._percentHeightResetEnabled;this._percentHeightResetEnabled=a;W.dispatch(this,"change");return this._percentHeightResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/0;f&&(d=this._minGap);var g=this._horizontalAlign==Vb.JUSTIFY,h=b.width;h!=null&&(h-=this._paddingLeft+this._paddingRight);var l=b.height;l!=null&&(l-=this._paddingTop+this._paddingBottom);
for(f=0;f<a.length;){var k=a[f];++f;var q=null,w=null;if(u.__implements(k,dc)){var v=k;if(!v.get_includeInLayout())continue;v=v.get_layoutData();v=v instanceof uh?v:null;v!=null&&(q=v.get_percentWidth(),w=v.get_percentHeight())}g?h!=null?k.set_width(h):this._justifyResetEnabled&&u.__implements(k,Kb)&&k.resetWidth():h!=null?q!=null&&(q<0?q=0:q>100&&(q=100),k.set_width(q/100*h)):q!=null&&this._percentWidthResetEnabled&&u.__implements(k,Kb)&&k.resetWidth();w!=null&&this._percentHeightResetEnabled&&l==
null&&u.__implements(k,Kb)&&k.resetHeight();u.__implements(k,oa)&&k.validateNow();g&&h==null&&b.maxWidth!=null&&(q=b.maxWidth-this._paddingLeft-this._paddingRight,k.get_width()>q&&(k.set_width(q),u.__implements(k,oa)&&k.validateNow()))}this.applyPercentHeight(a,b.height,b.minHeight,b.maxHeight,d);g=0;h=this._paddingTop;for(f=0;f<a.length;){k=a[f];++f;v=null;if(u.__implements(k,dc)){w=k;if(!w.get_includeInLayout())continue;v=w.get_layoutData();v=v instanceof uh?v:null}u.__implements(k,oa)&&k.validateNow();
g<k.get_width()&&(g=k.get_width());v!=null&&v.get_marginTop()!=null&&(h+=v.get_marginTop());k.set_y(h);h+=k.get_height()+d;v!=null&&v.get_marginBottom()!=null&&(h+=v.get_marginBottom())}g+=this._paddingLeft+this._paddingRight;h+=this._paddingBottom;a.length>0&&(h-=d);l=g;b.width!=null?l=b.width:b.minWidth!=null&&l<b.minWidth?l=b.minWidth:b.maxWidth!=null&&l>b.maxWidth&&(l=b.maxWidth);q=h;b.height!=null?q=b.height:b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=
b.maxHeight);this.applyPercentWidth(a,l);for(f=0;f<a.length;){k=a[f];++f;if(u.__implements(k,dc)&&(w=k,!w.get_includeInLayout()))continue;switch(this._horizontalAlign._hx_index){case 0:k.set_x(this._paddingLeft);break;case 1:k.set_x(Math.max(this._paddingLeft,this._paddingLeft+(l-this._paddingLeft-this._paddingRight-k.get_width())/2));break;case 2:k.set_x(Math.max(this._paddingLeft,this._paddingLeft+(l-this._paddingLeft-this._paddingRight)-k.get_width()));break;case 3:k.set_x(this._paddingLeft),k.set_width(l-
this._paddingLeft-this._paddingRight)}}k=h-this._paddingTop-this._paddingBottom;d=b=0;w=q-this._paddingTop-this._paddingBottom;if(f=this._gap==1/0)d=this._minGap,a.length>1&&w>k&&(d+=(w-k)/(a.length-1)),d-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:b=0;break;case 1:b=(w-k)/2;break;case 2:b=w-k;break;default:throw new rb("Unknown vertical align: "+L.string(this._verticalAlign));}b<0&&(b=0)}if(b!=0||d!=0)for(f=0;f<a.length;){k=a[f];++f;if(u.__implements(k,dc)&&(w=k,!w.get_includeInLayout()))continue;
k.set_y(Math.max(this._paddingTop,k.get_y()+b));b+=d}g<l&&(g=l);h<q&&(h=q);c==null&&(c=new Cg);c.contentX=0;c.contentY=0;c.contentWidth=g;c.contentHeight=h;c.viewPortWidth=l;c.viewPortHeight=q;return c},getDragDropIndex:function(a,b,c,d,f){b=this._gap;this._gap==1/0&&(b=this._minGap);d=this._paddingTop;f=0;for(var g=a.length;f<g;){var h=f++,l=a[h];if(!u.__implements(l,dc)||l.get_includeInLayout()){u.__implements(l,oa)&&l.validateNow();l=l.get_height();if(c<d+l/2)return h;d+=l+b}}return a.length},
getDragDropRegion:function(a,b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);g=b;g<0?g=0:g>a.length&&(g=a.length);b=this._paddingTop;for(d=0;d<g;){var l=d++;l=a[l];if(!u.__implements(l,dc)||l.get_includeInLayout())u.__implements(l,oa)&&l.validateNow(),b+=l.get_height()+c}h==null?h=new Ea(0,b,f,0):h.setTo(0,b,f,0);return h},validateItems:function(a,b){var c=this._horizontalAlign==Vb.JUSTIFY,d=b.width;d!=null&&(d-=this._paddingLeft+this._paddingRight);var f=b.height;f!=null&&(f-=this._paddingTop+
this._paddingBottom);for(var g=0;g<a.length;){var h=a[g];++g;var l=null,k=null;if(u.__implements(h,dc)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof uh?q:null;q!=null&&(l=q.get_percentWidth(),k=q.get_percentHeight())}c?d!=null?h.set_width(d):this._justifyResetEnabled&&u.__implements(h,Kb)&&h.resetWidth():d!=null?l!=null&&(l<0?l=0:l>100&&(l=100),h.set_width(l/100*d)):l!=null&&this._percentWidthResetEnabled&&u.__implements(h,Kb)&&h.resetWidth();k!=null&&this._percentHeightResetEnabled&&
f==null&&u.__implements(h,Kb)&&h.resetHeight();u.__implements(h,oa)&&h.validateNow();c&&d==null&&b.maxWidth!=null&&(l=b.maxWidth-this._paddingLeft-this._paddingRight,h.get_width()>l&&(h.set_width(l),u.__implements(h,oa)&&h.validateNow()))}},applyHorizontalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(u.__implements(d,dc)){var f=d;if(!f.get_includeInLayout())continue}switch(this._horizontalAlign._hx_index){case 0:d.set_x(this._paddingLeft);break;case 1:d.set_x(Math.max(this._paddingLeft,
this._paddingLeft+(c-this._paddingLeft-this._paddingRight-d.get_width())/2));break;case 2:d.set_x(Math.max(this._paddingLeft,this._paddingLeft+(c-this._paddingLeft-this._paddingRight)-d.get_width()));break;case 3:d.set_x(this._paddingLeft),d.set_width(c-this._paddingLeft-this._paddingRight)}}},applyVerticalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingTop-this._paddingBottom;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-1)),f-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:d=
0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new rb("Unknown vertical align: "+L.string(this._verticalAlign));}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(u.__implements(c,dc)){var g=c;if(!g.get_includeInLayout())continue}c.set_y(Math.max(this._paddingTop,c.get_y()+b));b+=f}},applyPercentWidth:function(a,b){b=b-this._paddingLeft-this._paddingRight;for(var c=0;c<a.length;){var d=a[c];++c;if(u.__implements(d,dc)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),
f=f instanceof uh?f:null,f!=null&&(f=f.get_percentWidth(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(u.__implements(d,Kb)){var g=d,h=g.get_explicitMinWidth();h!=null&&(h>b&&(h=b),f<h&&(f=h));g=g.get_explicitMaxWidth();g!=null&&f>g&&(f=g)}d.set_width(f)}}}},applyPercentHeight:function(a,b,c,d,f){for(var g=[],h=0,l=0,k=0,q=0;q<a.length;){var w=a[q];++q;if(u.__implements(w,dc)){var v=w;if(!v.get_includeInLayout())continue;var z=v.get_layoutData(),n=z instanceof uh?z:null;if(n!=null&&(z=n.get_percentHeight(),
z!=null)){z<0&&(z=0);u.__implements(v,Kb)&&(w=v,l+=w.get_minHeight());k+=z;n.get_marginTop()!=null&&(h+=n.get_marginTop());n.get_marginBottom()!=null&&(h+=n.get_marginBottom());h+=f;g.push(v);continue}}h+=w.get_height()+f}h=h-f+(this._paddingTop+this._paddingBottom);k<100&&(k=100);b!=null?a=b:(a=h+l,c!=null&&a<c?a=c:d!=null&&a>d&&(a=d));a-=h;a<0&&(a=0);for(c=!0;c;)for(c=!1,d=a/k,q=0;q<g.length;)v=g[q],++q,n=u.__cast(v.get_layoutData(),uh),z=n.get_percentHeight(),z<0&&(z=0),n=d*z,u.__implements(v,
Kb)&&(w=v,w=w.get_explicitMinHeight(),w!=null&&w>a&&(w=a),n<w&&(n=w,a-=n,k-=z,X.remove(g,v),c=!0)),u.__cast(v,ea).set_height(n),u.__implements(v,oa)&&v.validateNow()},__class__:Bg,__properties__:{set_percentHeightResetEnabled:"set_percentHeightResetEnabled",get_percentHeightResetEnabled:"get_percentHeightResetEnabled",set_percentWidthResetEnabled:"set_percentWidthResetEnabled",get_percentWidthResetEnabled:"get_percentWidthResetEnabled",set_justifyResetEnabled:"set_justifyResetEnabled",get_justifyResetEnabled:"get_justifyResetEnabled",
set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop"}});
var uh=function(a,b){this._percentWidth=this._percentHeight=this._marginTop=this._marginBottom=null;na.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};r["feathers.layout.VerticalLayoutData"]=uh;uh.__name__="feathers.layout.VerticalLayoutData";uh.__interfaces__=[Xo];uh.fill=function(){return new uh(100,100)};uh.fillHorizontal=function(a){a==null&&(a=100);return new uh(a,null)};uh.fillVertical=function(a){a==null&&(a=100);return new uh(null,a)};uh.__super__=na;uh.prototype=I(na.prototype,
{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;W.dispatch(this,"change");return this._percentWidth},_percentHeight:null,get_percentHeight:function(){return this._percentHeight},set_percentHeight:function(a){if(this._percentHeight==a)return this._percentHeight;this._percentHeight=a;W.dispatch(this,"change");return this._percentHeight},_marginTop:null,get_marginTop:function(){return this._marginTop},
set_marginTop:function(a){if(this._marginTop==a)return this._marginTop;this._marginTop=a;W.dispatch(this,"change");return this._marginTop},_marginBottom:null,get_marginBottom:function(){return this._marginBottom},set_marginBottom:function(a){if(this._marginBottom==a)return this._marginBottom;this._marginBottom=a;W.dispatch(this,"change");return this._marginBottom},__class__:uh,__properties__:{set_marginBottom:"set_marginBottom",get_marginBottom:"get_marginBottom",set_marginTop:"set_marginTop",get_marginTop:"get_marginTop",
set_percentHeight:"set_percentHeight",get_percentHeight:"get_percentHeight",set_percentWidth:"set_percentWidth",get_percentWidth:"get_percentWidth"}});var Mh=function(){this._widthResetEnabled=!0;this._contentJustify=!1;this._verticalAlign=fc.TOP;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;this._requestedRowCount=this._requestedMinRowCount=this._requestedMaxRowCount=null;this._scrollX=this._scrollY=0;na.call(this)};r["feathers.layout.VerticalListLayout"]=
Mh;Mh.__name__="feathers.layout.VerticalListLayout";Mh.__interfaces__=[Wi,wj,Jh];Mh.__super__=na;Mh.prototype=I(na.prototype,{_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){return this._scrollX=a},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){return this._scrollY=a},_virtualCache:null,get_virtualCache:function(){return this._virtualCache},set_virtualCache:function(a){return this._virtualCache=a},get_elasticTop:function(){return!0},
get_elasticRight:function(){return!1},get_elasticBottom:function(){return!0},get_elasticLeft:function(){return!1},_requestedRowCount:null,get_requestedRowCount:function(){return this._requestedRowCount},set_requestedRowCount:function(a){if(this._requestedRowCount==a)return this._requestedRowCount;this._requestedRowCount=a;W.dispatch(this,"change");return this._requestedRowCount},_requestedMinRowCount:null,get_requestedMinRowCount:function(){return this._requestedMinRowCount},set_requestedMinRowCount:function(a){if(this._requestedMinRowCount==
a)return this._requestedMinRowCount;this._requestedMinRowCount=a;W.dispatch(this,"change");return this._requestedMinRowCount},_requestedMaxRowCount:null,get_requestedMaxRowCount:function(){return this._requestedMaxRowCount},set_requestedMaxRowCount:function(a){if(this._requestedMaxRowCount==a)return this._requestedMaxRowCount;this._requestedMaxRowCount=a;W.dispatch(this,"change");return this._requestedMaxRowCount},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==
a)return this._paddingTop;this._paddingTop=a;W.dispatch(this,"change");return this._paddingTop},_paddingRight:null,get_paddingRight:function(){return this._paddingRight},set_paddingRight:function(a){if(this._paddingRight==a)return this._paddingRight;this._paddingRight=a;W.dispatch(this,"change");return this._paddingRight},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=
a;W.dispatch(this,"change");return this._paddingBottom},_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;W.dispatch(this,"change");return this._paddingLeft},_gap:null,get_gap:function(){return this._gap},set_gap:function(a){if(this._gap==a)return this._gap;this._gap=a;W.dispatch(this,"change");return this._gap},_minGap:null,get_minGap:function(){return this._minGap},set_minGap:function(a){if(this._minGap==
a)return this._minGap;this._minGap=a;W.dispatch(this,"change");return this._minGap},_verticalAlign:null,get_verticalAlign:function(){return this._verticalAlign},set_verticalAlign:function(a){if(this._verticalAlign==a)return this._verticalAlign;this._verticalAlign=a;W.dispatch(this,"change");return this._verticalAlign},_contentJustify:null,get_contentJustify:function(){return this._contentJustify},set_contentJustify:function(a){if(this._contentJustify==a)return this._contentJustify;this._contentJustify=
a;W.dispatch(this,"change");return this._contentJustify},_widthResetEnabled:null,get_widthResetEnabled:function(){return this._widthResetEnabled},set_widthResetEnabled:function(a){if(this._widthResetEnabled==a)return this._widthResetEnabled;this._widthResetEnabled=a;W.dispatch(this,"change");return this._widthResetEnabled},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},layout:function(a,b,c){var d=this._gap,f=this._gap==1/
0;f&&(d=this._minGap);var g=this.calculateMaxItemWidth(a,b),h=this.calculateViewPortWidth(g,b),l=h-this._paddingLeft-this._paddingRight;if(!this._contentJustify||g<l)g=l;l=this.calculateVirtualRowHeight(a,g);var k=this._paddingTop;f=0;for(var q=a.length;f<q;){var w=f++,v=a[w];if(v==null)v=l,this._virtualCache!=null&&(w=this._virtualCache[w],w=w instanceof Zg?w:null,w!=null&&w.itemHeight!=null&&(v=w.itemHeight)),k+=v+d;else if(!u.__implements(v,dc)||v.get_includeInLayout()){v.set_x(this._paddingLeft);
v.set_y(k);v.set_width(g);u.__implements(v,oa)&&v.validateNow();v=v.get_height();if(this._virtualCache!=null&&(w=this._virtualCache[w],w=w instanceof Zg?w:null,w!=null&&(w.itemHeight==null||w.itemHeight!=v))){var z=w.itemHeight;w.itemHeight=v;z==null&&k<this.get_scrollY()&&Bd.dispatch(this,"scroll",!1,!1,0,v-l);z==null&&v==l||W.dispatch(this,"change")}k+=v+d}}a.length>0&&(k-=d);q=k+=this._paddingBottom;b.height!=null?q=b.height:(this._requestedRowCount!=null?q=this._paddingTop+this._paddingBottom+
(this._requestedRowCount*(l+d)-d):this._requestedMinRowCount!=null&&a.length<this._requestedMinRowCount?q=this._paddingTop+this._paddingBottom+(this._requestedMinRowCount*(l+d)-d):this._requestedMaxRowCount!=null&&a.length>this._requestedMaxRowCount&&(q=this._paddingTop+this._paddingBottom+(this._requestedMaxRowCount*(l+d)-d)),b.minHeight!=null&&q<b.minHeight?q=b.minHeight:b.maxHeight!=null&&q>b.maxHeight&&(q=b.maxHeight));v=k-this._paddingTop-this._paddingBottom;b=w=0;z=q-this._paddingTop-this._paddingBottom;
if(f=this._gap==1/0)b=this._minGap,a.length>1&&z>v&&(b+=(z-v)/(a.length-1)),b-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:w=0;break;case 1:w=(z-v)/2;break;case 2:w=z-v;break;default:throw new rb("Unknown vertical align: "+L.string(this._verticalAlign));}w<0&&(w=0)}if(w!=0||b!=0)for(f=0;f<a.length;){v=a[f];++f;if(u.__implements(v,dc)&&(z=v,!z.get_includeInLayout()))continue;v!=null&&v.set_y(Math.max(this._paddingTop,v.get_y()+w));w+=b}c==null&&(c=new Cg);c.contentX=0;c.contentY=
0;c.contentWidth=g+this._paddingLeft+this._paddingRight;c.contentHeight=k;this._requestedMinRowCount!=null&&(c.contentMinHeight=this._paddingTop+this._paddingBottom+(this._requestedMinRowCount*(l+d)-d));c.viewPortWidth=h;c.viewPortHeight=q;return c},calculateMaxItemWidth:function(a,b){for(var c=0,d=0,f=a.length;d<f;){var g=d++,h=a[g];if(this._virtualCache!=null&&this._virtualCache.length>g){var l=this._virtualCache[g];l=l instanceof Zg?l:null;if(l!=null){g=l.itemWidth;c<g&&(c=g);continue}}if(h!=null&&
(!u.__implements(h,dc)||h.get_includeInLayout())&&(this._widthResetEnabled&&b.width==null&&u.__implements(h,Kb)&&h.resetWidth(),u.__implements(h,oa)&&h.validateNow(),l=h.get_width(),c<l&&(c=l),this._virtualCache!=null)){var k=this._virtualCache[g];k=k instanceof Zg?k:null;k==null&&(u.__implements(h,oa)&&h.validateNow(),k=new Zg(l,null),this._virtualCache[g]=k)}}b.maxWidth!=null&&(a=b.maxWidth-this._paddingLeft-this._paddingRight,c>a&&(c=a));return c},calculateViewPortWidth:function(a,b){return b.width!=
null?b.width:a+this._paddingLeft+this._paddingRight},calculateVirtualRowHeight:function(a,b){for(var c=0,d=a.length;c<d;){var f=c++,g=a[f];if(g==null){if(this._virtualCache==null||this._virtualCache.length<=f)continue;f=this._virtualCache[f];f=f instanceof Zg?f:null;if(f==null||f.itemHeight==null)continue;return f.itemHeight}if(!u.__implements(g,dc)||g.get_includeInLayout())return g.set_width(b),u.__implements(g,oa)&&g.validateNow(),a=g.get_height(),this._virtualCache!=null&&(b=this._virtualCache[f],
b=b instanceof Zg?b:null,b==null||b.itemHeight!=null&&b.itemHeight==a||(b.itemHeight=a,W.dispatch(this,"change"))),a}return 0},getVisibleIndices:function(a,b,c,d){b=this._gap;this._gap==1/0&&(b=this._minGap);var f=-1,g=-1,h=null,l=this._paddingTop,k=this._scrollY;k<0&&(k=0);for(var q=0,w=k+c,v=0,z=0;z<a;){var n=z++,E=0;if(this._virtualCache!=null){var H=this._virtualCache[n];H=H instanceof Zg?H:null;if(H!=null&&H.itemHeight!=null){if(E=H.itemHeight,h==null&&(h=E,q=Math.ceil(c/(h+b))+1,v>0)){for(H=
0;H<v;){var J=H++;l+=h+b;f==-1&&l>=k&&(f=J);if(f!=-1&&(g=J,l>=w&&g-f+1>=q))break}v=0}}else if(h!=null)E=h;else{if(v<5){++v;continue}g=f=0;break}}l+=E+b;f==-1&&l>=k&&(f=n);if(f!=-1&&(g=n,l>=w&&g-f+1>=q))break}f==-1&&this._verticalAlign!=fc.TOP&&(g=f=a-1);if((l<w||g-f+1<q)&&f>0){do if(--f,E=0,this._virtualCache!=null&&(H=this._virtualCache[f],H=H instanceof Zg?H:null,H!=null&&H.itemHeight!=null?(E=H.itemHeight,h==null&&(h=E,q=Math.ceil(c/(h+b))+1)):h!=null&&(E=h)),l+=E+b,l>=w&&g-f+1>=q)break;while(f>
0)}f<0&&(f=0);h==null?g=f:g<0&&(g=f);if(d==null)return new Di(f,g);d.start=f;d.end=g;return d},getNearestScrollPositionForIndex:function(a,b,c,d,f){var g=this._gap;this._gap==1/0&&(g=this._minGap);for(var h=null,l=c=0,k=this._paddingTop,q=0;q<b;){var w=q++,v=0;if(this._virtualCache!=null){var z=this._virtualCache[w];z=z instanceof Zg?z:null;z!=null&&z.itemHeight!=null?(v=z.itemHeight,h==null&&(h=v)):h!=null&&(v=h)}if(w==a){l=k;c=l+v-d;break}k+=v+g}a=this._scrollY;a<c?a=c:a>l&&(a=l);f==null&&(f=new Qa);
f.x=this._scrollX;f.y=a;return f},getDragDropIndex:function(a,b,c,d,f){b=this._gap;this._gap==1/0&&(b=this._minGap);d=null;f=this._paddingTop;for(var g=0,h=a.length;g<h;){var l=g++,k=a[l],q=d;k==null?this._virtualCache!=null&&(k=this._virtualCache[l],k=k instanceof Zg?k:null,k!=null&&k.itemHeight!=null?(q=k.itemHeight,d==null&&(d=q)):d!=null&&(q=d)):q=k.get_height();if(c<f+q/2)return l;f+=q+b}return a.length},getDragDropRegion:function(a,b,c,d,f,g,h){c=this._gap;this._gap==1/0&&(c=this._minGap);var l=
b;l<0?l=0:l>a.length&&(l=a.length);b=null;d=this._paddingTop;for(g=0;g<l;){var k=g++,q=a[k],w=0;q==null?this._virtualCache!=null&&(k=this._virtualCache[k],k=k instanceof Zg?k:null,k!=null&&k.itemHeight!=null?(w=k.itemHeight,b==null&&(b=w)):b!=null&&(w=b)):w=q.get_height();d+=w+c}h==null?h=new Ea(0,d,f,0):h.setTo(0,d,f,0);return h},findNextKeyboardIndex:function(a,b,c,d,f,g,h){if(d.length==0)return-1;g=this._gap;this._gap==1/0&&(g=this._minGap);for(var l=null,k=0,q=d.length;k<q;){var w=k++;if(this._virtualCache!=
null){var v=this._virtualCache[w];v=v instanceof Zg?v:null;if(v!=null&&v.itemHeight!=null){var z=v.itemHeight;if(l==null){l=z;break}}}}var n=d.length-1,E=a;if(E==-1){switch(b.keyCode){case 38:E=c?n:-1;break;case 40:E=0;break;default:E=-1}if(E==-1||f==null||f.indexOf(E)==-1)return E}var H=!0;k=b.keyCode;for(b=E;H;){H=!1;switch(k){case 33:k=0;for(w=a;w>=0;){q=d[w];z=l;q==null?this._virtualCache!=null&&(v=this._virtualCache[w],v=v instanceof Zg?v:null,v!=null&&v.itemHeight!=null&&(z=v.itemHeight)):z=
q.get_height();k+=z;if(f!=null&&f.indexOf(w)!=-1)k+=g;else{if(k>h)break;k+=g;E=w}--w}k=38;break;case 34:w=0;k=a;for(q=d.length;k<q;){z=k++;var J=d[z];v=l;J==null?this._virtualCache!=null&&(J=this._virtualCache[z],J=J instanceof Zg?J:null,J!=null&&J.itemHeight!=null&&(v=J.itemHeight)):v=J.get_height();w+=v;if(f!=null&&f.indexOf(z)!=-1)w+=g;else{if(w>h)break;w+=g;E=z}}k=40;break;case 35:for(q=n;q>a;){if(f==null||f.indexOf(q)==-1){E=q;break}--q}break;case 36:q=0;for(w=a;q<w;)if(z=q++,f==null||f.indexOf(z)==
-1){E=z;break}break;case 38:--E;break;case 40:++E;break;default:return a}E<0?E=c?n:0:E>n&&(E=c?0:n);if(f!=null&&f.indexOf(E)!=-1){if(E==b)return a;H=!0}b=E}return E},applyVerticalAlign:function(a,b,c){var d=0,f=0;c=c-this._paddingTop-this._paddingBottom;if(this._gap==1/0)f=this._minGap,a.length>1&&c>b&&(f+=(c-b)/(a.length-1)),f-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:d=0;break;case 1:d=(c-b)/2;break;case 2:d=c-b;break;default:throw new rb("Unknown vertical align: "+L.string(this._verticalAlign));
}d<0&&(d=0)}if(d!=0||f!=0)for(b=d,d=0;d<a.length;){c=a[d];++d;if(u.__implements(c,dc)){var g=c;if(!g.get_includeInLayout())continue}c!=null&&c.set_y(Math.max(this._paddingTop,c.get_y()+b));b+=f}},__class__:Mh,__properties__:{set_widthResetEnabled:"set_widthResetEnabled",get_widthResetEnabled:"get_widthResetEnabled",set_contentJustify:"set_contentJustify",get_contentJustify:"get_contentJustify",set_verticalAlign:"set_verticalAlign",get_verticalAlign:"get_verticalAlign",set_minGap:"set_minGap",get_minGap:"get_minGap",
set_gap:"set_gap",get_gap:"get_gap",set_paddingLeft:"set_paddingLeft",get_paddingLeft:"get_paddingLeft",set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",set_paddingRight:"set_paddingRight",get_paddingRight:"get_paddingRight",set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_requestedMaxRowCount:"set_requestedMaxRowCount",get_requestedMaxRowCount:"get_requestedMaxRowCount",set_requestedMinRowCount:"set_requestedMinRowCount",get_requestedMinRowCount:"get_requestedMinRowCount",
set_requestedRowCount:"set_requestedRowCount",get_requestedRowCount:"get_requestedRowCount",get_elasticLeft:"get_elasticLeft",get_elasticBottom:"get_elasticBottom",get_elasticRight:"get_elasticRight",get_elasticTop:"get_elasticTop",set_virtualCache:"set_virtualCache",get_virtualCache:"get_virtualCache",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}});var Zg=function(a,b){this.itemWidth=a;this.itemHeight=b};r["feathers.layout._VerticalListLayout.VirtualCacheItem"]=
Zg;Zg.__name__="feathers.layout._VerticalListLayout.VirtualCacheItem";Zg.prototype={itemWidth:null,itemHeight:null,__class__:Zg};var nm=function(){};r["feathers.motion.effects.IEffectContext"]=nm;nm.__name__="feathers.motion.effects.IEffectContext";nm.__isInterface__=!0;nm.__interfaces__=[qb];nm.prototype={get_target:null,get_duration:null,get_position:null,set_position:null,play:null,playReverse:null,pause:null,stop:null,toEnd:null,interrupt:null,__class__:nm,__properties__:{set_position:"set_position",
get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}};var tl=function(a){na.call(this);this._context=a;this._context.addEventListener("change",m(this,this.baseDelegateEffectContext_context_changeHandler));this._context.addEventListener("complete",m(this,this.baseDelegateEffectContext_context_completeHandler))};r["feathers.motion.effects.BaseDelegateEffectContext"]=tl;tl.__name__="feathers.motion.effects.BaseDelegateEffectContext";tl.__interfaces__=[nm];tl.__super__=na;
tl.prototype=I(na.prototype,{_context:null,get_context:function(){return this._context},get_target:function(){return this.get_context().get_target()},get_duration:function(){return this.get_context().get_duration()},get_position:function(){return this.get_context().get_position()},set_position:function(a){this.get_context().set_position(a);return this.get_context().get_position()},play:function(){this._context.play()},playReverse:function(){this._context.playReverse()},pause:function(){this._context.pause()},
stop:function(){this._context.stop()},toEnd:function(){this._context.toEnd()},interrupt:function(){this._context.interrupt()},baseDelegateEffectContext_context_changeHandler:function(a){W.dispatch(this,"change")},baseDelegateEffectContext_context_completeHandler:function(a){W.dispatch(this,"complete")},__class__:tl,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target",get_context:"get_context"}});var ul=function(a,b,c){this._playing=
this._reversed=!1;this._duration=this._position=0;na.call(this);this._target=a;this._duration=b;this._ease=c};r["feathers.motion.effects.BaseEffectContext"]=ul;ul.__name__="feathers.motion.effects.BaseEffectContext";ul.__interfaces__=[nm];ul.__super__=na;ul.prototype=I(na.prototype,{_target:null,get_target:function(){return this._target},_duration:null,get_duration:function(){return this._duration},_position:null,get_position:function(){return this._position},set_position:function(a){if(this._position==
a)return this._position;this._position=a;this.updateEffect();W.dispatch(this,"change");return this._position},_ease:null,get_ease:function(){return this._ease},_playing:null,_reversed:null,_animatePlayback:null,play:function(){var a=this;if(!this._playing||this._reversed)this._animatePlayback!=null&&(ua.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!0,this._reversed=!1,this._animatePlayback=ua.update(function(b){a.set_position(b)},this._duration*(1-this._position),
[this._position],[1]),this._animatePlayback.ease(this._ease),this._animatePlayback.onComplete(m(this,this.animatePlayback_onComplete))},playReverse:function(){var a=this;this._playing&&this._reversed||(this._animatePlayback!=null&&(ua.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._reversed=this._playing=!0,this._animatePlayback=ua.update(function(b){a.set_position(b)},this._duration*this._position,[this._position],[0]),this._animatePlayback.ease(this._ease),this._animatePlayback.onComplete(m(this,
this.animatePlayback_onComplete)))},pause:function(){this._playing&&(this._animatePlayback!=null&&(ua.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!1)},stop:function(){this.pause();this.cleanupEffect();W.dispatch(this,"complete")},toEnd:function(){this.pause();this._position=1;this.cleanupEffect();W.dispatch(this,"complete")},interrupt:function(){this.toEnd()},prepareEffect:function(){},updateEffect:function(){},cleanupEffect:function(){},animatePlayback_onComplete:function(){this._animatePlayback=
null;this.cleanupEffect();W.dispatch(this,"complete")},__class__:ul,__properties__:{get_ease:"get_ease",set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var Nu=O["feathers.motion.effects.EffectInterruptBehavior"]={__ename__:"feathers.motion.effects.EffectInterruptBehavior",__constructs__:null,END:{_hx_name:"END",_hx_index:0,__enum__:"feathers.motion.effects.EffectInterruptBehavior",toString:D},STOP:{_hx_name:"STOP",_hx_index:1,__enum__:"feathers.motion.effects.EffectInterruptBehavior",
toString:D}};Nu.__constructs__=[Nu.END,Nu.STOP];var rl=function(a,b,c,d){this._paused=!0;tl.call(this,a);this.set_callback(d);this.set_eventType(c);this.set_dispatcher(b)};r["feathers.motion.effects.EventToPositionEffectContext"]=rl;rl.__name__="feathers.motion.effects.EventToPositionEffectContext";rl.__super__=tl;rl.prototype=I(tl.prototype,{_dispatcher:null,get_dispatcher:function(){return this._dispatcher},set_dispatcher:function(a){if(this._dispatcher==a)return this._dispatcher;this.clearEvent();
this._dispatcher=a;this.updateEvent();return this.get_dispatcher()},_eventType:null,get_eventType:function(){return this._eventType},set_eventType:function(a){if(this._eventType==a)return this._eventType;this.clearEvent();this._eventType=a;this.updateEvent();return this._eventType},_callback:null,get_callback:function(){return this._callback},set_callback:function(a){return this._callback==a?this._callback:this._callback=a},_paused:null,play:function(){this._paused=!1},playReverse:function(){this._paused=
!1},pause:function(){this._paused=!0},clearEvent:function(){this._dispatcher!=null&&this._eventType!=null&&this._dispatcher.removeEventListener(this._eventType,m(this,this.eventToPositionEffectContext_dispatcher_eventHandler))},updateEvent:function(){this._dispatcher!=null&&this._eventType!=null&&this._dispatcher.addEventListener(this._eventType,m(this,this.eventToPositionEffectContext_dispatcher_eventHandler),!1,0,!0)},eventToPositionEffectContext_dispatcher_eventHandler:function(a){this._paused||
this.set_position(this._callback(a))},__class__:rl,__properties__:I(tl.prototype.__properties__,{set_callback:"set_callback",get_callback:"get_callback",set_eventType:"set_eventType",get_eventType:"get_eventType",set_dispatcher:"set_dispatcher",get_dispatcher:"get_dispatcher"})});var Ro=function(a){this._duration=this._position=0;na.call(this);this._target=a};r["feathers.motion.effects.NoOpEffectContext"]=Ro;Ro.__name__="feathers.motion.effects.NoOpEffectContext";Ro.__interfaces__=[nm];Ro.__super__=
na;Ro.prototype=I(na.prototype,{_target:null,get_target:function(){return this._target},_duration:null,get_duration:function(){return this._duration},_position:null,get_position:function(){return this._position},set_position:function(a){if(a!=0)throw new oe("Position must always be 0.0");return this._position},play:function(){this.toEnd()},pause:function(){},playReverse:function(){this.toEnd()},stop:function(){this.toEnd()},toEnd:function(){W.dispatch(this,"complete")},interrupt:function(){this.toEnd()},
__class__:Ro,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var fr=function(a,b,c){c==null&&(c=Nu.END);this._actuator=b;this.interruptBehavior=c;b=this._actuator.getEase();this._actuator.ease(bg.get_easeNone());this._onComplete=this._actuator.getOnComplete();this._onCompleteParams=this._actuator.getOnCompleteParams();this._actuator.onComplete(null,null);a==null&&(a=this._actuator.getTarget());ul.call(this,a,this._actuator.getDuration(),
b)};r["feathers.motion.effects.actuate.ActuateEffectContext"]=fr;fr.__name__="feathers.motion.effects.actuate.ActuateEffectContext";fr.__super__=ul;fr.prototype=I(ul.prototype,{_actuator:null,get_actuator:function(){return this._actuator},interruptBehavior:null,_onComplete:null,_onCompleteParams:null,interrupt:function(){this.interruptBehavior==Nu.STOP?this.stop():this.toEnd()},updateEffect:function(){this._actuator.goto(this.get_position())},cleanupEffect:function(){if(this._onComplete!=null){var a=
this._onCompleteParams;a==null&&(a=[]);this._onComplete.apply(this._onComplete,a)}},__class__:fr,__properties__:I(ul.prototype.__properties__,{get_actuator:"get_actuator"})});var Ou=function(){};r["feathers.motion.effects.actuate.ActuateForEffects"]=Ou;Ou.__name__="feathers.motion.effects.actuate.ActuateForEffects";Ou.tween=function(a,b,c,d){d==null&&(d=!0);a=ua.tween(a,b,c,d,$o);return u.__cast(a,vl)};Ou.update=function(a,b,c,d,f){f==null&&(f=!0);a=ua.tween(a,b,{start:c,end:d},f,ap);return u.__cast(a,
vl)};var Jk=function(){};r["motion.actuators.IGenericActuator"]=Jk;Jk.__name__="motion.actuators.IGenericActuator";Jk.__isInterface__=!0;Jk.prototype={autoVisible:null,delay:null,ease:null,onComplete:null,onRepeat:null,onUpdate:null,reflect:null,repeat:null,reverse:null,smartRotation:null,snapping:null,onPause:null,onResume:null,apply:null,move:null,pause:null,resume:null,stop:null,__class__:Jk};var bp=function(){};r["feathers.motion.effects.actuate.IGotoActuator"]=bp;bp.__name__="feathers.motion.effects.actuate.IGotoActuator";
bp.__isInterface__=!0;bp.__interfaces__=[Jk];bp.prototype={goto:null,__class__:bp};var vl=function(){};r["feathers.motion.effects.actuate.IReadableGenericActuator"]=vl;vl.__name__="feathers.motion.effects.actuate.IReadableGenericActuator";vl.__isInterface__=!0;vl.__interfaces__=[bp,Jk];vl.prototype={getTarget:null,getDuration:null,getAutoVisible:null,getDelay:null,getEase:null,getReflect:null,getRepeat:null,getReverse:null,getSmartRotation:null,getSnapping:null,getOnComplete:null,getOnCompleteParams:null,
getOnRepeat:null,getOnRepeatParams:null,getOnUpdate:null,getOnUpdateParams:null,getOnPause:null,getOnPauseParams:null,getOnResume:null,getOnResumeParams:null,__class__:vl};var Zj=function(a,b,c){this._autoVisible=!0;this._delay=0;this._reflect=!1;this._repeat=0;this.special=this._snapping=this._smartRotation=this._reverse=!1;this.target=a;this.properties=c;this.duration=b;this._ease=ua.defaultEase};r["motion.actuators.GenericActuator"]=Zj;Zj.__name__="motion.actuators.GenericActuator";Zj.__interfaces__=
[Jk];Zj.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(){for(var a=0,b=A.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,
c)?this.target[c]=A.field(this.properties,c):A.setProperty(this.target,c,A.field(this.properties,c))}},autoVisible:function(a){a==null&&(a=!0);this._autoVisible=a;return this},callMethod:function(a,b){b==null&&(b=[]);return a.apply(a,b)},change:function(){if(this._onUpdate!=null){var a=this._onUpdate,b=this._onUpdateParams;b==null&&(b=[]);a.apply(a,b)}},complete:function(a){a==null&&(a=!0);if(a&&(this.change(),this._onComplete!=null)){a=this._onComplete;var b=this._onCompleteParams;b==null&&(b=[]);
a.apply(a,b)}ua.unload(this)},delay:function(a){this._delay=a;return this},ease:function(a){this._ease=a;return this},move:function(){},onComplete:function(a,b){this._onComplete=a;this._onCompleteParams=b==null?[]:b;this.duration==0&&this.complete();return this},onRepeat:function(a,b){this._onRepeat=a;this._onRepeatParams=b==null?[]:b;return this},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=b==null?[]:b;return this},onPause:function(a,b){this._onPause=a;this._onPauseParams=b==null?
[]:b;return this},onResume:function(a,b){this._onResume=a;this._onResumeParams=b==null?[]:b;return this},pause:function(){if(this._onPause!=null){var a=this._onPause,b=this._onPauseParams;b==null&&(b=[]);a.apply(a,b)}},reflect:function(a){a==null&&(a=!0);this._reflect=a;this.special=!0;return this},repeat:function(a){a==null&&(a=-1);this._repeat=a;return this},resume:function(){if(this._onResume!=null){var a=this._onResume,b=this._onResumeParams;b==null&&(b=[]);a.apply(a,b)}},reverse:function(a){a==
null&&(a=!0);this._reverse=a;this.special=!0;return this},smartRotation:function(a){a==null&&(a=!0);this._smartRotation=a;this.special=!0;return this},snapping:function(a){a==null&&(a=!0);this._snapping=a;this.special=!0;return this},stop:function(a,b,c){},__class__:Zj};var Ed=function(a,b,c){this.active=!0;this.propertyDetails=[];this.toggleVisible=this.setVisible=this.initialized=this.cacheVisible=this.paused=this.sendChange=!1;this.startTime=Oa.getTimer()/1E3;Zj.call(this,a,b,c);Ed.addedEvent||
(Ed.addedEvent=!0,Oa.get_current().stage.addEventListener("enterFrame",Ed.stage_onEnterFrame))};r["motion.actuators.SimpleActuator"]=Ed;Ed.__name__="motion.actuators.SimpleActuator";Ed.stage_onEnterFrame=function(a){a=Oa.getTimer()/1E3;for(var b,c=0,d=0,f=Ed.actuatorsLength;d<f;)d++,b=Ed.actuators[c],b!=null&&b.active?(a>=b.timeOffset&&b.update(a),++c):(Ed.actuators.splice(c,1),--Ed.actuatorsLength)};Ed.__super__=Zj;Ed.prototype=I(Zj.prototype,{timeOffset:null,active:null,cacheVisible:null,detailsLength:null,
initialized:null,paused:null,pauseTime:null,propertyDetails:null,sendChange:null,setVisible:null,startTime:null,toggleVisible:null,reverse:function(a){a=Zj.prototype.reverse.call(this,a);var b=Oa.getTimer()/1E3;this.update(b);return a},apply:function(){Zj.prototype.apply.call(this);if(this.toggleVisible&&Object.prototype.hasOwnProperty.call(this.properties,"alpha")){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"visible")?A.field(a,"visible"):A.getProperty(a,"visible");b!=null&&(a=
this.target,b=A.field(this.properties,"alpha")>0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?A.setProperty(a,"visible",b):a.visible=b)}},autoVisible:function(a){a==null&&(a=!0);this._autoVisible=a;if(!a&&(this.toggleVisible=!1,this.setVisible)){var b=this.target;a=this.cacheVisible;!Object.prototype.hasOwnProperty.call(b,"visible")||b.__properties__&&b.__properties__.set_visible?A.setProperty(b,"visible",a):b.visible=a}return this},delay:function(a){this._delay=
a;this.timeOffset=this.startTime+a;return this},getField:function(a,b){return Object.prototype.hasOwnProperty.call(a,b)?A.field(a,b):A.getProperty(a,b)},initialize:function(){for(var a,b=0,c=A.fields(this.properties);b<c.length;){var d=c[b];++b;var f=!0;!Object.prototype.hasOwnProperty.call(this.target,d)||this.target.__properties__&&this.target.__properties__["set_"+d]?(f=!1,a=A.getProperty(this.target,d)):a=A.field(this.target,d);if(typeof a=="number"){var g=this.properties;g=Object.prototype.hasOwnProperty.call(g,
d)?A.field(g,d):A.getProperty(g,d);a==null&&(a=0);g==null&&(g=0);a=new Aj(this.target,d,a,g-a,f);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},move:function(){this.toggleVisible=Object.prototype.hasOwnProperty.call(this.properties,"alpha")&&this.target instanceof ea;if(this.toggleVisible&&this.properties.alpha!=0){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"visible")?A.field(a,"visible"):A.getProperty(a,"visible");a=!b}else a=
!1;a&&(this.setVisible=!0,a=this.target,this.cacheVisible=b=Object.prototype.hasOwnProperty.call(a,"visible")?A.field(a,"visible"):A.getProperty(a,"visible"),a=this.target,b=!0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?A.setProperty(a,"visible",b):a.visible=b);this.timeOffset=this.startTime;Ed.actuators.push(this);++Ed.actuatorsLength},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=b==null?[]:b;this.sendChange=!0;return this},
pause:function(){this.paused||(this.paused=!0,Zj.prototype.pause.call(this),this.pauseTime=Oa.getTimer())},resume:function(){this.paused&&(this.paused=!1,this.timeOffset+=(Oa.getTimer()-this.pauseTime)/1E3,Zj.prototype.resume.call(this))},setField:function(a,b,c){!Object.prototype.hasOwnProperty.call(a,b)||a.__properties__&&a.__properties__["set_"+b]?A.setProperty(a,b,c):a[b]=c},setProperty:function(a,b){a.isField?a.target[a.propertyName]=b:A.setProperty(a.target,a.propertyName,b)},stop:function(a,
b,c){if(this.active)if(a==null)this.active=!1,b&&this.apply(),this.complete(c);else{var d=0;for(a=A.fields(a);d<a.length;){var f=a[d];++d;if(Object.prototype.hasOwnProperty.call(this.properties,f)){this.active=!1;b&&this.apply();this.complete(c);break}}}},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.initialized||this.initialize();if(this.special){var c=this._reverse?this._ease.calculate(1-b):this._ease.calculate(b);g=0;for(h=this.detailsLength;g<h;){var d=
g++;d=this.propertyDetails[d];if(!this._smartRotation||d.propertyName!="rotation"&&d.propertyName!="rotationX"&&d.propertyName!="rotationY"&&d.propertyName!="rotationZ")var f=d.start+d.change*c;else f=d.change%360,f>180?f-=360:f<-180&&(f+=360),f=d.start+f*c;this._snapping?this.setProperty(d,Math.round(f)):this.setProperty(d,f)}}else{c=this._ease.calculate(b);for(var g=0,h=this.detailsLength;g<h;)d=g++,d=this.propertyDetails[d],this.setProperty(d,d.start+d.change*c)}if(b==1){if(this._repeat==0){this.active=
!1;this.toggleVisible?(a=this.target,c=Object.prototype.hasOwnProperty.call(a,"alpha")?A.field(a,"alpha"):A.getProperty(a,"alpha"),a=c==0):a=!1;a&&(a=this.target,c=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?A.setProperty(a,"visible",c):a.visible=c);this.complete(!0);return}this._onRepeat!=null&&(c=this._onRepeat,b=this._onRepeatParams,b==null&&(b=[]),c.apply(c,b));this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=
this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:Ed});var om=function(a,b,c){this.currentParameters=[];this.tweenProperties={};Ed.call(this,a,b,c);Object.prototype.hasOwnProperty.call(c,"start")||(this.properties.start=[]);Object.prototype.hasOwnProperty.call(c,"end")||(this.properties.end=this.properties.start);a=0;for(b=this.properties.start.length;a<b;)c=a++,this.currentParameters.push(this.properties.start[c])};r["motion.actuators.MethodActuator"]=
om;om.__name__="motion.actuators.MethodActuator";om.__super__=Ed;om.prototype=I(Ed.prototype,{currentParameters:null,tweenProperties:null,apply:function(){var a=this.target,b=this.properties.end;b==null&&(b=[]);a.apply(a,b)},complete:function(a){a==null&&(a=!0);if(this.initialized){for(var b=0,c=this.properties.start.length;b<c;){var d=b++;this.currentParameters[d]=A.field(this.tweenProperties,"param"+d)}b=this.target;c=this.currentParameters;c==null&&(c=[]);b.apply(b,c)}Ed.prototype.complete.call(this,
a)},initialize:function(){for(var a,b,c=0,d=this.properties.start.length;c<d;){var f=c++;a="param"+f;b=this.properties.start[f];this.tweenProperties[a]=b;if(typeof b=="number"||typeof b=="number"&&(b|0)===b)a=new Aj(this.tweenProperties,a,b,this.properties.end[f]-b),this.propertyDetails.push(a)}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){Ed.prototype.update.call(this,a);if(this.active&&!this.paused){a=0;for(var b=this.properties.start.length;a<b;){var c=
a++;this.currentParameters[c]=A.field(this.tweenProperties,"param"+c)}a=this.target;b=this.currentParameters;b==null&&(b=[]);a.apply(a,b)}},__class__:om});var ap=function(a,b,c){om.call(this,a,b,c)};r["feathers.motion.effects.actuate.MethodEffectActuator"]=ap;ap.__name__="feathers.motion.effects.actuate.MethodEffectActuator";ap.__interfaces__=[vl];ap.__super__=om;ap.prototype=I(om.prototype,{getTarget:function(){return this.target},getDuration:function(){return this.duration},getEase:function(){return this._ease},
getAutoVisible:function(){return this._autoVisible},getDelay:function(){return this._delay},getReflect:function(){return this._reflect},getRepeat:function(){return this._repeat},getReverse:function(){return this._reverse},getSmartRotation:function(){return this._smartRotation},getSnapping:function(){return this._snapping},getOnComplete:function(){return this._onComplete},getOnCompleteParams:function(){return this._onCompleteParams},getOnRepeat:function(){return this._onRepeat},getOnRepeatParams:function(){return this._onRepeatParams},
getOnUpdate:function(){return this._onUpdate},getOnUpdateParams:function(){return this._onUpdateParams},getOnPause:function(){return this._onPause},getOnPauseParams:function(){return this._onPauseParams},getOnResume:function(){return this._onResume},getOnResumeParams:function(){return this._onResumeParams},goto:function(a){this.initialized||this.initialize();if(this.special)for(a=this._reverse?this._ease.calculate(1-a):this._ease.calculate(a),d=0,f=this.detailsLength;d<f;){var b=d++;b=this.propertyDetails[b];
if(!this._smartRotation||b.propertyName!="rotation"&&b.propertyName!="rotationX"&&b.propertyName!="rotationY"&&b.propertyName!="rotationZ")var c=b.start+b.change*a;else c=b.change%360,c>180?c-=360:c<-180&&(c+=360),c=b.start+c*a;this._snapping?this.setProperty(b,Math.round(c)):this.setProperty(b,c)}else{a=this._ease.calculate(a);for(var d=0,f=this.detailsLength;d<f;)b=d++,b=this.propertyDetails[b],this.setProperty(b,b.start+b.change*a)}d=0;for(f=this.properties.start.length;d<f;)b=d++,this.currentParameters[b]=
A.field(this.tweenProperties,"param"+b);a=this.target;d=this.currentParameters;d==null&&(d=[]);a.apply(a,d)},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.goto(b);if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,b=Object.prototype.hasOwnProperty.call(a,"alpha")?A.field(a,"alpha"):A.getProperty(a,"alpha"),a=b==0):a=!1;a&&(a=this.target,b=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?
A.setProperty(a,"visible",b):a.visible=b);this.complete(!0);return}if(this._onRepeat!=null){b=this._onRepeat;var c=this._onRepeatParams;c==null&&(c=[]);b.apply(b,c)}this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:ap});var $o=function(a,b,c){Ed.call(this,a,b,c)};r["feathers.motion.effects.actuate.SimpleEffectActuator"]=$o;$o.__name__="feathers.motion.effects.actuate.SimpleEffectActuator";
$o.__interfaces__=[vl];$o.__super__=Ed;$o.prototype=I(Ed.prototype,{getTarget:function(){return this.target},getDuration:function(){return this.duration},getEase:function(){return this._ease},getAutoVisible:function(){return this._autoVisible},getDelay:function(){return this._delay},getReflect:function(){return this._reflect},getRepeat:function(){return this._repeat},getReverse:function(){return this._reverse},getSmartRotation:function(){return this._smartRotation},getSnapping:function(){return this._snapping},
getOnComplete:function(){return this._onComplete},getOnCompleteParams:function(){return this._onCompleteParams},getOnRepeat:function(){return this._onRepeat},getOnRepeatParams:function(){return this._onRepeatParams},getOnUpdate:function(){return this._onUpdate},getOnUpdateParams:function(){return this._onUpdateParams},getOnPause:function(){return this._onPause},getOnPauseParams:function(){return this._onPauseParams},getOnResume:function(){return this._onResume},getOnResumeParams:function(){return this._onResumeParams},
goto:function(a){this.initialized||this.initialize();if(this.special)for(a=this._reverse?this._ease.calculate(1-a):this._ease.calculate(a),d=0,f=this.detailsLength;d<f;){var b=d++;b=this.propertyDetails[b];if(!this._smartRotation||b.propertyName!="rotation"&&b.propertyName!="rotationX"&&b.propertyName!="rotationY"&&b.propertyName!="rotationZ")var c=b.start+b.change*a;else c=b.change%360,c>180?c-=360:c<-180&&(c+=360),c=b.start+c*a;this._snapping?this.setProperty(b,Math.round(c)):this.setProperty(b,
c)}else{a=this._ease.calculate(a);for(var d=0,f=this.detailsLength;d<f;)b=d++,b=this.propertyDetails[b],this.setProperty(b,b.start+b.change*a)}},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.goto(b);if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,b=Object.prototype.hasOwnProperty.call(a,"alpha")?A.field(a,"alpha"):A.getProperty(a,"alpha"),a=b==0):a=!1;a&&(a=this.target,b=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||
a.__properties__&&a.__properties__.set_visible?A.setProperty(a,"visible",b):a.visible=b);this.complete(!0);return}if(this._onRepeat!=null){b=this._onRepeat;var c=this._onRepeatParams;c==null&&(c=[]);b.apply(b,c)}this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>0&&this._repeat--}this.sendChange&&this.change()}},__class__:$o});var Zi=function(a,b,c){b==null&&(b=.5);a==null&&(a=0);this._parallax=1;this._angle=a;this._duration=b;this._ease=
c};r["feathers.motion.transitions.SlideTransitionBuilder"]=Zi;Zi.__name__="feathers.motion.transitions.SlideTransitionBuilder";Zi.prototype={_angle:null,_duration:null,_ease:null,_interruptBehavior:null,_parallax:null,setAngle:function(a){this._angle=a;return this},setRadians:function(a){this._angle=a*180/Math.PI;return this},setUp:function(){this._angle=90;return this},setDown:function(){this._angle=270;return this},setLeft:function(){this._angle=180;return this},setRight:function(){this._angle=
0;return this},setDuration:function(a){this._duration=a;return this},setEase:function(a){this._ease=a;return this},setParallax:function(a){if(a<0||a>1)throw new oe("Invalid parallax value: "+a+". Expected a value between 0.0 and 1.0.");this._parallax=a;return this},setInterruptBehavior:function(a){this._interruptBehavior=a;return this},build:function(){var a=this,b=this._angle%360;b<0&&(b+=360);var c=this._duration,d=this._ease,f=this._interruptBehavior;return function(g,h){if(g==null&&h==null)throw new rb(Zi.VIEW_REQUIRED_ERROR);
var l=null,k=0,q=0;g!=null&&(l=g.parent,k=g.get_width(),q=g.get_height());h!=null&&(l=h.parent,k=Math.max(k,h.get_width()),q=Math.max(q,h.get_height()));var w=0,v=0;if(b>=0&&b<45){w=k;var z=k/Math.cos(b*Math.PI/180);v=-Math.sqrt(z*z-k*k)}else b>=45&&b<90?(v=-q,z=q/Math.sin(b*Math.PI/180),w=Math.sqrt(z*z-q*q)):b>=90&&b<135?(v=-q,z=q/Math.cos((b-90)*Math.PI/180),w=-Math.sqrt(z*z-q*q)):b>=135&&b<180?(w=-k,z=k/Math.sin((b-90)*Math.PI/180),v=-Math.sqrt(z*z-k*k)):b>=180&&b<225?(w=-k,z=k/Math.cos((b-180)*
Math.PI/180),v=Math.sqrt(z*z-k*k)):b>=225&&b<270?(v=q,z=q/Math.sin((b-180)*Math.PI/180),w=-Math.sqrt(z*z-q*q)):b>=270&&b<315?(v=q,z=q/Math.cos((b-270)*Math.PI/180),w=Math.sqrt(z*z-q*q)):(w=k,z=k/Math.sin((b-270)*Math.PI/180),v=Math.sqrt(z*z-k*k));h!=null&&(h.set_x(-w),h.set_y(-v));l!=null&&g!=null&&h!=null&&(k=l.getChildIndex(g),q=l.getChildIndex(h),k>q&&l.swapChildren(g,h));l=Ou.update(function(n,E){g!=null&&(g.set_x(n*a._parallax),g.set_y(E*a._parallax));h!=null&&(h.set_x(n-w),h.set_y(E-v))},c,
[0,0],[w,v]);d!=null&&l.ease(d);ua.pause(l);return new fr(null,l,f)}},__class__:Zi};var $i=function(a,b){qe.call(this,a,b)};r["feathers.skins.CircleSkin"]=$i;$i.__name__="feathers.skins.CircleSkin";$i.__super__=qe;$i.prototype=I(qe.prototype,{drawPath:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);a=Math.max(0,b/2-a);this.get_graphics().drawCircle(this.actualWidth/2,this.actualHeight/2,a)},getRadius:function(){var a=
this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);return Math.max(0,b/2-a)},getDefaultGradientMatrixWidth:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);return Math.max(0,b/2-a)},getDefaultGradientMatrixHeight:function(){var a=this.getCurrentBorder();a=this.getLineThickness(a)/2;var b=this.actualWidth;b>this.actualHeight&&(b=this.actualHeight);
return Math.max(0,b/2-a)},getDefaultGradientMatrixTx:function(){var a=this.actualWidth,b=this.getCurrentBorder();b=this.getLineThickness(b)/2;var c=this.actualWidth;c>this.actualHeight&&(c=this.actualHeight);return Math.max(0,a-Math.max(0,c/2-b))/2},getDefaultGradientMatrixTy:function(){var a=this.actualHeight,b=this.getCurrentBorder();b=this.getLineThickness(b)/2;var c=this.actualWidth;c>this.actualHeight&&(c=this.actualHeight);return Math.max(0,a-Math.max(0,c/2-b))/2},__class__:$i});var cm=function(){};
r["feathers.skins.IIndeterminateSkin"]=cm;cm.__name__="feathers.skins.IIndeterminateSkin";cm.__isInterface__=!0;cm.__interfaces__=[wb];cm.prototype={get_indeterminatePosition:null,set_indeterminatePosition:null,__class__:cm,__properties__:{set_indeterminatePosition:"set_indeterminatePosition",get_indeterminatePosition:"get_indeterminatePosition"}};var pm=function(a){oh.call(this);this.mouseChildren=!1;this.set_defaultView(a)};r["feathers.skins.MultiSkin"]=pm;pm.__name__="feathers.skins.MultiSkin";
pm.__super__=oh;pm.prototype=I(oh.prototype,{_previousView:null,_currentView:null,_currentViewMeasurements:null,_stateToView:null,_defaultView:null,get_defaultView:function(){return this._defaultView},set_defaultView:function(a){if(this._defaultView==a)return this._defaultView;this._defaultView=a;this.setInvalid(x.STYLES);return this._defaultView},_disabledView:null,get_disabledView:function(){return this._disabledView},set_disabledView:function(a){if(this._disabledView==a)return this._disabledView;
this._disabledView=a;this.setInvalid(x.STYLES);return this._disabledView},_selectedView:null,get_selectedView:function(){return this._selectedView},set_selectedView:function(a){if(this._selectedView==a)return this._disabledView;this._selectedView=a;this.setInvalid(x.STYLES);return this._selectedView},getViewForState:function(a){return this._stateToView==null?null:this._stateToView.get(a)},setViewForState:function(a,b){this._stateToView==null&&(this._stateToView=new Ye);this._stateToView.get(a)!=b&&
(this._stateToView.set(a,b),this.setInvalid(x.STYLES))},update:function(){this.refreshView();this.measure();this.layoutView();this._previousView=this._currentView},refreshView:function(){var a=this._currentView;this._currentView=this.getCurrentView();this._currentView!=a&&(this.removeCurrentView(a),this._currentView==null?this._currentViewMeasurements=null:(u.__implements(this._currentView,jb)&&this._currentView.initializeNow(),this._currentViewMeasurements==null?this._currentViewMeasurements=new Ib(this._currentView):
this._currentViewMeasurements.save(this._currentView),u.__implements(this._currentView,wb)&&this._currentView.set_uiContext(this._uiContext),u.__implements(this._currentView,Td)&&this._currentView.set_stateContext(this._stateContext),this.addChild(this._currentView)))},removeCurrentView:function(a){a!=null&&(u.__implements(a,wb)&&a.set_uiContext(null),u.__implements(a,Td)&&a.set_stateContext(null),this._currentViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},getCurrentView:function(){return this._previousView!=
null?this._previousView:this.getCurrentViewWithoutCache()},getCurrentViewWithoutCache:function(){var a=this._stateContext;a==null&&u.__implements(this._uiContext,mh)&&(a=this._uiContext);return this._stateToView!=null&&a!=null&&(a=this._stateToView.get(a.get_currentState()),a!=null)?a:this._uiContext==null?this._defaultView:this._disabledView==null||this._uiContext.get_enabled()?this._selectedView!=null&&u.__implements(this._uiContext,md)&&this._uiContext.get_selected()?this._selectedView:this._defaultView:
this._disabledView},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null,c=this.get_explicitMinWidth()==null,d=this.get_explicitMinHeight()==null,f=this.get_explicitMaxWidth()==null,g=this.get_explicitMaxHeight()==null;if(!(a||b||c||d||f||g))return!1;this._currentView!=null&&Ne.resetFluidlyWithParent(this._currentViewMeasurements,this._currentView,this);var h=null;u.__implements(this._currentView,Kb)&&(h=this._currentView);u.__implements(this._currentView,oa)&&
this._currentView.validateNow();var l=this.get_explicitWidth();a&&(l=0,this._currentView!=null&&(l=Math.max(this._currentView.get_width(),l)));a=this.get_explicitHeight();b&&(a=0,this._currentView!=null&&(a=Math.max(this._currentView.get_height(),a)));b=this.get_explicitMinWidth();c&&(b=0,h!=null?b=Math.max(h.get_minWidth(),b):this._currentViewMeasurements!=null&&this._currentViewMeasurements.minWidth!=null&&(b=Math.max(this._currentViewMeasurements.minWidth,b)));c=this.get_explicitMinHeight();d&&
(c=0,h!=null?c=Math.max(h.get_minHeight(),c):this._currentViewMeasurements!=null&&this._currentViewMeasurements.minHeight!=null&&(c=Math.max(this._currentViewMeasurements.minHeight,c)));d=this.get_explicitMaxWidth();f&&(d=h!=null?h.get_maxWidth():this._currentViewMeasurements!=null&&this._currentViewMeasurements.maxWidth!=null?this._currentViewMeasurements.maxWidth:1/0);f=this.get_explicitMaxHeight();g&&(f=h!=null?h.get_maxHeight():this._currentViewMeasurements!=null&&this._currentViewMeasurements.maxHeight!=
null?this._currentViewMeasurements.maxHeight:1/0);return this.saveMeasurements(l,a,b,c,d,f)},layoutView:function(){this._currentView!=null&&(this._currentView.get_width()!=this.actualWidth&&this._currentView.set_width(this.actualWidth),this._currentView.get_height()!=this.actualHeight&&this._currentView.set_height(this.actualHeight))},needsStateUpdate:function(){var a=!1;this._previousView!=this.getCurrentViewWithoutCache()&&(this._previousView=null,a=!0);return a},__class__:pm,__properties__:I(oh.prototype.__properties__,
{set_selectedView:"set_selectedView",get_selectedView:"get_selectedView",set_disabledView:"set_disabledView",get_disabledView:"get_disabledView",set_defaultView:"set_defaultView",get_defaultView:"get_defaultView"})});var gr=function(a,b,c){c==null&&(c=Xi.HORIZONTAL);qe.call(this,a,b);this._capDirection=c};r["feathers.skins.PillSkin"]=gr;gr.__name__="feathers.skins.PillSkin";gr.__super__=qe;gr.prototype=I(qe.prototype,{_capDirection:null,get_capDirection:function(){return this._capDirection},set_capDirection:function(a){if(this._capDirection==
a)return this._capDirection;this._capDirection=a;this.setInvalid(x.STYLES);return this._capDirection},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a);a=b/2;var c=Math.max(0,this.actualWidth-b);b=Math.max(0,this.actualHeight-b);var d=this.get_capDirection()==Xi.VERTICAL?this.actualWidth:this.actualHeight;this.get_graphics().drawRoundRect(a,a,c,b,d)},__class__:gr,__properties__:I(qe.prototype.__properties__,{set_capDirection:"set_capDirection",get_capDirection:"get_capDirection"})});
var ri=function(a,b,c){c==null&&(c=0);this._cornerRadius=0;this._drawBaseBorder=!0;this._cornerRadiusPosition=ja.TOP;qe.call(this,a,b);this._cornerRadius=c};r["feathers.skins.TabSkin"]=ri;ri.__name__="feathers.skins.TabSkin";ri.__super__=qe;ri.prototype=I(qe.prototype,{_cornerRadiusPosition:null,get_cornerRadiusPosition:function(){return this._cornerRadiusPosition},set_cornerRadiusPosition:function(a){if(this._cornerRadiusPosition==a)return this._cornerRadiusPosition;this._cornerRadiusPosition=a;
this.setInvalid(x.STYLES);return this._cornerRadiusPosition},_drawBaseBorder:null,get_drawBaseBorder:function(){return this._drawBaseBorder},set_drawBaseBorder:function(a){if(this._drawBaseBorder==a)return this._drawBaseBorder;this._drawBaseBorder=a;this.setInvalid(x.STYLES);return this._drawBaseBorder},_cornerRadius:null,get_cornerRadius:function(){return this._cornerRadius},set_cornerRadius:function(a){if(this._cornerRadius==a)return this._cornerRadius;this._cornerRadius=a;this.setInvalid(x.STYLES);
return this._cornerRadius},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=Math.max(0,this.actualWidth-b),d=Math.max(0,this.actualHeight-b),f=Math.min(this._cornerRadius,Math.min(this.actualWidth/2,this.actualHeight/2));if(f==0&&this._drawBaseBorder)this.get_graphics().drawRect(b,b,c,d);else switch(this._cornerRadiusPosition._hx_index){case 0:this.get_graphics().moveTo(b+f,b);this.get_graphics().lineTo(c-f,b);this.get_graphics().curveTo(c,b,c,b+f);this._drawBaseBorder?
(this.get_graphics().lineTo(c,d),this.get_graphics().lineTo(b,d)):(this.get_graphics().lineTo(c,this.actualHeight),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(b,this.actualHeight),this.applyLineStyle(a));this.get_graphics().lineTo(b,b+f);this.get_graphics().curveTo(b,b,b+f,b);break;case 1:this.get_graphics().moveTo(b,b);this.get_graphics().lineTo(c-f,b);this.get_graphics().curveTo(c,b,c,b+f);this.get_graphics().lineTo(c,d-f);this.get_graphics().curveTo(c,
d,c-f,d);this._drawBaseBorder?(this.get_graphics().lineTo(b,d),this.get_graphics().lineTo(b,b)):(this.get_graphics().lineTo(0,d),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(0,b),this.applyLineStyle(a));break;case 2:this._drawBaseBorder?(this.get_graphics().moveTo(b,b),this.get_graphics().lineTo(c,b)):(this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().moveTo(b,0),this.get_graphics().lineTo(c,0),this.applyLineStyle(a));this.get_graphics().lineTo(c,
d-f);this.get_graphics().curveTo(c,d,c-f,d);this.get_graphics().lineTo(b+f,d);this.get_graphics().curveTo(b,d,b,d-f);this.get_graphics().lineTo(b,b);break;case 3:this.get_graphics().moveTo(b+f,b);this._drawBaseBorder?(this.get_graphics().lineTo(c,b),this.get_graphics().lineTo(c,d)):(this.get_graphics().lineTo(this.actualWidth,b),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(this.actualWidth,d),this.applyLineStyle(a));this.get_graphics().lineTo(b+f,d);this.get_graphics().curveTo(b,
d,b,d-f);this.get_graphics().lineTo(b,b+f);this.get_graphics().curveTo(b,b,b+f,b);break;default:throw new rb("Tab cornerRadiusPosition not supported: "+L.string(this._cornerRadiusPosition));}},__class__:ri,__properties__:I(qe.prototype.__properties__,{set_cornerRadius:"set_cornerRadius",get_cornerRadius:"get_cornerRadius",set_drawBaseBorder:"set_drawBaseBorder",get_drawBaseBorder:"get_drawBaseBorder",set_cornerRadiusPosition:"set_cornerRadiusPosition",get_cornerRadiusPosition:"get_cornerRadiusPosition"})});
var vf=function(a,b){this._drawBaseBorder=!0;this._pointPosition=ja.TOP;qe.call(this,a,b)};r["feathers.skins.TriangleSkin"]=vf;vf.__name__="feathers.skins.TriangleSkin";vf.__super__=qe;vf.prototype=I(qe.prototype,{_pointPosition:null,get_pointPosition:function(){return this._pointPosition},set_pointPosition:function(a){if(this._pointPosition==a)return this._pointPosition;this._pointPosition=a;this.setInvalid(x.STYLES);return this._pointPosition},_drawBaseBorder:null,get_drawBaseBorder:function(){return this._drawBaseBorder},
set_drawBaseBorder:function(a){if(this._drawBaseBorder==a)return this._drawBaseBorder;this._drawBaseBorder=a;this.setInvalid(x.STYLES);return this._drawBaseBorder},drawPath:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=Math.max(0,this.actualWidth-b),d=Math.max(0,this.actualHeight-b);switch(this._pointPosition._hx_index){case 0:this.get_graphics().moveTo(this.actualWidth/2,b);this._drawBaseBorder?(this.get_graphics().lineTo(c,d),this.get_graphics().lineTo(b,d)):(this.get_graphics().lineTo(c,
this.actualHeight),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(b,this.actualHeight),this.applyLineStyle(a));this.get_graphics().lineTo(this.actualWidth/2,b);break;case 1:this._drawBaseBorder?this.get_graphics().moveTo(b,b):this.get_graphics().moveTo(0,b);this.get_graphics().lineTo(c,this.actualHeight/2);this._drawBaseBorder?(this.get_graphics().lineTo(b,d),this.get_graphics().lineTo(b,b)):(this.get_graphics().lineTo(0,d),this.get_graphics().lineStyle(0,
null,0,null,null,null,null,0),this.get_graphics().lineTo(0,b),this.applyLineStyle(a));break;case 2:this._drawBaseBorder?(this.get_graphics().moveTo(b,b),this.get_graphics().lineTo(c,b)):(this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().moveTo(b,0),this.get_graphics().lineTo(c,0),this.applyLineStyle(a));this.get_graphics().lineTo(this.actualWidth/2,d);this._drawBaseBorder?this.get_graphics().lineTo(b,b):this.get_graphics().lineTo(b,0);break;case 3:this._drawBaseBorder?
(this.get_graphics().moveTo(c,b),this.get_graphics().lineTo(c,d)):(this.get_graphics().moveTo(this.actualWidth,b),this.get_graphics().lineStyle(0,null,0,null,null,null,null,0),this.get_graphics().lineTo(this.actualWidth,d),this.applyLineStyle(a));this.get_graphics().lineTo(b,this.actualHeight/2);this._drawBaseBorder?this.get_graphics().lineTo(c,b):this.get_graphics().lineTo(this.actualWidth,b);break;default:throw new rb("Triangle pointPosition not supported: "+L.string(this._pointPosition));}},__class__:vf,
__properties__:I(qe.prototype.__properties__,{set_drawBaseBorder:"set_drawBaseBorder",get_drawBaseBorder:"get_drawBaseBorder",set_pointPosition:"set_pointPosition",get_pointPosition:"get_pointPosition"})});var wl=function(a,b){qe.call(this,a,b)};r["feathers.skins.UnderlineSkin"]=wl;wl.__name__="feathers.skins.UnderlineSkin";wl.__super__=qe;wl.prototype=I(qe.prototype,{draw:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=this.getCurrentFill();c!=null&&(this.applyFillStyle(c),
this.get_graphics().drawRect(0,0,this.actualWidth,Math.max(0,this.actualHeight-b)),this.get_graphics().endFill());c=Math.min(this.actualWidth,b);var d=Math.max(c,this.actualWidth-b);b=Math.max(Math.min(this.actualHeight,b),this.actualHeight-b);this.applyLineStyle(a);this.get_graphics().moveTo(c,b);this.get_graphics().lineTo(d,b)},__class__:wl});var cp=function(a,b){this._paddingTop=this._paddingBottom=0;this._horizontalAlign=Vb.CENTER;qe.call(this,a,b)};r["feathers.skins.VerticalLineSkin"]=cp;cp.__name__=
"feathers.skins.VerticalLineSkin";cp.__super__=qe;cp.prototype=I(qe.prototype,{_horizontalAlign:null,get_horizontalAlign:function(){return this._horizontalAlign},set_horizontalAlign:function(a){if(this._horizontalAlign==a)return this._horizontalAlign;this._horizontalAlign=a;this.setInvalid(x.STYLES);return this._horizontalAlign},_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;this.setInvalid(x.STYLES);
return this._paddingTop},_paddingBottom:null,get_paddingBottom:function(){return this._paddingBottom},set_paddingBottom:function(a){if(this._paddingBottom==a)return this._paddingBottom;this._paddingBottom=a;this.setInvalid(x.STYLES);return this._paddingBottom},draw:function(){var a=this.getCurrentBorder(),b=this.getLineThickness(a)/2,c=this.getCurrentFill();c!=null&&(this.applyFillStyle(c),this.get_graphics().drawRect(0,0,this.actualWidth,this.actualHeight),this.get_graphics().endFill());switch(this._horizontalAlign._hx_index){case 0:c=
b;break;case 1:c=this.actualWidth/2;break;case 2:c=this.actualWidth-b;break;default:throw new rb("Unknown horizontal align: "+L.string(this._horizontalAlign));}var d=Math.min(this.actualHeight,b+this._paddingTop);b=Math.max(d,this.actualHeight-b-this._paddingTop-this._paddingBottom);this.applyLineStyle(a);this.get_graphics().moveTo(c,d);this.get_graphics().lineTo(c,b)},__class__:cp,__properties__:I(qe.prototype.__properties__,{set_paddingBottom:"set_paddingBottom",get_paddingBottom:"get_paddingBottom",
set_paddingTop:"set_paddingTop",get_paddingTop:"get_paddingTop",set_horizontalAlign:"set_horizontalAlign",get_horizontalAlign:"get_horizontalAlign"})});var dp=function(){this._endDotAlpha=0;this._dotAlpha=1;this._endDotColor=null;this._dotColor=0;this._endDotRadius=null;this._dotRadius=3;this._numEmptyDots=0;this._numDots=8;this._indeterminatePosition=0;oh.call(this)};r["feathers.skins.activity.DotsActivitySkin"]=dp;dp.__name__="feathers.skins.activity.DotsActivitySkin";dp.__interfaces__=[cm];dp.__super__=
oh;dp.prototype=I(oh.prototype,{_indeterminatePosition:null,get_indeterminatePosition:function(){return this._indeterminatePosition},set_indeterminatePosition:function(a){if(this._indeterminatePosition==a)return this._indeterminatePosition;this._indeterminatePosition=a;this.setInvalid(x.DATA);return this._indeterminatePosition},_numDots:null,get_numDots:function(){return this._numDots},set_numDots:function(a){if(this._numDots==a)return this._numDots;this._numDots=a;this.setInvalid(x.STYLES);return this._numDots},
_numEmptyDots:null,get_numEmptyDots:function(){return this._numEmptyDots},set_numEmptyDots:function(a){if(this._numEmptyDots==a)return this._numEmptyDots;this._numEmptyDots=a;this.setInvalid(x.STYLES);return this._numEmptyDots},_dotRadius:null,get_dotRadius:function(){return this._dotRadius},set_dotRadius:function(a){if(this._dotRadius==a)return this._dotRadius;this._dotRadius=a;this.setInvalid(x.STYLES);return this._dotRadius},_endDotRadius:null,get_endDotRadius:function(){return this._endDotRadius},
set_endDotRadius:function(a){if(this._endDotRadius==a)return this._endDotRadius;this._endDotRadius=a;this.setInvalid(x.STYLES);return this._endDotRadius},_dotColor:null,get_dotColor:function(){return this._dotColor},set_dotColor:function(a){if(this._dotColor==a)return this._dotColor;this._dotColor=a;this.setInvalid(x.STYLES);return this._dotColor},_endDotColor:null,get_endDotColor:function(){return this._endDotColor},set_endDotColor:function(a){if(this._endDotColor==a)return this._endDotColor;this._endDotColor=
a;this.setInvalid(x.STYLES);return this._endDotColor},_dotAlpha:null,get_dotAlpha:function(){return this._dotAlpha},set_dotAlpha:function(a){if(this._dotAlpha==a)return this._dotAlpha;this._dotAlpha=a;this.setInvalid(x.STYLES);return this._dotAlpha},_endDotAlpha:null,get_endDotAlpha:function(){return this._endDotAlpha},set_endDotAlpha:function(a){if(this._endDotAlpha==a)return this._endDotAlpha;this._endDotAlpha=a;this.setInvalid(x.STYLES);return this._endDotAlpha},update:function(){var a=this.isInvalid(x.DATA),
b=this.isInvalid(x.SIZE);this.measure()&&(b=!0);(a||b)&&this.drawSkin()},measure:function(){var a=this.get_explicitWidth()==null,b=this.get_explicitHeight()==null;if(!a&&!b)return!1;var c=this._dotRadius;this._endDotRadius!=null&&(c=this._endDotRadius);c=Math.max(this.get_dotRadius(),c);var d=this.get_explicitWidth();a&&(d=b?c*this._numDots:this.get_explicitHeight());a=this.get_explicitHeight();b&&(a=b?c*this._numDots:this.get_explicitWidth());return this.saveMeasurements(d,a)},drawSkin:function(){this.get_graphics().clear();
if(this._numDots!=0){var a=Math.min(this.actualWidth,this.actualHeight)/2,b=this.actualWidth/2,c=this.actualHeight/2,d=ff.roundToNearest(this._indeterminatePosition*360,360/this._numDots),f=this._dotRadius;this._endDotRadius!=null&&(f=this._endDotRadius);var g=Math.max(this.get_dotRadius(),f);this.get_graphics().beginFill(16711935,0);this.get_graphics().drawCircle(b,c,a);this.get_graphics().endFill();var h=0;this._numDots>this._numEmptyDots&&(h=this._numEmptyDots);for(var l=0,k=this._numDots;l<k;){var q=
l++,w=Qa.polar(a-g,-q*2*Math.PI/this._numDots+d*Math.PI/180),v=q/(this._numDots-h);q=this._dotColor;this._endDotColor!=null&&this._endDotColor!=this._dotColor&&(q=this.blendColors(this._dotColor,this._endDotColor,v));var z=this._dotAlpha-(this._dotAlpha-this._endDotAlpha)*v;this.get_dotRadius();v=this.get_dotRadius()-(this.get_dotRadius()-f)*v;this.get_graphics().beginFill(q,z);this.get_graphics().drawCircle(b+w.x,c+w.y,v);this.get_graphics().endFill()}}},blendColors:function(a,b,c){var d=a>>>16&
255,f=a>>>8&255;a&=255;return d+(((b>>>16&255)-d)*c|0)<<16|f+(((b>>>8&255)-f)*c|0)<<8|a+(((b&255)-a)*c|0)},__class__:dp,__properties__:I(oh.prototype.__properties__,{set_endDotAlpha:"set_endDotAlpha",get_endDotAlpha:"get_endDotAlpha",set_dotAlpha:"set_dotAlpha",get_dotAlpha:"get_dotAlpha",set_endDotColor:"set_endDotColor",get_endDotColor:"get_endDotColor",set_dotColor:"set_dotColor",get_dotColor:"get_dotColor",set_endDotRadius:"set_endDotRadius",get_endDotRadius:"get_endDotRadius",set_dotRadius:"set_dotRadius",
get_dotRadius:"get_dotRadius",set_numEmptyDots:"set_numEmptyDots",get_numEmptyDots:"get_numEmptyDots",set_numDots:"set_numDots",get_numDots:"get_numDots",set_indeterminatePosition:"set_indeterminatePosition",get_indeterminatePosition:"get_indeterminatePosition"})});var ep=function(){};r["feathers.style.IStyleProvider"]=ep;ep.__name__="feathers.style.IStyleProvider";ep.__isInterface__=!0;ep.__interfaces__=[qb];ep.prototype={applyStyles:null,__class__:ep};var ll=function(){na.call(this)};r["feathers.style.ClassVariantStyleProvider"]=
ll;ll.__name__="feathers.style.ClassVariantStyleProvider";ll.__interfaces__=[ep];ll.__super__=na;ll.prototype=I(na.prototype,{styleTargets:null,setStyleFunction:function(a,b,c){var d=this;this.styleTargets==null&&(this.styleTargets=new Ye);a=a.__name__;b=b==null?rn.Class(a):rn.ClassAndVariant(a,b);if(c==null){if(!this.styleTargets.exists(b))return;this.styleTargets.remove(b)}else{a=this.styleTargets.get(b);if(c==a||A.compare(c,a)==0)return;this.styleTargets.set(b,c)}nh.dispatch(this,"stylesChange",
function(f){var g=d.getStyleContext(f);f=d.getVariant(f);g=d.getStyleFunctionInternal(g,f,!1);return c!=g?A.compare(c,g)==0:!0})},getStyleFunction:function(a,b){return this.getStyleFunctionInternal(a,b,!0)},applyStyles:function(a){if(this.styleTargets!=null){var b=this.getStyleContext(a),c=this.getVariant(a);b=this.getStyleFunctionInternal(b,c,!1);b!=null&&b(a)}},getStyleContext:function(a){var b=null;u.__implements(a,If)&&(b=a.get_styleContext());b==null&&(b=u.getClass(a));return b},getVariant:function(a){var b=
null;u.__implements(a,If)&&(b=a.get_variant());return b},getStyleFunctionInternal:function(a,b,c){if(this.styleTargets==null)return null;a=a.__name__;b=b==null?rn.Class(a):rn.ClassAndVariant(a,b);b=this.styleTargets.get(b);return b!=null||c?b:this.styleTargets.get(rn.Class(a))},__class__:ll});var rn=O["feathers.style._ClassVariantStyleProvider.StyleTarget"]={__ename__:"feathers.style._ClassVariantStyleProvider.StyleTarget",__constructs__:null,Class:(G=function(a){return{_hx_index:0,type:a,__enum__:"feathers.style._ClassVariantStyleProvider.StyleTarget",
toString:D}},G._hx_name="Class",G.__params__=["type"],G),ClassAndVariant:(G=function(a,b){return{_hx_index:1,type:a,variant:b,__enum__:"feathers.style._ClassVariantStyleProvider.StyleTarget",toString:D}},G._hx_name="ClassAndVariant",G.__params__=["type","variant"],G)};rn.__constructs__=[rn.Class,rn.ClassAndVariant];var Wb=function(){};r["feathers.style.Theme"]=Wb;Wb.__name__="feathers.style.Theme";Wb.__properties__={get_fallbackTheme:"get_fallbackTheme"};Wb.get_fallbackTheme=function(){Wb._fallbackTheme==
null&&(Wb._fallbackTheme=new hr);return Wb._fallbackTheme};Wb.setTheme=function(a,b,c){c==null&&(c=!0);var d=null;if(b==null)d=Wb.primaryTheme,Wb.primaryTheme=a;else if(Wb.roots==null){Wb.roots=[b];var f=new Na;f.set(b,a);Wb.rootToTheme=f}else d=Wb.rootToTheme.h[b.__id__],d==null&&Wb.roots.push(b),Wb.rootToTheme.set(b,a);d!=null&&c&&d.dispose()};Wb.getTheme=function(a){if(a instanceof ea){for(var b=a;b!=null;){if(u.__implements(b,ko)&&!b.get_themeEnabled())return null;b=b.parent}if(Wb.roots!=null){b=
0;for(var c=Wb.roots;b<c.length;){var d=c[b];++b;if(d.contains(a))return Wb.rootToTheme.h[d.__id__]}}}else if(a!=null&&!a.get_themeEnabled())return null;return Wb.primaryTheme!=null?Wb.primaryTheme:Wb.get_fallbackTheme()};var fi=function(a,b,c,d,f,g,h,l,k,q,w,v,z){na.call(this);this._textFormat=new qf(a,b,c,d,f,g,h,l,k,q,w,v,z)};r["feathers.text.TextFormat"]=fi;fi.__name__="feathers.text.TextFormat";fi.__super__=na;fi.prototype=I(na.prototype,{_textFormat:null,get_font:function(){return this._textFormat.font},
set_font:function(a){if(this._textFormat.font==a)return this._textFormat.font;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_font(a);W.dispatch(this,"change");return this._textFormat.font},get_size:function(){return this._textFormat.size},set_size:function(a){if(this._textFormat.size==a)return this._textFormat.size;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_size(a);W.dispatch(this,"change");return this._textFormat.size},get_color:function(){return this._textFormat.color},
set_color:function(a){if(this._textFormat.color==a)return this._textFormat.color;this._textFormat=pg.clone(this._textFormat);this._textFormat.color=a;W.dispatch(this,"change");return this._textFormat.color},get_bold:function(){return this._textFormat.bold},set_bold:function(a){if(this._textFormat.bold==a)return this._textFormat.bold;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_bold(a);W.dispatch(this,"change");return this._textFormat.bold},get_italic:function(){return this._textFormat.italic},
set_italic:function(a){if(this._textFormat.italic==a)return this._textFormat.italic;this._textFormat=pg.clone(this._textFormat);this._textFormat.set_italic(a);W.dispatch(this,"change");return this._textFormat.italic},get_underline:function(){return this._textFormat.underline},set_underline:function(a){if(this._textFormat.underline==a)return this._textFormat.underline;this._textFormat=pg.clone(this._textFormat);this._textFormat.underline=a;W.dispatch(this,"change");return this._textFormat.underline},
get_url:function(){return this._textFormat.url},set_url:function(a){if(this._textFormat.url==a)return this._textFormat.url;this._textFormat=pg.clone(this._textFormat);this._textFormat.url=a;W.dispatch(this,"change");return this._textFormat.url},get_target:function(){return this._textFormat.target},set_target:function(a){if(this._textFormat.target==a)return this._textFormat.target;this._textFormat=pg.clone(this._textFormat);this._textFormat.target=a;W.dispatch(this,"change");return this._textFormat.target},
get_align:function(){return this._textFormat.align},set_align:function(a){if(this._textFormat.align==a)return this._textFormat.align;this._textFormat=pg.clone(this._textFormat);this._textFormat.align=a;W.dispatch(this,"change");return this._textFormat.align},get_leftMargin:function(){return this._textFormat.leftMargin},set_leftMargin:function(a){if(this._textFormat.leftMargin==a)return this._textFormat.leftMargin;this._textFormat=pg.clone(this._textFormat);this._textFormat.leftMargin=a;W.dispatch(this,
"change");return this._textFormat.leftMargin},get_rightMargin:function(){return this._textFormat.rightMargin},set_rightMargin:function(a){if(this._textFormat.rightMargin==a)return this._textFormat.rightMargin;this._textFormat=pg.clone(this._textFormat);this._textFormat.rightMargin=a;W.dispatch(this,"change");return this._textFormat.rightMargin},get_indent:function(){return this._textFormat.indent},set_indent:function(a){if(this._textFormat.indent==a)return this._textFormat.indent;this._textFormat=
pg.clone(this._textFormat);this._textFormat.indent=a;W.dispatch(this,"change");return this._textFormat.indent},get_leading:function(){return this._textFormat.leading},set_leading:function(a){if(this._textFormat.leading==a)return this._textFormat.leading;this._textFormat=pg.clone(this._textFormat);this._textFormat.leading=a;W.dispatch(this,"change");return this._textFormat.leading},get_blockIndent:function(){return this._textFormat.blockIndent},set_blockIndent:function(a){if(this._textFormat.blockIndent==
a)return this._textFormat.blockIndent;this._textFormat=pg.clone(this._textFormat);this._textFormat.blockIndent=a;W.dispatch(this,"change");return this._textFormat.blockIndent},get_bullet:function(){return this._textFormat.bullet},set_bullet:function(a){if(this._textFormat.bullet==a)return this._textFormat.bullet;this._textFormat=pg.clone(this._textFormat);this._textFormat.bullet=a;W.dispatch(this,"change");return this._textFormat.bullet},get_kerning:function(){return this._textFormat.kerning},set_kerning:function(a){if(this._textFormat.kerning==
a)return this._textFormat.kerning;this._textFormat=pg.clone(this._textFormat);this._textFormat.kerning=a;W.dispatch(this,"change");return this._textFormat.kerning},get_letterSpacing:function(){return this._textFormat.letterSpacing},set_letterSpacing:function(a){if(this._textFormat.letterSpacing==a)return this._textFormat.letterSpacing;this._textFormat=pg.clone(this._textFormat);this._textFormat.letterSpacing=a;W.dispatch(this,"change");return this._textFormat.letterSpacing},get_tabStops:function(){return this._textFormat.tabStops},
set_tabStops:function(a){if(this._textFormat.tabStops==a)return this._textFormat.tabStops;this._textFormat=pg.clone(this._textFormat);this._textFormat.tabStops=a;W.dispatch(this,"change");return this._textFormat.tabStops},clone:function(){var a=new fi(this.get_font(),this.get_size(),this.get_color(),this.get_bold(),this.get_italic(),this.get_underline(),this.get_url(),this.get_target(),this.get_align(),this.get_leftMargin(),this.get_rightMargin(),this.get_indent(),this.get_leading());a._textFormat.blockIndent=
this.get_blockIndent();a._textFormat.bullet=this.get_bullet();a._textFormat.kerning=this.get_kerning();a._textFormat.letterSpacing=this.get_letterSpacing();a._textFormat.tabStops=this.get_tabStops();return a},toSimpleTextFormat:function(){return this._textFormat},__class__:fi,__properties__:{set_tabStops:"set_tabStops",get_tabStops:"get_tabStops",set_letterSpacing:"set_letterSpacing",get_letterSpacing:"get_letterSpacing",set_kerning:"set_kerning",get_kerning:"get_kerning",set_bullet:"set_bullet",
get_bullet:"get_bullet",set_blockIndent:"set_blockIndent",get_blockIndent:"get_blockIndent",set_leading:"set_leading",get_leading:"get_leading",set_indent:"set_indent",get_indent:"get_indent",set_rightMargin:"set_rightMargin",get_rightMargin:"get_rightMargin",set_leftMargin:"set_leftMargin",get_leftMargin:"get_leftMargin",set_align:"set_align",get_align:"get_align",set_target:"set_target",get_target:"get_target",set_url:"set_url",get_url:"get_url",set_underline:"set_underline",get_underline:"get_underline",
set_italic:"set_italic",get_italic:"get_italic",set_bold:"set_bold",get_bold:"get_bold",set_color:"set_color",get_color:"get_color",set_size:"set_size",get_size:"get_size",set_font:"set_font",get_font:"get_font"}});var hr=function(a,b){wc.call(this,a,b)};r["feathers.themes.steel.DefaultSteelTheme"]=hr;hr.__name__="feathers.themes.steel.DefaultSteelTheme";hr.__super__=wc;hr.prototype=I(wc.prototype,{__class__:hr});var Ot=function(){};r["feathers.themes.steel.components.SteelActivityIndicatorStyles"]=
Ot;Ot.__name__="feathers.themes.steel.components.SteelActivityIndicatorStyles";Ot.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(xo,null)==null&&b.setStyleFunction(xo,null,function(c){if(c.get_activitySkin()==null){var d=new dp;d.set_numDots(8);d.set_dotRadius(3);d.set_endDotRadius(null);d.set_dotColor(a.textColor);d.set_endDotColor(null);d.set_dotAlpha(1);d.set_endDotAlpha(0);var f=1.1*d.get_dotRadius()*d.get_numDots();
d.set_width(f);d.set_height(f);c.set_activitySkin(d)}}))};var Pt=function(){};r["feathers.themes.steel.components.SteelAlertStyles"]=Pt;Pt.__name__="feathers.themes.steel.components.SteelAlertStyles";Pt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(td,null)==null&&b.setStyleFunction(td,null,function(c){var d=jc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=
new db,d.set_border(kc.None),d.set_fill(a.getContainerFill()),d.set_maxWidth(276),c.set_backgroundSkin(d));c.get_layout()==null&&(d=new Gh,d.set_paddingTop(a.largePadding),d.set_paddingRight(a.largePadding),d.set_paddingBottom(a.largePadding),d.set_paddingLeft(a.largePadding),d.set_gap(a.mediumPadding),d.set_percentWidthResetEnabled(!0),c.set_layout(d))}),b.getStyleFunction(Ie,td.CHILD_VARIANT_BUTTON_BAR)==null&&b.setStyleFunction(Ie,td.CHILD_VARIANT_BUTTON_BAR,function(c){if(c.get_layout()==null){var d=
new Zo;d.set_paddingTop(a.largePadding);d.set_paddingRight(a.largePadding);d.set_paddingBottom(a.largePadding);d.set_paddingLeft(a.largePadding);d.set_gap(a.mediumPadding);c.set_layout(d)}}),b.getStyleFunction(bc,td.CHILD_VARIANT_MESSAGE_LABEL)==null&&b.setStyleFunction(bc,td.CHILD_VARIANT_MESSAGE_LABEL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_layoutData()==null&&c.set_layoutData(Yg.fillHorizontal());
c.set_wordWrap(!0)}))};var Dq=function(){};r["feathers.themes.steel.components.SteelApplicationStyles"]=Dq;Dq.__name__="feathers.themes.steel.components.SteelApplicationStyles";Dq.initialize=function(a){a==null&&(a=Wb.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(ki,null)==null&&a.setStyleFunction(ki,null,function(b){b.get_scaleManager()==null&&b.set_scaleManager(new Uo)}))};Dq.refreshStageColor=function(a,b){a!=null&&a.set_color(b.rootFillColor)};var Qt=
function(){};r["feathers.themes.steel.components.SteelButtonBarStyles"]=Qt;Qt.__name__="feathers.themes.steel.components.SteelButtonBarStyles";Qt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ie,null)==null&&b.setStyleFunction(Ie,null,function(c){if(c.get_layout()==null){var d=new Gh;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var Ht=function(){};r["feathers.themes.steel.components.SteelButtonStyles"]=Ht;
Ht.__name__="feathers.themes.steel.components.SteelButtonStyles";Ht.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qb,null)==null&&b.setStyleFunction(Qb,null,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());
d.setBorderForState(Cc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);
c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,Qb.VARIANT_PRIMARY)==null&&b.setStyleFunction(Qb,Qb.VARIANT_PRIMARY,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),
d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,Qb.VARIANT_DANGER)==null&&b.setStyleFunction(Qb,Qb.VARIANT_DANGER,function(c){if(c.get_backgroundSkin()==
null){var d=new db;d.set_fill(a.getDangerFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedDangerFill());d.set_border(a.getDangerBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var Rt=function(){};r["feathers.themes.steel.components.SteelCalloutStyles"]=Rt;Rt.__name__="feathers.themes.steel.components.SteelCalloutStyles";Rt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Jd,
null)==null&&b.setStyleFunction(Jd,null,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(14),d.set_height(8),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.RIGHT),d.set_drawBaseBorder(!1),
d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(8),d.set_height(14),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(14),d.set_height(8),c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),
d.set_width(8),d.set_height(14),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}))};
var St=function(){};r["feathers.themes.steel.components.SteelCheckStyles"]=St;St.__name__="feathers.themes.steel.components.SteelCheckStyles";St.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction($l,null)==null&&b.setStyleFunction($l,null,function(c){var d=jc.isDesktop();c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(Ab.SolidColor(0,0));f.set_border(kc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new pm;c.set_icon(f);var g=new db;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Nb.DOWN(!1),a.getSelectedInsetBorder());g.set_fill(a.getInsetFill());
g.set_disabledFill(a.getDisabledInsetFill());f.set_defaultView(g);g=new db;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getSelectedInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Nb.DOWN(!0),a.getSelectedInsetBorder());g.set_fill(a.getReversedActiveThemeFill());g.set_disabledFill(a.getDisabledInsetFill());var h=new zd;d?(h.get_graphics().beginFill(a.textColor),
h.get_graphics().drawRect(-1,-8,3,11),h.get_graphics().endFill(),h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-4,0,5,3),h.get_graphics().endFill(),h.set_x(7),h.set_y(9)):(h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-1,-8,3,14),h.get_graphics().endFill(),h.get_graphics().beginFill(a.textColor),h.get_graphics().drawRect(-5,3,5,3),h.get_graphics().endFill(),h.set_x(10),h.set_y(10));h.set_rotation(45);g.addChild(h);f.set_selectedView(g);d=new db;d.set_width(20);
d.set_height(20);d.set_minWidth(20);d.set_minHeight(20);d.set_border(a.getDisabledInsetBorder());d.set_fill(a.getDisabledInsetFill());g=new zd;g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawRect(-1,-8,3,14);g.get_graphics().endFill();g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawRect(-5,3,5,3);g.get_graphics().endFill();g.set_rotation(45);g.set_x(10);g.set_y(10);d.addChild(g);f.setViewForState(Nb.DISABLED(!0),d)}c.get_focusRectSkin()==null&&(f=new db,f.set_fill(Ab.None),
f.set_border(a.getFocusBorder()),f.set_cornerRadius(3),c.set_focusRectSkin(f),c.set_focusPaddingTop(3),c.set_focusPaddingRight(3),c.set_focusPaddingBottom(3),c.set_focusPaddingLeft(3));c.set_horizontalAlign(Vb.LEFT);c.set_gap(a.smallPadding)}))};var Ak=function(){};r["feathers.themes.steel.components.SteelCollapsibleStyles"]=Ak;Ak.__name__="feathers.themes.steel.components.SteelCollapsibleStyles";Ak.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&
(b=a.styleProvider,b.getStyleFunction(Yc,qh.CHILD_VARIANT_HEADER)==null&&b.setStyleFunction(Yc,qh.CHILD_VARIANT_HEADER,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());f.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());f.setFillForState(Nb.DOWN(!0),a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Nb.DOWN(!1),
a.getActiveFillBorder());f.setBorderForState(Nb.DOWN(!0),a.getActiveFillBorder());f.set_cornerRadius(0);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new pm;c.set_icon(f);var g=new zd;Ak.drawDisclosureClosedIcon(g,a.textColor,d);f.set_defaultView(g);g=new zd;Ak.drawDisclosureClosedIcon(g,a.disabledTextColor,d);f.set_disabledView(g);g=new zd;Ak.drawDisclosureOpenIcon(g,a.textColor,d);f.set_selectedView(g);g=new zd;Ak.drawDisclosureOpenIcon(g,a.disabledTextColor,
d);f.setViewForState(Nb.DISABLED(!0),g)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(1/0);c.set_minGap(a.smallPadding);
c.set_iconPosition(ja.RIGHT);c.set_horizontalAlign(Vb.LEFT);c.set_verticalAlign(fc.MIDDLE)}))};Ak.drawDisclosureClosedIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,6),a.get_graphics().lineTo(12,6),a.get_graphics().lineTo(8,10)):(a.get_graphics().moveTo(4,6),a.get_graphics().lineTo(16,6),a.get_graphics().lineTo(10,14));a.get_graphics().lineTo(4,
6);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().endFill()};Ak.drawDisclosureOpenIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,10),a.get_graphics().lineTo(12,10),a.get_graphics().lineTo(8,6),a.get_graphics().lineTo(4,10)):(a.get_graphics().moveTo(4,14),a.get_graphics().lineTo(16,14),a.get_graphics().lineTo(10,
6),a.get_graphics().lineTo(4,14));a.get_graphics().endFill()};var Tt=function(){};r["feathers.themes.steel.components.SteelComboBoxStyles"]=Tt;Tt.__name__="feathers.themes.steel.components.SteelComboBoxStyles";Tt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qb,Cd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Qb,Cd.CHILD_VARIANT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new ri;d.set_cornerRadiusPosition(ja.RIGHT);
d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.setBorderForState(Cc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_fill(Ab.SolidColor(a.textColor)),d.set_disabledFill(Ab.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),
c.set_icon(d));c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Wc,Cd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(Wc,Cd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ri;f.set_cornerRadiusPosition(ja.LEFT);f.set_cornerRadius(3);f.set_drawBaseBorder(!1);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());
f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(re.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),
c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(Fc,Cd.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Fc,Cd.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Fc,Fc.VARIANT_POP_UP)(c)}))};var Ih=function(){};r["feathers.themes.steel.components.SteelDatePickerStyles"]=Ih;Ih.__name__="feathers.themes.steel.components.SteelDatePickerStyles";
Ih.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Bb,null)==null&&b.setStyleFunction(Bb,null,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_border(kc.None);d.set_fill(a.getContainerFill());c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),d.set_border(a.getFocusBorder()),c.set_focusRectSkin(d));c.set_focusPaddingTop(3);c.set_focusPaddingRight(3);c.set_focusPaddingBottom(3);
c.set_focusPaddingLeft(3);c.set_headerGap(a.xsmallPadding)}),b.getStyleFunction(bc,Bb.CHILD_VARIANT_MONTH_TITLE_VIEW)==null&&b.setStyleFunction(bc,Bb.CHILD_VARIANT_MONTH_TITLE_VIEW,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}),b.getStyleFunction(Qb,Bb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Qb,Bb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON,function(c){var d=jc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getButtonFill());f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Cc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new zd,Ih.drawDecrementMonthIcon(d,
a.textColor),c.set_icon(d));c.getIconForState(Cc.DISABLED)==null&&(d=new zd,Ih.drawDecrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Cc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,Bb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Qb,Bb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getButtonFill());f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());
f.setFillForState(Cc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new zd,Ih.drawIncrementMonthIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Cc.DISABLED)==null&&(d=new zd,Ih.drawIncrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Cc.DISABLED,
d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,Bb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Qb,Bb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getButtonFill());f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Cc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,
a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==null&&(d=new zd,Ih.drawDecrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Cc.DISABLED)==null&&(d=new zd,Ih.drawDecrementYearIcon(d,a.disabledTextColor),c.setIconForState(Cc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,Bb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Qb,
Bb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getButtonFill());f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Cc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);d?(f.set_width(20),f.set_height(20)):(f.set_width(24),f.set_height(24));c.set_backgroundSkin(f)}c.get_icon()==
null&&(d=new zd,Ih.drawIncrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Cc.DISABLED)==null&&(d=new zd,Ih.drawIncrementYearIcon(d,a.disabledTextColor),c.setIconForState(Cc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(bc,Bb.CHILD_VARIANT_WEEKDAY_LABEL)==null&&b.setStyleFunction(bc,Bb.CHILD_VARIANT_WEEKDAY_LABEL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getSecondaryTextFormat(0));c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat(0));
c.set_verticalAlign(fc.MIDDLE)}),b.getStyleFunction(Mc,Bb.CHILD_VARIANT_DATE_RENDERER)==null&&b.setStyleFunction(Mc,Bb.CHILD_VARIANT_DATE_RENDERER,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(Ab.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(kc.None);f.set_selectedBorder(a.getSelectedBorder());f.setBorderForState(Nb.DOWN(!1),a.getActiveFillBorder());d?(f.set_width(20),
f.set_height(20)):(f.set_width(32),f.set_height(32));f.set_cornerRadius(4);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_horizontalAlign(Vb.CENTER);c.set_verticalAlign(fc.MIDDLE);
c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Mc,Bb.CHILD_VARIANT_MUTED_DATE_RENDERER)==null&&b.setStyleFunction(Mc,Bb.CHILD_VARIANT_MUTED_DATE_RENDERER,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(Ab.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(kc.None);
f.set_selectedBorder(a.getSelectedBorder());f.setBorderForState(Nb.DOWN(!1),a.getActiveFillBorder());d?(f.set_width(20),f.set_height(20)):(f.set_width(32),f.set_height(32));f.set_cornerRadius(4);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getSecondaryTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==
null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_horizontalAlign(Vb.CENTER);c.set_verticalAlign(fc.MIDDLE);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}))};Ih.drawDecrementMonthIcon=function(a,b){a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,8,8);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().moveTo(2,4);a.get_graphics().lineTo(6,
0);a.get_graphics().lineTo(6,8);a.get_graphics().lineTo(2,4);a.get_graphics().endFill()};Ih.drawIncrementMonthIcon=function(a,b){a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,8,8);a.get_graphics().endFill();a.get_graphics().beginFill(b);a.get_graphics().moveTo(2,0);a.get_graphics().lineTo(6,4);a.get_graphics().lineTo(2,8);a.get_graphics().lineTo(2,0);a.get_graphics().endFill()};Ih.drawDecrementYearIcon=function(a,b){a.get_graphics().beginFill(b);a.get_graphics().moveTo(0,4);
a.get_graphics().lineTo(4,0);a.get_graphics().lineTo(4,8);a.get_graphics().lineTo(0,4);a.get_graphics().moveTo(4,4);a.get_graphics().lineTo(8,0);a.get_graphics().lineTo(8,8);a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};Ih.drawIncrementYearIcon=function(a,b){a.get_graphics().beginFill(b);a.get_graphics().moveTo(0,0);a.get_graphics().lineTo(4,4);a.get_graphics().lineTo(0,8);a.get_graphics().lineTo(0,0);a.get_graphics().moveTo(4,0);a.get_graphics().lineTo(8,4);a.get_graphics().lineTo(4,8);
a.get_graphics().lineTo(4,0);a.get_graphics().endFill()};var Ut=function(){};r["feathers.themes.steel.components.SteelDrawerStyles"]=Ut;Ut.__name__="feathers.themes.steel.components.SteelDrawerStyles";Ut.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Fi,null)==null&&b.setStyleFunction(Fi,null,function(c){if(c.get_overlaySkin()==null){var d=new db;d.set_fill(a.getOverlayFill());d.set_border(kc.None);d.set_width(1);
d.set_height(1);c.set_overlaySkin(d)}}))};var Wt=function(){};r["feathers.themes.steel.components.SteelFormItemStyles"]=Wt;Wt.__name__="feathers.themes.steel.components.SteelFormItemStyles";Wt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Gi,null)==null&&b.setStyleFunction(Gi,null,function(c){if(c.get_requiredSkin()==null){var d=new zd;d.get_graphics().lineStyle(1,a.dangerTextColor);d.get_graphics().moveTo(4,
.5);d.get_graphics().lineTo(4,6.5);d.get_graphics().moveTo(1,1.5);d.get_graphics().lineTo(7,5.5);d.get_graphics().moveTo(1,5.5);d.get_graphics().lineTo(7,1.5);d.get_graphics().lineStyle();d.get_graphics().beginFill(16711935,0);d.get_graphics().drawRect(0,0,8,7);d.get_graphics().endFill();c.set_requiredSkin(d)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_gap(a.mediumPadding)}))};var Vt=function(){};
r["feathers.themes.steel.components.SteelFormStyles"]=Vt;Vt.__name__="feathers.themes.steel.components.SteelFormStyles";Vt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(cn,null)==null&&b.setStyleFunction(cn,null,function(c){if(c.get_layout()==null){var d=new Yo;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var Xt=function(){};r["feathers.themes.steel.components.SteelGridViewStyles"]=Xt;Xt.__name__="feathers.themes.steel.components.SteelGridViewStyles";
Xt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new db,g.set_fill(a.getThemeFill()),
g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new db,g.set_fill(a.getSubHeadingFill()),g.set_border(kc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new db,g.set_fill(a.getActiveThemeFill()),g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_dragDropIndicatorSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0);
f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(kc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&
(g=new db,g.set_fill(a.getThemeFill()),g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new db,g.set_fill(a.getSubHeadingFill()),g.set_border(kc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(nc,null)==null&&b.setStyleFunction(nc,null,function(f){jc.isDesktop()?
c(f):d(f)});b.getStyleFunction(nc,nc.VARIANT_BORDER)==null&&b.setStyleFunction(nc,nc.VARIANT_BORDER,c);b.getStyleFunction(nc,nc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(nc,nc.VARIANT_BORDERLESS,d);b.getStyleFunction(Mc,nc.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(Mc,nc.CHILD_VARIANT_CELL_RENDERER,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new db;h.set_fill(Ab.SolidColor(16711935,0));h.set_border(kc.None);g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),
h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}a.styleProvider.getStyleFunction(Mc,null)(f)});b.getStyleFunction(Mc,nc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Mc,nc.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new db;h.set_fill(a.getSubHeadingFill());h.set_border(kc.None);g?(h.set_width(22),h.set_height(22),h.set_minWidth(22),h.set_minHeight(22)):(h.set_width(44),
h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);
f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Vb.LEFT)});b.getStyleFunction(Qb,nc.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Qb,nc.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new cp;h.set_fill(Ab.SolidColor(16711935,0));h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Cc.HOVER,a.getThemeBorder());g?(h.set_width(6),h.set_height(1),h.set_minWidth(6)):
(h.set_width(10),h.set_height(1),h.set_minWidth(10));h.set_minHeight(1);f.set_backgroundSkin(h)}});b.getStyleFunction(Rf,null)==null&&b.setStyleFunction(Rf,null,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new wl;h.set_fill(a.getContainerFill());h.set_border(a.getDividerBorder());h.set_selectedFill(a.getActiveThemeFill());h.setFillForState(Nb.DOWN(!1),a.getActiveThemeFill());g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),
h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}})}};var Yt=function(){};r["feathers.themes.steel.components.SteelGroupListViewStyles"]=Yt;Yt.__name__="feathers.themes.steel.components.SteelGroupListViewStyles";Yt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==
null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(kc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Qc,null)==null&&b.setStyleFunction(Qc,null,function(f){jc.isDesktop()?c(f):d(f)});b.getStyleFunction(Qc,Qc.VARIANT_BORDER)==null&&b.setStyleFunction(Qc,
Qc.VARIANT_BORDER,c);b.getStyleFunction(Qc,Qc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Qc,Qc.VARIANT_BORDERLESS,d);b.getStyleFunction(Mc,Qc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Mc,Qc.CHILD_VARIANT_HEADER_RENDERER,function(f){if(f.get_backgroundSkin()==null){var g=new db;g.set_fill(a.getSubHeadingFill());g.set_border(kc.None);g.set_width(22);g.set_height(22);g.set_minWidth(22);g.set_minHeight(22);f.set_backgroundSkin(g)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());
f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Vb.LEFT)})}};var Zt=function(){};
r["feathers.themes.steel.components.SteelHDividedBoxStyles"]=Zt;Zt.__name__="feathers.themes.steel.components.SteelHDividedBoxStyles";Zt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ck,null)==null&&b.setStyleFunction(Ck,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new db;d.set_fill(a.getThemeFill());d.set_border(kc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var au=function(){};
r["feathers.themes.steel.components.SteelHProgressBarStyles"]=au;au.__name__="feathers.themes.steel.components.SteelHProgressBarStyles";au.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Sl,null)==null&&b.setStyleFunction(Sl,null,function(c){if(c.get_fillSkin()==null){var d=new db;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getControlDisabledFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getDisabledInsetBorder());
d.set_cornerRadius(8);d.set_minWidth(8);d.set_height(8);c.set_fillSkin(d)}c.get_backgroundSkin()==null&&(d=new db,d.set_fill(a.getInsetFill()),d.set_disabledFill(a.getDisabledInsetFill()),d.set_border(a.getInsetBorder()),d.set_disabledBorder(a.getDisabledInsetBorder()),d.set_cornerRadius(8),d.set_width(200),d.set_height(8),c.set_backgroundSkin(d))}))};var It=function(){};r["feathers.themes.steel.components.SteelHScrollBarStyles"]=It;It.__name__="feathers.themes.steel.components.SteelHScrollBarStyles";
It.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Sg,null)==null&&b.setStyleFunction(Sg,null,function(c){var d=jc.isDesktop();if(c.get_thumbSkin()==null){var f=new db;f.set_fill(a.getScrollBarThumbFill());f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(kc.None);var g=d?6:4;f.set_width(g);f.set_height(g);f.set_minWidth(g);f.set_minHeight(g);f.set_cornerRadius(g/2);g=new di;g.set_keepDownStateOnRollOut(!0);
g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new db,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(kc.None),d.set_width(12),d.set_height(12),d.set_minWidth(12),d.set_minHeight(12),c.set_trackSkin(d));c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Qb,Sg.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Qb,
Sg.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(kc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new vf,d.set_pointPosition(ja.LEFT),d.set_fill(Ab.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(Ab.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(4),
d.set_height(8),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}),b.getStyleFunction(Qb,Sg.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Qb,Sg.CHILD_VARIANT_INCREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Cc.DOWN,
a.getReversedActiveThemeFill());d.set_border(kc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new vf,d.set_pointPosition(ja.RIGHT),d.set_fill(Ab.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(Ab.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(4),d.set_height(8),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}))};
var bu=function(){};r["feathers.themes.steel.components.SteelHSliderStyles"]=bu;bu.__name__="feathers.themes.steel.components.SteelHSliderStyles";bu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(dn,null)==null&&b.setStyleFunction(dn,null,function(c){var d=jc.isDesktop();if(c.get_thumbSkin()==null){var f=new Qb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new $i;g.set_fill(a.getButtonFill());
g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Cc.DOWN,a.getButtonDownFill());g.set_border(a.getButtonBorder());g.set_disabledBorder(a.getButtonDisabledBorder());d?(g.set_width(20),g.set_height(20)):(g.set_width(24),g.set_height(24));f.set_backgroundSkin(g);d=new $i;d.set_fill(Ab.None);d.set_border(a.getFocusBorder());f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new ri,f.set_fill(a.getActiveThemeFill()),f.set_disabledFill(a.getControlDisabledFill()),f.set_border(a.getActiveFillBorder()),
f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ja.LEFT),f.set_width(100),f.set_height(8),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new ri,f.set_fill(a.getInsetFill()),f.set_disabledFill(a.getDisabledInsetFill()),f.set_border(a.getInsetBorder()),f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ja.RIGHT),f.set_width(100),f.set_height(8),c.set_secondaryTrackSkin(f)))}))};var $t=function(){};
r["feathers.themes.steel.components.SteelHeaderStyles"]=$t;$t.__name__="feathers.themes.steel.components.SteelHeaderStyles";$t.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(pj,null)==null&&b.setStyleFunction(pj,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getHeaderFill());f.set_border(kc.None);d?(f.set_width(32),f.set_height(32),f.set_minHeight(32)):(f.set_width(44),
f.set_height(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getHeaderTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledHeaderTextFormat());d?(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding),c.set_minGap(a.mediumPadding)):(c.set_paddingTop(a.largePadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.largePadding),
c.set_paddingLeft(a.largePadding),c.set_minGap(a.largePadding))}))};var Bk=function(){};r["feathers.themes.steel.components.SteelHierarchicalItemRendererStyles"]=Bk;Bk.__name__="feathers.themes.steel.components.SteelHierarchicalItemRendererStyles";Bk.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(uf,null)==null&&b.setStyleFunction(uf,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=
new wl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Nb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==
null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_indentation(20);c.set_horizontalAlign(Vb.LEFT)}),b.getStyleFunction(Yc,uf.CHILD_VARIANT_DISCLOSURE_BUTTON)==null&&b.setStyleFunction(Yc,uf.CHILD_VARIANT_DISCLOSURE_BUTTON,
function(c){var d=jc.isDesktop();if(c.get_icon()==null){var f=new pm;c.set_icon(f);c=new zd;Bk.drawDisclosureClosedIcon(c,a.textColor,d);f.set_defaultView(c);c=new zd;Bk.drawDisclosureClosedIcon(c,a.disabledTextColor,d);f.set_disabledView(c);c=new zd;Bk.drawDisclosureOpenIcon(c,a.textColor,d);f.set_selectedView(c);c=new zd;Bk.drawDisclosureOpenIcon(c,a.disabledTextColor,d);f.setViewForState(Nb.DISABLED(!0),c)}}))};Bk.drawDisclosureClosedIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);
c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(12,8),a.get_graphics().lineTo(4,12)):(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(16,10),a.get_graphics().lineTo(4,16));a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};Bk.drawDisclosureOpenIcon=function(a,b,c){a.get_graphics().beginFill(16711935,0);c?a.get_graphics().drawRect(0,0,16,16):a.get_graphics().drawRect(0,
0,20,20);a.get_graphics().endFill();a.get_graphics().beginFill(b);c?(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(12,4),a.get_graphics().lineTo(8,12)):(a.get_graphics().moveTo(4,4),a.get_graphics().lineTo(16,4),a.get_graphics().lineTo(10,16));a.get_graphics().lineTo(4,4);a.get_graphics().endFill()};var cu=function(){};r["feathers.themes.steel.components.SteelItemRendererStyles"]=cu;cu.__name__="feathers.themes.steel.components.SteelItemRendererStyles";cu.initialize=function(a){if(a==null){var b=
Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Mc,null)==null&&b.setStyleFunction(Mc,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new wl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Nb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),
f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);
c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_horizontalAlign(Vb.LEFT)}))};var du=function(){};r["feathers.themes.steel.components.SteelLabelStyles"]=du;du.__name__="feathers.themes.steel.components.SteelLabelStyles";du.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(bc,null)==null&&b.setStyleFunction(bc,null,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}),b.getStyleFunction(bc,bc.VARIANT_HEADING)==null&&b.setStyleFunction(bc,bc.VARIANT_HEADING,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getHeaderTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledHeaderTextFormat())}),b.getStyleFunction(bc,bc.VARIANT_DETAIL)==null&&b.setStyleFunction(bc,bc.VARIANT_DETAIL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDetailTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledDetailTextFormat())}),b.getStyleFunction(bc,bc.VARIANT_DANGER)==null&&b.setStyleFunction(bc,bc.VARIANT_DANGER,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDangerTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}))};var fu=function(){};r["feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles"]=fu;fu.__name__="feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles";
fu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ql,null)==null&&b.setStyleFunction(ql,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new wl;f.set_fill(a.getContainerFill());f.set_border(a.getDividerBorder());f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Nb.DOWN(!1),a.getActiveThemeFill());d?(f.set_width(26),f.set_height(26),f.set_minWidth(26),f.set_minHeight(26)):
(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}}))};var eu=function(){};r["feathers.themes.steel.components.SteelLayoutGroupStyles"]=eu;eu.__name__="feathers.themes.steel.components.SteelLayoutGroupStyles";eu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(sc,sc.VARIANT_TOOL_BAR)==null&&b.setStyleFunction(sc,sc.VARIANT_TOOL_BAR,function(c){var d=jc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getHeaderFill());f.set_border(kc.None);d?(f.set_width(32),f.set_height(32),f.set_minHeight(32)):(f.set_width(44),f.set_height(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_layout()==null&&(d=new Gh,d.set_horizontalAlign(Vb.LEFT),d.set_verticalAlign(fc.MIDDLE),d.set_paddingTop(a.smallPadding),d.set_paddingRight(a.largePadding),d.set_paddingBottom(a.smallPadding),d.set_paddingLeft(a.largePadding),d.set_gap(a.smallPadding),c.set_layout(d))}))};
var gu=function(){};r["feathers.themes.steel.components.SteelListViewStyles"]=gu;gu.__name__="feathers.themes.steel.components.SteelListViewStyles";gu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),
g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new db,g.set_fill(a.getActiveThemeFill()),g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_dragDropIndicatorSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=
jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(kc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Fc,null)==null&&b.setStyleFunction(Fc,null,function(f){jc.isDesktop()?
c(f):d(f)});b.getStyleFunction(Fc,Fc.VARIANT_BORDER)==null&&b.setStyleFunction(Fc,Fc.VARIANT_BORDER,c);b.getStyleFunction(Fc,Fc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Fc,Fc.VARIANT_BORDERLESS,d);b.getStyleFunction(Fc,Fc.VARIANT_POP_UP)==null&&b.setStyleFunction(Fc,Fc.VARIANT_POP_UP,function(f){if(f.get_layout()==null){var g=new Mh;g.set_requestedMinRowCount(1);g.set_requestedMaxRowCount(5);f.set_layout(g)}c(f)})}};var hu=function(){};r["feathers.themes.steel.components.SteelNumericStepperStyles"]=
hu;hu.__name__="feathers.themes.steel.components.SteelNumericStepperStyles";hu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qb,id.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Qb,id.CHILD_VARIANT_DECREMENT_BUTTON,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ri;f.set_cornerRadiusPosition(ja.LEFT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),
c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(Qb,id.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Qb,id.CHILD_VARIANT_INCREMENT_BUTTON,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ri;f.set_cornerRadiusPosition(ja.RIGHT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);f.set_minWidth(22);f.set_minHeight(22);c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),
c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(Wc,id.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(Wc,id.CHILD_VARIANT_TEXT_INPUT,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_width(3);f.set_fill(a.getInsetFill());f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());
f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(re.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),
c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}))};var iu=function(){};r["feathers.themes.steel.components.SteelPageIndicatorStyles"]=iu;iu.__name__="feathers.themes.steel.components.SteelPageIndicatorStyles";iu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wg,null)==null&&b.setStyleFunction(Wg,null,function(c){if(c.get_focusRectSkin()==null){var d=
new db;d.set_fill(Ab.None);d.set_border(a.getFocusBorder());d.set_cornerRadius(3);c.set_focusRectSkin(d)}c.get_layout()==null&&(d=new Gh,d.set_gap(a.largePadding),d.set_paddingTop(a.smallPadding),d.set_paddingRight(a.smallPadding),d.set_paddingBottom(a.smallPadding),d.set_paddingLeft(a.smallPadding),d.set_horizontalAlign(Vb.CENTER),d.set_verticalAlign(fc.MIDDLE),c.set_layout(d))}),b.getStyleFunction(Yc,Wg.CHILD_VARIANT_TOGGLE_BUTTON)==null&&b.setStyleFunction(Yc,Wg.CHILD_VARIANT_TOGGLE_BUTTON,function(c){if(c.get_backgroundSkin()==
null){var d=new $i;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.set_selectedFill(a.getThemeFill());d.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());d.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.set_selectedBorder(a.getSelectedInsetBorder());d.setBorderForState(Nb.DOWN(!1),a.getActiveFillBorder());d.set_minWidth(10);d.set_minHeight(10);c.set_backgroundSkin(d)}}))};
var ju=function(){};r["feathers.themes.steel.components.SteelPageNavigatorStyles"]=ju;ju.__name__="feathers.themes.steel.components.SteelPageNavigatorStyles";ju.initialize=function(a){a==null&&(a=Wb.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(sh,null)==null&&a.setStyleFunction(sh,null,function(b){b.set_pageIndicatorPosition(ja.BOTTOM);b.set_previousTransition((new Zi).setRight().build());b.set_nextTransition((new Zi).setLeft().build())}))};var Lt=function(){};
r["feathers.themes.steel.components.SteelPanelStyles"]=Lt;Lt.__name__="feathers.themes.steel.components.SteelPanelStyles";Lt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(yd,null)==null&&b.setStyleFunction(yd,null,function(c){var d=jc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new db,d.set_fill(a.getContainerFill()),d.set_border(kc.None),c.set_backgroundSkin(d));
c.get_scrollBarsCornerSkin()==null&&(d=new db,d.set_fill(a.getContainerFill()),d.set_border(kc.None),c.set_scrollBarsCornerSkin(d))}))};var Zm=function(){};r["feathers.themes.steel.components.SteelPopUpDatePickerStyles"]=Zm;Zm.__name__="feathers.themes.steel.components.SteelPopUpDatePickerStyles";Zm.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qb,Kd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Qb,Kd.CHILD_VARIANT_BUTTON,
function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ri;f.set_cornerRadiusPosition(ja.RIGHT);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());f.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Cc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);c.set_backgroundSkin(f)}c.get_icon()==null&&(f=new zd,Zm.drawIcon(f,a.textColor),c.set_icon(f),
c.getIconForState(Cc.DISABLED)==null&&(f=new zd,Zm.drawIcon(f,a.disabledTextColor),c.setIconForState(Cc.DISABLED,f)));d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.largePadding));c.set_gap(a.smallPadding)}),b.getStyleFunction(Wc,Kd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(Wc,
Kd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ri;f.set_cornerRadiusPosition(ja.LEFT);f.set_cornerRadius(3);f.set_drawBaseBorder(!1);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_disabledFill(a.getDisabledInsetFill());f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getDisabledInsetBorder());f.setBorderForState(re.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());
c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(Bb,Kd.CHILD_VARIANT_DATE_PICKER)==
null&&b.setStyleFunction(Bb,Kd.CHILD_VARIANT_DATE_PICKER,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());d.set_cornerRadius(4);c.set_backgroundSkin(d)}c.setPadding(a.mediumPadding);c.set_headerGap(a.xsmallPadding)}))};Zm.drawIcon=function(a,b){a.get_graphics().lineStyle(1,b);a.get_graphics().drawRect(.5,1.5,11,10);a.get_graphics().moveTo(3,.5);a.get_graphics().lineTo(3,1.5);a.get_graphics().moveTo(9,.5);a.get_graphics().lineTo(9,
1.5);a.get_graphics().lineStyle();a.get_graphics().beginFill(b);a.get_graphics().drawRect(1,2,11,2);a.get_graphics().drawRect(2,5,2,2);a.get_graphics().drawRect(5,5,2,2);a.get_graphics().drawRect(8,5,2,2);a.get_graphics().drawRect(2,8,2,2);a.get_graphics().drawRect(5,8,2,2);a.get_graphics().drawRect(8,8,2,2);a.get_graphics().endFill()};var ku=function(){};r["feathers.themes.steel.components.SteelPopUpListViewStyles"]=ku;ku.__name__="feathers.themes.steel.components.SteelPopUpListViewStyles";ku.initialize=
function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qd,null)==null&&b.setStyleFunction(Qd,null,function(c){jc.isDesktop()&&c.set_popUpAdapter(new Ek)}),b.getStyleFunction(Qb,Qd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Qb,Qd.CHILD_VARIANT_BUTTON,function(c){a.styleProvider.getStyleFunction(Qb,null)(c);c.set_horizontalAlign(Vb.LEFT);c.set_gap(1/0);c.set_minGap(a.mediumPadding);if(c.get_icon()==null){var d=new vf;d.set_pointPosition(ja.BOTTOM);
d.set_fill(Ab.SolidColor(a.textColor));d.set_disabledFill(Ab.SolidColor(a.disabledTextColor));d.set_width(8);d.set_height(4);c.set_icon(d)}c.set_iconPosition(ja.RIGHT)}),b.getStyleFunction(Fc,Qd.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Fc,Qd.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Fc,Fc.VARIANT_POP_UP)(c)}))};var lu=function(){};r["feathers.themes.steel.components.SteelRadioStyles"]=lu;lu.__name__="feathers.themes.steel.components.SteelRadioStyles";lu.initialize=
function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Yi,null)==null&&b.setStyleFunction(Yi,null,function(c){var d=jc.isDesktop();c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(Ab.SolidColor(0,0));f.set_border(kc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new pm;
c.set_icon(f);var g=new $i;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Nb.DOWN(!1),a.getSelectedInsetBorder());g.set_fill(a.getInsetFill());g.set_disabledFill(a.getDisabledInsetFill());f.set_defaultView(g);g=new $i;d?(g.set_width(16),g.set_height(16),g.set_minWidth(16),g.set_minHeight(16)):(g.set_width(20),
g.set_height(20),g.set_minWidth(20),g.set_minHeight(20));g.set_border(a.getSelectedInsetBorder());g.set_disabledBorder(a.getDisabledInsetBorder());g.setBorderForState(Nb.DOWN(!0),a.getSelectedInsetBorder());g.set_fill(a.getReversedActiveThemeFill());g.set_disabledFill(a.getDisabledInsetFill());var h=new zd;h.get_graphics().beginFill(a.textColor);d?h.get_graphics().drawCircle(8,8,3):h.get_graphics().drawCircle(10,10,4);h.get_graphics().endFill();g.addChild(h);f.set_selectedView(g);d=new $i;d.set_width(20);
d.set_height(20);d.set_minWidth(20);d.set_minHeight(20);d.set_border(a.getDisabledInsetBorder(2));d.set_fill(a.getDisabledInsetFill());g=new zd;g.get_graphics().beginFill(a.disabledTextColor);g.get_graphics().drawCircle(10,10,4);g.get_graphics().endFill();d.addChild(g);f.setViewForState(Nb.DISABLED(!0),d)}c.get_focusRectSkin()==null&&(f=new db,f.set_fill(Ab.None),f.set_border(a.getFocusBorder()),f.set_cornerRadius(3),c.set_focusRectSkin(f),c.set_focusPaddingTop(3),c.set_focusPaddingRight(3),c.set_focusPaddingBottom(3),
c.set_focusPaddingLeft(3));c.set_horizontalAlign(Vb.LEFT);c.set_gap(a.smallPadding)}))};var mu=function(){};r["feathers.themes.steel.components.SteelRouterNavigatorStyles"]=mu;mu.__name__="feathers.themes.steel.components.SteelRouterNavigatorStyles";mu.initialize=function(a){a==null&&(a=Wb.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(kn,null)==null&&a.setStyleFunction(kn,null,function(b){b.set_backTransition((new Zi).setRight().build());b.set_forwardTransition((new Zi).setLeft().build())}))};
var Kt=function(){};r["feathers.themes.steel.components.SteelScrollContainerStyles"]=Kt;Kt.__name__="feathers.themes.steel.components.SteelScrollContainerStyles";Kt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ze,null)==null&&b.setStyleFunction(Ze,null,function(c){var d=jc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new db,d.set_fill(a.getContainerFill()),
d.set_border(kc.None),c.set_backgroundSkin(d));c.get_scrollBarsCornerSkin()==null&&(d=new db,d.set_fill(a.getContainerFill()),d.set_border(kc.None),c.set_scrollBarsCornerSkin(d));c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),d.set_border(a.getFocusBorder()),c.set_focusRectSkin(d))}))};var Vv=function(){};r["feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles"]=Vv;Vv.__name__="feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles";Vv.initialize=function(a){if(a==
null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Gk,null)==null&&b.setStyleFunction(Gk,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getSubHeadingFill());f.set_border(kc.None);d?(f.set_width(22),f.set_height(22),f.set_minWidth(22),f.set_minHeight(22)):(f.set_width(44),f.set_height(44),f.set_minWidth(44),f.set_minHeight(44));c.set_backgroundSkin(f)}c.get_sortAscendingIcon()==null&&(d=new vf,
d.set_pointPosition(ja.TOP),d.set_fill(Ab.SolidColor(a.textColor)),d.set_disabledFill(Ab.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),c.set_sortAscendingIcon(d));c.get_sortDescendingIcon()==null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_fill(Ab.SolidColor(a.textColor)),d.set_disabledFill(Ab.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),c.set_sortDescendingIcon(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&
c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_secondaryTextFormat()==null&&c.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());c.get_disabledSecondaryTextFormat()==null&&c.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding);c.set_horizontalAlign(Vb.LEFT)}))};var nu=function(){};r["feathers.themes.steel.components.SteelStackNavigatorStyles"]=
nu;nu.__name__="feathers.themes.steel.components.SteelStackNavigatorStyles";nu.initialize=function(a){a==null&&(a=Wb.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(ln,null)==null&&a.setStyleFunction(ln,null,function(b){b.set_popTransition((new Zi).setRight().build());b.set_pushTransition((new Zi).setLeft().build())}))};var ou=function(){};r["feathers.themes.steel.components.SteelTabBarStyles"]=ou;ou.__name__="feathers.themes.steel.components.SteelTabBarStyles";
ou.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ye,null)==null&&b.setStyleFunction(ye,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_fill(a.getControlFill());f.set_disabledFill(a.getControlDisabledFill());f.set_border(kc.None);c.set_backgroundSkin(f)}c.get_focusRectSkin()==null&&(f=new db,f.set_fill(Ab.None),f.set_border(a.getFocusBorder()),c.set_focusRectSkin(f));
c.get_layout()==null&&(f=new Gh,d||f.set_horizontalAlign(Vb.CENTER),c.set_layout(f))}),b.getStyleFunction(Yc,ye.CHILD_VARIANT_TAB)==null&&b.setStyleFunction(Yc,ye.CHILD_VARIANT_TAB,function(c){var d=jc.isDesktop();c.get_backgroundSkin()==null&&(d?(d=new ri,d.set_cornerRadius(3),d.set_cornerRadiusPosition(ja.TOP),d.set_drawBaseBorder(!1),d.set_maxWidth(100),d.set_minWidth(20)):(d=new db,d.set_minWidth(44),d.set_minHeight(44)),d.set_fill(a.getButtonFill()),d.set_disabledFill(a.getButtonDisabledFill()),
d.set_selectedFill(a.getThemeFill()),d.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill()),d.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill()),d.set_border(a.getButtonBorder()),d.set_disabledBorder(a.getButtonDisabledBorder()),d.set_selectedBorder(a.getActiveFillBorder()),d.setBorderForState(Nb.DOWN(!1),a.getActiveFillBorder()),c.set_backgroundSkin(d));c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var pu=function(){};r["feathers.themes.steel.components.SteelTabNavigatorStyles"]=pu;pu.__name__="feathers.themes.steel.components.SteelTabNavigatorStyles";pu.initialize=function(a){a==null&&(a=Wb.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Tg,null)==null&&a.setStyleFunction(Tg,null,
function(b){var c=jc.isDesktop();b.set_tabBarPosition(c?ja.TOP:ja.BOTTOM);c||(b.set_previousTransition((new Zi).setRight().build()),b.set_nextTransition((new Zi).setLeft().build()))}))};var qu=function(){};r["feathers.themes.steel.components.SteelTextAreaStyles"]=qu;qu.__name__="feathers.themes.steel.components.SteelTextAreaStyles";qu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(df,null)==null&&b.setStyleFunction(df,
null,function(c){var d=jc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);if(c.get_backgroundSkin()==null){var f=new db;f.set_cornerRadius(3);d?(f.set_width(120),f.set_height(100)):(f.set_width(160),f.set_height(120));f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.setBorderForState(re.FOCUSED,a.getThemeBorder());f.setBorderForState(re.ERROR,a.getDangerBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);d?(c.set_textPaddingTop(a.smallPadding),c.set_textPaddingRight(a.mediumPadding),c.set_textPaddingBottom(a.smallPadding+1),c.set_textPaddingLeft(a.mediumPadding)):(c.set_textPaddingTop(a.mediumPadding),c.set_textPaddingRight(a.largePadding),
c.set_textPaddingBottom(a.mediumPadding+1),c.set_textPaddingLeft(a.largePadding))}),b.getStyleFunction(Qe,df.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Qe,df.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Qe,Qe.VARIANT_DANGER)(c)}))};var ru=function(){};r["feathers.themes.steel.components.SteelTextCalloutStyles"]=ru;ru.__name__="feathers.themes.steel.components.SteelTextCalloutStyles";ru.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof
wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Qe,null)==null&&b.setStyleFunction(Qe,null,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),
d.set_border(a.getContainerBorder()),d.set_width(10),d.set_height(6),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.RIGHT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(6),d.set_height(10),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(10),d.set_height(6),
c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getContainerFill()),d.set_border(a.getContainerBorder()),d.set_width(6),d.set_height(10),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);
c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}),b.getStyleFunction(Qe,Qe.VARIANT_DANGER)==null&&b.setStyleFunction(Qe,Qe.VARIANT_DANGER,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getDangerFill());
d.set_border(a.getDangerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.TOP),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(10),d.set_height(6),c.set_topArrowSkin(d));c.get_rightArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.RIGHT),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(6),d.set_height(10),c.set_rightArrowSkin(d));c.get_bottomArrowSkin()==
null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(10),d.set_height(6),c.set_bottomArrowSkin(d));c.get_leftArrowSkin()==null&&(d=new vf,d.set_pointPosition(ja.LEFT),d.set_drawBaseBorder(!1),d.set_fill(a.getDangerFill()),d.set_border(a.getDangerBorder()),d.set_width(6),d.set_height(10),c.set_leftArrowSkin(d));c.set_topArrowGap(-a.borderThickness);c.set_rightArrowGap(-a.borderThickness);c.set_bottomArrowGap(-a.borderThickness);
c.set_leftArrowGap(-a.borderThickness);c.set_paddingTop(a.borderThickness);c.set_paddingRight(a.borderThickness);c.set_paddingBottom(a.borderThickness);c.set_paddingLeft(a.borderThickness);c.set_marginTop(a.xlargePadding);c.set_marginRight(a.xlargePadding);c.set_marginBottom(a.xlargePadding);c.set_marginLeft(a.xlargePadding)}))};var su=function(){};r["feathers.themes.steel.components.SteelTextInputStyles"]=su;su.__name__="feathers.themes.steel.components.SteelTextInputStyles";su.initialize=function(a){if(a==
null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wc,null)==null&&b.setStyleFunction(Wc,null,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new db;f.set_cornerRadius(3);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.set_disabledFill(a.getDisabledInsetFill());f.setBorderForState(re.FOCUSED,a.getThemeBorder());f.setBorderForState(re.ERROR,a.getDangerBorder());c.set_backgroundSkin(f)}c.get_textFormat()==
null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.mediumPadding),c.set_paddingBottom(a.smallPadding),c.set_paddingLeft(a.mediumPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding),c.set_paddingLeft(a.largePadding))}),b.getStyleFunction(Wc,
Wc.VARIANT_SEARCH)==null&&b.setStyleFunction(Wc,Wc.VARIANT_SEARCH,function(c){var d=jc.isDesktop();if(c.get_backgroundSkin()==null){var f=new gr;f.set_capDirection(Xi.HORIZONTAL);d?f.set_width(120):f.set_width(160);f.set_fill(a.getInsetFill());f.set_border(a.getInsetBorder());f.set_disabledFill(a.getDisabledInsetFill());f.setBorderForState(re.FOCUSED,a.getThemeBorder());c.set_backgroundSkin(f)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());
c.get_promptTextFormat()==null&&c.set_promptTextFormat(a.getSecondaryTextFormat());d?(c.set_paddingTop(a.smallPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.smallPadding)):(c.set_paddingTop(a.mediumPadding),c.set_paddingRight(a.largePadding),c.set_paddingBottom(a.mediumPadding));c.set_paddingLeft(a.largePadding)}),b.getStyleFunction(Qe,Wc.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Qe,Wc.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Qe,Qe.VARIANT_DANGER)(c)}))};
var tu=function(){};r["feathers.themes.steel.components.SteelToggleButtonStyles"]=tu;tu.__name__="feathers.themes.steel.components.SteelToggleButtonStyles";tu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Yc,null)==null&&b.setStyleFunction(Yc,null,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.set_selectedFill(a.getThemeFill());
d.setFillForState(Nb.DOWN(!1),a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_selectedBorder(a.getSelectedBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.setBorderForState(Nb.DOWN(!1),a.getActiveFillBorder());d.setBorderForState(Nb.DOWN(!0),a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new db,d.set_fill(Ab.None),d.set_border(a.getFocusBorder()),d.set_cornerRadius(3),c.set_focusRectSkin(d));c.get_textFormat()==
null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat());c.set_paddingTop(a.smallPadding);c.set_paddingRight(a.largePadding);c.set_paddingBottom(a.smallPadding);c.set_paddingLeft(a.largePadding);c.set_gap(a.smallPadding)}))};var uu=function(){};r["feathers.themes.steel.components.SteelToggleSwitchStyles"]=uu;uu.__name__="feathers.themes.steel.components.SteelToggleSwitchStyles";uu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();
a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(uk,null)==null&&b.setStyleFunction(uk,null,function(c){var d=jc.isDesktop();if(c.get_trackSkin()==null){var f=new db;d?(f.set_width(48),f.set_height(24),f.set_minWidth(48),f.set_minHeight(24),f.set_cornerRadius(12)):(f.set_width(64),f.set_height(32),f.set_minWidth(64),f.set_minHeight(32),f.set_cornerRadius(16));f.set_border(a.getInsetBorder());f.set_disabledBorder(a.getInsetBorder());f.set_selectedBorder(a.getSelectedInsetBorder());
f.set_fill(a.getInsetFill());f.set_selectedFill(a.getReversedActiveThemeFill());f.set_disabledFill(a.getDisabledInsetFill());var g=new li;g.set_toggleable(!1);g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_trackSkin(g)}c.get_thumbSkin()==null&&(f=new $i,d?(f.set_width(24),f.set_height(24),f.set_minWidth(24),f.set_minHeight(24)):(f.set_width(32),f.set_height(32),f.set_minWidth(32),f.set_minHeight(32)),f.set_border(a.getBorder()),f.set_disabledBorder(a.getBorder()),f.set_fill(a.getButtonFill()),
f.set_disabledFill(a.getButtonDisabledFill()),g=new li,g.set_toggleable(!1),g.set_keepDownStateOnRollOut(!0),g.set_backgroundSkin(f),c.set_thumbSkin(g));c.get_focusRectSkin()==null&&(f=new db,f.set_fill(Ab.None),f.set_border(a.getFocusBorder()),d?f.set_cornerRadius(12):f.set_cornerRadius(16),c.set_focusRectSkin(f))}))};var vu=function(){};r["feathers.themes.steel.components.SteelToolTipStyles"]=vu;vu.__name__="feathers.themes.steel.components.SteelToolTipStyles";vu.initialize=function(a){if(a==null){var b=
Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(bc,Ik.CHILD_VARIANT_TOOL_TIP)==null&&b.setStyleFunction(bc,Ik.CHILD_VARIANT_TOOL_TIP,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_border(a.getBorder());d.set_fill(a.getContainerFill());d.set_cornerRadius(2);d.set_maxWidth(276);c.set_backgroundSkin(d)}c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledDetailTextFormat());
c.set_wordWrap(!0);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}))};var wu=function(){};r["feathers.themes.steel.components.SteelTreeGridViewStyles"]=wu;wu.__name__="feathers.themes.steel.components.SteelTreeGridViewStyles";wu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);
f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new db,g.set_fill(a.getThemeFill()),g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new db,g.set_fill(a.getSubHeadingFill()),g.set_border(kc.None),f.set_headerCornerSkin(g));
f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0);f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},d=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(kc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new db,g.set_fill(a.getThemeFill()),g.set_border(kc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new db,g.set_fill(a.getSubHeadingFill()),g.set_border(kc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));
f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(vc,null)==null&&b.setStyleFunction(vc,null,function(f){jc.isDesktop()?c(f):d(f)});b.getStyleFunction(vc,vc.VARIANT_BORDER)==null&&b.setStyleFunction(vc,vc.VARIANT_BORDER,c);b.getStyleFunction(vc,vc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(vc,vc.VARIANT_BORDERLESS,d);b.getStyleFunction(uf,vc.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(uf,vc.CHILD_VARIANT_CELL_RENDERER,function(f){var g=jc.isDesktop();
if(f.get_backgroundSkin()==null){var h=new db;h.set_fill(Ab.SolidColor(16711935,0));h.set_border(kc.None);g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}a.styleProvider.getStyleFunction(uf,null)(f)});b.getStyleFunction(Mc,vc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Mc,vc.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==
null){var h=new db;h.set_fill(a.getSubHeadingFill());h.set_border(kc.None);g?(h.set_width(22),h.set_height(22),h.set_minWidth(22),h.set_minHeight(22)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}f.get_textFormat()==null&&f.set_textFormat(a.getTextFormat());f.get_disabledTextFormat()==null&&f.set_disabledTextFormat(a.getDisabledTextFormat());f.get_secondaryTextFormat()==null&&f.set_secondaryTextFormat(a.getSecondaryDetailTextFormat());f.get_disabledSecondaryTextFormat()==
null&&f.set_disabledSecondaryTextFormat(a.getDisabledDetailTextFormat());f.set_paddingTop(a.smallPadding);f.set_paddingRight(a.largePadding);f.set_paddingBottom(a.smallPadding);f.set_paddingLeft(a.largePadding);f.set_gap(a.smallPadding);f.set_horizontalAlign(Vb.LEFT)});b.getStyleFunction(Qb,vc.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Qb,vc.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new cp;h.set_fill(Ab.SolidColor(16711935,0));
h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Cc.HOVER,a.getThemeBorder());g?(h.set_width(6),h.set_height(1),h.set_minWidth(6)):(h.set_width(10),h.set_height(1),h.set_minWidth(10));h.set_minHeight(1);f.set_backgroundSkin(h)}});b.getStyleFunction(Mf,null)==null&&b.setStyleFunction(Mf,null,function(f){var g=jc.isDesktop();if(f.get_backgroundSkin()==null){var h=new wl;h.set_fill(a.getContainerFill());h.set_border(a.getDividerBorder());h.set_selectedFill(a.getActiveThemeFill());h.setFillForState(Nb.DOWN(!1),
a.getActiveThemeFill());g?(h.set_width(26),h.set_height(26),h.set_minWidth(26),h.set_minHeight(26)):(h.set_width(44),h.set_height(44),h.set_minWidth(44),h.set_minHeight(44));f.set_backgroundSkin(h)}})}};var xu=function(){};r["feathers.themes.steel.components.SteelTreeViewStyles"]=xu;xu.__name__="feathers.themes.steel.components.SteelTreeViewStyles";xu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);
f.set_fixedScrollBars(g);f.get_layout()==null&&(g=new Mh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(a.getContainerBorder()),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_paddingTop(a.borderThickness);f.set_paddingRight(a.borderThickness);f.set_paddingBottom(a.borderThickness);f.set_paddingLeft(a.borderThickness)},
d=function(f){var g=jc.isDesktop();f.set_autoHideScrollBars(!g);f.set_fixedScrollBars(g);f.get_layout()==null&&f.set_layout(new Mh);f.get_backgroundSkin()==null&&(g=new db,g.set_fill(a.getContainerFill()),g.set_border(kc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new db,g.set_fill(Ab.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Vd,null)==null&&b.setStyleFunction(Vd,null,function(f){jc.isDesktop()?
c(f):d(f)});b.getStyleFunction(Vd,Vd.VARIANT_BORDER)==null&&b.setStyleFunction(Vd,Vd.VARIANT_BORDER,c);b.getStyleFunction(Vd,Vd.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Vd,Vd.VARIANT_BORDERLESS,d)}};var yu=function(){};r["feathers.themes.steel.components.SteelVDividedBoxStyles"]=yu;yu.__name__="feathers.themes.steel.components.SteelVDividedBoxStyles";yu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ml,null)==
null&&b.setStyleFunction(ml,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new db;d.set_fill(a.getThemeFill());d.set_border(kc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var zu=function(){};r["feathers.themes.steel.components.SteelVProgressBarStyles"]=zu;zu.__name__="feathers.themes.steel.components.SteelVProgressBarStyles";zu.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(fn,
null)==null&&b.setStyleFunction(fn,null,function(c){if(c.get_fillSkin()==null){var d=new db;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getControlDisabledFill());d.set_border(a.getActiveFillBorder());d.set_disabledBorder(a.getDisabledInsetBorder());d.set_cornerRadius(8);d.set_width(8);d.set_minHeight(8);c.set_fillSkin(d)}c.get_backgroundSkin()==null&&(d=new db,d.set_fill(a.getInsetFill()),d.set_disabledFill(a.getDisabledInsetFill()),d.set_border(a.getInsetBorder()),d.set_disabledBorder(a.getDisabledInsetBorder()),
d.set_cornerRadius(8),d.set_width(8),d.set_height(200),c.set_backgroundSkin(d))}))};var Jt=function(){};r["feathers.themes.steel.components.SteelVScrollBarStyles"]=Jt;Jt.__name__="feathers.themes.steel.components.SteelVScrollBarStyles";Jt.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Rg,null)==null&&b.setStyleFunction(Rg,null,function(c){var d=jc.isDesktop();if(c.get_thumbSkin()==null){var f=new db;f.set_fill(a.getScrollBarThumbFill());
f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(kc.None);var g=d?6:4;f.set_width(g);f.set_height(g);f.set_minWidth(g);f.set_minHeight(g);f.set_cornerRadius(g/2);g=new di;g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new db,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(kc.None),d.set_width(12),d.set_height(12),d.set_minWidth(12),d.set_minHeight(12),c.set_trackSkin(d));c.set_paddingTop(a.xsmallPadding);
c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Qb,Rg.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Qb,Rg.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(kc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==
null&&(d=new vf,d.set_pointPosition(ja.TOP),d.set_fill(Ab.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(Ab.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(8),d.set_height(4),c.set_icon(d));c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}),b.getStyleFunction(Qb,Rg.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Qb,Rg.CHILD_VARIANT_INCREMENT_BUTTON,
function(c){if(c.get_backgroundSkin()==null){var d=new db;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Cc.DOWN,a.getReversedActiveThemeFill());d.set_border(kc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new vf,d.set_pointPosition(ja.BOTTOM),d.set_fill(Ab.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(Ab.SolidColor(a.scrollBarThumbDisabledFillColor)),d.set_width(8),d.set_height(4),c.set_icon(d));
c.set_showText(!1);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding);c.set_gap(a.xsmallPadding)}))};var Au=function(){};r["feathers.themes.steel.components.SteelVSliderStyles"]=Au;Au.__name__="feathers.themes.steel.components.SteelVSliderStyles";Au.initialize=function(a){if(a==null){var b=Wb.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(gn,null)==null&&b.setStyleFunction(gn,
null,function(c){var d=jc.isDesktop();if(c.get_thumbSkin()==null){var f=new Qb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new $i;g.set_fill(a.getButtonFill());g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Cc.DOWN,a.getButtonDownFill());g.set_border(a.getButtonBorder());g.set_disabledBorder(a.getButtonDisabledBorder());d?(g.set_width(20),g.set_height(20)):(g.set_width(24),g.set_height(24));f.set_backgroundSkin(g);d=new $i;d.set_fill(Ab.None);d.set_border(a.getFocusBorder());
f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new ri,f.set_fill(a.getActiveThemeFill()),f.set_disabledFill(a.getControlDisabledFill()),f.set_border(a.getActiveFillBorder()),f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ja.BOTTOM),f.set_width(8),f.set_height(100),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new ri,f.set_fill(a.getInsetFill()),f.set_disabledFill(a.getDisabledInsetFill()),f.set_border(a.getInsetBorder()),
f.set_disabledBorder(a.getDisabledInsetBorder()),f.set_cornerRadius(8),f.set_cornerRadiusPosition(ja.TOP),f.set_width(8),f.set_height(100),c.set_secondaryTrackSkin(f)))}))};var jm={fromFunction:function(a){return Ec.withFunction(a)},fromClass:function(a){return Ec.withClass(a)},fromDisplayObject:function(a){return Ec.withDisplayObject(a)}},qi=function(){};r["feathers.utils.DPadFocusUtil"]=qi;qi.__name__="feathers.utils.DPadFocusUtil";qi.isBetterFocusForRelativePosition=function(a,b,c,d){var f=a.getBounds(a.stage);
a=qi.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d);if(a==Infinity)return!1;var g=qi.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),h=qi.calculateSecondaryAxisDistanceForRelativePosition(c,f,d),l=qi.itemsAreOnSameAxis(c,f,d),k=Infinity,q=Infinity,w=Infinity;f=!1;b!=null&&(f=b.getBounds(b.stage),k=qi.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d),q=qi.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),w=qi.calculateSecondaryAxisDistanceForRelativePosition(c,
f,d),f=qi.itemsAreOnSameAxis(c,f,d));if(l&&f)return a>0?a<k:!1;b=d==ja.TOP||d==ja.BOTTOM;if(l)if(b){if(a>0&&a<q)return!0}else return!0;else if(f)if(b){if(k>0&&k<g)return!1}else return!1;return 13*a*a+h*h<13*k*k+w*w};qi.calculateSecondaryAxisDistanceForRelativePosition=function(a,b,c){return c==ja.TOP||c==ja.BOTTOM?Math.abs(a.x+a.width/2-(b.x+b.width/2)):Math.abs(a.y+a.height/2-(b.y+b.height/2))};qi.calculateMaxPrimaryAxisDistanceForRelativePosition=function(a,b,c){switch(c._hx_index){case 0:if(a.get_bottom()>
b.get_bottom()||a.y>=b.get_bottom())if(a=a.get_bottom()-b.y,a>0)return a;break;case 1:if(a.x<b.x||a.get_right()<=b.x)if(a=b.get_right()-a.x,a>0)return a;break;case 2:if(a.y<b.y||a.get_bottom()<=b.y)if(a=b.get_bottom()-a.y,a>0)return a;break;case 3:if(a.get_right()>b.get_right()||a.x>=b.get_right())if(a=a.get_right()-b.x,a>0)return a}return Infinity};qi.calculateMinPrimaryAxisDistanceForRelativePosition=function(a,b,c){switch(c._hx_index){case 0:if(a.get_bottom()>b.get_bottom()||a.y>=b.get_bottom())if(a=
a.get_bottom()-b.get_bottom(),a>0)return a;break;case 1:if(a.x<b.x||a.get_right()<=b.x)if(a=b.x-a.x,a>0)return a;break;case 2:if(a.y<b.y||a.get_bottom()<=b.y)if(a=b.y-a.y,a>0)return a;break;case 3:if(a.get_right()>b.get_right()||a.x>=b.get_right())if(a=a.get_right()-b.get_right(),a>0)return a}return Infinity};qi.itemsAreOnSameAxis=function(a,b,c){return c==ja.TOP||c==ja.BOTTOM?a.x<=b.get_right()?b.x<=a.get_right():!1:a.y<=b.get_bottom()?b.y<=a.get_bottom():!1};var Fk=function(){};r["feathers.utils.DateUtil"]=
Fk;Fk.__name__="feathers.utils.DateUtil";Fk.getDaysInMonth=function(a,b){return a==1&&b!=null&&Fk.isLeapYear(b)?Fk.FEBRUARY_NUMBER_OF_DAYS_LEAP_YEAR:Fk.MONTH_NUMBER_OF_DAYS[a]};Fk.isLeapYear=function(a){return a%100==0?a%400==0:a%4==0};var jc=function(){};r["feathers.utils.DeviceUtil"]=jc;jc.__name__="feathers.utils.DeviceUtil";jc.isDesktop=function(){return u.__cast(sa,Window).matchMedia(jc.MEDIA_QUERY_DESKTOP).matches};jc.isMobile=function(){return u.__cast(sa,Window).matchMedia(jc.MEDIA_QUERY_MOBILE).matches};
var He=function(){};r["feathers.utils.DisplayObjectRecycler"]=He;He.__name__="feathers.utils.DisplayObjectRecycler";He.withClass=function(a,b,c,d){d==null&&(d=function(g){u.__implements(g,jb)&&g.dispose()});var f=new He;f.create=function(){return Aa.createInstance(a,[])};f.update=b;f.reset=c;f.destroy=d;return f};He.withFunction=function(a,b,c,d){var f=new He;f.create=a;f.update=b;f.reset=c;f.destroy=d;return f};He.withFactory=function(a,b,c){var d=new He;d.create=m(a,a.create);d.update=b;d.reset=
c;d.destroy=m(a,a.destroy);return d};He.__super__=Ec;He.prototype=I(Ec.prototype,{update:function(a,b){},reset:function(a,b){},__class__:He});var Qg=function(){};r["feathers.utils.DisplayUtil"]=Qg;Qg.__name__="feathers.utils.DisplayUtil";Qg.getDisplayObjectDepthFromStage=function(a){if(a.stage==null)return-1;for(var b=0;a.parent!=null;)a=a.parent,++b;return b};Qg.getConcatenatedScaleX=function(a){if(a==null)throw new rb("getConcatenatedScaleX target must not be null");var b=1;do b/=a.get_scaleX(),
a=a.parent;while(a!=null&&a!=a.stage);return b};Qg.getConcatenatedScaleY=function(a){if(a==null)throw new rb("getConcatenatedScaleY target must not be null");var b=1;do b/=a.get_scaleY(),a=a.parent;while(a!=null&&a!=a.stage);return b};Qg.getConcatenatedScale=function(a,b){if(a==null)throw new rb("getConcatenatedScale target must not be null");var c=1,d=1;do c/=a.get_scaleX(),d/=a.get_scaleY(),a=a.parent;while(a!=null&&a!=a.stage);if(b==null)return new Qa(c,d);b.setTo(c,d);return b};var fg=function(a,
b,c){b==null&&(b=ja.LEFT);this._animatePull=null;this._savedTouchMoves=[];this._startTouch=this._startPullDistance=this._targetPullDistance=0;this._touchPointIsSimulated=this._restoreMouseChildren=!1;this._touchPointID=null;this._snapDuration=.5;this._opened=!1;this._pendingOpened=null;this._pullableEdge=ja.LEFT;this._activeBorderSize=null;this._pullDistance=0;this._maxPullDistance=null;this.simulateTouch=!1;this.ease=lh.easeOut;this.minDragDistance=6;this._active=this._dragging=!1;this.enabled=!0;
na.call(this);this.set_target(a);this.set_pullableEdge(b);this.set_maxPullDistance(c)};r["feathers.utils.EdgePuller"]=fg;fg.__name__="feathers.utils.EdgePuller";fg.__super__=na;fg.prototype=I(na.prototype,{enabled:null,_active:null,get_active:function(){return this._active},_dragging:null,get_dragging:function(){return this._dragging},minDragDistance:null,ease:null,simulateTouch:null,_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;
this._target!=null&&(this.cleanupAfterDrag(),this._target.removeEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownHandler)),this._target.removeEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownCaptureHandler),!0),this._target.removeEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginHandler)),this._target.removeEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginCaptureHandler),!0),this._target.removeEventListener("addedToStage",m(this,this.edgePuller_target_addedToStageHandler)),
this._target.removeEventListener("removedFromStage",m(this,this.edgePuller_target_removedFromStageHandler)),this.removeStageEvents());this._target=a;this._target!=null&&(this._target.addEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("mouseDown",m(this,this.edgePuller_target_mouseDownCaptureHandler),!0,0,!0),this._target.addEventListener("touchBegin",m(this,this.edgePuller_target_touchBeginHandler),!1,0,!0),this._target.addEventListener("touchBegin",
m(this,this.edgePuller_target_touchBeginCaptureHandler),!0,0,!0),this._target.addEventListener("addedToStage",m(this,this.edgePuller_target_addedToStageHandler),!1,0,!0),this._target.addEventListener("removedFromStage",m(this,this.edgePuller_target_removedFromStageHandler),!1,0,!0),this.addStageEvents());return this._target},_maxPullDistance:null,get_maxPullDistance:function(){return this._maxPullDistance},set_maxPullDistance:function(a){return this._maxPullDistance==a?this._maxPullDistance:this._maxPullDistance=
a},_pullDistance:null,get_pullDistance:function(){return this._pullDistance},_activeBorderSize:null,get_activeBorderSize:function(){return this._activeBorderSize},set_activeBorderSize:function(a){return this._activeBorderSize==a?this._activeBorderSize:this._activeBorderSize=a},_pullableEdge:null,get_pullableEdge:function(){return this._pullableEdge},set_pullableEdge:function(a){return this._pullableEdge==a?this._pullableEdge:this._pullableEdge=a},_pendingOpened:null,_opened:null,get_opened:function(){return this._pendingOpened!=
null?this._pendingOpened:this._opened},set_opened:function(a){if(this._pendingOpened!=null){if(this._pendingOpened==a)return this._pendingOpened}else if(this._opened==a)return this._opened;(this._pendingOpened=a)?this.throwTo(this.getMaxPullDistance()):this.throwTo(0);return this._pendingOpened},_snapDuration:null,get_snapDuration:function(){return this._snapDuration},set_snapDuration:function(a){return this._snapDuration==a?this._snapDuration:this._snapDuration=a},_touchPointID:null,get_touchPointID:function(){return this._touchPointID},
_touchPointIsSimulated:null,get_touchPointIsSimulated:function(){return this._touchPointIsSimulated},_restoreMouseChildren:null,_startTouch:null,_startPullDistance:null,_targetPullDistance:null,_savedTouchMoves:null,_animatePull:null,setOpened:function(a){this._pendingOpened=null;if(this._opened==a)return this._opened;(this._opened=a)?W.dispatch(this,"open"):W.dispatch(this,"close");return this._opened},setPullDistance:function(a){if(this._pullDistance==a)return this._pullDistance;this._pullDistance=
a;W.dispatch(this,"change");return this._pullDistance},getMaxPullDistance:function(){if(this._maxPullDistance!=null)return this._maxPullDistance;switch(this._pullableEdge._hx_index){case 0:return this._target.get_height();case 1:return this._target.get_width();case 2:return this._target.get_height();case 3:return this._target.get_width();default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},getTouchPosition:function(a,b){switch(this._pullableEdge._hx_index){case 0:return b;
case 1:return a;case 2:return b;case 3:return a;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},getTouchScale:function(){switch(this._pullableEdge._hx_index){case 0:return Qg.getConcatenatedScaleY(this._target);case 1:return Qg.getConcatenatedScaleX(this._target);case 2:return Qg.getConcatenatedScaleY(this._target);case 3:return Qg.getConcatenatedScaleX(this._target);default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},isInActiveBorder:function(a,
b,c){a=new Qa(a,b);a=this._target.globalToLocal(a);switch(this._pullableEdge._hx_index){case 0:return a.y>=0?a.y<c:!1;case 1:return a.x>=this._target.get_width()-c?a.x<this._target.get_width():!1;case 2:return a.y>=this._target.get_height()-c?a.y<this._target.get_height():!1;case 3:return a.x>=0?a.x<c:!1;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},checkMinDrag:function(a){if(this._opened)switch(this._pullableEdge._hx_index){case 0:return a<-this.minDragDistance;
case 1:return a>this.minDragDistance;case 2:return a>this.minDragDistance;case 3:return a<-this.minDragDistance;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}switch(this._pullableEdge._hx_index){case 0:return a>this.minDragDistance;case 1:return a<-this.minDragDistance;case 2:return a<-this.minDragDistance;case 3:return a>this.minDragDistance;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}},touchBegin:function(a,b,c,
d){if(this.enabled&&(!b||this.simulateTouch)&&this._touchPointID==null&&(this._opened||this._activeBorderSize==null||this.isInActiveBorder(c,d,this._activeBorderSize))){this._animatePull!=null&&(ua.stop(this._animatePull,null,!1,!1),this._animatePull=null);this._target.stage.addEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler),!1,0,!0);this._target.stage.addEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler),!1,0,!0);this._target.stage.addEventListener("touchMove",
m(this,this.edgePuller_target_stage_touchMoveHandler),!1,0,!0);this._target.stage.addEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler),!1,0,!0);if(this._target instanceof lb){var f=this._target;this._active&&(f.mouseChildren=!1)}this._pendingOpened=null;this._touchPointID=a;this._touchPointIsSimulated=b;this._startTouch=this.getTouchPosition(c,d);this._startPullDistance=this._pullDistance;this._savedTouchMoves.length=0}},touchMove:function(a,b,c,d){this._touchPointID!=
null&&this._touchPointID==a&&this._touchPointIsSimulated==b&&(b=this.getTouchPosition(c,d),a=b-this._startTouch,c=this.getTouchScale(),a*=c,!this._dragging&&this.enabled&&this.checkMinDrag(a)&&(this._startTouch=b,a=0,this._dragging=this.startPull()),this._dragging&&(b=this.getMaxPullDistance(),c=this._startPullDistance,c=this._pullableEdge==ja.RIGHT||this._pullableEdge==ja.BOTTOM?c-a:c+a,c<0?c=0:c>b&&(c=b),this.setPullDistance(c),this._savedTouchMoves.length>60&&(this._savedTouchMoves.length=30),
this._savedTouchMoves.push(c),this._savedTouchMoves.push(Oa.getTimer())))},touchEnd:function(a,b){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b&&(this.cleanupAfterDrag(),this._dragging)){for(var c=Oa.getTimer()-100,d=b=a=this._savedTouchMoves.length-1;a>0&&this._savedTouchMoves[d]>c;)b=d,d-=2;c=0;this._dragging&&b!=a&&(c=(this._pullDistance-this._savedTouchMoves[b-1])/(this._savedTouchMoves[a]-this._savedTouchMoves[b]));c!=0||this._dragging?this.throwWithVelocity(c):
this.completeDrag()}},startPull:function(){if(this._active)return!0;this._active=!0;if(this._opened?!W.dispatch(this,"closing",!1,!0):!W.dispatch(this,"opening",!1,!0))return this._dragging=this._active=!1,this.cleanupAfterDrag(),!1;if(this._target instanceof lb){var a=this._target;this._restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}W.dispatch(this,"change");return!0},completeDrag:function(){this._dragging=!1;this.completePull()},completePull:function(){if(this._active&&!this._dragging&&
this._animatePull==null){this._active=!1;this._target instanceof lb&&(this._target.mouseChildren=this._restoreMouseChildren);var a=this._opened,b=this._pullDistance!=0;this.setOpened(b);b==a&&W.dispatch(this,"cancel")}},addStageEvents:function(){this._target!=null&&this._target.stage!=null&&(this._target.stage.addEventListener("touchBegin",m(this,this.edgePuller_target_stage_touchBeginHandler),!1,0,!0),this._target.stage.addEventListener("mouseDown",m(this,this.edgePuller_target_stage_mouseDownHandler),
!1,0,!0))},removeStageEvents:function(){this._target!=null&&this._target.stage!=null&&(this._target.stage.removeEventListener("touchBegin",m(this,this.edgePuller_target_stage_touchBeginHandler)),this._target.stage.removeEventListener("mouseDown",m(this,this.edgePuller_target_stage_mouseDownHandler)))},cleanupAfterDrag:function(){this._touchPointID!=null&&(this._touchPointID=null,this._touchPointIsSimulated=!1,this._target.stage!=null&&(this._target.stage.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler)),
this._target.stage.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler)),this._target.stage.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler)),this._target.stage.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler))))},throwWithVelocity:function(a){var b=this.getMaxPullDistance();this.throwTo(Math.abs(a)<=fg.MINIMUM_VELOCITY?this._pullDistance<b/2?0:b:a<0?0:b)},throwTo:function(a){var b=this;a!=null&&(this._animatePull!=
null&&(ua.stop(this._animatePull,null,!1,!1),this._animatePull=null),this._pullDistance!=a?this.startPull()&&(this._startPullDistance=this._pullDistance,this._targetPullDistance=a,this._snapDuration>0?(this._animatePull=ua.update(function(c){return b.setPullDistance(c)},this._snapDuration,[this._startPullDistance],[this._targetPullDistance],!0),this._animatePull.ease(this.ease),this._animatePull.onComplete(m(this,this.animatePull_onComplete))):(this.setPullDistance(this._targetPullDistance),this.completeDrag())):
this.completeDrag())},animatePull_onComplete:function(){this._animatePull=null;this.completeDrag()},edgePuller_target_addedToStageHandler:function(a){this.addStageEvents()},edgePuller_target_removedFromStageHandler:function(a){this.removeStageEvents();this.cleanupAfterDrag()},edgePuller_target_touchBeginCaptureHandler:function(a){this._active&&(a.stopImmediatePropagation(),this.edgePuller_target_touchBeginHandler(a))},edgePuller_target_touchBeginHandler:function(a){this.simulateTouch&&a.isPrimaryTouchPoint||
this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)},edgePuller_target_mouseDownCaptureHandler:function(a){this._active&&(a.stopImmediatePropagation(),this.edgePuller_target_mouseDownHandler(a))},edgePuller_target_mouseDownHandler:function(a){this._opened||(a=this._target.stage,a!=null&&this.touchBegin(fg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY()))},edgePuller_target_stage_touchMoveHandler:function(a){this.touchMove(a.touchPointID,!1,a.stageX,a.stageY)},edgePuller_target_stage_mouseMoveHandler:function(a){a=
u.__cast(a.currentTarget,cd);this.touchMove(fg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},edgePuller_target_stage_touchEndHandler:function(a){this.touchEnd(a.touchPointID,!1)},edgePuller_target_stage_mouseUpHandler:function(a){this.touchEnd(fg.POINTER_ID_MOUSE,!0)},edgePuller_target_stage_touchBeginHandler:function(a){if(this._opened&&this.enabled&&this._touchPointID==null){var b=u.__cast(a.currentTarget,cd),c=this.getMaxPullDistance();this.isInActiveBorder(a.stageX,a.stageY,c)?this.touchBegin(a.touchPointID,
!1,a.stageX,a.stageY):(this._touchPointID=a.touchPointID,b.addEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2),!1,0,!0),b.addEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2),!1,0,!0))}},edgePuller_target_stage_touchMoveHandler2:function(a){if(this._touchPointID!=null&&a.touchPointID==this._touchPointID){var b=u.__cast(a.currentTarget,cd),c=this.getMaxPullDistance(),d=new Qa(a.stageX,a.stageY);d=this._target.globalToLocal(d);switch(this._pullableEdge._hx_index){case 0:if(d.y>
c||d.y<0)return;break;case 1:if(d.x<this._target.get_width()-c||d.x>this._target.get_width())return;break;case 2:if(d.y<this._target.get_height()-c||d.y>this._target.get_height())return;break;case 3:if(d.x>c||d.x<0)return;break;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}b.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2));b.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2));this._touchPointID=
null;this._touchPointIsSimulated=!1;this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)}},edgePuller_target_stage_touchEndHandler2:function(a){this._touchPointID!=null&&a.touchPointID==this._touchPointID&&(a=u.__cast(a.currentTarget,cd),a.removeEventListener("touchMove",m(this,this.edgePuller_target_stage_touchMoveHandler2)),a.removeEventListener("touchEnd",m(this,this.edgePuller_target_stage_touchEndHandler2)),this._touchPointID=null,this._touchPointIsSimulated=!1)},edgePuller_target_stage_mouseDownHandler:function(a){if(this._opened&&
this.enabled&&this._touchPointID==null&&this.simulateTouch){a=u.__cast(a.currentTarget,cd);var b=this.getMaxPullDistance();this.isInActiveBorder(a.get_mouseX(),a.get_mouseY(),b)?this.touchBegin(fg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY()):(this._touchPointID=fg.POINTER_ID_MOUSE,this._touchPointIsSimulated=!0,a.addEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2),!1,0,!0),a.addEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2),!1,0,
!0))}},edgePuller_target_stage_mouseMoveHandler2:function(a){if(this._touchPointIsSimulated&&this._touchPointID!=null&&fg.POINTER_ID_MOUSE==this._touchPointID){a=u.__cast(a.currentTarget,cd);var b=this.getMaxPullDistance(),c=new Qa(a.get_mouseX(),a.get_mouseY());c=this._target.globalToLocal(c);switch(this._pullableEdge._hx_index){case 0:if(c.y>b||c.y<0)return;break;case 1:if(c.x<this._target.get_width()-b||c.x>this._target.get_width())return;break;case 2:if(c.y<this._target.get_height()-b||c.y>this._target.get_height())return;
break;case 3:if(c.x>b||c.x<0)return;break;default:throw new rb("Unknown pullable edge position: "+L.string(this._pullableEdge));}a.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2));a.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2));this._touchPointID=null;this._touchPointIsSimulated=!1;this.touchBegin(fg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())}},edgePuller_target_stage_mouseUpHandler2:function(a){this._touchPointIsSimulated&&
this._touchPointID!=null&&fg.POINTER_ID_MOUSE==this._touchPointID&&(a=u.__cast(a.currentTarget,cd),a.removeEventListener("mouseMove",m(this,this.edgePuller_target_stage_mouseMoveHandler2)),a.removeEventListener("mouseUp",m(this,this.edgePuller_target_stage_mouseUpHandler2)),this._touchPointID=null,this._touchPointIsSimulated=!1)},__class__:fg,__properties__:{get_touchPointIsSimulated:"get_touchPointIsSimulated",get_touchPointID:"get_touchPointID",set_snapDuration:"set_snapDuration",get_snapDuration:"get_snapDuration",
set_opened:"set_opened",get_opened:"get_opened",set_pullableEdge:"set_pullableEdge",get_pullableEdge:"get_pullableEdge",set_activeBorderSize:"set_activeBorderSize",get_activeBorderSize:"get_activeBorderSize",get_pullDistance:"get_pullDistance",set_maxPullDistance:"set_maxPullDistance",get_maxPullDistance:"get_maxPullDistance",set_target:"set_target",get_target:"get_target",get_dragging:"get_dragging",get_active:"get_active"}});var Ad=function(a){this._touchClaims=new we;this._mouseClaim=null;this._stageListenerCount=
0;if(a==null)throw new rb("Stage cannot be null.");this._stage=a};r["feathers.utils.ExclusivePointer"]=Ad;Ad.__name__="feathers.utils.ExclusivePointer";Ad.forStage=function(a){if(a==null)throw new rb("Stage cannot be null.");var b=Ad.stageToObject.h[a.__id__];if(b!=null)return b;b=new Ad(a);Ad.stageToObject.set(a,b);return b};Ad.disposeForStage=function(a){var b=Ad.stageToObject.h[a.__id__];b!=null&&(b.dispose(),Ad.stageToObject.remove(a))};Ad.prototype={_stageListenerCount:null,_stage:null,_mouseClaim:null,
_touchClaims:null,claimTouch:function(a,b){if(b==null)throw new rb("Target cannot be null.");if(b.stage!=this._stage)throw new rb("Target cannot claim a pointer on the selected stage because it appears on a different stage.");if(this._touchClaims.h[a]!=null)return!1;this._touchClaims.h[a]=b;b.addEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler),!1,0,!0);this._stageListenerCount==0&&(this._stage.addEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler),
!1,0,!0),this._stage.addEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler),!1,0,!0));this._stageListenerCount++;return!0},claimMouse:function(a){if(a==null)throw new rb("Target cannot be null.");if(a.stage!=this._stage)throw new rb("Target cannot claim a pointer on the selected stage because it appears on a different stage.");if(this._mouseClaim!=null)return!1;this._mouseClaim=a;a.addEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler),
!1,0,!0);this._stageListenerCount==0&&(this._stage.addEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler),!1,0,!0),this._stage.addEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler),!1,0,!0));this._stageListenerCount++;return!0},removeTouchClaim:function(a){var b=this._touchClaims.h[a];b!=null&&(this._touchClaims.remove(a),this.hasClaimOn(b)||b.removeEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler)),this._stageListenerCount--,
this._stageListenerCount==0&&(this._stage.removeEventListener("mouseUp",m(this,this.exclusivePointer_stage_mouseUpHandler)),this._stage.removeEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler))))},removeMouseClaim:function(){var a=this._mouseClaim;a!=null&&(this._mouseClaim=null,this.hasClaimOn(a)||a.removeEventListener("removedFromStage",m(this,this.exclusivePointer_target_removedFromStageHandler)),this._stageListenerCount--,this._stageListenerCount==0&&(this._stage.removeEventListener("mouseUp",
m(this,this.exclusivePointer_stage_mouseUpHandler)),this._stage.removeEventListener("touchEnd",m(this,this.exclusivePointer_stage_touchEndHandler))))},hasClaim:function(){if(this._mouseClaim!=null)return!0;for(var a=this._touchClaims.keys();a.hasNext();)return a.next(),!0;return!1},getTouchClaim:function(a){return this._touchClaims.h[a]},getMouseClaim:function(){return this._mouseClaim},removeAllClaims:function(){for(var a=this._touchClaims.keys();a.hasNext();){var b=a.next();this.removeTouchClaim(b)}this.removeMouseClaim()},
dispose:function(){this.removeAllClaims()},hasClaimOn:function(a){if(this._mouseClaim==a)return!0;for(var b=this._touchClaims,c=b.keys();c.hasNext();){var d=c.next();if(b.get(d)==a)return!0}return!1},exclusivePointer_target_removedFromStageHandler:function(a){a=u.__cast(a.currentTarget,ea);this._mouseClaim==a&&this.removeMouseClaim();for(var b=this._touchClaims,c=b.keys();c.hasNext();){var d=c.next(),f=b.get(d);f==a&&this.removeTouchClaim(d)}},exclusivePointer_stage_mouseUpHandler:function(a){this.removeMouseClaim()},
exclusivePointer_stage_touchEndHandler:function(a){this.removeTouchClaim(a.touchPointID)},__class__:Ad};var on=function(){};r["feathers.utils.FocusUtil"]=on;on.__name__="feathers.utils.FocusUtil";on.findAllFocusableObjects=function(a,b){b==null&&(b=[]);u.__implements(a,ld)&&a.get_focusEnabled()&&b.push(a);if(u.__implements(a,ei)){var c=a.get_focusExtrasBefore();if(c!=null)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];on.findAllFocusableObjects(g,b)}}if(u.__implements(a,ld)){if(u.__implements(a,dg)&&
a.get_childFocusEnabled())for(c=u.__cast(a,lb),d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),on.findAllFocusableObjects(g,b)}else if(a instanceof lb)for(c=a,d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),on.findAllFocusableObjects(g,b);if(u.__implements(a,ei)&&(c=a.get_focusExtrasAfter(),c!=null))for(d=0,f=c.length;d<f;)g=d++,g=c[g],on.findAllFocusableObjects(g,b);return b};var Wm=function(a,b,c,d){this._downKeyCode=null;this._enabled=!0;this._target=this._callback=this._upState=
this._downState=null;this.set_target(a);c!=null&&(this._upState=c);d!=null&&this.set_downState(d);this._currentState=this._upState;this.set_callback(b)};r["feathers.utils.KeyToState"]=Wm;Wm.__name__="feathers.utils.KeyToState";Wm.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this._target.removeEventListener("removedFromStage",m(this,this.keyToState_target_removedFromStageHandler)),this._target.removeEventListener("focusOut",
m(this,this.keyToState_target_focusOutHandler)),this._target.removeEventListener("keyDown",m(this,this.keyToState_target_keyDownHandler)),this._target.removeEventListener("keyUp",m(this,this.keyToState_target_keyUpHandler)));this._target=a;this._target!=null&&(this._currentState=this._upState,this._target.addEventListener("removedFromStage",m(this,this.keyToState_target_removedFromStageHandler)),this._target.addEventListener("focusOut",m(this,this.keyToState_target_focusOutHandler)),this._target.addEventListener("keyDown",
m(this,this.keyToState_target_keyDownHandler)),this._target.addEventListener("keyUp",m(this,this.keyToState_target_keyUpHandler)));return this._target},_callback:null,get_callback:function(){return this._callback},set_callback:function(a){if(this._callback==a)return this._callback;this._callback=a;this._callback!=null&&this._callback(this._currentState);return this._callback},_currentState:null,get_currentState:function(){return this._currentState},_upState:null,get_upState:function(){return this._upState},
set_upState:function(a){return this._upState=a},_downState:null,get_downState:function(){return this._downState},set_downState:function(a){return this._downState=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){if(this._enabled==a)return this._enabled;(this._enabled=a)||this.resetKeyState();return this._enabled},_downKeyCode:null,changeState:function(a){var b=this._currentState;u.__implements(this._target,mh)&&(b=this._target.get_currentState());this._currentState=
a;b!=a&&this._callback!=null&&this._callback(a)},resetKeyState:function(){this._downKeyCode!=null&&(this._downKeyCode=null,this.changeState(this._upState))},keyToState_target_removedFromStageHandler:function(a){this.resetKeyState()},keyToState_target_focusOutHandler:function(a){this.resetKeyState()},keyToState_target_keyDownHandler:function(a){if(u.__implements(this._target,ld)){var b=this._target,c=b.get_focusManager();if(c!=null&&c.get_focus()!=b)return}!this._enabled||this._downKeyCode!=null||
a.keyCode!=32&&a.keyCode!=13||(this._downKeyCode=a.keyCode,this.changeState(this._downState))},keyToState_target_keyUpHandler:function(a){a.keyCode==this._downKeyCode&&this.resetKeyState()},__class__:Wm,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled",set_downState:"set_downState",get_downState:"get_downState",set_upState:"set_upState",get_upState:"get_upState",get_currentState:"get_currentState",set_callback:"set_callback",get_callback:"get_callback",set_target:"set_target",get_target:"get_target"}};
var ff=function(){};r["feathers.utils.MathUtil"]=ff;ff.__name__="feathers.utils.MathUtil";ff.roundDownToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.floor(ff.roundToPrecision(a/b,10))*b};ff.roundUpToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.ceil(ff.roundToPrecision(a/b,10))*b};ff.roundToNearest=function(a,b){b==null&&(b=1);return b==0?a:Math.round(ff.roundToPrecision(a/b,10))*b};ff.roundToPrecision=function(a,b){b==null&&(b=0);b=Math.pow(10,b);return Math.round(b*a)/b};ff.fuzzyEquals=
function(a,b,c){c==null&&(c=1E-6);return Math.abs(a-b)<=c};var Ne=function(){};r["feathers.utils.MeasurementsUtil"]=Ne;Ne.__name__="feathers.utils.MeasurementsUtil";Ne.resetFluidlyWithParentValues=function(a,b,c,d,f,g,h,l){if(b!=null)if(u.__implements(b,Kb)){c==null&&(c=a.width);c==null?b.resetWidth():b.set_width(c);d==null&&(d=a.height);d==null?b.resetHeight():b.set_height(d);a=f;if(a==null||b.get_explicitMinWidth()!=null&&b.get_explicitMinWidth()>a)a=b.get_explicitMinWidth();a==null&&(a=0);b.set_minWidth(a);
if(g==null||b.get_explicitMinHeight()!=null&&b.get_explicitMinHeight()>g)g=b.get_explicitMinHeight();g==null&&(g=0);b.set_minHeight(g);if(h==null||b.get_explicitMaxWidth()!=null&&b.get_explicitMaxWidth()<h)h=b.get_explicitMaxWidth();h==null&&(h=1/0);b.set_maxWidth(h);if(l==null||b.get_explicitMaxHeight()!=null&&b.get_explicitMaxHeight()<l)l=b.get_explicitMaxHeight();l==null&&(l=1/0);b.set_maxHeight(l)}else c!=null?b.set_width(c):a.width!=null&&b.set_width(a.width),d!=null?b.set_height(d):a.height!=
null&&b.set_height(a.height)};Ne.resetFluidlyWithParent=function(a,b,c){Ne.resetFluidlyWithParentValues(a,b,c.get_explicitWidth(),c.get_explicitHeight(),c.get_explicitMinWidth(),c.get_explicitMinHeight(),c.get_explicitMaxWidth(),c.get_explicitMaxHeight())};var ir=O["feathers.utils._Path2EReg.Token"]={__ename__:"feathers.utils._Path2EReg.Token",__constructs__:null,Static:(G=function(a){return{_hx_index:0,token:a,__enum__:"feathers.utils._Path2EReg.Token",toString:D}},G._hx_name="Static",G.__params__=
["token"],G),Capture:(G=function(a){return{_hx_index:1,key:a,__enum__:"feathers.utils._Path2EReg.Token",toString:D}},G._hx_name="Capture",G.__params__=["key"],G)};ir.__constructs__=[ir.Static,ir.Capture];var th=function(){};r["feathers.utils.Path2EReg"]=th;th.__name__="feathers.utils.Path2EReg";th.parse=function(a){var b=new sb("(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))","g"),c=[],d=0,f=0,g="",h=function(l){try{return b.matched(l)}catch(k){return Rb.lastError=
k,null}};b.map(a,function(l){var k=h(0),q=h(1);l=l.matchedPos().pos;g+=a.substring(f,l);f=l+k.length;if(q!=null)return g+=q.charAt(1),"";k=a.charAt(f);q=h(2);var w=h(3);l=h(4);var v=h(5),z=h(6),n=h(7),E=q==null?"/":q;g!=""&&(c.push(ir.Static(g)),g="");w==null&&(d+=1,w=""+(d-1));c.push(ir.Capture({name:w,prefix:q==null?"":q,delimiter:E,optional:z=="?"||z=="*",repeat:z=="+"||z=="*",partial:q!=null&&k!=""&&k!=q,asterisk:n!=null,pattern:th.escapeGroup(l==null?v==null?n==null?"[^"+E+"]+?":".*":v:l)}));
return""});f<a.length&&(g+=X.substr(a,f,null));g!=""&&c.push(ir.Static(g));return c};th.tokensToEReg=function(a,b){b=th.defaults(b);var c=b.strict,d=b.end,f="",g=a[a.length-1];if(g._hx_index==0){var h=g.token;g=h.charAt(h.length-1)=="/"}else g=!1;for(var l=0;l<a.length;)switch(h=a[l],++l,h._hx_index){case 0:f+=th.escapeString(h.token);break;case 1:h=h.key;var k=th.escapeString(h.prefix),q="(?:"+h.pattern+")";h.repeat&&(q+="(?:"+k+q+")*");q=h.optional?h.partial?k+"("+q+")?":"(?:"+k+"("+q+"))?":k+"("+
q+")";f+=q}c||(f=(g?X.substr(f,0,f.length-2):f)+"(?:\\/(?=$))?");return new sb("^"+(d?f+"$":f+(c&&g?"":"(?=\\/|$)")),th.flags(b))};th.defaults=function(a){a==null&&(a={});return{strict:a.strict==null?!1:a.strict,end:a.end==null?!0:a.end,sensitive:a.sensitive==null?!1:a.sensitive}};th.escapeGroup=function(a){for(var b="=!:$/()".split(""),c=0;c<b.length;){var d=b[c];++c;a=Z.replace(a,d,"\\"+d)}return a};th.escapeString=function(a){for(var b="\\.+*?=^!:${}()[]|/".split(""),c=0;c<b.length;){var d=b[c];
++c;a=Z.replace(a,d,"\\"+d)}return a};th.flags=function(a){return a.sensitive?"":"i"};th.encodeAsterisk=function(a){return(new sb("[?#]","g")).map(a,function(b){b=b.matched(0);return"%"+Z.hex(X.cca(b,0)).toUpperCase()})};th.toEReg=function(a,b){a=th.parse(a);for(var c=[],d=0;d<a.length;){var f=a[d];++d;f._hx_index==1&&c.push(f.key)}return{ereg:th.tokensToEReg(a,b),keys:c}};var Yl=function(a,b,c,d,f){this._keepDownStateOnRollOut=this._hoverBeforeDown=this._down=!1;this._enabled=!0;this._target=this._stateContext=
this._callback=this._upState=this._downState=this._hoverState=null;this.set_target(a);c!=null&&this.set_upState(c);d!=null&&this.set_downState(d);f!=null&&this.set_hoverState(f);this._currentState=this._upState;this.set_callback(b)};r["feathers.utils.PointerToState"]=Yl;Yl.__name__="feathers.utils.PointerToState";Yl.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;this._target!=null&&(this._target.removeEventListener("removedFromStage",
m(this,this.pointerToState_target_removedFromStageHandler)),this._target.removeEventListener("rollOver",m(this,this.pointerToState_target_rollOverHandler)),this._target.removeEventListener("rollOut",m(this,this.pointerToState_target_rollOutHandler)),this._target.removeEventListener("mouseDown",m(this,this.pointerToState_target_mouseDownHandler)));this._target=a;this._target!=null&&(this._currentState=this._upState,this._target.addEventListener("removedFromStage",m(this,this.pointerToState_target_removedFromStageHandler)),
this._target.addEventListener("rollOver",m(this,this.pointerToState_target_rollOverHandler)),this._target.addEventListener("rollOut",m(this,this.pointerToState_target_rollOutHandler)),this._target.addEventListener("mouseDown",m(this,this.pointerToState_target_mouseDownHandler)));return this._target},_stateContext:null,get_stateContext:function(){return this._stateContext},set_stateContext:function(a){return this._stateContext==a?this._stateContext:this._stateContext=a},_callback:null,get_callback:function(){return this._callback},
set_callback:function(a){if(this._callback==a)return this._callback;this._callback=a;this._callback!=null&&this._callback(this._currentState);return this._callback},_currentState:null,get_currentState:function(){return this._currentState},_upState:null,get_upState:function(){return this._upState},set_upState:function(a){return this._upState=a},_downState:null,get_downState:function(){return this._downState},set_downState:function(a){return this._downState=a},_hoverState:null,get_hoverState:function(){return this._hoverState},
set_hoverState:function(a){return this._hoverState=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){return this._enabled=a},_keepDownStateOnRollOut:null,get_keepDownStateOnRollOut:function(){return this._keepDownStateOnRollOut},set_keepDownStateOnRollOut:function(a){return this._keepDownStateOnRollOut=a},_customHitTest:null,get_customHitTest:function(){return this._customHitTest},set_customHitTest:function(a){return this._customHitTest=a},_hoverBeforeDown:null,
_down:null,changeState:function(a){var b=this._currentState,c=this._stateContext;c==null&&u.__implements(this._target,mh)&&(c=this._target);c!=null&&(b=c.get_currentState());this._currentState=a;b!=a&&this._callback!=null&&this._callback(a)},resetTouchState:function(){this._hoverBeforeDown=!1;this.changeState(this._upState)},pointerToState_target_removedFromStageHandler:function(a){this._target.stage!=null&&this._target.stage.removeEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler));
this.resetTouchState()},pointerToState_target_rollOverHandler:function(a){this._enabled&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._hoverBeforeDown=!0,this._down?this.changeState(this._downState):this.changeState(this._hoverState))},pointerToState_target_rollOutHandler:function(a){this._enabled&&(this._hoverBeforeDown=!1,this._keepDownStateOnRollOut&&this._down?this.changeState(this._downState):this.changeState(this._upState))},pointerToState_target_mouseDownHandler:function(a){this._enabled&&
this._target.stage!=null&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._down=!0,this._target.stage.addEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler),!1,0,!0),this.changeState(this._downState))},pointerToState_stage_mouseUpHandler:function(a){var b=u.__cast(a.currentTarget,cd);this._down=!1;b.removeEventListener("mouseUp",m(this,this.pointerToState_stage_mouseUpHandler));this._hoverBeforeDown&&this._target.hitTestPoint(a.stageX,a.stageY)?this.changeState(this._hoverState):
this.resetTouchState()},__class__:Yl,__properties__:{set_customHitTest:"set_customHitTest",get_customHitTest:"get_customHitTest",set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",set_enabled:"set_enabled",get_enabled:"get_enabled",set_hoverState:"set_hoverState",get_hoverState:"get_hoverState",set_downState:"set_downState",get_downState:"get_downState",set_upState:"set_upState",get_upState:"get_upState",get_currentState:"get_currentState",
set_callback:"set_callback",get_callback:"get_callback",set_stateContext:"set_stateContext",get_stateContext:"get_stateContext",set_target:"set_target",get_target:"get_target"}};var uq=function(a,b){this._enabled=!0;this._target=this._eventFactory=null;this.set_target(a);this.set_eventFactory(b)};r["feathers.utils.PointerTrigger"]=uq;uq.__name__="feathers.utils.PointerTrigger";uq.prototype={_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==a)return this._target;
this._target!=null&&(this._target.removeEventListener("click",m(this,this.pointerTrigger_target_clickHandler)),this._target.removeEventListener("touchTap",m(this,this.pointerTrigger_target_touchTapHandler)));this._target=a;this._target!=null&&(this._target.addEventListener("click",m(this,this.pointerTrigger_target_clickHandler)),this._target.addEventListener("touchTap",m(this,this.pointerTrigger_target_touchTapHandler)));return this._target},_eventFactory:null,get_eventFactory:function(){return this._eventFactory},
set_eventFactory:function(a){return this._eventFactory==a?this._eventFactory:this._eventFactory=a},_enabled:null,get_enabled:function(){return this._enabled},set_enabled:function(a){return this._enabled=a},_customHitTest:null,get_customHitTest:function(){return this._customHitTest},set_customHitTest:function(a){return this._customHitTest=a},pointerTrigger_target_clickHandler:function(a){this._enabled&&(this._customHitTest==null||this._customHitTest(a.stageX,a.stageY))&&(this._eventFactory!=null?this._target.dispatchEvent(this._eventFactory()):
$e.dispatchFromMouseEvent(this._target,a))},pointerTrigger_target_touchTapHandler:function(a){!this._enabled||a.isPrimaryTouchPoint||this._customHitTest!=null&&!this._customHitTest(a.stageX,a.stageY)||(this._eventFactory!=null?this._target.dispatchEvent(this._eventFactory()):$e.dispatchFromTouchEvent(this._target,a))},__class__:uq,__properties__:{set_customHitTest:"set_customHitTest",get_customHitTest:"get_customHitTest",set_enabled:"set_enabled",get_enabled:"get_enabled",set_eventFactory:"set_eventFactory",
get_eventFactory:"get_eventFactory",set_target:"set_target",get_target:"get_target"}};var Wv=function(){};r["feathers.utils.PopUpUtil"]=Wv;Wv.__name__="feathers.utils.PopUpUtil";Wv.isTopLevelPopUpOrIsContainedByTopLevelPopUp=function(a){if(a.stage==null)return!1;for(var b=Ub.forStage(a.stage),c=b.get_popUpCount()-b.get_topLevelPopUpCount(),d=b.get_popUpCount();c<d;){var f=c++;f=b.getPopUpAt(f);if(a==f||f instanceof lb&&f.contains(a))return!0}return!1};var ol=function(){};r["feathers.utils.ScaleUtil"]=
ol;ol.__name__="feathers.utils.ScaleUtil";ol.fitRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=ol.scaleToFit(d,f,a,g);c==null&&(c=new Ea);d*=h;f*=h;c.width=d;c.height=f;c.x=b.x+(a-d)/2;c.y=b.y+(g-f)/2;return c};ol.fillRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=ol.scaleToFill(d,f,a,g);c==null&&(c=new Ea);d*=h;f*=h;c.width=d;c.height=f;c.x=b.x+(a-d)/2;c.y=b.y+(g-f)/2;return c};ol.scaleToFit=function(a,b,c,d){a=c/a;b=d/b;return a<b?a:
b};ol.scaleToFill=function(a,b,c,d){a=c/a;b=d/b;return a>b?a:b};var Xv=function(){this._buckets=[]};r["feathers.utils.ScreenDensityScaleCalculator"]=Xv;Xv.__name__="feathers.utils.ScreenDensityScaleCalculator";Xv.prototype={_buckets:null,addScaleForDensity:function(a,b){for(var c=this._buckets.length,d=0,f=this._buckets;d<f.length;){var g=f[d];++d;if(g.density>a)break;if(g.density==a)throw new rb("Screen density cannot be added more than once: "+a);}d=this._buckets;a=new Pu(a,b);d.splice(c,0,a)},
removeScaleForDensity:function(a){for(var b=0,c=this._buckets;b<c.length;){var d=c[b];++b;if(d.density==a){X.remove(this._buckets,d);break}}},getScale:function(a){if(this._buckets.length==0)throw new fb("Cannot choose scale because none have been added");var b=this._buckets[0];if(a<=b.density)return b.scale;for(var c=b,d=1,f=this._buckets.length;d<f;)if(b=d++,b=this._buckets[b],a>b.density)c=b;else{if(a<(b.density+c.density)/2)return c.scale;break}return b.scale},__class__:Xv};var Pu=function(a,b){this.density=
a;this.scale=b};r["feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket"]=Pu;Pu.__name__="feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket";Pu.prototype={density:null,scale:null,__class__:Pu};var Ci=function(a){this._touchPointIsSimulated=!1;this._previousTouchPointID=this._touchPointID=null;this.snappingToEdge=!1;this.targetScrollX=this.targetScrollY=0;this.animateScrollXEndRatio=this.animateScrollYEndRatio=1;this.animateScrollX=this.animateScrollY=null;this.savedScrollMoves=
[];this.startTouchX=this.startTouchY=this.startScrollX=this.startScrollY=0;this.restoreMouseChildren=!1;this._fixedThrowDuration=2.996998998998728;this._logDecelerationRate=-.0020020026706730793;this.snapPositionsX=this.snapPositionsY=null;this._decelerationRate=.998;this.simulateTouch=!1;this.mouseWheelDuration=0;this._mouseWheelDeltaMode=1;this.mouseWheelYScrollsX=!1;this.mouseWheelDeltaX=this.mouseWheelDeltaY=10;this.bounceEase=null;this.ease=lh.easeOut;this.elasticSnapDuration=.5;this.throwElasticity=
.05;this.elasticity=.33;this.forceElasticTop=this.forceElasticRight=this.forceElasticBottom=this.forceElasticLeft=!1;this.elasticEdges=!0;this.minDragDistance=6;this._scrolling=this._draggingX=this._draggingY=!1;this._scrollX=this._scrollY=this._minScrollX=this._minScrollY=this._maxScrollX=this._maxScrollY=this._visibleWidth=this._visibleHeight=this._contentWidth=this._contentHeight=0;this.enabledX=this.enabledY=!0;na.call(this);this.set_target(a)};r["feathers.utils.Scroller"]=Ci;Ci.__name__="feathers.utils.Scroller";
Ci.__super__=na;Ci.prototype=I(na.prototype,{enabledX:null,enabledY:null,_scrollX:null,get_scrollX:function(){return this._scrollX},set_scrollX:function(a){if(this._scrollX==a)return this._scrollX;this._scrollX=a;Bd.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollX},_scrollY:null,get_scrollY:function(){return this._scrollY},set_scrollY:function(a){if(this._scrollY==a)return this._scrollY;this._scrollY=a;Bd.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollY},
get_restrictedScrollX:function(){return this._scrollX},set_restrictedScrollX:function(a){a<this._minScrollX?a=this._minScrollX:a>this._maxScrollX&&(a=this._maxScrollX);if(this._scrollX==a)return this._scrollX;this._scrollX=a;Bd.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollX},get_restrictedScrollY:function(){return this._scrollY},set_restrictedScrollY:function(a){a<this._minScrollY?a=this._minScrollY:a>this._maxScrollY&&(a=this._maxScrollY);if(this._scrollY==a)return this._scrollY;
this._scrollY=a;Bd.dispatch(this,"scroll",!1,!1,this._scrollX,this._scrollY);return this._scrollY},_minScrollX:null,get_minScrollX:function(){return this._minScrollX},_minScrollY:null,get_minScrollY:function(){return this._minScrollY},_maxScrollX:null,get_maxScrollX:function(){return this._maxScrollX},_maxScrollY:null,get_maxScrollY:function(){return this._maxScrollY},_visibleWidth:null,get_visibleWidth:function(){return this._visibleWidth},_visibleHeight:null,get_visibleHeight:function(){return this._visibleHeight},
_contentWidth:null,get_contentWidth:function(){return this._contentWidth},_contentHeight:null,get_contentHeight:function(){return this._contentHeight},_scrolling:null,get_scrolling:function(){return this._scrolling},_draggingX:null,get_draggingX:function(){return this._draggingX},_draggingY:null,get_draggingY:function(){return this._draggingY},minDragDistance:null,elasticEdges:null,forceElasticTop:null,forceElasticRight:null,forceElasticBottom:null,forceElasticLeft:null,elasticity:null,throwElasticity:null,
elasticSnapDuration:null,ease:null,bounceEase:null,mouseWheelDeltaX:null,mouseWheelDeltaY:null,mouseWheelYScrollsX:null,_mouseWheelDeltaMode:null,mouseWheelDuration:null,simulateTouch:null,_decelerationRate:null,get_decelerationRate:function(){return this._decelerationRate},set_decelerationRate:function(a){if(this._decelerationRate==a)return this._decelerationRate;this._decelerationRate=a;this._logDecelerationRate=Math.log(this._decelerationRate);this._fixedThrowDuration=-.1/Math.log(Math.pow(this._decelerationRate,
16.666666666666668));return this._decelerationRate},snapPositionsX:null,snapPositionsY:null,_logDecelerationRate:null,_fixedThrowDuration:null,restoreMouseChildren:null,startTouchX:null,startTouchY:null,startScrollX:null,startScrollY:null,savedScrollMoves:null,animateScrollX:null,animateScrollY:null,animateScrollXEndRatio:null,animateScrollYEndRatio:null,targetScrollX:null,targetScrollY:null,snappingToEdge:null,_target:null,get_target:function(){return this._target},set_target:function(a){if(this._target==
a)return this._target;if(this._target!=null){this.cleanupAfterDrag();this._target.removeEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler));this._target.removeEventListener("mouseDown",m(this,this.scroller_target_mouseDownHandler));this._target.removeEventListener("mouseDown",m(this,this.scroller_target_mouseDownCaptureHandler),!0);this._target.removeEventListener("mouseWheel",m(this,this.scroller_target_mouseWheelHandler));var b=u.__cast(sa,Window);b.removeEventListener("wheel",
m(this,this.scroller_window_wheelCaptureHandler),{capture:!0});this._target.removeEventListener("touchBegin",m(this,this.scroller_target_touchBeginHandler));this._target.removeEventListener("touchBegin",m(this,this.scroller_target_touchBeginCaptureHandler),!0);this._target.removeEventListener("click",m(this,this.scroller_target_clickCaptureHandler),!0);this._target.removeEventListener("touchTap",m(this,this.scroller_target_touchTapCaptureHandler),!0)}this._target=a;this._target!=null&&(this._target.addEventListener("mouseDown",
m(this,this.scroller_target_mouseDownHandler),!1,0,!0),this._target.addEventListener("mouseDown",m(this,this.scroller_target_mouseDownCaptureHandler),!0,0,!0),this._target.addEventListener("mouseWheel",m(this,this.scroller_target_mouseWheelHandler),!1,0,!0),b=u.__cast(sa,Window),b.addEventListener("wheel",m(this,this.scroller_window_wheelCaptureHandler),{capture:!0}),this._target.addEventListener("touchBegin",m(this,this.scroller_target_touchBeginHandler),!1,0,!0),this._target.addEventListener("touchBegin",
m(this,this.scroller_target_touchBeginCaptureHandler),!0,0,!0),this._target.addEventListener("click",m(this,this.scroller_target_clickCaptureHandler),!0,0,!0),this._target.addEventListener("touchTap",m(this,this.scroller_target_touchTapCaptureHandler),!0,0,!0));return this._target},_previousTouchPointID:null,_touchPointID:null,get_touchPointID:function(){return this._touchPointID},_touchPointIsSimulated:null,get_touchPointIsSimulated:function(){return this._touchPointIsSimulated},setDimensions:function(a,
b,c,d){this._visibleWidth=a!=null?a:0;this._visibleHeight=b!=null?b:0;this._contentWidth=c!=null?c:0;this._contentHeight=d!=null?d:0;this.calculateMinAndMax()},applyScrollRestrictions:function(){var a=!1;this._scrollX<this._minScrollX?(this._scrollX=this._minScrollX,a=!0):this._scrollX>this._maxScrollX&&(this._scrollX=this._maxScrollX,a=!0);this._scrollY<this._minScrollY?(this._scrollY=this._minScrollY,a=!0):this._scrollY>this._maxScrollY&&(this._scrollY=this._maxScrollY,a=!0);a&&Bd.dispatch(this,
"scroll",!1,!1,this._scrollX,this._scrollY)},stop:function(){this.animateScrollX!=null&&(ua.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(ua.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null);this.cleanupAfterDrag();this._draggingY=this._draggingX=!1;this.completeScroll()},applyLayoutShift:function(a,b){if(a!=null){var c=this.animateScrollX;this.animateScrollX=null;c!=null&&ua.stop(c,null,!1,!1);this.startScrollX+=a;this.set_scrollX(this.get_scrollX()+
a);for(var d=0;d<this.savedScrollMoves.length;)this.savedScrollMoves[d]+=a,d+=3;c!=null&&(a=this.targetScrollX+a,d=Oa.getTimer()/1E3-c.startTime,d=c.duration-d,this.throwTo(a,null,d,c._ease))}if(b!=null){c=this.animateScrollY;this.animateScrollY=null;c!=null&&ua.stop(c,null,!1,!1);this.startScrollY+=b;this.set_scrollY(this.get_scrollY()+b);for(d=1;d<this.savedScrollMoves.length;)this.savedScrollMoves[d]+=b,d+=3;c!=null&&(b=this.targetScrollY+b,d=Oa.getTimer()/1E3-c.startTime,d=c.duration-d,this.throwTo(null,
b,d,c._ease))}},throwTo:function(a,b,c,d){var f=this;c==null&&(c=this._fixedThrowDuration);d==null&&(d=this.ease);var g=!1;a!=null&&(this.animateScrollX!=null&&(ua.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null),this._scrollX!=a?(g=!0,this.startScroll(),c==0?this.set_scrollX(a):(this.startScrollX=this._scrollX,this.targetScrollX=a,this.animateScrollX=a=ua.update(function(h){h==null&&(h=f.targetScrollX);return f.set_scrollX(h)},c,[this._scrollX],[this.targetScrollX],!0),this.animateScrollX.ease(d),
this.animateScrollX.onComplete(m(this,this.animateScrollX_onComplete)),this.refreshAnimateScrollXEndRatio())):this.finishScrollX());b!=null&&(this.animateScrollY!=null&&(ua.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null),this._scrollY!=b?(g=!0,this.startScroll(),c==0?this.set_scrollY(b):(this.startScrollY=this._scrollY,this.targetScrollY=b,this.animateScrollY=a=ua.update(function(h){h==null&&(h=f.targetScrollY);return f.set_scrollY(h)},c,[this._scrollY],[this.targetScrollY],!0),this.animateScrollY.ease(d),
this.animateScrollY.onComplete(m(this,this.animateScrollY_onComplete)),this.refreshAnimateScrollYEndRatio())):this.finishScrollY());g&&c==0&&this.completeScroll()},throwWithVelocity:function(a,b){var c=null,d=null;if(a!=null)if(Math.abs(a)<=Ci.MINIMUM_VELOCITY)this.finishScrollX();else if(this.snapPositionsX!=null)for(var f=0,g=this.snapPositionsX.length;f<g;){var h=f++,l=this.snapPositionsX[h];if(a<0&&(c=l,l>this._scrollX))break;if(a>0&&(c=h==0?l:this.snapPositionsX[h-1],l>=this._scrollX))break}else c=
this._scrollX+this.calculateDistanceFromVelocity(a);if(b!=null)if(Math.abs(b)<=Ci.MINIMUM_VELOCITY)this.finishScrollY();else if(this.snapPositionsY!=null)for(f=0,g=this.snapPositionsY.length;f<g;){h=f++;a=this.snapPositionsY[h];if(b<0&&(d=a,a>this._scrollY))break;if(b>0&&(d=h==0?a:this.snapPositionsY[h-1],a>=this._scrollY))break}else d=this._scrollY+this.calculateDistanceFromVelocity(b);this.throwTo(c,d,this._fixedThrowDuration)},calculateDistanceFromVelocity:function(a){return(a-Ci.MINIMUM_VELOCITY)/
this._logDecelerationRate},refreshAnimateScrollXEndRatio:function(){var a=Math.abs(this.targetScrollX-this.startScrollX),b=0;this.targetScrollX>this._maxScrollX?b=(this.targetScrollX-this._maxScrollX)/a:this.targetScrollX<this._minScrollX&&(b=(this._minScrollX-this.targetScrollX)/a);this.animateScrollXEndRatio=b>0?this.elasticEdges?1-b+b*this.throwElasticity:1-b:1;if(this.animateScrollX!=null)if(this.animateScrollXEndRatio<1)this.animateScrollX.onUpdate(m(this,this.animateScrollX_endRatio_onUpdate));
else this.animateScrollX.onUpdate(null)},refreshAnimateScrollYEndRatio:function(){var a=Math.abs(this.targetScrollY-this.startScrollY),b=0;this.targetScrollY>this._maxScrollY?b=(this.targetScrollY-this._maxScrollY)/a:this.targetScrollY<this._minScrollY&&(b=(this._minScrollY-this.targetScrollY)/a);this.animateScrollYEndRatio=b>0?this.elasticEdges?1-b+b*this.throwElasticity:1-b:1;if(this.animateScrollY!=null)if(this.animateScrollYEndRatio<1)this.animateScrollY.onUpdate(m(this,this.animateScrollY_endRatio_onUpdate));
else this.animateScrollY.onUpdate(null)},calculateMinAndMax:function(){var a=this._minScrollX,b=this._maxScrollX,c=this._minScrollY,d=this._maxScrollY;this._minScrollY=this._minScrollX=0;this._maxScrollX=Math.max(this._contentWidth,this._visibleWidth)-this._visibleWidth;this._maxScrollY=Math.max(this._contentHeight,this._visibleHeight)-this._visibleHeight;a==this._minScrollX&&b==this._maxScrollX||this.refreshAnimateScrollXEndRatio();c==this._minScrollY&&d==this._maxScrollY||this.refreshAnimateScrollYEndRatio()},
startScroll:function(){if(!this._scrolling){this._scrolling=!0;if(this._target instanceof lb){var a=this._target;this.restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}Bd.dispatch(this,"scrollStart",!1,!1,this._scrollX,this._scrollY)}},completeScroll:function(){!this._scrolling||this._draggingX||this._draggingY||this.animateScrollX!=null||this.animateScrollY!=null||(this._scrolling=!1,this._target instanceof lb&&(this._target.mouseChildren=this.restoreMouseChildren),Bd.dispatch(this,"scrollComplete",
!1,!1,this._scrollX,this._scrollY))},finishScrollX:function(){this._draggingX=!1;var a=null;if(this.snapPositionsX!=null){for(var b=Infinity,c=0,d=this.snapPositionsX;c<d.length;){var f=d[c];++c;var g=Math.abs(f-this._scrollX);b>g&&(b=g,a=f)}a==this._scrollX&&(a=null)}this._scrollX<this._minScrollX?a=this._minScrollX:this._scrollX>this._maxScrollX&&(a=this._maxScrollX);a==null?this.completeScroll():this.throwTo(a,null,Math.abs(this._scrollX-a)>=1?this.elasticSnapDuration:0,this.bounceEase)},finishScrollY:function(){this._draggingY=
!1;var a=null;if(this.snapPositionsY!=null){for(var b=Infinity,c=0,d=this.snapPositionsY;c<d.length;){var f=d[c];++c;var g=Math.abs(f-this._scrollY);b>g&&(b=g,a=f)}a==this._scrollY&&(a=null)}this._scrollY<this._minScrollY?a=this._minScrollY:this._scrollY>this._maxScrollY&&(a=this._maxScrollY);a==null?this.completeScroll():this.throwTo(null,a,Math.abs(this._scrollY-a)>=1?this.elasticSnapDuration:0,this.bounceEase)},animateScrollX_endRatio_onUpdate:function(){var a=Oa.getTimer()/1E3-this.animateScrollX.startTime,
b=a/this.animateScrollX.duration,c=this.animateScrollX._ease;c!=null&&(b=c.calculate(b));b>=this.animateScrollXEndRatio&&a<this.animateScrollX.duration&&(this.elasticEdges||(this._scrollX<this._minScrollX?this.set_scrollX(this._minScrollX):this._scrollX>this._maxScrollX&&this.set_scrollX(this._maxScrollX)),ua.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null,this.finishScrollX())},animateScrollX_onComplete:function(){this.animateScrollX=null;this.finishScrollX()},animateScrollY_endRatio_onUpdate:function(){var a=
Oa.getTimer()/1E3-this.animateScrollY.startTime,b=a/this.animateScrollY.duration,c=this.animateScrollY._ease;c!=null&&(b=c.calculate(b));b>=this.animateScrollYEndRatio&&a<this.animateScrollY.duration&&(this.elasticEdges||(this._scrollY<this._minScrollY?this.set_scrollY(this._minScrollY):this._scrollY>this._maxScrollY&&this.set_scrollY(this._maxScrollY)),ua.stop(this.animateScrollY,null,!1,!1),this.animateScrollY=null,this.finishScrollY())},animateScrollY_onComplete:function(){this.animateScrollY=
null;this.finishScrollY()},cleanupAfterDrag:function(){this._touchPointID!=null&&(this._previousTouchPointID=this._scrolling?this._touchPointID:null,this._touchPointID=null,this._touchPointIsSimulated=!1,this._target.removeEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler)),this._target.stage!=null&&(this._target.stage.removeEventListener("mouseMove",m(this,this.scroller_target_stage_mouseMoveHandler)),this._target.stage.removeEventListener("mouseUp",m(this,this.scroller_target_stage_mouseUpHandler)),
this._target.stage.removeEventListener("touchMove",m(this,this.scroller_target_stage_touchMoveHandler)),this._target.stage.removeEventListener("touchEnd",m(this,this.scroller_target_stage_touchEndHandler))))},scroller_target_removedFromStageHandler:function(a){this.cleanupAfterDrag()},touchBegin:function(a,b,c,d){if((!b||this.simulateTouch)&&this._touchPointID==null){this.animateScrollX!=null&&(ua.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(ua.stop(this.animateScrollY,
null,!1,!1),this.animateScrollY=null);this._target.addEventListener("removedFromStage",m(this,this.scroller_target_removedFromStageHandler),!1,0,!0);this._target.stage.addEventListener("mouseMove",m(this,this.scroller_target_stage_mouseMoveHandler),!1,0,!0);this._target.stage.addEventListener("mouseUp",m(this,this.scroller_target_stage_mouseUpHandler),!1,0,!0);this._target.stage.addEventListener("touchMove",m(this,this.scroller_target_stage_touchMoveHandler),!1,0,!0);this._target.stage.addEventListener("touchEnd",
m(this,this.scroller_target_stage_touchEndHandler),!1,0,!0);if(this._target instanceof lb){var f=this._target;this._scrolling&&(f.mouseChildren=!1)}this._previousTouchPointID=null;this._touchPointID=a;this._touchPointIsSimulated=b;this.startTouchX=c;this.startTouchY=d;this.startScrollX=this._scrollX;this.startScrollY=this._scrollY;this.savedScrollMoves.length=0}},touchMove:function(a,b,c,d){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b){b=c-this.startTouchX;a=
d-this.startTouchY;for(var f=1,g=1,h=this._target;h!=h.stage;)f/=h.get_scaleX(),g/=h.get_scaleY(),h=h.parent;b*=f;a*=g;g=this.canDragX();f=this.canDragY();if(!this._draggingX&&g&&Math.abs(b)>this.minDragDistance&&(this.startTouchX=c,b=0,this._draggingX=!0,!this._draggingY&&(this.startScroll(),this._touchPointID==null))||!this._draggingY&&f&&Math.abs(a)>this.minDragDistance&&(this.startTouchY=d,a=0,this._draggingY=!0,!this._draggingX&&(this.startScroll(),this._touchPointID==null)))return;if(this._draggingX||
this._draggingY)c=this.startScrollX,g&&(c-=b,this.elasticEdges?(d=this._minScrollX,d>this.startScrollX&&(d=this.startScrollX),b=this._maxScrollX,b<this.startScrollX&&(b=this.startScrollX),c<this._minScrollX?c=this._maxScrollX>this._minScrollX||this.forceElasticLeft?c-(c-d)*(1-this.elasticity):this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX>this._minScrollX||this.forceElasticRight?c-(c-b)*(1-this.elasticity):this._maxScrollX)):c<this._minScrollX?c=this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX)),
d=this.startScrollY,f&&(d-=a,this.elasticEdges?(a=this._minScrollY,a>this.startScrollY&&(a=this.startScrollY),b=this._maxScrollY,b<this.startScrollY&&(b=this.startScrollY),d<this._minScrollY?d=this._maxScrollY>this._minScrollY||this.forceElasticTop?d-(d-a)*(1-this.elasticity):this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY>this._minScrollY||this.forceElasticBottom?d-(d-b)*(1-this.elasticity):this._maxScrollY)):d<this._minScrollY?d=this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY)),
this.set_scrollX(c),this.set_scrollY(d),this.savedScrollMoves.length>60&&(this.savedScrollMoves.length=30),this.savedScrollMoves.push(c),this.savedScrollMoves.push(d),this.savedScrollMoves.push(Oa.getTimer())}},touchEnd:function(a,b){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b){this.cleanupAfterDrag();a=!this.canDragX();b=!this.canDragY();if(this._scrollX<this._minScrollX||this._scrollX>this._maxScrollX)a=!0,this.finishScrollX();if(this._scrollY<this._minScrollY||
this._scrollY>this._maxScrollY)b=!0,this.finishScrollY();if(!a||!b)if(this._draggingX||this._draggingY){for(var c=Oa.getTimer()-100,d=this.savedScrollMoves.length-1,f=d,g=d;d>0&&this.savedScrollMoves[g]>c;)f=g,g-=3;f==d?(!a&&this._draggingX&&this.finishScrollX(),!b&&this._draggingY&&this.finishScrollY()):(c=this.savedScrollMoves[d]-this.savedScrollMoves[f],g=d=null,c>0&&(!a&&this._draggingX&&(d=-(this._scrollX-this.savedScrollMoves[f-2])/c),!b&&this._draggingY&&(g=-(this._scrollY-this.savedScrollMoves[f-
1])/c)),d==null&&g==null||this.throwWithVelocity(d,g),d==null&&this._draggingX&&this.finishScrollX(),g==null&&this._draggingY&&this.finishScrollY())}}},canDragX:function(){return this.enabledX?this._maxScrollX>this._minScrollX||this.forceElasticLeft?!0:this.forceElasticRight:!1},canDragY:function(){return this.enabledY?this._maxScrollY>this._minScrollY||this.forceElasticTop?!0:this.forceElasticBottom:!1},scroller_target_touchBeginCaptureHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),
this.scroller_target_touchBeginHandler(a))},scroller_target_touchBeginHandler:function(a){this.simulateTouch&&a.isPrimaryTouchPoint||this.touchBegin(a.touchPointID,!1,a.stageX,a.stageY)},scroller_target_mouseDownCaptureHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),this.scroller_target_mouseDownHandler(a))},scroller_target_mouseDownHandler:function(a){a=this._target.stage;a!=null&&this.touchBegin(Ci.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},scroller_target_stage_touchMoveHandler:function(a){this.touchMove(a.touchPointID,
!1,a.stageX,a.stageY)},scroller_target_stage_mouseMoveHandler:function(a){a=u.__cast(a.currentTarget,cd);this.touchMove(Ci.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},scroller_target_stage_touchEndHandler:function(a){this.touchEnd(a.touchPointID,!1)},scroller_target_clickCaptureHandler:function(a){this._previousTouchPointID!=null&&(this._previousTouchPointID=null,a.stopImmediatePropagation())},scroller_target_touchTapCaptureHandler:function(a){this._previousTouchPointID!=null&&this._previousTouchPointID==
a.touchPointID&&(a.isPrimaryTouchPoint?this._previousTouchPointID=Ci.POINTER_ID_MOUSE:(this._previousTouchPointID=null,a.stopImmediatePropagation()))},scroller_target_stage_mouseUpHandler:function(a){this.touchEnd(Ci.POINTER_ID_MOUSE,!0)},scroller_window_wheelCaptureHandler:function(a){this._mouseWheelDeltaMode=a.deltaMode},scroller_target_mouseWheelHandler:function(a){this._scrolling&&(a.stopImmediatePropagation(),this.stop());var b=a.delta;switch(this._mouseWheelDeltaMode){case 0:b=b<0?Math.min(-1,
b/40)|0:Math.max(1,b/40)|0;break;case 2:b*=16}var c=null,d=null;this.mouseWheelYScrollsX?(c=this._scrollX,this.animateScrollX!=null&&(c=this.targetScrollX),c-=b*this.mouseWheelDeltaX,c<this._minScrollX?c=this._minScrollX:c>this._maxScrollX&&(c=this._maxScrollX)):(d=this._scrollY,this.animateScrollY!=null&&(d=this.targetScrollY),d-=b*this.mouseWheelDeltaY,d<this._minScrollY?d=this._minScrollY:d>this._maxScrollY&&(d=this._maxScrollY));if(c!=null&&c!=this._scrollX||d!=null&&d!=this._scrollY)a.preventDefault(),
this._scrolling||(a.stopImmediatePropagation(),this.stop()),c!=null&&(this._draggingX=!0),d!=null&&(this._draggingY=!0),this.mouseWheelDuration>0?this.throwTo(c,d,this.mouseWheelDuration,this.ease):(this.startScroll(),c!=null&&this.set_scrollX(c),d!=null&&this.set_scrollY(d),this._draggingY=this._draggingX=!1,this.completeScroll())},__class__:Ci,__properties__:{get_touchPointIsSimulated:"get_touchPointIsSimulated",get_touchPointID:"get_touchPointID",set_target:"set_target",get_target:"get_target",
set_decelerationRate:"set_decelerationRate",get_decelerationRate:"get_decelerationRate",get_draggingY:"get_draggingY",get_draggingX:"get_draggingX",get_scrolling:"get_scrolling",get_contentHeight:"get_contentHeight",get_contentWidth:"get_contentWidth",get_visibleHeight:"get_visibleHeight",get_visibleWidth:"get_visibleWidth",get_maxScrollY:"get_maxScrollY",get_maxScrollX:"get_maxScrollX",get_minScrollY:"get_minScrollY",get_minScrollX:"get_minScrollX",set_restrictedScrollY:"set_restrictedScrollY",get_restrictedScrollY:"get_restrictedScrollY",
set_restrictedScrollX:"set_restrictedScrollX",get_restrictedScrollX:"get_restrictedScrollX",set_scrollY:"set_scrollY",get_scrollY:"get_scrollY",set_scrollX:"set_scrollX",get_scrollX:"get_scrollX"}});var pg=function(){};r["feathers.utils.TextFormatUtil"]=pg;pg.__name__="feathers.utils.TextFormatUtil";pg.clone=function(a){var b=new qf(a.font,a.size,a.color,a.bold,a.italic,a.underline,a.url,a.target,a.align,a.leftMargin,a.rightMargin,a.indent,a.leading);b.blockIndent=a.blockIndent;b.bullet=a.bullet;
b.kerning=a.kerning;b.letterSpacing=a.letterSpacing;b.tabStops=a.tabStops;return b};var Bj=O["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:null,CFunction:{_hx_name:"CFunction",_hx_index:0,__enum__:"haxe.StackItem",toString:D},Module:(G=function(a){return{_hx_index:1,m:a,__enum__:"haxe.StackItem",toString:D}},G._hx_name="Module",G.__params__=["m"],G),FilePos:(G=function(a,b,c,d){return{_hx_index:2,s:a,file:b,line:c,column:d,__enum__:"haxe.StackItem",toString:D}},G._hx_name="FilePos",
G.__params__=["s","file","line","column"],G),Method:(G=function(a,b){return{_hx_index:3,classname:a,method:b,__enum__:"haxe.StackItem",toString:D}},G._hx_name="Method",G.__params__=["classname","method"],G),LocalFunction:(G=function(a){return{_hx_index:4,v:a,__enum__:"haxe.StackItem",toString:D}},G._hx_name="LocalFunction",G.__params__=["v"],G)};Bj.__constructs__=[Bj.CFunction,Bj.Module,Bj.FilePos,Bj.Method,Bj.LocalFunction];var si={callStack:function(){return Rb.toHaxe(Rb.callStack())},exceptionStack:function(a){a==
null&&(a=!1);var b=Rb.toHaxe(Rb.exceptionStack());return a?b:si.subtract(b,si.callStack())},toString:function(a){for(var b=new ec,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";si.itemToString(b,d)}return b.b},subtract:function(a,b){for(var c=-1,d=-1;++d<a.length;){for(var f=0,g=b.length;f<g;){var h=f++;if(si.equalItems(a[d],b[h])){if(c<0&&(c=d),++d,d>=a.length)break}else c=-1}if(c>=0)break}return c>=0?a.slice(0,c):a},equalItems:function(a,b){if(a==null)return b==null?!0:!1;switch(a._hx_index){case 0:return b==
null?!1:b._hx_index==0?!0:!1;case 1:return b==null?!1:b._hx_index==1?a.m==b.m:!1;case 2:if(b==null)return!1;if(b._hx_index==2){var c=b.s,d=b.line,f=b.column,g=a.column,h=a.line,l=a.s;return a.file==b.file&&h==d&&g==f?si.equalItems(l,c):!1}return!1;case 3:return b==null?!1:b._hx_index==3?(c=b.method,d=a.method,a.classname==b.classname?d==c:!1):!1;case 4:return b==null?!1:b._hx_index==4?a.v==b.v:!1}},itemToString:function(a,b){switch(b._hx_index){case 0:a.b+="a C function";break;case 1:b=b.m;a.b+="module ";
a.b+=b==null?"null":""+b;break;case 2:var c=b.s,d=b.file,f=b.line;b=b.column;c!=null&&(si.itemToString(a,c),a.b+=" (");a.b+=d==null?"null":""+d;a.b+=" line ";a.b+=f==null?"null":""+f;b!=null&&(a.b+=" column ",a.b+=b==null?"null":""+b);c!=null&&(a.b+=")");break;case 3:c=b.classname;b=b.method;a.b+=L.string(c==null?"<unknown>":c);a.b+=".";a.b+=b==null?"null":""+b;break;case 4:b=b.v,a.b+="local function #",a.b+=b==null?"null":""+b}}},la=function(a,b,c){Error.call(this,a);this.message=a;this.__previousException=
b;this.__nativeException=c!=null?c:this;this.__skipStack=0;a=Error.prepareStackTrace;Error.prepareStackTrace=function(d){return d.stack};if(c instanceof Error)this.stack=c.stack;else{c=null;if(Error.captureStackTrace)Error.captureStackTrace(this,la),c=this;else if(c=Error(),typeof c.stack=="undefined"){try{throw c;}catch(d){}this.__skipStack++}this.stack=c.stack}Error.prepareStackTrace=a};r["haxe.Exception"]=la;la.__name__="haxe.Exception";la.caught=function(a){return a instanceof la?a:a instanceof
Error?new la(a.message,null,a):new fp(a,null,a)};la.thrown=function(a){if(a instanceof la)return a.get_native();if(a instanceof Error)return a;a=new fp(a);a.__skipStack++;return a};la.__super__=Error;la.prototype=I(Error.prototype,{__skipStack:null,__nativeException:null,__previousException:null,unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},details:function(){if(this.get_previous()==null){var a="Exception: "+this.toString(),b=this.get_stack();return a+
(b==null?"null":si.toString(b))}b="";var c=this;for(a=null;c!=null;){if(a==null){var d="Exception: "+c.get_message();a=c.get_stack();b=d+(a==null?"null":si.toString(a))+b}else a=si.subtract(c.get_stack(),a.get_stack()),b="Exception: "+c.get_message()+(a==null?"null":si.toString(a))+"\n\nNext "+b;a=c;c=c.get_previous()}return b},__shiftStack:function(){this.__skipStack++},get_message:function(){return this.message},get_previous:function(){return this.__previousException},get_native:function(){return this.__nativeException},
get_stack:function(){var a=this.__exceptionStack;return a==null?(a=Rb.toHaxe(Rb.normalize(this.stack),this.__skipStack),this.setProperty("__exceptionStack",a),a):a},setProperty:function(a,b){try{Object.defineProperty(this,a,{value:b})}catch(c){this[a]=b}},__class__:la,__properties__:{get_native:"get_native",get_previous:"get_previous",get_stack:"get_stack",get_message:"get_message"}});var bx={},zb=function(a,b){this.high=a;this.low=b};r["haxe._Int64.___Int64"]=zb;zb.__name__="haxe._Int64.___Int64";
zb.prototype={high:null,low:null,__class__:zb};var Me=function(){};r["haxe.Log"]=Me;Me.__name__="haxe.Log";Me.formatOutput=function(a,b){var c=L.string(a);if(b==null)return c;var d=b.fileName+":"+b.lineNumber;if(b.customParams!=null){var f=0;for(b=b.customParams;f<b.length;)a=b[f],++f,c+=", "+L.string(a)}return d+": "+c};Me.trace=function(a,b){a=Me.formatOutput(a,b);typeof console!="undefined"&&console.log!=null&&console.log(a)};var Rb=function(){};r["haxe.NativeStackTrace"]=Rb;Rb.__name__="haxe.NativeStackTrace";
Rb.saveStack=function(a){Rb.lastError=a};Rb.callStack=function(){var a=Error(""),b=Rb.tryHaxeStack(a);if(typeof b=="undefined"){try{throw a;}catch(c){}b=a.stack}return Rb.normalize(b,2)};Rb.exceptionStack=function(){return Rb.normalize(Rb.tryHaxeStack(Rb.lastError))};Rb.toHaxe=function(a,b){b==null&&(b=0);if(a==null)return[];if(typeof a=="string"){a=a.split("\n");a[0]=="Error"&&a.shift();for(var c=[],d=0,f=a.length;d<f;){var g=d++;if(!(b>g)){var h=a[g];g=h.match(/^    at ([$A-Za-z0-9_. ]+) \(([^)]+):([0-9]+):([0-9]+)\)$/);
if(g!=null){h=g[1].split(".");h[0]=="$hxClasses"&&h.shift();var l=h.pop(),k=g[2],q=L.parseInt(g[3]);g=L.parseInt(g[4]);c.push(Bj.FilePos(l=="Anonymous function"?Bj.LocalFunction():l=="Global code"?null:Bj.Method(h.join("."),l),k,q,g))}else c.push(Bj.Module(Z.trim(h)))}}return c}return b>0&&Array.isArray(a)?a.slice(b):a};Rb.tryHaxeStack=function(a){if(a==null)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=Rb.prepareHxStackTrace;a=a.stack;Error.prepareStackTrace=b;return a};Rb.prepareHxStackTrace=
function(a,b){a=[];for(var c=0;c<b.length;){var d=b[c];++c;Rb.wrapCallSite!=null&&(d=Rb.wrapCallSite(d));var f=null,g=d.getFunctionName();if(g!=null){var h=g.lastIndexOf(".");h>=0?(f=g.substring(0,h),g=g.substring(h+1),f=Bj.Method(f,g)):f=Bj.Method(null,g)}g=d.getFileName();h=g==null?-1:g.indexOf("file:");Rb.wrapCallSite!=null&&h>0&&(g=g.substring(h+6));a.push(Bj.FilePos(f,g,d.getLineNumber(),d.getColumnNumber()))}return a};Rb.normalize=function(a,b){b==null&&(b=0);if(Array.isArray(a)&&b>0)return a.slice(b);
if(typeof a=="string"){switch(a.substring(0,6)){case "Error\n":case "Error:":++b}return Rb.skipLines(a,b)}return a};Rb.skipLines=function(a,b,c){c==null&&(c=0);return b>0?(c=a.indexOf("\n",c),c<0?"":Rb.skipLines(a,--b,c+1)):a.substring(c)};var qg=function(){this.buf=new ec;this.cache=[];this.useCache=qg.USE_CACHE;this.useEnumIndex=qg.USE_ENUM_INDEX;this.shash=new aa;this.scount=0};r["haxe.Serializer"]=qg;qg.__name__="haxe.Serializer";qg.run=function(a){var b=new qg;b.serialize(a);return b.toString()};
qg.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(a){var b=this.shash.h[a];b!=null?(this.buf.b+="R",this.buf.b+=b==null?"null":""+b):(this.shash.h[a]=this.scount++,this.buf.b+="y",a=encodeURIComponent(a),this.buf.b+=L.string(a.length),this.buf.b+=":",this.buf.b+=a==null?"null":""+a)},serializeRef:function(a){for(var b=typeof a,c=0,d=this.cache.length;c<d;){var f=c++,g=this.cache[f];if(typeof g==
b&&g==a)return this.buf.b+="r",this.buf.b+=f==null?"null":""+f,!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=0,c=A.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(A.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=Aa.typeof(a);switch(b._hx_index){case 0:this.buf.b+="n";break;case 1:if(a==0){this.buf.b+="z";break}this.buf.b+="i";this.buf.b+=a==null?"null":""+a;break;case 2:isNaN(a)?this.buf.b+="k":isFinite(a)?(this.buf.b+="d",this.buf.b+=
a==null?"null":""+a):this.buf.b+=a<0?"m":"p";break;case 3:this.buf.b+=a?"t":"f";break;case 4:u.__instanceof(a,Gt)?(a=a.__name__,this.buf.b+="A",this.serializeString(a)):u.__instanceof(a,$w)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+="o",this.serializeFields(a));break;case 5:throw la.thrown("Cannot serialize function");case 6:b=b.c;if(b==String){this.serializeString(a);break}if(this.useCache&&this.serializeRef(a))break;switch(b){case Array:var c=
0;this.buf.b+="a";for(var d=0,f=a.length;d<f;)b=d++,a[b]==null?++c:(c>0&&(c==1?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=c==null?"null":""+c),c=0),this.serialize(a[b]));c>0&&(c==1?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=c==null?"null":""+c));this.buf.b+="h";break;case Date:this.buf.b+="v";this.buf.b+=L.string(a.getTime());break;case we:this.buf.b+="q";for(b=a.keys();b.hasNext();)c=b.next(),this.buf.b+=":",this.buf.b+=c==null?"null":""+c,this.serialize(a.h[c]);this.buf.b+="h";break;case Xa:this.buf.b+=
"l";for(a=a.h;a!=null;)b=a.item,a=a.next,this.serialize(b);this.buf.b+="h";break;case Na:this.buf.b+="M";for(b=a.keys();b.hasNext();){c=b.next();var g=A.field(c,"__id__");A.deleteField(c,"__id__");this.serialize(c);c.__id__=g;this.serialize(a.h[c.__id__])}this.buf.b+="h";break;case aa:this.buf.b+="b";c=Object.keys(a.h);g=c.length;for(d=0;d<g;)b=c[d++],this.serializeString(b),this.serialize(a.h[b]);this.buf.b+="h";break;case Ia:this.buf.b+="s";this.buf.b+=L.string(Math.ceil(a.length*8/6));this.buf.b+=
":";b=0;c=a.length-2;g=qg.BASE64_CODES;if(g==null){g=Array(qg.BASE64.length);d=0;for(f=qg.BASE64.length;d<f;){var h=d++;g[h]=X.cca(qg.BASE64,h)}qg.BASE64_CODES=g}for(;b<c;)d=a.b[b++],f=a.b[b++],h=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[(f<<2|h>>6)&63]),this.buf.b+=String.fromCodePoint(g[h&63]);b==c?(d=a.b[b++],f=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<
4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[f<<2&63])):b==c+1&&(d=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[d<<4&63]));break;default:this.useCache&&this.cache.pop(),a.hxSerialize!=null?(this.buf.b+="C",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),a.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),this.serializeFields(a))}break;case 7:b=b.e;if(this.useCache){if(this.serializeRef(a))break;
this.cache.pop()}this.buf.b+=L.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=":",this.buf.b+=L.string(a._hx_index)):(b=a,this.serializeString(O[b.__enum__].__constructs__[b._hx_index]._hx_name));this.buf.b+=":";c=Aa.enumParameters(a);this.buf.b+=L.string(c.length);for(b=0;b<c.length;)g=c[b],++b,this.serialize(g);this.useCache&&this.cache.push(a);break;default:throw la.thrown("Cannot serialize "+L.string(a));}},__class__:qg};var rd=function(a){var b=
this;this.id=setInterval(function(){b.run()},a)};r["haxe.Timer"]=rd;rd.__name__="haxe.Timer";rd.delay=function(a,b){var c=new rd(b);c.run=function(){c.stop();a()};return c};rd.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();Me.trace((new Date).getTime()/1E3-c+"s",b);return a};rd.stamp=function(){return(new Date).getTime()/1E3};rd.prototype={id:null,stop:function(){this.id!=null&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:rd};var jr=function(){};r["haxe._Unserializer.DefaultResolver"]=
jr;jr.__name__="haxe._Unserializer.DefaultResolver";jr.prototype={resolveClass:function(a){return r[a]},resolveEnum:function(a){return O[a]},__class__:jr};var Gg=function(a){this.buf=a;this.length=this.buf.length;this.pos=0;this.scache=[];this.cache=[];a=Gg.DEFAULT_RESOLVER;a==null&&(a=new jr,Gg.DEFAULT_RESOLVER=a);this.resolver=a};r["haxe.Unserializer"]=Gg;Gg.__name__="haxe.Unserializer";Gg.initCodes=function(){for(var a=[],b=0,c=Gg.BASE64.length;b<c;){var d=b++;a[Gg.BASE64.charCodeAt(d)]=d}return a};
Gg.run=function(a){return(new Gg(a)).unserialize()};Gg.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){a==null?(sn.instance==null&&(sn.instance=new sn),this.resolver=sn.instance):this.resolver=a},readDigits:function(){for(var a=0,b=!1,c=this.pos;;){var d=this.buf.charCodeAt(this.pos);if(d!=d)break;if(d==45){if(this.pos!=c)break;b=!0}else{if(d<48||d>57)break;a=a*10+(d-48)}this.pos++}b&&(a*=-1);return a},readFloat:function(){for(var a=this.pos;;){var b=
this.buf.charCodeAt(this.pos);if(b!=b)break;if(b>=43&&b<58||b==101||b==69)this.pos++;else break}return parseFloat(X.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw la.thrown("Invalid object");if(this.buf.charCodeAt(this.pos)==103)break;var b=this.unserialize();if(typeof b!="string")throw la.thrown("Invalid object key");var c=this.unserialize();a[b]=c}this.pos++},unserializeEnum:function(a,b){if(this.buf.charCodeAt(this.pos++)!=58)throw la.thrown("Invalid enum format");
var c=this.readDigits();if(c==0)return Aa.createEnum(a,b);for(var d=[];c-- >0;)d.push(this.unserialize());return Aa.createEnum(a,b,d)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var a=this.unserialize(),b=this.resolver.resolveClass(a);if(b==null)throw la.thrown("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(b==null)throw la.thrown("Enum not found "+a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(b==
null)throw la.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);b.hxUnserialize(this);if(this.buf.charCodeAt(this.pos++)!=103)throw la.thrown("Invalid custom data");return b;case 77:a=new Na;this.cache.push(a);for(var c;this.buf.charCodeAt(this.pos)!=104;)b=this.unserialize(),a.set(b,this.unserialize());this.pos++;return a;case 82:a=this.readDigits();if(a<0||a>=this.scache.length)throw la.thrown("Invalid string reference");return this.scache[a];case 97:b=[];for(this.cache.push(b);;){c=
this.buf.charCodeAt(this.pos);if(c==104){this.pos++;break}c==117?(this.pos++,a=this.readDigits(),b[b.length+a-1]=null):b.push(this.unserialize())}return b;case 98:a=new aa;for(this.cache.push(a);this.buf.charCodeAt(this.pos)!=104;)b=this.unserialize(),c=this.unserialize(),a.h[b]=c;this.pos++;return a;case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(b==null)throw la.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);this.unserializeObject(b);return b;case 100:return this.readFloat();
case 102:return!1;case 105:return this.readDigits();case 106:a=this.unserialize();c=this.resolver.resolveEnum(a);if(c==null)throw la.thrown("Enum not found "+a);this.pos++;for(var d=this.readDigits(),f=c.__constructs__,g=Array(f.length),h=0,l=f.length;h<l;)b=h++,g[b]=f[b]._hx_name;b=g[d];if(b==null)throw la.thrown("Unknown enum index "+a+"@"+d);b=this.unserializeEnum(c,b);this.cache.push(b);return b;case 107:return NaN;case 108:b=new Xa;for(this.cache.push(b);this.buf.charCodeAt(this.pos)!=104;)b.add(this.unserialize());
this.pos++;return b;case 109:return-Infinity;case 110:return null;case 111:return b={},this.cache.push(b),this.unserializeObject(b),b;case 112:return Infinity;case 113:a=new we;this.cache.push(a);for(c=this.buf.charCodeAt(this.pos++);c==58;)b=this.readDigits(),c=this.unserialize(),a.h[b]=c,c=this.buf.charCodeAt(this.pos++);if(c!=104)throw la.thrown("Invalid IntMap format");return a;case 114:a=this.readDigits();if(a<0||a>=this.cache.length)throw la.thrown("Invalid reference");return this.cache[a];
case 115:a=this.readDigits();c=this.buf;if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<a)throw la.thrown("Invalid bytes length");d=Gg.CODES;d==null&&(d=Gg.initCodes(),Gg.CODES=d);b=this.pos;f=a&3;g=b+(a-f);h=new Ia(new ArrayBuffer((a>>2)*3+(f>=2?f-1:0)));for(l=0;b<g;){var k=d[c.charCodeAt(b++)],q=d[c.charCodeAt(b++)];h.b[l++]=k<<2|q>>4;k=d[c.charCodeAt(b++)];h.b[l++]=q<<4|k>>2;q=d[c.charCodeAt(b++)];h.b[l++]=k<<6|q}f>=2&&(k=d[c.charCodeAt(b++)],q=d[c.charCodeAt(b++)],h.b[l++]=k<<2|q>>
4,f==3&&(k=d[c.charCodeAt(b++)],h.b[l++]=q<<4|k>>2));this.pos+=a;this.cache.push(h);return h;case 116:return!0;case 118:return 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?(b=X.strDate(X.substr(this.buf,this.pos,19)),this.pos+=
19):b=new Date(this.readFloat()),this.cache.push(b),b;case 119:a=this.unserialize();c=this.resolver.resolveEnum(a);if(c==null)throw la.thrown("Enum not found "+a);b=this.unserializeEnum(c,this.unserialize());this.cache.push(b);return b;case 120:throw la.thrown(this.unserialize());case 121:a=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<a)throw la.thrown("Invalid string length");b=X.substr(this.buf,this.pos,a);this.pos+=a;b=decodeURIComponent(b.split("+").join(" "));
this.scache.push(b);return b;case 122:return 0}this.pos--;throw la.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Gg};var sn=function(){};r["haxe._Unserializer.NullResolver"]=sn;sn.__name__="haxe._Unserializer.NullResolver";sn.prototype={resolveClass:function(a){return null},resolveEnum:function(a){return null},__class__:sn};var fp=function(a,b,c){la.call(this,String(a),b,c);this.value=a;this.__skipStack++};r["haxe.ValueException"]=fp;fp.__name__="haxe.ValueException";
fp.__super__=la;fp.prototype=I(la.prototype,{value:null,unwrap:function(){return this.value},__class__:fp});var xl=function(){this.a1=1;this.a2=0};r["haxe.crypto.Adler32"]=xl;xl.__name__="haxe.crypto.Adler32";xl.read=function(a){var b=new xl,c=a.readByte(),d=a.readByte(),f=a.readByte();a=a.readByte();b.a1=f<<8|a;b.a2=c<<8|d;return b};xl.make=function(a){var b=new xl;b.update(a,0,a.length);return b.get()};xl.prototype={a1:null,a2:null,get:function(){return this.a2<<16|this.a1},update:function(a,b,
c){var d=this.a1,f=this.a2,g=b;for(b+=c;g<b;)c=g++,d=(d+a.b[c])%65521,f=(f+d)%65521;this.a1=d;this.a2=f},equals:function(a){return a.a1==this.a1?a.a2==this.a2:!1},toString:function(){return Z.hex(this.a2,8)+Z.hex(this.a1,8)},__class__:xl};var ic=function(a,b){ic.initTable();a!=null&&this.init(a,b)};r["haxe.crypto.Aes"]=ic;ic.__name__="haxe.crypto.Aes";ic.initTable=function(){ic.SBOX=Array(256);ic.RSBOX=Array(256);ic.SUB_BYTES_MIX_COLUMN_0=Array(256);ic.SUB_BYTES_MIX_COLUMN_1=Array(256);ic.SUB_BYTES_MIX_COLUMN_2=
Array(256);ic.SUB_BYTES_MIX_COLUMN_3=Array(256);ic.RSUB_BYTES_MIX_COLUMN_0=Array(256);ic.RSUB_BYTES_MIX_COLUMN_1=Array(256);ic.RSUB_BYTES_MIX_COLUMN_2=Array(256);ic.RSUB_BYTES_MIX_COLUMN_3=Array(256);ic.RCON=Array(11);for(var a=Array(256),b=0;b<256;){var c=b++;a[c]=c<128?c<<1:c<<1^283}var d=c=0;for(b=0;b<256;){b++;var f=d^d<<1^d<<2^d<<3^d<<4;f=f>>>8^f&255^99;ic.SBOX[c]=f;ic.RSBOX[f]=c;var g=a[c],h=a[g],l=a[h],k=a[f]*257^bx._mul(f,16843008);ic.SUB_BYTES_MIX_COLUMN_0[c]=k<<24|k>>>8;ic.SUB_BYTES_MIX_COLUMN_1[c]=
k<<16|k>>>16;ic.SUB_BYTES_MIX_COLUMN_2[c]=k<<8|k>>>24;ic.SUB_BYTES_MIX_COLUMN_3[c]=k;k=l*16843009^h*65537^g*257^c*16843008;ic.RSUB_BYTES_MIX_COLUMN_0[f]=k<<24|k>>>8;ic.RSUB_BYTES_MIX_COLUMN_1[f]=k<<16|k>>>16;ic.RSUB_BYTES_MIX_COLUMN_2[f]=k<<8|k>>>24;ic.RSUB_BYTES_MIX_COLUMN_3[f]=k;c==0?c=d=1:(c=g^a[a[a[l^g]]],d^=a[a[d]])}ic.RCON[0]=0;ic.RCON[1]=1;ic.RCON[2]=2;ic.RCON[3]=4;ic.RCON[4]=8;ic.RCON[5]=16;ic.RCON[6]=32;ic.RCON[7]=64;ic.RCON[8]=128;ic.RCON[9]=27;ic.RCON[10]=54};ic.prototype={Nk:null,Nr:null,
roundKey:null,rRoundKey:null,keyRows:null,state:null,key:null,iv:null,set_iv:function(a){return this.iv=a},init:function(a,b){this.key=a;this.Nk=a.length>>2;this.Nr=this.Nk+6;this.keyRows=(this.Nr+1)*4;this.state=Array(this.Nk);this.set_iv(b);this.keyExpansion(a)},keyExpansion:function(a){this.roundKey=Array(this.keyRows);for(var b=0,c=this.keyRows;b<c;){var d=b++;if(d<this.Nk)this.roundKey[d]=this.bytesToInt32(a,d<<2);else{var f=this.roundKey[d-1];d%this.Nk==0?(f=f<<8|f>>>24,f=ic.SBOX[f>>>24]<<24|
ic.SBOX[f>>>16&255]<<16|ic.SBOX[f>>>8&255]<<8|ic.SBOX[f&255],f^=ic.RCON[Math.floor(d/this.Nk)|0]<<24):this.Nk>6&&d%this.Nk==4&&(f=ic.SBOX[f>>>24]<<24|ic.SBOX[f>>>16&255]<<16|ic.SBOX[f>>>8&255]<<8|ic.SBOX[f&255]);this.roundKey[d]=this.roundKey[d-this.Nk]^f}}this.rRoundKey=Array(this.keyRows);b=0;for(c=this.keyRows;b<c;)d=b++,a=this.keyRows-d,f=d%4!=0?this.roundKey[a]:this.roundKey[a-4],this.rRoundKey[d]=d<4||a<=4?f:ic.RSUB_BYTES_MIX_COLUMN_0[ic.SBOX[f>>>24]]^ic.RSUB_BYTES_MIX_COLUMN_1[ic.SBOX[f>>>
16&255]]^ic.RSUB_BYTES_MIX_COLUMN_2[ic.SBOX[f>>>8&255]]^ic.RSUB_BYTES_MIX_COLUMN_3[ic.SBOX[f&255]]},getBlockSize:function(){return 16},encrypt:function(a,b,c,d,f,g){f==null&&(f=16);c==null&&(c="NoPadding");switch(c){case "AnsiX923":var h=kr.pad(b,16);break;case "BitPadding":h=gp.pad(b,16);break;case "ISO10126":h=lr.pad(b,16);break;case "NoPadding":h=mr.pad(b,16);break;case "NullPadding":h=nr.pad(b,16);break;case "PKCS7":h=or.pad(b,16);break;case "SpacePadding":h=pr.pad(b,16);break;case "TBC":h=qr.pad(b,
16)}switch(a){case "cbc":rr.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ccm":return gg.encrypt(h,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":sr.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ctr":ak.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "eax":return vh.encrypt(h,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":tr.encrypt(h,16,m(this,this.encryptBlock));break;case "gcm":return Re.encrypt(h,this.iv,d,f,16,m(this,this.encryptBlock));
case "gcmsiv":return Sb.encrypt(this.key,this.iv,h,d,m(this,this.encryptBlock),m(this,this.init));case "ofb":hp.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":ur.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "siv":return Of.encrypt(this.key,h,this.iv,g,m(this,this.encryptBlock),m(this,this.init))}return h},decrypt:function(a,b,c,d,f,g){f==null&&(f=16);c==null&&(c="NoPadding");b=b.sub(0,b.length);switch(a){case "cbc":rr.decrypt(b,this.iv,16,m(this,this.decryptBlock));
break;case "ccm":return gg.decrypt(b,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":sr.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "ctr":ak.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "eax":return vh.decrypt(b,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":tr.decrypt(b,16,m(this,this.decryptBlock));break;case "gcm":return Re.decrypt(b,this.iv,d,f,16,m(this,this.encryptBlock));case "gcmsiv":return Sb.decrypt(this.key,this.iv,b,d,m(this,this.encryptBlock),
m(this,this.init));case "ofb":hp.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":ur.decrypt(b,this.iv,16,m(this,this.decryptBlock));break;case "siv":return Of.decrypt(this.key,b,this.iv,g,m(this,this.encryptBlock),m(this,this.init))}switch(c){case "AnsiX923":b=kr.unpad(b);break;case "BitPadding":b=gp.unpad(b);break;case "ISO10126":b=lr.unpad(b);break;case "NoPadding":b=mr.unpad(b);break;case "NullPadding":b=nr.unpad(b);break;case "PKCS7":b=or.unpad(b);break;case "SpacePadding":b=
pr.unpad(b);break;case "TBC":b=qr.unpad(b)}return b},encryptBlock:function(a,b,c,d){this.state[0]=this.bytesToInt32(a,b);this.state[1]=this.bytesToInt32(a,b+4);this.state[2]=this.bytesToInt32(a,b+8);this.state[3]=this.bytesToInt32(a,b+12);this.generateBlock(this.roundKey,ic.SUB_BYTES_MIX_COLUMN_0,ic.SUB_BYTES_MIX_COLUMN_1,ic.SUB_BYTES_MIX_COLUMN_2,ic.SUB_BYTES_MIX_COLUMN_3,ic.SBOX);this.int32ToBytes(this.state[0],c,d);this.int32ToBytes(this.state[1],c,d+4);this.int32ToBytes(this.state[2],c,d+8);this.int32ToBytes(this.state[3],
c,d+12)},decryptBlock:function(a,b,c,d){d==null&&(d=0);this.state[0]=this.bytesToInt32(a,b);this.state[1]=this.bytesToInt32(a,b+4);this.state[2]=this.bytesToInt32(a,b+8);this.state[3]=this.bytesToInt32(a,b+12);a=this.state[1];this.state[1]=this.state[3];this.state[3]=a;this.generateBlock(this.rRoundKey,ic.RSUB_BYTES_MIX_COLUMN_0,ic.RSUB_BYTES_MIX_COLUMN_1,ic.RSUB_BYTES_MIX_COLUMN_2,ic.RSUB_BYTES_MIX_COLUMN_3,ic.RSBOX);a=this.state[1];this.state[1]=this.state[3];this.state[3]=a;this.int32ToBytes(this.state[0],
c,d);this.int32ToBytes(this.state[1],c,d+4);this.int32ToBytes(this.state[2],c,d+8);this.int32ToBytes(this.state[3],c,d+12)},generateBlock:function(a,b,c,d,f,g){for(var h=this.state[0]^a[0],l=this.state[1]^a[1],k=this.state[2]^a[2],q=this.state[3]^a[3],w=4,v,z,n,E=1,H=this.Nr;E<H;)E++,v=b[h>>>24]^c[l>>>16&255]^d[k>>>8&255]^f[q&255]^a[w++],z=b[l>>>24]^c[k>>>16&255]^d[q>>>8&255]^f[h&255]^a[w++],n=b[k>>>24]^c[q>>>16&255]^d[h>>>8&255]^f[l&255]^a[w++],q=b[q>>>24]^c[h>>>16&255]^d[l>>>8&255]^f[k&255]^a[w++],
h=v,l=z,k=n;v=(g[h>>>24]<<24|g[l>>>16&255]<<16|g[k>>>8&255]<<8|g[q&255])^a[w++];z=(g[l>>>24]<<24|g[k>>>16&255]<<16|g[q>>>8&255]<<8|g[h&255])^a[w++];n=(g[k>>>24]<<24|g[q>>>16&255]<<16|g[h>>>8&255]<<8|g[l&255])^a[w++];q=(g[q>>>24]<<24|g[h>>>16&255]<<16|g[l>>>8&255]<<8|g[k&255])^a[w++];this.state[0]=v;this.state[1]=z;this.state[2]=n;this.state[3]=q},bytesToInt32:function(a,b){var c=(a.b[b]&255)<<24;c|=(a.b[++b]&255)<<16;c|=(a.b[++b]&255)<<8;return c|=a.b[++b]&255},int32ToBytes:function(a,b,c){b.b[c]=
a>>24;b.b[++c]=a>>16;b.b[++c]=a>>8;b.b[++c]=a},__class__:ic,__properties__:{set_iv:"set_iv"}};var Ia=function(a){this.length=a.byteLength;this.b=new Uint8Array(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};r["haxe.io.Bytes"]=Ia;Ia.__name__="haxe.io.Bytes";Ia.ofString=function(a,b){if(b==ip.RawNative){for(var c=new Uint8Array(a.length<<1),d=0,f=a.length;d<f;){b=d++;var g=a.charCodeAt(b);c[b<<1]=g&255;c[b<<1|1]=g>>8}return new Ia(c.buffer)}c=[];for(b=0;b<a.length;)g=a.charCodeAt(b++),55296<=
g&&g<=56319&&(g=g-55232<<10|a.charCodeAt(b++)&1023),g<=127?c.push(g):(g<=2047?c.push(192|g>>6):(g<=65535?c.push(224|g>>12):(c.push(240|g>>18),c.push(128|g>>12&63)),c.push(128|g>>6&63)),c.push(128|g&63));return new Ia((new Uint8Array(c)).buffer)};Ia.ofData=function(a){var b=a.hxBytes;return b!=null?b:new Ia(a)};Ia.ofHex=function(a){if((a.length&1)!=0)throw la.thrown("Not a hex string (odd number of digits)");for(var b=[],c=0,d=a.length>>1;c<d;){var f=a.charCodeAt(c*2),g=a.charCodeAt(c*2+1);f=(f&15)+
((f&64)>>6)*9;g=(g&15)+((g&64)>>6)*9;b.push((f<<4|g)&255);++c}return new Ia((new Uint8Array(b)).buffer)};Ia.prototype={length:null,b:null,data:null,blit:function(a,b,c,d){if(a<0||c<0||d<0||a+d>this.length||c+d>b.length)throw la.thrown(Nh.OutsideBounds);c==0&&d==b.b.byteLength?this.b.set(b.b,a):this.b.set(b.b.subarray(c,c+d),a)},sub:function(a,b){if(a<0||b<0||a+b>this.length)throw la.thrown(Nh.OutsideBounds);return new Ia(this.b.buffer.slice(a+this.b.byteOffset,a+this.b.byteOffset+b))},getDouble:function(a){this.data==
null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat64(a,!0)},getFloat:function(a){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat32(a,!0)},setFloat:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat32(a,b,!0)},setUInt16:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,
this.b.byteLength));this.data.setUint16(a,b,!0)},getInt32:function(a){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getInt32(a,!0)},setInt32:function(a,b){this.data==null&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setInt32(a,b,!0)},getString:function(a,b,c){if(a<0||b<0||a+b>this.length)throw la.thrown(Nh.OutsideBounds);c==null&&(c=ip.UTF8);var d="",f=this.b,g=a;a+=b;switch(c._hx_index){case 0:for(;g<
a;)if(c=f[g++],c<128){if(c==0)break;d+=String.fromCodePoint(c)}else if(c<224)c=(c&63)<<6|f[g++]&127,d+=String.fromCodePoint(c);else if(c<240)b=f[g++],c=(c&31)<<12|(b&127)<<6|f[g++]&127,d+=String.fromCodePoint(c);else{b=f[g++];var h=f[g++];c=(c&15)<<18|(b&127)<<12|(h&127)<<6|f[g++]&127;d+=String.fromCodePoint(c)}break;case 1:for(;g<a;)c=f[g++]|f[g++]<<8,d+=String.fromCodePoint(c)}return d},toString:function(){return this.getString(0,this.length)},toHex:function(){for(var a="",b=[],c=0,d=16;c<d;){var f=
c++;b.push(X.cca("0123456789abcdef",f))}c=0;for(d=this.length;c<d;)f=c++,f=this.b[f],a+=String.fromCodePoint(b[f>>4]),a+=String.fromCodePoint(b[f&15]);return a},__class__:Ia};var ip=O["haxe.io.Encoding"]={__ename__:"haxe.io.Encoding",__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:D},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:D}};ip.__constructs__=[ip.UTF8,ip.RawNative];var Xh=function(){};r["haxe.crypto.Base64"]=Xh;
Xh.__name__="haxe.crypto.Base64";Xh.encode=function(a,b){b==null&&(b=!0);var c=(new vr(Xh.BYTES)).encodeBytes(a).toString();if(b)switch(a.length%3){case 1:c+="==";break;case 2:c+="="}return c};Xh.decode=function(a,b){b==null&&(b=!0);if(b)for(;X.cca(a,a.length-1)==61;)a=X.substr(a,0,-1);return(new vr(Xh.BYTES)).decodeBytes(Ia.ofString(a))};var vr=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(c>8||b!=1<<c)throw la.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};
r["haxe.crypto.BaseCode"]=vr;vr.__name__="haxe.crypto.BaseCode";vr.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(a){for(var b=this.nbits,c=this.base,d=a.length*8/b|0,f=new Ia(new ArrayBuffer(d+(a.length*8%b==0?0:1))),g=0,h=0,l=(1<<b)-1,k=0,q=0;q<d;){for(;h<b;)h+=8,g<<=8,g|=a.b[k++];h-=b;f.b[q++]=c.b[g>>h&l]}h>0&&(f.b[q++]=c.b[g<<b-h&l]);return f},initTable:function(){for(var a=[],b=0;b<256;){var c=b++;a[c]=-1}b=0;for(var d=this.base.length;b<d;)c=b++,a[this.base.b[c]]=c;this.tbl=a},
decodeBytes:function(a){var b=this.nbits;this.tbl==null&&this.initTable();for(var c=this.tbl,d=a.length*b>>3,f=new Ia(new ArrayBuffer(d)),g=0,h=0,l=0,k=0;k<d;){for(;h<8;){h+=b;g<<=b;var q=c[a.b[l++]];if(q==-1)throw la.thrown("BaseCode : invalid encoded char");g|=q}h-=8;f.b[k++]=g>>h&255}return f},__class__:vr};var vj=function(){};r["haxe.crypto.Md5"]=vj;vj.__name__="haxe.crypto.Md5";vj.encode=function(a){var b=new vj;a=b.doEncode(vj.str2blks(a));return b.hex(a)};vj.make=function(a){a=(new vj).doEncode(vj.bytes2blks(a));
var b=new Ia(new ArrayBuffer(16)),c=0;b.b[c++]=a[0]&255;b.b[c++]=a[0]>>8&255;b.b[c++]=a[0]>>16&255;b.b[c++]=a[0]>>>24;b.b[c++]=a[1]&255;b.b[c++]=a[1]>>8&255;b.b[c++]=a[1]>>16&255;b.b[c++]=a[1]>>>24;b.b[c++]=a[2]&255;b.b[c++]=a[2]>>8&255;b.b[c++]=a[2]>>16&255;b.b[c++]=a[2]>>>24;b.b[c++]=a[3]&255;b.b[c++]=a[3]>>8&255;b.b[c++]=a[3]>>16&255;b.b[c++]=a[3]>>>24;return b};vj.bytes2blks=function(a){for(var b=(a.length+8>>6)+1,c=[],d=0,f=b*16;d<f;){var g=d++;c[g]=0}for(g=0;g<a.length;)c[g>>2]|=a.b[g]<<(((a.length<<
3)+g&3)<<3),++g;c[g>>2]|=128<<(a.length*8+g)%4*8;a=a.length*8;b=b*16-2;c[b]=a&255;c[b]|=(a>>>8&255)<<8;c[b]|=(a>>>16&255)<<16;c[b]|=(a>>>24&255)<<24;return c};vj.str2blks=function(a){var b=Ia.ofString(a),c=(b.length+8>>6)+1;a=[];for(var d=0,f=c*16;d<f;){var g=d++;a[g]=0}g=0;f=b.length;for(d=f*8;g<f;)a[g>>2]|=b.b[g]<<(d+g)%4*8,++g;a[g>>2]|=128<<(d+g)%4*8;b=c*16-2;a[b]=d&255;a[b]|=(d>>>8&255)<<8;a[b]|=(d>>>16&255)<<16;a[b]|=(d>>>24&255)<<24;return a};vj.prototype={bitOR:function(a,b){return(a>>>1|b>>>
1)<<1|a&1|b&1},bitXOR:function(a,b){return(a>>>1^b>>>1)<<1|a&1^b&1},bitAND:function(a,b){return(a>>>1&b>>>1)<<1|a&1&b&1},addme:function(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535},hex:function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;b+="0123456789abcdef".charAt(d>>4&15)+"0123456789abcdef".charAt(d&15);b+="0123456789abcdef".charAt(d>>12&15)+"0123456789abcdef".charAt(d>>8&15);b+="0123456789abcdef".charAt(d>>20&15)+"0123456789abcdef".charAt(d>>16&15);b+="0123456789abcdef".charAt(d>>
28&15)+"0123456789abcdef".charAt(d>>24&15)}return b},rol:function(a,b){return a<<b|a>>>32-b},cmn:function(a,b,c,d,f,g){return this.addme(this.rol(this.addme(this.addme(b,a),this.addme(d,g)),f),c)},ff:function(a,b,c,d,f,g,h){return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,f,g,h)},gg:function(a,b,c,d,f,g,h){return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,f,g,h)},hh:function(a,b,c,d,f,g,h){return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,f,g,h)},ii:function(a,
b,c,d,f,g,h){return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,f,g,h)},doEncode:function(a){for(var b=1732584193,c=-271733879,d=-1732584194,f=271733878,g=0;g<a.length;){var h=b,l=c,k=d,q=f;b=this.ff(b,c,d,f,a[g],7,-680876936);f=this.ff(f,b,c,d,a[g+1],12,-389564586);d=this.ff(d,f,b,c,a[g+2],17,606105819);c=this.ff(c,d,f,b,a[g+3],22,-1044525330);b=this.ff(b,c,d,f,a[g+4],7,-176418897);f=this.ff(f,b,c,d,a[g+5],12,1200080426);d=this.ff(d,f,b,c,a[g+6],17,-1473231341);c=this.ff(c,d,f,b,a[g+7],22,-45705983);
b=this.ff(b,c,d,f,a[g+8],7,1770035416);f=this.ff(f,b,c,d,a[g+9],12,-1958414417);d=this.ff(d,f,b,c,a[g+10],17,-42063);c=this.ff(c,d,f,b,a[g+11],22,-1990404162);b=this.ff(b,c,d,f,a[g+12],7,1804603682);f=this.ff(f,b,c,d,a[g+13],12,-40341101);d=this.ff(d,f,b,c,a[g+14],17,-1502002290);c=this.ff(c,d,f,b,a[g+15],22,1236535329);b=this.gg(b,c,d,f,a[g+1],5,-165796510);f=this.gg(f,b,c,d,a[g+6],9,-1069501632);d=this.gg(d,f,b,c,a[g+11],14,643717713);c=this.gg(c,d,f,b,a[g],20,-373897302);b=this.gg(b,c,d,f,a[g+
5],5,-701558691);f=this.gg(f,b,c,d,a[g+10],9,38016083);d=this.gg(d,f,b,c,a[g+15],14,-660478335);c=this.gg(c,d,f,b,a[g+4],20,-405537848);b=this.gg(b,c,d,f,a[g+9],5,568446438);f=this.gg(f,b,c,d,a[g+14],9,-1019803690);d=this.gg(d,f,b,c,a[g+3],14,-187363961);c=this.gg(c,d,f,b,a[g+8],20,1163531501);b=this.gg(b,c,d,f,a[g+13],5,-1444681467);f=this.gg(f,b,c,d,a[g+2],9,-51403784);d=this.gg(d,f,b,c,a[g+7],14,1735328473);c=this.gg(c,d,f,b,a[g+12],20,-1926607734);b=this.hh(b,c,d,f,a[g+5],4,-378558);f=this.hh(f,
b,c,d,a[g+8],11,-2022574463);d=this.hh(d,f,b,c,a[g+11],16,1839030562);c=this.hh(c,d,f,b,a[g+14],23,-35309556);b=this.hh(b,c,d,f,a[g+1],4,-1530992060);f=this.hh(f,b,c,d,a[g+4],11,1272893353);d=this.hh(d,f,b,c,a[g+7],16,-155497632);c=this.hh(c,d,f,b,a[g+10],23,-1094730640);b=this.hh(b,c,d,f,a[g+13],4,681279174);f=this.hh(f,b,c,d,a[g],11,-358537222);d=this.hh(d,f,b,c,a[g+3],16,-722521979);c=this.hh(c,d,f,b,a[g+6],23,76029189);b=this.hh(b,c,d,f,a[g+9],4,-640364487);f=this.hh(f,b,c,d,a[g+12],11,-421815835);
d=this.hh(d,f,b,c,a[g+15],16,530742520);c=this.hh(c,d,f,b,a[g+2],23,-995338651);b=this.ii(b,c,d,f,a[g],6,-198630844);f=this.ii(f,b,c,d,a[g+7],10,1126891415);d=this.ii(d,f,b,c,a[g+14],15,-1416354905);c=this.ii(c,d,f,b,a[g+5],21,-57434055);b=this.ii(b,c,d,f,a[g+12],6,1700485571);f=this.ii(f,b,c,d,a[g+3],10,-1894986606);d=this.ii(d,f,b,c,a[g+10],15,-1051523);c=this.ii(c,d,f,b,a[g+1],21,-2054922799);b=this.ii(b,c,d,f,a[g+8],6,1873313359);f=this.ii(f,b,c,d,a[g+15],10,-30611744);d=this.ii(d,f,b,c,a[g+6],
15,-1560198380);c=this.ii(c,d,f,b,a[g+13],21,1309151649);b=this.ii(b,c,d,f,a[g+4],6,-145523070);f=this.ii(f,b,c,d,a[g+11],10,-1120210379);d=this.ii(d,f,b,c,a[g+2],15,718787259);c=this.ii(c,d,f,b,a[g+9],21,-343485551);b=this.addme(b,h);c=this.addme(c,l);d=this.addme(d,k);f=this.addme(f,q);g+=16}return[b,c,d,f]},__class__:vj};var rr=function(){};r["haxe.crypto.mode.CBC"]=rr;rr.__name__="haxe.crypto.mode.CBC";rr.encrypt=function(a,b,c,d){b=b.b.bufferValue;for(var f=0,g=a.length,h=0;f<g;){for(var l=0,
k=c;l<k;){var q=l++;a.b[f+q]^=b.bytes[h+q]}d(a,f,a,f);h=f;b=a.b.bufferValue;f+=c}};rr.decrypt=function(a,b,c,d){for(var f=a.length-c,g=a.length;g>0;)if(g-=c,f-=c,d(a,g,a,g),f<0)for(var h=0,l=c;h<l;){var k=h++;a.b[k]^=b.b[k]}else for(h=0,l=c;h<l;)k=h++,a.b[g+k]^=a.b[f+k]};var gg=function(){};r["haxe.crypto.mode.CCM"]=gg;gg.__name__="haxe.crypto.mode.CCM";gg.encrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw la.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||(d&1)!=0)throw la.thrown("Tag length must be even and between 4 and 16 bytes");
var h=(c.length>0?64:0)|d-2>>1<<3|15-b.length-1,l=new Ia(new ArrayBuffer(f));l.b[0]=h;l.blit(1,b,0,b.length);h=a.length;for(var k=15;h>0;)l.b[k]=h&255,h>>>=8,--k;c=gg.createAuthBlocks(l,c,a,f);c=gg.computeCBCMac(c,f,g);a=gg.encryptCTR(b,a,f,g);b=gg.encryptTag(b,c,d,f,g);f=new Ia(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,b,0,d);return f};gg.decrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw la.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||
(d&1)!=0)throw la.thrown("Tag length must be even and between 4 and 16 bytes");if(a.length<d)throw la.thrown("Ciphertext too short for specified tag length");var h=a.length-d,l=a.sub(0,h);a=a.sub(h,d);l=gg.encryptCTR(b,l,f,g);var k=(c.length>0?64:0)|d-2>>1<<3|15-b.length-1;h=new Ia(new ArrayBuffer(f));h.b[0]=k;h.blit(1,b,0,b.length);k=l.length;for(var q=15;k>0;)h.b[q]=k&255,k>>>=8,--q;c=gg.createAuthBlocks(h,c,l,f);c=gg.computeCBCMac(c,f,g);b=gg.encryptTag(b,c,d,f,g);if(!gg.constantTimeCompare(b,
a))throw la.thrown("Authentication failed");return l};gg.createAuthBlocks=function(a,b,c,d){var f=[];f.push(a);if(b.length>0){a=gg.formatAuthData(b);b=0;for(var g=a.length;g>0;){var h=new Ia(new ArrayBuffer(d)),l=g<d?g:d;h.blit(0,a,b,l);f.push(h);b+=d;g-=d}}if(c.length>0)for(b=0,g=c.length;g>0;)h=new Ia(new ArrayBuffer(d)),l=g<d?g:d,h.blit(0,c,b,l),f.push(h),b+=d,g-=d;return f};gg.computeCBCMac=function(a,b,c){for(var d=new Ia(new ArrayBuffer(b)),f=0,g=a.length;f<g;){var h=f++;h=a[h];for(var l=0,
k=b;l<k;){var q=l++;d.b[q]^=h.b[q]}c(d,0,d,0)}return d};gg.formatAuthData=function(a){if(a.length==0)return new Ia(new ArrayBuffer(0));var b=a.length;if(b<65280){var c=new Ia(new ArrayBuffer(2+b));c.b[0]=b>>>8;c.b[1]=b&255;c.blit(2,a,0,b)}else b<=-1?(c=new Ia(new ArrayBuffer(6+b)),c.b[0]=255,c.b[1]=254,c.b[2]=b>>>24,c.b[3]=b>>>16&255,c.b[4]=b>>>8&255,c.b[5]=b&255,c.blit(6,a,0,b)):(c=new Ia(new ArrayBuffer(10+b)),c.b[0]=255,c.b[1]=255,c.b[2]=0,c.b[3]=0,c.b[4]=0,c.b[5]=0,c.b[6]=b>>>24,c.b[7]=b>>>16&
255,c.b[8]=b>>>8&255,c.b[9]=b&255,c.blit(10,a,0,b));return c};gg.encryptCTR=function(a,b,c,d){if(b.length==0)return new Ia(new ArrayBuffer(0));var f=new Ia(new ArrayBuffer(b.length)),g=new Ia(new ArrayBuffer(c)),h=new Ia(new ArrayBuffer(c));g.b[0]=15-a.length-1;g.blit(1,a,0,a.length);a=0;for(var l=1,k=b.length;k>0;){for(var q=l,w=15;q>0;)g.b[w]=q&255,q>>>=8,--w;d(g,0,h,0);q=0;for(w=k<c?k:c;q<w;){var v=q++;f.b[a+v]=b.b[a+v]^h.b[v]}a+=c;k-=c;++l}return f};gg.encryptTag=function(a,b,c,d,f){var g=new Ia(new ArrayBuffer(d));
g.b[0]=15-a.length-1;g.blit(1,a,0,a.length);a=new Ia(new ArrayBuffer(d));f(g,0,a,0);f=new Ia(new ArrayBuffer(c));for(g=0;g<c;)d=g++,f.b[d]=b.b[d]^a.b[d];return f};gg.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var sr=function(){};r["haxe.crypto.mode.CFB"]=sr;sr.__name__="haxe.crypto.mode.CFB";sr.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length;f<g;){d(b,0,b,0);for(var h=0,l=f+c>g?g-f:
c;h<l;){var k=h++;a.b[f+k]^=b.b[k];b.b[k]=a.b[f+k]}f+=c}};sr.decrypt=function(a,b,c,d){var f=b.sub(0,b.length),g=0,h=a.length;for(b=new Ia(new ArrayBuffer(b.length));g<h;){d(f,0,b,0);for(var l=0,k=g+c>h?h-g:c;l<k;){var q=l++;f.b[q]=a.b[g+q];a.b[g+q]^=b.b[q]}g+=c}};var wf=function(){};r["haxe.crypto.mode.CMAC"]=wf;wf.__name__="haxe.crypto.mode.CMAC";wf.calculate=function(a,b){wf.aes==null?wf.aes=new ic(b):wf.aes.init(b);return wf.generate(a,b,16,(G=wf.aes,m(G,G.encryptBlock)))};wf.generate=function(a,
b,c,d){b=wf.generateSubkeys(b,c,d);var f=b.k1,g=b.k2,h=a.length,l=Math.ceil(h/c);l==0&&(l=1);if(h==0)b=new Ia(new ArrayBuffer(c)),b.b[0]=128,h=!1;else if(h%c==0)b=a.sub(h-c,c),h=!0;else{var k=h%c;b=new Ia(new ArrayBuffer(c));b.blit(0,a,h-k,k);b.b[k]=128;h=!1}k=h?f:g;f=0;for(g=c;f<g;)h=f++,b.b[h]^=k.b[h];k=new Ia(new ArrayBuffer(c));f=0;for(g=l-1;f<g;){l=f++*c;for(var q=0,w=c;q<w;)h=q++,k.b[h]^=a.b[l+h];d(k,0,k,0)}f=0;for(g=c;f<g;)h=f++,k.b[h]^=b.b[h];d(k,0,k,0);return k};wf.verify=function(a,b,c,
d){d==null&&(wf.aes==null?wf.aes=new ic(c):wf.aes.init(c),d=(G=wf.aes,m(G,G.encryptBlock)));a=wf.generate(a,c,16,d);if(b.length!=a.length)return!1;d=c=0;for(var f=b.length;d<f;){var g=d++;c|=b.b[g]^a.b[g]}return c==0};wf.generateSubkeys=function(a,b,c){if(b==16)a=135;else if(b==8)a=27;else throw la.thrown("Unsupported block size for CMAC");var d=(new Ia(new ArrayBuffer(b))).sub(0,b);c(d,0,d,0);c=wf.leftShiftOnebit(d);(d.b[0]&128)!=0&&(c.b[b-1]^=a);d=wf.leftShiftOnebit(c);(c.b[0]&128)!=0&&(d.b[b-1]^=
a);return{k1:c,k2:d}};wf.leftShiftOnebit=function(a){for(var b=new Ia(new ArrayBuffer(a.length)),c=0,d=0,f=a.length;d<f;){var g=d++,h=a.b[a.length-1-g];b.b[a.length-1-g]=(h<<1|c)&255;c=(h&128)!=0?1:0}return b};var ak=function(){};r["haxe.crypto.mode.CTR"]=ak;ak.__name__="haxe.crypto.mode.CTR";ak.encrypt=function(a,b,c,d){var f=new Ia(new ArrayBuffer(b.length));b=b.sub(0,b.length);for(var g=0,h=a.length;g<h;){d(b,0,f,0);for(var l=0,k=g+c>h?h-g:c;l<k;){var q=l++;a.b[g+q]^=f.b[q]}for(l=c;l-- >=0&&(b.b[l]=
b.b[l]+1&255,b.b[l]==0););g+=c}};ak.decrypt=function(a,b,c,d){ak.encrypt(a,b,c,d)};var vh=function(){};r["haxe.crypto.mode.EAX"]=vh;vh.__name__="haxe.crypto.mode.EAX";vh.encrypt=function(a,b,c,d,f){c=vh.omac(0,c,b,d);if(f!=null&&f.length>0){for(var g=0,h=0;h<f.length;){var l=f[h];++h;g+=l.length}g=new Ia(new ArrayBuffer(g));var k=0;for(h=0;h<f.length;)l=f[h],++h,g.blit(k,l,0,l.length),k+=l.length;f=vh.omac(1,g,b,d)}else f=vh.omac(1,new Ia(new ArrayBuffer(0)),b,d);ak.encrypt(a,c,16,d);d=vh.omac(2,
a,b,d);b=new Ia(new ArrayBuffer(16));for(h=0;h<16;)l=h++,b.b[l]=c.b[l]^f.b[l]^d.b[l];c=new Ia(new ArrayBuffer(a.length+16));c.blit(0,a,0,a.length);c.blit(a.length,b,0,16);return c};vh.decrypt=function(a,b,c,d,f){if(a.length<16)return null;var g=a.length-16,h=a.sub(0,g);a=a.sub(g,16);c=vh.omac(0,c,b,d);if(f!=null&&f.length>0){var l=0;for(g=0;g<f.length;){var k=f[g];++g;l+=k.length}l=new Ia(new ArrayBuffer(l));var q=0;for(g=0;g<f.length;)k=f[g],++g,l.blit(q,k,0,k.length),q+=k.length;f=vh.omac(1,l,b,
d)}else f=vh.omac(1,new Ia(new ArrayBuffer(0)),b,d);b=vh.omac(2,h,b,d);k=new Ia(new ArrayBuffer(16));for(g=0;g<16;)l=g++,k.b[l]=c.b[l]^f.b[l]^b.b[l];if(!vh.constantTimeEquals(a,k))return null;a=new Ia(new ArrayBuffer(h.length));a.blit(0,h,0,h.length);ak.decrypt(a,c,16,d);return a};vh.omac=function(a,b,c,d){for(var f=new Ia(new ArrayBuffer(16+b.length)),g=0;g<15;){var h=g++;f.b[h]=0}f.b[15]=a;b.length>0&&f.blit(16,b,0,b.length);return wf.generate(f,c,16,d)};vh.constantTimeEquals=function(a,b){if(a.length!=
b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var tr=function(){};r["haxe.crypto.mode.ECB"]=tr;tr.__name__="haxe.crypto.mode.ECB";tr.encrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};tr.decrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};var Re=function(){};r["haxe.crypto.mode.GCM"]=Re;Re.__name__="haxe.crypto.mode.GCM";Re.encrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw la.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");
c==null&&(c=new Ia(new ArrayBuffer(0)));var h=new Ia(new ArrayBuffer(f));g(new Ia(new ArrayBuffer(f)),0,h,0);b=Re.calculateJ0(h,b);var l=Re.incrementCounter(b);a=a.sub(0,a.length);ak.encrypt(a,l,f,g);c=Re.calculateTag(h,c,a,b,g);f=new Ia(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,c,0,d);return f};Re.decrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw la.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");if(a.length<d)throw la.thrown("Ciphertext too short for specified tag length");
var h=a.length-d,l=a.sub(0,h);a=a.sub(h,d);h=new Ia(new ArrayBuffer(f));g(new Ia(new ArrayBuffer(f)),0,h,0);b=Re.calculateJ0(h,b);c=Re.calculateTag(h,c,l,b,g).sub(0,d);if(!Re.constantTimeCompare(c,a))throw la.thrown("Authentication failed");c=Re.incrementCounter(b);l=l.sub(0,l.length);ak.encrypt(l,c,f,g);return l};Re.calculateJ0=function(a,b){if(b.length==12){var c=new Ia(new ArrayBuffer(16));c.blit(0,b,0,12);c.b[15]=1}else{c=new Ia(new ArrayBuffer(16));c=Re.ghashUpdate(a,c,b);var d=new Ia(new ArrayBuffer(16));
b=b.length*8;d.b[12]=b>>>24&255;d.b[13]=b>>>16&255;d.b[14]=b>>>8&255;d.b[15]=b&255;c=Re.ghashUpdate(a,c,d)}return c};Re.incrementCounter=function(a){a=a.sub(0,a.length);for(var b=1,c=15;b>0&&c>=12;)b=a.b[c]+b,a.b[c]=b&255,b>>>=8,--c;return a};Re.calculateTag=function(a,b,c,d,f){a=Re.ghash(a,b,c);b=new Ia(new ArrayBuffer(16));f(d,0,b,0);a.b[0]^=b.b[0];a.b[1]^=b.b[1];a.b[2]^=b.b[2];a.b[3]^=b.b[3];a.b[4]^=b.b[4];a.b[5]^=b.b[5];a.b[6]^=b.b[6];a.b[7]^=b.b[7];a.b[8]^=b.b[8];a.b[9]^=b.b[9];a.b[10]^=b.b[10];
a.b[11]^=b.b[11];a.b[12]^=b.b[12];a.b[13]^=b.b[13];a.b[14]^=b.b[14];a.b[15]^=b.b[15];return a};Re.ghash=function(a,b,c){var d=new Ia(new ArrayBuffer(16));b.length>0&&(d=Re.ghashUpdate(a,d,b));c.length>0&&(d=Re.ghashUpdate(a,d,c));var f=new Ia(new ArrayBuffer(16));b=b.length*8;c=c.length*8;f.b[4]=b>>>24&255;f.b[5]=b>>>16&255;f.b[6]=b>>>8&255;f.b[7]=b&255;f.b[12]=c>>>24&255;f.b[13]=c>>>16&255;f.b[14]=c>>>8&255;f.b[15]=c&255;d.b[0]^=f.b[0];d.b[1]^=f.b[1];d.b[2]^=f.b[2];d.b[3]^=f.b[3];d.b[4]^=f.b[4];
d.b[5]^=f.b[5];d.b[6]^=f.b[6];d.b[7]^=f.b[7];d.b[8]^=f.b[8];d.b[9]^=f.b[9];d.b[10]^=f.b[10];d.b[11]^=f.b[11];d.b[12]^=f.b[12];d.b[13]^=f.b[13];d.b[14]^=f.b[14];d.b[15]^=f.b[15];return d=Re.gmult(d,a)};Re.ghashUpdate=function(a,b,c){b=b.sub(0,16);for(var d=0,f=c.length;f>0;){var g=new Ia(new ArrayBuffer(16));g.blit(0,c,d,f<16?f:16);b.b[0]^=g.b[0];b.b[1]^=g.b[1];b.b[2]^=g.b[2];b.b[3]^=g.b[3];b.b[4]^=g.b[4];b.b[5]^=g.b[5];b.b[6]^=g.b[6];b.b[7]^=g.b[7];b.b[8]^=g.b[8];b.b[9]^=g.b[9];b.b[10]^=g.b[10];b.b[11]^=
g.b[11];b.b[12]^=g.b[12];b.b[13]^=g.b[13];b.b[14]^=g.b[14];b.b[15]^=g.b[15];b=Re.gmult(b,a);d+=16;f-=16}return b};Re.xorBytes=function(a,b){for(var c=new Ia(new ArrayBuffer(a.length)),d=0,f=a.length;d<f;){var g=d++;c.b[g]=a.b[g]^b.b[g]}return c};Re.gmult=function(a,b){var c=new Ia(new ArrayBuffer(16));b=b.sub(0,16);for(var d=0;d<128;){var f=d++;(a.b[f>>>3]>>>7-(f&7)&1)==1&&(c.b[0]^=b.b[0],c.b[1]^=b.b[1],c.b[2]^=b.b[2],c.b[3]^=b.b[3],c.b[4]^=b.b[4],c.b[5]^=b.b[5],c.b[6]^=b.b[6],c.b[7]^=b.b[7],c.b[8]^=
b.b[8],c.b[9]^=b.b[9],c.b[10]^=b.b[10],c.b[11]^=b.b[11],c.b[12]^=b.b[12],c.b[13]^=b.b[13],c.b[14]^=b.b[14],c.b[15]^=b.b[15]);f=b.b[15]&1;for(var g=0,h=0;h<16;){var l=h++,k=b.b[l],q=(k&1)<<7;b.b[l]=k>>>1|g;g=q}f==1&&(b.b[0]^=225)}return c};Re.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var Sb=function(){};r["haxe.crypto.mode.GCMSIV"]=Sb;Sb.__name__="haxe.crypto.mode.GCMSIV";Sb.encrypt=function(a,b,c,d,f,g){if(a.length!=
16&&a.length!=32)throw la.thrown("Invalid key length");if(b.length!=Sb.NONCE_SIZE)throw la.thrown("Invalid nonce length");var h=a.length==16,l=Sb.subKey(0,1,b,f);h=Sb.subKey(2,h?3:5,b,f);g(h);d=Sb.hash(h,l,b,c,d,f);l=new Ia(new ArrayBuffer(c.length+Sb.AES_BLOCK_SIZE));c.length>0&&(l.blit(0,c,0,c.length),Sb.aesCTR(h,d,c,l,f));g(a,b);l.blit(c.length,d,0,Sb.AES_BLOCK_SIZE);return l};Sb.decrypt=function(a,b,c,d,f,g){if(a.length!=16&&a.length!=32)throw la.thrown("Invalid key length");if(b.length!=Sb.NONCE_SIZE)throw la.thrown("Invalid nonce length");
if(c.length<Sb.AES_BLOCK_SIZE)throw la.thrown("Invalid ciphertext length");var h=a.length==16,l=c.length-Sb.AES_BLOCK_SIZE,k=c.sub(0,l);c=c.sub(l,Sb.AES_BLOCK_SIZE);var q=Sb.subKey(0,1,b,f),w=Sb.subKey(2,h?3:5,b,f);g(w);h=new Ia(new ArrayBuffer(l));l>0&&(h.blit(0,k,0,l),Sb.aesCTR(w,c,k,h,f));d=Sb.hash(w,q,b,h,d,f);g(a,b);if(c.length!=d.length)c=!1;else{b=a=0;for(g=c.length;b<g;)f=b++,a|=c.b[f]^d.b[f];c=a==0}return c?h:null};Sb.subKey=function(a,b,c,d){var f=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE));
f.blit(f.length-c.length,c,0,c.length);c=new Ia(new ArrayBuffer(b-a+1<<3));var g=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE)),h=a;for(b+=1;h<b;){var l=h++,k=0;k==null&&(k=0);f.b[k]=l&255;f.b[k+1]=l>>8&255;f.b[k+2]=l>>16&255;f.b[k+3]=l>>24&255;d(f,0,g,0);c.blit(l-a<<3,g,0,8)}return c};Sb.hash=function(a,b,c,d,f,g){Sb.initPolyval(b);var h=f.length&15,l=f.length-h;for(b=0;b<l;)Sb.updateBlockPolyval(f,b),b+=Sb.AES_BLOCK_SIZE;h!=0&&(a=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE)),a.blit(0,f,l,h),Sb.updateBlockPolyval(a,
0));h=d.length&15;l=d.length-h;for(b=0;b<l;)Sb.updateBlockPolyval(d,b),b+=Sb.AES_BLOCK_SIZE;h!=0&&(a=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE)),a.blit(0,d,l,h),Sb.updateBlockPolyval(a,0));a=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE));f=f.length<<3&-1;a.b[0]=f&255;a.b[1]=f>>8&255;a.b[2]=f>>16&255;a.b[3]=f>>24&255;a.b[4]=0;a.b[5]=0;a.b[6]=0;a.b[7]=0;f=d.length<<3&-1;a.b[8]=f&255;a.b[9]=f>>8&255;a.b[10]=f>>16&255;a.b[11]=f>>24&255;a.b[12]=0;a.b[13]=0;a.b[14]=0;a.b[15]=0;Sb.updateBlockPolyval(a,0);d=Sb.s1;
f=d.high;d=d.low;a.b[0]=d;a.b[1]=d>>8&255;a.b[2]=d>>16&255;a.b[3]=d>>24&255;a.b[4]=f;a.b[5]=f>>8&255;a.b[6]=f>>16&255;a.b[7]=f>>24&255;d=Sb.s0;f=d.high;d=d.low;a.b[8]=d;a.b[9]=d>>8&255;a.b[10]=d>>16&255;a.b[11]=d>>24&255;a.b[12]=f;a.b[13]=f>>8&255;a.b[14]=f>>16&255;a.b[15]=f>>24&255;d=0;for(f=c.length;d<f;)b=d++,a.b[b]^=c.b[b];a.b[Sb.AES_BLOCK_SIZE-1]&=127;c=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE));g(a,0,c,0);return c};Sb.initPolyval=function(a){var b=a.b[0]&255|(a.b[1]&255)<<8|(a.b[2]&255)<<16|
a.b[3]<<24,c=a.b[4]&255|(a.b[5]&255)<<8|(a.b[6]&255)<<16|a.b[7]<<24,d=a.b[8]&255|(a.b[9]&255)<<8|(a.b[10]&255)<<16|a.b[11]<<24,f=a=a.b[12]&255|(a.b[13]&255)<<8|(a.b[14]&255)<<16|a.b[15]<<24;a=f>>>1;var g=f<<31;f=d;d=f>>>1|g;g=f<<31;f=c;c=f>>>1|g;g=f<<31;f=b;b=f>>>1|g;Sb.h0=new zb(a^f<<31>>8&-520093696,d);Sb.h1=new zb(c,b);Sb.s0=new zb(0,0);Sb.s1=new zb(0,0)};Sb.updatePolyval=function(a){for(var b=a.length&15,c=a.length-b,d=0;d<c;)Sb.updateBlockPolyval(a,d),d+=Sb.AES_BLOCK_SIZE;b!=0&&(d=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE)),
d.blit(0,a,c,b),Sb.updateBlockPolyval(d,0))};Sb.updateBlockPolyval=function(a,b){var c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;var d=a.b[b+4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;var f=d|a.b[b+7]<<24,g=c;b+=8;c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;d=a.b[b+4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;d|=a.b[b+7]<<24;b=Sb.s1;f=new zb(b.high^f,b.low^g);b=Sb.s0;var h=new zb(b.high^d,b.low^c);g=new zb(Sb.h0.high,Sb.h0.low);c=
new zb(Sb.h1.high,Sb.h1.low);d=new zb(0,0);b=new zb(0,0);for(var l=0;l<64;){l++;a=63;a&=63;var k=a==0?new zb(h.high,h.low):a<32?new zb(h.high>>a,h.high<<32-a|h.low>>>a):new zb(h.high>>31,h.high>>a-32),q=a=0;if(k.high!=a||k.low!=q)d=new zb(d.high^g.high,d.low^g.low),b=new zb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;k=0;var w=1;k&=g.high;w&=g.low;g=new zb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new zb(c.high>>>1,c.low>>>1|(c.high&1)<<31);var v=63;v&=63;k=v==0?new zb(k,w):v<32?new zb(k<<
v|w>>>32-v,w<<v):new zb(w<<v-32,0);c=new zb(c.high^k.high,c.low^k.low);w=k=0;if(a!=k||q!=w)a=Sb.E,g=new zb(g.high^a.high,g.low^a.low);a=1;a&=63;h=a==0?new zb(h.high,h.low):a<32?new zb(h.high<<a|h.low>>>32-a,h.low<<a):new zb(h.low<<a-32,0)}for(l=64;l<127;){l++;a=63;a&=63;k=a==0?new zb(f.high,f.low):a<32?new zb(f.high>>a,f.high<<32-a|f.low>>>a):new zb(f.high>>31,f.high>>a-32);q=a=0;if(k.high!=a||k.low!=q)d=new zb(d.high^g.high,d.low^g.low),b=new zb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;
k=0;w=1;k&=g.high;w&=g.low;g=new zb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new zb(c.high>>>1,c.low>>>1|(c.high&1)<<31);v=63;v&=63;k=v==0?new zb(k,w):v<32?new zb(k<<v|w>>>32-v,w<<v):new zb(w<<v-32,0);c=new zb(c.high^k.high,c.low^k.low);w=k=0;if(a!=k||q!=w)a=Sb.E,g=new zb(g.high^a.high,g.low^a.low);a=1;a&=63;f=a==0?new zb(f.high,f.low):a<32?new zb(f.high<<a|f.low>>>32-a,f.low<<a):new zb(f.low<<a-32,0)}a=63;f=a==0?new zb(f.high,f.low):a<32?new zb(f.high>>a,f.high<<32-a|f.low>>>a):new zb(f.high>>31,f.high>>
a-32);f.high!=0||f.low!=0?(a=g.high&f.high,q=g.low&f.low,Sb.s0=new zb(d.high^a,d.low^q),a=c.high&f.high,q=c.low&f.low,Sb.s1=new zb(b.high^a,b.low^q)):(Sb.s0=d,Sb.s1=b)};Sb.digestPolyval=function(a){var b=Sb.s1,c=b.high;b=b.low;a.b[0]=b;a.b[1]=b>>8&255;a.b[2]=b>>16&255;a.b[3]=b>>24&255;a.b[4]=c;a.b[5]=c>>8&255;a.b[6]=c>>16&255;a.b[7]=c>>24&255;b=Sb.s0;c=b.high;b=b.low;a.b[8]=b;a.b[9]=b>>8&255;a.b[10]=b>>16&255;a.b[11]=b>>24&255;a.b[12]=c;a.b[13]=c>>8&255;a.b[14]=c>>16&255;a.b[15]=c>>24&255};Sb.putLong64=
function(a,b,c){var d=a.high;a=a.low;b.b[c]=a;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255;b.b[c+4]=d;b.b[c+5]=d>>8&255;b.b[c+6]=d>>16&255;b.b[c+7]=d>>24&255};Sb.aesCTR=function(a,b,c,d,f){a=new Ia(new ArrayBuffer(b.length));a.blit(0,b,0,b.length);a.b[a.length-1]|=128;b=new Ia(new ArrayBuffer(Sb.AES_BLOCK_SIZE));for(var g=0;g<c.length;){f(a,0,b,0);for(var h=0,l=Math.min(Sb.AES_BLOCK_SIZE,c.length-g)|0;h<l;){var k=h++;d.b[g+k]=c.b[g+k]^b.b[k]}k=1;for(h=0;h<4&&(l=h++,k=a.b[l]+k,a.b[l]=k&
255,k>>>=8,k!=0););g+=Sb.AES_BLOCK_SIZE}};Sb.putInt=function(a,b,c){c==null&&(c=0);b.b[c]=a&255;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255};Sb.putLong=function(a,b,c){a&=-1;b.b[c]=a&255;b.b[c+1]=a>>8&255;b.b[c+2]=a>>16&255;b.b[c+3]=a>>24&255;b.b[c+4]=0;b.b[c+5]=0;b.b[c+6]=0;b.b[c+7]=0};Sb.getInt=function(a,b){return a.b[b]&255|(a.b[b+1]&255)<<8|(a.b[b+2]&255)<<16|a.b[b+3]<<24};Sb.getLong=function(a,b){var c=a.b[b]&255;c|=(a.b[b+1]&255)<<8;c|=(a.b[b+2]&255)<<16;c|=a.b[b+3]<<24;var d=a.b[b+
4]&255;d|=(a.b[b+5]&255)<<8;d|=(a.b[b+6]&255)<<16;d|=a.b[b+7]<<24;return new zb(d,c)};Sb.constantTimeCompare=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=0,f=a.length;d<f;){var g=d++;c|=a.b[g]^b.b[g]}return c==0};var hp=function(){};r["haxe.crypto.mode.OFB"]=hp;hp.__name__="haxe.crypto.mode.OFB";hp.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length;f<g;){d(b,0,b,0);for(var h=0,l=f+c>g?g-f:c;h<l;){var k=h++;a.b[f+k]^=b.b[k]}f+=c}};hp.decrypt=function(a,b,c,d){hp.encrypt(a,
b,c,d)};var ur=function(){};r["haxe.crypto.mode.PCBC"]=ur;ur.__name__="haxe.crypto.mode.PCBC";ur.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Ia(new ArrayBuffer(c));f<g;){for(var l=0,k=c;l<k;){var q=l++;h.b[q]=a.b[f+q];a.b[f+q]^=b.b[q]}d(a,f,a,f);l=0;for(k=c;l<k;)q=l++,b.b[q]=a.b[f+q]^h.b[q];f+=c}};ur.decrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Ia(new ArrayBuffer(c));f<g;){for(var l=0,k=c;l<k;){var q=l++;h.b[q]=a.b[f+q]}d(a,f,a,f);l=0;for(k=
c;l<k;)q=l++,a.b[f+q]^=b.b[q],b.b[q]=a.b[f+q]^h.b[q];f+=c}};var Of=function(){};r["haxe.crypto.mode.SIV"]=Of;Of.__name__="haxe.crypto.mode.SIV";Of.encrypt=function(a,b,c,d,f,g){d==null&&(d=[]);if(b.length>2147483631)throw la.thrown("Text to encrypt is too long");if(a.length!=64&&a.length!=48&&a.length!=32)throw la.thrown("Key should be 32, 48, or 64 bytes (256, 384, 512 bits)");var h=a.length>>1,l=a.sub(0,h);h=a.sub(h,h);d=Of.s2v(l,b,d,c,f,g);b=Of.computeCtr(b,h,d,f,g);f=new Ia(new ArrayBuffer(d.length+
b.length));f.blit(0,d,0,d.length);f.blit(d.length,b,0,b.length);g(a,c);return f};Of.decrypt=function(a,b,c,d,f,g){if(a.length!=64&&a.length!=48&&a.length!=32)throw la.thrown("Key should be 32, 48, or 64 bytes (256, 384, 512 bits)");var h=a.length/2|0,l=a.sub(0,h),k=a.sub(h,h);d==null&&(d=[]);if(b.length<16)throw la.thrown("Input length must be greater than or equal 16");h=b.sub(0,16);b=b.sub(16,b.length-16);b=Of.computeCtr(b,k,h,f,g);d=Of.s2v(l,b,d,c,f,g);g(a,c);c=a=0;for(g=h.length;c<g;)f=c++,a|=
h.b[f]^d.b[f];return a==0?b:null};Of.computeCtr=function(a,b,c,d,f){var g=new Ia(new ArrayBuffer(16));g.blit(0,c,0,16);g.b[8]&=127;g.b[12]&=127;f(b,c);ak.encrypt(a,g,16,d);return a};Of.s2v=function(a,b,c,d,f,g){if(c.length>126)throw la.thrown("Too many associatedData fields");g(a,d);g=wf.generate(new Ia(new ArrayBuffer(16)),a,16,f);for(var h=0;h<c.length;){var l=c[h];++h;l=wf.generate(l,a,16,f);g=Of.dbl(g);g=Of.xor(g,l)}d!=null&&(l=wf.generate(d,a,16,f),g=Of.dbl(g),g=Of.xor(g,l));b.length>=16?b=Of.xorend(b,
g):(b=gp.pad(b,16),b=Of.xor(Of.dbl(g),b));return wf.generate(b,a,16,f)};Of.shiftLeft=function(a,b){for(var c=a.length,d=0;--c>=0;){var f=a.b[c]&255;b.b[c]=f<<1|d;d=f>>>7&1}return d};Of.dbl=function(a){var b=new Ia(new ArrayBuffer(a.length)),c=Of.shiftLeft(a,b);b.b[a.length-1]^=-c&135;return b};Of.xor=function(a,b){if(a.length>b.length)throw la.thrown("in1.length must be <= in2.length");for(var c=new Ia(new ArrayBuffer(a.length)),d=0,f=c.length;d<f;){var g=d++;c.b[g]=a.b[g]^b.b[g]}return c};Of.xorend=
function(a,b){if(a.length<b.length)throw la.thrown("in1.length must be >= in2.length");var c=new Ia(new ArrayBuffer(a.length));c.blit(0,a,0,a.length);a=a.length-b.length;for(var d=0,f=b.length;d<f;){var g=d++;c.b[g+a]^=b.b[g]}return c};var kr=function(){};r["haxe.crypto.padding.AnsiX923"]=kr;kr.__name__="haxe.crypto.padding.AnsiX923";kr.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Ia(new ArrayBuffer(c+1));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++;d.b[f]=0}d.b[c]=b+1;return d};
kr.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var gp=function(){};r["haxe.crypto.padding.BitPadding"]=gp;gp.__name__="haxe.crypto.padding.BitPadding";gp.pad=function(a,b){b=a.length+(b-a.length%b-1)+1;var c=new Ia(new ArrayBuffer(b));c.blit(0,a,0,a.length);c.b[a.length]=128;for(a=a.length+1;a<b;){var d=a++;c.b[d]=0}return c};gp.unpad=function(a){for(var b=0,c=a.length-1;b!=128&&c>-1;)b=a.b[c],--c;return a.sub(0,c+1)};var lr=function(){};r["haxe.crypto.padding.ISO10126"]=lr;lr.__name__=
"haxe.crypto.padding.ISO10126";lr.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Ia(new ArrayBuffer(c+1));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++,g=L.random(256);d.b[f]=g}d.b[c]=b+1;return d};lr.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var mr=function(){};r["haxe.crypto.padding.NoPadding"]=mr;mr.__name__="haxe.crypto.padding.NoPadding";mr.pad=function(a,b){return a.sub(0,a.length)};mr.unpad=function(a){return a};var nr=function(){};r["haxe.crypto.padding.NullPadding"]=
nr;nr.__name__="haxe.crypto.padding.NullPadding";nr.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Ia(new ArrayBuffer(b));c.blit(0,a,0,a.length);for(a=a.length;a<b;){var d=a++;c.b[d]=0}return c};nr.unpad=function(a){for(var b=0,c=a.length;b==0&&c>0;)--c,b=a.b[c];return a.sub(0,c+1)};var or=function(){};r["haxe.crypto.padding.PKCS7"]=or;or.__name__="haxe.crypto.padding.PKCS7";or.pad=function(a,b){if(b>255)throw la.thrown("PKCS#7 padding cannot be longer than 255 bytes");if(b<0)throw la.thrown("PKCS#7 padding size must be positive");
b-=a.length%b;var c=a.length+b,d=new Ia(new ArrayBuffer(c));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++;d.b[f]=b&255}return d};or.unpad=function(a){var b=a.b[a.length-1];if(b>a.length)throw la.thrown("Cannot remove "+b+" bytes, because message is "+a.length+" bytes");for(var c=a.length-b,d=c,f=a.length;d<f;){var g=d++;if(a.b[g]!=b)throw la.thrown("Invalid padding value. Got "+a.b[g]+", expected "+b+" at position "+g);}return a.sub(0,c)};var pr=function(){};r["haxe.crypto.padding.SpacePadding"]=
pr;pr.__name__="haxe.crypto.padding.SpacePadding";pr.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Ia(new ArrayBuffer(b));c.blit(0,a,0,a.length);for(a=a.length;a<b;){var d=a++;c.b[d]=32}return c};pr.unpad=function(a){for(var b=32,c=a.length;b==32&&c>0;)--c,b=a.b[c];return a.sub(0,c+1)};var qr=function(){};r["haxe.crypto.padding.TBC"]=qr;qr.__name__="haxe.crypto.padding.TBC";qr.pad=function(a,b){var c=(a.b[a.length-1]&1)==1?0:255;b=a.length+(b-a.length%b);var d=new Ia(new ArrayBuffer(b));d.blit(0,
a,0,a.length);for(a=a.length;a<b;){var f=a++;d.b[f]=c}return d};qr.unpad=function(a){for(var b=a.length-1,c=a.b[b],d=c;d==c&&b>-1;)--b,d=a.b[b];return a.sub(0,b+1)};var Sf=function(){};r["haxe.ds.ArraySort"]=Sf;Sf.__name__="haxe.ds.ArraySort";Sf.sort=function(a,b){Sf.rec(a,b,0,a.length)};Sf.rec=function(a,b,c,d){var f=c+d>>1;if(d-c<12){if(!(d<=c))for(f=c+1;f<d;)for(var g=f++;g>c;){if(b(a[g],a[g-1])<0)Sf.swap(a,g-1,g);else break;--g}}else Sf.rec(a,b,c,f),Sf.rec(a,b,f,d),Sf.doMerge(a,b,c,f,d,f-c,d-
f)};Sf.doMerge=function(a,b,c,d,f,g,h){if(g!=0&&h!=0)if(g+h==2)b(a[d],a[c])<0&&Sf.swap(a,d,c);else{if(g>h){var l=g>>1;var k=c+l;var q=Sf.lower(a,b,d,f,k);var w=q-d}else w=h>>1,q=d+w,k=Sf.upper(a,b,c,d,q),l=k-c;Sf.rotate(a,b,k,d,q);d=k+w;Sf.doMerge(a,b,c,k,d,l,w);Sf.doMerge(a,b,d,q,f,g-l,h-w)}};Sf.rotate=function(a,b,c,d,f){if(c!=d&&d!=f)for(b=Sf.gcd(f-c,d-c);b--!=0;){for(var g=a[c+b],h=d-c,l=c+b,k=c+b+h;k!=c+b;)a[l]=a[k],l=k,k=f-k>h?k+h:c+(h-(f-k));a[l]=g}};Sf.gcd=function(a,b){for(;b!=0;){var c=
a%b;a=b;b=c}return a};Sf.upper=function(a,b,c,d,f){d-=c;for(var g,h;d>0;)g=d>>1,h=c+g,b(a[f],a[h])<0?d=g:(c=h+1,d=d-g-1);return c};Sf.lower=function(a,b,c,d,f){d-=c;for(var g,h;d>0;)g=d>>1,h=c+g,b(a[h],a[f])<0?(c=h+1,d=d-g-1):d=g;return c};Sf.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var Kk=function(){};r["haxe.ds.BalancedTree"]=Kk;Kk.__name__="haxe.ds.BalancedTree";Kk.__interfaces__=[ha];Kk.iteratorLoop=function(a,b){a!=null&&(Kk.iteratorLoop(a.left,b),b.push(a.value),Kk.iteratorLoop(a.right,
b))};Kk.prototype={root:null,set:function(a,b){this.root=this.setLoop(a,b,this.root)},get:function(a){for(var b=this.root;b!=null;){var c=this.compare(a,b.key);if(c==0)return b.value;b=c<0?b.left:b.right}return null},remove:function(a){try{return this.root=this.removeLoop(a,this.root),!0}catch(b){Rb.lastError=b;if(typeof la.caught(b).unwrap()=="string")return!1;throw b;}},exists:function(a){for(var b=this.root;b!=null;){var c=this.compare(a,b.key);if(c==0)return!0;b=c<0?b.left:b.right}return!1},iterator:function(){var a=
[];Kk.iteratorLoop(this.root,a);return new zg(a)},keyValueIterator:function(){return new el(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return new zg(a)},setLoop:function(a,b,c){if(c==null)return new Oh(null,a,b,null);var d=this.compare(a,c.key);if(d==0)return new Oh(c.left,a,b,c.right,c==null?0:c._height);if(d<0)return a=this.setLoop(a,b,c.left),this.balance(a,c.key,c.value,c.right);a=this.setLoop(a,b,c.right);return this.balance(c.left,c.key,c.value,a)},removeLoop:function(a,b){if(b==
null)throw la.thrown("Not_found");var c=this.compare(a,b.key);return c==0?this.merge(b.left,b.right):c<0?this.balance(this.removeLoop(a,b.left),b.key,b.value,b.right):this.balance(b.left,b.key,b.value,this.removeLoop(a,b.right))},keysLoop:function(a,b){a!=null&&(this.keysLoop(a.left,b),b.push(a.key),this.keysLoop(a.right,b))},merge:function(a,b){if(a==null)return b;if(b==null)return a;var c=this.minBinding(b);return this.balance(a,c.key,c.value,this.removeMinBinding(b))},minBinding:function(a){if(a==
null)throw la.thrown("Not_found");return a.left==null?a:this.minBinding(a.left)},removeMinBinding:function(a){return a.left==null?a.right:this.balance(this.removeMinBinding(a.left),a.key,a.value,a.right)},balance:function(a,b,c,d){var f=a==null?0:a._height,g=d==null?0:d._height;return f>g+2?(f=a.left,g=a.right,(f==null?0:f._height)>=(g==null?0:g._height)?new Oh(a.left,a.key,a.value,new Oh(a.right,b,c,d)):new Oh(new Oh(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new Oh(a.right.right,
b,c,d))):g>f+2?(f=d.right,g=d.left,(f==null?0:f._height)>(g==null?0:g._height)?new Oh(new Oh(a,b,c,d.left),d.key,d.value,d.right):new Oh(new Oh(a,b,c,d.left.left),d.left.key,d.left.value,new Oh(d.left.right,d.key,d.value,d.right))):new Oh(a,b,c,d,(f>g?f:g)+1)},compare:function(a,b){return A.compare(a,b)},clear:function(){this.root=null},__class__:Kk};var Oh=function(a,b,c,d,f){f==null&&(f=-1);this.left=a;this.key=b;this.value=c;this.right=d;f==-1?(a=this.left,b=this.right,a=(a==null?0:a._height)>
(b==null?0:b._height)?this.left:this.right,this._height=(a==null?0:a._height)+1):this._height=f};r["haxe.ds.TreeNode"]=Oh;Oh.__name__="haxe.ds.TreeNode";Oh.prototype={left:null,right:null,key:null,value:null,_height:null,__class__:Oh};var Ye=function(){};r["haxe.ds.EnumValueMap"]=Ye;Ye.__name__="haxe.ds.EnumValueMap";Ye.__interfaces__=[ha];Ye.__super__=Kk;Ye.prototype=I(Kk.prototype,{compare:function(a,b){var c=a._hx_index-b._hx_index;if(c!=0)return c;a=Aa.enumParameters(a);b=Aa.enumParameters(b);
return a.length==0&&b.length==0?0:this.compareArgs(a,b)},compareArgs:function(a,b){var c=a.length-b.length;if(c!=0)return c;c=0;for(var d=a.length;c<d;){var f=c++;f=this.compareArg(a[f],b[f]);if(f!=0)return f}return 0},compareArg:function(a,b){return A.isEnumValue(a)&&A.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):A.compare(a,b)},__class__:Ye});var we=function(){this.h={}};r["haxe.ds.IntMap"]=we;we.__name__="haxe.ds.IntMap";we.__interfaces__=[ha];we.prototype=
{h:null,set:function(a,b){this.h[a]=b},get:function(a){return this.h[a]},exists:function(a){return this.h.hasOwnProperty(a)},remove:function(a){if(!this.h.hasOwnProperty(a))return!1;delete this.h[a];return!0},keys:function(){var a=[],b;for(b in this.h)this.h.hasOwnProperty(b)&&a.push(+b);return new zg(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a]}}},keyValueIterator:function(){return new el(this)},
__class__:we};var dq=function(a,b){this.item=a;this.next=b};r["haxe.ds._List.ListNode"]=dq;dq.__name__="haxe.ds._List.ListNode";dq.prototype={item:null,next:null,__class__:dq};var xt=function(a){this.head=a};r["haxe.ds._List.ListIterator"]=xt;xt.__name__="haxe.ds._List.ListIterator";xt.prototype={head:null,hasNext:function(){return this.head!=null},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:xt};var aa=function(){this.h=Object.create(null)};r["haxe.ds.StringMap"]=
aa;aa.__name__="haxe.ds.StringMap";aa.__interfaces__=[ha];aa.stringify=function(a){var b="[",c=!0,d;for(d in a)c?c=!1:b+=",",b+=d+" => "+L.string(a[d]);return b+"]"};aa.prototype={h:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)},get:function(a){return this.h[a]},set:function(a,b){this.h[a]=b},remove:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)?(delete this.h[a],!0):!1},keys:function(){return new jq(this.h)},iterator:function(){return new jp(this.h)},
keyValueIterator:function(){return new Qu(this.h)},__class__:aa};var jq=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};r["haxe.ds._StringMap.StringMapKeyIterator"]=jq;jq.__name__="haxe.ds._StringMap.StringMapKeyIterator";jq.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.keys[this.current++]},__class__:jq};var jp=function(a){this.h=a;this.keys=Object.keys(a);this.length=
this.keys.length;this.current=0};r["haxe.ds._StringMap.StringMapValueIterator"]=jp;jp.__name__="haxe.ds._StringMap.StringMapValueIterator";jp.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.h[this.keys[this.current++]]},__class__:jp};var Qu=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};r["haxe.ds._StringMap.StringMapKeyValueIterator"]=Qu;Qu.__name__="haxe.ds._StringMap.StringMapKeyValueIterator";
Qu.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){var a=this.keys[this.current++];return{key:a,value:this.h[a]}},__class__:Qu};var tn=function(a,b,c){la.call(this,a,b);this.posInfos=c==null?{fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:c;this.__skipStack++};r["haxe.exceptions.PosException"]=tn;tn.__name__="haxe.exceptions.PosException";tn.__super__=la;tn.prototype=I(la.prototype,{posInfos:null,
toString:function(){return""+la.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:tn});var Qm=function(a,b,c){a==null&&(a="Not implemented");tn.call(this,a,b,c);this.__skipStack++};r["haxe.exceptions.NotImplementedException"]=Qm;Qm.__name__="haxe.exceptions.NotImplementedException";Qm.__super__=tn;Qm.prototype=I(tn.prototype,{__class__:Qm});var Ym=function(a){this.str=a;this.pos=0};r["haxe.format.JsonParser"]=
Ym;Ym.__name__="haxe.format.JsonParser";Ym.prototype={str:null,pos:null,doParse:function(){for(var a=this.parseRec(),b;;){var c=b=this.str.charCodeAt(this.pos++);if(c!=c)break;switch(b){case 9:case 10:case 13:case 32:break;default:this.invalidChar()}}return a},parseRec:function(){for(;;){var a=this.str.charCodeAt(this.pos++);switch(a){case 9:case 10:case 13:case 32:break;case 34:return this.parseString();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:var b=
a,c=this.pos-1,d=b==45,f=!d,g=b==48,h=a=!1,l=!1,k=!1;do switch(b=this.str.charCodeAt(this.pos++),b){case 43:case 45:h&&!l||this.invalidNumber(c);f=!1;l=!0;break;case 46:(d||a||h)&&this.invalidNumber(c);f=!1;a=!0;break;case 48:g&&!a&&this.invalidNumber(c);d&&(d=!1,g=!0);f=!0;break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:g&&!a&&this.invalidNumber(c);d&&=!1;f=!0;g=!1;break;case 69:case 101:(d||g||h)&&this.invalidNumber(c);f=!1;h=!0;break;default:f||this.invalidNumber(c),
this.pos--,k=!0}while(!k);b=parseFloat(X.substr(this.str,c,this.pos-c));if(a)return b;a=b|0;return a==b?a:b;case 91:a=[];for(b=null;;)switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;case 44:b?b=!1:this.invalidChar();break;case 93:return b==0&&this.invalidChar(),a;default:b&&this.invalidChar(),this.pos--,a.push(this.parseRec()),b=!0}break;case 102:a=this.pos;if(this.str.charCodeAt(this.pos++)!=97||this.str.charCodeAt(this.pos++)!=108||this.str.charCodeAt(this.pos++)!=115||
this.str.charCodeAt(this.pos++)!=101)this.pos=a,this.invalidChar();return!1;case 110:a=this.pos;if(this.str.charCodeAt(this.pos++)!=117||this.str.charCodeAt(this.pos++)!=108||this.str.charCodeAt(this.pos++)!=108)this.pos=a,this.invalidChar();return null;case 116:a=this.pos;if(this.str.charCodeAt(this.pos++)!=114||this.str.charCodeAt(this.pos++)!=117||this.str.charCodeAt(this.pos++)!=101)this.pos=a,this.invalidChar();return!0;case 123:a={};for(c=b=null;;)switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;
case 34:(b!=null||c)&&this.invalidChar();b=this.parseString();break;case 44:c?c=!1:this.invalidChar();break;case 58:b==null&&this.invalidChar();a[b]=this.parseRec();b=null;c=!0;break;case 125:return b==null&&c!=0||this.invalidChar(),a;default:this.invalidChar()}break;default:this.invalidChar()}}},parseString:function(){for(var a=this.pos,b=null,c=-1;;){var d=this.str.charCodeAt(this.pos++);if(d==34)break;if(d==92){b==null&&(b=new ec);d=this.str;var f=this.pos-a-1;b.b+=f==null?X.substr(d,a,null):X.substr(d,
a,f);d=this.str.charCodeAt(this.pos++);d!=117&&c!=-1&&(b.b+=String.fromCodePoint(65533),c=-1);switch(d){case 34:case 47:case 92:b.b+=String.fromCodePoint(d);break;case 98:b.b+=String.fromCodePoint(8);break;case 102:b.b+=String.fromCodePoint(12);break;case 110:b.b+=String.fromCodePoint(10);break;case 114:b.b+=String.fromCodePoint(13);break;case 116:b.b+=String.fromCodePoint(9);break;case 117:a=L.parseInt("0x"+X.substr(this.str,this.pos,4));this.pos+=4;c!=-1?(b.b=a<56320||a>57343?b.b+String.fromCodePoint(65533):
b.b+String.fromCodePoint((c-55296<<10)+(a-56320)+65536),c=-1):a>=55296&&a<=56319?c=a:b.b+=String.fromCodePoint(a);break;default:throw la.thrown("Invalid escape sequence \\"+String.fromCodePoint(d)+" at position "+(this.pos-1));}a=this.pos}else if(d!=d)throw la.thrown("Unclosed string");}c!=-1&&(b.b+=String.fromCodePoint(65533));if(b==null)return X.substr(this.str,a,this.pos-a-1);d=this.str;f=this.pos-a-1;b.b+=f==null?X.substr(d,a,null):X.substr(d,a,f);return b.b},invalidChar:function(){this.pos--;
throw la.thrown("Invalid char "+this.str.charCodeAt(this.pos)+" at position "+this.pos);},invalidNumber:function(a){throw la.thrown("Invalid number at position "+a+": "+X.substr(this.str,a,this.pos-a));},__class__:Ym};var ng=function(a,b){this.replacer=a;this.indent=b;this.pretty=b!=null;this.nind=0;this.buf=new ec};r["haxe.format.JsonPrinter"]=ng;ng.__name__="haxe.format.JsonPrinter";ng.print=function(a,b,c){b=new ng(b,c);b.write("",a);return b.buf.b};ng.prototype={buf:null,replacer:null,indent:null,
pretty:null,nind:null,write:function(a,b){this.replacer!=null&&(b=this.replacer(a,b));a=Aa.typeof(b);switch(a._hx_index){case 0:this.buf.b+="null";break;case 1:this.buf.b+=L.string(b);break;case 2:b=isFinite(b)?L.string(b):"null";this.buf.b+=L.string(b);break;case 3:this.buf.b+=L.string(b);break;case 4:this.fieldsString(b,A.fields(b));break;case 5:this.buf.b+='"<fun>"';break;case 6:a=a.c;if(a==String)this.quote(b);else if(a==Array){this.buf.b+=String.fromCodePoint(91);a=b.length;for(var c=a-1,d=0;d<
a;){var f=d++;f>0?this.buf.b+=String.fromCodePoint(44):this.nind++;this.pretty&&(this.buf.b+=String.fromCodePoint(10));if(this.pretty){var g=Z.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=L.string(g)}this.write(f,b[f]);f==c&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty&&(f=Z.lpad("",this.indent,this.nind*this.indent.length),this.buf.b+=L.string(f)))}this.buf.b+=String.fromCodePoint(93)}else if(a==aa){c={};d=Object.keys(b.h);f=d.length;for(g=0;g<f;)a=
d[g++],c[a]=b.h[a];b=c;this.fieldsString(b,A.fields(b))}else a==Date?this.quote(X.dateStr(b)):this.classString(b);break;case 7:f=b._hx_index;this.buf.b+=L.string(f==null?"null":""+f);break;case 8:this.buf.b+='"???"'}},classString:function(a){this.fieldsString(a,Aa.getInstanceFields(u.getClass(a)))},fieldsString:function(a,b){this.buf.b+=String.fromCodePoint(123);for(var c=b.length,d=c-1,f=!0,g=0;g<c;){var h=g++,l=b[h],k=A.field(a,l);if(!A.isFunction(k)){f?(this.nind++,f=!1):this.buf.b+=String.fromCodePoint(44);
this.pretty&&(this.buf.b+=String.fromCodePoint(10));if(this.pretty){var q=Z.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=L.string(q)}this.quote(l);this.buf.b+=String.fromCodePoint(58);this.pretty&&(this.buf.b+=String.fromCodePoint(32));this.write(l,k);h==d&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty&&(h=Z.lpad("",this.indent,this.nind*this.indent.length),this.buf.b+=L.string(h)))}}this.buf.b+=String.fromCodePoint(125)},quote:function(a){this.buf.b+=
String.fromCodePoint(34);for(var b=0,c=a.length;b<c;){var d=a.charCodeAt(b++);switch(d){case 8:this.buf.b+="\\b";break;case 9:this.buf.b+="\\t";break;case 10:this.buf.b+="\\n";break;case 12:this.buf.b+="\\f";break;case 13:this.buf.b+="\\r";break;case 34:this.buf.b+='\\"';break;case 92:this.buf.b+="\\\\";break;default:this.buf.b+=String.fromCodePoint(d)}}this.buf.b+=String.fromCodePoint(34)},__class__:ng};var kp=function(){this.size=this.pos=0};r["haxe.io.BytesBuffer"]=kp;kp.__name__="haxe.io.BytesBuffer";
kp.prototype={buffer:null,view:null,u8:null,pos:null,size:null,addByte:function(a){this.pos==this.size&&this.grow(1);this.view.setUint8(this.pos++,a)},add:function(a){this.pos+a.length>this.size&&this.grow(a.length);if(this.size!=0){var b=new Uint8Array(a.b.buffer,a.b.byteOffset,a.length);this.u8.set(b,this.pos);this.pos+=a.length}},addBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw la.thrown(Nh.OutsideBounds);this.pos+c>this.size&&this.grow(c);this.size!=0&&(a=new Uint8Array(a.b.buffer,a.b.byteOffset+
b,c),this.u8.set(a,this.pos),this.pos+=c)},grow:function(a){var b=this.pos+a;for(a=this.size==0?16:this.size;a<b;)a=a*3>>1;b=new ArrayBuffer(a);var c=new Uint8Array(b);this.size>0&&c.set(this.u8);this.size=a;this.buffer=b;this.u8=c;this.view=new DataView(this.buffer)},getBytes:function(){if(this.size==0)return new Ia(new ArrayBuffer(0));var a=new Ia(this.buffer);a.length=this.pos;return a},__class__:kp};var wr=function(){};r["haxe.io.Input"]=wr;wr.__name__="haxe.io.Input";wr.prototype={bigEndian:null,
readByte:function(){throw new Qm(null,null,{fileName:"haxe/io/Input.hx",lineNumber:53,className:"haxe.io.Input",methodName:"readByte"});},readBytes:function(a,b,c){var d=c,f=a.b;if(b<0||c<0||b+c>a.length)throw la.thrown(Nh.OutsideBounds);try{for(;d>0;)f[b]=this.readByte(),++b,--d}catch(g){if(Rb.lastError=g,!(la.caught(g).unwrap()instanceof lp))throw g;}return c-d},set_bigEndian:function(a){return this.bigEndian=a},readFullBytes:function(a,b,c){for(;c>0;){var d=this.readBytes(a,b,c);if(d==0)throw la.thrown(Nh.Blocked);
b+=d;c-=d}},read:function(a){for(var b=new Ia(new ArrayBuffer(a)),c=0;a>0;){var d=this.readBytes(b,c,a);if(d==0)throw la.thrown(Nh.Blocked);c+=d;a-=d}return b},readFloat:function(){return af.i32ToFloat(this.readInt32())},readDouble:function(){var a=this.readInt32(),b=this.readInt32();return this.bigEndian?af.i64ToDouble(b,a):af.i64ToDouble(a,b)},readInt16:function(){var a=this.readByte(),b=this.readByte();a=this.bigEndian?b|a<<8:a|b<<8;return(a&32768)!=0?a-65536:a},readUInt16:function(){var a=this.readByte(),
b=this.readByte();return this.bigEndian?b|a<<8:a|b<<8},readInt32:function(){var a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte();return this.bigEndian?d|c<<8|b<<16|a<<24:a|b<<8|c<<16|d<<24},readString:function(a,b){var c=new Ia(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:wr,__properties__:{set_bigEndian:"set_bigEndian"}};var un=function(a,b,c){b==null&&(b=0);c==null&&(c=a.length-b);if(b<0||c<0||b+c>a.length)throw la.thrown(Nh.OutsideBounds);
this.b=a.b;this.pos=b;this.totlen=this.len=c};r["haxe.io.BytesInput"]=un;un.__name__="haxe.io.BytesInput";un.__super__=wr;un.prototype=I(wr.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(this.len==0)throw la.thrown(new lp);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw la.thrown(Nh.OutsideBounds);if(this.len==0&&c>0)throw la.thrown(new lp);this.len<c&&(c=this.len);var d=this.b;a=a.b;for(var f=0,g=c;f<g;){var h=f++;a[b+h]=d[this.pos+
h]}this.pos+=c;this.len-=c;return c},__class__:un});var xr=function(){};r["haxe.io.Output"]=xr;xr.__name__="haxe.io.Output";xr.prototype={bigEndian:null,writeByte:function(a){throw new Qm(null,null,{fileName:"haxe/io/Output.hx",lineNumber:47,className:"haxe.io.Output",methodName:"writeByte"});},writeBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw la.thrown(Nh.OutsideBounds);a=a.b;for(var d=c;d>0;)this.writeByte(a[b]),++b,--d;return c},set_bigEndian:function(a){return this.bigEndian=a},write:function(a){for(var b=
a.length,c=0;b>0;){var d=this.writeBytes(a,c,b);if(d==0)throw la.thrown(Nh.Blocked);c+=d;b-=d}},writeFullBytes:function(a,b,c){for(;c>0;){var d=this.writeBytes(a,b,c);b+=d;c-=d}},writeDouble:function(a){a=af.doubleToI64(a);this.bigEndian?(this.writeInt32(a.high),this.writeInt32(a.low)):(this.writeInt32(a.low),this.writeInt32(a.high))},writeUInt16:function(a){if(a<0||a>=65536)throw la.thrown(Nh.Overflow);this.bigEndian?(this.writeByte(a>>8),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>
8))},writeInt32:function(a){this.bigEndian?(this.writeByte(a>>>24),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8&255),this.writeByte(a>>16&255),this.writeByte(a>>>24))},writeString:function(a,b){a=Ia.ofString(a,b);this.writeFullBytes(a,0,a.length)},__class__:xr,__properties__:{set_bigEndian:"set_bigEndian"}};var mp=function(){this.b=new kp};r["haxe.io.BytesOutput"]=mp;mp.__name__="haxe.io.BytesOutput";mp.__super__=xr;mp.prototype=
I(xr.prototype,{b:null,writeByte:function(a){this.b.addByte(a)},writeBytes:function(a,b,c){this.b.addBytes(a,b,c);return c},getBytes:function(){return this.b.getBytes()},__class__:mp});var lp=function(){};r["haxe.io.Eof"]=lp;lp.__name__="haxe.io.Eof";lp.prototype={toString:function(){return"Eof"},__class__:lp};var Nh=O["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:D},Overflow:{_hx_name:"Overflow",_hx_index:1,
__enum__:"haxe.io.Error",toString:D},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:D},Custom:(G=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",toString:D}},G._hx_name="Custom",G.__params__=["e"],G)};Nh.__constructs__=[Nh.Blocked,Nh.Overflow,Nh.OutsideBounds,Nh.Custom];var af=function(){};r["haxe.io.FPHelper"]=af;af.__name__="haxe.io.FPHelper";af.i32ToFloat=function(a){af.helper.setInt32(0,a,!0);return af.helper.getFloat32(0,!0)};af.floatToI32=function(a){af.helper.setFloat32(0,
a,!0);return af.helper.getInt32(0,!0)};af.i64ToDouble=function(a,b){af.helper.setInt32(0,a,!0);af.helper.setInt32(4,b,!0);return af.helper.getFloat64(0,!0)};af.doubleToI64=function(a){var b=af.i64tmp;af.helper.setFloat64(0,a,!0);b.low=af.helper.getInt32(0,!0);b.high=af.helper.getInt32(4,!0);return b};var ox={fromBytes:function(a,b,c){b==null&&(b=0);c==null&&(c=a.length-b>>2);return new Float32Array(a.b.bufferValue,b,c)}},rg=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=
a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=X.substr(a,0,c),a=X.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=X.substr(a,0,b),a=X.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");b!=-1?(this.ext=X.substr(a,b+1,null),this.file=X.substr(a,0,b)):(this.ext=null,this.file=a)};r["haxe.io.Path"]=rg;rg.__name__="haxe.io.Path";rg.withoutDirectory=function(a){a=new rg(a);a.dir=null;return a.toString()};rg.directory=function(a){a=new rg(a);return a.dir==null?"":a.dir};rg.extension=function(a){a=
new rg(a);return a.ext==null?"":a.ext};rg.prototype={dir:null,file:null,ext:null,backslash:null,toString:function(){return(this.dir==null?"":this.dir+(this.backslash?"\\":"/"))+this.file+(this.ext==null?"":"."+this.ext)},__class__:rg};var zg=function(a){this.current=0;this.array=a};r["haxe.iterators.ArrayIterator"]=zg;zg.__name__="haxe.iterators.ArrayIterator";zg.prototype={array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},
__class__:zg};var el=function(a){this.map=a;this.keys=a.keys()};r["haxe.iterators.MapKeyValueIterator"]=el;el.__name__="haxe.iterators.MapKeyValueIterator";el.prototype={map:null,keys:null,hasNext:function(){return this.keys.hasNext()},next:function(){var a=this.keys.next();return{value:this.map.get(a),key:a}},__class__:el};var Tf=function(a,b,c){this.xml=b;this.message=a;this.position=c;this.lineNumber=1;for(a=this.positionAtLine=0;a<c;){var d=a++;d=b.charCodeAt(d);d==10?(this.lineNumber++,this.positionAtLine=
0):d!=13&&this.positionAtLine++}};r["haxe.xml.XmlParserException"]=Tf;Tf.__name__="haxe.xml.XmlParserException";Tf.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return u.getClass(this).__name__+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:Tf};var fl=function(){};r["haxe.xml.Parser"]=fl;fl.__name__="haxe.xml.Parser";fl.parse=function(a,b){b==null&&(b=!1);var c=cb.createDocument();fl.doParse(a,b,0,c);return c};
fl.doParse=function(a,b,c,d){c==null&&(c=0);for(var f=null,g=1,h=1,l=null,k=0,q=0,w=0,v=new ec,z=1,n=-1;c<a.length;){var E=a.charCodeAt(c);switch(g){case 0:switch(E){case 9:case 10:case 13:case 32:break;default:g=h;continue}break;case 1:if(E==60)g=0,h=2;else{k=c;g=13;continue}break;case 2:switch(E){case 33:if(a.charCodeAt(c+1)==91){c+=2;if(X.substr(a,c,6).toUpperCase()!="CDATA[")throw la.thrown(new Tf("Expected <![CDATA[",a,c));c+=5;g=17}else if(a.charCodeAt(c+1)==68||a.charCodeAt(c+1)==100){if(X.substr(a,
c+2,6).toUpperCase()!="OCTYPE")throw la.thrown(new Tf("Expected <!DOCTYPE",a,c));c+=8;g=16}else{if(a.charCodeAt(c+1)!=45||a.charCodeAt(c+2)!=45)throw la.thrown(new Tf("Expected \x3c!--",a,c));c+=2;g=15}k=c+1;break;case 47:if(d==null)throw la.thrown(new Tf("Expected node name",a,c));k=c+1;g=0;h=10;break;case 63:g=14;k=c;break;default:g=3;k=c;continue}break;case 3:if(!(E>=97&&E<=122||E>=65&&E<=90||E>=48&&E<=57||E==58||E==46||E==95||E==45)){if(c==k)throw la.thrown(new Tf("Expected node name",a,c));f=
cb.createElement(X.substr(a,k,c-k));d.addChild(f);++q;g=0;h=4;continue}break;case 4:switch(E){case 47:g=11;break;case 62:g=9;break;default:g=5;k=c;continue}break;case 5:if(!(E>=97&&E<=122||E>=65&&E<=90||E>=48&&E<=57||E==58||E==46||E==95||E==45)){if(k==c)throw la.thrown(new Tf("Expected attribute name",a,c));l=X.substr(a,k,c-k);if(f.exists(l))throw la.thrown(new Tf("Duplicate attribute ["+l+"]",a,c));g=0;h=6;continue}break;case 6:if(E==61)g=0,h=7;else throw la.thrown(new Tf("Expected =",a,c));break;
case 7:switch(E){case 34:case 39:v=new ec;g=8;k=c+1;n=E;break;default:throw la.thrown(new Tf('Expected "',a,c));}break;case 8:switch(E){case 38:z=c-k;v.b+=z==null?X.substr(a,k,null):X.substr(a,k,z);g=18;z=8;k=c+1;break;case 60:case 62:if(b)throw la.thrown(new Tf("Invalid unescaped "+String.fromCodePoint(E)+" in attribute value",a,c));E==n&&(h=c-k,v.b+=h==null?X.substr(a,k,null):X.substr(a,k,h),h=v.b,v=new ec,f.set(l,h),g=0,h=4);break;default:E==n&&(h=c-k,v.b+=h==null?X.substr(a,k,null):X.substr(a,
k,h),h=v.b,v=new ec,f.set(l,h),g=0,h=4)}break;case 9:k=c=fl.doParse(a,b,c,f);g=1;break;case 10:if(!(E>=97&&E<=122||E>=65&&E<=90||E>=48&&E<=57||E==58||E==46||E==95||E==45)){if(k==c)throw la.thrown(new Tf("Expected node name",a,c));h=X.substr(a,k,c-k);if(d==null||d.nodeType!=0)throw la.thrown(new Tf("Unexpected </"+h+">, tag is not open",a,c));if(d.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":hd.toString(d.nodeType)));if(h!=d.nodeName){if(d.nodeType!=
cb.Element)throw la.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":hd.toString(d.nodeType)));throw la.thrown(new Tf("Expected </"+d.nodeName+">",a,c));}g=0;h=12;continue}break;case 11:if(E==62)g=1;else throw la.thrown(new Tf("Expected >",a,c));break;case 12:if(E==62)return q==0&&d.addChild(cb.createPCData("")),c;throw la.thrown(new Tf("Expected >",a,c));case 13:E==60?(h=c-k,v.b+=h==null?X.substr(a,k,null):X.substr(a,k,h),h=cb.createPCData(v.b),v=new ec,d.addChild(h),
++q,g=0,h=2):E==38&&(z=c-k,v.b+=z==null?X.substr(a,k,null):X.substr(a,k,z),g=18,z=13,k=c+1);break;case 14:E==63&&a.charCodeAt(c+1)==62&&(++c,g=X.substr(a,k+1,c-k-2),d.addChild(cb.createProcessingInstruction(g)),++q,g=1);break;case 15:E==45&&a.charCodeAt(c+1)==45&&a.charCodeAt(c+2)==62&&(d.addChild(cb.createComment(X.substr(a,k,c-k))),++q,c+=2,g=1);break;case 16:E==91?++w:E==93?--w:E==62&&w==0&&(d.addChild(cb.createDocType(X.substr(a,k,c-k))),++q,g=1);break;case 17:E==93&&a.charCodeAt(c+1)==93&&a.charCodeAt(c+
2)==62&&(g=cb.createCData(X.substr(a,k,c-k)),d.addChild(g),++q,c+=2,g=1);break;case 18:if(E==59){k=X.substr(a,k,c-k);if(k.charCodeAt(0)==35)k=k.charCodeAt(1)==120?L.parseInt("0"+X.substr(k,1,k.length-1)):L.parseInt(X.substr(k,1,k.length-1)),v.b+=String.fromCodePoint(k);else if(Object.prototype.hasOwnProperty.call(fl.escapes.h,k))v.b+=L.string(fl.escapes.h[k]);else{if(b)throw la.thrown(new Tf("Undefined entity: "+k,a,c));v.b+=L.string("&"+k+";")}k=c+1;g=z}else if(!(E>=97&&E<=122||E>=65&&E<=90||E>=
48&&E<=57||E==58||E==46||E==95||E==45)&&E!=35){if(b)throw la.thrown(new Tf("Invalid character in entity: "+String.fromCodePoint(E),a,c));v.b+=String.fromCodePoint(38);g=c-k;v.b+=g==null?X.substr(a,k,null):X.substr(a,k,g);--c;k=c+1;g=z}}++c}g==1&&(k=c,g=13);if(g==13){if(d.nodeType==0){if(d.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":hd.toString(d.nodeType)));throw la.thrown(new Tf("Unclosed node <"+d.nodeName+">",a,c));}if(c!=k||q==0)z=
c-k,v.b+=z==null?X.substr(a,k,null):X.substr(a,k,z),d.addChild(cb.createPCData(v.b));return c}if(!b&&g==18&&z==13)return v.b+=String.fromCodePoint(38),z=c-k,v.b+=z==null?X.substr(a,k,null):X.substr(a,k,z),d.addChild(cb.createPCData(v.b)),c;throw la.thrown(new Tf("Unexpected end",a,c));};var Rm=function(a){this.output=new ec;this.pretty=a};r["haxe.xml.Printer"]=Rm;Rm.__name__="haxe.xml.Printer";Rm.print=function(a,b){b==null&&(b=!1);b=new Rm(b);b.writeNode(a,"");return b.output.b};Rm.prototype={output:null,
pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=L.string(b+"<");if(a.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":hd.toString(a.nodeType)));this.output.b+=L.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=L.string(" "+d+'="');d=Z.htmlEscape(a.get(d),!0);this.output.b+=L.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+=
"\n");if(a.nodeType!=cb.Document&&a.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":hd.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;){var f=d[c++];this.writeNode(f,this.pretty?b+"\t":b)}this.output.b+=L.string(b+"</");if(a.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":hd.toString(a.nodeType)));this.output.b+=L.string(a.nodeName);this.output.b+=">"}else this.output.b+=
"/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==cb.Document||a.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":hd.toString(a.nodeType)));a=a.nodeValue;a.length!=0&&(d=b+Z.htmlEscape(a),this.output.b+=L.string(d),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=L.string(b+"<![CDATA[");if(a.nodeType==cb.Document||a.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":hd.toString(a.nodeType)));
this.output.b+=L.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==cb.Document||a.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":hd.toString(a.nodeType)));a=a.nodeValue;a=a.replace(RegExp("[\n\r\t]+","g"),"");this.output.b+=b==null?"null":""+b;d=Z.trim("\x3c!--"+a+"--\x3e");this.output.b+=L.string(d);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==cb.Document||a.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+
(a.nodeType==null?"null":hd.toString(a.nodeType)));this.output.b+=L.string("<!DOCTYPE "+a.nodeValue+">");this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==cb.Document||a.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":hd.toString(a.nodeType)));this.output.b+=L.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=cb.Document&&a.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element or Document but found "+
(a.nodeType==null?"null":hd.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;)f=d[c++],this.writeNode(f,b)}},hasChildren:function(a){if(a.nodeType!=cb.Document&&a.nodeType!=cb.Element)throw la.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":hd.toString(a.nodeType)));var b=0;for(a=a.children;b<a.length;){var c=a[b++];switch(c.nodeType){case 0:case 1:return!0;case 2:case 3:if(c.nodeType==cb.Document||c.nodeType==cb.Element)throw la.thrown("Bad node type, unexpected "+
(c.nodeType==null?"null":hd.toString(c.nodeType)));if(Z.ltrim(c.nodeValue).length!=0)return!0}}return!1},__class__:Rm};var vn=O["haxe.zip.ExtraField"]={__ename__:"haxe.zip.ExtraField",__constructs__:null,FUnknown:(G=function(a,b){return{_hx_index:0,tag:a,bytes:b,__enum__:"haxe.zip.ExtraField",toString:D}},G._hx_name="FUnknown",G.__params__=["tag","bytes"],G),FInfoZipUnicodePath:(G=function(a,b){return{_hx_index:1,name:a,crc:b,__enum__:"haxe.zip.ExtraField",toString:D}},G._hx_name="FInfoZipUnicodePath",
G.__params__=["name","crc"],G),FUtf8:{_hx_name:"FUtf8",_hx_index:2,__enum__:"haxe.zip.ExtraField",toString:D}};vn.__constructs__=[vn.FUnknown,vn.FInfoZipUnicodePath,vn.FUtf8];var Cj=O["haxe.zip.Huffman"]={__ename__:"haxe.zip.Huffman",__constructs__:null,Found:(G=function(a){return{_hx_index:0,i:a,__enum__:"haxe.zip.Huffman",toString:D}},G._hx_name="Found",G.__params__=["i"],G),NeedBit:(G=function(a,b){return{_hx_index:1,left:a,right:b,__enum__:"haxe.zip.Huffman",toString:D}},G._hx_name="NeedBit",
G.__params__=["left","right"],G),NeedBits:(G=function(a,b){return{_hx_index:2,n:a,table:b,__enum__:"haxe.zip.Huffman",toString:D}},G._hx_name="NeedBits",G.__params__=["n","table"],G)};Cj.__constructs__=[Cj.Found,Cj.NeedBit,Cj.NeedBits];var Ru=function(){};r["haxe.zip.HuffTools"]=Ru;Ru.__name__="haxe.zip.HuffTools";Ru.prototype={treeDepth:function(a){switch(a._hx_index){case 0:return 0;case 1:var b=a.right;a=this.treeDepth(a.left);b=this.treeDepth(b);return 1+(a<b?a:b);case 2:throw la.thrown("assert");
}},treeCompress:function(a){var b=this.treeDepth(a);if(b==0)return a;if(b==1){if(a._hx_index==1)return b=a.right,Cj.NeedBit(this.treeCompress(a.left),this.treeCompress(b));throw la.thrown("assert");}for(var c=[],d=0,f=1<<b;d<f;)d++,c.push(Cj.Found(-1));this.treeWalk(c,0,0,b,a);return Cj.NeedBits(b,c)},treeWalk:function(a,b,c,d,f){if(f._hx_index==1){var g=f.left,h=f.right;d>0?(this.treeWalk(a,b,c+1,d-1,g),this.treeWalk(a,b|1<<c,c+1,d-1,h)):a[b]=this.treeCompress(f)}else a[b]=this.treeCompress(f)},
treeMake:function(a,b,c,d){if(d>b)throw la.thrown("Invalid huffman");var f=c<<5|d;if(a.h.hasOwnProperty(f))return Cj.Found(a.h[f]);c<<=1;++d;return Cj.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){if(c==1)return Cj.NeedBit(Cj.Found(0),Cj.Found(0));var f=[],g=[];if(d>32)throw la.thrown("Invalid huffman");for(var h=0,l=d;h<l;)h++,f.push(0),g.push(0);h=0;for(l=c;h<l;){var k=h++;k=a[k+b];if(k>=d)throw la.thrown("Invalid huffman");f[k]++}var q=0;h=1;for(l=d-1;h<l;)k=
h++,q=q+f[k]<<1,g[k]=q;f=new we;h=0;for(l=c;h<l;)k=h++,c=a[k+b],c!=0&&(q=g[c-1],g[c-1]=q+1,f.h[q<<5|c]=k);return this.treeCompress(Cj.NeedBit(this.treeMake(f,d,0,1),this.treeMake(f,d,1,1)))},__class__:Ru};var Su=function(a){this.buffer=new Ia(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new xl)};r["haxe.zip._InflateImpl.Window"]=Su;Su.__name__="haxe.zip._InflateImpl.Window";Su.prototype={buffer:null,pos:null,crc:null,slide:function(){this.crc!=null&&this.crc.update(this.buffer,0,32768);var a=new Ia(new ArrayBuffer(65536));
this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=a},addBytes:function(a,b,c){this.pos+c>65536&&this.slide();this.buffer.blit(this.pos,a,b,c);this.pos+=c},addByte:function(a){this.pos==65536&&this.slide();this.buffer.b[this.pos]=a;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){this.crc!=null&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:Su};var xf=O["haxe.zip._InflateImpl.State"]={__ename__:"haxe.zip._InflateImpl.State",
__constructs__:null,Head:{_hx_name:"Head",_hx_index:0,__enum__:"haxe.zip._InflateImpl.State",toString:D},Block:{_hx_name:"Block",_hx_index:1,__enum__:"haxe.zip._InflateImpl.State",toString:D},CData:{_hx_name:"CData",_hx_index:2,__enum__:"haxe.zip._InflateImpl.State",toString:D},Flat:{_hx_name:"Flat",_hx_index:3,__enum__:"haxe.zip._InflateImpl.State",toString:D},Crc:{_hx_name:"Crc",_hx_index:4,__enum__:"haxe.zip._InflateImpl.State",toString:D},Dist:{_hx_name:"Dist",_hx_index:5,__enum__:"haxe.zip._InflateImpl.State",
toString:D},DistOne:{_hx_name:"DistOne",_hx_index:6,__enum__:"haxe.zip._InflateImpl.State",toString:D},Done:{_hx_name:"Done",_hx_index:7,__enum__:"haxe.zip._InflateImpl.State",toString:D}};xf.__constructs__=[xf.Head,xf.Block,xf.CData,xf.Flat,xf.Crc,xf.Dist,xf.DistOne,xf.Done];var Hg=function(a,b,c){c==null&&(c=!0);b==null&&(b=!0);this.isFinal=!1;this.htools=new Ru;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?xf.Head:xf.Block;this.input=a;this.needed=this.nbits=
this.bits=0;this.output=null;this.outpos=0;this.lengths=[];this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.window=new Su(c)};r["haxe.zip.InflateImpl"]=
Hg;Hg.__name__="haxe.zip.InflateImpl";Hg.prototype={nbits:null,bits:null,state:null,isFinal: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(Hg.FIXED_HUFFMAN!=null)return Hg.FIXED_HUFFMAN;for(var a=[],b=0;b<288;){var c=b++;a.push(c<=143?8:c<=255?9:c<=279?7:8)}Hg.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return Hg.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=
b;this.output=a;if(c>0)for(;this.inflateLoop(););return c-this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=a;return b},getBit:function(){this.nbits==0&&(this.nbits=8,this.bits=this.input.readByte());var a=(this.bits&1)==1;this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return a==0?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=
this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a;this.needed--;this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},applyHuffman:function(a){switch(a._hx_index){case 0:var b=a.i;return b;case 1:return b=a.left,a=a.right,
this.applyHuffman(this.getBit()?a:b);case 2:return b=a.n,this.applyHuffman(a.table[this.getBits(b)])}},inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var f=this.applyHuffman(this.huffman);switch(f){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:d=f;a[c]=f;++c;break;case 16:f=c+3+this.getBits(2);if(f>b)throw la.thrown("Invalid data");for(;c<f;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);if(c>b)throw la.thrown("Invalid data");
break;case 18:c+=11+this.getBits(7);if(c>b)throw la.thrown("Invalid data");break;default:throw la.thrown("Invalid data");}}},inflateLoop:function(){switch(this.state._hx_index){case 0:var a=this.input.readByte();if((a&15)!=8)throw la.thrown("Invalid data");var b=this.input.readByte(),c=(b&32)!=0;if(((a<<8)+b)%31!=0)throw la.thrown("Invalid data");if(c)throw la.thrown("Unsupported dictionary");this.state=xf.Block;return!0;case 1:this.isFinal=this.getBit();switch(this.getBits(2)){case 0:this.len=this.input.readUInt16();
if(this.input.readUInt16()!=65535-this.len)throw la.thrown("Invalid data");this.state=xf.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=xf.CData,!0;case 2:a=this.getBits(5)+257;b=this.getBits(5)+1;var d=this.getBits(4)+4;c=0;for(var f=d;c<f;){var g=c++;this.lengths[Hg.CODE_LENGTHS_POS[g]]=this.getBits(3)}c=d;for(f=19;c<f;)g=c++,this.lengths[Hg.CODE_LENGTHS_POS[g]]=0;this.huffman=this.htools.make(this.lengths,0,
19,8);d=[];c=0;for(f=a+b;c<f;)c++,d.push(0);this.inflateLengths(d,a+b);this.huffdist=this.htools.make(d,a,b,16);this.huffman=this.htools.make(d,0,a,16);this.state=xf.CData;return!0;default:throw la.thrown("Invalid data");}break;case 2:b=this.applyHuffman(this.huffman);if(b<256)return this.addByte(b),this.needed>0;if(b==256)this.state=this.isFinal?xf.Crc:xf.Block;else{b-=257;a=Hg.LEN_EXTRA_BITS_TBL[b];if(a==-1)throw la.thrown("Invalid data");this.len=Hg.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=this.huffdist==
null?this.getRevBits(5):this.applyHuffman(this.huffdist);a=Hg.DIST_EXTRA_BITS_TBL[b];if(a==-1)throw la.thrown("Invalid data");this.dist=Hg.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw la.thrown("Invalid data");this.state=this.dist==1?xf.DistOne:xf.Dist}return!0;case 3:return a=this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,0,a),this.len==0&&(this.state=this.isFinal?xf.Crc:xf.Block),this.needed>0;case 4:a=this.window.checksum();
if(a==null)return this.state=xf.Done,!0;b=xl.read(this.input);if(!a.equals(b))throw la.thrown("Invalid CRC");this.state=xf.Done;return!0;case 5:for(;this.len>0&&this.needed>0;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;this.len==0&&(this.state=xf.CData);return this.needed>0;case 6:return a=this.len<this.needed?this.len:this.needed,this.addDistOne(a),this.len-=a,this.len==0&&(this.state=xf.CData),this.needed>0;case 7:return!1}},__class__:Hg};
var np=function(a){this.i=a};r["haxe.zip.Reader"]=np;np.__name__="haxe.zip.Reader";np.readZip=function(a){return(new np(a)).read()};np.prototype={i:null,readZipDate:function(){var a=this.i.readUInt16(),b=a>>11&31,c=a>>5&63;a&=31;var d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,d&31,b,c,a<<1)},readExtraFields:function(a){for(var b=new Xa;a>0;){if(a<4)throw la.thrown("Invalid extra fields data");var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw la.thrown("Invalid extra fields data");
if(c==28789){var f=this.i.readByte();if(f!=1){var g=new kp;g.addByte(f);g.add(this.i.read(d-1));b.add(vn.FUnknown(c,g.getBytes()))}else c=this.i.readInt32(),f=this.i.read(d-5).toString(),b.add(vn.FInfoZipUnicodePath(f,c))}else b.add(vn.FUnknown(c,this.i.read(d)));a-=4+d}return b},readEntryHeader:function(){var a=this.i,b=a.readInt32();if(b==33639248||b==101010256)return null;if(b!=67324752)throw la.thrown("Invalid Zip Data");a.readUInt16();b=a.readUInt16();var c=(b&2048)!=0;if((b&63473)!=0)throw la.thrown("Unsupported flags "+
b);var d=a.readUInt16(),f=d!=0;if(f&&d!=8)throw la.thrown("Unsupported compression "+d);d=this.readZipDate();var g=a.readInt32(),h=a.readInt32(),l=a.readInt32(),k=a.readInt16(),q=a.readInt16();a=a.readString(k);q=this.readExtraFields(q);c&&q.push(vn.FUtf8);(b&8)!=0&&(g=null);return{fileName:a,fileSize:l,fileTime:d,compressed:f,dataSize:h,data:null,crc32:g,extraFields:q}},read:function(){for(var a=new Xa,b=null;;){var c=this.readEntryHeader();if(c==null)break;if(c.crc32==null){if(c.compressed){b==
null&&(b=new Ia(new ArrayBuffer(65536)));for(var d=new kp,f=new Hg(this.i,!1,!1);;){var g=f.readBytes(b,0,65536);d.addBytes(b,0,g);if(g<65536)break}c.data=d.getBytes()}else c.data=this.i.read(c.dataSize);c.crc32=this.i.readInt32();c.crc32==134695760&&(c.crc32=this.i.readInt32());c.dataSize=this.i.readInt32();c.fileSize=this.i.readInt32();c.dataSize=c.fileSize;c.compressed=!1}else c.data=this.i.read(c.dataSize);a.add(c)}return a},__class__:np};var Lk=function(){};r["js.Browser"]=Lk;Lk.__name__="js.Browser";
Lk.__properties__={get_supported:"get_supported"};Lk.get_supported=function(){return typeof window!="undefined"&&typeof window.location!="undefined"?typeof window.location.protocol=="string":!1};Lk.getLocalStorage=function(){try{var a=window.localStorage;a.getItem("");if(a.length==0){var b="_hx_"+Math.random();a.setItem(b,b);a.removeItem(b)}return a}catch(c){return Rb.lastError=c,null}};var Yv=function(){};r["js.html._CanvasElement.CanvasUtil"]=Yv;Yv.__name__="js.html._CanvasElement.CanvasUtil";Yv.getContextWebGL=
function(a,b){var c=a.getContext("webgl",b);if(c!=null)return c;c=a.getContext("experimental-webgl",b);return c!=null?c:null};var Zv=function(){};r["js.lib._ArrayBuffer.ArrayBufferCompat"]=Zv;Zv.__name__="js.lib._ArrayBuffer.ArrayBufferCompat";Zv.sliceImpl=function(a,b){a=new Uint8Array(this,a,b==null?null:b-a);b=new Uint8Array(a.byteLength);b.set(a);return b.buffer};var st=function(){this.connected=!0;this.buttons=[];this.axes=[]};r["lime._internal.backend.html5.GameDeviceData"]=st;st.__name__="lime._internal.backend.html5.GameDeviceData";
st.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:st};var Tu=function(a){this.parent=a;this.id=-1;this.gain=1;this.position=new Wd};r["lime._internal.backend.html5.HTML5AudioSource"]=Tu;Tu.__name__="lime._internal.backend.html5.HTML5AudioSource";Tu.prototype={completed:null,gain:null,id:null,length:null,loops:null,parent:null,playing:null,position:null,dispose:function(){},init:function(){this.parent.buffer.get_src().pannerAttr({coneInnerAngle:360,coneOuterAngle:360,
coneOuterGain:0,distanceModel:"inverse",maxDistance:1E4,refDistance:1,rolloffFactor:1,panningModel:"equalpower"})},play:function(){if(!this.playing&&this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){this.playing=!0;var a=this.getCurrentTime();this.completed=!1;var b=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=b;this.setPosition(this.parent.get_position());
this.parent.buffer.__srcHowl.on("end",m(this,this.howl_onEnd),this.id);this.setCurrentTime(a)}},pause:function(){this.playing=!1;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.parent.buffer.__srcHowl.pause(this.id)},stop:function(){this.playing=!1;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",m(this,this.howl_onEnd),this.id))},howl_onEnd:function(){this.playing=!1;this.loops>0?(this.loops--,
this.stop(),this.play()):(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",m(this,this.howl_onEnd),this.id)),this.completed=!0,this.parent.onComplete.dispatch())},getCurrentTime:function(){if(this.id==-1)return 0;if(this.completed)return this.getLength();if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var a=(this.parent.buffer.__srcHowl.seek(this.id)*1E3|0)-this.parent.offset;return a<
0?0:a}return 0},setCurrentTime:function(a){if(this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null){var b=(a+this.parent.offset)/1E3;b<0&&(b=0);this.parent.buffer.__srcHowl.seek(b,this.id)}return a},getGain:function(){return this.gain},setGain:function(a){this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=null&&this.id!=-1&&this.parent.buffer.__srcHowl.volume(a,this.id);return this.gain=a},getLength:function(){return this.length!=0?this.length:this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=
null?this.parent.buffer.__srcHowl.duration()*1E3|0:0},setLength:function(a){return this.length=a},getLoops:function(){return this.loops},setLoops:function(a){return this.loops=a},getPitch:function(){return this.parent.buffer.__srcHowl.rate()},setPitch:function(a){this.parent.buffer.__srcHowl.rate(a);return this.getPitch()},getPosition:function(){return this.position},setPosition:function(a){this.position.x=a.x;this.position.y=a.y;this.position.z=a.z;this.position.w=a.w;this.parent.buffer!=null&&this.parent.buffer.__srcHowl!=
null&&this.parent.buffer.__srcHowl.pos!=null&&this.parent.buffer.__srcHowl.pos(this.position.x,this.position.y,this.position.z,this.id);return this.position},__class__:Tu};var Ob=function(){this.validStatus0=(new sb("Tizen","gi")).match(window.navigator.userAgent)};r["lime._internal.backend.html5.HTML5HTTPRequest"]=Ob;Ob.__name__="lime._internal.backend.html5.HTML5HTTPRequest";Ob.loadImage=function(a){var b=new yf;Ob.activeRequests<Ob.requestLimit?(Ob.activeRequests++,Ob.__loadImage(a,b,0)):Ob.requestQueue.add({instance:null,
uri:a,promise:b,type:"IMAGE",options:0});return b.future};Ob.loadImageFromBytes=function(a,b){var c=URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}));return c!=null?(a=new yf,Ob.activeRequests<Ob.requestLimit?(Ob.activeRequests++,Ob.__loadImage(c,a,1)):Ob.requestQueue.add({instance:null,uri:c,promise:a,type:"IMAGE",options:1}),a.future):Ob.loadImage("data:"+b+";base64,"+aj.encode(a))};Ob.processQueue=function(){if(Ob.activeRequests<Ob.requestLimit&&Ob.requestQueue.length>0){Ob.activeRequests++;
var a=Ob.requestQueue.pop();switch(a.type){case "BINARY":a.instance.__loadData(a.uri,a.promise);break;case "IMAGE":Ob.__loadImage(a.uri,a.promise,a.options);break;case "TEXT":a.instance.__loadText(a.uri,a.promise);break;default:Ob.activeRequests--}}};Ob.__createBlobURIFromBytes=function(a,b){return URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}))};Ob.__fixHostname=function(a){return a==null?"":a};Ob.__fixPort=function(a,b){if(a==null||a=="")switch(b){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 a};Ob.__fixProtocol=function(a){return a==null||a==""?"http:":a};Ob.__isInMemoryURI=function(a){return Z.startsWith(a,"data:")?!0:Z.startsWith(a,"blob:")};Ob.__isSameOrigin=function(a){if(a==null||a==""||Ob.__isInMemoryURI(a))return!0;Ob.originElement==null&&(Ob.originElement=window.document.createElement("a"),Ob.originHostname=Ob.__fixHostname(sa.location.hostname),Ob.originProtocol=
Ob.__fixProtocol(sa.location.protocol),Ob.originPort=Ob.__fixPort(sa.location.port,Ob.originProtocol));var b=Ob.originElement;b.href=a;b.hostname==""&&(b.href=b.href);var c=Ob.__fixHostname(b.hostname);a=Ob.__fixProtocol(b.protocol);b=Ob.__fixPort(b.port,a);c=c==""||c==Ob.originHostname;b=b==""||b==Ob.originPort;return a!="file:"&&c?b:!1};Ob.__loadImage=function(a,b,c){var d=new window.Image;Ob.__isSameOrigin(a)||(d.crossOrigin="Anonymous");Ob.supportsImageProgress==null&&(Ob.supportsImageProgress=
"onprogress"in d);if(Ob.supportsImageProgress||Ob.__isInMemoryURI(a))d.addEventListener("load",function(g){Ob.__revokeBlobURI(a,c);g=new bj(null,d.width,d.height);g.__srcImage=d;Ob.activeRequests--;Ob.processQueue();b.complete(new Ic(g))},!1),d.addEventListener("progress",function(g){b.progress(g.loaded,g.total)},!1),d.addEventListener("error",function(g){Ob.__revokeBlobURI(a,c);Ob.activeRequests--;Ob.processQueue();b.error(new wn(g.detail,null))},!1),d.src=a;else{var f=new XMLHttpRequest;f.onload=
function(g){Ob.activeRequests--;Ob.processQueue();(new Ic).__fromBytes(Ia.ofData(f.response),function(h){b.complete(h)})};f.onerror=function(g){b.error(new wn(g.message,null))};f.onprogress=function(g){g.lengthComputable&&b.progress(g.loaded,g.total)};f.open("GET",a,!0);f.responseType="arraybuffer";f.overrideMimeType("text/plain; charset=x-user-defined");f.send(null)}};Ob.__revokeBlobURI=function(a,b){(b&1)!=0&&URL.revokeObjectURL(a)};Ob.prototype={binary:null,parent:null,request:null,validStatus0:null,
cancel:function(){this.request!=null&&this.request.abort()},init:function(a){this.parent=a},load:function(a,b,c){this.request=new XMLHttpRequest;this.parent.method=="POST"?this.request.upload!=null&&this.request.upload.addEventListener("progress",b,!1):this.request.addEventListener("progress",b,!1);this.request.onreadystatechange=c;b="";if(this.parent.data==null){c=Object.keys(this.parent.formData.h);for(var d=c.length,f=0;f<d;){var g=c[f++];b.length>0&&(b+="&");var h=this.parent.formData.h[g];if(g.indexOf("[]")>
-1&&h instanceof Array){var l=[];for(h=Ga(h);h.hasNext();){var k=h.next();l.push(encodeURIComponent(k))}l=l.join("&amp;"+g+"=");b+=encodeURIComponent(g)+"="+l}else l=encodeURIComponent(g)+"=",g=L.string(h),b+=l+encodeURIComponent(g)}this.parent.method=="GET"&&b!=""&&(a=a.indexOf("?")>-1?a+("&"+b):a+("?"+b),b="")}this.request.open(L.string(this.parent.method),a,!0);this.parent.timeout>0&&(this.request.timeout=this.parent.timeout);this.binary&&(this.request.responseType="arraybuffer");a=null;l=0;for(c=
this.parent.headers;l<c.length;)d=c[l],++l,d.name=="Content-Type"?a=d.value:this.request.setRequestHeader(d.name,d.value);this.parent.contentType!=null&&(a=this.parent.contentType);a==null&&(this.parent.data!=null?a="application/octet-stream":b!=""&&(a="application/x-www-form-urlencoded"));a!=null&&this.request.setRequestHeader("Content-Type",a);this.parent.withCredentials&&(this.request.withCredentials=!0);this.parent.data!=null?this.request.send(this.parent.data.b.bufferValue):this.request.send(b)},
loadData:function(a){var b=new yf;Ob.activeRequests<Ob.requestLimit?(Ob.activeRequests++,this.__loadData(a,b)):Ob.requestQueue.add({instance:this,uri:a,promise:b,type:"BINARY",options:0});return b.future},loadText:function(a){var b=new yf;Ob.activeRequests<Ob.requestLimit?(Ob.activeRequests++,this.__loadText(a,b)):Ob.requestQueue.add({instance:this,uri:a,promise:b,type:"TEXT",options:0});return b.future},processResponse:function(){if(this.parent.enableResponseHeaders){this.parent.responseHeaders=
[];for(var a,b,c=0,d=this.request.getAllResponseHeaders().split("\n");c<d.length;)b=d[c],++c,a=Z.trim(X.substr(b,0,b.indexOf(":"))),b=Z.trim(X.substr(b,b.indexOf(":")+1,null)),a!=""&&this.parent.responseHeaders.push(new yr(a,b))}this.parent.responseStatus=this.request.status},__loadData:function(a,b){var c=this;this.binary=!0;this.load(a,function(d){b.progress(d.loaded,d.total)},function(d){c.request.readyState==4&&(d=null,c.request.responseType==""?c.request.responseText!=null&&(d=Ia.ofString(c.request.responseText)):
c.request.response!=null&&(d=Ia.ofData(c.request.response)),c.request.status!=null&&(c.request.status>=200&&c.request.status<400||c.validStatus0&&c.request.status==0)?(c.processResponse(),b.complete(d)):(c.processResponse(),b.error(new wn(c.request.status,d))),c.request=null,Ob.activeRequests--,Ob.processQueue())})},__loadText:function(a,b){var c=this;this.binary=!1;this.load(a,function(d){b.progress(d.loaded,d.total)},function(d){c.request.readyState==4&&(c.request.status!=null&&(c.request.status>=
200&&c.request.status<400||c.validStatus0&&c.request.status==0)?(c.processResponse(),b.complete(c.request.responseText)):(c.processResponse(),b.error(new wn(c.request.status,c.request.responseText))),c.request=null,Ob.activeRequests--,Ob.processQueue())})},__class__:Ob};var xn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Dynamic_Void"]=xn;xn.__name__="lime.app._Event_Dynamic_Void";xn.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:xn};var qm={skip:function(a){return a!=null&&a instanceof Object&&A.field(a,
"__skipPrototype__")!=1?a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null?a.buffer instanceof ArrayBuffer:!1:!0},disablePreserveClasses:function(a){a!=null&&a instanceof Object&&A.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&(a.__skipPrototype__=!0)},preserveClasses:function(a){if(a!=null&&a instanceof Object&&A.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof
ArrayBuffer)&&!Object.prototype.hasOwnProperty.call(a,"__prototype__")){if(!(a instanceof Array)){try{a.__prototype__=a.__class__!=null?a.__class__.__name__:null}catch(d){Rb.lastError=d;return}typeof a.toString=="function"&&A.deleteField(a,"toString")}var b=0;for(a=Object.values(a);b<a.length;){var c=a[b];++b;qm.preserveClasses(c)}}},restoreClasses:function(a,b){b==null&&(b=Math.random()*2147483647|0,A.field(a,"__restoreFlag__")==b&&++b);if(a!=null&&a instanceof Object&&A.field(a,"__skipPrototype__")!=
1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&A.field(a,"__restoreFlag__")!=b){try{a.__restoreFlag__=b}catch(f){Rb.lastError=f;return}if(A.field(a,"__prototype__")!=null)try{Object.setPrototypeOf(a,r[A.field(a,"__prototype__")].prototype)}catch(f){Rb.lastError=f}var c=0;for(a=Object.values(a);c<a.length;){var d=a[c];++c;qm.restoreClasses(d,b)}}}},Uu={__properties__:{get_portable:"get_portable"},toFunction:function(a){if(a.func!=null)return a.func;if(a.classPath!=
null&&a.functionName!=null)return a.func=r[a.classPath][a.functionName],a.func;if(a.sourceCode!=null)return a.func=(new Function("return "+a.sourceCode))(),a.func;throw la.thrown("Object is not a valid WorkFunction: "+L.string(a));},makePortable:function(a,b){if(a.func!=null){if(a.classPath!=null||a.functionName!=null){if((r[a.classPath]&&r[a.classPath][a.functionName])!=a.func)throw la.thrown("Could not make "+a.functionName+" portable. Either "+a.functionName+" isn't static, or "+a.classPath+" is something other than a class.");
a.func=null;return!0}a.sourceCode=a.func.toString();if(a.sourceCode.indexOf("[native code]")<0)return a.func=null,!0;a.sourceCode=null;throw la.thrown("Only static class functions can be made portable. Set -Dlime-warn-portability to see which line caused this.");}return a.func==null},get_portable:function(a){return a.func==null}},Pb=function(a,b){this.__href=a;b!=null&&(this.__worker=b,this.__worker.onmessage=m(this,this.dispatchMessage),this.onMessage=new xn);qm.disablePreserveClasses(this)};r["lime._internal.backend.html5.HTML5Thread"]=
Pb;Pb.__name__="lime._internal.backend.html5.HTML5Thread";Pb.current=function(){return Pb.__current};Pb.create=function(a){var b=new URL(Pb.__current.__href);b.pathname=X.substr(b.pathname,0,b.pathname.lastIndexOf("/")+1)+Ha.current.meta.h.file+".js";b.hash.length>0&&(b.hash+="_");b.hash+=Pb.__workerCount;Pb.__workerCount++;Uu.makePortable(a);b=new Pb(b.href,new Worker(b.href));b.sendMessage(a);return b};Pb.zeroDelay=function(){return new Promise(function(a,b){sa.setTimeout(a)})};Pb.returnMessage=
function(a,b,c){c==null&&(c=!0);Pb.__isWorker&&(c&&qm.preserveClasses(a),sa.postMessage(a,b))};Pb.equals=function(a,b){return a.__href==b.__href};Pb.prototype={onMessage:null,__href:null,__worker:null,sendMessage:function(a,b,c){c==null&&(c=!0);this.__worker!=null?(c&&qm.preserveClasses(a),this.__worker.postMessage(a,b)):Pb.__messages.add(a)},dispatchMessage:function(a){a=a.data;qm.restoreClasses(a);this.onMessage!=null&&this.onMessage.dispatch(a);Pb.__resolveMethods.isEmpty()?Pb.__messages.add(a):
Pb.__resolveMethods.pop()(a)},destroy:function(){if(this.__worker!=null)this.__worker.terminate();else if(Pb.__isWorker)try{sa.close()}catch(a){Rb.lastError=a}},isWorker:function(){return this.__worker==null?Pb.__isWorker:!0},__class__:Pb};var qc=function(a){this.__stopMousePropagation=this.imeCompositionActive=!1;this.unusedTouchesPool=new Xa;this.scale=1;this.currentTouches=new we;this.parent=a;this.cursor=$c.DEFAULT;this.cacheMouseY=this.cacheMouseX=0;var b=a.__attributes;Object.prototype.hasOwnProperty.call(b,
"context")||(b.context={});this.renderType=b.context.type;Object.prototype.hasOwnProperty.call(b,"element")&&(a.element=b.element);var c=a.element;Object.prototype.hasOwnProperty.call(b,"allowHighDPI")&&b.allowHighDPI&&this.renderType!="dom"&&(this.scale=window.devicePixelRatio);a.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(b,"width")?b.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(b,"height")?b.height:0;a.__width=this.setWidth;a.__height=this.setHeight;a.id=
qc.windowID++;c instanceof HTMLCanvasElement?this.canvas=c:this.renderType=="dom"?this.div=window.document.createElement("div"):this.canvas=window.document.createElement("canvas");if(this.canvas!=null){var d=this.canvas.style;d.setProperty("-webkit-transform","translateZ(0)",null);d.setProperty("transform","translateZ(0)",null)}else this.div!=null&&(d=this.div.style,d.setProperty("-webkit-transform","translate3D(0,0,0)",null),d.setProperty("transform","translate3D(0,0,0)",null),d.position="relative",
d.overflow="hidden",d.setProperty("-webkit-user-select","none",null),d.setProperty("-moz-user-select","none",null),d.setProperty("-ms-user-select","none",null),d.setProperty("-o-user-select","none",null));a.__width==0&&a.__height==0&&(c!=null?(a.__width=c.clientWidth,a.__height=c.clientHeight):(a.__width=window.innerWidth,a.__height=window.innerHeight),this.cacheElementWidth=a.__width,this.cacheElementHeight=a.__height,this.resizeElement=!0);this.canvas!=null?(this.canvas.width=Math.round(a.__width*
this.scale),this.canvas.height=Math.round(a.__height*this.scale),this.canvas.style.width=a.__width+"px",this.canvas.style.height=a.__height+"px"):(this.div.style.width=a.__width+"px",this.div.style.height=a.__height+"px");if(Object.prototype.hasOwnProperty.call(b,"resizable")&&b.resizable||!Object.prototype.hasOwnProperty.call(b,"width")&&this.setWidth==0&&this.setHeight==0)a.__resizable=!0;this.updateSize();if(c!=null){this.canvas!=null?c!=this.canvas&&c.appendChild(this.canvas):c.appendChild(this.div);
b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" ");for(d=0;d<b.length;){var f=b[d];++d;c.addEventListener(f,m(this,this.handleMouseEvent),!0)}c.addEventListener("contextmenu",m(this,this.handleContextMenuEvent),!0);c.addEventListener("dragstart",m(this,this.handleDragEvent),!0);c.addEventListener("dragover",m(this,this.handleDragEvent),!0);c.addEventListener("drop",m(this,this.handleDragEvent),!0);c.addEventListener("touchstart",m(this,this.handleTouchEvent),!0);c.addEventListener("touchmove",
m(this,this.handleTouchEvent),!0);c.addEventListener("touchend",m(this,this.handleTouchEvent),!0);c.addEventListener("touchcancel",m(this,this.handleTouchEvent),!0);c.addEventListener("gamepadconnected",m(this,this.handleGamepadEvent),!0);c.addEventListener("gamepaddisconnected",m(this,this.handleGamepadEvent),!0)}this.createContext();a.context.type=="webgl"&&(this.canvas.addEventListener("webglcontextlost",m(this,this.handleContextEvent),!1),this.canvas.addEventListener("webglcontextrestored",m(this,
this.handleContextEvent),!1))};r["lime._internal.backend.html5.HTML5Window"]=qc;qc.__name__="lime._internal.backend.html5.HTML5Window";qc.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,textInputRect:null,unusedTouchesPool:null,__focusPending:null,
__stopMousePropagation:null,alert:function(a,b){a!=null&&window.alert(L.string(a))},close:function(){var a=this.parent.element;if(a!=null){this.canvas!=null?(a!=this.canvas&&a.removeChild(this.canvas),this.canvas=null):this.div!=null&&(a.removeChild(this.div),this.div=null);for(var b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" "),c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d,m(this,this.handleMouseEvent),!0)}a.removeEventListener("contextmenu",m(this,this.handleContextMenuEvent),
!0);a.removeEventListener("dragstart",m(this,this.handleDragEvent),!0);a.removeEventListener("dragover",m(this,this.handleDragEvent),!0);a.removeEventListener("drop",m(this,this.handleDragEvent),!0);a.removeEventListener("touchstart",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchmove",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchend",m(this,this.handleTouchEvent),!0);a.removeEventListener("touchcancel",m(this,this.handleTouchEvent),!0);a.removeEventListener("gamepadconnected",
m(this,this.handleGamepadEvent),!0);a.removeEventListener("gamepaddisconnected",m(this,this.handleGamepadEvent),!0)}this.parent.application.__removeWindow(this.parent)},createContext:function(){var a=new Vu,b=this.parent.__attributes.context;a.window=this.parent;a.attributes=b;if(this.div!=null)a.dom=this.div,a.type="dom",a.version="";else if(this.canvas!=null){var c=null,d=this.renderType=="canvas",f=this.renderType=="opengl"||this.renderType=="opengles"||this.renderType=="webgl",g=!Object.prototype.hasOwnProperty.call(b,
"version")||b.version!="1",h=!1;if(f||!d&&(!Object.prototype.hasOwnProperty.call(b,"hardware")||b.hardware)){d=Object.prototype.hasOwnProperty.call(b,"background")&&b.background==null;f=Object.prototype.hasOwnProperty.call(b,"colorDepth")?b.colorDepth:16;var l=Object.prototype.hasOwnProperty.call(b,"antialiasing")&&b.antialiasing>0,k=Object.prototype.hasOwnProperty.call(b,"depth")?b.depth:!0,q=Object.prototype.hasOwnProperty.call(b,"stencil")&&b.stencil;b=Object.prototype.hasOwnProperty.call(b,"preserveDrawingBuffer")&&
b.preserveDrawingBuffer;b={alpha:d||f>16,antialias:l,depth:k,premultipliedAlpha:!0,stencil:q,preserveDrawingBuffer:b,failIfMajorPerformanceCaveat:!1};d=["webgl","experimental-webgl"];g&&d.unshift("webgl2");for(g=0;g<d.length&&(f=d[g],++g,c=this.canvas.getContext(f,b),c!=null&&f=="webgl2"&&(h=!0),c==null););}c==null?(a.canvas2D=this.canvas.getContext("2d"),a.type="canvas",a.version="",a.attributes.hardware=!1):(a.webgl=pd.fromWebGL2RenderContext(c),h&&(a.webgl2=c),y.context==null&&(y.context=c,y.type=
"webgl",y.version=h?2:1),a.type="webgl",a.version=h?"2":"1",a.attributes.hardware=!0)}this.parent.context=a},focus:function(){},focusTextInput:function(){var a=this;this.__focusPending||(this.__focusPending=!0,rd.delay(function(){a.__focusPending=!1;a.textInputEnabled&&qc.textInput.focus()},20))},getCursor:function(){return this.cursor},getDisplay:function(){return Hb.getDisplay(0)},getDisplayMode:function(){return Hb.getDisplay(0).currentMode},getFrameRate:function(){return this.parent.application==
null?0:this.parent.application.__backend.framePeriod<0?60:this.parent.application.__backend.framePeriod==1E3?0:1E3/this.parent.application.__backend.framePeriod},getMouseLock:function(){return!1},getOpacity:function(){return 1},getTextInputEnabled:function(){return this.textInputEnabled},handleContextEvent:function(a){switch(a.type){case "webglcontextlost":a.cancelable&&a.preventDefault();this.parent.context=null;this.parent.onRenderContextLost.dispatch();break;case "webglcontextrestored":this.createContext(),
this.parent.onRenderContextRestored.dispatch(this.parent.context)}},handleContextMenuEvent:function(a){(this.parent.onMouseUp.canceled||this.parent.onMouseDown.canceled)&&a.cancelable&&a.preventDefault()},handleCutOrCopyEvent:function(a){var b=zf.get_text();b==null&&(b="");a.clipboardData.setData("text/plain",b);a.cancelable&&a.preventDefault()},handleDragEvent:function(a){switch(a.type){case "dragover":return a.preventDefault(),!1;case "dragstart":if(u.__cast(a.target,HTMLElement).nodeName.toLowerCase()==
"img"&&a.cancelable)return a.preventDefault(),!1;break;case "drop":if(a.dataTransfer!=null&&a.dataTransfer.files.length>0)return this.parent.onDropFile.dispatch(a.dataTransfer.files),a.preventDefault(),!1}return!0},handleFocusEvent:function(a){this.textInputEnabled&&(a.relatedTarget==null||this.isDescendent(a.relatedTarget))&&this.focusTextInput()},handleFullscreenEvent:function(a){if((document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)!=
null)this.isFullscreen=!0,this.parent.__fullscreen=!0,this.requestedFullscreen&&(this.requestedFullscreen=!1,this.parent.onFullscreen.dispatch());else{this.isFullscreen=!1;this.parent.__fullscreen=!1;this.parent.onRestore.dispatch();a=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];for(var b=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror","MSFullscreenError"],c=0,d=a.length;c<d;){var f=c++;window.document.removeEventListener(a[f],m(this,this.handleFullscreenEvent),
!1);window.document.removeEventListener(b[f],m(this,this.handleFullscreenEvent),!1)}}},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":Ce.__connect(a.gamepad.index);a.gamepad.mapping=="standard"&&cf.__connect(a.gamepad.index);break;case "gamepaddisconnected":Ce.__disconnect(a.gamepad.index),cf.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){this.imeCompositionActive||qc.textInput.value==qc.dummyCharacter||(a=Z.replace(qc.textInput.value,qc.dummyCharacter,""),a.length>
0&&this.parent.onTextInput.dispatch(a),qc.textInput.value=qc.dummyCharacter)},handleMouseEvent:function(a){if(a.type!="wheel"){if(this.parent.element!=null)if(this.canvas!=null){var b=this.canvas.getBoundingClientRect();var c=this.parent.__width/b.width*(a.clientX-b.left);b=this.parent.__height/b.height*(a.clientY-b.top)}else this.div!=null?(b=this.div.getBoundingClientRect(),c=a.clientX-b.left,b=a.clientY-b.top):(b=this.parent.element.getBoundingClientRect(),c=this.parent.__width/b.width*(a.clientX-
b.left),b=this.parent.__height/b.height*(a.clientY-b.top));else c=a.clientX,b=a.clientY;switch(a.type){case "mousedown":a.currentTarget==this.parent.element&&(window.addEventListener("mouseup",m(this,this.handleMouseEvent)),window.addEventListener("mousemove",m(this,this.handleMouseEvent)));this.__stopMousePropagation=!1;this.parent.clickCount=a.detail;this.parent.onMouseDown.dispatch(c,b,a.button);this.parent.clickCount=0;this.parent.onMouseDown.canceled&&a.cancelable&&a.preventDefault();break;case "mouseenter":a.target==
this.parent.element&&(this.parent.onEnter.dispatch(),this.parent.onEnter.canceled&&a.cancelable&&a.preventDefault());break;case "mouseleave":a.target==this.parent.element&&(this.parent.onLeave.dispatch(),this.parent.onLeave.canceled&&a.cancelable&&a.preventDefault());break;case "mousemove":if(this.__stopMousePropagation&&a.currentTarget!=this.parent.element){this.__stopMousePropagation=!1;return}this.__stopMousePropagation=a.currentTarget==this.parent.element;if(c!=this.cacheMouseX||b!=this.cacheMouseY)this.parent.onMouseMove.dispatch(c,
b),this.parent.onMouseMoveRelative.dispatch(c-this.cacheMouseX,b-this.cacheMouseY),(this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&a.cancelable&&a.preventDefault();break;case "mouseup":if(this.__stopMousePropagation&&a.currentTarget!=this.parent.element){this.__stopMousePropagation=!1;return}window.removeEventListener("mouseup",m(this,this.handleMouseEvent));window.removeEventListener("mousemove",m(this,this.handleMouseEvent));this.__stopMousePropagation=a.currentTarget==
this.parent.element;this.parent.clickCount=a.detail;this.parent.onMouseUp.dispatch(c,b,a.button);this.parent.clickCount=0;this.parent.onMouseUp.canceled&&a.cancelable&&a.preventDefault()}this.cacheMouseX=c;this.cacheMouseY=b}else{switch(a.deltaMode){case 0:c=yl.PIXELS;break;case 1:c=yl.LINES;break;case 2:c=yl.PAGES;break;default:c=yl.UNKNOWN}this.parent.onMouseWheel.dispatch(a.deltaX,-a.deltaY,c);this.parent.onMouseWheel.canceled&&a.cancelable&&a.preventDefault()}},handlePasteEvent:function(a){if(a.clipboardData.types.indexOf("text/plain")>
-1){var b=a.clipboardData.getData("text/plain");zf.set_text(b);this.textInputEnabled&&this.parent.onTextInput.dispatch(b);a.cancelable&&a.preventDefault()}},handleResizeEvent:function(a){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(a){a.cancelable&&a.preventDefault();var b=null;this.parent.element!=null&&(b=this.canvas!=null?this.canvas.getBoundingClientRect():this.div!=null?this.div.getBoundingClientRect():this.parent.element.getBoundingClientRect());var c=this.setWidth,d=
this.setHeight;if(c==0||d==0)b!=null?(c=b.width,d=b.height):d=c=1;for(var f,g,h,l,k,q=0,w=a.changedTouches;q<w.length;){var v=w[q];++q;b!=null?(g=c/b.width*(v.clientX-b.left),h=d/b.height*(v.clientY-b.top)):(g=v.clientX,h=v.clientY);if(a.type=="touchstart")f=this.unusedTouchesPool.pop(),f==null?f=new De(g/c,h/d,v.identifier,0,0,v.force,this.parent.id):(f.x=g/c,f.y=h/d,f.id=v.identifier,f.dx=0,f.dy=0,f.pressure=v.force,f.device=this.parent.id),this.currentTouches.h[v.identifier]=f,De.onStart.dispatch(f),
this.primaryTouch==null&&(this.primaryTouch=f),f==this.primaryTouch&&this.parent.onMouseDown.dispatch(g,h,0);else if(f=this.currentTouches.h[v.identifier],f!=null)switch(l=f.x,k=f.y,f.x=g/c,f.y=h/d,f.dx=f.x-l,f.dy=f.y-k,f.pressure=v.force,a.type){case "touchcancel":De.onCancel.dispatch(f);this.currentTouches.remove(v.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.primaryTouch=null);break;case "touchend":De.onEnd.dispatch(f);this.currentTouches.remove(v.identifier);this.unusedTouchesPool.add(f);
f==this.primaryTouch&&(this.parent.onMouseUp.dispatch(g,h,0),this.primaryTouch=null);break;case "touchmove":De.onMove.dispatch(f),f==this.primaryTouch&&this.parent.onMouseMove.dispatch(g,h)}}},isDescendent:function(a){if(a==this.parent.element)return!0;for(;a!=null;){if(a.parentNode==this.parent.element)return!0;a=a.parentNode}return!1},move:function(a,b){},readPixels:function(a){if(this.canvas!=null){var b=new We(0,0,this.canvas.width,this.canvas.height);a==null?a=b:a.intersection(b,a);if(a.width>
0&&a.height>0)return b=window.document.createElement("canvas"),b.width=a.width|0,b.height=a.height|0,b.getContext("2d").drawImage(this.canvas,-a.x,-a.y),Ic.fromCanvas(b)}return null},resize:function(a,b){},setMinSize:function(a,b){},setMaxSize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){qc.textArea==null&&(qc.textArea=window.document.createElement("textarea"),qc.textArea.style.height="0px",qc.textArea.style.left="-100px",qc.textArea.style.opacity="0",qc.textArea.style.position=
"fixed",qc.textArea.style.top="-100px",qc.textArea.style.width="0px",window.document.body.appendChild(qc.textArea));qc.textArea.value=a;qc.textArea.focus();qc.textArea.select();window.document.queryCommandEnabled("copy")&&window.document.execCommand("copy");this.textInputEnabled&&this.focusTextInput()},setCursor:function(a){if(this.cursor!=a){if(a==null)this.parent.element.style.cursor="none";else{switch(a._hx_index){case 0:var b="default";break;case 1:b="crosshair";break;case 3:b="move";break;case 4:b=
"pointer";break;case 5:b="nesw-resize";break;case 6:b="ns-resize";break;case 7:b="nwse-resize";break;case 8:b="ew-resize";break;case 9:b="text";break;case 10:b="wait";break;case 11:b="wait";break;default:b="auto"}this.parent.element.style.cursor=b}this.cursor=a}return this.cursor},setDisplayMode:function(a){return a},setFrameRate:function(a){this.parent.application!=null&&(a>=60?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=-1):a>0?this.parent==this.parent.application.__window&&
(this.parent.application.__backend.framePeriod=1E3/a):this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=1E3));return a},setFullscreen:function(a){a?this.requestedFullscreen||this.isFullscreen||(this.requestedFullscreen=!0,(G=this.parent.element,m(G,G.requestFullscreen))?(document.addEventListener("fullscreenchange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("fullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.requestFullscreen()):
this.parent.element.mozRequestFullScreen?(document.addEventListener("mozfullscreenchange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("mozfullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.mozRequestFullScreen()):this.parent.element.webkitRequestFullscreen?(document.addEventListener("webkitfullscreenchange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("webkitfullscreenerror",m(this,this.handleFullscreenEvent),!1),this.parent.element.webkitRequestFullscreen()):
this.parent.element.msRequestFullscreen&&(document.addEventListener("MSFullscreenChange",m(this,this.handleFullscreenEvent),!1),document.addEventListener("MSFullscreenError",m(this,this.handleFullscreenEvent),!1),this.parent.element.msRequestFullscreen())):this.isFullscreen&&(this.requestedFullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&
document.msExitFullscreen());return a},setIcon:function(a){kb.convertToCanvas(a);var b=window.document.querySelector("link[rel*='icon']");b==null&&(b=window.document.createElement("link"));b.type="image/x-icon";b.rel="shortcut icon";b.href=a.buffer.get_src().toDataURL("image/x-icon");window.document.getElementsByTagName("head")[0].appendChild(b)},setMaximized:function(a){return!1},setMinimized:function(a){return!1},setMouseLock:function(a){},setOpacity:function(a){},setResizable:function(a){return a},
setTextInputEnabled:function(a){if(a){if(qc.textInput==null){qc.textInput=window.document.createElement("input");var b=sa.navigator.userAgent.indexOf("Android")>=0?"password":"text";qc.textInput.type=b;qc.textInput.style.position="absolute";qc.textInput.style.opacity="0";qc.textInput.style.color="transparent";qc.textInput.value=qc.dummyCharacter;qc.textInput.autocapitalize="off";qc.textInput.autocorrect="off";qc.textInput.autocomplete="off";qc.textInput.style.left="0px";qc.textInput.style.top="50%";
(new sb("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(qc.textInput.style.fontSize="0px",qc.textInput.style.width="0px",qc.textInput.style.height="0px"):(qc.textInput.style.width="1px",qc.textInput.style.height="1px");qc.textInput.style.pointerEvents="none";qc.textInput.style.zIndex="-10000000"}qc.textInput.parentNode==null&&this.parent.element.appendChild(qc.textInput);this.textInputEnabled||(qc.textInput.addEventListener("input",m(this,this.handleInputEvent),!0),qc.textInput.addEventListener("blur",
m(this,this.handleFocusEvent),!0),qc.textInput.addEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),qc.textInput.addEventListener("copy",m(this,this.handleCutOrCopyEvent),!0),qc.textInput.addEventListener("paste",m(this,this.handlePasteEvent),!0),qc.textInput.addEventListener("compositionstart",m(this,this.handleCompositionstartEvent),!0),qc.textInput.addEventListener("compositionend",m(this,this.handleCompositionendEvent),!0));qc.textInput.focus();qc.textInput.select()}else qc.textInput!=
null&&(qc.textInput.blur(),qc.textInput.removeEventListener("input",m(this,this.handleInputEvent),!0),qc.textInput.removeEventListener("blur",m(this,this.handleFocusEvent),!0),qc.textInput.removeEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),qc.textInput.removeEventListener("copy",m(this,this.handleCutOrCopyEvent),!0),qc.textInput.removeEventListener("paste",m(this,this.handlePasteEvent),!0),qc.textInput.removeEventListener("compositionstart",m(this,this.handleCompositionstartEvent),!0),
qc.textInput.removeEventListener("compositionend",m(this,this.handleCompositionendEvent),!0));return this.textInputEnabled=a},setTextInputRect:function(a){return this.textInputRect=a},imeCompositionActive:null,handleCompositionstartEvent:function(a){this.imeCompositionActive=!0},handleCompositionendEvent:function(a){this.imeCompositionActive=!1;this.handleInputEvent(a)},setTitle:function(a){a!=null&&(window.document.title=a);return a},setVisible:function(a){return a},updateSize:function(){if(this.parent.__resizable){if(this.parent.element!=
null){var a=this.parent.element.clientWidth;var b=this.parent.element.clientHeight}else a=window.innerWidth,b=window.innerHeight;if(a!=this.cacheElementWidth||b!=this.cacheElementHeight){this.cacheElementWidth=a;this.cacheElementHeight=b;var c=this.resizeElement||this.setWidth==0&&this.setHeight==0;if(this.parent.element!=null&&(this.div==null||this.div!=null&&c))if(c){if(this.parent.__width!=a||this.parent.__height!=b)this.parent.__width=a|0,this.parent.__height=b|0,this.canvas!=null?this.parent.element!=
this.canvas&&(this.canvas.width=Math.round(a*this.scale),this.canvas.height=Math.round(b*this.scale),this.canvas.style.width=a+"px",this.canvas.style.height=b+"px"):(this.div.style.width=a+"px",this.div.style.height=b+"px"),this.parent.onResize.dispatch(a|0,b|0)}else{c=this.setWidth!=0?a/this.setWidth:1;var d=this.setHeight!=0?b/this.setHeight:1,f=a,g=b,h=0,l=0;c<d?(g=Math.floor(this.setHeight*c),l=Math.floor((b-g)/2)):(f=Math.floor(this.setWidth*d),h=Math.floor((a-f)/2));this.canvas!=null?this.parent.element!=
this.canvas&&(this.canvas.style.width=f+"px",this.canvas.style.height=g+"px",this.canvas.style.marginLeft=h+"px",this.canvas.style.marginTop=l+"px"):(this.div.style.width=f+"px",this.div.style.height=g+"px",this.div.style.marginLeft=h+"px",this.div.style.marginTop=l+"px")}}}},warpMouse:function(a,b){},__class__:qc};var cx=function(){};r["lime._internal.backend.native.NativeCFFI"]=cx;cx.__name__="lime._internal.backend.native.NativeCFFI";var $v=function(){};r["lime._internal.format.BMP"]=$v;$v.__name__=
"lime._internal.format.BMP";$v.encode=function(a,b){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);b==null&&(b=rm.RGB);var c=14,d=40,f=a.width*a.height*4;if(b!=null)switch(b._hx_index){case 0:f=(a.width*3+a.width*3%4)*a.height;break;case 1:d=108;break;case 2:c=0,f+=a.width*a.height}var g=new Ia(new ArrayBuffer(c+d+f)),h=0;c>0&&(g.b[h++]=66,g.b[h++]=77,g.setInt32(h,g.length),h+=4,g.setUInt16(h,0),h+=2,g.setUInt16(h,0),h+=2,g.setInt32(h,c+d),h+=4);g.setInt32(h,
d);h+=4;g.setInt32(h,a.width);h+=4;g.setInt32(h,b==rm.ICO?a.height*2:a.height);h+=4;g.setUInt16(h,1);h+=2;g.setUInt16(h,b==rm.RGB?24:32);h+=2;g.setInt32(h,b==rm.BITFIELD?3:0);h+=4;g.setInt32(h,f);h+=4;g.setInt32(h,11824);h+=4;g.setInt32(h,11824);h+=4;g.setInt32(h,0);h+=4;g.setInt32(h,0);h+=4;if(b==rm.BITFIELD)for(g.setInt32(h,16711680),h+=4,g.setInt32(h,65280),h+=4,g.setInt32(h,255),h+=4,g.setInt32(h,-16777216),h+=4,g.b[h++]=32,g.b[h++]=110,g.b[h++]=105,g.b[h++]=87,c=0;c<48;)c++,g.b[h++]=0;d=a.getPixels(new We(0,
0,a.width,a.height),1);if(b!=null)switch(b._hx_index){case 0:c=0;for(b=a.height;c<b;){var l=c++;l=(a.height-1-l)*4*a.width;for(var k=0,q=a.width;k<q;){k++;l++;var w=d.b[l++];var v=d.b[l++];var z=d.b[l++];g.b[h++]=z;g.b[h++]=v;g.b[h++]=w}f=0;for(var n=a.width*3%4;f<n;)f++,g.b[h++]=0}break;case 1:c=0;for(b=a.height;c<b;)for(l=c++,l=(a.height-1-l)*4*a.width,k=0,q=a.width;k<q;){k++;var E=d.b[l++];w=d.b[l++];v=d.b[l++];z=d.b[l++];g.b[h++]=z;g.b[h++]=v;g.b[h++]=w;g.b[h++]=E}break;case 2:f=new Ia(new ArrayBuffer(a.width*
a.height));c=n=0;for(b=a.height;c<b;)for(l=c++,l=(a.height-1-l)*4*a.width,k=0,q=a.width;k<q;)k++,E=d.b[l++],w=d.b[l++],v=d.b[l++],z=d.b[l++],g.b[h++]=z,g.b[h++]=v,g.b[h++]=w,g.b[h++]=E,f.b[n++]=0;g.blit(h,f,0,a.width*a.height)}return g};var rm=O["lime._internal.format.BMPType"]={__ename__:"lime._internal.format.BMPType",__constructs__:null,RGB:{_hx_name:"RGB",_hx_index:0,__enum__:"lime._internal.format.BMPType",toString:D},BITFIELD:{_hx_name:"BITFIELD",_hx_index:1,__enum__:"lime._internal.format.BMPType",
toString:D},ICO:{_hx_name:"ICO",_hx_index:2,__enum__:"lime._internal.format.BMPType",toString:D}};rm.__constructs__=[rm.RGB,rm.BITFIELD,rm.ICO];var aj=function(){};r["lime._internal.format.Base64"]=aj;aj.__name__="lime._internal.format.Base64";aj.decode=function(a){return Xh.decode(a)};aj.encode=function(a){var b=[],c=aj.DICTIONARY,d=aj.EXTENDED_DICTIONARY,f=a.length,g=Math.floor(f/3),h=g*2;b.length=Math.ceil(f/3)*2;for(var l=0,k=0,q;k<h;)q=a.b[l]<<16|a.b[l+1]<<8|a.b[l+2],b[k]=d[q>>12&4095],b[k+1]=
d[q&4095],l+=3,k+=2;switch(f-g*3){case 1:q=a.b[l]<<16;b[k]=d[q>>12&4095];b[k+1]="==";break;case 2:q=a.b[l]<<16|a.b[l+1]<<8,b[k]=d[q>>12&4095],b[k+1]=c[q>>6&63]+"="}return b.join("")};var zr=function(){};r["lime._internal.format.Deflate"]=zr;zr.__name__="lime._internal.format.Deflate";zr.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);return Ia.ofData(a)};zr.decompress=function(a){a=pako.inflateRaw(a.b.bufferValue);return Ia.ofData(a)};var Ar=function(){};r["lime._internal.format.GZip"]=Ar;
Ar.__name__="lime._internal.format.GZip";Ar.compress=function(a){a=pako.gzip(a.b.bufferValue);return Ia.ofData(a)};Ar.decompress=function(a){a=pako.ungzip(a.b.bufferValue);return Ia.ofData(a)};var Br=function(){};r["lime._internal.format.JPEG"]=Br;Br.__name__="lime._internal.format.JPEG";Br.decodeBytes=function(a,b){return null};Br.decodeFile=function(a,b){return null};Br.encode=function(a,b){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);kb.convertToCanvas(a,
!1);if(a.buffer.__srcCanvas!=null){a=a.buffer.__srcCanvas.toDataURL("image/jpeg",b/100);a=window.atob(a.split(";base64,")[1]);b=new Ia(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var f=c++;b.b[f]=X.cca(a,f)}return b}return null};var Cr=function(){};r["lime._internal.format.LZMA"]=Cr;Cr.__name__="lime._internal.format.LZMA";Cr.compress=function(a){var b=LZMA.compress;a=a.b.bufferValue;a=a!=null?new Uint8Array(a,0):null;b=b(a,5);return typeof b=="string"?Ia.ofString(b):Ia.ofData(b)};Cr.decompress=
function(a){var b=LZMA.decompress;a=a.b.bufferValue;a=a!=null?new Uint8Array(a,0):null;b=b(a);return typeof b=="string"?Ia.ofString(b):Ia.ofData(b)};var op=function(){};r["lime._internal.format.PNG"]=op;op.__name__="lime._internal.format.PNG";op.decodeBytes=function(a,b){return null};op.decodeFile=function(a,b){return null};op.encode=function(a){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);kb.convertToCanvas(a,!1);if(a.buffer.__srcCanvas!=null){a=
a.buffer.__srcCanvas.toDataURL("image/png");a=window.atob(a.split(";base64,")[1]);for(var b=new Ia(new ArrayBuffer(a.length)),c=0,d=a.length;c<d;){var f=c++;b.b[f]=X.cca(a,f)}return b}return null};var Dr=function(){};r["lime._internal.format.Zlib"]=Dr;Dr.__name__="lime._internal.format.Zlib";Dr.compress=function(a){a=pako.deflate(a.b.bufferValue);return Ia.ofData(a)};Dr.decompress=function(a){a=pako.inflate(a.b.bufferValue);return Ia.ofData(a)};var kb=function(){};r["lime._internal.graphics.ImageCanvasUtil"]=
kb;kb.__name__="lime._internal.graphics.ImageCanvasUtil";kb.colorTransform=function(a,b,c){kb.convertToData(a);Lb.colorTransform(a,b,c)};kb.convertToCanvas=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=null?(c.__srcCanvas==null&&(kb.createCanvas(a,c.__srcImage.width,c.__srcImage.height),c.__srcContext.drawImage(c.__srcImage,0,0)),c.__srcImage=null):c.__srcCanvas==null&&c.data!=null?(a.set_transparent(!0),kb.createCanvas(a,c.width,c.height),kb.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,
0,0)):a.type==Uf.DATA&&c.__srcImageData!=null&&a.dirty&&(c.__srcContext.putImageData(c.__srcImageData,0,0),a.dirty=!1);b?(c.data=null,c.__srcImageData=null):c.data==null&&c.__srcImageData!=null&&(c.data=c.__srcImageData.data);a.type=Uf.CANVAS};kb.convertToData=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=null&&kb.convertToCanvas(a);if(c.__srcCanvas!=null&&c.data==null)kb.createImageData(a),a.type==Uf.CANVAS&&(a.dirty=!1);else if(a.type==Uf.CANVAS&&c.__srcCanvas!=null&&a.dirty){if(c.__srcImageData==
null)kb.createImageData(a);else{c.__srcImageData=c.__srcContext.getImageData(0,0,c.width,c.height);var d=c.__srcImageData.data.buffer;d=d!=null?new Uint8Array(d):null;c.data=d}a.dirty=!1}b&&(a.buffer.__srcCanvas=null,a.buffer.__srcContext=null);a.type=Uf.DATA};kb.copyChannel=function(a,b,c,d,f,g){kb.convertToData(b);kb.convertToData(a);Lb.copyChannel(a,b,c,d,f,g)};kb.copyPixels=function(a,b,c,d,f,g,h){h==null&&(h=!1);d==null||d.x>=a.width||d.y>=a.height||c==null||c.width<1||c.height<1||(f!=null&&
f.get_transparent()&&(g==null&&(g=new Ff),b=b.clone(),b.copyChannel(f,new We(c.x+g.x,c.y+g.y,c.width,c.height),new Ff(c.x,c.y),ti.ALPHA,ti.ALPHA)),kb.convertToCanvas(a,!0),h||a.get_transparent()&&b.get_transparent()&&a.buffer.__srcContext.clearRect(d.x+a.offsetX,d.y+a.offsetY,c.width+a.offsetX,c.height+a.offsetY),kb.convertToCanvas(b),b.buffer.get_src()!=null&&(a.buffer.__srcContext.globalCompositeOperation="source-over",a.buffer.__srcContext.drawImage(b.buffer.get_src(),c.x+b.offsetX|0,c.y+b.offsetY|
0,c.width|0,c.height|0,d.x+a.offsetX|0,d.y+a.offsetY|0,c.width|0,c.height|0)),a.dirty=!0,a.version++)};kb.createCanvas=function(a,b,c){var d=a.buffer;d.__srcCanvas==null&&(d.__srcCanvas=window.document.createElement("canvas"),d.__srcCanvas.width=b,d.__srcCanvas.height=c,a.get_transparent()||d.__srcCanvas.setAttribute("moz-opaque","true"),d.__srcContext=d.__srcCanvas.getContext("2d",{alpha:a.get_transparent()}))};kb.createImageData=function(a){a=a.buffer;if(a.__srcImageData==null){a.data==null?a.__srcImageData=
a.__srcContext.getImageData(0,0,a.width,a.height):(a.__srcImageData=a.__srcContext.createImageData(a.width,a.height),a.__srcImageData.data.set(a.data));var b=a.__srcImageData.data.buffer;b=b!=null?new Uint8Array(b):null;a.data=b}};kb.fillRect=function(a,b,c,d){kb.convertToCanvas(a);if(d==1){d=c>>16&255;var f=c>>8&255;var g=c&255;c=a.get_transparent()?c>>24&255:255}else d=c>>24&255,f=c>>16&255,g=c>>8&255,c=a.get_transparent()?c&255:255;b.x==0&&b.y==0&&b.width==a.width&&b.height==a.height&&a.get_transparent()&&
c==0?a.buffer.__srcCanvas.width=a.buffer.width:(c<255&&a.buffer.__srcContext.clearRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY),c>0&&(a.buffer.__srcContext.fillStyle="rgba("+d+", "+f+", "+g+", "+c/255+")",a.buffer.__srcContext.fillRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY)),a.dirty=!0,a.version++)};kb.floodFill=function(a,b,c,d,f){kb.convertToData(a);Lb.floodFill(a,b,c,d,f)};kb.getPixel=function(a,b,c,d){kb.convertToData(a);return Lb.getPixel(a,
b,c,d)};kb.getPixel32=function(a,b,c,d){kb.convertToData(a);return Lb.getPixel32(a,b,c,d)};kb.getPixels=function(a,b,c){kb.convertToData(a);return Lb.getPixels(a,b,c)};kb.merge=function(a,b,c,d,f,g,h,l){kb.convertToData(b);kb.convertToData(a);Lb.merge(a,b,c,d,f,g,h,l)};kb.resize=function(a,b,c){var d=a.buffer;if(d.__srcCanvas==null)kb.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{kb.convertToCanvas(a,!0);var f=d.__srcCanvas;d.__srcCanvas=null;kb.createCanvas(a,b,c);d.__srcContext.drawImage(f,
0,0,b,c)}d.__srcImageData=null;d.data=null;a.dirty=!0;a.version++};kb.scroll=function(a,b,c){if(b%a.width!=0||c%a.height!=0){var d=a.clone();kb.convertToCanvas(a,!0);a.buffer.__srcContext.clearRect(b,c,a.width,a.height);a.buffer.__srcContext.drawImage(d.get_src(),b,c);a.dirty=!0;a.version++}};kb.setPixel=function(a,b,c,d,f){kb.convertToData(a);Lb.setPixel(a,b,c,d,f)};kb.setPixel32=function(a,b,c,d,f){kb.convertToData(a);Lb.setPixel32(a,b,c,d,f)};kb.setPixels=function(a,b,c,d,f){kb.convertToData(a);
Lb.setPixels(a,b,c,d,f)};kb.sync=function(a,b){a!=null&&(a.type!=Uf.CANVAS||a.buffer.__srcCanvas==null&&a.buffer.data==null?a.type==Uf.DATA&&kb.convertToData(a,b):kb.convertToCanvas(a,b))};var Lb=function(){};r["lime._internal.graphics.ImageDataUtil"]=Lb;Lb.__name__="lime._internal.graphics.ImageDataUtil";Lb.displaceMap=function(a,b,c,d,f,g,h){var l=a.buffer.data,k=b.buffer.data,q=c.buffer.data,w=a.buffer.format,v=b.buffer.format,z=c.buffer.format,n=a.get_premultiplied(),E=b.get_premultiplied(),H=
c.get_premultiplied();b=new $g(b);c=new $g(c);for(var J,Q,T=0,fa=0,da,pa,xa,Ua=0,Sa=0,Ka=0,hb=0,Ra,Jb=0,vb=b.height;Jb<vb;){var Cb=Jb++;J=b.byteOffset+b.stride*Cb;for(var pc=0,qd=b.width;pc<qd;){var Gb=pc++;Q=J+Gb*4;xa=d.x|0;da=d.y|0;if(h){fa=b.byteOffset+b.stride*(Cb-da+1)+(Gb-xa)*4;pa=z;Ra=H;Ra==null&&(Ra=!1);pa==null&&(pa=0);switch(pa){case 0:Ua=(q[fa]&255)<<24|(q[fa+1]&255)<<16|(q[fa+2]&255)<<8|q[fa+3]&255;break;case 1:Ua=(q[fa+1]&255)<<24|(q[fa+2]&255)<<16|(q[fa+3]&255)<<8|q[fa]&255;break;case 2:Ua=
(q[fa+2]&255)<<24|(q[fa+1]&255)<<16|(q[fa]&255)<<8|q[fa+3]&255}Ra&&(Ua&255)!=0&&(Ua&255)!=255&&(U.unmult=255/(Ua&255),Ua=(U.__clamp[Math.round((Ua>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Ua>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Ua>>>8&255)*U.unmult)]&255)<<8|Ua&255);fa=b.byteOffset+b.stride*(Cb-da)+(Gb-xa+1)*4;pa=z;Ra=H;Ra==null&&(Ra=!1);pa==null&&(pa=0);switch(pa){case 0:Sa=(q[fa]&255)<<24|(q[fa+1]&255)<<16|(q[fa+2]&255)<<8|q[fa+3]&255;break;case 1:Sa=(q[fa+1]&255)<<24|
(q[fa+2]&255)<<16|(q[fa+3]&255)<<8|q[fa]&255;break;case 2:Sa=(q[fa+2]&255)<<24|(q[fa+1]&255)<<16|(q[fa]&255)<<8|q[fa+3]&255}Ra&&(Sa&255)!=0&&(Sa&255)!=255&&(U.unmult=255/(Sa&255),Sa=(U.__clamp[Math.round((Sa>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Sa>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Sa>>>8&255)*U.unmult)]&255)<<8|Sa&255);fa=b.byteOffset+b.stride*(Cb-da+1)+(Gb-xa+1)*4;pa=z;Ra=H;Ra==null&&(Ra=!1);pa==null&&(pa=0);switch(pa){case 0:Ka=(q[fa]&255)<<24|(q[fa+1]&255)<<16|
(q[fa+2]&255)<<8|q[fa+3]&255;break;case 1:Ka=(q[fa+1]&255)<<24|(q[fa+2]&255)<<16|(q[fa+3]&255)<<8|q[fa]&255;break;case 2:Ka=(q[fa+2]&255)<<24|(q[fa+1]&255)<<16|(q[fa]&255)<<8|q[fa+3]&255}Ra&&(Ka&255)!=0&&(Ka&255)!=255&&(U.unmult=255/(Ka&255),Ka=(U.__clamp[Math.round((Ka>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Ka>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Ka>>>8&255)*U.unmult)]&255)<<8|Ka&255);fa=b.byteOffset+b.stride*(Cb-da)+(Gb-xa)*4;pa=z;Ra=H;Ra==null&&(Ra=!1);pa==null&&(pa=
0);switch(pa){case 0:hb=(q[fa]&255)<<24|(q[fa+1]&255)<<16|(q[fa+2]&255)<<8|q[fa+3]&255;break;case 1:hb=(q[fa+1]&255)<<24|(q[fa+2]&255)<<16|(q[fa+3]&255)<<8|q[fa]&255;break;case 2:hb=(q[fa+2]&255)<<24|(q[fa+1]&255)<<16|(q[fa]&255)<<8|q[fa+3]&255}Ra&&(hb&255)!=0&&(hb&255)!=255&&(U.unmult=255/(hb&255),hb=(U.__clamp[Math.round((hb>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((hb>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((hb>>>8&255)*U.unmult)]&255)<<8|hb&255);fa=Lb.bilinear(Ua,Sa,Ka,
hb,d.x-xa,d.y-da)}else{xa=c.byteOffset+c.stride*(Cb-da)+(Gb-xa)*4;da=z;pa=H;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:fa=(q[xa]&255)<<24|(q[xa+1]&255)<<16|(q[xa+2]&255)<<8|q[xa+3]&255;break;case 1:fa=(q[xa+1]&255)<<24|(q[xa+2]&255)<<16|(q[xa+3]&255)<<8|q[xa]&255;break;case 2:fa=(q[xa+2]&255)<<24|(q[xa+1]&255)<<16|(q[xa]&255)<<8|q[xa+3]&255}pa&&(fa&255)!=0&&(fa&255)!=255&&(U.unmult=255/(fa&255),fa=(U.__clamp[Math.round((fa>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((fa>>>16&255)*
U.unmult)]&255)<<16|(U.__clamp[Math.round((fa>>>8&255)*U.unmult)]&255)<<8|fa&255)}xa=(fa&255)/255;da=((fa>>>24&255)-128)/255*xa;pa=((fa>>>16&255)-128)/255*xa;xa=da*f.x+pa*g.x;Ra=da*f.y+pa*g.y;da=Math.floor(xa*b.width);pa=Math.floor(Ra*b.height);if(h){T=b.byteOffset+b.stride*(Cb+pa+1)+(Gb+da)*4;var nd=v,le=E;le==null&&(le=!1);nd==null&&(nd=0);switch(nd){case 0:Ua=(k[T]&255)<<24|(k[T+1]&255)<<16|(k[T+2]&255)<<8|k[T+3]&255;break;case 1:Ua=(k[T+1]&255)<<24|(k[T+2]&255)<<16|(k[T+3]&255)<<8|k[T]&255;break;
case 2:Ua=(k[T+2]&255)<<24|(k[T+1]&255)<<16|(k[T]&255)<<8|k[T+3]&255}le&&(Ua&255)!=0&&(Ua&255)!=255&&(U.unmult=255/(Ua&255),Ua=(U.__clamp[Math.round((Ua>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Ua>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Ua>>>8&255)*U.unmult)]&255)<<8|Ua&255);T=b.byteOffset+b.stride*(Cb+pa)+(Gb+da+1)*4;nd=v;le=E;le==null&&(le=!1);nd==null&&(nd=0);switch(nd){case 0:Sa=(k[T]&255)<<24|(k[T+1]&255)<<16|(k[T+2]&255)<<8|k[T+3]&255;break;case 1:Sa=(k[T+1]&255)<<24|
(k[T+2]&255)<<16|(k[T+3]&255)<<8|k[T]&255;break;case 2:Sa=(k[T+2]&255)<<24|(k[T+1]&255)<<16|(k[T]&255)<<8|k[T+3]&255}le&&(Sa&255)!=0&&(Sa&255)!=255&&(U.unmult=255/(Sa&255),Sa=(U.__clamp[Math.round((Sa>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Sa>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Sa>>>8&255)*U.unmult)]&255)<<8|Sa&255);T=b.byteOffset+b.stride*(Cb+pa+1)+(Gb+da+1)*4;nd=v;le=E;le==null&&(le=!1);nd==null&&(nd=0);switch(nd){case 0:Ka=(k[T]&255)<<24|(k[T+1]&255)<<16|(k[T+2]&
255)<<8|k[T+3]&255;break;case 1:Ka=(k[T+1]&255)<<24|(k[T+2]&255)<<16|(k[T+3]&255)<<8|k[T]&255;break;case 2:Ka=(k[T+2]&255)<<24|(k[T+1]&255)<<16|(k[T]&255)<<8|k[T+3]&255}le&&(Ka&255)!=0&&(Ka&255)!=255&&(U.unmult=255/(Ka&255),Ka=(U.__clamp[Math.round((Ka>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((Ka>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((Ka>>>8&255)*U.unmult)]&255)<<8|Ka&255);Gb=b.byteOffset+b.stride*(Cb+pa)+(Gb+da)*4;T=v;nd=E;nd==null&&(nd=!1);T==null&&(T=0);switch(T){case 0:hb=
(k[Gb]&255)<<24|(k[Gb+1]&255)<<16|(k[Gb+2]&255)<<8|k[Gb+3]&255;break;case 1:hb=(k[Gb+1]&255)<<24|(k[Gb+2]&255)<<16|(k[Gb+3]&255)<<8|k[Gb]&255;break;case 2:hb=(k[Gb+2]&255)<<24|(k[Gb+1]&255)<<16|(k[Gb]&255)<<8|k[Gb+3]&255}nd&&(hb&255)!=0&&(hb&255)!=255&&(U.unmult=255/(hb&255),hb=(U.__clamp[Math.round((hb>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((hb>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((hb>>>8&255)*U.unmult)]&255)<<8|hb&255);T=Lb.bilinear(Ua,Sa,Ka,hb,xa*b.width-da,Ra*b.height-
pa)}else{Gb=b.byteOffset+b.stride*(Cb+pa)+(Gb+da)*4;xa=v;da=E;da==null&&(da=!1);xa==null&&(xa=0);switch(xa){case 0:T=(k[Gb]&255)<<24|(k[Gb+1]&255)<<16|(k[Gb+2]&255)<<8|k[Gb+3]&255;break;case 1:T=(k[Gb+1]&255)<<24|(k[Gb+2]&255)<<16|(k[Gb+3]&255)<<8|k[Gb]&255;break;case 2:T=(k[Gb+2]&255)<<24|(k[Gb+1]&255)<<16|(k[Gb]&255)<<8|k[Gb+3]&255}da&&(T&255)!=0&&(T&255)!=255&&(U.unmult=255/(T&255),T=(U.__clamp[Math.round((T>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((T>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((T>>>
8&255)*U.unmult)]&255)<<8|T&255)}Gb=w;xa=n;xa==null&&(xa=!1);Gb==null&&(Gb=0);xa&&((T&255)==0?T!=0&&(T=0):(T&255)!=255&&(U.a16=U.__alpha16[T&255],T=((T>>>24&255)*U.a16>>16&255)<<24|((T>>>16&255)*U.a16>>16&255)<<16|((T>>>8&255)*U.a16>>16&255)<<8|T&255));switch(Gb){case 0:l[Q]=T>>>24&255;l[Q+1]=T>>>16&255;l[Q+2]=T>>>8&255;l[Q+3]=T&255;break;case 1:l[Q]=T&255;l[Q+1]=T>>>24&255;l[Q+2]=T>>>16&255;l[Q+3]=T>>>8&255;break;case 2:l[Q]=T>>>8&255,l[Q+1]=T>>>16&255,l[Q+2]=T>>>24&255,l[Q+3]=T&255}}}a.dirty=!0;
a.version++};Lb.bilinear=function(a,b,c,d,f,g){return Lb.lerpRGBA(Lb.lerpRGBA(d,b,f),Lb.lerpRGBA(a,c,f),g)};Lb.lerpRGBA=function(a,b,c){var d=0,f=Math.floor(Lb.lerp(a>>>24&255,b>>>24&255,c));d=(f&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Lb.lerp(a>>>16&255,b>>>16&255,c));d=(d>>>24&255)<<24|(f&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Lb.lerp(a>>>8&255,b>>>8&255,c));d=(d>>>24&255)<<24|(d>>>16&255)<<16|(f&255)<<8|d&255;f=Math.floor(Lb.lerp(a&255,b&255,c));return(d>>>24&255)<<24|(d>>>
16&255)<<16|(d>>>8&255)<<8|f&255};Lb.lerp4f=function(a,b,c){return new Wd(Lb.lerp(a.x,b.x,c),Lb.lerp(a.y,b.y,c),Lb.lerp(a.z,b.z,c),Lb.lerp(a.w,b.w,c))};Lb.lerp=function(a,b,c){return(1-c)*a+c*b};Lb.colorTransform=function(a,b,c){var d=a.buffer.data;if(d!=null){var f=a.buffer.format,g=a.buffer.premultiplied;b=new $g(a,b);var h=gf.getAlphaTable(c),l=gf.getRedTable(c),k=gf.getGreenTable(c);c=gf.getBlueTable(c);for(var q,w,v=0,z=0,n=b.height;z<n;){q=z++;q=b.byteOffset+b.stride*q;for(var E=0,H=b.width;E<
H;){w=E++;w=q+w*4;var J=f,Q=g;Q==null&&(Q=!1);J==null&&(J=0);switch(J){case 0:v=(d[w]&255)<<24|(d[w+1]&255)<<16|(d[w+2]&255)<<8|d[w+3]&255;break;case 1:v=(d[w+1]&255)<<24|(d[w+2]&255)<<16|(d[w+3]&255)<<8|d[w]&255;break;case 2:v=(d[w+2]&255)<<24|(d[w+1]&255)<<16|(d[w]&255)<<8|d[w+3]&255}Q&&(v&255)!=0&&(v&255)!=255&&(U.unmult=255/(v&255),v=(U.__clamp[Math.round((v>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((v>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((v>>>8&255)*U.unmult)]&255)<<
8|v&255);v=(l[v>>>24&255]&255)<<24|(k[v>>>16&255]&255)<<16|(c[v>>>8&255]&255)<<8|h[v&255]&255;J=f;Q=g;Q==null&&(Q=!1);J==null&&(J=0);Q&&((v&255)==0?v!=0&&(v=0):(v&255)!=255&&(U.a16=U.__alpha16[v&255],v=((v>>>24&255)*U.a16>>16&255)<<24|((v>>>16&255)*U.a16>>16&255)<<16|((v>>>8&255)*U.a16>>16&255)<<8|v&255));switch(J){case 0:d[w]=v>>>24&255;d[w+1]=v>>>16&255;d[w+2]=v>>>8&255;d[w+3]=v&255;break;case 1:d[w]=v&255;d[w+1]=v>>>24&255;d[w+2]=v>>>16&255;d[w+3]=v>>>8&255;break;case 2:d[w]=v>>>8&255,d[w+1]=v>>>
16&255,d[w+2]=v>>>24&255,d[w+3]=v&255}}}a.dirty=!0;a.version++}};Lb.copyChannel=function(a,b,c,d,f,g){switch(g._hx_index){case 0:var h=0;break;case 1:h=1;break;case 2:h=2;break;case 3:h=3}switch(f._hx_index){case 0:var l=0;break;case 1:l=1;break;case 2:l=2;break;case 3:l=3}f=b.buffer.data;g=a.buffer.data;if(f!=null&&g!=null){c=new $g(b,c);d=new $g(a,new We(d.x,d.y,c.width,c.height));var k=b.buffer.format,q=a.buffer.format;b=b.buffer.premultiplied;for(var w=a.buffer.premultiplied,v,z,n=0,E=0,H=0,J=
0,Q=d.height;J<Q;){z=J++;v=c.byteOffset+c.stride*z;z=d.byteOffset+d.stride*z;for(var T=0,fa=d.width;T<fa;){T++;var da=k,pa=b;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:n=(f[v]&255)<<24|(f[v+1]&255)<<16|(f[v+2]&255)<<8|f[v+3]&255;break;case 1:n=(f[v+1]&255)<<24|(f[v+2]&255)<<16|(f[v+3]&255)<<8|f[v]&255;break;case 2:n=(f[v+2]&255)<<24|(f[v+1]&255)<<16|(f[v]&255)<<8|f[v+3]&255}pa&&(n&255)!=0&&(n&255)!=255&&(U.unmult=255/(n&255),n=(U.__clamp[Math.round((n>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((n>>>
16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((n>>>8&255)*U.unmult)]&255)<<8|n&255);da=q;pa=w;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:E=(g[z]&255)<<24|(g[z+1]&255)<<16|(g[z+2]&255)<<8|g[z+3]&255;break;case 1:E=(g[z+1]&255)<<24|(g[z+2]&255)<<16|(g[z+3]&255)<<8|g[z]&255;break;case 2:E=(g[z+2]&255)<<24|(g[z+1]&255)<<16|(g[z]&255)<<8|g[z+3]&255}pa&&(E&255)!=0&&(E&255)!=255&&(U.unmult=255/(E&255),E=(U.__clamp[Math.round((E>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((E>>>16&255)*
U.unmult)]&255)<<16|(U.__clamp[Math.round((E>>>8&255)*U.unmult)]&255)<<8|E&255);switch(l){case 0:H=n>>>24&255;break;case 1:H=n>>>16&255;break;case 2:H=n>>>8&255;break;case 3:H=n&255}switch(h){case 0:E=(H&255)<<24|(E>>>16&255)<<16|(E>>>8&255)<<8|E&255;break;case 1:E=(E>>>24&255)<<24|(H&255)<<16|(E>>>8&255)<<8|E&255;break;case 2:E=(E>>>24&255)<<24|(E>>>16&255)<<16|(H&255)<<8|E&255;break;case 3:E=(E>>>24&255)<<24|(E>>>16&255)<<16|(E>>>8&255)<<8|H&255}da=q;pa=w;pa==null&&(pa=!1);da==null&&(da=0);pa&&
((E&255)==0?E!=0&&(E=0):(E&255)!=255&&(U.a16=U.__alpha16[E&255],E=((E>>>24&255)*U.a16>>16&255)<<24|((E>>>16&255)*U.a16>>16&255)<<16|((E>>>8&255)*U.a16>>16&255)<<8|E&255));switch(da){case 0:g[z]=E>>>24&255;g[z+1]=E>>>16&255;g[z+2]=E>>>8&255;g[z+3]=E&255;break;case 1:g[z]=E&255;g[z+1]=E>>>24&255;g[z+2]=E>>>16&255;g[z+3]=E>>>8&255;break;case 2:g[z]=E>>>8&255,g[z+1]=E>>>16&255,g[z+2]=E>>>24&255,g[z+3]=E&255}v+=4;z+=4}}a.dirty=!0;a.version++}};Lb.copyPixels=function(a,b,c,d,f,g,h){h==null&&(h=!1);if(a.width==
b.width&&a.height==b.height&&c.width==b.width&&c.height==b.height&&c.x==0&&c.y==0&&d.x==0&&d.y==0&&f==null&&g==null&&h==0&&a.get_format()==b.get_format())a.buffer.data.set(b.buffer.data);else{var l=b.buffer.data,k=a.buffer.data;if(l==null||k==null)return;c=new $g(b,c);var q=new We(d.x,d.y,c.width,c.height);q=new $g(a,q);var w=b.buffer.format,v=a.buffer.format,z=0,n=0,E=b.buffer.premultiplied,H=a.buffer.premultiplied,J=b.buffer.bitsPerPixel/8|0,Q=a.buffer.bitsPerPixel/8|0,T=f!=null&&f.get_transparent(),
fa=h||T&&!a.get_transparent()||!h&&!a.get_transparent()&&b.get_transparent();if(T)if(Q=f.buffer.data,b=f.buffer.format,h=0,f=new $g(f,new We(c.x+(g==null?0:g.x),c.y+(g==null?0:g.y),c.width,c.height)),q.clip(d.x|0,d.y|0,f.width,f.height),fa)for(fa=0,J=q.height;fa<J;)for(T=fa++,d=c.byteOffset+c.stride*T,g=q.byteOffset+q.stride*T,T=f.byteOffset+f.stride*T,Sa=0,Ka=q.width;Sa<Ka;){Sa++;var da=w;var pa=E;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:z=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<
8|l[d+3]&255;break;case 1:z=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:z=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}pa&&(z&255)!=0&&(z&255)!=255&&(U.unmult=255/(z&255),z=(U.__clamp[Math.round((z>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((z>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((z>>>8&255)*U.unmult)]&255)<<8|z&255);da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:n=(k[g]&255)<<24|(k[g+1]&255)<<16|(k[g+2]&255)<<8|k[g+
3]&255;break;case 1:n=(k[g+1]&255)<<24|(k[g+2]&255)<<16|(k[g+3]&255)<<8|k[g]&255;break;case 2:n=(k[g+2]&255)<<24|(k[g+1]&255)<<16|(k[g]&255)<<8|k[g+3]&255}pa&&(n&255)!=0&&(n&255)!=255&&(U.unmult=255/(n&255),n=(U.__clamp[Math.round((n>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((n>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((n>>>8&255)*U.unmult)]&255)<<8|n&255);da=b;pa=!1;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:h=(Q[T]&255)<<24|(Q[T+1]&255)<<16|(Q[T+2]&255)<<8|Q[T+3]&255;
break;case 1:h=(Q[T+1]&255)<<24|(Q[T+2]&255)<<16|(Q[T+3]&255)<<8|Q[T]&255;break;case 2:h=(Q[T+2]&255)<<24|(Q[T+1]&255)<<16|(Q[T]&255)<<8|Q[T+3]&255}pa&&(h&255)!=0&&(h&255)!=255&&(U.unmult=255/(h&255),h=(U.__clamp[Math.round((h>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((h>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((h>>>8&255)*U.unmult)]&255)<<8|h&255);pa=(h&255)/255*((z&255)/255);if(pa>0){var xa=(n&255)/255;var Ua=1-pa;da=pa+xa*Ua;hb=U.__clamp[Math.round(((z>>>24&255)*pa+(n>>>24&
255)*xa*Ua)/da)];n=(hb&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|n&255;hb=U.__clamp[Math.round(((z>>>16&255)*pa+(n>>>16&255)*xa*Ua)/da)];n=(n>>>24&255)<<24|(hb&255)<<16|(n>>>8&255)<<8|n&255;pa=U.__clamp[Math.round(((z>>>8&255)*pa+(n>>>8&255)*xa*Ua)/da)];n=(n>>>24&255)<<24|(n>>>16&255)<<16|(pa&255)<<8|n&255;da=U.__clamp[Math.round(da*255)];n=(n>>>24&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|da&255;da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);pa&&((n&255)==0?n!=0&&(n=0):(n&255)!=255&&(U.a16=U.__alpha16[n&
255],n=((n>>>24&255)*U.a16>>16&255)<<24|((n>>>16&255)*U.a16>>16&255)<<16|((n>>>8&255)*U.a16>>16&255)<<8|n&255));switch(da){case 0:k[g]=n>>>24&255;k[g+1]=n>>>16&255;k[g+2]=n>>>8&255;k[g+3]=n&255;break;case 1:k[g]=n&255;k[g+1]=n>>>24&255;k[g+2]=n>>>16&255;k[g+3]=n>>>8&255;break;case 2:k[g]=n>>>8&255,k[g+1]=n>>>16&255,k[g+2]=n>>>24&255,k[g+3]=n&255}}d+=4;g+=4;T+=4}else for(fa=0,J=q.height;fa<J;)for(T=fa++,d=c.byteOffset+c.stride*T,g=q.byteOffset+q.stride*T,T=f.byteOffset+f.stride*T,Sa=0,Ka=q.width;Sa<
Ka;){Sa++;da=w;pa=E;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:z=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:z=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:z=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}pa&&(z&255)!=0&&(z&255)!=255&&(U.unmult=255/(z&255),z=(U.__clamp[Math.round((z>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((z>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((z>>>8&255)*U.unmult)]&255)<<8|z&
255);da=b;pa=!1;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:h=(Q[T]&255)<<24|(Q[T+1]&255)<<16|(Q[T+2]&255)<<8|Q[T+3]&255;break;case 1:h=(Q[T+1]&255)<<24|(Q[T+2]&255)<<16|(Q[T+3]&255)<<8|Q[T]&255;break;case 2:h=(Q[T+2]&255)<<24|(Q[T+1]&255)<<16|(Q[T]&255)<<8|Q[T+3]&255}pa&&(h&255)!=0&&(h&255)!=255&&(U.unmult=255/(h&255),h=(U.__clamp[Math.round((h>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((h>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((h>>>8&255)*U.unmult)]&255)<<8|h&255);
hb=Math.round((h&255)/255*(z&255));z=(z>>>24&255)<<24|(z>>>16&255)<<16|(z>>>8&255)<<8|hb&255;da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);pa&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(U.a16=U.__alpha16[z&255],z=((z>>>24&255)*U.a16>>16&255)<<24|((z>>>16&255)*U.a16>>16&255)<<16|((z>>>8&255)*U.a16>>16&255)<<8|z&255));switch(da){case 0:k[g]=z>>>24&255;k[g+1]=z>>>16&255;k[g+2]=z>>>8&255;k[g+3]=z&255;break;case 1:k[g]=z&255;k[g+1]=z>>>24&255;k[g+2]=z>>>16&255;k[g+3]=z>>>8&255;break;case 2:k[g]=z>>>8&255,k[g+
1]=z>>>16&255,k[g+2]=z>>>24&255,k[g+3]=z&255}d+=4;g+=4;T+=4}else if(fa)for(fa=0,J=q.height;fa<J;){T=fa++;d=c.byteOffset+c.stride*T;g=q.byteOffset+q.stride*T;for(var Sa=0,Ka=q.width;Sa<Ka;){Sa++;da=w;pa=E;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:z=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:z=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:z=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}pa&&(z&255)!=0&&(z&255)!=255&&(U.unmult=
255/(z&255),z=(U.__clamp[Math.round((z>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((z>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((z>>>8&255)*U.unmult)]&255)<<8|z&255);da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:n=(k[g]&255)<<24|(k[g+1]&255)<<16|(k[g+2]&255)<<8|k[g+3]&255;break;case 1:n=(k[g+1]&255)<<24|(k[g+2]&255)<<16|(k[g+3]&255)<<8|k[g]&255;break;case 2:n=(k[g+2]&255)<<24|(k[g+1]&255)<<16|(k[g]&255)<<8|k[g+3]&255}pa&&(n&255)!=0&&(n&255)!=255&&(U.unmult=255/(n&
255),n=(U.__clamp[Math.round((n>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((n>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((n>>>8&255)*U.unmult)]&255)<<8|n&255);pa=(z&255)/255;xa=(n&255)/255;Ua=1-pa;da=pa+xa*Ua;if(da==0)n=0;else{var hb=U.__clamp[Math.round(((z>>>24&255)*pa+(n>>>24&255)*xa*Ua)/da)];n=(hb&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|n&255;hb=U.__clamp[Math.round(((z>>>16&255)*pa+(n>>>16&255)*xa*Ua)/da)];n=(n>>>24&255)<<24|(hb&255)<<16|(n>>>8&255)<<8|n&255;pa=U.__clamp[Math.round(((z>>>
8&255)*pa+(n>>>8&255)*xa*Ua)/da)];n=(n>>>24&255)<<24|(n>>>16&255)<<16|(pa&255)<<8|n&255;da=U.__clamp[Math.round(da*255)];n=(n>>>24&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|da&255}da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);pa&&((n&255)==0?n!=0&&(n=0):(n&255)!=255&&(U.a16=U.__alpha16[n&255],n=((n>>>24&255)*U.a16>>16&255)<<24|((n>>>16&255)*U.a16>>16&255)<<16|((n>>>8&255)*U.a16>>16&255)<<8|n&255));switch(da){case 0:k[g]=n>>>24&255;k[g+1]=n>>>16&255;k[g+2]=n>>>8&255;k[g+3]=n&255;break;case 1:k[g]=n&
255;k[g+1]=n>>>24&255;k[g+2]=n>>>16&255;k[g+3]=n>>>8&255;break;case 2:k[g]=n>>>8&255,k[g+1]=n>>>16&255,k[g+2]=n>>>24&255,k[g+3]=n&255}d+=4;g+=4}}else if(w==v&&E==H&&J==Q)for(fa=0,J=q.height;fa<J;)T=fa++,d=c.byteOffset+c.stride*T,g=q.byteOffset+q.stride*T,k.set(l.subarray(d,d+q.width*Q),g);else for(fa=0,J=q.height;fa<J;)for(T=fa++,d=c.byteOffset+c.stride*T,g=q.byteOffset+q.stride*T,Sa=0,Ka=q.width;Sa<Ka;){Sa++;da=w;pa=E;pa==null&&(pa=!1);da==null&&(da=0);switch(da){case 0:z=(l[d]&255)<<24|(l[d+1]&
255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:z=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:z=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}pa&&(z&255)!=0&&(z&255)!=255&&(U.unmult=255/(z&255),z=(U.__clamp[Math.round((z>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((z>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((z>>>8&255)*U.unmult)]&255)<<8|z&255);da=v;pa=H;pa==null&&(pa=!1);da==null&&(da=0);pa&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(U.a16=
U.__alpha16[z&255],z=((z>>>24&255)*U.a16>>16&255)<<24|((z>>>16&255)*U.a16>>16&255)<<16|((z>>>8&255)*U.a16>>16&255)<<8|z&255));switch(da){case 0:k[g]=z>>>24&255;k[g+1]=z>>>16&255;k[g+2]=z>>>8&255;k[g+3]=z&255;break;case 1:k[g]=z&255;k[g+1]=z>>>24&255;k[g+2]=z>>>16&255;k[g+3]=z>>>8&255;break;case 2:k[g]=z>>>8&255,k[g+1]=z>>>16&255,k[g+2]=z>>>24&255,k[g+3]=z&255}d+=4;g+=4}}a.dirty=!0;a.version++};Lb.fillRect=function(a,b,c,d){switch(d){case 1:c=(c>>>16&255)<<24|(c>>>8&255)<<16|(c&255)<<8|c>>>24&255;
break;case 2:c=(c>>>8&255)<<24|(c>>>16&255)<<16|(c>>>24&255)<<8|c&255;break}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255);var f=a.buffer.data;if(f!=null){d=a.buffer.format;var g=a.buffer.premultiplied;g&&((c&255)==0?c!=0&&(c=0):(c&255)!=255&&(U.a16=U.__alpha16[c&255],c=((c>>>24&255)*U.a16>>16&255)<<24|((c>>>16&255)*U.a16>>16&255)<<16|((c>>>8&255)*U.a16>>16&255)<<8|c&255));b=new $g(a,b);for(var h,l=0,k=b.height;l<k;){g=l++;h=b.byteOffset+b.stride*g;for(var q=0,w=b.width;q<
w;){g=q++;var v=h+g*4,z=d;g=!1;g==null&&(g=!1);z==null&&(z=0);g&&((c&255)==0?c!=0&&(c=0):(c&255)!=255&&(U.a16=U.__alpha16[c&255],c=((c>>>24&255)*U.a16>>16&255)<<24|((c>>>16&255)*U.a16>>16&255)<<16|((c>>>8&255)*U.a16>>16&255)<<8|c&255));switch(z){case 0:f[v]=c>>>24&255;f[v+1]=c>>>16&255;f[v+2]=c>>>8&255;f[v+3]=c&255;break;case 1:f[v]=c&255;f[v+1]=c>>>24&255;f[v+2]=c>>>16&255;f[v+3]=c>>>8&255;break;case 2:f[v]=c>>>8&255,f[v+1]=c>>>16&255,f[v+2]=c>>>24&255,f[v+3]=c&255}}}a.dirty=!0;a.version++}};Lb.floodFill=
function(a,b,c,d,f){var g=a.buffer.data;if(g!=null){f==1&&(d=(d&16777215)<<8|d>>24&255);f=a.buffer.format;var h=a.buffer.premultiplied,l=0,k=a.buffer.width*4*(c+a.offsetY)+(b+a.offsetX)*4,q=f,w=h;w==null&&(w=!1);q==null&&(q=0);switch(q){case 0:l=(g[k]&255)<<24|(g[k+1]&255)<<16|(g[k+2]&255)<<8|g[k+3]&255;break;case 1:l=(g[k+1]&255)<<24|(g[k+2]&255)<<16|(g[k+3]&255)<<8|g[k]&255;break;case 2:l=(g[k+2]&255)<<24|(g[k+1]&255)<<16|(g[k]&255)<<8|g[k+3]&255}w&&(l&255)!=0&&(l&255)!=255&&(U.unmult=255/(l&255),
l=(U.__clamp[Math.round((l>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((l>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((l>>>8&255)*U.unmult)]&255)<<8|l&255);a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,l=(l>>>24&255)<<24|(l>>>16&255)<<16|(l>>>8&255)<<8|255);if(d!=l){h&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));k=[0,-1,1,0];
var v=[-1,0,0,1],z=-a.offsetX,n=-a.offsetY,E=z+a.width,H=n+a.height,J=[];J.push(b);J.push(c);for(var Q,T,fa,da=0;J.length>0;){c=J.pop();b=J.pop();for(var pa=0;pa<4;)if(q=pa++,Q=b+k[q],T=c+v[q],!(Q<z||T<n||Q>=E||T>=H)){fa=(T*a.width+Q)*4;q=f;w=h;w==null&&(w=!1);q==null&&(q=0);switch(q){case 0:da=(g[fa]&255)<<24|(g[fa+1]&255)<<16|(g[fa+2]&255)<<8|g[fa+3]&255;break;case 1:da=(g[fa+1]&255)<<24|(g[fa+2]&255)<<16|(g[fa+3]&255)<<8|g[fa]&255;break;case 2:da=(g[fa+2]&255)<<24|(g[fa+1]&255)<<16|(g[fa]&255)<<
8|g[fa+3]&255}w&&(da&255)!=0&&(da&255)!=255&&(U.unmult=255/(da&255),da=(U.__clamp[Math.round((da>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((da>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((da>>>8&255)*U.unmult)]&255)<<8|da&255);if(da==l){q=f;w=!1;w==null&&(w=!1);q==null&&(q=0);w&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));switch(q){case 0:g[fa]=d>>>24&255;
g[fa+1]=d>>>16&255;g[fa+2]=d>>>8&255;g[fa+3]=d&255;break;case 1:g[fa]=d&255;g[fa+1]=d>>>24&255;g[fa+2]=d>>>16&255;g[fa+3]=d>>>8&255;break;case 2:g[fa]=d>>>8&255,g[fa+1]=d>>>16&255,g[fa+2]=d>>>24&255,g[fa+3]=d&255}J.push(Q);J.push(T)}}}a.dirty=!0;a.version++}}};Lb.gaussianBlur=function(a,b,c,d,f,g,h,l,k){h==null&&(h=1);g==null&&(g=4);f==null&&(f=4);(l=a.get_premultiplied())&&a.set_premultiplied(!1);Ph.blur(a,b,c,d,f,g,h);a.dirty=!0;a.version++;l&&a.set_premultiplied(!0);return a};Lb.getColorBoundsRect=
function(a,b,c,d,f){var g=a.width+1,h=0,l=a.height+1,k=0;switch(f){case 1:f=c;c=(f>>>16&255)<<24|(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;f=b;b=(f>>>16&255)<<24|(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;break;case 2:f=c;c=(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;f=b;b=(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;break}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255,b=(b>>>24&255)<<24|(b>>>16&255)<<16|(b>>>8&255)<<8|255);f=0;for(var q=a.width;f<q;){var w=
f++;var v=!1;for(var z=0,n=a.height;z<n;){var E=z++;v=a.getPixel32(w,E,0);if(v=d?(v&b)==c:(v&b)!=c){w<g&&(g=w);break}}if(v)break}f=0;for(q=a.width;f<q;){w=f++;w=a.width-1-w;v=!1;z=0;for(n=a.height;z<n;)if(E=z++,v=a.getPixel32(w,E,0),v=d?(v&b)==c:(v&b)!=c){w>h&&(h=w);break}if(v)break}f=0;for(q=a.height;f<q;){E=f++;v=!1;z=0;for(n=a.width;z<n;)if(w=z++,v=a.getPixel32(w,E,0),v=d?(v&b)==c:(v&b)!=c){E<l&&(l=E);break}if(v)break}f=0;for(q=a.height;f<q;){E=f++;E=a.height-1-E;v=!1;z=0;for(n=a.width;z<n;)if(w=
z++,v=a.getPixel32(w,E,0),v=d?(v&b)==c:(v&b)!=c){E>k&&(k=E);break}if(v)break}d=h-g;c=k-l;d>0&&++d;c>0&&++c;d<0&&(d=0);c<0&&(c=0);g==h&&(d=1);l==k&&(c=1);g>a.width&&(g=0);l>a.height&&(l=0);return new We(g,l,d,c)};Lb.getPixel=function(a,b,c,d){var f=0,g=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;c=a.buffer.format;a=a.buffer.premultiplied;a==null&&(a=!1);c==null&&(c=0);switch(c){case 0:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=(g[b+1]&255)<<24|(g[b+
2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&255)<<8|g[b+3]&255}a&&(f&255)!=0&&(f&255)!=255&&(U.unmult=255/(f&255),f=(U.__clamp[Math.round((f>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((f>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((f>>>8&255)*U.unmult)]&255)<<8|f&255);f=(f>>>24&255)<<24|(f>>>16&255)<<16|(f>>>8&255)<<8|0;switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&
255)<<16|(f>>>24&255)<<8|f&255;default:return f}};Lb.getPixel32=function(a,b,c,d){var f=0,g=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;c=a.buffer.format;a=a.buffer.premultiplied;a==null&&(a=!1);c==null&&(c=0);switch(c){case 0:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=(g[b+1]&255)<<24|(g[b+2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&255)<<8|g[b+3]&255}a&&(f&255)!=0&&(f&255)!=255&&(U.unmult=255/(f&
255),f=(U.__clamp[Math.round((f>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((f>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((f>>>8&255)*U.unmult)]&255)<<8|f&255);switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;default:return f}};Lb.getPixels=function(a,b,c){if(a.buffer.data==null)return null;var d=new Ia(new ArrayBuffer((b.width*b.height|0)*4)),f=a.buffer.data,g=a.buffer.format,h=a.buffer.premultiplied;
a=new $g(a,b);for(var l,k,q=b=k=0,w=a.height;q<w;){l=q++;l=a.byteOffset+a.stride*l;for(var v=0,z=a.width;v<z;){v++;var n=g,E=h;E==null&&(E=!1);n==null&&(n=0);switch(n){case 0:k=(f[l]&255)<<24|(f[l+1]&255)<<16|(f[l+2]&255)<<8|f[l+3]&255;break;case 1:k=(f[l+1]&255)<<24|(f[l+2]&255)<<16|(f[l+3]&255)<<8|f[l]&255;break;case 2:k=(f[l+2]&255)<<24|(f[l+1]&255)<<16|(f[l]&255)<<8|f[l+3]&255}E&&(k&255)!=0&&(k&255)!=255&&(U.unmult=255/(k&255),k=(U.__clamp[Math.round((k>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((k>>>
16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((k>>>8&255)*U.unmult)]&255)<<8|k&255);switch(c){case 1:k=(k&255)<<24|(k>>>24&255)<<16|(k>>>16&255)<<8|k>>>8&255;break;case 2:k=(k>>>8&255)<<24|(k>>>16&255)<<16|(k>>>24&255)<<8|k&255}d.b[b++]=k>>>24&255;d.b[b++]=k>>>16&255;d.b[b++]=k>>>8&255;d.b[b++]=k&255;l+=4}}return d};Lb.merge=function(a,b,c,d,f,g,h,l){if(a.buffer.data!=null&&b.buffer.data!=null){c=new $g(b,c);d=new $g(a,new We(d.x,d.y,c.width,c.height));var k=b.buffer.data,q=a.buffer.data,w=b.buffer.format,
v=a.buffer.format;b=b.buffer.premultiplied;for(var z=a.buffer.premultiplied,n,E,H=0,J=0,Q=0,T=d.height;Q<T;){E=Q++;n=c.byteOffset+c.stride*E;E=d.byteOffset+d.stride*E;for(var fa=0,da=d.width;fa<da;){fa++;var pa=w,xa=b;xa==null&&(xa=!1);pa==null&&(pa=0);switch(pa){case 0:H=(k[n]&255)<<24|(k[n+1]&255)<<16|(k[n+2]&255)<<8|k[n+3]&255;break;case 1:H=(k[n+1]&255)<<24|(k[n+2]&255)<<16|(k[n+3]&255)<<8|k[n]&255;break;case 2:H=(k[n+2]&255)<<24|(k[n+1]&255)<<16|(k[n]&255)<<8|k[n+3]&255}xa&&(H&255)!=0&&(H&255)!=
255&&(U.unmult=255/(H&255),H=(U.__clamp[Math.round((H>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((H>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((H>>>8&255)*U.unmult)]&255)<<8|H&255);pa=v;xa=z;xa==null&&(xa=!1);pa==null&&(pa=0);switch(pa){case 0:J=(q[E]&255)<<24|(q[E+1]&255)<<16|(q[E+2]&255)<<8|q[E+3]&255;break;case 1:J=(q[E+1]&255)<<24|(q[E+2]&255)<<16|(q[E+3]&255)<<8|q[E]&255;break;case 2:J=(q[E+2]&255)<<24|(q[E+1]&255)<<16|(q[E]&255)<<8|q[E+3]&255}xa&&(J&255)!=0&&(J&255)!=255&&
(U.unmult=255/(J&255),J=(U.__clamp[Math.round((J>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((J>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((J>>>8&255)*U.unmult)]&255)<<8|J&255);J=((((H>>>24&255)*f+(J>>>24&255)*(256-f))/256|0)&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|J&255;J=(J>>>24&255)<<24|((((H>>>16&255)*g+(J>>>16&255)*(256-g))/256|0)&255)<<16|(J>>>8&255)<<8|J&255;J=(J>>>24&255)<<24|(J>>>16&255)<<16|((((H>>>8&255)*h+(J>>>8&255)*(256-h))/256|0)&255)<<8|J&255;J=(J>>>24&255)<<24|(J>>>
16&255)<<16|(J>>>8&255)<<8|(((H&255)*l+(J&255)*(256-l))/256|0)&255;pa=v;xa=z;xa==null&&(xa=!1);pa==null&&(pa=0);xa&&((J&255)==0?J!=0&&(J=0):(J&255)!=255&&(U.a16=U.__alpha16[J&255],J=((J>>>24&255)*U.a16>>16&255)<<24|((J>>>16&255)*U.a16>>16&255)<<16|((J>>>8&255)*U.a16>>16&255)<<8|J&255));switch(pa){case 0:q[E]=J>>>24&255;q[E+1]=J>>>16&255;q[E+2]=J>>>8&255;q[E+3]=J&255;break;case 1:q[E]=J&255;q[E+1]=J>>>24&255;q[E+2]=J>>>16&255;q[E+3]=J>>>8&255;break;case 2:q[E]=J>>>8&255,q[E+1]=J>>>16&255,q[E+2]=J>>>
24&255,q[E+3]=J&255}n+=4;E+=4}}a.dirty=!0;a.version++}};Lb.multiplyAlpha=function(a){var b=a.buffer.data;if(b!=null&&a.buffer.transparent){for(var c=a.buffer.format,d=0,f=0,g=b.length/4|0;f<g;){var h=f++,l=h*4,k=c,q=!1;q==null&&(q=!1);k==null&&(k=0);switch(k){case 0:d=(b[l]&255)<<24|(b[l+1]&255)<<16|(b[l+2]&255)<<8|b[l+3]&255;break;case 1:d=(b[l+1]&255)<<24|(b[l+2]&255)<<16|(b[l+3]&255)<<8|b[l]&255;break;case 2:d=(b[l+2]&255)<<24|(b[l+1]&255)<<16|(b[l]&255)<<8|b[l+3]&255}q&&(d&255)!=0&&(d&255)!=255&&
(U.unmult=255/(d&255),d=(U.__clamp[Math.round((d>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((d>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((d>>>8&255)*U.unmult)]&255)<<8|d&255);h*=4;l=c;k=!0;k==null&&(k=!1);l==null&&(l=0);k&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));switch(l){case 0:b[h]=d>>>24&255;b[h+1]=d>>>16&255;b[h+2]=d>>>8&255;b[h+3]=d&255;break;case 1:b[h]=
d&255;b[h+1]=d>>>24&255;b[h+2]=d>>>16&255;b[h+3]=d>>>8&255;break;case 2:b[h]=d>>>8&255,b[h+1]=d>>>16&255,b[h+2]=d>>>24&255,b[h+3]=d&255}}a.buffer.premultiplied=!0;a.dirty=!0;a.version++}};Lb.resize=function(a,b,c){var d=a.buffer;if(d.width!=b||d.height!=c){var f=b*c*4;f=f!=null?new Uint8Array(f):null;f=new bj(f,b,c);for(var g=a.width,h=a.height,l=a.get_data(),k=f.data,q,w,v,z,n,E,H,J,Q,T=0;T<c;)for(var fa=T++,da=0,pa=b;da<pa;)n=da++,J=(n+.5)/b*g-.5,Q=(fa+.5)/c*h-.5,E=J|0,H=Q|0,q=(H*g+E)*4,w=E<g-1?
q+4:q,v=H<h-1?q+g*4:q,z=w!=q?v+4:v,n=(fa*b+n)*4,E=J-E,H=Q-H,Q=1-E,J=1-H,k[n]=(ta.toFloat(l[q])*Q+ta.toFloat(l[w])*E)*J+(ta.toFloat(l[v])*Q+ta.toFloat(l[z])*E)*H|0,k[n+1]=(ta.toFloat(l[q+1])*Q+ta.toFloat(l[w+1])*E)*J+(ta.toFloat(l[v+1])*Q+ta.toFloat(l[z+1])*E)*H|0,k[n+2]=(ta.toFloat(l[q+2])*Q+ta.toFloat(l[w+2])*E)*J+(ta.toFloat(l[v+2])*Q+ta.toFloat(l[z+2])*E)*H|0,k[n+3]=l[w+3]==0||l[v+3]==0||l[z+3]==0?0:l[q+3];d.data=f.data;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=
null;d.__srcContext=null;a.dirty=!0;a.version++}};Lb.resizeBuffer=function(a,b,c){var d=a.buffer,f=a.get_data(),g=b*c*4;g=g!=null?new Uint8Array(g):null;for(var h,l,k=0,q=d.height;k<q;)for(var w=k++,v=0,z=d.width;v<z;)l=v++,h=(w*d.width+l)*4,l=(w*b+l)*4,g[l]=f[h],g[l+1]=f[h+1],g[l+2]=f[h+2],g[l+3]=f[h+3];d.data=g;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++};Lb.setFormat=function(a,b){var c=a.buffer.data;if(c!=null){var d=
c.length/4|0;switch(a.get_format()){case 0:var f=0;var g=1;var h=2;var l=3;break;case 1:f=1;g=2;h=3;l=0;break;case 2:f=2,g=1,h=0,l=3}switch(b){case 0:var k=0;var q=1;var w=2;var v=3;break;case 1:k=1;q=2;w=3;v=0;break;case 2:k=2,q=1,w=0,v=3}for(var z=0;z<d;){var n=z++*4;var E=c[n+f];var H=c[n+g];var J=c[n+h];var Q=c[n+l];c[n+k]=E;c[n+q]=H;c[n+w]=J;c[n+v]=Q}a.buffer.format=b;a.dirty=!0;a.version++}};Lb.setPixel=function(a,b,c,d,f){switch(f){case 1:d=(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&
255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<8|d&255;break}var g=0,h=a.buffer.data,l=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;var k=a.buffer.premultiplied;k==null&&(k=!1);f==null&&(f=0);switch(f){case 0:g=(h[l]&255)<<24|(h[l+1]&255)<<16|(h[l+2]&255)<<8|h[l+3]&255;break;case 1:g=(h[l+1]&255)<<24|(h[l+2]&255)<<16|(h[l+3]&255)<<8|h[l]&255;break;case 2:g=(h[l+2]&255)<<24|(h[l+1]&255)<<16|(h[l]&255)<<8|h[l+3]&255}k&&(g&255)!=0&&(g&255)!=255&&(U.unmult=255/(g&
255),g=(U.__clamp[Math.round((g>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((g>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((g>>>8&255)*U.unmult)]&255)<<8|g&255);d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|g&255;h=a.buffer.data;l=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;k=a.buffer.premultiplied;k==null&&(k=!1);f==null&&(f=0);k&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<
16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));switch(f){case 0:h[l]=d>>>24&255;h[l+1]=d>>>16&255;h[l+2]=d>>>8&255;h[l+3]=d&255;break;case 1:h[l]=d&255;h[l+1]=d>>>24&255;h[l+2]=d>>>16&255;h[l+3]=d>>>8&255;break;case 2:h[l]=d>>>8&255,h[l+1]=d>>>16&255,h[l+2]=d>>>24&255,h[l+3]=d&255}a.dirty=!0;a.version++};Lb.setPixel32=function(a,b,c,d,f){switch(f){case 1:d=(d>>>16&255)<<24|(d>>>8&255)<<16|(d&255)<<8|d>>>24&255;break;case 2:d=(d>>>8&255)<<24|(d>>>16&255)<<16|(d>>>24&255)<<8|d&255;break}a.get_transparent()||
(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255);var g=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+(b+a.offsetX)*4;f=a.buffer.format;c=a.buffer.premultiplied;c==null&&(c=!1);f==null&&(f=0);c&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));switch(f){case 0:g[b]=d>>>24&255;g[b+1]=d>>>16&255;g[b+2]=d>>>8&255;g[b+3]=d&255;break;case 1:g[b]=d&255;g[b+1]=d>>>24&255;g[b+
2]=d>>>16&255;g[b+3]=d>>>8&255;break;case 2:g[b]=d>>>8&255,g[b+1]=d>>>16&255,g[b+2]=d>>>24&255,g[b+3]=d&255}a.dirty=!0;a.version++};Lb.setPixels=function(a,b,c,d,f){if(a.buffer.data!=null){var g=a.buffer.data,h=a.buffer.format,l=a.buffer.premultiplied;b=new $g(a,b);var k=a.get_transparent(),q=c.bytes;c=c.offset;f=f!=bk.BIG_ENDIAN;for(var w=0,v=b.height;w<v;){var z=w++;z=b.byteOffset+b.stride*z;for(var n=0,E=b.width;n<E;){var H=n++;var J=f?q.getInt32(c):q.b[c+3]|q.b[c+2]<<8|q.b[c+1]<<16|q.b[c]<<24;
c+=4;switch(d){case 1:J=(J>>>16&255)<<24|(J>>>8&255)<<16|(J&255)<<8|J>>>24&255;break;case 2:J=(J>>>8&255)<<24|(J>>>16&255)<<16|(J>>>24&255)<<8|J&255;break}k||(J=(J>>>24&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|255);H=z+H*4;var Q=h,T=l;T==null&&(T=!1);Q==null&&(Q=0);T&&((J&255)==0?J!=0&&(J=0):(J&255)!=255&&(U.a16=U.__alpha16[J&255],J=((J>>>24&255)*U.a16>>16&255)<<24|((J>>>16&255)*U.a16>>16&255)<<16|((J>>>8&255)*U.a16>>16&255)<<8|J&255));switch(Q){case 0:g[H]=J>>>24&255;g[H+1]=J>>>16&255;g[H+2]=J>>>
8&255;g[H+3]=J&255;break;case 1:g[H]=J&255;g[H+1]=J>>>24&255;g[H+2]=J>>>16&255;g[H+3]=J>>>8&255;break;case 2:g[H]=J>>>8&255,g[H+1]=J>>>16&255,g[H+2]=J>>>24&255,g[H+3]=J&255}}}a.dirty=!0;a.version++}};Lb.threshold=function(a,b,c,d,f,g,h,l,k,q){switch(q){case 1:var w=h;h=(w>>>16&255)<<24|(w>>>8&255)<<16|(w&255)<<8|w>>>24&255;w=l;l=(w>>>16&255)<<24|(w>>>8&255)<<16|(w&255)<<8|w>>>24&255;w=g;g=(w>>>16&255)<<24|(w>>>8&255)<<16|(w&255)<<8|w>>>24&255;break;case 2:w=h;h=(w>>>8&255)<<24|(w>>>16&255)<<16|(w>>>
24&255)<<8|w&255;w=l;l=(w>>>8&255)<<24|(w>>>16&255)<<16|(w>>>24&255)<<8|w&255;w=g;g=(w>>>8&255)<<24|(w>>>16&255)<<16|(w>>>24&255)<<8|w&255;break}switch(f){case "!=":f=0;break;case "<":f=2;break;case "<=":f=3;break;case "==":f=1;break;case ">":f=4;break;case ">=":f=5;break;default:f=-1}if(f==-1)return 0;w=b.buffer.data;var v=a.buffer.data;if(w==null||v==null)return 0;var z=0;c=new $g(b,c);d=new $g(a,new We(d.x,d.y,c.width,c.height));var n=b.buffer.format,E=a.buffer.format;b=b.buffer.premultiplied;
for(var H=a.buffer.premultiplied,J,Q,T=0,fa=0,da=d.height;fa<da;){Q=fa++;J=c.byteOffset+c.stride*Q;Q=d.byteOffset+d.stride*Q;for(var pa=0,xa=d.width;pa<xa;){pa++;q=n;var Ua=b;Ua==null&&(Ua=!1);q==null&&(q=0);switch(q){case 0:T=(w[J]&255)<<24|(w[J+1]&255)<<16|(w[J+2]&255)<<8|w[J+3]&255;break;case 1:T=(w[J+1]&255)<<24|(w[J+2]&255)<<16|(w[J+3]&255)<<8|w[J]&255;break;case 2:T=(w[J+2]&255)<<24|(w[J+1]&255)<<16|(w[J]&255)<<8|w[J+3]&255}Ua&&(T&255)!=0&&(T&255)!=255&&(U.unmult=255/(T&255),T=(U.__clamp[Math.round((T>>>
24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((T>>>16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((T>>>8&255)*U.unmult)]&255)<<8|T&255);q=T&l;Ua=q>>>24&255;var Sa=g>>>24&255;Ua!=Sa?q=ta.gt(Ua,Sa)?1:-1:(Ua=q>>>16&255,Sa=g>>>16&255,Ua!=Sa?q=ta.gt(Ua,Sa)?1:-1:(Ua=q>>>8&255,Sa=g>>>8&255,Ua!=Sa?q=ta.gt(Ua,Sa)?1:-1:(Ua=q&255,Sa=g&255,q=Ua!=Sa?ta.gt(Ua,Sa)?1:-1:0)));switch(f){case 0:q=q!=0;break;case 1:q=q==0;break;case 2:q=q==-1;break;case 3:q=q==0||q==-1;break;case 4:q=q==1;break;case 5:q=q==0||
q==1;break;default:q=!1}if(q){q=E;Ua=H;Ua==null&&(Ua=!1);q==null&&(q=0);Ua&&((h&255)==0?h!=0&&(h=0):(h&255)!=255&&(U.a16=U.__alpha16[h&255],h=((h>>>24&255)*U.a16>>16&255)<<24|((h>>>16&255)*U.a16>>16&255)<<16|((h>>>8&255)*U.a16>>16&255)<<8|h&255));switch(q){case 0:v[Q]=h>>>24&255;v[Q+1]=h>>>16&255;v[Q+2]=h>>>8&255;v[Q+3]=h&255;break;case 1:v[Q]=h&255;v[Q+1]=h>>>24&255;v[Q+2]=h>>>16&255;v[Q+3]=h>>>8&255;break;case 2:v[Q]=h>>>8&255,v[Q+1]=h>>>16&255,v[Q+2]=h>>>24&255,v[Q+3]=h&255}++z}else if(k)switch(q=
E,Ua=H,Ua==null&&(Ua=!1),q==null&&(q=0),Ua&&((T&255)==0?T!=0&&(T=0):(T&255)!=255&&(U.a16=U.__alpha16[T&255],T=((T>>>24&255)*U.a16>>16&255)<<24|((T>>>16&255)*U.a16>>16&255)<<16|((T>>>8&255)*U.a16>>16&255)<<8|T&255)),q){case 0:v[Q]=T>>>24&255;v[Q+1]=T>>>16&255;v[Q+2]=T>>>8&255;v[Q+3]=T&255;break;case 1:v[Q]=T&255;v[Q+1]=T>>>24&255;v[Q+2]=T>>>16&255;v[Q+3]=T>>>8&255;break;case 2:v[Q]=T>>>8&255,v[Q+1]=T>>>16&255,v[Q+2]=T>>>24&255,v[Q+3]=T&255}J+=4;Q+=4}}z>0&&(a.dirty=!0,a.version++);return z};Lb.unmultiplyAlpha=
function(a){var b=a.buffer.data;if(b!=null){for(var c=a.buffer.format,d=0,f=0,g=b.length/4|0;f<g;){var h=f++,l=h*4,k=c,q=!0;q==null&&(q=!1);k==null&&(k=0);switch(k){case 0:d=(b[l]&255)<<24|(b[l+1]&255)<<16|(b[l+2]&255)<<8|b[l+3]&255;break;case 1:d=(b[l+1]&255)<<24|(b[l+2]&255)<<16|(b[l+3]&255)<<8|b[l]&255;break;case 2:d=(b[l+2]&255)<<24|(b[l+1]&255)<<16|(b[l]&255)<<8|b[l+3]&255}q&&(d&255)!=0&&(d&255)!=255&&(U.unmult=255/(d&255),d=(U.__clamp[Math.round((d>>>24&255)*U.unmult)]&255)<<24|(U.__clamp[Math.round((d>>>
16&255)*U.unmult)]&255)<<16|(U.__clamp[Math.round((d>>>8&255)*U.unmult)]&255)<<8|d&255);h*=4;l=c;k=!1;k==null&&(k=!1);l==null&&(l=0);k&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(U.a16=U.__alpha16[d&255],d=((d>>>24&255)*U.a16>>16&255)<<24|((d>>>16&255)*U.a16>>16&255)<<16|((d>>>8&255)*U.a16>>16&255)<<8|d&255));switch(l){case 0:b[h]=d>>>24&255;b[h+1]=d>>>16&255;b[h+2]=d>>>8&255;b[h+3]=d&255;break;case 1:b[h]=d&255;b[h+1]=d>>>24&255;b[h+2]=d>>>16&255;b[h+3]=d>>>8&255;break;case 2:b[h]=d>>>8&255,b[h+1]=d>>>
16&255,b[h+2]=d>>>24&255,b[h+3]=d&255}}a.buffer.premultiplied=!1;a.dirty=!0;a.version++}};Lb.__boxBlur=function(a,b,c,d,f,g){b.set(a);f|=0;g|=0;Lb.__boxBlurH(b,a,c,d,f,0);Lb.__boxBlurH(b,a,c,d,f,1);Lb.__boxBlurH(b,a,c,d,f,2);Lb.__boxBlurH(b,a,c,d,f,3);f=1/(g+g+1);for(var h=c*4,l,k,q,w,v,z,n=0,E=c;n<E;){l=n++;k=l*=4;q=l+g*h;w=a[l];v=a[l+h*(d-1)];z=(g+1)*w;for(var H=0,J=g;H<J;){var Q=H++;z+=a[l+Q*h]}H=0;for(J=g+1;H<J;)H++,z+=a[q]-w,b[l]=Math.round(z*f),q+=h,l+=h;w=g+1;for(H=d-g;w<H;)w++,z+=a[q]-a[k],
b[l]=Math.round(z*f),k+=h,q+=h,l+=h;q=d-g;for(w=d;q<w;)q++,z+=v-a[k],b[l]=Math.round(z*f),k+=h,l+=h}f=1/(g+g+1);h=c*4;n=0;for(E=c;n<E;){l=n++;k=l=l*4+1;q=l+g*h;w=a[l];v=a[l+h*(d-1)];z=(g+1)*w;H=0;for(J=g;H<J;)Q=H++,z+=a[l+Q*h];H=0;for(J=g+1;H<J;)H++,z+=a[q]-w,b[l]=Math.round(z*f),q+=h,l+=h;w=g+1;for(H=d-g;w<H;)w++,z+=a[q]-a[k],b[l]=Math.round(z*f),k+=h,q+=h,l+=h;q=d-g;for(w=d;q<w;)q++,z+=v-a[k],b[l]=Math.round(z*f),k+=h,l+=h}f=1/(g+g+1);h=c*4;n=0;for(E=c;n<E;){l=n++;k=l=l*4+2;q=l+g*h;w=a[l];v=a[l+
h*(d-1)];z=(g+1)*w;H=0;for(J=g;H<J;)Q=H++,z+=a[l+Q*h];H=0;for(J=g+1;H<J;)H++,z+=a[q]-w,b[l]=Math.round(z*f),q+=h,l+=h;w=g+1;for(H=d-g;w<H;)w++,z+=a[q]-a[k],b[l]=Math.round(z*f),k+=h,q+=h,l+=h;q=d-g;for(w=d;q<w;)q++,z+=v-a[k],b[l]=Math.round(z*f),k+=h,l+=h}f=1/(g+g+1);h=c*4;n=0;for(E=c;n<E;){l=n++;k=l=l*4+3;q=l+g*h;w=a[l];v=a[l+h*(d-1)];z=(g+1)*w;H=0;for(J=g;H<J;)Q=H++,z+=a[l+Q*h];H=0;for(J=g+1;H<J;)H++,z+=a[q]-w,b[l]=Math.round(z*f),q+=h,l+=h;w=g+1;for(H=d-g;w<H;)w++,z+=a[q]-a[k],b[l]=Math.round(z*
f),k+=h,q+=h,l+=h;q=d-g;for(w=d;q<w;)q++,z+=v-a[k],b[l]=Math.round(z*f),k+=h,l+=h}};Lb.__boxBlurH=function(a,b,c,d,f,g){for(var h=1/(f+f+1),l,k,q,w,v,z,n=0;n<d;){k=l=n++*c;q=l+f;w=a[l*4+g];v=a[(l+c-1)*4+g];z=(f+1)*w;for(var E=0,H=f;E<H;){var J=E++;z+=a[(l+J)*4+g]}E=0;for(H=f+1;E<H;)E++,z+=a[q*4+g]-w,b[l*4+g]=Math.round(z*h),++q,++l;w=f+1;for(E=c-f;w<E;)w++,z+=a[q*4+g]-a[k*4+g],b[l*4+g]=Math.round(z*h),++q,++k,++l;q=c-f;for(w=c;q<w;)q++,z+=v-a[k*4+g],b[l*4+g]=Math.round(z*h),++k,++l}};Lb.__boxBlurT=
function(a,b,c,d,f,g){for(var h=1/(f+f+1),l=c*4,k,q,w,v,z,n,E=0;E<c;){q=k=E++*4+g;w=k+f*l;v=a[k];z=a[k+l*(d-1)];n=(f+1)*v;for(var H=0,J=f;H<J;){var Q=H++;n+=a[k+Q*l]}H=0;for(J=f+1;H<J;)H++,n+=a[w]-v,b[k]=Math.round(n*h),w+=l,k+=l;v=f+1;for(H=d-f;v<H;)v++,n+=a[w]-a[q],b[k]=Math.round(n*h),q+=l,w+=l,k+=l;w=d-f;for(v=d;w<v;)w++,n+=z-a[q],b[k]=Math.round(n*h),q+=l,k+=l}};Lb.__calculateSourceOffset=function(a,b,c,d){c-=b.x|0;b=d-(b.y|0);return c<0||b<0||c>=a.width||b>=a.height?-1:4*(b*(a.width|0)+c)};
Lb.__getBoxesForGaussianBlur=function(a,b){var c=Math.floor(Math.sqrt(12*a*a/b+1));c%2==0&&--c;var d=c+2;a=Math.round((12*a*a-b*c*c-4*b*c-3*b)/(-4*c-4));for(var f=[],g=0;g<b;){var h=g++;f.push(h<a?c:d)}return f};Lb.__pixelCompare=function(a,b){var c=a>>>24&255,d=b>>>24&255;if(c!=d)return ta.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return ta.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return ta.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?ta.gt(c,d)?1:-1:0};Lb.__translatePixel=function(a,b,c,d,
f,g,h){c=4*(g*(c.width|0)+f);b=Lb.__calculateSourceOffset(b,d,f,g);b<0?a[c]=a[c+1]=a[c+2]=a[c+3]=0:(a[c]=a[b],a[c+1]=a[b+1],a[c+2]=a[b+2],h=ta.toFloat(a[b+3])*h|0,a[c+3]=h<0?0:h>255?255:h)};var $g=function(a,b){this.image=a;b==null?this.rect=a.get_rect():(b.x<0&&(b.x=0),b.y<0&&(b.y=0),b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),b.width<0&&(b.width=0),b.height<0&&(b.height=0),this.rect=b);this.stride=a.buffer.get_stride();this.__update()};r["lime._internal.graphics._ImageDataUtil.ImageDataView"]=
$g;$g.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";$g.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,tempRect:null,clip:function(a,b,c,d){this.tempRect==null&&(this.tempRect=new We);this.tempRect.setTo(a,b,c,d);this.rect.intersection(this.tempRect,this.rect);this.__update()},hasRow:function(a){return a>=0?a<this.height:!1},offset:function(a,b){a<0?(this.rect.x+=a,this.rect.x<0&&(this.rect.x=0)):(this.rect.x+=a,this.rect.width-=a);
b<0?(this.rect.y+=b,this.rect.y<0&&(this.rect.y=0)):(this.rect.y+=b,this.rect.height-=b);this.__update()},row:function(a){return this.byteOffset+this.stride*a},__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__:$g};var Ph=function(){};r["lime._internal.graphics.StackBlur"]=Ph;Ph.__name__="lime._internal.graphics.StackBlur";
Ph.blur=function(a,b,c,d,f,g,h){a.copyPixels(b,c,d);Ph.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,f,g,h)};Ph.__stackBlurCanvasRGBA=function(a,b,c,d,f,g){d=Math.round(d)>>1;f=Math.round(f)>>1;if(Ph.MUL_TABLE!=null&&(d>=Ph.MUL_TABLE.length&&(d=Ph.MUL_TABLE.length-1),f>=Ph.MUL_TABLE.length&&(f=Ph.MUL_TABLE.length-1),!(d<0||f<0))){g<1&&(g=1);g>3&&(g=3);a=a.get_data();var h,l=d+d+1;var k=f+f+1;var q=b-1,w=c-1,v=d+1,z=f+1,n=new yn,E=n;var H=1;for(var J=l;H<J;)H++,E=E.n=new yn;E.n=n;var Q=l=new yn;H=1;
for(J=k;H<J;)H++,Q=Q.n=new yn;Q.n=l;for(var T=Ph.MUL_TABLE[d],fa=Ph.SHG_TABLE[d],da=Ph.MUL_TABLE[f],pa=Ph.SHG_TABLE[f];g>0;){--g;var xa=h=0;var Ua=T,Sa=fa;var Ka=c;do{var hb=a[h];k=v*hb;var Ra=a[h+1];var Jb=v*Ra;var vb=a[h+2];var Cb=v*vb;H=a[h+3];var pc=v*H;E=n;Q=v;do E.r=hb,E.g=Ra,E.b=vb,E.a=H,E=E.n;while(--Q>-1);H=1;for(J=v;H<J;)Q=H++,Q=h+((q<Q?q:Q)<<2),k+=E.r=a[Q],Jb+=E.g=a[Q+1],Cb+=E.b=a[Q+2],pc+=E.a=a[Q+3],E=E.n;J=n;E=0;for(H=b;E<H;)Q=E++,a[h++]=k*Ua>>>Sa,a[h++]=Jb*Ua>>>Sa,a[h++]=Cb*Ua>>>Sa,
a[h++]=pc*Ua>>>Sa,Q=Q+d+1,Q=xa+(Q<q?Q:q)<<2,k-=J.r-(J.r=a[Q]),Jb-=J.g-(J.g=a[Q+1]),Cb-=J.b-(J.b=a[Q+2]),pc-=J.a-(J.a=a[Q+3]),J=J.n;xa+=b}while(--Ka>0);Ua=da;Sa=pa;Ka=0;for(xa=b;Ka<xa;){E=Ka++;h=E<<2;hb=a[h];k=z*hb;Ra=a[h+1];Jb=z*Ra;vb=a[h+2];Cb=z*vb;H=a[h+3];pc=z*H;Q=l;h=0;for(J=z;h<J;)h++,Q.r=hb,Q.g=Ra,Q.b=vb,Q.a=H,Q=Q.n;H=b;J=1;for(hb=f+1;J<hb;)Ra=J++,h=H+E<<2,k+=Q.r=a[h],Jb+=Q.g=a[h+1],Cb+=Q.b=a[h+2],pc+=Q.a=a[h+3],Q=Q.n,Ra<w&&(H+=b);h=E;J=l;if(g>0)for(hb=0,Ra=c;hb<Ra;)vb=hb++,Q=h<<2,H=pc*Ua>>>
Sa,a[Q+3]=H,H>0?(a[Q]=k*Ua>>>Sa,a[Q+1]=Jb*Ua>>>Sa,a[Q+2]=Cb*Ua>>>Sa):a[Q]=a[Q+1]=a[Q+2]=0,Q=vb+z,Q=E+(Q<w?Q:w)*b<<2,k-=J.r-(J.r=a[Q]),Jb-=J.g-(J.g=a[Q+1]),Cb-=J.b-(J.b=a[Q+2]),pc-=J.a-(J.a=a[Q+3]),J=J.n,h+=b;else for(var qd=0,Gb=c;qd<Gb;){var nd=qd++;Q=h<<2;H=pc*Ua>>>Sa;a[Q+3]=H;H>0?(H=255/H,hb=(k*Ua>>>Sa)*H|0,Ra=(Jb*Ua>>>Sa)*H|0,vb=(Cb*Ua>>>Sa)*H|0,a[Q]=hb>255?255:hb,a[Q+1]=Ra>255?255:Ra,a[Q+2]=vb>255?255:vb):a[Q]=a[Q+1]=a[Q+2]=0;Q=nd+z;Q=E+(Q<w?Q:w)*b<<2;k-=J.r-(J.r=a[Q]);Jb-=J.g-(J.g=a[Q+1]);Cb-=
J.b-(J.b=a[Q+2]);pc-=J.a-(J.a=a[Q+3]);J=J.n;h+=b}}}}};var yn=function(){this.a=this.b=this.g=this.r=0;this.n=null};r["lime._internal.graphics.BlurStack"]=yn;yn.__name__="lime._internal.graphics.BlurStack";yn.prototype={r:null,g:null,b:null,a:null,n:null,__class__:yn};var dx=function(){};r["lime._internal.macros.AssetsMacro"]=dx;dx.__name__="lime._internal.macros.AssetsMacro";var aw=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app.Event"]=aw;aw.__name__=
"lime.app.Event";aw.prototype={canceled:null,__listeners:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},dispatch:null,has:function(a){for(var b=0,c=this.__listeners;b<
c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__class__:aw};var zc=function(a,b){if(a!=null)try{this.value=a(),this.isComplete=!0}catch(c){Rb.lastError=c,this.error=la.caught(c).unwrap(),
this.isError=!0}};r["lime.app.Future"]=zc;zc.__name__="lime.app.Future";zc.ofEvents=function(a,b,c){var d=new yf;a.add(m(d,d.complete),!0);b!=null&&b.add(m(d,d.error),!0);c!=null&&c.add(m(d,d.progress),!0);return d.future};zc.withError=function(a){var b=new zc;b.isError=!0;b.error=a;return b};zc.withValue=function(a){var b=new zc;b.isComplete=!0;b.value=a;return b};zc.prototype={error:null,isComplete:null,isError:null,value:null,__completeListeners:null,__errorListeners:null,__progressListeners:null,
onComplete:function(a){a!=null&&(this.isComplete?a(this.value):this.isError||(this.__completeListeners==null&&(this.__completeListeners=[]),this.__completeListeners.push(a)));return this},onError:function(a){a!=null&&(this.isError?a(this.error):this.isComplete||(this.__errorListeners==null&&(this.__errorListeners=[]),this.__errorListeners.push(a)));return this},onProgress:function(a){a!=null&&(this.__progressListeners==null&&(this.__progressListeners=[]),this.__progressListeners.push(a));return this},
ready:function(a){return this},result:function(a){a==null&&(a=-1);this.ready(a);return this.isComplete?this.value:null},then:function(a){if(this.isComplete)return a(this.value);if(this.isError){var b=new zc;b.isError=!0;b.error=this.error;return b}var c=new yf;this.onError(m(c,c.error));this.onProgress(m(c,c.progress));this.onComplete(function(d){d=a(d);d.onError(m(c,c.error));d.onComplete(m(c,c.complete))});return c.future},__class__:zc};var yf=function(){this.future=new zc};r["lime.app.Promise"]=
yf;yf.__name__="lime.app.Promise";yf.prototype={future:null,complete:function(a){if(!this.future.isError&&(this.future.isComplete=!0,this.future.value=a,this.future.__completeListeners!=null)){for(var b=0,c=this.future.__completeListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__completeListeners=null}return this},completeWith:function(a){a.onComplete(m(this,this.complete));a.onError(m(this,this.error));a.onProgress(m(this,this.progress));return this},error:function(a){if(!this.future.isComplete&&
(this.future.isError=!0,this.future.error=a,this.future.__errorListeners!=null)){for(var b=0,c=this.future.__errorListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__errorListeners=null}return this},progress:function(a,b){if(!this.future.isError&&!this.future.isComplete&&this.future.__progressListeners!=null)for(var c=0,d=this.future.__progressListeners;c<d.length;){var f=d[c];++c;f(a,b)}return this},get_isComplete:function(){return this.future.isComplete},get_isError:function(){return this.future.isError},
__class__:yf,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};var Wu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Array_String__Void"]=Wu;Wu.__name__="lime.app._Event_Array_String__Void";Wu.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Wu};var Xu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Float_Float_Float_Void"]=Xu;Xu.__name__="lime.app._Event_Float_Float_Float_Void";Xu.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==
a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Xu};var Yu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=
[]};r["lime.app._Event_Float_Float_Int_Void"]=Yu;Yu.__name__="lime.app._Event_Float_Float_Int_Void";Yu.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},
has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,
g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Yu};var pp=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Float_Float_Void"]=pp;pp.__name__="lime.app._Event_Float_Float_Void";pp.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:pp};var Zu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=Zu;Zu.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_Void";Zu.prototype={canceled:null,__repeat:null,
__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:Zu};var $u=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};r["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=$u;$u.__name__="lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void";$u.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=
!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:$u};var av=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Int_Float_Void"]=av;av.__name__="lime.app._Event_Int_Float_Void";av.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:av};var Er=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Int_Int_Void"]=Er;Er.__name__="lime.app._Event_Int_Int_Void";Er.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Er};var Ol=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};r["lime.app._Event_Int_Void"]=Ol;Ol.__name__="lime.app._Event_Int_Void";Ol.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=
0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),
c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Ol};var ut=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Int_lime_system_Orientation_Void"]=ut;ut.__name__="lime.app._Event_Int_lime_system_Orientation_Void";ut.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:ut};var bv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=bv;bv.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_Void";bv.prototype={canceled:null,__repeat:null,
__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:bv};var cv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};r["lime.app._Event_String_Int_Int_Void"]=cv;cv.__name__="lime.app._Event_String_Int_Int_Void";cv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,
f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:cv};var zn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_String_Void"]=zn;zn.__name__="lime.app._Event_String_Void";zn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);
this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:zn};var Se=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_Void_Void"]=Se;Se.__name__="lime.app._Event_Void_Void";Se.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==
a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(){this.canceled=!1;for(var a=this.__listeners,b=this.__repeat,c=0;c<a.length&&(a[c](),b[c]?++c:this.remove(a[c]),!this.canceled););},__class__:Se};var dv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};
r["lime.app._Event_haxe_Exception_Void"]=dv;dv.__name__="lime.app._Event_haxe_Exception_Void";dv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=
0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),
c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:dv};var Fr=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_graphics_RenderContext_Void"]=Fr;Fr.__name__="lime.app._Event_lime_graphics_RenderContext_Void";Fr.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Fr};var tt=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_system_Orientation_Void"]=tt;tt.__name__="lime.app._Event_lime_system_Orientation_Void";tt.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:tt};var ev=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};r["lime.app._Event_lime_system_State_Void"]=ev;ev.__name__="lime.app._Event_lime_system_State_Void";ev.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,
d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:ev};var fv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=fv;fv.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";fv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:fv};var Gr=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_GamepadButton_Void"]=Gr;Gr.__name__="lime.app._Event_lime_ui_GamepadButton_Void";Gr.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:Gr};var gv=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_Gamepad_Void"]=gv;gv.__name__="lime.app._Event_lime_ui_Gamepad_Void";gv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;
for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:gv};var hv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_Joystick_Void"]=hv;hv.__name__="lime.app._Event_lime_ui_Joystick_Void";hv.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:hv};var Hr=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=Hr;Hr.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";Hr.prototype=
{canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:Hr};var An=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_Touch_Void"]=An;An.__name__="lime.app._Event_lime_ui_Touch_Void";An.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},
cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;
for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:An};var vt=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_ui_Window_Void"]=vt;vt.__name__="lime.app._Event_lime_ui_Window_Void";vt.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:vt};var iv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};r["lime.app._Event_lime_utils_Resource_Void"]=iv;iv.__name__="lime.app._Event_lime_utils_Resource_Void";iv.prototype={canceled:null,__repeat:null,
__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=
0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:iv};var bw=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};r["lime.app._Event_ofEvents_T_Void"]=bw;bw.__name__="lime.app._Event_ofEvents_T_Void";bw.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){c==null&&(c=0);b==null&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;--b>=0;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,
d=0;d<b.length&&(b[d](a),c[d]?++d:this.remove(b[d]),!this.canceled););},__class__:bw};var Ic=function(a,b,c,d,f,g,h){f==null&&(f=-1);d==null&&(d=-1);c==null&&(c=0);b==null&&(b=0);this.offsetX=b;this.offsetY=c;this.width=d;this.height=f;this.version=0;h==null&&(h=Uf.CANVAS,Pb.__current.__worker!=null||Pb.__isWorker)&&(h=Uf.DATA);this.type=h;if(a==null){if(d>0&&f>0)switch(this.type._hx_index){case 0:this.buffer=new bj(null,d,f);kb.createCanvas(this,d,f);g!=null&&g!=0&&this.fillRect(new We(0,0,d,f),
g);break;case 1:a=d*f*4,a=a!=null?new Uint8Array(a):null,this.buffer=new bj(a,d,f),g!=null&&g!=0&&this.fillRect(new We(0,0,d,f),g)}}else this.__fromImageBuffer(a)};r["lime.graphics.Image"]=Ic;Ic.__name__="lime.graphics.Image";Ic.fromBase64=function(a,b){if(a==null)return null;var c=new Ic;c.__fromBase64(a,b);return c};Ic.fromBitmapData=function(a){return a==null?null:a.image};Ic.fromBytes=function(a){if(a==null)return null;var b=new Ic;return b.__fromBytes(a)?b:null};Ic.fromCanvas=function(a){if(a==
null)return null;var b=new bj(null,a.width,a.height);b.set_src(a);a=new Ic(b);a.type=Uf.CANVAS;return a};Ic.fromFile=function(a){if(a==null)return null;var b=new Ic;return b.__fromFile(a)?b:null};Ic.fromImageElement=function(a){if(a==null)return null;var b=new bj(null,a.width,a.height);b.set_src(a);a=new Ic(b);a.type=Uf.CANVAS;return a};Ic.loadFromBase64=function(a,b){return a==null||b==null?zc.withValue(null):Ob.loadImage("data:"+b+";base64,"+a)};Ic.loadFromBytes=function(a){if(a==null)return zc.withValue(null);
if(Ic.__isPNG(a))var b="image/png";else if(Ic.__isJPG(a))b="image/jpeg";else if(Ic.__isGIF(a))b="image/gif";else if(Ic.__isWebP(a))b="image/webp";else return zc.withValue(null);return Ob.loadImageFromBytes(a,b)};Ic.loadFromFile=function(a){return a==null?zc.withValue(null):Ob.loadImage(a)};Ic.__isGIF=function(a){if(a==null||a.length<6)return!1;a=a.getString(0,6);return a!="GIF87a"?a=="GIF89a":!0};Ic.__isJPG=function(a){return a==null||a.length<4?!1:a.b[0]==255&&a.b[1]==216&&a.b[a.length-2]==255?a.b[a.length-
1]==217:!1};Ic.__isPNG=function(a){return a==null||a.length<8?!1:a.b[0]==137&&a.b[1]==80&&a.b[2]==78&&a.b[3]==71&&a.b[4]==13&&a.b[5]==10&&a.b[6]==26?a.b[7]==10:!1};Ic.__isWebP=function(a){return a==null||a.length<16?!1:a.getString(0,4)=="RIFF"?a.getString(8,4)=="WEBP":!1};Ic.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,rect:null,type:null,version:null,width:null,x:null,y:null,clone:function(){if(this.buffer!=null){this.type==Uf.CANVAS?kb.convertToCanvas(this):kb.convertToData(this);
var a=new Ic(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Ic(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)},colorTransform:function(a,b){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:kb.colorTransform(this,a,b);break;case 1:kb.convertToData(this);Lb.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),
gf.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,f){b=this.__clipRect(b);if(this.buffer!=null&&b!=null&&!(f==ti.ALPHA&&!this.get_transparent()||b.width<=0||b.height<=0))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),this.type._hx_index){case 0:kb.copyChannel(this,a,b,c,d,f);break;case 1:kb.convertToData(this);kb.convertToData(a);Lb.copyChannel(this,a,b,c,d,f);break;case 2:switch(d._hx_index){case 0:var g=1;break;case 1:g=2;break;case 2:g=
4;break;case 3:g=8}switch(f._hx_index){case 0:var h=1;break;case 1:h=2;break;case 2:h=4;break;case 3:h=8}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),g,h)}},copyPixels:function(a,b,c,d,f,g){g==null&&(g=!1);if(this.buffer!=null&&a!=null&&!(b.width<=0||b.height<=0||this.width<=0||this.height<=0))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-
b.y),b.x<0&&(b.width+=b.x,b.x=0),b.y<0&&(b.height+=b.y,b.y=0),c.x+b.width>this.width&&(b.width=this.width-c.x),c.y+b.height>this.height&&(b.height=this.height-c.y),c.x<0&&(b.width+=c.x,b.x-=c.x,c.x=0),c.y<0&&(b.height+=c.y,b.y-=c.y,c.y=0),a==this&&c.x<b.get_right()&&c.y<b.get_bottom()&&(a=this.clone()),d==a&&(f==null||f.x==0&&f.y==0)&&(f=d=null),this.type._hx_index){case 0:d!=null?(kb.convertToData(this),kb.convertToData(a),d!=null&&kb.convertToData(d),Lb.copyPixels(this,a,b,c,d,f,g)):(kb.convertToCanvas(this),
kb.convertToCanvas(a),kb.copyPixels(this,a,b,c,d,f,g));break;case 1:kb.convertToData(this);kb.convertToData(a);d!=null&&kb.convertToData(d);Lb.copyPixels(this,a,b,c,d,f,g);break;case 2:b.offset(a.offsetX,a.offsetY),c.offset(this.offsetX,this.offsetY),d!=null&&f!=null&&f.offset(d.offsetX,d.offsetY),this.buffer.__srcBitmapData.copyPixels(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d!=null?d.buffer.get_src():null,f!=null?f.__toFlashPoint():null,g)}},encode:function(a,b){b==null&&
(b=90);if(a==null)return op.encode(this);switch(a._hx_index){case 0:return $v.encode(this);case 1:return Br.encode(this,b);case 2:return op.encode(this)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:kb.fillRect(this,a,b,c);break;case 1:kb.convertToData(this);if(this.buffer.data.length==0)break;Lb.fillRect(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(c==null)b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255;
else switch(c){case 1:break;case 2:b=(b&255)<<24|(b>>>8&255)<<16|(b>>>16&255)<<8|b>>>24&255;break;default:b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&255}this.buffer.__srcBitmapData.fillRect(a.__toFlashRectangle(),b)}},floodFill:function(a,b,c,d){if(this.buffer!=null)switch(this.type._hx_index){case 0:kb.floodFill(this,a,b,c,d);break;case 1:kb.convertToData(this);Lb.floodFill(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;
case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.floodFill(a+this.offsetX,b+this.offsetY,c)}},getColorBoundsRect:function(a,b,c,d){c==null&&(c=!0);if(this.buffer==null)return null;switch(this.type._hx_index){case 0:return kb.convertToData(this),Lb.getColorBoundsRect(this,a,b,c,d);case 1:return Lb.getColorBoundsRect(this,a,b,c,d);case 2:return a=this.buffer.__srcBitmapData.getColorBoundsRect(a,
b,c),new We(a.x,a.y,a.width,a.height);default:return null}},getPixel:function(a,b,c){if(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return kb.getPixel(this,a,b,c);case 1:return kb.convertToData(this),Lb.getPixel(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel(a+this.offsetX,b+this.offsetY);if(c==null)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>
16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixel32:function(a,b,c){if(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height)return 0;switch(this.type._hx_index){case 0:return kb.getPixel32(this,a,b,c);case 1:return kb.convertToData(this),Lb.getPixel32(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel32(a+this.offsetX,b+this.offsetY);if(c==null)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;switch(c){case 1:return a;
case 2:return(a&255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255;default:return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255}default:return 0}},getPixels:function(a,b){if(this.buffer==null)return null;switch(this.type._hx_index){case 0:return kb.getPixels(this,a,b);case 1:return kb.convertToData(this),Lb.getPixels(this,a,b);case 2:return null;default:return null}},merge:function(a,b,c,d,f,g,h){if(this.buffer!=null&&a!=null)switch(this.type._hx_index){case 0:kb.convertToCanvas(this);kb.merge(this,
a,b,c,d,f,g,h);break;case 1:kb.convertToData(this);kb.convertToData(a);Lb.merge(this,a,b,c,d,f,g,h);break;case 2:b.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.merge(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d,f,g,h)}},resize:function(a,b){switch(this.type._hx_index){case 0:kb.resize(this,a,b);break;case 1:Lb.resize(this,a,b)}this.buffer.width=a;this.buffer.height=b;this.offsetY=this.offsetX=0;this.width=a;this.height=b},scroll:function(a,b){if(this.buffer!=
null)switch(this.type._hx_index){case 0:kb.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new Ff(a,b));break;case 2:this.buffer.__srcBitmapData.scroll(a+this.offsetX,b+this.offsetX)}},setPixel:function(a,b,c,d){if(!(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:kb.setPixel(this,a,b,c,d);break;case 1:kb.convertToData(this);Lb.setPixel(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else switch(d){case 1:break;
case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel(a+this.offsetX,b+this.offsetX,c)}},setPixel32:function(a,b,c,d){if(!(this.buffer==null||a<0||b<0||a>=this.width||b>=this.height))switch(this.type._hx_index){case 0:kb.setPixel32(this,a,b,c,d);break;case 1:kb.convertToData(this);Lb.setPixel32(this,a,b,c,d);break;case 2:if(d==null)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>
8&255;else switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>>8&255)<<16|(c>>>16&255)<<8|c>>>24&255;break;default:c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255}this.buffer.__srcBitmapData.setPixel32(a+this.offsetX,b+this.offsetY,c)}},setPixels:function(a,b,c,d){a=this.__clipRect(a);if(this.buffer!=null&&a!=null)switch(d==null&&(d=bk.BIG_ENDIAN),this.type._hx_index){case 0:kb.setPixels(this,a,b,c,d);break;case 1:kb.convertToData(this),Lb.setPixels(this,a,b,c,d)}},threshold:function(a,b,c,
d,f,g,h,l,k){l==null&&(l=!1);h==null&&(h=-1);g==null&&(g=0);if(this.buffer==null||a==null||b==null)return 0;switch(this.type._hx_index){case 0:case 1:return kb.convertToData(this),kb.convertToData(a),Lb.threshold(this,a,b,c,d,f,g,h,l,k);case 2:if(k==null){var q=g;g=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}else switch(k){case 1:break;case 2:q=g;g=(q&255)<<24|(q>>>8&255)<<16|(q>>>16&255)<<8|q>>>24&255;break;default:q=g,g=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}if(k==null)q=
h,h=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255;else switch(k){case 1:break;case 2:q=h;h=(q&255)<<24|(q>>>8&255)<<16|(q>>>16&255)<<8|q>>>24&255;break;default:q=h,h=(q&255)<<24|(q>>>24&255)<<16|(q>>>16&255)<<8|q>>>8&255}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);return this.buffer.__srcBitmapData.threshold(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),d,f,g,h,l)}return 0},__clipRect:function(a){return a==null||a.x<0&&(a.width-=-a.x,a.x=0,a.x+a.width<=
0)||a.y<0&&(a.height-=-a.y,a.y=0,a.y+a.height<=0)||a.x+a.width>=this.width&&(a.width-=a.x+a.width-this.width,a.width<=0)||a.y+a.height>=this.height&&(a.height-=a.y+a.height-this.height,a.height<=0)?null:a},__fromBase64:function(a,b,c){var d=this,f=new window.Image;f.addEventListener("load",function(g){d.buffer=new bj(null,f.width,f.height);d.buffer.__srcImage=f;d.offsetX=0;d.offsetY=0;d.width=d.buffer.width;d.height=d.buffer.height;c!=null&&c(d)},!1);f.src="data:"+b+";base64,"+a},__fromBytes:function(a,
b){if(Ic.__isPNG(a))var c="image/png";else if(Ic.__isJPG(a))c="image/jpeg";else if(Ic.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(aj.encode(a),c,b);return!0},__fromFile:function(a,b,c){var d=this,f=new window.Image;Ob.__isSameOrigin(a)||(f.crossOrigin="Anonymous");f.onload=function(g){d.buffer=new bj(null,f.width,f.height);d.buffer.__srcImage=f;d.width=f.width;d.height=f.height;b!=null&&b(d)};f.onerror=function(g){c!=null&&c()};f.src=a;return!0},__fromImageBuffer:function(a){this.buffer=
a;a!=null&&(this.width==-1&&(this.width=a.width),this.height==-1&&(this.height=a.height))},get_data:function(){this.buffer.data==null&&this.buffer.width>0&&this.buffer.height>0&&kb.convertToData(this);return this.buffer.data},set_data:function(a){return this.buffer.data=a},get_format:function(){return this.buffer.format},set_format:function(a){this.buffer.format!=a&&this.type._hx_index==1&&Lb.setFormat(this,a);return this.buffer.format=a},get_powerOfTwo:function(){return this.buffer.width!=0&&(this.buffer.width&
~this.buffer.width+1)==this.buffer.width?this.buffer.height!=0?(this.buffer.height&~this.buffer.height+1)==this.buffer.height:!1:!1},set_powerOfTwo:function(a){if(a!=this.get_powerOfTwo()){for(var b=1,c=1;b<this.buffer.width;)b<<=1;for(;c<this.buffer.height;)c<<=1;if(b==this.buffer.width&&c==this.buffer.height)return a;switch(this.type._hx_index){case 0:kb.convertToData(this);Lb.resizeBuffer(this,b,c);break;case 1:Lb.resizeBuffer(this,b,c)}}return a},get_premultiplied:function(){return this.buffer.premultiplied},
set_premultiplied:function(a){if(a&&!this.buffer.premultiplied)switch(this.type._hx_index){case 0:case 1:kb.convertToData(this),Lb.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&this.type._hx_index==1&&(kb.convertToData(this),Lb.unmultiplyAlpha(this));return a},get_rect:function(){return new We(0,0,this.width,this.height)},get_src:function(){this.buffer.__srcCanvas!=null||this.buffer.data==null&&this.type!=Uf.DATA||kb.convertToCanvas(this);return this.buffer.get_src()},set_src:function(a){return this.buffer.set_src(a)},
get_transparent:function(){return this.buffer==null?!1:this.buffer.transparent},set_transparent:function(a){return this.buffer==null?!1:this.buffer.transparent=a},__class__:Ic,__properties__:{set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",
set_data:"set_data",get_data:"get_data"}};var bj=function(a,b,c,d,f){d==null&&(d=32);c==null&&(c=0);b==null&&(b=0);this.data=a;this.width=b;this.height=c;this.bitsPerPixel=d;this.format=f==null?0:f;this.premultiplied=!1;this.transparent=!0};r["lime.graphics.ImageBuffer"]=bj;bj.__name__="lime.graphics.ImageBuffer";bj.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcCustom:null,
__srcImage:null,__srcImageData:null,clone:function(){var a=new bj(this.data,this.width,this.height,this.bitsPerPixel);if(this.data!=null){var b=this.data.byteLength,c=null,d=null,f=null,g=null,h=null;b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):f!=null?new Uint8Array(f):g!=null?h==null?new Uint8Array(g,0):new Uint8Array(g,0,h):null;a.data=b;d=c=b=null;f=this.data;h=g=null;b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):
f!=null?new Uint8Array(f):g!=null?h==null?new Uint8Array(g,0):new Uint8Array(g,0,h):null;a.data.set(b)}else this.__srcImageData!=null?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcImageData.width,a.__srcCanvas.height=this.__srcImageData.height,a.__srcImageData=a.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height),b=new Uint8ClampedArray(this.__srcImageData.data),a.__srcImageData.data.set(b)):
this.__srcCanvas!=null?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcCanvas.width,a.__srcCanvas.height=this.__srcCanvas.height,a.__srcContext.drawImage(this.__srcCanvas,0,0)):a.__srcImage=this.__srcImage;a.bitsPerPixel=this.bitsPerPixel;a.format=this.format;a.premultiplied=this.premultiplied;a.transparent=this.transparent;return a},get_src:function(){return this.__srcImage!=null?this.__srcImage:this.__srcCanvas},
set_src:function(a){a instanceof Image?this.__srcImage=a:a instanceof HTMLCanvasElement&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return this.width*(this.bitsPerPixel/8|0)},__class__:bj,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var ti=O["lime.graphics.ImageChannel"]={__ename__:"lime.graphics.ImageChannel",__constructs__:null,RED:{_hx_name:"RED",_hx_index:0,__enum__:"lime.graphics.ImageChannel",toString:D},
GREEN:{_hx_name:"GREEN",_hx_index:1,__enum__:"lime.graphics.ImageChannel",toString:D},BLUE:{_hx_name:"BLUE",_hx_index:2,__enum__:"lime.graphics.ImageChannel",toString:D},ALPHA:{_hx_name:"ALPHA",_hx_index:3,__enum__:"lime.graphics.ImageChannel",toString:D}};ti.__constructs__=[ti.RED,ti.GREEN,ti.BLUE,ti.ALPHA];var Ir=O["lime.graphics.ImageFileFormat"]={__ename__:"lime.graphics.ImageFileFormat",__constructs__:null,BMP:{_hx_name:"BMP",_hx_index:0,__enum__:"lime.graphics.ImageFileFormat",toString:D},JPEG:{_hx_name:"JPEG",
_hx_index:1,__enum__:"lime.graphics.ImageFileFormat",toString:D},PNG:{_hx_name:"PNG",_hx_index:2,__enum__:"lime.graphics.ImageFileFormat",toString:D}};Ir.__constructs__=[Ir.BMP,Ir.JPEG,Ir.PNG];var Uf=O["lime.graphics.ImageType"]={__ename__:"lime.graphics.ImageType",__constructs__:null,CANVAS:{_hx_name:"CANVAS",_hx_index:0,__enum__:"lime.graphics.ImageType",toString:D},DATA:{_hx_name:"DATA",_hx_index:1,__enum__:"lime.graphics.ImageType",toString:D},FLASH:{_hx_name:"FLASH",_hx_index:2,__enum__:"lime.graphics.ImageType",
toString:D},CUSTOM:{_hx_name:"CUSTOM",_hx_index:3,__enum__:"lime.graphics.ImageType",toString:D}};Uf.__constructs__=[Uf.CANVAS,Uf.DATA,Uf.FLASH,Uf.CUSTOM];var Vu=function(){};r["lime.graphics.RenderContext"]=Vu;Vu.__name__="lime.graphics.RenderContext";Vu.prototype={attributes:null,cairo:null,canvas2D:null,dom:null,flash:null,gl:null,gles2:null,gles3:null,type:null,version:null,webgl:null,webgl2:null,window:null,__class__:Vu};var ex={bufferData:function(a,b,c,d,f,g){f!=null?a.bufferData(b,c,d,f,g):
a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d,f,g){f!=null?a.bufferSubData(b,c,d,f,g):a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,h,l,k,q){k!=null?a.compressedTexImage2D(b,c,d,f,g,h,l,k,q):a.compressedTexImage2D(b,c,d,f,g,h,l)},compressedTexSubImage2D:function(a,b,c,d,f,g,h,l,k,q,w){q!=null?a.compressedTexSubImage2D(b,c,d,f,g,h,l,k,q,w):a.compressedTexSubImage2D(b,c,d,f,g,h,l,k)},getBufferSubData:function(a,b,c,d,f,g){f!=null?a.getBufferSubData(b,c,d,f,g):a.getBufferSubData(b,
c,d)},readPixels:function(a,b,c,d,f,g,h,l,k){k!=null?a.readPixels(b,c,d,f,g,h,l,k):a.readPixels(b,c,d,f,g,h,l)},texImage2D:function(a,b,c,d,f,g,h,l,k,q,w){w!=null?a.texImage2D(b,c,d,f,g,h,l,k,q,w):l!=null?a.texImage2D(b,c,d,f,g,h,l,k,q):a.texImage2D(b,c,d,f,g,h)},texSubImage2D:function(a,b,c,d,f,g,h,l,k,q,w){w!=null?a.texSubImage2D(b,c,d,f,g,h,l,k,q,w):k!=null?a.texSubImage2D(b,c,d,f,g,h,l,k,q):a.texSubImage2D(b,c,d,f,g,h,l)},uniform1fv:function(a,b,c,d,f){d!=null?a.uniform1fv(b,c,d,f):a.uniform1fv(b,
c)},uniform1iv:function(a,b,c,d,f){d!=null?a.uniform1iv(b,c,d,f):a.uniform1iv(b,c)},uniform2fv:function(a,b,c,d,f){d!=null?a.uniform2fv(b,c,d,f):a.uniform2fv(b,c)},uniform2iv:function(a,b,c,d,f){d!=null?a.uniform2iv(b,c,d,f):a.uniform2iv(b,c)},uniform3fv:function(a,b,c,d,f){d!=null?a.uniform3fv(b,c,d,f):a.uniform3fv(b,c)},uniform3iv:function(a,b,c,d,f){d!=null?a.uniform3iv(b,c,d,f):a.uniform3iv(b,c)},uniform4fv:function(a,b,c,d,f){d!=null?a.uniform4fv(b,c,d,f):a.uniform4fv(b,c)},uniform4iv:function(a,
b,c,d,f){d!=null?a.uniform4iv(b,c,d,f):a.uniform4iv(b,c)},uniformMatrix2fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix2fv(b,c,d,f,g):a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix3fv(b,c,d,f,g):a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d,f,g){f!=null?a.uniformMatrix4fv(b,c,d,f,g):a.uniformMatrix4fv(b,c,d)},fromGL:function(a){return null},fromRenderContext:function(a){return a.webgl2},toWebGLRenderContext:function(a){return a}},pd={bufferData:function(a,
b,c,d){a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d){a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,h,l){a.compressedTexImage2D(b,c,d,f,g,h,l)},compressedTexSubImage2D:function(a,b,c,d,f,g,h,l,k){a.compressedTexSubImage2D(b,c,d,f,g,h,l,k)},readPixels:function(a,b,c,d,f,g,h,l){a.readPixels(b,c,d,f,g,h,l)},texImage2D:function(a,b,c,d,f,g,h,l,k,q){l!=null?a.texImage2D(b,c,d,f,g,h,l,k,q):a.texImage2D(b,c,d,f,g,h)},texSubImage2D:function(a,b,c,d,f,g,h,l,k,q){k!=null?a.texSubImage2D(b,
c,d,f,g,h,l,k,q):a.texSubImage2D(b,c,d,f,g,h,l)},uniformMatrix2fv:function(a,b,c,d){a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d){a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d){a.uniformMatrix4fv(b,c,d)},fromWebGL2RenderContext:function(a){return a},fromRenderContext:function(a){return a.webgl},fromGL:function(a){return y.context}},qp=function(a){};r["lime.graphics.cairo.Cairo"]=qp;qp.__name__="lime.graphics.cairo.Cairo";qp.__properties__={get_versionString:"get_versionString",
get_version:"get_version"};qp.get_version=function(){return 0};qp.get_versionString=function(){return""};qp.prototype={target:null,userData:null,handle:null,arc:function(a,b,c,d,f){},arcNegative:function(a,b,c,d,f){},clip:function(){},clipExtents:function(a,b,c,d){},clipPreserve:function(){},closePath:function(){},copyPage:function(){},curveTo:function(a,b,c,d,f,g){},fill:function(){},fillExtents:function(a,b,c,d){},fillPreserve:function(){},getOperator:function(){return 0},identityMatrix:function(){},
inClip:function(a,b){return!1},inFill:function(a,b){return!1},inStroke:function(a,b){return!1},lineTo:function(a,b){},mask:function(a){},maskSurface:function(a,b,c){},moveTo:function(a,b){},newPath:function(){},paint:function(){},paintWithAlpha:function(a){},popGroup:function(){return null},popGroupToSource:function(){},pushGroup:function(){},pushGroupWithContent:function(a){},recreate:function(a){},rectangle:function(a,b,c,d){},relCurveTo:function(a,b,c,d,f,g){},relLineTo:function(a,b){},relMoveTo:function(a,
b){},resetClip:function(){},restore:function(){},rotate:function(a){},save:function(){},scale:function(a,b){},setFontSize:function(a){},setOperator:function(a){return a},setSourceRGB:function(a,b,c){},setSourceRGBA:function(a,b,c,d){},setSourceSurface:function(a,b,c){},showGlyphs:function(a){},showPage:function(){},showText:function(a){},status:function(){return 0},stroke:function(){},strokeExtents:function(a,b,c,d){},strokePreserve:function(){},textPath:function(a){},transform:function(a){},translate:function(a,
b){},get_antialias:function(){return 0},set_antialias:function(a){return a},get_currentPoint:function(){return null},get_dash:function(){return[]},set_dash:function(a){return a},get_dashCount:function(){return 0},get_fillRule:function(){return 0},set_fillRule:function(a){return a},get_fontFace:function(){return 0},set_fontFace:function(a){return a},get_fontOptions:function(){return null},set_fontOptions:function(a){return a},get_groupTarget:function(){return 0},get_hasCurrentPoint:function(){return!1},
get_lineCap:function(){return 0},set_lineCap:function(a){return a},get_lineJoin:function(){return 0},set_lineJoin:function(a){return a},get_lineWidth:function(){return 0},set_lineWidth:function(a){return a},get_matrix:function(){return null},set_matrix:function(a){return a},get_miterLimit:function(){return 0},set_miterLimit:function(a){return a},get_source:function(){return 0},set_source:function(a){return a},get_target:function(){return 0},get_tolerance:function(){return 0},set_tolerance:function(a){return a},
__class__:qp,__properties__:{set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",
set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}};var cw=function(a,b,c){c==null&&(c=0);b==null&&(b=0);this.index=a;this.x=b;this.y=c};r["lime.graphics.cairo.CairoGlyph"]=cw;cw.__name__="lime.graphics.cairo.CairoGlyph";
cw.prototype={index:null,x:null,y:null,__class__:cw};var px={__properties__:{get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"},_new:function(a,b,c){return 0},create:function(a,b,c,d,f){return 0},fromImage:function(a){return null},get_data:function(a){return ui.fromFloat(0)},get_format:function(a){return 0},get_height:function(a){return 0},get_stride:function(a){return 0},get_width:function(a){return 0}},jv={__properties__:{set_matrix:"set_matrix",
get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"},_new:function(a){return a},addColorStopRGB:function(a,b,c,d,f){},addColorStopRGBA:function(a,b,c,d,f,g){},createForSurface:function(a){return 0},createLinear:function(a,b,c,d){return 0},createRadial:function(a,b,c,d,f,g){return 0},createRGB:function(a,b,c){return 0},createRGBA:function(a,b,c,d){return 0},get_colorStopCount:function(a){return 0},
get_extend:function(a){return 0},set_extend:function(a,b){return b},get_filter:function(a){return 0},set_filter:function(a,b){return b},get_matrix:function(a){return null},set_matrix:function(a,b){return b}},qx={flush:function(a){}},y=function(){};r["lime.graphics.opengl.GL"]=y;y.__name__="lime.graphics.opengl.GL";y.activeTexture=function(a){y.context.activeTexture(a)};y.attachShader=function(a,b){y.context.attachShader(a,b)};y.beginQuery=function(a,b){y.context.beginQuery(a,b)};y.beginTransformFeedback=
function(a){y.context.beginTransformFeedback(a)};y.bindAttribLocation=function(a,b,c){y.context.bindAttribLocation(a,b,c)};y.bindBuffer=function(a,b){y.context.bindBuffer(a,b)};y.bindBufferBase=function(a,b,c){y.context.bindBufferBase(a,b,c)};y.bindBufferRange=function(a,b,c,d,f){y.context.bindBufferRange(a,b,c,d,ui.fromFloat(f))};y.bindFramebuffer=function(a,b){y.context.bindFramebuffer(a,b)};y.bindRenderbuffer=function(a,b){y.context.bindRenderbuffer(a,b)};y.bindSampler=function(a,b){y.context.bindSampler(a,
b)};y.bindTexture=function(a,b){y.context.bindTexture(a,b)};y.bindTransformFeedback=function(a,b){y.context.bindTransformFeedback(a,b)};y.bindVertexArray=function(a){y.context.bindVertexArray(a)};y.blitFramebuffer=function(a,b,c,d,f,g,h,l,k,q){y.context.blitFramebuffer(a,b,c,d,f,g,h,l,k,q)};y.blendColor=function(a,b,c,d){y.context.blendColor(a,b,c,d)};y.blendEquation=function(a){y.context.blendEquation(a)};y.blendEquationSeparate=function(a,b){y.context.blendEquationSeparate(a,b)};y.blendFunc=function(a,
b){y.context.blendFunc(a,b)};y.blendFuncSeparate=function(a,b,c,d){y.context.blendFuncSeparate(a,b,c,d)};y.bufferDataWEBGL=function(a,b,c,d,f){var g=y.context;d!=null?g.bufferData(a,b,c,d,f):g.bufferData(a,b,c)};y.bufferSubDataWEBGL=function(a,b,c,d,f){var g=y.context;d!=null?g.bufferSubData(a,b,c,d,f):g.bufferSubData(a,b,c)};y.checkFramebufferStatus=function(a){return y.context.checkFramebufferStatus(a)};y.clear=function(a){y.context.clear(a)};y.clearBufferfi=function(a,b,c,d){y.context.clearBufferfi(a,
b,c,d)};y.clearBufferfvWEBGL=function(a,b,c,d){y.context.clearBufferfv(a,b,c,d)};y.clearBufferivWEBGL=function(a,b,c,d){y.context.clearBufferiv(a,b,c,d)};y.clearBufferuivWEBGL=function(a,b,c,d){y.context.clearBufferuiv(a,b,c,d)};y.clearColor=function(a,b,c,d){y.context.clearColor(a,b,c,d)};y.clearDepth=function(a){y.context.clearDepth(a)};y.clearStencil=function(a){y.context.clearStencil(a)};y.clientWaitSync=function(a,b,c){return y.context.clientWaitSync(a,b,c)};y.colorMask=function(a,b,c,d){y.context.colorMask(a,
b,c,d)};y.compileShader=function(a){y.context.compileShader(a)};y.compressedTexImage2DWEBGL=function(a,b,c,d,f,g,h,l,k){var q=y.context;l!=null?q.compressedTexImage2D(a,b,c,d,f,g,h,l,k):q.compressedTexImage2D(a,b,c,d,f,g,h)};y.compressedTexImage3DWEBGL=function(a,b,c,d,f,g,h,l,k,q){y.context.compressedTexImage3D(a,b,c,d,f,g,h,l,k,q)};y.compressedTexSubImage2DWEBGL=function(a,b,c,d,f,g,h,l,k,q){var w=y.context;k!=null?w.compressedTexSubImage2D(a,b,c,d,f,g,h,l,k,q):w.compressedTexSubImage2D(a,b,c,d,
f,g,h,l)};y.compressedTexSubImage3DWEBGL=function(a,b,c,d,f,g,h,l,k,q,w,v){y.context.compressedTexSubImage3D(a,b,c,d,f,g,h,l,k,q,w,v)};y.copyTexImage2D=function(a,b,c,d,f,g,h,l){y.context.copyTexImage2D(a,b,c,d,f,g,h,l)};y.copyTexSubImage2D=function(a,b,c,d,f,g,h,l){y.context.copyTexSubImage2D(a,b,c,d,f,g,h,l)};y.copyTexSubImage3D=function(a,b,c,d,f,g,h,l,k){y.context.copyTexSubImage3D(a,b,c,d,f,g,h,l,k)};y.createBuffer=function(){return y.context.createBuffer()};y.createFramebuffer=function(){return y.context.createFramebuffer()};
y.createProgram=function(){return y.context.createProgram()};y.createQuery=function(){return y.context.createQuery()};y.createRenderbuffer=function(){return y.context.createRenderbuffer()};y.createSampler=function(){return y.context.createSampler()};y.createShader=function(a){return y.context.createShader(a)};y.createTexture=function(){return y.context.createTexture()};y.createTransformFeedback=function(){return y.context.createTransformFeedback()};y.createVertexArray=function(){return y.context.createVertexArray()};
y.cullFace=function(a){y.context.cullFace(a)};y.deleteBuffer=function(a){y.context.deleteBuffer(a)};y.deleteFramebuffer=function(a){y.context.deleteFramebuffer(a)};y.deleteProgram=function(a){y.context.deleteProgram(a)};y.deleteQuery=function(a){y.context.deleteQuery(a)};y.deleteRenderbuffer=function(a){y.context.deleteRenderbuffer(a)};y.deleteSampler=function(a){y.context.deleteSampler(a)};y.deleteShader=function(a){y.context.deleteShader(a)};y.deleteSync=function(a){y.context.deleteSync(a)};y.deleteTexture=
function(a){y.context.deleteTexture(a)};y.deleteTransformFeedback=function(a){y.context.deleteTransformFeedback(a)};y.deleteVertexArray=function(a){y.context.deleteVertexArray(a)};y.depthFunc=function(a){y.context.depthFunc(a)};y.depthMask=function(a){y.context.depthMask(a)};y.depthRange=function(a,b){y.context.depthRange(a,b)};y.detachShader=function(a,b){y.context.detachShader(a,b)};y.disable=function(a){y.context.disable(a)};y.disableVertexAttribArray=function(a){y.context.disableVertexAttribArray(a)};
y.drawArrays=function(a,b,c){y.context.drawArrays(a,b,c)};y.drawArraysInstanced=function(a,b,c,d){y.context.drawArraysInstanced(a,b,c,d)};y.drawBuffers=function(a){y.context.drawBuffers(a)};y.drawElements=function(a,b,c,d){y.context.drawElements(a,b,c,d)};y.drawElementsInstanced=function(a,b,c,d,f){y.context.drawElementsInstanced(a,b,c,d,f)};y.drawRangeElements=function(a,b,c,d,f,g){y.context.drawRangeElements(a,b,c,d,f,g)};y.enable=function(a){y.context.enable(a)};y.enableVertexAttribArray=function(a){y.context.enableVertexAttribArray(a)};
y.endQuery=function(a){y.context.endQuery(a)};y.endTransformFeedback=function(){y.context.endTransformFeedback()};y.fenceSync=function(a,b){return y.context.fenceSync(a,b)};y.finish=function(){y.context.finish()};y.flush=function(){y.context.flush()};y.framebufferRenderbuffer=function(a,b,c,d){y.context.framebufferRenderbuffer(a,b,c,d)};y.framebufferTexture2D=function(a,b,c,d,f){y.context.framebufferTexture2D(a,b,c,d,f)};y.framebufferTextureLayer=function(a,b,c,d,f){y.context.framebufferTextureLayer(a,
b,c,d,f)};y.frontFace=function(a){y.context.frontFace(a)};y.generateMipmap=function(a){y.context.generateMipmap(a)};y.getActiveAttrib=function(a,b){return y.context.getActiveAttrib(a,b)};y.getActiveUniform=function(a,b){return y.context.getActiveUniform(a,b)};y.getActiveUniformBlockName=function(a,b){return y.context.getActiveUniformBlockName(a,b)};y.getActiveUniformBlockParameter=function(a,b,c){return y.context.getActiveUniformBlockParameter(a,b,c)};y.getActiveUniforms=function(a,b,c){return y.context.getActiveUniforms(a,
b,c)};y.getAttachedShaders=function(a){return y.context.getAttachedShaders(a)};y.getAttribLocation=function(a,b){return y.context.getAttribLocation(a,b)};y.getBufferParameter=function(a,b){return y.context.getBufferParameter(a,b)};y.getBufferSubDataWEBGL=function(a,b,c,d,f){var g=y.context;d!=null?g.getBufferSubData(a,b,c,d,f):g.getBufferSubData(a,b,c)};y.getContextAttributes=function(){return y.context.getContextAttributes()};y.getError=function(){return y.context.getError()};y.getExtension=function(a){return y.context.getExtension(a)};
y.getFragDataLocation=function(a,b){return y.context.getFragDataLocation(a,b)};y.getFramebufferAttachmentParameter=function(a,b,c){return y.context.getFramebufferAttachmentParameter(a,b,c)};y.getIndexedParameter=function(a,b){return y.context.getIndexedParameter(a,b)};y.getInternalformatParameter=function(a,b,c){return y.context.getInternalformatParameter(a,b,c)};y.getParameter=function(a){return y.context.getParameter(a)};y.getProgramInfoLog=function(a){return y.context.getProgramInfoLog(a)};y.getProgramParameter=
function(a,b){return y.context.getProgramParameter(a,b)};y.getQuery=function(a,b){return y.context.getQuery(a,b)};y.getQueryParameter=function(a,b){return y.context.getQueryParameter(a,b)};y.getRenderbufferParameter=function(a,b){return y.context.getRenderbufferParameter(a,b)};y.getSamplerParameter=function(a,b){return y.context.getSamplerParameter(a,b)};y.getShaderInfoLog=function(a){return y.context.getShaderInfoLog(a)};y.getShaderParameter=function(a,b){return y.context.getShaderParameter(a,b)};
y.getShaderPrecisionFormat=function(a,b){return y.context.getShaderPrecisionFormat(a,b)};y.getShaderSource=function(a){return y.context.getShaderSource(a)};y.getSupportedExtensions=function(){return y.context.getSupportedExtensions()};y.getSyncParameter=function(a,b){return y.context.getSyncParameter(a,b)};y.getTexParameter=function(a,b){return y.context.getTexParameter(a,b)};y.getTransformFeedbackVarying=function(a,b){return y.context.getTransformFeedbackVarying(a,b)};y.getUniform=function(a,b){return y.context.getUniform(a,
b)};y.getUniformBlockIndex=function(a,b){return y.context.getUniformBlockIndex(a,b)};y.getUniformIndices=function(a,b){return y.context.getUniformIndices(a,b)};y.getUniformLocation=function(a,b){return y.context.getUniformLocation(a,b)};y.getVertexAttrib=function(a,b){return y.context.getVertexAttrib(a,b)};y.getVertexAttribOffset=function(a,b){return ui.fromFloat(y.context.getVertexAttribOffset(a,b))};y.hint=function(a,b){y.context.hint(a,b)};y.invalidateFramebuffer=function(a,b){y.context.invalidateFramebuffer(a,
b)};y.invalidateSubFramebuffer=function(a,b,c,d,f,g){y.context.invalidateSubFramebuffer(a,b,c,d,f,g)};y.isBuffer=function(a){return y.context.isBuffer(a)};y.isContextLost=function(){return y.context.isContextLost()};y.isEnabled=function(a){return y.context.isEnabled(a)};y.isFramebuffer=function(a){return y.context.isFramebuffer(a)};y.isProgram=function(a){return y.context.isProgram(a)};y.isQuery=function(a){return y.context.isQuery(a)};y.isRenderbuffer=function(a){return y.context.isRenderbuffer(a)};
y.isSampler=function(a){return y.context.isSampler(a)};y.isShader=function(a){return y.context.isShader(a)};y.isSync=function(a){return y.context.isSync(a)};y.isTexture=function(a){return y.context.isTexture(a)};y.isTransformFeedback=function(a){return y.context.isTransformFeedback(a)};y.isVertexArray=function(a){return y.context.isVertexArray(a)};y.lineWidth=function(a){y.context.lineWidth(a)};y.linkProgram=function(a){y.context.linkProgram(a)};y.pauseTransformFeedback=function(){y.context.pauseTransformFeedback()};
y.pixelStorei=function(a,b){y.context.pixelStorei(a,b)};y.polygonOffset=function(a,b){y.context.polygonOffset(a,b)};y.readBuffer=function(a){y.context.readBuffer(a)};y.readPixelsWEBGL=function(a,b,c,d,f,g,h,l){var k=y.context;l!=null?k.readPixels(a,b,c,d,f,g,h,l):k.readPixels(a,b,c,d,f,g,h)};y.renderbufferStorage=function(a,b,c,d){y.context.renderbufferStorage(a,b,c,d)};y.renderbufferStorageMultisample=function(a,b,c,d,f){y.context.renderbufferStorageMultisample(a,b,c,d,f)};y.resumeTransformFeedback=
function(){y.context.resumeTransformFeedback()};y.sampleCoverage=function(a,b){y.context.sampleCoverage(a,b)};y.samplerParameterf=function(a,b,c){y.context.samplerParameterf(a,b,c)};y.samplerParameteri=function(a,b,c){y.context.samplerParameteri(a,b,c)};y.scissor=function(a,b,c,d){y.context.scissor(a,b,c,d)};y.shaderSource=function(a,b){y.context.shaderSource(a,b)};y.stencilFunc=function(a,b,c){y.context.stencilFunc(a,b,c)};y.stencilFuncSeparate=function(a,b,c,d){y.context.stencilFuncSeparate(a,b,
c,d)};y.stencilMask=function(a){y.context.stencilMask(a)};y.stencilMaskSeparate=function(a,b){y.context.stencilMaskSeparate(a,b)};y.stencilOp=function(a,b,c){y.context.stencilOp(a,b,c)};y.stencilOpSeparate=function(a,b,c,d){y.context.stencilOpSeparate(a,b,c,d)};y.texImage2DWEBGL=function(a,b,c,d,f,g,h,l,k,q){var w=y.context;q!=null?w.texImage2D(a,b,c,d,f,g,h,l,k,q):h!=null?w.texImage2D(a,b,c,d,f,g,h,l,k):w.texImage2D(a,b,c,d,f,g)};y.texImage3DWEBGL=function(a,b,c,d,f,g,h,l,k,q,w){y.context.texImage3D(a,
b,c,d,f,g,h,l,k,q,w)};y.texStorage2D=function(a,b,c,d,f){y.context.texStorage2D(a,b,c,d,f)};y.texStorage3D=function(a,b,c,d,f,g){y.context.texStorage3D(a,b,c,d,f,g)};y.texParameterf=function(a,b,c){y.context.texParameterf(a,b,c)};y.texParameteri=function(a,b,c){y.context.texParameteri(a,b,c)};y.texSubImage2DWEBGL=function(a,b,c,d,f,g,h,l,k,q){var w=y.context;q!=null?w.texSubImage2D(a,b,c,d,f,g,h,l,k,q):l!=null?w.texSubImage2D(a,b,c,d,f,g,h,l,k):w.texSubImage2D(a,b,c,d,f,g,h)};y.texSubImage3DWEBGL=
function(a,b,c,d,f,g,h,l,k,q,w,v){y.context.texSubImage3D(a,b,c,d,f,g,h,l,k,q,w,v)};y.transformFeedbackVaryings=function(a,b,c){y.context.transformFeedbackVaryings(a,b,c)};y.uniform1f=function(a,b){y.context.uniform1f(a,b)};y.uniform1fvWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform1fv(a,b,c,d):f.uniform1fv(a,b)};y.uniform1i=function(a,b){y.context.uniform1i(a,b)};y.uniform1ivWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform1iv(a,b,c,d):f.uniform1iv(a,b)};y.uniform1ui=function(a,
b){y.context.uniform1ui(a,b)};y.uniform1uivWEBGL=function(a,b,c,d){y.context.uniform1uiv(a,b,c,d)};y.uniform2f=function(a,b,c){y.context.uniform2f(a,b,c)};y.uniform2fvWEBGL=function(a,b,c,d){ex.uniform2fv(y.context,a,b,c,d)};y.uniform2i=function(a,b,c){y.context.uniform2i(a,b,c)};y.uniform2ivWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform2iv(a,b,c,d):f.uniform2iv(a,b)};y.uniform2ui=function(a,b,c){y.context.uniform2ui(a,b,c)};y.uniform2uivWEBGL=function(a,b,c,d){y.context.uniform2uiv(a,
b,c,d)};y.uniform3f=function(a,b,c,d){y.context.uniform3f(a,b,c,d)};y.uniform3fvWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform3fv(a,b,c,d):f.uniform3fv(a,b)};y.uniform3i=function(a,b,c,d){y.context.uniform3i(a,b,c,d)};y.uniform3ivWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform3iv(a,b,c,d):f.uniform3iv(a,b)};y.uniform3ui=function(a,b,c,d){y.context.uniform3ui(a,b,c,d)};y.uniform3uivWEBGL=function(a,b,c,d){y.context.uniform3uiv(a,b,c,d)};y.uniform4f=function(a,b,c,d,f){y.context.uniform4f(a,
b,c,d,f)};y.uniform4fvWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform4fv(a,b,c,d):f.uniform4fv(a,b)};y.uniform4i=function(a,b,c,d,f){y.context.uniform4i(a,b,c,d,f)};y.uniform4ivWEBGL=function(a,b,c,d){var f=y.context;c!=null?f.uniform4iv(a,b,c,d):f.uniform4iv(a,b)};y.uniform4ui=function(a,b,c,d,f){y.context.uniform4ui(a,b,c,d,f)};y.uniform4uivWEBGL=function(a,b,c,d){y.context.uniform4uiv(a,b,c,d)};y.uniformBlockBinding=function(a,b,c){y.context.uniformBlockBinding(a,b,c)};y.uniformMatrix2fvWEBGL=
function(a,b,c,d,f){var g=y.context;d!=null?g.uniformMatrix2fv(a,b,c,d,f):g.uniformMatrix2fv(a,b,c)};y.uniformMatrix2x3fvWEBGL=function(a,b,c,d,f){y.context.uniformMatrix2x3fv(a,b,c,d,f)};y.uniformMatrix2x4fvWEBGL=function(a,b,c,d,f){y.context.uniformMatrix2x4fv(a,b,c,d,f)};y.uniformMatrix3fvWEBGL=function(a,b,c,d,f){var g=y.context;d!=null?g.uniformMatrix3fv(a,b,c,d,f):g.uniformMatrix3fv(a,b,c)};y.uniformMatrix3x2fvWEBGL=function(a,b,c,d,f){y.context.uniformMatrix3x2fv(a,b,c,d,f)};y.uniformMatrix3x4fvWEBGL=
function(a,b,c,d,f){y.context.uniformMatrix3x4fv(a,b,c,d,f)};y.uniformMatrix4fvWEBGL=function(a,b,c,d,f){var g=y.context;d!=null?g.uniformMatrix4fv(a,b,c,d,f):g.uniformMatrix4fv(a,b,c)};y.uniformMatrix4x2fvWEBGL=function(a,b,c,d,f){y.context.uniformMatrix4x2fv(a,b,c,d,f)};y.uniformMatrix4x3fvWEBGL=function(a,b,c,d,f){y.context.uniformMatrix4x3fv(a,b,c,d,f)};y.useProgram=function(a){y.context.useProgram(a)};y.validateProgram=function(a){y.context.validateProgram(a)};y.vertexAttrib1f=function(a,b){y.context.vertexAttrib1f(a,
b)};y.vertexAttrib1fv=function(a,b){y.context.vertexAttrib1fv(a,b)};y.vertexAttrib1fvWEBGL=function(a,b){y.context.vertexAttrib1fv(a,b)};y.vertexAttrib2f=function(a,b,c){y.context.vertexAttrib2f(a,b,c)};y.vertexAttrib2fv=function(a,b){y.context.vertexAttrib2fv(a,b)};y.vertexAttrib2fvWEBGL=function(a,b){y.context.vertexAttrib2fv(a,b)};y.vertexAttrib3f=function(a,b,c,d){y.context.vertexAttrib3f(a,b,c,d)};y.vertexAttrib3fv=function(a,b){y.context.vertexAttrib3fv(a,b)};y.vertexAttrib3fvWEBGL=function(a,
b){y.context.vertexAttrib3fv(a,b)};y.vertexAttrib4f=function(a,b,c,d,f){y.context.vertexAttrib4f(a,b,c,d,f)};y.vertexAttrib4fv=function(a,b){y.context.vertexAttrib4fv(a,b)};y.vertexAttrib4fvWEBGL=function(a,b){y.context.vertexAttrib4fv(a,b)};y.vertexAttribDivisor=function(a,b){y.context.vertexAttribDivisor(a,b)};y.vertexAttribI4i=function(a,b,c,d,f){y.context.vertexAttribI4i(a,b,c,d,f)};y.vertexAttribI4iv=function(a,b){y.context.vertexAttribI4iv(a,b)};y.vertexAttribI4ivWEBGL=function(a,b){y.context.vertexAttribI4iv(a,
b)};y.vertexAttribI4ui=function(a,b,c,d,f){y.context.vertexAttribI4ui(a,b,c,d,f)};y.vertexAttribI4uiv=function(a,b){y.context.vertexAttribI4uiv(a,b)};y.vertexAttribI4uivWEBGL=function(a,b){y.context.vertexAttribI4uiv(a,b)};y.vertexAttribIPointer=function(a,b,c,d,f){y.context.vertexAttribIPointer(a,b,c,d,f)};y.vertexAttribPointer=function(a,b,c,d,f,g){y.context.vertexAttribPointer(a,b,c,d,f,g)};y.viewport=function(a,b,c,d){y.context.viewport(a,b,c,d)};y.waitSync=function(a,b,c){y.context.waitSync(a,
b,c)};y.__getObjectID=function(a){return a==null?0:a.id};var dw=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};r["lime.graphics.opengl.ext.KHR_debug"]=dw;dw.__name__="lime.graphics.opengl.ext.KHR_debug";dw.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__:dw};var gf={__properties__:{set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",
set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"},_new:function(a){if(a==null||a.length!=20)a=gf.__identity,a=a!=null?new Float32Array(a):
null;return a},clone:function(a){a=Mk.toArrayBufferView(a);a=a!=null?new Float32Array(a):null;return gf._new(a)},concat:function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]},copyFrom:function(a,b){a.set(b)},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=0;a[6]=1;a[7]=0;a[8]=0;a[9]=0;a[10]=0;a[11]=0;a[12]=1;a[13]=0;a[14]=0;a[15]=0;a[16]=0;a[17]=0;a[18]=1;a[19]=0},getAlphaTable:function(a){gf.__alphaTable==null&&(gf.__alphaTable=new Uint8Array(256));gf.__alphaTable[0]=0;for(var b=
1;b<256;){var c=b++;var d=Math.floor(c*a[18]+a[19]*255);d>255&&(d=255);d<0&&(d=0);gf.__alphaTable[c]=d}return gf.__alphaTable},getBlueTable:function(a){gf.__blueTable==null&&(gf.__blueTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[12]+a[14]*255);b>255&&(b=255);b<0&&(b=0);gf.__blueTable[d]=b}return gf.__blueTable},getGreenTable:function(a){gf.__greenTable==null&&(gf.__greenTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[6]+a[9]*255);b>255&&(b=
255);b<0&&(b=0);gf.__greenTable[d]=b}return gf.__greenTable},getRedTable:function(a){gf.__redTable==null&&(gf.__redTable=new Uint8Array(256));for(var b,c=0;c<256;){var d=c++;b=Math.floor(d*a[0]+a[4]*255);b>255&&(b=255);b<0&&(b=0);gf.__redTable[d]=b}return gf.__redTable},__toFlashColorTransform:function(a){return null},get_alphaMultiplier:function(a){return a[18]},set_alphaMultiplier:function(a,b){return a[18]=b},get_alphaOffset:function(a){return a[19]*255},set_alphaOffset:function(a,b){return a[19]=
b/255},get_blueMultiplier:function(a){return a[12]},set_blueMultiplier:function(a,b){return a[12]=b},get_blueOffset:function(a){return a[14]*255},set_blueOffset:function(a,b){return a[14]=b/255},get_color:function(a){return(a[4]*255|0)<<16|(a[9]*255|0)<<8|a[14]*255|0},set_color:function(a,b){a[4]=(b>>16&255)/255;a[9]=(b>>8&255)/255;a[14]=(b&255)/255;a[0]=0;a[6]=0;a[12]=0;return gf.get_color(a)},get_greenMultiplier:function(a){return a[6]},set_greenMultiplier:function(a,b){return a[6]=b},get_greenOffset:function(a){return a[9]*
255},set_greenOffset:function(a,b){return a[9]=b/255},get_redMultiplier:function(a){return a[0]},set_redMultiplier:function(a,b){return a[0]=b},get_redOffset:function(a){return a[4]*255},set_redOffset:function(a,b){return a[4]=b/255},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},Dt=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g};r["lime.math.CairoMatrix3"]=
Dt;Dt.__name__="lime.math.CairoMatrix3";Dt.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__class__:Dt};var ib={__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"},_new:function(a){if(a==null||a.length!=16)a=ib.__identity,a=a!=null?new Float32Array(a):null;return a},append:function(a,b){var c=a[0],d=a[4],f=a[8],g=a[12],h=a[1],l=a[5],k=a[9],q=a[13],w=a[2],v=a[6],z=a[10],n=a[14],E=a[3],H=a[7],J=a[11],Q=a[15],T=ib.get(b,0),fa=ib.get(b,4),
da=ib.get(b,8),pa=ib.get(b,12),xa=ib.get(b,1),Ua=ib.get(b,5),Sa=ib.get(b,9),Ka=ib.get(b,13),hb=ib.get(b,2),Ra=ib.get(b,6),Jb=ib.get(b,10),vb=ib.get(b,14),Cb=ib.get(b,3),pc=ib.get(b,7),qd=ib.get(b,11);b=ib.get(b,15);a[0]=c*T+h*fa+w*da+E*pa;a[1]=c*xa+h*Ua+w*Sa+E*Ka;a[2]=c*hb+h*Ra+w*Jb+E*vb;a[3]=c*Cb+h*pc+w*qd+E*b;a[4]=d*T+l*fa+v*da+H*pa;a[5]=d*xa+l*Ua+v*Sa+H*Ka;a[6]=d*hb+l*Ra+v*Jb+H*vb;a[7]=d*Cb+l*pc+v*qd+H*b;a[8]=f*T+k*fa+z*da+J*pa;a[9]=f*xa+k*Ua+z*Sa+J*Ka;a[10]=f*hb+k*Ra+z*Jb+J*vb;a[11]=f*Cb+k*pc+
z*qd+J*b;a[12]=g*T+q*fa+n*da+Q*pa;a[13]=g*xa+q*Ua+n*Sa+Q*Ka;a[14]=g*hb+q*Ra+n*Jb+Q*vb;a[15]=g*Cb+q*pc+n*qd+Q*b},appendRotation:function(a,b,c,d){b=ib.__getAxisRotation(a,c.x,c.y,c.z,b);d!=null&&ib.appendTranslation(b,d.x,d.y,d.z);ib.append(a,b)},appendScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=b!=null?new Float32Array(b):null;ib.append(a,ib._new(b))},appendTranslation:function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d},clone:function(a){a=Mk.toArrayBufferView(a);a=a!=null?new Float32Array(a):
null;return ib._new(a)},copyColumnFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[1]=c.y;a[2]=c.z;a[3]=c.w;break;case 1:a[4]=c.x;a[5]=c.y;a[6]=c.z;a[7]=c.w;break;case 2:a[8]=c.x;a[9]=c.y;a[10]=c.z;a[11]=c.w;break;case 3:a[12]=c.x;a[13]=c.y;a[14]=c.z;a[15]=c.w;break;default:Mb.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:187,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnFrom"})}},copyColumnTo:function(a,b,c){switch(b){case 0:c.x=a[0];
c.y=a[1];c.z=a[2];c.w=a[3];break;case 1:c.x=a[4];c.y=a[5];c.z=a[6];c.w=a[7];break;case 2:c.x=a[8];c.y=a[9];c.z=a[10];c.w=a[11];break;case 3:c.x=a[12];c.y=a[13];c.z=a[14];c.w=a[15];break;default:Mb.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:225,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnTo"})}},copyFrom:function(a,b){a.set(b)},copyRowFrom:function(a,b,c){switch(b){case 0:a[0]=c.x;a[4]=c.y;a[8]=c.z;a[12]=c.w;break;case 1:a[1]=c.x;
a[5]=c.y;a[9]=c.z;a[13]=c.w;break;case 2:a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=c.w;break;case 3:a[3]=c.x;a[7]=c.y;a[11]=c.z;a[15]=c.w;break;default:Mb.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:272,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowFrom"})}},copyRowTo:function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[4];c.z=a[8];c.w=a[12];break;case 1:c.x=a[1];c.y=a[5];c.z=a[9];c.w=a[13];break;case 2:c.x=a[2];c.y=a[6];c.z=a[10];c.w=a[14];break;case 3:c.x=
a[3];c.y=a[7];c.z=a[11];c.w=a[15];break;default:Mb.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:310,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowTo"})}},create2D:function(a,b,c,d,f,g,h){h==null&&(h=0);g==null&&(g=0);a[0]=b;a[1]=c;a[2]=0;a[3]=0;a[4]=d;a[5]=f;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=g;a[13]=h;a[14]=0;a[15]=1},createOrtho:function(a,b,c,d,f,g,h){var l=1/(c-b),k=1/(f-d),q=1/(h-g);a[0]=2*l;a[1]=0;a[2]=0;a[3]=0;a[4]=
0;a[5]=2*k;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=-2*q;a[11]=0;a[12]=-(b+c)*l;a[13]=-(d+f)*k;a[14]=-(g+h)*q;a[15]=1},createPerspective:function(a,b,c,d,f){if(c>-1E-7&&c<1E-7)throw la.thrown("Aspect ratio may not be 0");b*=d;var g=-b;c*=b;var h=-c;a[0]=2*d/(c-h);a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*d/(b-g);a[6]=0;a[7]=0;a[8]=(c+h)/(c-h);a[9]=(b+g)/(b-g);a[10]=-(f+d)/(f-d);a[11]=-1;a[12]=0;a[13]=0;a[14]=-2*f*d/(f-d);a[15]=1},deltaTransformVector:function(a,b,c){c==null&&(c=new Wd);var d=b.x,f=b.y;b=b.z;c.x=
d*a[0]+f*a[4]+b*a[8]+a[3];c.y=d*a[1]+f*a[5]+b*a[9]+a[7];c.z=d*a[2]+f*a[6]+b*a[10]+a[11];return c},fromMatrix3:function(a){var b=ib._new();ib.create2D(b,a[0],a[1],a[3],a[4],a[6],a[7]);return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1},interpolate:function(a,b,c,d){d==null&&(d=ib._new());for(var f=0;f<16;){var g=f++;ib.set(d,g,ib.get(a,g)+(ib.get(b,g)-ib.get(a,g))*c)}return d},interpolateTo:function(a,
b,c){for(var d=0;d<16;){var f=d++;a[f]+=(ib.get(b,f)-a[f])*c}},invert:function(a){var b=ib.get_determinant(a),c=Math.abs(b)>1E-11;if(c){b=1/b;var d=a[0],f=a[4],g=a[8],h=a[12],l=a[1],k=a[5],q=a[9],w=a[13],v=a[2],z=a[6],n=a[10],E=a[14],H=a[3],J=a[7],Q=a[11],T=a[15];a[0]=b*(k*(n*T-E*Q)-q*(z*T-E*J)+w*(z*Q-n*J));a[1]=-b*(l*(n*T-E*Q)-q*(v*T-E*H)+w*(v*Q-n*H));a[2]=b*(l*(z*T-E*J)-k*(v*T-E*H)+w*(v*J-z*H));a[3]=-b*(l*(z*Q-n*J)-k*(v*Q-n*H)+q*(v*J-z*H));a[4]=-b*(f*(n*T-E*Q)-g*(z*T-E*J)+h*(z*Q-n*J));a[5]=b*(d*
(n*T-E*Q)-g*(v*T-E*H)+h*(v*Q-n*H));a[6]=-b*(d*(z*T-E*J)-f*(v*T-E*H)+h*(v*J-z*H));a[7]=b*(d*(z*Q-n*J)-f*(v*Q-n*H)+g*(v*J-z*H));a[8]=b*(f*(q*T-w*Q)-g*(k*T-w*J)+h*(k*Q-q*J));a[9]=-b*(d*(q*T-w*Q)-g*(l*T-w*H)+h*(l*Q-q*H));a[10]=b*(d*(k*T-w*J)-f*(l*T-w*H)+h*(l*J-k*H));a[11]=-b*(d*(k*Q-q*J)-f*(l*Q-q*H)+g*(l*J-k*H));a[12]=-b*(f*(q*E-w*n)-g*(k*E-w*z)+h*(k*n-q*z));a[13]=b*(d*(q*E-w*n)-g*(l*E-w*v)+h*(l*n-q*v));a[14]=-b*(d*(k*E-w*z)-f*(l*E-w*v)+h*(l*z-k*v));a[15]=b*(d*(k*n-q*z)-f*(l*n-q*v)+g*(l*z-k*v))}return c},
pointAt:function(a,b,c,d){c==null&&(c=new Wd(0,0,1));d==null&&(d=new Wd(0,1,0));var f=null;f==null&&(f=new Wd);f.x=b.x-c.x;f.y=b.y-c.y;f.z=b.z-c.z;c=f;d=new Wd(d.x,d.y,d.z,d.w);f=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);f!=0&&(c.x/=f,c.y/=f,c.z/=f);f=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z);f!=0&&(d.x/=f,d.y/=f,d.z/=f);var g=new Wd(c.x,c.y,c.z,c.w);f=d.x*c.x+d.y*c.y+d.z*c.z;g.x*=f;g.y*=f;g.z*=f;f=null;f==null&&(f=new Wd);f.x=d.x-g.x;f.y=d.y-g.y;f.z=d.z-g.z;d=f;Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)>0?(f=Math.sqrt(d.x*
d.x+d.y*d.y+d.z*d.z),f!=0&&(d.x/=f,d.y/=f,d.z/=f)):d=c.x!=0?new Wd(-c.y,c.x,0):new Wd(1,0,0);f=null;f==null&&(f=new Wd);g=d.z*c.x-d.x*c.z;var h=d.x*c.y-d.y*c.x;f.x=d.y*c.z-d.z*c.y;f.y=g;f.z=h;f.w=1;g=f;f=Math.sqrt(g.x*g.x+g.y*g.y+g.z*g.z);f!=0&&(g.x/=f,g.y/=f,g.z/=f);a[0]=g.x;a[4]=g.y;a[8]=g.z;a[12]=0;a[1]=d.x;a[5]=d.y;a[9]=d.z;a[13]=0;a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=0;a[3]=b.x;a[7]=b.y;a[11]=b.z;a[15]=1},prepend:function(a,b){var c=ib.get(b,0),d=ib.get(b,4),f=ib.get(b,8),g=ib.get(b,12),h=ib.get(b,
1),l=ib.get(b,5),k=ib.get(b,9),q=ib.get(b,13),w=ib.get(b,2),v=ib.get(b,6),z=ib.get(b,10),n=ib.get(b,14),E=ib.get(b,3),H=ib.get(b,7),J=ib.get(b,11);b=ib.get(b,15);var Q=a[0],T=a[4],fa=a[8],da=a[12],pa=a[1],xa=a[5],Ua=a[9],Sa=a[13],Ka=a[2],hb=a[6],Ra=a[10],Jb=a[14],vb=a[3],Cb=a[7],pc=a[11],qd=a[15];a[0]=c*Q+h*T+w*fa+E*da;a[1]=c*pa+h*xa+w*Ua+E*Sa;a[2]=c*Ka+h*hb+w*Ra+E*Jb;a[3]=c*vb+h*Cb+w*pc+E*qd;a[4]=d*Q+l*T+v*fa+H*da;a[5]=d*pa+l*xa+v*Ua+H*Sa;a[6]=d*Ka+l*hb+v*Ra+H*Jb;a[7]=d*vb+l*Cb+v*pc+H*qd;a[8]=f*
Q+k*T+z*fa+J*da;a[9]=f*pa+k*xa+z*Ua+J*Sa;a[10]=f*Ka+k*hb+z*Ra+J*Jb;a[11]=f*vb+k*Cb+z*pc+J*qd;a[12]=g*Q+q*T+n*fa+b*da;a[13]=g*pa+q*xa+n*Ua+b*Sa;a[14]=g*Ka+q*hb+n*Ra+b*Jb;a[15]=g*vb+q*Cb+n*pc+b*qd},prependRotation:function(a,b,c,d){b=ib.__getAxisRotation(a,c.x,c.y,c.z,b);d!=null&&ib.appendTranslation(b,d.x,d.y,d.z);ib.prepend(a,b)},prependScale:function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=b!=null?new Float32Array(b):null;ib.prepend(a,ib._new(b))},prependTranslation:function(a,b,c,d){var f=
ib._new();ib.set_position(f,new Wd(b,c,d));ib.prepend(a,f)},transformVector:function(a,b,c){c==null&&(c=new Wd);var d=b.x,f=b.y;b=b.z;c.x=d*a[0]+f*a[4]+b*a[8]+a[12];c.y=d*a[1]+f*a[5]+b*a[9]+a[13];c.z=d*a[2]+f*a[6]+b*a[10]+a[14];c.w=d*a[3]+f*a[7]+b*a[11]+a[15];return c},transformVectors:function(a,b,c){for(var d=0,f,g,h;d+3<=b.length;)f=b[d],g=b[d+1],h=b[d+2],c[d]=f*a[0]+g*a[4]+h*a[8]+a[12],c[d+1]=f*a[1]+g*a[5]+h*a[9]+a[13],c[d+2]=f*a[2]+g*a[6]+h*a[10]+a[14],d+=3},transpose:function(a){var b=a[1];
a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b},__getAxisRotation:function(a,b,c,d,f){a=ib._new();b=new Wd(b,c,d);f=Math.PI/180*-f;d=Math.cos(f);f=Math.sin(f);c=1-d;ib.set(a,0,d+b.x*b.x*c);ib.set(a,5,d+b.y*b.y*c);ib.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var g=b.z*f;ib.set(a,4,d+g);ib.set(a,1,d-g);d=b.x*b.z*c;g=b.y*f;ib.set(a,8,d-g);ib.set(a,2,d+g);d=b.y*b.z*c;g=b.x*f;ib.set(a,9,d+g);ib.set(a,6,d-g);return a},
__swap:function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},get_determinant:function(a){return(a[0]*a[5]-a[4]*a[1])*(a[10]*a[15]-a[14]*a[11])-(a[0]*a[9]-a[8]*a[1])*(a[6]*a[15]-a[14]*a[7])+(a[0]*a[13]-a[12]*a[1])*(a[6]*a[11]-a[10]*a[7])+(a[4]*a[9]-a[8]*a[5])*(a[2]*a[15]-a[14]*a[3])-(a[4]*a[13]-a[12]*a[5])*(a[2]*a[11]-a[10]*a[3])+(a[8]*a[13]-a[12]*a[9])*(a[2]*a[7]-a[6]*a[3])},get_position:function(a){return new Wd(a[12],a[13],a[14])},set_position:function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b},get:function(a,
b){return a[b]},set:function(a,b,c){return a[b]=c}},U={__properties__:{set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a){a==null&&(a=0);return a},create:function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255},multiplyAlpha:function(a){(a&255)!=0&&(a&255)!=255&&(U.a16=U.__alpha16[a&255])},readUInt8:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);switch(d){case 0:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<
8|b[c+3]&255;break;case 1:a=(b[c+1]&255)<<24|(b[c+2]&255)<<16|(b[c+3]&255)<<8|b[c]&255;break;case 2:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255}f&&(a&255)!=0&&(a&255)!=255&&(U.unmult=255/(a&255))},set:function(a,b,c,d,f){},unmultiplyAlpha:function(a){(a&255)!=0&&(a&255)!=255&&(U.unmult=255/(a&255))},writeUInt8:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);f&&((a&255)==0?a!=0&&(a=0):(a&255)!=255&&(U.a16=U.__alpha16[a&255],a=((a>>>24&255)*U.a16>>16&255)<<24|((a>>>16&255)*U.a16>>
16&255)<<16|((a>>>8&255)*U.a16>>16&255)<<8|a&255));switch(d){case 0:b[c]=a>>>24&255;b[c+1]=a>>>16&255;b[c+2]=a>>>8&255;b[c+3]=a&255;break;case 1:b[c]=a&255;b[c+1]=a>>>24&255;b[c+2]=a>>>16&255;b[c+3]=a>>>8&255;break;case 2:b[c]=a>>>8&255,b[c+1]=a>>>16&255,b[c+2]=a>>>24&255,b[c+3]=a&255}},__fromARGB:function(a){return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255},__fromBGRA:function(a){return(a>>>8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255},get_a:function(a){return a&255},set_a:function(a,
b){return b},get_b:function(a){return a>>>8&255},set_b:function(a,b){return b},get_g:function(a){return a>>>16&255},set_g:function(a,b){return b},get_r:function(a){return a>>>24&255},set_r:function(a,b){return b}},We=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};r["lime.math.Rectangle"]=We;We.__name__="lime.math.Rectangle";We.prototype={height:null,width:null,x:null,y:null,clone:function(){return new We(this.x,this.y,this.width,
this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.containsVector(a)},containsRect:function(a){return a.width<=0||a.height<=0?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},containsVector:function(a){return this.contains(a.x,a.y)},copyFrom:function(a){this.x=a.x;this.y=
a.y;this.width=a.width;this.height=a.height},equals:function(a){return a!=null&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=a*2;this.y-=b;this.height+=b*2},inflateVector:function(a){this.inflate(a.x,a.y)},intersection:function(a,b){b==null&&(b=new We);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();if(d<=c)return b.setEmpty(),b;var f=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?
a.get_bottom():this.get_bottom();if(a<=f)return b.setEmpty(),b;b.x=c;b.y=f;b.width=d-c;b.height=a-f;return b},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return this.width<=0?!0:this.height<=0},offset:function(a,b){this.x+=a;this.y+=b},offsetVector:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=
this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},union:function(a,b){b==null&&(b=new We);if(this.width==0||this.height==0)b.copyFrom(a);else if(a.width==0||a.height==0)b.copyFrom(this);else{var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f)}return b},__toFlashRectangle:function(){return null},
get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Ff(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new Ff(this.width,
this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new Ff(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:We,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",
get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var Ff=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};r["lime.math.Vector2"]=Ff;Ff.__name__="lime.math.Vector2";Ff.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Ff.interpolate=function(a,b,c,d){d==null&&(d=new Ff);d.x=b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};Ff.polar=function(a,b,c){c==null&&(c=new Ff);var d=a*Math.sin(b);
c.x=a*Math.cos(b);c.y=d;return c};Ff.prototype={x:null,y:null,add:function(a,b){b==null&&(b=new Ff);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new Ff(this.x,this.y)},equals:function(a){return a!=null&&a.x==this.x?a.y==this.y:!1},normalize:function(a){if(this.x!=0||this.y!=0)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a,b){b==null&&(b=new Ff);b.x=this.x-a.x;b.y=
this.y-a.y;return b},__toFlashPoint:function(){return null},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y},__class__:Ff,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Wd=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.w=d;this.x=a;this.y=b;this.z=c};r["lime.math.Vector4"]=Wd;Wd.__name__="lime.math.Vector4";Wd.__properties__={get_Z_AXIS:"get_Z_AXIS",
get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};Wd.angleBetween=function(a,b){a=new Wd(a.x,a.y,a.z,a.w);var c=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);c!=0&&(a.x/=c,a.y/=c,a.z/=c);b=new Wd(b.x,b.y,b.z,b.w);c=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z);c!=0&&(b.x/=c,b.y/=c,b.z/=c);return Math.acos(a.x*b.x+a.y*b.y+a.z*b.z)};Wd.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};Wd.distanceSquared=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return c*c+d*d+a*a};Wd.get_X_AXIS=
function(){return new Wd(1,0,0)};Wd.get_Y_AXIS=function(){return new Wd(0,1,0)};Wd.get_Z_AXIS=function(){return new Wd(0,0,1)};Wd.prototype={w:null,x:null,y:null,z:null,add:function(a,b){b==null&&(b=new Wd);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;return b},clone:function(){return new Wd(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a,b){b==null&&(b=new Wd);var c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x;b.x=this.y*a.z-this.z*a.y;
b.y=c;b.z=d;b.w=1;return b},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){b==null&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){c==null&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=
-1;this.z*=-1},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);a!=0&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a,b){b==null&&(b=new Wd);b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;return b},toString:function(){return"Vector4("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:Wd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var ce=function(){};r["lime.media.AudioBuffer"]=ce;ce.__name__="lime.media.AudioBuffer";ce.fromBase64=function(a){if(a==null)return null;a.indexOf(",")==-1&&(a="data:"+ce.__getCodec(aj.decode(a))+";base64,"+a);var b=new ce;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};ce.fromBytes=
function(a){if(a==null)return null;var b=new ce;b.set_src(new Howl({src:["data:"+ce.__getCodec(a)+";base64,"+aj.encode(a)],html5:!0,preload:!1}));return b};ce.fromFile=function(a){if(a==null)return null;var b=new ce;b.__srcHowl=new Howl({src:[a],preload:!1});return b};ce.fromFiles=function(a){var b=new ce;b.__srcHowl=new Howl({src:a,preload:!1});return b};ce.fromVorbisFile=function(a){return null};ce.loadFromFile=function(a){var b=new yf,c=ce.fromFile(a);c!=null?c!=null&&(c.__srcHowl.on("load",function(){b.complete(c)}),
c.__srcHowl.on("loaderror",function(d,f){b.error(f)}),c.__srcHowl.load()):b.error(null);return b.future};ce.loadFromFiles=function(a){var b=new yf,c=ce.fromFiles(a);c!=null?(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(){b.error(null)}),c.__srcHowl.load()):b.error(null);return b.future};ce.__getCodec=function(a){var b=null;try{b=a.getString(0,4)}catch(d){Rb.lastError=d}switch(b){case "OggS":return"audio/ogg";case "RIFF":if(a.getString(8,4)=="WAVE")return"audio/wav";
b=a.b[1];var c=a.b[2];switch(a.b[0]){case 73:if(b==68&&c==51)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}break;case "fLaC":return"audio/flac";default:switch(b=a.b[1],c=a.b[2],a.b[0]){case 73:if(b==68&&c==51)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}}Mb.error("Unsupported sound format",{fileName:"lime/media/AudioBuffer.hx",lineNumber:450,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};
ce.prototype={bitsPerSample:null,channels:null,data:null,sampleRate:null,__srcAudio:null,__srcBuffer:null,__srcCustom:null,__srcHowl:null,__srcSound:null,__srcVorbisFile:null,dispose:function(){this.__srcHowl.unload()},get_src:function(){return this.__srcHowl},set_src:function(a){return this.__srcHowl=a},__class__:ce,__properties__:{set_src:"set_src",get_src:"get_src"}};var Ct=function(a){if(a!="custom"){if(a==null||a=="web")try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.web=
new window.AudioContext,this.type="web"}catch(b){Rb.lastError=b}this.web==null&&a!="web"&&(this.html5=new kv,this.type="html5")}else this.type="custom"};r["lime.media.AudioContext"]=Ct;Ct.__name__="lime.media.AudioContext";Ct.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:Ct};var At=function(a,b,c,d){d==null&&(d=0);b==null&&(b=0);this.onComplete=new Se;this.buffer=a;this.offset=b;this.__backend=new Tu(this);c!=null&&c!=0&&this.set_length(c);this.set_loops(d);
a!=null&&this.init()};r["lime.media.AudioSource"]=At;At.__name__="lime.media.AudioSource";At.prototype={onComplete:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},pause:function(){this.__backend.pause()},stop:function(){this.__backend.stop()},get_currentTime:function(){return this.__backend.getCurrentTime()},set_currentTime:function(a){return this.__backend.setCurrentTime(a)},get_gain:function(){return this.__backend.getGain()},
set_gain:function(a){return this.__backend.setGain(a)},get_length:function(){return this.__backend.getLength()},set_length:function(a){return this.__backend.setLength(a)},get_loops:function(){return this.__backend.getLoops()},set_loops:function(a){return this.__backend.setLoops(a)},get_pitch:function(){return this.__backend.getPitch()},set_pitch:function(a){return this.__backend.setPitch(a)},get_position:function(){return this.__backend.getPosition()},set_position:function(a){return this.__backend.setPosition(a)},
__class__:At,__properties__:{set_position:"set_position",get_position:"get_position",set_pitch:"set_pitch",get_pitch:"get_pitch",set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var ew=function(){};r["lime.media.FlashAudioContext"]=ew;ew.__name__="lime.media.FlashAudioContext";ew.prototype={createBuffer:function(a,b){return null},getBytesLoaded:function(a){return 0},
getBytesTotal:function(a){return 0},getID3:function(a){return null},getIsBuffering:function(a){return!1},getIsURLInaccessible:function(a){return!1},getLength:function(a){return 0},getURL:function(a){return null},close:function(a){},extract:function(a,b,c,d){return 0},load:function(a,b,c){},loadCompressedDataFromByteArray:function(a,b,c){},loadPCMFromByteArray:function(a,b,c,d,f,g){},play:function(a,b,c,d){return null},__class__:ew};var kv=function(){this.NETWORK_NO_SOURCE=3;this.NETWORK_LOADING=2;
this.NETWORK_IDLE=1;this.HAVE_NOTHING=this.NETWORK_EMPTY=0;this.HAVE_METADATA=1;this.HAVE_FUTURE_DATA=3;this.HAVE_ENOUGH_DATA=4;this.HAVE_CURRENT_DATA=2};r["lime.media.HTML5AudioContext"]=kv;kv.__name__="lime.media.HTML5AudioContext";kv.prototype={HAVE_CURRENT_DATA:null,HAVE_ENOUGH_DATA:null,HAVE_FUTURE_DATA:null,HAVE_METADATA:null,HAVE_NOTHING:null,NETWORK_EMPTY:null,NETWORK_IDLE:null,NETWORK_LOADING:null,NETWORK_NO_SOURCE:null,canPlayType:function(a,b){return a.__srcAudio!=null?a.__srcAudio.canPlayType(b):
null},createBuffer:function(a){var b=new ce;b.__srcAudio=new Audio;b.__srcAudio.src=a;return b},getAutoplay:function(a){return a.__srcAudio!=null?a.__srcAudio.autoplay:!1},getBuffered:function(a){return a.__srcAudio!=null?a.__srcAudio.buffered:null},getCurrentSrc:function(a){return a.__srcAudio!=null?a.__srcAudio.currentSrc:null},getCurrentTime:function(a){return a.__srcAudio!=null?a.__srcAudio.currentTime:0},getDefaultPlaybackRate:function(a){return a.__srcAudio!=null?a.__srcAudio.defaultPlaybackRate:
1},getDuration:function(a){return a.__srcAudio!=null?a.__srcAudio.duration:0},getEnded:function(a){return a.__srcAudio!=null?a.__srcAudio.ended:!1},getError:function(a){return a.__srcAudio!=null?a.__srcAudio.error:null},getLoop:function(a){return a.__srcAudio!=null?a.__srcAudio.loop:!1},getMuted:function(a){return a.__srcAudio!=null?a.__srcAudio.muted:!1},getNetworkState:function(a){return a.__srcAudio!=null?a.__srcAudio.networkState:0},getPaused:function(a){return a.__srcAudio!=null?a.__srcAudio.paused:
!1},getPlaybackRate:function(a){return a.__srcAudio!=null?a.__srcAudio.playbackRate:1},getPlayed:function(a){return a.__srcAudio!=null?a.__srcAudio.played:null},getPreload:function(a){return a.__srcAudio!=null?a.__srcAudio.preload:null},getReadyState:function(a){return a.__srcAudio!=null?a.__srcAudio.readyState:0},getSeekable:function(a){return a.__srcAudio!=null?a.__srcAudio.seekable:null},getSeeking:function(a){return a.__srcAudio!=null?a.__srcAudio.seeking:!1},getSrc:function(a){return a.__srcAudio!=
null?a.__srcAudio.src:null},getStartTime:function(a){return a.__srcAudio!=null?a.__srcAudio.playbackRate:0},getVolume:function(a){return a.__srcAudio!=null?a.__srcAudio.volume:1},load:function(a){a.__srcAudio!=null&&a.__srcAudio.load()},pause:function(a){a.__srcAudio!=null&&a.__srcAudio.pause()},play:function(a){a.__srcAudio!=null&&a.__srcAudio.play()},setAutoplay:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.autoplay=b)},setCurrentTime:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.currentTime=
b)},setDefaultPlaybackRate:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.defaultPlaybackRate=b)},setLoop:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.loop=b)},setMuted:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.muted=b)},setPlaybackRate:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.playbackRate=b)},setPreload:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.preload=b)},setSrc:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.src=b)},setVolume:function(a,b){a.__srcAudio!=null&&(a.__srcAudio.volume=
b)},__class__:kv};var fw=function(){this.ALL_DEVICES_SPECIFIER=4115;this.DEFAULT_ALL_DEVICES_SPECIFIER=4114;this.ENUMERATE_ALL_EXT=1;this.DEVICE_SPECIFIER=4101;this.DEFAULT_DEVICE_SPECIFIER=4100;this.ALL_ATTRIBUTES=4099;this.ATTRIBUTES_SIZE=4098;this.INVALID_CONTEXT=40962;this.INVALID_DEVICE=40961;this.STEREO_SOURCES=4113;this.MONO_SOURCES=4112;this.SYNC=4105;this.REFRESH=4104;this.EXPONENT_DISTANCE_CLAMPED=53254;this.EXPONENT_DISTANCE=53253;this.LINEAR_DISTANCE_CLAMPED=53252;this.LINEAR_DISTANCE=
53251;this.INVERSE_DISTANCE_CLAMPED=53250;this.INVERSE_DISTANCE=53249;this.DISTANCE_MODEL=53248;this.DOPPLER_VELOCITY=49153;this.SPEED_OF_SOUND=49155;this.DOPPLER_FACTOR=49152;this.EXTENSIONS=45060;this.RENDERER=45059;this.VERSION=45058;this.VENDOR=45057;this.OUT_OF_MEMORY=40965;this.INVALID_OPERATION=40964;this.INVALID_VALUE=40963;this.INVALID_ENUM=40962;this.INVALID_NAME=40961;this.NO_ERROR=0;this.SIZE=8196;this.CHANNELS=8195;this.BITS=8194;this.FREQUENCY=8193;this.FORMAT_STEREO16=4355;this.FORMAT_STEREO8=
4354;this.FORMAT_MONO16=4353;this.FORMAT_MONO8=4352;this.UNDETERMINED=4144;this.STREAMING=4137;this.STATIC=4136;this.SOURCE_TYPE=4135;this.BYTE_OFFSET=4134;this.SAMPLE_OFFSET=4133;this.SEC_OFFSET=4132;this.MAX_DISTANCE=4131;this.CONE_OUTER_GAIN=4130;this.ROLLOFF_FACTOR=4129;this.REFERENCE_DISTANCE=4128;this.BUFFERS_PROCESSED=4118;this.BUFFERS_QUEUED=4117;this.STOPPED=4116;this.PAUSED=4115;this.PLAYING=4114;this.INITIAL=4113;this.SOURCE_STATE=4112;this.ORIENTATION=4111;this.MAX_GAIN=4110;this.MIN_GAIN=
4109;this.GAIN=4106;this.BUFFER=4105;this.LOOPING=4103;this.VELOCITY=4102;this.DIRECTION=4101;this.POSITION=4100;this.PITCH=4099;this.CONE_OUTER_ANGLE=4098;this.CONE_INNER_ANGLE=4097;this.SOURCE_RELATIVE=514;this.TRUE=1;this.NONE=this.FALSE=0};r["lime.media.OpenALAudioContext"]=fw;fw.__name__="lime.media.OpenALAudioContext";fw.prototype={NONE:null,FALSE:null,TRUE:null,SOURCE_RELATIVE:null,CONE_INNER_ANGLE:null,CONE_OUTER_ANGLE:null,PITCH:null,POSITION:null,DIRECTION:null,VELOCITY:null,LOOPING:null,
BUFFER:null,GAIN:null,MIN_GAIN:null,MAX_GAIN:null,ORIENTATION:null,SOURCE_STATE:null,INITIAL:null,PLAYING:null,PAUSED:null,STOPPED:null,BUFFERS_QUEUED:null,BUFFERS_PROCESSED:null,REFERENCE_DISTANCE:null,ROLLOFF_FACTOR:null,CONE_OUTER_GAIN:null,MAX_DISTANCE:null,SEC_OFFSET:null,SAMPLE_OFFSET:null,BYTE_OFFSET:null,SOURCE_TYPE:null,STATIC:null,STREAMING:null,UNDETERMINED:null,FORMAT_MONO8:null,FORMAT_MONO16:null,FORMAT_STEREO8:null,FORMAT_STEREO16:null,FREQUENCY:null,BITS:null,CHANNELS:null,SIZE:null,
NO_ERROR:null,INVALID_NAME:null,INVALID_ENUM:null,INVALID_VALUE:null,INVALID_OPERATION:null,OUT_OF_MEMORY:null,VENDOR:null,VERSION:null,RENDERER:null,EXTENSIONS:null,DOPPLER_FACTOR:null,SPEED_OF_SOUND:null,DOPPLER_VELOCITY:null,DISTANCE_MODEL:null,INVERSE_DISTANCE:null,INVERSE_DISTANCE_CLAMPED:null,LINEAR_DISTANCE:null,LINEAR_DISTANCE_CLAMPED:null,EXPONENT_DISTANCE:null,EXPONENT_DISTANCE_CLAMPED:null,REFRESH:null,SYNC:null,MONO_SOURCES:null,STEREO_SOURCES:null,INVALID_DEVICE:null,INVALID_CONTEXT:null,
ATTRIBUTES_SIZE:null,ALL_ATTRIBUTES:null,DEFAULT_DEVICE_SPECIFIER:null,DEVICE_SPECIFIER:null,ENUMERATE_ALL_EXT:null,DEFAULT_ALL_DEVICES_SPECIFIER:null,ALL_DEVICES_SPECIFIER:null,bufferData:function(a,b,c,d,f){R.bufferData(a,b,c,d,f)},buffer3f:function(a,b,c,d,f){R.buffer3f(a,b,c,d,f)},buffer3i:function(a,b,c,d,f){R.buffer3i(a,b,c,d,f)},bufferf:function(a,b,c){R.bufferf(a,b,c)},bufferfv:function(a,b,c){R.bufferfv(a,b,c)},bufferi:function(a,b,c){R.bufferi(a,b,c)},bufferiv:function(a,b,c){R.bufferiv(a,
b,c)},closeDevice:function(a){return Kc.closeDevice(a)},createContext:function(a,b){return Kc.createContext(a,b)},createBuffer:function(){return R.createBuffer()},createSource:function(){return R.createSource()},deleteBuffer:function(a){R.deleteBuffer(a)},deleteBuffers:function(a){R.deleteBuffers(a)},deleteSource:function(a){R.deleteSource(a)},deleteSources:function(a){R.deleteSources(a)},destroyContext:function(a){a!=null&&Kc.destroyContext(a)},disable:function(a){R.disable(a)},distanceModel:function(a){R.distanceModel(a)},
dopplerFactor:function(a){R.dopplerFactor(a)},dopplerVelocity:function(a){R.dopplerVelocity(a)},enable:function(a){R.enable(a)},genSource:function(){return this.createSource()},genSources:function(a){return R.genSources(a)},genBuffer:function(){return this.createBuffer()},genBuffers:function(a){return R.genBuffers(a)},getBoolean:function(a){return R.getBoolean(a)},getBooleanv:function(a,b){b==null&&(b=1);return R.getBooleanv(a,b)},getBuffer3f:function(a,b){return R.getBuffer3f(a,b)},getBuffer3i:function(a,
b){return R.getBuffer3i(a,b)},getBufferf:function(a,b){return R.getBufferf(a,b)},getBufferfv:function(a,b,c){c==null&&(c=1);return R.getBufferfv(a,b,c)},getBufferi:function(a,b){return R.getBufferi(a,b)},getBufferiv:function(a,b,c){c==null&&(c=1);return R.getBufferiv(a,b,c)},getContextsDevice:function(a){return a==null?null:Kc.getContextsDevice(a)},getCurrentContext:function(){return Kc.getCurrentContext()},getDouble:function(a){return R.getDouble(a)},getDoublev:function(a,b){b==null&&(b=1);return R.getDoublev(a,
b)},getEnumValue:function(a){return R.getEnumValue(a)},getError:function(a){return a==null?R.getError():Kc.getError(a)},getErrorString:function(a){return a==null?R.getErrorString():Kc.getErrorString(a)},getFloat:function(a){return R.getFloat(a)},getFloatv:function(a,b){b==null&&(b=1);return R.getFloatv(a,b)},getInteger:function(a){return R.getInteger(a)},getIntegerv:function(a,b,c){b==null&&(b=1);return c==null?R.getIntegerv(a,b):Kc.getIntegerv(c,a,b)},getListener3f:function(a){return R.getListener3f(a)},
getListener3i:function(a){return R.getListener3i(a)},getListenerf:function(a){return R.getListenerf(a)},getListenerfv:function(a,b){b==null&&(b=1);return R.getListenerfv(a,b)},getListeneri:function(a){return R.getListeneri(a)},getListeneriv:function(a,b){b==null&&(b=1);return R.getListeneriv(a,b)},getProcAddress:function(a){return R.getProcAddress(a)},getSource3f:function(a,b){return R.getSource3f(a,b)},getSourcef:function(a,b){return R.getSourcef(a,b)},getSource3i:function(a,b){return R.getSource3i(a,
b)},getSourcefv:function(a,b,c){return R.getSourcefv(a,b)},getSourcei:function(a,b){return R.getSourcei(a,b)},getSourceiv:function(a,b,c){c==null&&(c=1);return R.getSourceiv(a,b,c)},getString:function(a,b){return b==null?R.getString(a):Kc.getString(b,a)},isBuffer:function(a){return R.isBuffer(a)},isEnabled:function(a){return R.isEnabled(a)},isExtensionPresent:function(a){return R.isExtensionPresent(a)},isSource:function(a){return R.isSource(a)},listener3f:function(a,b,c,d){R.listener3f(a,b,c,d)},
listener3i:function(a,b,c,d){R.listener3i(a,b,c,d)},listenerf:function(a,b){R.listenerf(a,b)},listenerfv:function(a,b){R.listenerfv(a,b)},listeneri:function(a,b){R.listeneri(a,b)},listeneriv:function(a,b){R.listeneriv(a,b)},makeContextCurrent:function(a){return Kc.makeContextCurrent(a)},openDevice:function(a){return Kc.openDevice(a)},pauseDevice:function(a){Kc.pauseDevice(a)},processContext:function(a){Kc.processContext(a)},resumeDevice:function(a){Kc.resumeDevice(a)},source3f:function(a,b,c,d,f){R.source3f(a,
b,c,d,f)},source3i:function(a,b,c,d,f){R.source3i(a,b,c,d,f)},sourcef:function(a,b,c){R.sourcef(a,b,c)},sourcefv:function(a,b,c){R.sourcefv(a,b,c)},sourcei:function(a,b,c){R.sourcei(a,b,c)},sourceiv:function(a,b,c){R.sourceiv(a,b,c)},sourcePlay:function(a){R.sourcePlay(a)},sourcePlayv:function(a){R.sourcePlayv(a)},sourceStop:function(a){R.sourceStop(a)},sourceStopv:function(a){R.sourceStopv(a)},sourceRewind:function(a){R.sourceRewind(a)},sourceRewindv:function(a){R.sourceRewindv(a)},sourcePause:function(a){R.sourcePause(a)},
sourcePausev:function(a){R.sourcePausev(a)},sourceQueueBuffer:function(a,b){R.sourceQueueBuffer(a,b)},sourceQueueBuffers:function(a,b,c){R.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return R.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return R.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){R.speedOfSound(a)},suspendContext:function(a){Kc.suspendContext(a)},__class__:fw};var R=function(){};r["lime.media.openal.AL"]=R;R.__name__="lime.media.openal.AL";R.removeDirectFilter=
function(a){};R.removeSend=function(a,b){};R.auxf=function(a,b,c){};R.auxfv=function(a,b,c){};R.auxi=function(a,b,c){};R.auxiv=function(a,b,c){};R.bufferData=function(a,b,c,d,f){};R.buffer3f=function(a,b,c,d,f){};R.buffer3i=function(a,b,c,d,f){};R.bufferf=function(a,b,c){};R.bufferfv=function(a,b,c){};R.bufferi=function(a,b,c){};R.bufferiv=function(a,b,c){};R.createAux=function(){return null};R.createBuffer=function(){return null};R.createEffect=function(){return null};R.createFilter=function(){return null};
R.createSource=function(){return null};R.deleteBuffer=function(a){};R.deleteBuffers=function(a){};R.deleteSource=function(a){};R.deleteSources=function(a){};R.disable=function(a){};R.distanceModel=function(a){};R.dopplerFactor=function(a){};R.dopplerVelocity=function(a){};R.effectf=function(a,b,c){};R.effectfv=function(a,b,c){};R.effecti=function(a,b,c){};R.effectiv=function(a,b,c){};R.enable=function(a){};R.genSource=function(){return null};R.genSources=function(a){return null};R.genBuffer=function(){return null};
R.genBuffers=function(a){return null};R.getBoolean=function(a){return!1};R.getBooleanv=function(a,b){return null};R.getBuffer3f=function(a,b){return null};R.getBuffer3i=function(a,b){return null};R.getBufferf=function(a,b){return 0};R.getBufferfv=function(a,b,c){return null};R.getBufferi=function(a,b){return 0};R.getBufferiv=function(a,b,c){return null};R.getDouble=function(a){return 0};R.getDoublev=function(a,b){return null};R.getEnumValue=function(a){return 0};R.getError=function(){return 0};R.getErrorString=
function(){switch(R.getError()){case 40961:return"INVALID_NAME: Invalid parameter name";case 40962:return"INVALID_ENUM: Invalid enum value";case 40963:return"INVALID_VALUE: Invalid parameter value";case 40964:return"INVALID_OPERATION: Illegal operation or call";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};R.getFilteri=function(a,b){return 0};R.getFloat=function(a){return 0};R.getFloatv=function(a,b){return null};R.getInteger=function(a){return 0};R.getIntegerv=
function(a,b){return null};R.getListener3f=function(a){return null};R.getListener3i=function(a){return null};R.getListenerf=function(a){return 0};R.getListenerfv=function(a,b){return null};R.getListeneri=function(a){return 0};R.getListeneriv=function(a,b){return null};R.getParameter=function(a){return null};R.getProcAddress=function(a){return null};R.getSource3f=function(a,b){return null};R.getSourcef=function(a,b){return 0};R.getSource3i=function(a,b){return null};R.getSourcefv=function(a,b,c){return null};
R.getSourcei=function(a,b){return 0};R.getSourceiv=function(a,b,c){return null};R.getString=function(a){return null};R.isBuffer=function(a){return!1};R.isEnabled=function(a){return!1};R.isExtensionPresent=function(a){return!1};R.isAux=function(a){return!1};R.isEffect=function(a){return!1};R.isFilter=function(a){return!1};R.isSource=function(a){return!1};R.listener3f=function(a,b,c,d){};R.listener3i=function(a,b,c,d){};R.listenerf=function(a,b){};R.listenerfv=function(a,b){};R.listeneri=function(a,
b){};R.listeneriv=function(a,b){};R.source3f=function(a,b,c,d,f){};R.source3i=function(a,b,c,d,f){};R.sourcef=function(a,b,c){};R.sourcefv=function(a,b,c){};R.sourcei=function(a,b,c){};R.filteri=function(a,b,c){};R.filterf=function(a,b,c){};R.sourceiv=function(a,b,c){};R.sourcePlay=function(a){};R.sourcePlayv=function(a){};R.sourceStop=function(a){};R.sourceStopv=function(a){};R.sourceRewind=function(a){};R.sourceRewindv=function(a){};R.sourcePause=function(a){};R.sourcePausev=function(a){};R.sourceQueueBuffer=
function(a,b){};R.sourceQueueBuffers=function(a,b,c){};R.sourceUnqueueBuffer=function(a){return 0};R.sourceUnqueueBuffers=function(a,b){return null};R.speedOfSound=function(a){};var Kc=function(){};r["lime.media.openal.ALC"]=Kc;Kc.__name__="lime.media.openal.ALC";Kc.closeDevice=function(a){return!1};Kc.createContext=function(a,b){return null};Kc.destroyContext=function(a){};Kc.getContextsDevice=function(a){return null};Kc.getCurrentContext=function(){return null};Kc.getError=function(a){return 0};
Kc.getErrorString=function(a){switch(Kc.getError(a)){case 40961:return"INVALID_DEVICE: Invalid device (or no device?)";case 40962:return"INVALID_CONTEXT: Invalid context (or no context?)";case 40963:return"INVALID_ENUM: Invalid enum value";case 40964:return"INVALID_VALUE: Invalid param value";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};Kc.getIntegerv=function(a,b,c){return null};Kc.getString=function(a,b){return null};Kc.makeContextCurrent=function(a){return!1};
Kc.openDevice=function(a){return null};Kc.pauseDevice=function(a){};Kc.processContext=function(a){};Kc.resumeDevice=function(a){};Kc.suspendContext=function(a){};var gw=function(){};r["lime.media.vorbis.VorbisComment"]=gw;gw.__name__="lime.media.vorbis.VorbisComment";gw.prototype={userComments:null,vendor:null,__class__:gw};var Jr=function(a){this.handle=a};r["lime.media.vorbis.VorbisFile"]=Jr;Jr.__name__="lime.media.vorbis.VorbisFile";Jr.fromBytes=function(a){return null};Jr.fromFile=function(a){return null};
Jr.prototype={bitstream:null,handle:null,bitrate:function(a){return 0},bitrateInstant:function(){return 0},clear:function(){},comment:function(a){return null},crosslap:function(a){return 0},info:function(a){return null},pcmSeek:function(a){return 0},pcmSeekLap:function(a){return 0},pcmSeekPage:function(a){return 0},pcmSeekPageLap:function(a){return 0},pcmTell:function(){return new zb(0,0)},pcmTotal:function(a){return new zb(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},rawTell:function(){return new zb(0,
0)},rawTotal:function(a){return new zb(0,0)},read:function(a,b,c,d,f,g){return 0},readFloat:function(a,b){return 0},seekable:function(){return!1},serialNumber:function(a){return 0},streams:function(){return 0},timeSeek:function(a){return 0},timeSeekLap:function(a){return 0},timeSeekPage:function(a){return 0},timeSeekPageLap:function(a){return 0},timeTell:function(){return 0},timeTotal:function(a){return 0},__class__:Jr};var hw=function(){};r["lime.media.vorbis.VorbisInfo"]=hw;hw.__name__="lime.media.vorbis.VorbisInfo";
hw.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:hw};var Kr=function(){};r["lime.net._IHTTPRequest"]=Kr;Kr.__name__="lime.net._IHTTPRequest";Kr.__isInterface__=!0;Kr.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,manageCookies:null,cancel:null,__class__:Kr};
var Qh=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new aa;this.headers=[];this.method="GET";this.timeout=3E4;this.withCredentials=!1;this.manageCookies=!0;this.__backend=new Ob;this.__backend.init(this)};r["lime.net._HTTPRequest.AbstractHTTPRequest"]=Qh;Qh.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";Qh.__interfaces__=[Kr];Qh.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,manageCookies:null,__backend:null,cancel:function(){this.__backend.cancel()},load:function(a){return null},__class__:Qh};var lv=function(a){Qh.call(this,a)};r["lime.net.HTTPRequest"]=lv;lv.__name__="lime.net.HTTPRequest";lv.__super__=Qh;lv.prototype=I(Qh.prototype,{__class__:lv});var ck=function(a){Qh.call(this,a)};r["lime.net._HTTPRequest_Bytes"]=
ck;ck.__name__="lime.net._HTTPRequest_Bytes";ck.__super__=Qh;ck.prototype=I(Qh.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;a!=null&&(this.uri=a);var c=new yf;a=this.__backend.loadData(this.uri);a.onProgress(m(c,c.progress));a.onError(function(d){b.responseData=d.responseData;c.error(d.error)});a.onComplete(function(d){b.responseData=b.fromBytes(d);c.complete(b.responseData)});return c.future},__class__:ck});var Bn=function(a){Qh.call(this,a)};r["lime.net._HTTPRequest_String"]=
Bn;Bn.__name__="lime.net._HTTPRequest_String";Bn.__super__=Qh;Bn.prototype=I(Qh.prototype,{load:function(a){var b=this;a!=null&&(this.uri=a);var c=new yf;a=this.__backend.loadText(this.uri);a.onProgress(m(c,c.progress));a.onError(function(d){b.responseData=d.responseData;c.error(d.error)});a.onComplete(function(d){b.responseData=d;c.complete(b.responseData)});return c.future},__class__:Bn});var wn=function(a,b){this.error=a;this.responseData=b};r["lime.net._HTTPRequestErrorResponse"]=wn;wn.__name__=
"lime.net._HTTPRequestErrorResponse";wn.prototype={error:null,responseData:null,__class__:wn};var yr=function(a,b){b==null&&(b="");this.name=a;this.value=b};r["lime.net.HTTPRequestHeader"]=yr;yr.__name__="lime.net.HTTPRequestHeader";yr.prototype={name:null,value:null,__class__:yr};var Lr=function(a){Qh.call(this,a)};r["lime.net._HTTPRequest_lime_text_Font"]=Lr;Lr.__name__="lime.net._HTTPRequest_lime_text_Font";Lr.__super__=ck;Lr.prototype=I(ck.prototype,{fromBytes:function(a){return hf.fromBytes(a)},
__class__:Lr});var Mr=function(a){Qh.call(this,a)};r["lime.net._HTTPRequest_lime_utils_Bytes"]=Mr;Mr.__name__="lime.net._HTTPRequest_lime_utils_Bytes";Mr.__super__=ck;Mr.prototype=I(ck.prototype,{fromBytes:function(a){return hg.fromBytes(a)},__class__:Mr});var Nr=function(a){Qh.call(this,a)};r["lime.net._HTTPRequest_openfl_utils_ByteArray"]=Nr;Nr.__name__="lime.net._HTTPRequest_openfl_utils_ByteArray";Nr.__super__=ck;Nr.prototype=I(ck.prototype,{fromBytes:function(a){return cc.fromBytes(a)},__class__:Nr});
var dk=function(){};r["lime.system.CFFI"]=dk;dk.__name__="lime.system.CFFI";dk.load=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=0);return dk.enabled?null:A.makeVarArgs(function(f){return{}})};dk.stringValue=function(a){return a};dk.__findNDLLFolder=function(){return""};dk.__loaderTrace=function(a){};dk.__sysName=function(){return null};dk.__tryLoad=function(a,b,c,d){return null};var jf={_new:function(a){return a},get:function(a){return 0},equals:function(a,b){return jf.get(a)==b},equalsPointer:function(a,
b){return jf.get(a)==jf.get(b)},greaterThan:function(a,b){return jf.get(a)>b},greaterThanPointer:function(a,b){return jf.get(a)>jf.get(b)},greaterThanOrEqual:function(a,b){return jf.get(a)>=b},greaterThanOrEqualPointer:function(a,b){return jf.get(a)>=jf.get(b)},lessThan:function(a,b){return jf.get(a)<b},lessThanPointer:function(a,b){return jf.get(a)<jf.get(b)},lessThanOrEqual:function(a,b){return jf.get(a)<=b},lessThanOrEqualPointer:function(a,b){return jf.get(a)<=jf.get(b)},notEquals:function(a,
b){return jf.get(a)!=b},notEqualsPointer:function(a,b){return jf.get(a)!=jf.get(b)}},zf=function(){};r["lime.system.Clipboard"]=zf;zf.__name__="lime.system.Clipboard";zf.__properties__={set_text:"set_text",get_text:"get_text"};zf.__update=function(){var a=zf._text;zf._text=null;zf._text=a;zf.__updated=!0;zf._text!=a&&zf.onUpdate.dispatch()};zf.get_text=function(){zf.__update();return zf._text};zf.set_text=function(a){var b=zf._text;zf._text=a;var c=Ha.current.__window;c!=null&&c.__backend.setClipboard(a);
zf._text!=b&&zf.onUpdate.dispatch();return a};var mv=function(){};r["lime.system.Display"]=mv;mv.__name__="lime.system.Display";mv.prototype={bounds:null,currentMode:null,id:null,dpi:null,orientation:null,name:null,supportedModes:null,safeArea:null,__class__:mv};var nv=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=c;this.pixelFormat=d};r["lime.system.DisplayMode"]=nv;nv.__name__="lime.system.DisplayMode";nv.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:nv};
var bk=O["lime.system.Endian"]={__ename__:"lime.system.Endian",__constructs__:null,LITTLE_ENDIAN:{_hx_name:"LITTLE_ENDIAN",_hx_index:0,__enum__:"lime.system.Endian",toString:D},BIG_ENDIAN:{_hx_name:"BIG_ENDIAN",_hx_index:1,__enum__:"lime.system.Endian",toString:D}};bk.__constructs__=[bk.LITTLE_ENDIAN,bk.BIG_ENDIAN];var ig=function(){};r["lime.system.JNI"]=ig;ig.__name__="lime.system.JNI";ig.transformClassName=function(a){var b=a.split(".");if(b.length<=1)return a;a="";(new sb("^[A-Z]","")).match(b[b.length-
2])&&(a="$"+b.pop());return b.join("/")+a};ig.callMember=function(a,b,c){return a.apply(null,[b].concat(c))};ig.callStatic=function(a,b){return a.apply(null,b)};ig.createMemberField=function(a,b,c){ig.init();return new ov(null)};ig.createMemberMethod=function(a,b,c,d,f){ig.init();return null};ig.createStaticField=function(a,b,c){ig.init();return new pv(null)};ig.createStaticMethod=function(a,b,c,d,f){ig.init();return null};ig.getEnv=function(){ig.init();return null};ig.init=function(){ig.initialized||
(ig.initialized=!0)};ig.onCallback=function(a,b,c){var d=A.field(a,b);if(d!=null)return c==null&&(c=[]),d.apply(a,c);Me.trace("onCallback - unknown field "+b,{fileName:"lime/system/JNI.hx",lineNumber:223,className:"lime.system.JNI",methodName:"onCallback"});return null};ig.postUICallback=function(a){a()};var ov=function(a){this.field=a};r["lime.system.JNIMemberField"]=ov;ov.__name__="lime.system.JNIMemberField";ov.prototype={field:null,get:function(a){return null},set:function(a,b){return b},__class__:ov};
var pv=function(a){this.field=a};r["lime.system.JNIStaticField"]=pv;pv.__name__="lime.system.JNIStaticField";pv.prototype={field:null,get:function(){return null},set:function(a){return a},__class__:pv};var iw=function(a){this.method=a};r["lime.system.JNIMethod"]=iw;iw.__name__="lime.system.JNIMethod";iw.prototype={method:null,callMember:function(a){return null},callStatic:function(a){return null},getMemberMethod:function(a){return a?m(this,this.callMember):A.makeVarArgs(m(this,this.callMember))},
getStaticMethod:function(a){return a?m(this,this.callStatic):A.makeVarArgs(m(this,this.callStatic))},__class__:iw};var Qw=function(){};r["lime.system.JNISafety"]=Qw;Qw.__name__="lime.system.JNISafety";Qw.__isInterface__=!0;var Rw=function(){};r["lime.system.JNISafetyTools"]=Rw;Rw.__name__="lime.system.JNISafetyTools";Rw.onMainThread=function(){return!0};var wh={__properties__:{get_region:"get_region",get_language:"get_language",get_systemLocale:"get_systemLocale",set_currentLocale:"set_currentLocale",
get_currentLocale:"get_currentLocale"},_new:function(a){return a},equals:function(a,b){var c=wh.get_language(a);a=wh.get_region(a);var d=wh.get_language(b);b=wh.get_region(b);var f=c==d,g=a==b;f||c==null||d==null||(f=c.toLowerCase()==d.toLowerCase());g||a==null||b==null||(g=a.toLowerCase()==b.toLowerCase());return f?g:!1},__init:function(){if(wh.__systemLocale==null){var a=navigator.language;wh.__systemLocale=a!=null?a:"en-US";wh.set_currentLocale(wh.__systemLocale)}},get_language:function(a){if(a!=
null){var b=a.indexOf("_");if(b>-1){var c=a.indexOf("-");c>-1&&c<b&&(b=c);return a.substring(0,b)}b=a.indexOf("-");if(b>-1)return a.substring(0,b)}return a},get_region:function(a){if(a!=null){var b=a.indexOf("_"),c=a.indexOf("."),d=a.indexOf("-");if(b>-1)return c>-1?a.substring(b+1,c):a.substring(b+1);if(d>-1)return c>-1?a.substring(d+1,c):a.substring(d+1)}return null},get_currentLocale:function(){wh.__init();return wh.currentLocale},set_currentLocale:function(a){wh.__init();return wh.currentLocale=
a},get_systemLocale:function(){wh.__init();return wh.__systemLocale}},Ni=function(a,b){this.onUpdate=new Xu;this.type=a;this.id=b};r["lime.system.Sensor"]=Ni;Ni.__name__="lime.system.Sensor";Ni.getSensors=function(a){if(a==null)return Ni.sensors.slice();for(var b=[],c=0,d=Ni.sensors;c<d.length;){var f=d[c];++c;f.type==a&&b.push(f)}return b};Ni.registerSensor=function(a,b){a=new Ni(a,b);Ni.sensors.push(a);return Ni.sensorByID.h[b]=a};Ni.prototype={id:null,onUpdate:null,type:null,__class__:Ni};var Pw=
O["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:null,ACCELEROMETER:{_hx_name:"ACCELEROMETER",_hx_index:0,__enum__:"lime.system.SensorType",toString:D}};Pw.__constructs__=[Pw.ACCELEROMETER];var Hb=function(){};r["lime.system.System"]=Hb;Hb.__name__="lime.system.System";Hb.__properties__={get_userDirectory:"get_userDirectory",get_platformVersion:"get_platformVersion",get_platformName:"get_platformName",get_platformLabel:"get_platformLabel",get_numDisplays:"get_numDisplays",
get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_deviceVendor:"get_deviceVendor",get_deviceModel:"get_deviceModel",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};Hb.embed=La.lime.embed=function(a,b,c,d,f){if(Hb.__applicationEntryPoint!=
null&&Object.prototype.hasOwnProperty.call(Hb.__applicationEntryPoint.h,a)){var g=typeof b=="string"?window.document.getElementById(b):b==null?window.document.createElement("div"):b;g==null?window.console.log("[lime.embed] ERROR: Cannot find target element: "+L.string(b)):(c==null&&(c=0),d==null&&(d=0),f==null&&(f={}),Object.prototype.hasOwnProperty.call(f,"background")&&typeof f.background=="string"&&(b=Z.replace(L.string(f.background),"#",""),b.indexOf("0x")>-1?f.background=L.parseInt(b):f.background=
L.parseInt("0x"+b)),f.element=g,f.width=c,f.height=d,Hb.__applicationEntryPoint.h[a](f))}};Hb.exit=function(a){var b=Ha.current;if(b!=null&&(b.onExit.dispatch(a),b.onExit.canceled))return;b!=null&&b.__window!=null&&b.__window.close()};Hb.getDisplay=function(a){if(a==0){a=new mv;a.id=0;a.name="Generic Display";a.dpi=96*window.devicePixelRatio;a.currentMode=new nv(window.screen.width,window.screen.height,60,1);if(window.screen.orientation!=null)switch(window.screen.orientation.type){case "landscape-primary":a.orientation=
1;break;case "landscape-secondary":a.orientation=2;break;case "portrait-primary":a.orientation=3;break;case "portrait-secondary":a.orientation=4;break;default:a.orientation=0}else a.orientation=0;a.supportedModes=[a.currentMode];a.bounds=new We(0,0,a.currentMode.width,a.currentMode.height);a.safeArea=new We(0,0,a.currentMode.width,a.currentMode.height);return a}return null};Hb.getTimer=function(){return window.performance.now()|0};Hb.load=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=0);return dk.load(a,
b,c,d)};Hb.openFile=function(a){a!=null&&window.open(a,"_blank")};Hb.openURL=function(a,b){b==null&&(b="_blank");a!=null&&window.open(a,b)};Hb.__copyMissingFields=function(a,b){if(b!=null&&a!=null)for(var c=0,d=A.fields(b);c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(a,f)||(a[f]=A.field(b,f))}};Hb.__getDirectory=function(a){return null};Hb.__parseBool=function(a){return a=="true"};Hb.__registerEntryPoint=function(a,b){Hb.__applicationEntryPoint==null&&(Hb.__applicationEntryPoint=
new aa);Hb.__applicationEntryPoint.h[a]=b};Hb.__runProcess=function(a,b){return null};Hb.get_allowScreenTimeout=function(){return!0};Hb.set_allowScreenTimeout=function(a){return!0};Hb.get_applicationDirectory=function(){Hb.__applicationDirectory==null&&(Hb.__applicationDirectory=Hb.__getDirectory(0));return Hb.__applicationDirectory};Hb.get_applicationStorageDirectory=function(){Hb.__applicationStorageDirectory==null&&(Hb.__applicationStorageDirectory=Hb.__getDirectory(1));return Hb.__applicationStorageDirectory};
Hb.get_deviceModel=function(){return Hb.__deviceModel};Hb.get_deviceVendor=function(){return Hb.__deviceVendor};Hb.get_desktopDirectory=function(){Hb.__desktopDirectory==null&&(Hb.__desktopDirectory=Hb.__getDirectory(2));return Hb.__desktopDirectory};Hb.get_documentsDirectory=function(){Hb.__documentsDirectory==null&&(Hb.__documentsDirectory=Hb.__getDirectory(3));return Hb.__documentsDirectory};Hb.get_endianness=function(){if(Hb.__endianness==null){var a=new ArrayBuffer(2),b=null,c=null,d=null,f=
null,g=null,h=b=b!=null?new Uint8Array(b):c!=null?new Uint8Array(c):d!=null?new Uint8Array(d.__array):f!=null?new Uint8Array(f):a!=null?g==null?new Uint8Array(a,0):new Uint8Array(a,0,g):null;g=f=d=c=b=null;b=b!=null?new Uint16Array(b):c!=null?new Uint16Array(c):d!=null?new Uint16Array(d.__array):f!=null?new Uint16Array(f):a!=null?g==null?new Uint16Array(a,0):new Uint16Array(a,0,g):null;h[0]=170;h[1]=187;Hb.__endianness=b[0]==43707?bk.BIG_ENDIAN:bk.LITTLE_ENDIAN}return Hb.__endianness};Hb.get_fontsDirectory=
function(){Hb.__fontsDirectory==null&&(Hb.__fontsDirectory=Hb.__getDirectory(4));return Hb.__fontsDirectory};Hb.get_numDisplays=function(){return 1};Hb.get_platformLabel=function(){if(Hb.__platformLabel==null){var a=Hb.get_platformName(),b=Hb.get_platformVersion();a!=null&&b!=null?Hb.__platformLabel=a+" "+b:a!=null&&(Hb.__platformLabel=a)}return Hb.__platformLabel};Hb.get_platformName=function(){Hb.__platformName==null&&(Hb.__platformName="HTML5");return Hb.__platformName};Hb.get_platformVersion=
function(){return Hb.__platformVersion};Hb.get_userDirectory=function(){Hb.__userDirectory==null&&(Hb.__userDirectory=Hb.__getDirectory(5));return Hb.__userDirectory};var Dj=function(a){this.__activeJob=new rp;this.__jobComplete=new rp;this.__jobOutput=new Xa;this.workIterations=new rp;this.workIterations.value=0;this.__jobComplete.value=!1;this.mode=a!=null&&a};r["lime.system.WorkOutput"]=Dj;Dj.__name__="lime.system.WorkOutput";Dj.prototype={workIterations:null,mode:null,__jobOutput:null,__jobComplete:null,
__activeJob:null,sendComplete:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"COMPLETE",message:a,jobID:this.__activeJob.value.id},Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(a,b):this.__jobOutput.add(a))},sendError:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"ERROR",message:a,jobID:this.__activeJob.value.id},Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(a,b):this.__jobOutput.add(a))},sendProgress:function(a,
b){this.__jobComplete.value||(a={event:"PROGRESS",message:a,jobID:this.__activeJob.value.id},Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(a,b):this.__jobOutput.add(a))},sendUncaughtError:function(a){this.__jobComplete.value||(this.__jobComplete.value=!0,a={event:"UNCAUGHT_ERROR",message:a,jobID:this.__activeJob.value.id},Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(a,null):this.__jobOutput.add(a))},sendThreadEvent:function(a,b){Pb.__current.__worker!=null||Pb.__isWorker?
Pb.returnMessage(a,b):this.__jobOutput.add(a)},resetJobProgress:function(){this.__jobComplete.value=!1;this.workIterations.value=0},createThread:function(a){var b=this;a=Pb.create(a);a.onMessage.add(function(c){b.__jobOutput.add(c)});return a},get_activeJob:function(){return this.__activeJob.value},set_activeJob:function(a){return this.__activeJob.value=a},__class__:Dj,__properties__:{set_activeJob:"set_activeJob",get_activeJob:"get_activeJob"}};var Ke=function(a,b,c){b==null&&(b=1);a==null&&(a=0);
this.__singleThreadedJobs=new Or;this.__singleThreadedJobRunning=!1;this.__threads=[];this.__queuedExitEvents=0;this.__multiThreadedJobs=new Or;this.workPriority=1;this.onUncaughtError=new dv;this.onRun=new ev;this.onProgress=new xn;this.onError=new xn;this.onComplete=new xn;this.activeThreads=this.__idleThreads=0;if(Pb.__current.__worker!=null||Pb.__isWorker)throw la.thrown("Call new ThreadPool() only from the main thread.");Dj.call(this,c);this.minThreads=a;this.maxThreads=b};r["lime.system.ThreadPool"]=
Ke;Ke.__name__="lime.system.ThreadPool";Ke.isMainThread=function(){return!(Pb.__current.__worker!=null||Pb.__isWorker)};Ke.__executeThread=function(){(async function(){for(var a=Pb.__messages.isEmpty()?await new Promise(function(l,k){Pb.__resolveMethods.add(l)}):await (new Promise(function(l,k){sa.setTimeout(l)})).then(function(l){return Pb.__messages.pop()}),b=new Dj(!0),c=null,d=!0;;){if(c==null){c=await (new Promise(function(l,k){sa.setTimeout(l)})).then(function(l){return Pb.__messages.pop()});
c!=null||d||(d={event:"IDLE",threadID:a.threadID},Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(d,null):b.__jobOutput.add(d));for(;c==null;)c=Pb.__messages.isEmpty()?await new Promise(function(l,k){Pb.__resolveMethods.add(l)}):await (new Promise(function(l,k){sa.setTimeout(l)})).then(function(l){return Pb.__messages.pop()});b.__jobComplete.value=!1;b.workIterations.value=0;d=!1}if(c.event=="EXIT"){a={event:"EXIT",threadID:a.threadID};Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(a,
null):b.__jobOutput.add(a);Pb.__current.destroy();break}if(c.event!="WORK"||c.doWork==null||c.jobID==null)c=null;else{var f=new Cn(c.doWork,c.state,c.jobID);b.__activeJob.value=f;f=null;try{for(;;){if(b.__jobComplete.value)var g=!1;else f=await (new Promise(function(l,k){sa.setTimeout(l)})).then(function(l){return Pb.__messages.pop()}),g=f==null;if(!g)break;if(b.workIterations.value==0){var h={event:"WORK",jobID:c.jobID,threadID:a.threadID};Pb.__current.__worker!=null||Pb.__isWorker?Pb.returnMessage(h,
null):b.__jobOutput.add(h)}b.workIterations.value+=1;Uu.toFunction(c.doWork)(c.state,b)}}catch(l){c=la.caught(l),b.sendUncaughtError(c)}b.__activeJob.value=null;f==null||b.__jobComplete.value?c=f:(c=f,b.__jobComplete.value=!1,b.workIterations.value=0)}}})()};Ke.timestamp=function(){return(new Date).getTime()/1E3};Ke.__super__=Dj;Ke.prototype=I(Dj.prototype,{activeThreads:null,__idleThreads:null,maxThreads:null,minThreads:null,onComplete:null,onError:null,onProgress:null,onRun:null,onUncaughtError:null,
workPriority:null,__doWork:null,__multiThreadedJobs:null,__queuedExitEvents:null,__threads:null,__singleThreadedJobRunning:null,__singleThreadedJobs:null,cancel:function(a){if(Pb.__current.__worker!=null||Pb.__isWorker)throw la.thrown("Call cancel() only from the main thread.");if(a!=null){var b=this.__multiThreadedJobs,c=b.jobs;for(b=b.startIndex;b<c.length;){var d=c[b++];d.startTime>=0&&(d.duration=(new Date).getTime()/1E3-d.startTime);this.__activeJob.value=d;this.onError.dispatch(a);this.__activeJob.value=
null}}b=this.__multiThreadedJobs;b.jobs.length=0;c=b.startIndex=0;for(b=this.__threads.length;c<b;)d=c++,d=this.__threads[d],d!=null&&d.jobID!=null&&d.thread.sendMessage({event:"IDLE"});if(a!=null)for(b=this.__singleThreadedJobs,c=b.jobs,b=b.startIndex;b<c.length;)d=c[b++],this.__activeJob.value=d,this.onError.dispatch(a);b=this.__singleThreadedJobs;b.jobs.length=0;b.startIndex=0;0!=this.__singleThreadedJobRunning&&(Ke.__totalWorkPriority-=this.workPriority);this.__singleThreadedJobRunning=!1;this.__jobComplete.value=
!1;this.__activeJob.value=null},cancelJob:function(a){if(this.__singleThreadedJobs.removeJob(a)!=null)return a=this.__singleThreadedJobs,a=a.jobs.length-a.startIndex>0,a!=this.__singleThreadedJobRunning&&(Ke.__totalWorkPriority=a?Ke.__totalWorkPriority+this.workPriority:Ke.__totalWorkPriority-this.workPriority),this.__singleThreadedJobRunning=a,!0;if(this.__multiThreadedJobs.removeJob(a)!=null){for(var b=0,c=this.__threads;b<c.length;){var d=c[b];++b;if(d!=null&&d.jobID==a){d.thread.sendMessage({event:"IDLE"});
break}}return!0}return!1},queue:function(a,b){return this.run(a,b)},run:function(a,b,c){if(Pb.__current.__worker!=null||Pb.__isWorker)throw la.thrown("Call run() only from the main thread.");c==null&&(c=this.mode);if(a==null){if(this.__doWork==null||c==1)throw la.thrown("run() requires doWork argument.");a=this.__doWork}b==null&&(b={});a=new Cn(a,b);c==1?(this.__multiThreadedJobs.jobs.push(a),this.__runMultiThreadedJob(a)):(this.__singleThreadedJobs.jobs.push(a),1!=this.__singleThreadedJobRunning&&
(Ke.__totalWorkPriority+=this.workPriority),this.__singleThreadedJobRunning=!0);Ha.current==null||Ha.current.onUpdate.has(m(this,this.__update))||Ha.current.onUpdate.add(m(this,this.__update));return a.id},__dispatchJobOutput:function(a){var b=this.__activeJob.value;this.__activeJob.value=null;var c=this.__singleThreadedJobs;c.jobs.length-c.startIndex>0?(c=this.__singleThreadedJobs,c=a.jobID==c.jobs[c.startIndex].id):c=!1;if(c)c=this.__singleThreadedJobs,this.__activeJob.value=c.jobs[c.startIndex];
else if(c=this.__multiThreadedJobs.getJob(a.jobID),(this.__activeJob.value=c)!=null)this.__activeJob.value.startTime>=0&&(c=(new Date).getTime()/1E3,this.__activeJob.value.duration=c-this.__activeJob.value.startTime),a.event!="COMPLETE"&&a.event!="ERROR"&&a.event!="UNCAUGHT_ERROR"||this.__multiThreadedJobs.removeJob(this.__activeJob.value.id);else if(a.jobID!=null){this.__activeJob.value=b;return}switch(a.event){case "COMPLETE":this.onComplete.dispatch(a.message);break;case "ERROR":this.onError.dispatch(a.message);
break;case "EXIT":c=this.__threads[a.threadID];c.jobID!=null?this.activeThreads--:this.__idleThreads--;this.__threads[a.threadID]=null;this.__queuedExitEvents--;break;case "IDLE":this.__onThreadIdle(a.threadID);break;case "PROGRESS":this.onProgress.dispatch(a.message);break;case "UNCAUGHT_ERROR":a.message instanceof la?this.onUncaughtError.__listeners.length>0?(this.onUncaughtError.dispatch(a.message),a=null):a=a.message.details():a=L.string(a.message);a!=null&&(this.__activeJob.value=null,Mb.error(a,
{fileName:"lime/system/ThreadPool.hx",lineNumber:529,className:"lime.system.ThreadPool",methodName:"__dispatchJobOutput"}));break;case "WORK":c=(new Date).getTime(),this.__activeJob.value.startTime=c/1E3,this.onRun.dispatch(this.__activeJob.value.state),c=this.__threads[a.threadID],c.jobID==null&&(this.__idleThreads--,this.activeThreads++),c.jobID=a.jobID}this.__activeJob.value=b},sendComplete:function(a,b){if(!this.__jobComplete.value){if(Pb.__current.__worker!=null||Pb.__isWorker)var c=!1;else c=
this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?(this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"COMPLETE",message:a,jobID:this.__activeJob.value.id})):Dj.prototype.sendComplete.call(this,a,b)}},sendError:function(a,b){if(!this.__jobComplete.value){if(Pb.__current.__worker!=null||Pb.__isWorker)var c=!1;else c=this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?(this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"ERROR",message:a,
jobID:this.__activeJob.value.id})):Dj.prototype.sendError.call(this,a,b)}},sendProgress:function(a,b){if(!this.__jobComplete.value){if(Pb.__current.__worker!=null||Pb.__isWorker)var c=!1;else c=this.__singleThreadedJobs,c=this.__activeJob.value==c.jobs[c.startIndex];c?this.__dispatchJobOutput({event:"PROGRESS",message:a,jobID:this.__activeJob.value.id}):Dj.prototype.sendProgress.call(this,a,b)}},__update:function(a){if(Pb.__current.__worker==null&&!Pb.__isWorker){a=(new Date).getTime()/1E3;if(Ke.__totalWorkPriority>
0){var b=60;Ha.current.__window!=null&&(b=Ha.current.__window.__backend.getFrameRate());a+=Ke.workLoad*this.workPriority/(b*Ke.__totalWorkPriority)}for(var c;;){b=this.__singleThreadedJobs;b.jobs.length-b.startIndex>0?(c=(new Date).getTime()/1E3,b=c<a):b=!1;if(!b)break;b=this.__singleThreadedJobs;this.__activeJob.value=b.jobs[b.startIndex];this.__activeJob.value.startTime>=0||(this.__activeJob.value.startTime=c,this.onRun.dispatch(this.__activeJob.value.state));this.__jobComplete.value=!1;this.workIterations.value=
0;try{do this.workIterations.value+=1,Uu.toFunction(this.__activeJob.value.doWork)(this.__activeJob.value.state,this);while(!this.__jobComplete.value&&(new Date).getTime()/1E3<a)}catch(d){b=la.caught(d),this.__jobComplete.value=!0,this.__dispatchJobOutput({event:"UNCAUGHT_ERROR",message:b,jobID:this.__activeJob.value.id})}b=(new Date).getTime()/1E3;this.__activeJob.value.duration+=b-c;this.__activeJob.value=null;this.__jobComplete.value&&(this.__singleThreadedJobs.shift(),b=this.__singleThreadedJobs,
b=b.jobs.length-b.startIndex>0,b!=this.__singleThreadedJobRunning&&(Ke.__totalWorkPriority=b?Ke.__totalWorkPriority+this.workPriority:Ke.__totalWorkPriority-this.workPriority),this.__singleThreadedJobRunning=b)}for(this.__runMultiThreadedJobs();;){c=this.__jobOutput.pop();if(c==null)break;this.__dispatchJobOutput(c)}b=this.__singleThreadedJobs;this.activeThreads+(b.jobs.length-b.startIndex>0?1:0)+this.__queuedExitEvents<=0&&Ha.current.onUpdate.remove(m(this,this.__update))}},__onThreadIdle:function(a){if(Pb.__current.__worker!=
null||Pb.__isWorker)throw la.thrown("Call __onThreadIdle() only from the main thread.");var b=this.__threads[a];b!=null&&(b.jobID!=null&&(b.jobID=null,this.activeThreads--,this.__idleThreads++),this.__runMultiThreadedJobs(),this.__idleThreads-this.__queuedExitEvents>this.minThreads&&(b.thread.destroy(),this.__threads[a]=null,this.__idleThreads--))},__runMultiThreadedJob:function(a){if(a.startTime>=0)throw la.thrown("Job "+a.id+" was already started!");Uu.makePortable(a.doWork);var b={event:"WORK",
jobID:a.id,doWork:a.doWork,state:a.state},c=null;if(this.__idleThreads-this.__queuedExitEvents>0)for(var d=0,f=this.__threads;d<f.length;){var g=f[d];++d;if(g!=null&&g.jobID==null){c=g;break}}if(c==null){if(this.activeThreads+(this.__idleThreads-this.__queuedExitEvents)>=this.maxThreads)return;var h=this.createThread({func:Ke.__executeThread,classPath:"lime.system.ThreadPool",functionName:"__executeThread"});d=0;for(f=this.__threads;d<f.length;)if(g=f[d],++d,g.thread==h){c=g;break}if(c==null)return}c.jobID=
a.id;c.thread.sendMessage(b);this.__idleThreads--;this.activeThreads++;a.startTime=0},__runMultiThreadedJobs:function(){if(!(this.activeThreads>=this.maxThreads)){var a=this.__multiThreadedJobs,b=a.jobs;for(a=a.startIndex;a<b.length;){var c=b[a++];if(!(c.startTime>=0)&&(this.__runMultiThreadedJob(c),this.activeThreads>=this.maxThreads))break}}},createThread:function(a){a=Dj.prototype.createThread.call(this,a);var b=this.__threads.indexOf(null);b<0&&(b=this.__threads.length);this.__threads[b]={thread:a,
jobID:null};this.__idleThreads++;a.sendMessage({threadID:b});return a},get_activeJobs:function(){var a=this.__singleThreadedJobs;return this.activeThreads+(a.jobs.length-a.startIndex>0?1:0)},get_currentThreads:function(){return this.activeThreads+(this.__idleThreads-this.__queuedExitEvents)},get_doWork:function(){return this},get_idleThreads:function(){return this.__idleThreads-this.__queuedExitEvents},set___singleThreadedJobRunning:function(a){a!=this.__singleThreadedJobRunning&&(Ke.__totalWorkPriority=
a?Ke.__totalWorkPriority+this.workPriority:Ke.__totalWorkPriority-this.workPriority);return this.__singleThreadedJobRunning=a},set_workPriority:function(a){this.__singleThreadedJobRunning&&(Ke.__totalWorkPriority+=a-this.workPriority);return this.workPriority=a},__class__:Ke,__properties__:I(Dj.prototype.__properties__,{set___singleThreadedJobRunning:"set___singleThreadedJobRunning",get_doWork:"get_doWork",set_workPriority:"set_workPriority",get_idleThreads:"get_idleThreads",get_currentThreads:"get_currentThreads",
get_activeJobs:"get_activeJobs"})});var Or=function(){this.startIndex=0;this.jobs=[]};r["lime.system._ThreadPool.JobArray"]=Or;Or.__name__="lime.system._ThreadPool.JobArray";Or.prototype={jobs:null,startIndex:null,clear:function(){this.startIndex=this.jobs.length=0},first:function(){return this.jobs[this.startIndex]},getJob:function(a){for(var b=this.startIndex,c=this.jobs.length;b<c;){var d=b++;if(this.jobs[d].id==a)return this.jobs[d]}return null},get_length:function(){return this.jobs.length-this.startIndex},
iterator:function(){return new qv(this.jobs,this.startIndex)},push:function(a){return this.jobs.push(a)},removeJob:function(a){for(var b=this.startIndex,c=this.jobs.length;b<c;){var d=b++,f=this.jobs[d];if(f.id==a){if((d-this.startIndex)*2<=this.jobs.length-this.startIndex){for(a=d;a>this.startIndex;)this.jobs[a]=this.jobs[a-1],--a;this.shift()}else this.jobs.splice(d,1);return f}}return null},shift:function(){var a=this.jobs[this.startIndex];this.jobs[this.startIndex]=null;this.startIndex++;this.startIndex>=
this.jobs.length?this.startIndex=this.jobs.length=0:this.startIndex>=100&&(this.jobs.splice(0,this.startIndex),this.startIndex=0);return a},__class__:Or,__properties__:{get_length:"get_length"}};var qv=function(a,b){this.jobs=a;this.index=b};r["lime.system._ThreadPool.JobArrayIterator"]=qv;qv.__name__="lime.system._ThreadPool.JobArrayIterator";qv.prototype={index:null,jobs:null,hasNext:function(){return this.index<this.jobs.length},next:function(){return this.jobs[this.index++]},__class__:qv};var Cn=
function(a,b,c){this.startTime=-1;this.duration=0;this.id=c!=null?c:Cn.nextID++;this.doWork=a;this.state=b};r["lime.system.JobData"]=Cn;Cn.__name__="lime.system.JobData";Cn.prototype={id:null,doWork:null,state:null,duration:null,startTime:null,get_started:function(){return this.startTime>=0},__class__:Cn,__properties__:{get_started:"get_started"}};var fx=function(){};r["lime.system.JSAsync"]=fx;fx.__name__="lime.system.JSAsync";var rp=function(){};r["lime.system.Tls"]=rp;rp.__name__="lime.system.Tls";
rp.prototype={value:null,__class__:rp};var hf=function(a){a!=null&&(this.name=a);this.__init||(this.ascender==void 0&&(this.ascender=0),this.descender==void 0&&(this.descender=0),this.height==void 0&&(this.height=0),this.numGlyphs==void 0&&(this.numGlyphs=0),this.underlinePosition==void 0&&(this.underlinePosition=0),this.underlineThickness==void 0&&(this.underlineThickness=0),this.unitsPerEM==void 0&&(this.unitsPerEM=0),this.__fontID!=null?bb.isLocal(this.__fontID)&&this.__fromBytes(bb.getBytes(this.__fontID)):
this.__fontPath!=null&&this.__fromFile(this.__fontPath))};r["lime.text.Font"]=hf;hf.__name__="lime.text.Font";hf.fromBytes=function(a){if(a==null)return null;var b=new hf;b.__fromBytes(a);return b};hf.fromFile=function(a){if(a==null)return null;var b=new hf;b.__fromFile(a);return b};hf.loadFromBytes=function(a){return zc.withValue(hf.fromBytes(a))};hf.loadFromFile=function(a){return(new Lr).load(a).then(function(b){return b!=null?zc.withValue(b):zc.withError("")})};hf.loadFromName=function(a){return(new hf).__loadFromName(a)};
hf.__measureFontNode=function(a){var b=window.document.createElement("span");b.setAttribute("aria-hidden","true");var c=window.document.createTextNode("BESbswy");b.appendChild(c);c=b.style;c.display="block";c.position="absolute";c.top="-9999px";c.left="-9999px";c.fontSize="300px";c.width="auto";c.height="auto";c.lineHeight="normal";c.margin="0";c.padding="0";c.fontVariant="normal";c.whiteSpace="nowrap";c.fontFamily=a;window.document.body.appendChild(b);return b};hf.prototype={ascender:null,descender:null,
height:null,name:null,numGlyphs:null,src:null,underlinePosition:null,underlineThickness:null,strikethroughPosition:null,strikethroughThickness:null,unitsPerEM:null,__fontID:null,__fontPath:null,__init:null,decompose:function(){return null},getGlyph:function(a){return-1},getGlyphs:function(a){return null},getGlyphMetrics:function(a){return null},renderGlyph:function(a,b){return null},renderGlyphs:function(a,b){return null},__copyFrom:function(a){a!=null&&(this.ascender=a.ascender,this.descender=a.descender,
this.height=a.height,this.name=a.name,this.numGlyphs=a.numGlyphs,this.src=a.src,this.underlinePosition=a.underlinePosition,this.underlineThickness=a.underlineThickness,this.unitsPerEM=a.unitsPerEM,this.__fontID=a.__fontID,this.__fontPath=a.__fontPath,this.__init=!0)},__fromBytes:function(a){this.__fontPath=null},__fromFile:function(a){this.__fontPath=a},__initializeSource:function(){this.__init=!0},__loadFromName:function(a){var b=this,c=new yf;this.name=a;var d=sa.navigator.userAgent.toLowerCase(),
f=d.indexOf(" safari/")>=0&&d.indexOf(" chrome/")<0;d=(new sb("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i")).match(d);if(!f&&!d&&window.document.fonts&&(G=window.document.fonts,m(G,G.load)))window.document.fonts.load("1em '"+a+"'").then(function(n){c.complete(b)},function(n){Mb.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:656,className:"lime.text.Font",methodName:"__loadFromName"});c.complete(b)});else{var g=hf.__measureFontNode("'"+a+"', sans-serif"),h=hf.__measureFontNode("'"+
a+"', serif"),l=g.offsetWidth,k=h.offsetWidth,q=-1,w=0,v,z;q=window.setInterval(function(){w+=1;v=g.offsetWidth!=l||h.offsetWidth!=k;z=w*50>=3E3;if(v||z)window.clearInterval(q),g.parentNode.removeChild(g),h.parentNode.removeChild(h),h=g=null,z&&Mb.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:692,className:"lime.text.Font",methodName:"__loadFromName"}),c.complete(b)},50)}return c.future},__setSize:function(a,b){},__class__:hf};var jw=function(){};r["lime.text.GlyphMetrics"]=
jw;jw.__name__="lime.text.GlyphMetrics";jw.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:jw};var Sw=function(){};r["lime.text.harfbuzz.HB"]=Sw;Sw.__name__="lime.text.harfbuzz.HB";Sw.shape=function(a,b,c){};var rx={__properties__:{set_segmentProperties:"set_segmentProperties",get_segmentProperties:"get_segmentProperties",set_script:"set_script",get_script:"get_script",set_replacementCodepoint:"set_replacementCodepoint",get_replacementCodepoint:"get_replacementCodepoint",
set_length:"set_length",get_length:"get_length",set_language:"set_language",get_language:"get_language",set_flags:"set_flags",get_flags:"get_flags",set_direction:"set_direction",get_direction:"get_direction",set_contentType:"set_contentType",get_contentType:"get_contentType",set_clusterLevel:"set_clusterLevel",get_clusterLevel:"get_clusterLevel",get_allocationSuccessful:"get_allocationSuccessful"},_new:function(){return null},add:function(a,b,c){},addString:function(a,b,c,d){},addCodepoints:function(a,
b,c,d,f){},addUTF8:function(a,b,c,d){},addUTF16:function(a,b,c,d,f){},addUTF32:function(a,b,c,d,f){},clearContents:function(a){},getGlyphInfo:function(a){return null},getGlyphPositions:function(a){return null},guessSegmentProperties:function(a){},normalizeGlyphs:function(a){},preallocate:function(a,b){return!1},reset:function(a){},reverse:function(a){},reverseClusters:function(a){},get_allocationSuccessful:function(a){return!1},get_clusterLevel:function(a){return 0},set_clusterLevel:function(a,b){return b},
get_contentType:function(a){return 0},set_contentType:function(a,b){return b},get_direction:function(a){return 0},set_direction:function(a,b){return b},get_empty:function(){return null},get_flags:function(a){return 0},set_flags:function(a,b){return b},get_language:function(a){return null},set_language:function(a,b){return b},get_length:function(a){return 0},set_length:function(a,b){return b},get_replacementCodepoint:function(a){return 0},set_replacementCodepoint:function(a,b){return b},get_script:function(a){return 0},
set_script:function(a,b){return b},get_segmentProperties:function(a){return null},set_segmentProperties:function(a,b){return b}},kw=function(){};r["lime.text.harfbuzz.HBFeature"]=kw;kw.__name__="lime.text.harfbuzz.HBFeature";kw.prototype={__class__:kw};var lw=function(){};r["lime.text.harfbuzz.HBGlyphInfo"]=lw;lw.__name__="lime.text.harfbuzz.HBGlyphInfo";lw.prototype={codepoint:null,mask:null,cluster:null,__class__:lw};var mw=function(){};r["lime.text.harfbuzz.HBGlyphPosition"]=mw;mw.__name__="lime.text.harfbuzz.HBGlyphPosition";
mw.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:mw};var gx={_new:function(a){return null},toString:function(a){return null},fromString:function(a){return gx._new(a)}},nw=function(){};r["lime.text.harfbuzz.HBSegmentProperties"]=nw;nw.__name__="lime.text.harfbuzz.HBSegmentProperties";nw.prototype={__class__:nw};var sp=function(){this.onSelectMultiple=new Wu;this.onSelect=new zn;this.onSave=new zn;this.onOpen=new iv;this.onCancel=new Se};r["lime.ui.FileDialog"]=sp;sp.__name__=
"lime.ui.FileDialog";sp.prototype={onCancel:null,onOpen:null,onSave:null,onSelect:null,onSelectMultiple:null,browse:function(a,b,c,d){this.onCancel.dispatch();return!1},open:function(a,b,c){this.onCancel.dispatch();return!1},save:function(a,b,c,d,f){f==null&&(f="application/octet-stream");if(a==null)return this.onCancel.dispatch(),!1;b="";Ic.__isPNG(a)?(f="image/png",b=".png"):Ic.__isJPG(a)?(f="image/jpeg",b=".jpg"):Ic.__isGIF(a)?(f="image/gif",b=".gif"):Ic.__isWebP(a)&&(f="image/webp",b=".webp");
c=c!=null?rg.withoutDirectory(c):"download"+b;b=a.b.bufferValue;b=b.slice(0,a.length);window.saveAs(new Blob([b],{type:f}),c,!0);this.onSave.dispatch(c);return!0},__class__:sp};var Pr=O["lime.ui.FileDialogType"]={__ename__:"lime.ui.FileDialogType",__constructs__:null,OPEN:{_hx_name:"OPEN",_hx_index:0,__enum__:"lime.ui.FileDialogType",toString:D},OPEN_MULTIPLE:{_hx_name:"OPEN_MULTIPLE",_hx_index:1,__enum__:"lime.ui.FileDialogType",toString:D},SAVE:{_hx_name:"SAVE",_hx_index:2,__enum__:"lime.ui.FileDialogType",
toString:D},OPEN_DIRECTORY:{_hx_name:"OPEN_DIRECTORY",_hx_index:3,__enum__:"lime.ui.FileDialogType",toString:D}};Pr.__constructs__=[Pr.OPEN,Pr.OPEN_MULTIPLE,Pr.SAVE,Pr.OPEN_DIRECTORY];var cf=function(a){this.onDisconnect=new Se;this.onButtonUp=new Gr;this.onButtonDown=new Gr;this.onAxisMove=new fv;this.id=a;this.connected=!0;this.__jsGamepad=Ce.__getDeviceData()[this.id]};r["lime.ui.Gamepad"]=cf;cf.__name__="lime.ui.Gamepad";cf.addMappings=function(a){};cf.__connect=function(a){if(!cf.devices.h.hasOwnProperty(a)){var b=
new cf(a);cf.devices.h[a]=b;cf.onConnect.dispatch(b)}};cf.__disconnect=function(a){var b=cf.devices.h[a];b!=null&&(b.connected=!1);cf.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};cf.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,__jsGamepad:null,rumble:function(a,b,c){var d=this.__jsGamepad.vibrationActuator?this.__jsGamepad.vibrationActuator:this.__jsGamepad.hapticActuators?this.__jsGamepad.hapticActuators[0]:null;d!=null&&(d.playEffect?
d.playEffect("dual-rumble",{duration:c,strongMagnitude:a,weakMagnitude:b}):d.pulse&&d.pulse(a,c))},get_guid:function(){return this.__jsGamepad.id},get_name:function(){return this.__jsGamepad.id},__class__:cf,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Ce=function(a){this.onHatMove=new bv;this.onDisconnect=new Se;this.onButtonUp=new Ol;this.onButtonDown=new Ol;this.onAxisMove=new av;this.id=a;this.connected=!0};r["lime.ui.Joystick"]=Ce;Ce.__name__="lime.ui.Joystick";Ce.__connect=
function(a){if(!Ce.devices.h.hasOwnProperty(a)){var b=new Ce(a);Ce.devices.h[a]=b;Ce.onConnect.dispatch(b)}};Ce.__disconnect=function(a){var b=Ce.devices.h[a];b!=null&&(b.connected=!1);Ce.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};Ce.__getDeviceData=function(){var a=null;try{a=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null}catch(b){Rb.lastError=b}return a};Ce.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,
onButtonUp:null,onDisconnect:null,onHatMove:null,get_guid:function(){return Ce.__getDeviceData()[this.id].id},get_name:function(){return Ce.__getDeviceData()[this.id].id},get_numAxes:function(){return Ce.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return Ce.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},__class__:Ce,__properties__:{get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};
var tc={__properties__:{set_shiftKey:"set_shiftKey",get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"},get_altKey:function(a){return(a&256)<=0?(a&512)>0:!0},set_altKey:function(a,b){return b},get_capsLock:function(a){return(a&8192)<=0?(a&8192)>0:!0},set_capsLock:function(a,
b){return b},get_ctrlKey:function(a){return(a&64)<=0?(a&128)>0:!0},set_ctrlKey:function(a,b){return b},get_metaKey:function(a){return(a&1024)<=0?(a&2048)>0:!0},set_metaKey:function(a,b){return b},get_numLock:function(a){return(a&4096)<=0?(a&4096)>0:!0},set_numLock:function(a,b){return b},get_shiftKey:function(a){return(a&1)<=0?(a&2)>0:!0},set_shiftKey:function(a,b){return b}},$c=O["lime.ui.MouseCursor"]={__ename__:"lime.ui.MouseCursor",__constructs__:null,ARROW:{_hx_name:"ARROW",_hx_index:0,__enum__:"lime.ui.MouseCursor",
toString:D},CROSSHAIR:{_hx_name:"CROSSHAIR",_hx_index:1,__enum__:"lime.ui.MouseCursor",toString:D},DEFAULT:{_hx_name:"DEFAULT",_hx_index:2,__enum__:"lime.ui.MouseCursor",toString:D},MOVE:{_hx_name:"MOVE",_hx_index:3,__enum__:"lime.ui.MouseCursor",toString:D},POINTER:{_hx_name:"POINTER",_hx_index:4,__enum__:"lime.ui.MouseCursor",toString:D},RESIZE_NESW:{_hx_name:"RESIZE_NESW",_hx_index:5,__enum__:"lime.ui.MouseCursor",toString:D},RESIZE_NS:{_hx_name:"RESIZE_NS",_hx_index:6,__enum__:"lime.ui.MouseCursor",
toString:D},RESIZE_NWSE:{_hx_name:"RESIZE_NWSE",_hx_index:7,__enum__:"lime.ui.MouseCursor",toString:D},RESIZE_WE:{_hx_name:"RESIZE_WE",_hx_index:8,__enum__:"lime.ui.MouseCursor",toString:D},TEXT:{_hx_name:"TEXT",_hx_index:9,__enum__:"lime.ui.MouseCursor",toString:D},WAIT:{_hx_name:"WAIT",_hx_index:10,__enum__:"lime.ui.MouseCursor",toString:D},WAIT_ARROW:{_hx_name:"WAIT_ARROW",_hx_index:11,__enum__:"lime.ui.MouseCursor",toString:D},CUSTOM:{_hx_name:"CUSTOM",_hx_index:12,__enum__:"lime.ui.MouseCursor",
toString:D}};$c.__constructs__=[$c.ARROW,$c.CROSSHAIR,$c.DEFAULT,$c.MOVE,$c.POINTER,$c.RESIZE_NESW,$c.RESIZE_NS,$c.RESIZE_NWSE,$c.RESIZE_WE,$c.TEXT,$c.WAIT,$c.WAIT_ARROW,$c.CUSTOM];var yl=O["lime.ui.MouseWheelMode"]={__ename__:"lime.ui.MouseWheelMode",__constructs__:null,PIXELS:{_hx_name:"PIXELS",_hx_index:0,__enum__:"lime.ui.MouseWheelMode",toString:D},LINES:{_hx_name:"LINES",_hx_index:1,__enum__:"lime.ui.MouseWheelMode",toString:D},PAGES:{_hx_name:"PAGES",_hx_index:2,__enum__:"lime.ui.MouseWheelMode",
toString:D},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:3,__enum__:"lime.ui.MouseWheelMode",toString:D}};yl.__constructs__=[yl.PIXELS,yl.LINES,yl.PAGES,yl.UNKNOWN];var De=function(a,b,c,d,f,g,h){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=f;this.pressure=g;this.device=h};r["lime.ui.Touch"]=De;De.__name__="lime.ui.Touch";De.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:De};var Pl=function(a,b){this.__maxWidth=this.__maxHeight=2147483647;this.clickCount=this.__minWidth=
this.__minHeight=0;this.onTextInput=new zn;this.onTextEdit=new cv;this.onShow=new Se;this.onRestore=new Se;this.onResize=new Er;this.onRenderContextRestored=new Fr;this.onRenderContextLost=new Se;this.onRender=new Fr;this.onMove=new pp;this.onMouseWheel=new $u;this.onMouseUp=new Yu;this.onMouseMoveRelative=new pp;this.onMouseMove=new pp;this.onMouseDown=new Zu;this.onMinimize=new Se;this.onMaximize=new Se;this.onLeave=new Se;this.onKeyUp=new Hr;this.onKeyDown=new Hr;this.onHide=new Se;this.onFullscreen=
new Se;this.onFocusOut=new Se;this.onFocusIn=new Se;this.onExpose=new Se;this.onEnter=new Se;this.onDropFile=new zn;this.onDeactivate=new Se;this.onClose=new Se;this.onActivate=new Se;this.application=a;this.__attributes=b!=null?b:{};Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")&&(this.parameters=this.__attributes.parameters);this.__height=this.__width=0;this.__fullscreen=!1;this.__scale=1;this.__y=this.__x=0;this.__title=Object.prototype.hasOwnProperty.call(this.__attributes,
"title")?this.__attributes.title:"";this.__hidden=!1;this.__borderless=Object.prototype.hasOwnProperty.call(this.__attributes,"borderless")&&this.__attributes.borderless;this.__resizable=Object.prototype.hasOwnProperty.call(this.__attributes,"resizable")&&this.__attributes.resizable;this.__maximized=Object.prototype.hasOwnProperty.call(this.__attributes,"maximized")&&this.__attributes.maximized;this.__minimized=Object.prototype.hasOwnProperty.call(this.__attributes,"minimized")&&this.__attributes.minimized;
this.id=-1;this.__backend=new qc(this)};r["lime.ui.Window"]=Pl;Pl.__name__="lime.ui.Window";Pl.prototype={application:null,context:null,display:null,element:null,hidden:null,id:null,onActivate:null,onClose:null,onDeactivate:null,onDropFile:null,onEnter:null,onExpose:null,onFocusIn:null,onFocusOut:null,onFullscreen:null,onHide:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMaximize: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,onShow:null,onTextEdit:null,onTextInput:null,parameters:null,scale:null,stage:null,clickCount:null,__attributes:null,__backend:null,__borderless:null,__fullscreen:null,__height:null,__hidden:null,__maximized:null,__minimized:null,__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,__minWidth:null,__minHeight:null,__maxWidth:null,__maxHeight:null,alert:function(a,b){this.__backend.alert(a,
b)},close:function(){this.__backend.close()},focus:function(){this.__backend.focus()},move:function(a,b){this.__backend.move(a,b);this.__x=a;this.__y=b},readPixels:function(a){return this.__backend.readPixels(a)},resize:function(a,b){a<this.__minWidth?a=this.__minWidth:a>this.__maxWidth&&(a=this.__maxWidth);b<this.__minHeight?b=this.__minHeight:b>this.__maxHeight&&(b=this.__maxHeight);this.__backend.resize(a,b);this.__width=a;this.__height=b},setMinSize:function(a,b){this.__backend.setMinSize(a,b);
this.__minWidth=a;this.__minHeight=b;(this.__width<this.__minWidth||this.__height<this.__minHeight)&&this.resize(this.__width,this.__height)},setMaxSize:function(a,b){this.__backend.setMaxSize(a,b);this.__maxWidth=a;this.__maxHeight=b;(this.__width>this.__maxWidth||this.__height>this.__maxHeight)&&this.resize(this.__width,this.__height)},setIcon:function(a){a!=null&&this.__backend.setIcon(a)},toString:function(){return"[object Window]"},warpMouse:function(a,b){this.__backend.warpMouse(a,b)},get_cursor:function(){return this.__backend.getCursor()},
set_cursor:function(a){return this.__backend.setCursor(a)},get_display:function(){return this.__backend.getDisplay()},get_displayMode:function(){return this.__backend.getDisplayMode()},set_displayMode:function(a){return this.__backend.setDisplayMode(a)},get_borderless:function(){return this.__borderless},set_borderless:function(a){return this.__borderless=this.__backend.setBorderless(a)},get_frameRate:function(){return this.__backend.getFrameRate()},set_frameRate:function(a){return this.__backend.setFrameRate(a)},
get_fullscreen:function(){return this.__fullscreen},set_fullscreen:function(a){return this.__fullscreen=this.__backend.setFullscreen(a)},get_height:function(){return this.__height},set_height:function(a){this.resize(this.__width,a);return this.__height},get_hidden:function(){return this.__hidden},get_maxHeight:function(){return this.__maxHeight},set_maxHeight:function(a){this.setMaxSize(this.__maxWidth,a);return this.__maxHeight},get_maximized:function(){return this.__maximized},set_maximized:function(a){this.__minimized=
!1;return this.__maximized=this.__backend.setMaximized(a)},get_maxWidth:function(){return this.__maxWidth},set_maxWidth:function(a){this.setMinSize(a,this.__maxHeight);return this.__maxWidth},get_minHeight:function(){return this.__minHeight},set_minHeight:function(a){this.setMinSize(this.__minWidth,a);return this.__minHeight},get_minimized:function(){return this.__minimized},set_minimized:function(a){this.__maximized=!1;return this.__minimized=this.__backend.setMinimized(a)},get_minWidth:function(){return this.__minWidth},
set_minWidth:function(a){this.setMinSize(a,this.__minHeight);return this.__minWidth},get_mouseLock:function(){return this.__backend.getMouseLock()},set_mouseLock:function(a){this.__backend.setMouseLock(a);return a},get_opacity:function(){return this.__backend.getOpacity()},set_opacity:function(a){this.__backend.setOpacity(a);return a},get_resizable:function(){return this.__resizable},set_resizable:function(a){return this.__resizable=this.__backend.setResizable(a)},get_scale:function(){return this.__scale},
get_textInputEnabled:function(){return this.__backend.getTextInputEnabled()},set_textInputEnabled:function(a){return this.__backend.setTextInputEnabled(a)},setTextInputRect:function(a){return this.__backend.setTextInputRect(a)},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.__backend.setTitle(a)},get_visible:function(){return!this.__hidden},set_visible:function(a){this.__hidden=!this.__backend.setVisible(a);return!this.__hidden},get_width:function(){return this.__width},
set_width:function(a){this.resize(a,this.__height);return this.__width},get_x:function(){return this.__x},set_x:function(a){this.move(a,this.__y);return this.__x},get_y:function(){return this.__y},set_y:function(a){this.move(this.__x,a);return this.__y},__class__:Pl,__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_title:"set_title",get_title:"get_title",set_textInputEnabled:"set_textInputEnabled",
get_textInputEnabled:"get_textInputEnabled",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_opacity:"set_opacity",get_opacity:"get_opacity",set_mouseLock:"set_mouseLock",get_mouseLock:"get_mouseLock",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",set_minimized:"set_minimized",get_minimized:"get_minimized",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",set_maximized:"set_maximized",get_maximized:"get_maximized",
set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",get_hidden:"get_hidden",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_displayMode:"set_displayMode",get_displayMode:"get_displayMode",get_display:"get_display",set_cursor:"set_cursor",get_cursor:"get_cursor",set_borderless:"set_borderless",get_borderless:"get_borderless"}};var hx=O["lime.utils.TAError"]={__ename__:"lime.utils.TAError",
__constructs__:null,RangeError:{_hx_name:"RangeError",_hx_index:0,__enum__:"lime.utils.TAError",toString:D}};hx.__constructs__=[hx.RangeError];var cj=function(){this.data=new aa;this.paths=[]};r["lime.utils.AssetBundle"]=cj;cj.__name__="lime.utils.AssetBundle";cj.fromBytes=function(a){a=new un(a);return cj.__extractBundle(a)};cj.fromFile=function(a){return null};cj.loadFromBytes=function(a){return zc.withValue(cj.fromBytes(a))};cj.loadFromFile=function(a){return hg.loadFromFile(a).then(cj.loadFromBytes)};
cj.__extractBundle=function(a){var b=np.readZip(a);a=new cj;for(b=b.h;b!=null;){var c=b.item;b=b.next;if(c.compressed){var d=a.data,f=c.fileName,g=hg.decompress(c.data,ek.DEFLATE);d.h[f]=g}else a.data.h[c.fileName]=c.data;a.paths.push(c.fileName)}return a};cj.prototype={data:null,paths:null,__class__:cj};var rv=function(){this.enabled=!0;this.audio=new aa;this.font=new aa;this.image=new aa;this.version=229267};r["lime.utils.AssetCache"]=rv;rv.__name__="lime.utils.AssetCache";rv.prototype={audio:null,
enabled:null,image:null,font:null,version:null,exists:function(a,b){return(b=="IMAGE"||b==null)&&Object.prototype.hasOwnProperty.call(this.image.h,a)||(b=="FONT"||b==null)&&Object.prototype.hasOwnProperty.call(this.font.h,a)||(b=="SOUND"||b=="MUSIC"||b==null)&&Object.prototype.hasOwnProperty.call(this.audio.h,a)?!0:!1},set:function(a,b,c){switch(b){case "FONT":this.font.h[a]=c;break;case "IMAGE":if(!(c instanceof Ic))throw la.thrown("Cannot cache non-Image asset: "+L.string(c)+" as Image");this.image.h[a]=
c;break;case "MUSIC":case "SOUND":if(!(c instanceof ce))throw la.thrown("Cannot cache non-AudioBuffer asset: "+L.string(c)+" as AudioBuffer");this.audio.h[a]=c;break;default:throw la.thrown(b+" assets are not cachable");}},clear:function(a){if(a==null)this.audio=new aa,this.font=new aa,this.image=new aa;else{var b=this.audio.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];if(Z.startsWith(f,a)){var g=this.audio;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}}b=this.font.h;
b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],Z.startsWith(f,a)&&(g=this.font,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]);b=this.image.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],Z.startsWith(f,a)&&(g=this.image,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f])}},__class__:rv};var dd=function(){this.types=new aa;this.sizes=new aa;this.preload=new aa;this.paths=new aa;this.pathGroups=new aa;this.classTypes=new aa;this.cachedText=new aa;this.cachedImages=new aa;
this.cachedFonts=new aa;this.cachedBytes=new aa;this.cachedAudioBuffers=new aa;this.onChange=new Se;this.bytesTotal=this.bytesLoaded=0};r["lime.utils.AssetLibrary"]=dd;dd.__name__="lime.utils.AssetLibrary";dd.fromBytes=function(a,b){return dd.fromManifest(se.fromBytes(a,b))};dd.fromFile=function(a,b){return dd.fromManifest(se.fromFile(a,b))};dd.fromBundle=function(a){if(Object.prototype.hasOwnProperty.call(a.data.h,"library.json")){var b=se.fromBytes(a.data.h["library.json"]);if(b!=null){if(b.libraryType==
null)var c=new dd;else if(c=r[b.libraryType],c!=null)c=Aa.createInstance(c,b.libraryArgs);else return Mb.warn("Could not find library type: "+b.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:122,className:"lime.utils.AssetLibrary",methodName:"fromBundle"}),null;c.__fromBundle(a,b);return c}}else return c=new dd,c.__fromBundle(a),c;return null};dd.fromManifest=function(a){if(a==null)return null;if(a.libraryType==null)var b=new dd;else if(b=r[a.libraryType],b!=null)b=Aa.createInstance(b,
a.libraryArgs);else return Mb.warn("Could not find library type: "+a.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:160,className:"lime.utils.AssetLibrary",methodName:"fromManifest"}),null;b.__fromManifest(a);return b};dd.loadFromBytes=function(a,b){return se.loadFromBytes(a,b).then(function(c){return dd.loadFromManifest(c)})};dd.loadFromFile=function(a,b){return se.loadFromFile(a,b).then(function(c){return dd.loadFromManifest(c)})};dd.loadFromManifest=function(a){a=dd.fromManifest(a);
return a!=null?a.load():zc.withError("Could not load asset manifest")};dd.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(a,b){b=b!=null?u.__cast(b,String):null;a=this.types.h[a];return a==null||a!=b&&(b!="SOUND"&&b!="MUSIC"||
a!="MUSIC"&&a!="SOUND")&&b!="BINARY"&&b!=null&&(a!="BINARY"||b!="TEXT")?!1:!0},getAsset:function(a,b){switch(b){case "BINARY":return this.getBytes(a);case "FONT":return this.getFont(a);case "IMAGE":return this.getImage(a);case "MUSIC":case "SOUND":return this.getAudioBuffer(a);case "TEMPLATE":throw la.thrown("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw la.thrown("Unknown asset type: "+b);}},getAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,
a)?this.cachedAudioBuffers.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?ce.fromBytes(u.__cast(Aa.createInstance(this.classTypes.h[a],[]),Ia)):ce.fromFile(this.getPath(a))},getBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return this.cachedBytes.h[a];if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a)){var b=hg.ofString(this.cachedText.h[a]);return this.cachedBytes.h[a]=b}return Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?u.__cast(Aa.createInstance(this.classTypes.h[a],
[]),Ia):hg.fromFile(this.getPath(a))},getFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?this.cachedFonts.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?u.__cast(Aa.createInstance(this.classTypes.h[a],[]),hf):hf.fromFile(this.getPath(a))},getImage:function(a){return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?this.cachedImages.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?u.__cast(Aa.createInstance(this.classTypes.h[a],
[]),Ic):Ic.fromFile(this.getPath(a))},getPath:function(a){return Object.prototype.hasOwnProperty.call(this.paths.h,a)?this.paths.h[a]:Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?this.pathGroups.h[a][0]:null},getText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return this.cachedText.h[a];a=this.getBytes(a);return a==null?null:a.getString(0,a.length)},isLocal:function(a,b){if(Object.prototype.hasOwnProperty.call(this.classTypes.h,a))return!0;b=u.__cast(b,String);
if(b==null)return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.cachedText.h,a)||Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)||Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);switch(b){case "FONT":return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);case "IMAGE":return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a);case "MUSIC":case "SOUND":return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,
a);default:return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedText.h,a)}},list:function(a){for(var b=a!=null?u.__cast(a,String):null,c=[],d=Object.keys(this.types.h),f=d.length,g=0;g<f;){var h=d[g++];(b==null||this.exists(h,a))&&c.push(h)}return c},loadAsset:function(a,b){switch(b){case "BINARY":return this.loadBytes(a);case "FONT":return this.loadFont(a);case "IMAGE":return this.loadImage(a);case "MUSIC":case "SOUND":return this.loadAudioBuffer(a);
case "TEMPLATE":throw la.thrown("Not sure how to load template: "+a);case "TEXT":return this.loadText(a);default:throw la.thrown("Unknown asset type: "+b);}},load:function(){if(this.loaded)return zc.withValue(this);if(this.promise==null){this.promise=new yf;this.bytesLoadedCache=new aa;this.assetsLoaded=0;this.assetsTotal=1;for(var a=Object.keys(this.preload.h),b=a.length,c=0;c<b;){var d=a[c++];if(this.preload.h[d]){Mb.verbose("Preloading asset: "+d+" ["+this.types.h[d]+"]",{fileName:"lime/utils/AssetLibrary.hx",
lineNumber:408,className:"lime.utils.AssetLibrary",methodName:"load"});var f=this.types.h[d];if(f!=null)switch(f){case "BINARY":this.assetsTotal++;f=this.loadBytes(d);f.onProgress(function(g,h){return function(l,k){h[0].load_onProgress(g[0],l,k)}}([d],[this]));f.onError(function(g,h){return function(l){h[0].load_onError(g[0],l)}}([d],[this]));f.onComplete(function(g,h){return function(l){h[0].loadBytes_onComplete(g[0],l)}}([d],[this]));break;case "FONT":this.assetsTotal++;f=this.loadFont(d);f.onProgress(function(g,
h){return function(l,k){h[0].load_onProgress(g[0],l,k)}}([d],[this]));f.onError(function(g,h){return function(l){h[0].load_onError(g[0],l)}}([d],[this]));f.onComplete(function(g,h){return function(l){h[0].loadFont_onComplete(g[0],l)}}([d],[this]));break;case "IMAGE":this.assetsTotal++;f=this.loadImage(d);f.onProgress(function(g,h){return function(l,k){h[0].load_onProgress(g[0],l,k)}}([d],[this]));f.onError(function(g,h){return function(l){h[0].load_onError(g[0],l)}}([d],[this]));f.onComplete(function(g,
h){return function(l){h[0].loadImage_onComplete(g[0],l)}}([d],[this]));break;case "MUSIC":case "SOUND":this.assetsTotal++;f=this.loadAudioBuffer(d);f.onProgress(function(g,h){return function(l,k){h[0].load_onProgress(g[0],l,k)}}([d],[this]));f.onError(function(g,h){return function(l){h[0].loadAudioBuffer_onError(g[0],l)}}([d],[this]));f.onComplete(function(g,h){return function(l){h[0].loadAudioBuffer_onComplete(g[0],l)}}([d],[this]));break;case "TEXT":this.assetsTotal++,f=this.loadText(d),f.onProgress(function(g,
h){return function(l,k){h[0].load_onProgress(g[0],l,k)}}([d],[this])),f.onError(function(g,h){return function(l){h[0].load_onError(g[0],l)}}([d],[this])),f.onComplete(function(g,h){return function(l){h[0].loadText_onComplete(g[0],l)}}([d],[this]))}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?zc.withValue(this.cachedAudioBuffers.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,
a)?zc.withValue(ce.fromBytes(u.__cast(Aa.createInstance(this.classTypes.h[a],[]),Ia))):Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?ce.loadFromFiles(this.pathGroups.h[a]):ce.loadFromFile(this.paths.h[a])},loadBytes:function(a){return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?zc.withValue(this.cachedBytes.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?zc.withValue(Aa.createInstance(this.classTypes.h[a],[])):hg.loadFromFile(this.getPath(a))},loadFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,
a)?zc.withValue(this.cachedFonts.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?(a=Aa.createInstance(this.classTypes.h[a],[]),a.__loadFromName(a.name)):hf.loadFromName(this.getPath(a))},loadImage:function(a){var b=this;return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?zc.withValue(this.cachedImages.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?zc.withValue(Aa.createInstance(this.classTypes.h[a],[])):Object.prototype.hasOwnProperty.call(this.cachedBytes.h,
a)?Ic.loadFromBytes(this.cachedBytes.h[a]).then(function(c){var d=b.cachedBytes;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];b.cachedImages.h[a]=c;return zc.withValue(c)}):Ic.loadFromFile(this.getPath(a))},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return zc.withValue(this.cachedText.h[a]);if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.classTypes.h,a)){var b=this.getBytes(a);if(b==null)return zc.withValue(null);
b=b.getString(0,b.length);this.cachedText.h[a]=b;return zc.withValue(b)}return(new Bn).load(this.getPath(a))},unload:function(){this.cachedBytes.h=Object.create(null);this.cachedFonts.h=Object.create(null);this.cachedImages.h=Object.create(null);this.cachedAudioBuffers.h=Object.create(null);this.cachedText.h=Object.create(null)},__assetLoaded:function(a){this.assetsLoaded++;a!=null&&Mb.verbose("Loaded asset: "+a+" ["+this.types.h[a]+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/AssetLibrary.hx",
lineNumber:637,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"});if(a!=null){var b=Object.prototype.hasOwnProperty.call(this.sizes.h,a)?this.sizes.h[a]:0;if(Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)){var c=this.bytesLoadedCache.h[a];c<b&&(this.bytesLoaded+=b-c)}else this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b}this.assetsLoaded<this.assetsTotal?this.promise.progress(this.bytesLoaded,this.bytesTotal):(this.loaded=!0,this.promise.progress(this.bytesTotal,this.bytesTotal),
this.promise.complete(this))},__cacheBreak:function(a){return bb.__cacheBreak(a)},__fromBundle:function(a,b){if(b!=null){var c=0;for(b=b.assets;c<b.length;){var d=b[c];++c;var f=Object.prototype.hasOwnProperty.call(d,"id")?d.id:d.path;var g=a.data.h[d.path];if(Object.prototype.hasOwnProperty.call(d,"type")){var h=d.type;h=="TEXT"?this.cachedText.h[f]=g!=null?L.string(g):null:this.cachedBytes.h[f]=g;this.types.h[f]=d.type}else this.cachedBytes.h[f]=g,this.types.h[f]="BINARY"}}else for(c=0,b=a.paths;c<
b.length;)f=b[c],++c,this.cachedBytes.h[f]=a.data.h[f],this.types.h[f]="BINARY"},__fromManifest:function(a){var b=a.version>=2,c=a.rootPath;c==null&&(c="");c!=""&&(c+="/");for(var d=0,f=a.assets;d<f.length;){var g=f[d];++d;var h=b&&Object.prototype.hasOwnProperty.call(g,"size")?g.size:100;var l=Object.prototype.hasOwnProperty.call(g,"id")?g.id:g.path;if(Object.prototype.hasOwnProperty.call(g,"path")){var k=this.paths;var q=this.__cacheBreak(this.__resolvePath(c+L.string(A.field(g,"path"))));k.h[l]=
q}if(Object.prototype.hasOwnProperty.call(g,"pathGroup")){k=A.field(g,"pathGroup");q=0;for(var w=k.length;q<w;){var v=q++;k[v]=this.__cacheBreak(this.__resolvePath(c+k[v]))}this.pathGroups.h[l]=k}this.sizes.h[l]=h;this.types.h[l]=g.type;Object.prototype.hasOwnProperty.call(g,"preload")&&(this.preload.h[l]=A.field(g,"preload"));Object.prototype.hasOwnProperty.call(g,"className")&&(h=A.field(g,"className"),h=r[h],this.classTypes.h[l]=h)}d=this.bytesTotal=0;for(f=a.assets;d<f.length;)g=f[d],++d,l=Object.prototype.hasOwnProperty.call(g,
"id")?g.id:g.path,Object.prototype.hasOwnProperty.call(this.preload.h,l)&&this.preload.h[l]&&Object.prototype.hasOwnProperty.call(this.sizes.h,l)&&(this.bytesTotal+=this.sizes.h[l])},__resolvePath:function(a){a=Z.replace(a,"\\","/");var b=a.indexOf(":");Z.startsWith(a,"http")&&b>0?(b+=3,a=X.substr(a,0,b)+Z.replace(X.substr(a,b,null),"//","/")):a=Z.replace(a,"//","/");if(a.indexOf("./")>-1){a=a.split("/");b=[];for(var c=0,d=a.length;c<d;){var f=c++;a[f]==".."?f==0||b[f-1]==".."?b.push(".."):b.pop():
a[f]=="."?f==0&&b.push("."):b.push(a[f])}a=b.join("/")}return a},loadAudioBuffer_onComplete:function(a,b){this.cachedAudioBuffers.h[a]=b;if(Object.prototype.hasOwnProperty.call(this.pathGroups.h,a))for(var c=this.pathGroups.h[a],d=Object.keys(this.pathGroups.h),f=d.length,g=0;g<f;){var h=d[g++];if(h!=a)for(var l=0;l<c.length;){var k=c[l];++l;if(this.pathGroups.h[h].indexOf(k)>-1){this.cachedAudioBuffers.h[h]=b;break}}}this.__assetLoaded(a)},loadAudioBuffer_onError:function(a,b){b!=null&&b!=""?Mb.warn('Could not load "'+
a+'": '+L.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:883,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Mb.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:887,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,new ce)},loadBytes_onComplete:function(a,b){this.cachedBytes.h[a]=b;this.__assetLoaded(a)},loadFont_onComplete:function(a,b){this.cachedFonts.h[a]=b;this.__assetLoaded(a)},
loadImage_onComplete:function(a,b){this.cachedImages.h[a]=b;this.__assetLoaded(a)},loadText_onComplete:function(a,b){this.cachedText.h[a]=b;this.__assetLoaded(a)},load_onError:function(a,b){b!=null&&b!=""?this.promise.error('Error loading asset "'+a+'": '+L.string(b)):this.promise.error('Error loading asset "'+a+'"')},load_onProgress:function(a,b,c){if(b>0){var d=this.sizes.h[a];c>0?(b/=c,b>1&&(b=1),b=Math.floor(b*d)):b>d&&(b=d);Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)?(d=this.bytesLoadedCache.h[a],
b!=d&&(this.bytesLoaded+=b-d)):this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b;this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:dd};var se=function(){this.assets=[];this.libraryArgs=[];this.version=2};r["lime.utils.AssetManifest"]=se;se.__name__="lime.utils.AssetManifest";se.fromBytes=function(a,b){return a!=null?se.parse(a.getString(0,a.length),b):null};se.fromFile=function(a,b){a=se.__resolvePath(a);b=se.__resolveRootPath(b,a);return a==null?null:se.fromBytes(hg.fromFile(a),
b)};se.loadFromBytes=function(a,b){return zc.withValue(se.fromBytes(a,b))};se.loadFromFile=function(a,b){a=se.__resolvePath(a);b=se.__resolveRootPath(b,a);return a==null?null:hg.loadFromFile(a).then(function(c){return zc.withValue(se.fromBytes(c,b))})};se.parse=function(a,b){if(a==null||a=="")return null;a=(new Ym(a)).doParse();var c=new se;Object.prototype.hasOwnProperty.call(a,"name")&&(c.name=a.name);Object.prototype.hasOwnProperty.call(a,"libraryType")&&(c.libraryType=a.libraryType);Object.prototype.hasOwnProperty.call(a,
"libraryArgs")&&(c.libraryArgs=a.libraryArgs);if(Object.prototype.hasOwnProperty.call(a,"assets")){var d=a.assets;Object.prototype.hasOwnProperty.call(a,"version")&&a.version<=2?c.assets=Gg.run(d):c.assets=d}Object.prototype.hasOwnProperty.call(a,"rootPath")&&(c.rootPath=a.rootPath);b!=null&&b!=""&&(c.rootPath=c.rootPath==null||c.rootPath==""?b:b+"/"+c.rootPath);return c};se.__resolvePath=function(a){if(a==null)return null;var b=a.indexOf("?");var c=b>-1?X.substr(a,0,b):a;for(c=Z.replace(c,"\\","/");Z.endsWith(c,
"/");)c=X.substr(c,0,c.length-1);return Z.endsWith(c,".bundle")?b>-1?c+"/library.json"+X.substr(a,b,null):c+"/library.json":a};se.__resolveRootPath=function(a,b){if(a!=null)return a;a=b.indexOf("?");a=a>-1?X.substr(b,0,a):b;for(a=Z.replace(a,"\\","/");Z.endsWith(a,"/");){if(a=="/")return a;a=X.substr(a,0,a.length-1)}return Z.endsWith(a,".bundle")?a:rg.directory(a)};se.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,serialize:function(){var a={};a.version=
this.version;a.libraryType=this.libraryType;a.libraryArgs=this.libraryArgs;a.name=this.name;a.assets=qg.run(this.assets);a.rootPath=this.rootPath;return ng.print(a,null,null)},__class__:se};var bb=function(){};r["lime.utils.Assets"]=bb;bb.__name__="lime.utils.Assets";bb.exists=function(a,b){b==null&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=bb.getLibrary(d);return d!=null?d.exists(a,b):!1};bb.getAsset=function(a,b,c){if(c&&bb.cache.enabled)switch(b){case "FONT":var d=
bb.cache.font.h[a];if(d!=null)return d;break;case "IMAGE":d=bb.cache.image.h[a];if(bb.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=bb.cache.audio.h[a];if(bb.isValidAudio(d))return d;break;case "TEMPLATE":throw la.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=bb.getLibrary(d);if(g!=null)if(g.exists(f,b)){if(g.isLocal(f,b))return d=g.getAsset(f,b),c&&bb.cache.enabled&&
bb.cache.set(a,b,d),d;Mb.error(b+' asset "'+a+'" exists, but only asynchronously',{fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"})}else Mb.error("There is no "+b+' asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:138,className:"lime.utils.Assets",methodName:"getAsset"});else Mb.error(bb.__libraryNotFound(d),{fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"});return null};
bb.getAudioBuffer=function(a,b){b==null&&(b=!0);return bb.getAsset(a,"SOUND",b)};bb.getBytes=function(a){return bb.getAsset(a,"BINARY",!1)};bb.getFont=function(a,b){b==null&&(b=!0);return bb.getAsset(a,"FONT",b)};bb.getImage=function(a,b){b==null&&(b=!0);return bb.getAsset(a,"IMAGE",b)};bb.getLibrary=function(a){if(a==null||a=="")a="default";return bb.libraries.h[a]};bb.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=bb.getLibrary(c);if(d!=null){if(d.exists(b,
null))return d.getPath(b);Mb.error('There is no asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:240,className:"lime.utils.Assets",methodName:"getPath"})}else Mb.error(bb.__libraryNotFound(c),{fileName:"lime/utils/Assets.hx",lineNumber:245,className:"lime.utils.Assets",methodName:"getPath"});return null};bb.getText=function(a){return bb.getAsset(a,"TEXT",!1)};bb.hasLibrary=function(a){if(a==null||a=="")a="default";return Object.prototype.hasOwnProperty.call(bb.libraries.h,
a)};bb.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&bb.cache.enabled&&bb.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=bb.getLibrary(c);return c!=null?c.isLocal(a,b):!1};bb.isValidAudio=function(a){return a!=null};bb.isValidImage=function(a){return a!=null?a.buffer!=null:!1};bb.list=function(a){for(var b=[],c=bb.libraries.h,d=Object.keys(c),f=d.length,g=0;g<f;){var h=c[d[g++]].list(a);h!=null&&(b=b.concat(h))}return b};bb.loadAsset=function(a,b,c){if(c&&
bb.cache.enabled)switch(b){case "FONT":var d=bb.cache.font.h[a];if(d!=null)return zc.withValue(d);break;case "IMAGE":d=bb.cache.image.h[a];if(bb.isValidImage(d))return zc.withValue(d);break;case "MUSIC":case "SOUND":d=bb.cache.audio.h[a];if(bb.isValidAudio(d))return zc.withValue(d);break;case "TEMPLATE":throw la.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=bb.getLibrary(d);if(g!=
null){if(g.exists(f,b)){d=g.loadAsset(f,b);if(c&&bb.cache.enabled)d.onComplete(function(h){bb.cache.set(a,b,h)});return d}return zc.withError("There is no "+b+' asset with an ID of "'+a+'"')}return zc.withError(bb.__libraryNotFound(d))};bb.loadAudioBuffer=function(a,b){b==null&&(b=!0);return bb.loadAsset(a,"SOUND",b)};bb.loadBytes=function(a){return bb.loadAsset(a,"BINARY",!1)};bb.loadFont=function(a,b){b==null&&(b=!0);return bb.loadAsset(a,"FONT",b)};bb.loadImage=function(a,b){b==null&&(b=!0);return bb.loadAsset(a,
"IMAGE",b)};bb.loadLibrary=function(a){var b=new yf,c=bb.getLibrary(a);if(c!=null)return c.load();c=a;var d=null;if(Object.prototype.hasOwnProperty.call(bb.bundlePaths.h,a))cj.loadFromFile(bb.bundlePaths.h[a]).onComplete(function(f){f==null?b.error('Cannot load bundle for library "'+a+'"'):(f=dd.fromBundle(f),f==null?b.error('Cannot open library "'+a+'"'):(bb.libraries.h[a]=f,f.onChange.add((G=bb.onChange,m(G,G.dispatch))),b.completeWith(f.load())))}).onError(function(f){b.error('There is no asset library with an ID of "'+
a+'"')});else Object.prototype.hasOwnProperty.call(bb.libraryPaths.h,a)?(c=bb.libraryPaths.h[a],d=rg.directory(c)):(Z.endsWith(c,".bundle")?(d=c,c+="/library.json"):d=rg.directory(c),c=bb.__cacheBreak(c)),se.loadFromFile(c,d).onComplete(function(f){f==null?b.error('Cannot parse asset manifest for library "'+a+'"'):(f=dd.fromManifest(f),f==null?b.error('Cannot open library "'+a+'"'):(bb.libraries.h[a]=f,f.onChange.add((G=bb.onChange,m(G,G.dispatch))),b.completeWith(f.load())))}).onError(function(f){b.error('There is no asset library with an ID of "'+
a+'"')});return b.future};bb.loadText=function(a){return bb.loadAsset(a,"TEXT",!1)};bb.registerLibrary=function(a,b){if(a==null||a=="")a="default";if(Object.prototype.hasOwnProperty.call(bb.libraries.h,a)){if(bb.libraries.h[a]==b)return;bb.unloadLibrary(a)}b!=null&&b.onChange.add(bb.library_onChange);bb.libraries.h[a]=b};bb.unloadLibrary=function(a){bb.removeLibrary(a,!0)};bb.removeLibrary=function(a,b){b==null&&(b=!0);if(a==null||a=="")a="default";var c=bb.libraries.h[a];c!=null&&(bb.cache.clear(a+
":"),c.onChange.remove(bb.library_onChange),b&&c.unload());b=bb.libraries;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};bb.__cacheBreak=function(a){bb.cache.version>0&&(a=a.indexOf("?")>-1?a+("&"+bb.cache.version):a+("?"+bb.cache.version));return a};bb.__libraryNotFound=function(a){if(a==null||a=="")a="default";return Ha.current==null||Ha.current.__preloader==null||Ha.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};
bb.library_onChange=function(){bb.cache.clear();bb.onChange.dispatch()};var ow=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);this.library=bb.getLibrary(this.libraryName)};r["lime.utils._Assets.LibrarySymbol"]=ow;ow.__name__="lime.utils._Assets.LibrarySymbol";ow.prototype={library:null,libraryName:null,symbolName:null,isLocal:function(a){return this.library.isLocal(this.symbolName,a)},exists:function(a){return this.library.exists(this.symbolName,
a)},__class__:ow};var sx={_new:function(a,b){b==null&&(b=0);return new dj(a,b)},set:function(a,b,c,d,f){d!=null&&(b=Ia.ofData(d));b!=null||c==null?(a.bytes=b,a.offset=f!=null?f:0):(a.bytes=Ia.ofData(c.buffer),a.offset=f!=null?c.byteOffset+f:c.byteOffset)},__arrayGet:function(a,b){return a.bytes!=null?a.bytes.b[b+a.offset]:0},__arraySet:function(a,b,c){a.bytes==null&&(a.bytes.b[b+a.offset]=c);return c},fromArrayBufferView:function(a){return a==null?null:new dj(Ia.ofData(a.buffer),a.byteOffset)},fromArrayBuffer:function(a){return a==
null?null:new dj(Ia.ofData(a),0)},fromBytes:function(a){return new dj(a,0)},fromBytesData:function(a){return a==null?new dj(null,0):new dj(Ia.ofData(a),0)},fromFile:function(a){return new dj(hg.fromFile(a),0)},fromLimeBytes:function(a){return new dj(a,0)},toUInt8Array:function(a){var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&(a=0);return b!=null?new Uint8Array(b,a):null},toUInt8ClampedArray:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&
(a=0);return b!=null?new Uint8ClampedArray(b,a):null},toInt8Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;a==null&&(a=0);return b!=null?new Int8Array(b,a):null},toUInt16Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;a==null&&(a=0);return b!=null?new Uint16Array(b,a):null},toInt16Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;a==null&&(a=0);
return b!=null?new Int16Array(b,a):null},toUInt32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=null?new Uint32Array(b,a):null},toInt32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=null?new Int32Array(b,a):null},toFloat32Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;a==null&&(a=0);return b!=
null?new Float32Array(b,a):null},toFloat64Array:function(a){if(a==null||a.bytes==null)return null;var b=a.bytes.b.bufferValue;a=a.offset/64|0;a==null&&(a=0);return b!=null?new Float64Array(b,a):null}},dj=function(a,b){this.bytes=a;this.offset=b};r["lime.utils.BytePointerData"]=dj;dj.__name__="lime.utils.BytePointerData";dj.prototype={bytes:null,offset:null,__class__:dj};var hg={_new:function(a,b){b=new Ia(b);b.length=a;return b},alloc:function(a){return new Ia(new ArrayBuffer(a))},compress:function(a,
b){switch(b._hx_index){case 0:return zr.compress(a);case 1:return Ar.compress(a);case 2:return Cr.compress(a);case 3:return Dr.compress(a)}},decompress:function(a,b){switch(b._hx_index){case 0:return zr.decompress(a);case 1:return Ar.decompress(a);case 2:return Cr.decompress(a);case 3:return Dr.decompress(a)}},fastGet:function(a,b){return a.bytes[b]},fromBytes:function(a){return a==null?null:hg._new(a.length,a.b.bufferValue)},fromFile:function(a){return null},loadFromBytes:function(a){return zc.withValue(hg.fromBytes(a))},
loadFromFile:function(a){return(new Mr).load(a)},ofData:function(a){a=Ia.ofData(a);return hg._new(a.length,a.b.bufferValue)},ofString:function(a){a=Ia.ofString(a);return hg._new(a.length,a.b.bufferValue)}},ek=O["lime.utils.CompressionAlgorithm"]={__ename__:"lime.utils.CompressionAlgorithm",__constructs__:null,DEFLATE:{_hx_name:"DEFLATE",_hx_index:0,__enum__:"lime.utils.CompressionAlgorithm",toString:D},GZIP:{_hx_name:"GZIP",_hx_index:1,__enum__:"lime.utils.CompressionAlgorithm",toString:D},LZMA:{_hx_name:"LZMA",
_hx_index:2,__enum__:"lime.utils.CompressionAlgorithm",toString:D},ZLIB:{_hx_name:"ZLIB",_hx_index:3,__enum__:"lime.utils.CompressionAlgorithm",toString:D}};ek.__constructs__=[ek.DEFLATE,ek.GZIP,ek.LZMA,ek.ZLIB];var ui={_new:function(a){return a},fromFloat:function(a){return a},fromBytesPointer:function(a){return ui.fromFloat(0)},fromArrayBufferView:function(a){return ui.fromFloat(0)},fromArrayBuffer:function(a){return ui.fromFloat(0)},fromBytes:function(a){return ui.fromFloat(0)},fromBytesData:function(a){return ui.fromFloat(0)},
fromLimeBytes:function(a){return ui.fromBytes(a)},fromCFFIPointer:function(a){return ui.fromFloat(0)},fromFile:function(a){return ui.fromFloat(0)},__withOffset:function(a,b){return ui.fromFloat(0)},equals:function(a,b){return a==b},equalsPointer:function(a,b){return a==b},greaterThan:function(a,b){return a>b},greaterThanPointer:function(a,b){return jf.get(a)>jf.get(b)},greaterThanOrEqual:function(a,b){return a>=b},greaterThanOrEqualPointer:function(a,b){return jf.get(a)>=jf.get(b)},lessThan:function(a,
b){return a<b},lessThanPointer:function(a,b){return jf.get(a)<jf.get(b)},lessThanOrEqual:function(a,b){return a<=b},lessThanOrEqualPointer:function(a,b){return jf.get(a)<=jf.get(b)},notEquals:function(a,b){return a!=b},notEqualsPointer:function(a,b){return a!=b},plus:function(a,b){return ui.__withOffset(a,b)},plusPointer:function(a,b){return ui.__withOffset(a,b|0)},minus:function(a,b){return ui.__withOffset(a,-b)},minusPointer:function(a,b){return ui.__withOffset(a,-(b|0))}},Mk={toArrayBufferView:function(a){return a},
fromBytes:function(a,b,c){b==null&&(b=0);return b==null?new Float32Array(a.b.bufferValue):c==null?new Float32Array(a.b.bufferValue,b):new Float32Array(a.b.bufferValue,b,c)},toBytes:function(a){return new Ia(new Uint8Array(a.buffer))},toString:function(a){return a!=null?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null}},Mb=function(){};r["lime.utils.Log"]=Mb;Mb.__name__="lime.utils.Log";Mb.debug=function(a,b){Mb.level>=4&&console.debug("["+b.className+"] "+L.string(a))};Mb.error=
function(a,b){if(Mb.level>=1){a="["+b.className+"] ERROR: "+L.string(a);if(Mb.throwErrors)throw la.thrown(a);console.error(a)}};Mb.info=function(a,b){Mb.level>=3&&console.info("["+b.className+"] "+L.string(a))};Mb.print=function(a){console.log(a)};Mb.println=function(a){console.log(a)};Mb.verbose=function(a,b){Mb.level>=5&&(a="["+b.className+"] "+L.string(a),console.log(a))};Mb.warn=function(a,b){Mb.level>=2&&console.warn("["+b.className+"] WARNING: "+L.string(a))};var wt=function(){this.bytesTotalCache=
new aa;this.bytesLoadedCache2=new aa;this.bytesLoadedCache=new Na;this.onProgress=new Er;this.onComplete=new Se;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(m(this,this.update))};r["lime.utils.Preloader"]=wt;wt.__name__="lime.utils.Preloader";wt.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,loadedStage:null,preloadComplete:null,preloadStarted:null,simulateProgress:null,addLibrary:function(a){this.libraries.push(a)},addLibraryName:function(a){this.libraryNames.indexOf(a)==-1&&this.libraryNames.push(a)},load:function(){for(var a=this,b=0,c=this.libraries;b<c.length;){var d=c[b];++b;this.bytesTotal+=d.bytesTotal}this.loadedLibraries=-1;this.preloadStarted=!1;b=0;for(c=this.libraries;b<c.length;)d=[c[b]],++b,Mb.verbose("Preloading asset library",{fileName:"lime/utils/Preloader.hx",
lineNumber:134,className:"lime.utils.Preloader",methodName:"load"}),d[0].load().onProgress(function(f){return function(g,h){a.bytesLoaded=a.bytesLoadedCache.h.__keys__[f[0].__id__]==null?a.bytesLoaded+g:a.bytesLoaded+(g-a.bytesLoadedCache.h[f[0].__id__]);a.bytesLoadedCache.set(f[0],g);a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal)}}(d)).onComplete(function(f){return function(g){a.bytesLoaded=a.bytesLoadedCache.h.__keys__[f[0].__id__]==null?a.bytesLoaded+f[0].bytesTotal:a.bytesLoaded+
((f[0].bytesTotal|0)-a.bytesLoadedCache.h[f[0].__id__]);a.loadedAssetLibrary()}}(d)).onError(function(){return function(f){Mb.error(f,{fileName:"lime/utils/Preloader.hx",lineNumber:170,className:"lime.utils.Preloader",methodName:"load"})}}());b=0;for(c=this.libraryNames;b<c.length;)++b,this.bytesTotal+=200;this.loadedLibraries++;this.preloadStarted=!0;this.updateProgress()},loadedAssetLibrary:function(a){this.loadedLibraries++;var b=this.loadedLibraries;this.preloadStarted||++b;var c=this.libraries.length+
this.libraryNames.length;a!=null?Mb.verbose("Loaded asset library: "+a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:197,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Mb.verbose("Loaded asset library ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:201,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"});this.updateProgress()},start:function(){this.complete||this.simulateProgress||!this.preloadComplete||(this.complete=!0,this.onComplete.dispatch())},
update:function(a,b){},updateProgress:function(){this.simulateProgress||this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Mb.verbose("Preload complete",{fileName:"lime/utils/Preloader.hx",lineNumber:306,className:"lime.utils.Preloader",methodName:"updateProgress"})),this.start())},__class__:wt};var ze=function(){};r["motion.easing.IEasing"]=ze;ze.__name__=
"motion.easing.IEasing";ze.__isInterface__=!0;ze.prototype={calculate:null,ease:null,__class__:ze};var Qr=function(){};r["motion.easing._Expo.ExpoEaseIn"]=Qr;Qr.__name__="motion.easing._Expo.ExpoEaseIn";Qr.__interfaces__=[ze];Qr.prototype={calculate:function(a){return a==0?0:Math.exp(6.931471805599453*(a-1))},ease:function(a,b,c,d){return a==0?b:c*Math.exp(6.931471805599453*(a/d-1))+b},__class__:Qr};var Rr=function(){};r["motion.easing._Expo.ExpoEaseInOut"]=Rr;Rr.__name__="motion.easing._Expo.ExpoEaseInOut";
Rr.__interfaces__=[ze];Rr.prototype={calculate:function(a){return a==0?0:a==1?1:(a/=.5)<1?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*--a))},ease:function(a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.exp(6.931471805599453*(a-1))+b:c/2*(2-Math.exp(-6.931471805599453*--a))+b},__class__:Rr};var Sr=function(){};r["motion.easing._Expo.ExpoEaseOut"]=Sr;Sr.__name__="motion.easing._Expo.ExpoEaseOut";Sr.__interfaces__=[ze];Sr.prototype={calculate:function(a){return a==1?1:
1-Math.exp(-6.931471805599453*a)},ease:function(a,b,c,d){return a==d?b+c:c*(1-Math.exp(-6.931471805599453*a/d))+b},__class__:Sr};var Sj=function(){};r["motion.easing.Expo"]=Sj;Sj.__name__="motion.easing.Expo";var ua=function(){};r["motion.Actuate"]=ua;ua.__name__="motion.Actuate";ua.apply=function(a,b,c){ua.stop(a,b);c==null&&(c=ua.defaultActuator);a=Aa.createInstance(c,[a,0,b]);a.apply();return a};ua.effects=function(a,b,c){c==null&&(c=!0);return new sv(a,b,c)};ua.getLibrary=function(a,b){b==null&&
(b=!0);ua.targetLibraries.h.__keys__[a.__id__]==null&&b&&ua.targetLibraries.set(a,[]);return ua.targetLibraries.h[a.__id__]};ua.isActive=function(){for(var a=!1,b=ua.targetLibraries.iterator();b.hasNext();){b.next();a=!0;break}return a};ua.motionPath=function(a,b,c,d){d==null&&(d=!0);return ua.tween(a,b,c,d,Tr)};ua.pause=function(a){if(u.__implements(a,Jk))a.pause();else{var b=ua.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.pause()}};ua.pauseAll=function(){for(var a=ua.targetLibraries.iterator();a.hasNext();)for(var b=
a.next(),c=0;c<b.length;){var d=b[c];++c;d.pause()}};ua.reset=function(){for(var a=ua.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=b.length-1;c>=0;)b[c].stop(null,!1,!1),--c;ua.targetLibraries=new Na};ua.resume=function(a){if(u.__implements(a,Jk))a.resume();else{var b=ua.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.resume()}};ua.resumeAll=function(){for(var a=ua.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.resume()}};
ua.stop=function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!1);if(a!=null)if(u.__implements(a,Jk))a.stop(null,c,d);else if(a=ua.getLibrary(a,!1),a!=null){if(typeof b=="string"){var f={};f[b]=null;b=f}else if(b instanceof Array){f={};var g=0;for(b=u.__cast(b,Array);g<b.length;){var h=b[g];++g;f[h]=null}b=f}for(f=a.length-1;f>=0;)a[f].stop(b,c,d),--f}};ua.timer=function(a,b){return ua.tween(new Ur(0),a,new Ur(1),!1,b)};ua.transform=function(a,b,c){c==null&&(c=!0);b==null&&(b=0);return new tv(a,b,c)};ua.tween=
function(a,b,c,d,f){d==null&&(d=!0);if(a!=null){if(b>0){f==null&&(f=ua.defaultActuator);a=Aa.createInstance(f,[a,b,c]);b=ua.getLibrary(a.target);if(d){for(d=b.length-1;d>=0;)b[d].stop(a.properties,!1,!1),--d;b=ua.getLibrary(a.target)}b.push(a);a.move();return a}return ua.apply(a,c,f)}return null};ua.unload=function(a){var b=a.target;ua.targetLibraries.h.__keys__[b.__id__]!=null&&(X.remove(ua.targetLibraries.h[b.__id__],a),ua.targetLibraries.h[b.__id__].length==0&&ua.targetLibraries.remove(b))};ua.update=
function(a,b,c,d,f){f==null&&(f=!0);return ua.tween(a,b,{start:c,end:d},f,om)};var sv=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};r["motion._Actuate.EffectsOptions"]=sv;sv.__name__="motion._Actuate.EffectsOptions";sv.prototype={duration:null,overwrite:null,target:null,filter:function(a,b){b.filter=a;return ua.tween(this.target,this.duration,b,this.overwrite,Vr)},__class__:sv};var tv=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};r["motion._Actuate.TransformOptions"]=
tv;tv.__name__="motion._Actuate.TransformOptions";tv.prototype={duration:null,overwrite:null,target:null,color:function(a,b,c){b==null&&(b=1);a==null&&(a=0);a={colorValue:a,colorStrength:b};c!=null&&(a.colorAlpha=c);return ua.tween(this.target,this.duration,a,this.overwrite,tp)},sound:function(a,b){var c={};a!=null&&(c.soundVolume=a);b!=null&&(c.soundPan=b);return ua.tween(this.target,this.duration,c,this.overwrite,tp)},__class__:tv};var Ur=function(a){this.progress=a};r["motion._Actuate.TweenTimer"]=
Ur;Ur.__name__="motion._Actuate.TweenTimer";Ur.prototype={progress:null,__class__:Ur};var pw=function(){this._x=new Nk;this._y=new Nk;this._rotation=null};r["motion.MotionPath"]=pw;pw.__name__="motion.MotionPath";pw.prototype={_rotation:null,_x:null,_y:null,bezier:function(a,b,c,d,f){f==null&&(f=1);return this.bezierN(a,b,[c],[d],f)},bezierN:function(a,b,c,d,f){f==null&&(f=1);this._x.addPath(new Dn(a,c,f));this._y.addPath(new Dn(b,d,f));return this},bezierSpline:function(a,b,c){c==null&&(c=1);this._x.addPath(new up(a,
c));this._y.addPath(new up(b,c));return this},line:function(a,b,c){c==null&&(c=1);return this.bezierN(a,b,[],[],c)},get_rotation:function(){this._rotation==null&&(this._rotation=new Wr(this._x,this._y));return this._rotation},get_x:function(){return this._x},get_y:function(){return this._y},__class__:pw,__properties__:{get_y:"get_y",get_x:"get_x",get_rotation:"get_rotation"}};var Ok=function(){};r["motion.IComponentPath"]=Ok;Ok.__name__="motion.IComponentPath";Ok.__isInterface__=!0;Ok.prototype={get_start:null,
set_start:null,get_end:null,end:null,strength:null,calculate:null,__class__:Ok,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var Nk=function(){this.paths=[];this.strength=0};r["motion._MotionPath.ComponentPath"]=Nk;Nk.__name__="motion._MotionPath.ComponentPath";Nk.__interfaces__=[Ok];Nk.prototype={strength:null,paths:null,addPath:function(a){this.paths.length>0&&a.set_start(this.paths[this.paths.length-1].get_end());this.paths.push(a);this.strength+=a.strength},calculate:function(a){if(this.paths.length==
1)return this.paths[0].calculate(a);a*=this.strength;for(var b=0,c=this.paths;b<c.length;){var d=c[b];++b;if(a-d.strength>1E-7)a-=d.strength;else return d.calculate(a/d.strength)}return 0},get_start:function(){return this.paths.length>0?this.paths[0].get_start():0},set_start:function(a){return this.paths.length>0?this.paths[0].set_start(a):0},get_end:function(){return this.paths.length>0?this.paths[this.paths.length-1].get_end():this.get_start()},__class__:Nk,__properties__:{get_end:"get_end",set_start:"set_start",
get_start:"get_start"}};var Dn=function(a,b,c){this._end=a;this.control=b;this.strength=c};r["motion._MotionPath.BezierPath"]=Dn;Dn.__name__="motion._MotionPath.BezierPath";Dn.__interfaces__=[Ok];Dn.prototype={control:null,end:null,strength:null,_start:null,_end:null,calculate:function(a){var b=1-a;switch(this.control.length){case 0:return b*this._start+a*this._end;case 1:return b*b*this._start+2*b*a*this.control[0]+a*a*this._end;case 2:return b*b*b*this._start+3*b*b*a*this.control[0]+3*b*a*a*this.control[1]+
a*a*a*this._end;default:if(b<1E-7)return this._end;a/=b;var c=this.control.length+1;b=Math.pow(b,c);for(var d=b*this._start,f=1;f<c;){var g=f++;b*=a*(c+1-g)/g;d+=b*this.control[g-1]}return d+a/c*b*this._end}},get_start:function(){return this._start},set_start:function(a){return this._start=a},get_end:function(){return this._end},__class__:Dn,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var up=function(a,b){Nk.call(this);this.through=a;this.strength=b};r["motion._MotionPath.BezierSplinePath"]=
up;up.__name__="motion._MotionPath.BezierSplinePath";up.__super__=Nk;up.prototype=I(Nk.prototype,{through:null,computeControlPoints:function(a){a=[a].concat(this.through);for(var b=a.length,c=[],d=0;d<b;)d++,c.push([0,0]);var f=c,g=[],h=[],l=[],k=[];g[0]=0;h[0]=2;l[0]=1;k[0]=a[0]+2*a[1];c=1;for(d=b-1;c<d;){var q=c++;g[q]=1;h[q]=4;l[q]=1;k[q]=4*a[q]+2*a[q+1]}g[b-1]=1;h[b-1]=2;l[b-1]=0;k[b-1]=3*a[b-1];c=1;for(d=b;c<d;){q=c++;var w=g[q]/h[q-1];h[q]-=w*l[q-1];k[q]-=w*k[q-1]}f[b-1][0]=k[b-1]/h[b-1];for(q=
b-2;q>=0;)f[q][0]=(k[q]-l[q]*f[q+1][0])/h[q],--q;c=0;for(d=b-1;c<d;)q=c++,f[q][1]=2*a[q+1]-f[q+1][0];f[b-1][1]=.5*(a[b]+f[b-1][0]);f.pop();return f},set_start:function(a){if(this.paths.length==0||Math.abs(a-this.get_start())>1E-7){var b=this.computeControlPoints(a),c=this.strength/b.length;this.strength=0;this.paths.splice(0,this.paths.length);for(var d=0,f=b.length;d<f;){var g=d++;this.addPath(new Dn(this.through[g],b[g],c))}}return Nk.prototype.set_start.call(this,a)},get_end:function(){return this.through[this.through.length-
1]},__class__:up});var Wr=function(a,b){this.step=.01;this._x=a;this._y=b;this.offset=0;this.set_start(this.calculate(0))};r["motion._MotionPath.RotationPath"]=Wr;Wr.__name__="motion._MotionPath.RotationPath";Wr.__interfaces__=[Ok];Wr.prototype={offset:null,strength:null,_start:null,step:null,_x:null,_y:null,calculate:function(a){var b=this._x.calculate(a)-this._x.calculate(a+this.step);a=this._y.calculate(a)-this._y.calculate(a+this.step);b=180/Math.PI*Math.atan2(a,b);return b=(b+this.offset)%360},
get_start:function(){return this._start},set_start:function(a){return this._start},get_end:function(){return this.calculate(1)},__class__:Wr,__properties__:{set_start:"set_start",get_start:"get_start",get_end:"get_end"}};var Vr=function(a,b,c){this.filterIndex=-1;Ed.call(this,a,b,c);if(u.__instanceof(c.filter,Gt))for(this.filterClass=c.filter,a.get_filters().length==0&&a.set_filters([Aa.createInstance(this.filterClass,[])]),b=0,a=a.get_filters();b<a.length;)c=a[b],++b,u.__instanceof(c,this.filterClass)&&
(this.filter=c);else this.filterIndex=c.filter,this.filter=a.get_filters()[this.filterIndex]};r["motion.actuators.FilterActuator"]=Vr;Vr.__name__="motion.actuators.FilterActuator";Vr.__super__=Ed;Vr.prototype=I(Ed.prototype,{filter:null,filterClass:null,filterIndex:null,apply:function(){for(var a=0,b=A.fields(this.properties);a<b.length;){var c=b[a];++a;c!="filter"&&A.setProperty(this.filter,c,A.field(this.properties,c))}this.setFilter()},initialize:function(){for(var a,b,c=0,d=A.fields(this.properties);c<
d.length;)a=d[c],++c,a!="filter"&&(b=this.filter,b=Object.prototype.hasOwnProperty.call(b,a)?A.field(b,a):A.getProperty(b,a),a=new Aj(this.filter,a,b,A.field(this.properties,a)-b,Object.prototype.hasOwnProperty.call(this.filter,"set_"+a)),this.propertyDetails.push(a));this.detailsLength=this.propertyDetails.length;this.initialized=!0},setFilter:function(){var a=this.target.get_filters();if(this.filterIndex>-1)a[this.filterIndex]=this.filter;else for(var b=0,c=a.length;b<c;){var d=b++;u.__instanceof(a[d],
this.filterClass)&&(a[d]=this.filter)}b=this.target;!Object.prototype.hasOwnProperty.call(b,"filters")||b.__properties__&&b.__properties__.set_filters?A.setProperty(b,"filters",a):b.filters=a},update:function(a){Ed.prototype.update.call(this,a);this.setFilter()},__class__:Vr});var Tr=function(a,b,c){Ed.call(this,a,b,c)};r["motion.actuators.MotionPathActuator"]=Tr;Tr.__name__="motion.actuators.MotionPathActuator";Tr.__super__=Ed;Tr.prototype=I(Ed.prototype,{apply:function(){for(var a=0,b=A.fields(this.properties);a<
b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?this.target[c]=u.__cast(A.field(this.properties,c),Ok).get_end():A.setProperty(this.target,c,u.__cast(A.field(this.properties,c),Ok).get_end())}},initialize:function(){for(var a,b=0,c=A.fields(this.properties);b<c.length;){var d=c[b];++b;a=u.__cast(A.field(this.properties,d),Ok);if(a!=null){var f=!0;Object.prototype.hasOwnProperty.call(this.target,d)?a.set_start(A.field(this.target,d)):(f=!1,a.set_start(A.getProperty(this.target,
d)));a=new fk(this.target,d,a,f);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){if(!this.paused){var b=(a-this.timeOffset)/this.duration;b>1&&(b=1);this.initialized||this.initialize();if(this.special){var c=this._reverse?this._ease.calculate(1-b):this._ease.calculate(b);f=0;for(g=this.propertyDetails;f<g.length;){var d=g[f];++f;this._snapping?d.isField?d.target[d.propertyName]=Math.round(u.__cast(d,fk).path.calculate(c)):A.setProperty(d.target,
d.propertyName,Math.round(u.__cast(d,fk).path.calculate(c))):d.isField?d.target[d.propertyName]=u.__cast(d,fk).path.calculate(c):A.setProperty(d.target,d.propertyName,u.__cast(d,fk).path.calculate(c))}}else{c=this._ease.calculate(b);for(var f=0,g=this.propertyDetails;f<g.length;)d=g[f],++f,d.isField?d.target[d.propertyName]=u.__cast(d,fk).path.calculate(c):A.setProperty(d.target,d.propertyName,u.__cast(d,fk).path.calculate(c))}if(b==1){if(this._repeat==0){this.active=!1;this.toggleVisible?(a=this.target,
d=Object.prototype.hasOwnProperty.call(a,"alpha")?A.field(a,"alpha"):A.getProperty(a,"alpha"),a=d==0):a=!1;a&&(a=this.target,d=!1,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?A.setProperty(a,"visible",d):a.visible=d);this.complete(!0);return}this._onRepeat!=null&&(d=this._onRepeat,c=this._onRepeatParams,c==null&&(c=[]),d.apply(d,c));this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;this._repeat>
0&&this._repeat--}this.sendChange&&this.change()}},__class__:Tr});var Aj=function(a,b,c,d,f){f==null&&(f=!0);this.target=a;this.propertyName=b;this.start=c;this.change=d;this.isField=f};r["motion.actuators.PropertyDetails"]=Aj;Aj.__name__="motion.actuators.PropertyDetails";Aj.prototype={change:null,isField:null,propertyName:null,start:null,target:null,__class__:Aj};var fk=function(a,b,c,d){d==null&&(d=!0);Aj.call(this,a,b,0,0,d);this.path=c};r["motion.actuators.PropertyPathDetails"]=fk;fk.__name__=
"motion.actuators.PropertyPathDetails";fk.__super__=Aj;fk.prototype=I(Aj.prototype,{path:null,__class__:fk});var tp=function(a,b,c){Ed.call(this,a,b,c)};r["motion.actuators.TransformActuator"]=tp;tp.__name__="motion.actuators.TransformActuator";tp.__super__=Ed;tp.prototype=I(Ed.prototype,{endColorTransform:null,endSoundTransform:null,tweenColorTransform:null,tweenSoundTransform:null,apply:function(){this.initialize();if(this.endColorTransform!=null){var a=this.target,b;a=b=Object.prototype.hasOwnProperty.call(a,
"transform")?A.field(a,"transform"):A.getProperty(a,"transform");b=this.endColorTransform;!Object.prototype.hasOwnProperty.call(a,"colorTransform")||a.__properties__&&a.__properties__.set_colorTransform?A.setProperty(a,"colorTransform",b):a.colorTransform=b}this.endSoundTransform!=null&&(a=this.target,b=this.endSoundTransform,!Object.prototype.hasOwnProperty.call(a,"soundTransform")||a.__properties__&&a.__properties__.set_soundTransform?A.setProperty(a,"soundTransform",b):a.soundTransform=b)},initialize:function(){Object.prototype.hasOwnProperty.call(this.properties,
"colorValue")&&this.target instanceof ea&&this.initializeColor();(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")||Object.prototype.hasOwnProperty.call(this.properties,"soundPan"))&&this.initializeSound();this.detailsLength=this.propertyDetails.length;this.initialized=!0},initializeColor:function(){this.endColorTransform=new ca;var a=this.properties.colorValue,b=this.properties.colorStrength;if(b<1){if(b<.5){var c=1;b*=2}else c=1-(b-.5)*2,b=1;this.endColorTransform.redMultiplier=
c;this.endColorTransform.greenMultiplier=c;this.endColorTransform.blueMultiplier=c;this.endColorTransform.redOffset=b*(a>>16&255);this.endColorTransform.greenOffset=b*(a>>8&255);this.endColorTransform.blueOffset=b*(a&255)}else this.endColorTransform.redMultiplier=0,this.endColorTransform.greenMultiplier=0,this.endColorTransform.blueMultiplier=0,this.endColorTransform.redOffset=a>>16&255,this.endColorTransform.greenOffset=a>>8&255,this.endColorTransform.blueOffset=a&255;a="redMultiplier greenMultiplier blueMultiplier redOffset greenOffset blueOffset".split(" ");
if(Object.prototype.hasOwnProperty.call(this.properties,"colorAlpha"))this.endColorTransform.alphaMultiplier=this.properties.colorAlpha,a.push("alphaMultiplier");else{var d=this.target;var f=Object.prototype.hasOwnProperty.call(d,"alpha")?A.field(d,"alpha"):A.getProperty(d,"alpha");this.endColorTransform.alphaMultiplier=f}d=this.target;c=f=Object.prototype.hasOwnProperty.call(d,"transform")?A.field(d,"transform"):A.getProperty(d,"transform");c=f=Object.prototype.hasOwnProperty.call(c,"colorTransform")?
A.field(c,"colorTransform"):A.getProperty(c,"colorTransform");this.tweenColorTransform=new ca;for(b=0;b<a.length;){var g=a[b];++b;f=Object.prototype.hasOwnProperty.call(c,g)?A.field(c,g):A.getProperty(c,g);var h=this.tweenColorTransform;d=this.endColorTransform;d=Object.prototype.hasOwnProperty.call(d,g)?A.field(d,g):A.getProperty(d,g);g=new Aj(h,g,f,d-f);this.propertyDetails.push(g)}},initializeSound:function(){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?A.field(a,
"soundTransform"):A.getProperty(a,"soundTransform");b==null&&(a=this.target,b=new ci,!Object.prototype.hasOwnProperty.call(a,"soundTransform")||a.__properties__&&a.__properties__.set_soundTransform?A.setProperty(a,"soundTransform",b):a.soundTransform=b);a=this.target;var c=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?A.field(a,"soundTransform"):A.getProperty(a,"soundTransform");a=this.target;this.endSoundTransform=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?A.field(a,
"soundTransform"):A.getProperty(a,"soundTransform");this.tweenSoundTransform=new ci;Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")&&(this.endSoundTransform.volume=this.properties.soundVolume,this.propertyDetails.push(new Aj(this.tweenSoundTransform,"volume",c.volume,this.endSoundTransform.volume-c.volume)));Object.prototype.hasOwnProperty.call(this.properties,"soundPan")&&(this.endSoundTransform.pan=this.properties.soundPan,this.propertyDetails.push(new Aj(this.tweenSoundTransform,
"pan",c.pan,this.endSoundTransform.pan-c.pan)))},update:function(a){Ed.prototype.update.call(this,a);if(this.endColorTransform!=null){var b=this.target;b=a=Object.prototype.hasOwnProperty.call(b,"transform")?A.field(b,"transform"):A.getProperty(b,"transform");a=this.tweenColorTransform;!Object.prototype.hasOwnProperty.call(b,"colorTransform")||b.__properties__&&b.__properties__.set_colorTransform?A.setProperty(b,"colorTransform",a):b.colorTransform=a}this.endSoundTransform!=null&&(b=this.target,a=
this.tweenSoundTransform,!Object.prototype.hasOwnProperty.call(b,"soundTransform")||b.__properties__&&b.__properties__.set_soundTransform?A.setProperty(b,"soundTransform",a):b.soundTransform=a)},__class__:tp});var vp=function(){};r["motion.easing._Bounce.BounceEaseIn"]=vp;vp.__name__="motion.easing._Bounce.BounceEaseIn";vp.__interfaces__=[ze];vp._ease=function(a,b,c,d){a=d-a;return c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?
c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))+b};vp.prototype={calculate:function(a){a=1-a;return 1-((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375)},ease:function(a,b,c,d){a=d-a;return c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*
(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))+b},__class__:vp};var Xr=function(){};r["motion.easing._Bounce.BounceEaseInOut"]=Xr;Xr.__name__="motion.easing._Bounce.BounceEaseInOut";Xr.__interfaces__=[ze];Xr.prototype={calculate:function(a){if(a<.5)return a=1-a*2,(1-((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375))*.5;a=a*2-1;
return((a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375)*.5+.5},ease:function(a,b,c,d){if(a<d/2)return a=d-a*2,(c-((a/=d)<.36363636363636365?7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375)))*.5+b;a=a*2-d;return((a/=d)<.36363636363636365?
7.5625*a*a*c:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+.9375):c*(7.5625*(a-=.9545454545454546)*a+.984375))*.5+c*.5+b},__class__:Xr};var wp=function(){};r["motion.easing._Bounce.BounceEaseOut"]=wp;wp.__name__="motion.easing._Bounce.BounceEaseOut";wp.__interfaces__=[ze];wp._ease=function(a,b,c,d){return(a/=d)<.36363636363636365?7.5625*a*a*c+b:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75)+b:a<.9090909090909091?c*(7.5625*
(a-=.8181818181818182)*a+.9375)+b:c*(7.5625*(a-=.9545454545454546)*a+.984375)+b};wp.prototype={calculate:function(a){return(a/=1)<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375},ease:function(a,b,c,d){return(a/=d)<.36363636363636365?7.5625*a*a*c+b:a<.7272727272727273?c*(7.5625*(a-=.5454545454545454)*a+.75)+b:a<.9090909090909091?c*(7.5625*(a-=.8181818181818182)*a+
.9375)+b:c*(7.5625*(a-=.9545454545454546)*a+.984375)+b},__class__:wp};var wk=function(){};r["motion.easing.Bounce"]=wk;wk.__name__="motion.easing.Bounce";var Yr=function(){};r["motion.easing._Cubic.CubicEaseIn"]=Yr;Yr.__name__="motion.easing._Cubic.CubicEaseIn";Yr.__interfaces__=[ze];Yr.prototype={calculate:function(a){return a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a+b},__class__:Yr};var Zr=function(){};r["motion.easing._Cubic.CubicEaseInOut"]=Zr;Zr.__name__="motion.easing._Cubic.CubicEaseInOut";
Zr.__interfaces__=[ze];Zr.prototype={calculate:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},__class__:Zr};var $r=function(){};r["motion.easing._Cubic.CubicEaseOut"]=$r;$r.__name__="motion.easing._Cubic.CubicEaseOut";$r.__interfaces__=[ze];$r.prototype={calculate:function(a){return--a*a*a+1},ease:function(a,b,c,d){a=a/d-1;return c*(a*a*a+1)+b},__class__:$r};var xk=function(){};r["motion.easing.Cubic"]=xk;xk.__name__=
"motion.easing.Cubic";var xp=function(a,b){this.a=a;this.p=b};r["motion.easing._Elastic.ElasticEaseIn"]=xp;xp.__name__="motion.easing._Elastic.ElasticEaseIn";xp.__interfaces__=[ze];xp.prototype={a:null,p:null,calculate:function(a){if(a==0)return 0;if(a==1)return 1;if(this.a<1){this.a=1;var b=this.p/4}else b=this.p/(2*Math.PI)*Math.asin(1/this.a);return-(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a-b)/this.p))},ease:function(a,b,c,d){if(a==0)return b;if((a/=d)==1)return b+c;this.a<
Math.abs(c)?(this.a=c,c=this.p/4):c=this.p/(2*Math.PI)*Math.asin(c/this.a);return-(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-c)/this.p))+b},__class__:xp};var yp=function(a,b){this.a=a;this.p=b};r["motion.easing._Elastic.ElasticEaseInOut"]=yp;yp.__name__="motion.easing._Elastic.ElasticEaseInOut";yp.__interfaces__=[ze];yp.prototype={a:null,p:null,calculate:function(a){return a==0?0:(a/=.5)==2?1:a<1?-.5*(Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a-.11249999999999999)/.44999999999999996)):
Math.exp(-6.931471805599453*--a)*Math.sin(2*Math.PI*(a-.11249999999999999)/.44999999999999996)*.5+1},ease:function(a,b,c,d){if(a==0)return b;if((a/=d/2)==2)return b+c;if(this.a<Math.abs(c)){this.a=c;var f=this.p/4}else f=this.p/(2*Math.PI)*Math.asin(c/this.a);return a<1?-.5*(this.a*Math.exp(6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-f)/this.p))+b:this.a*Math.exp(-6.931471805599453*--a)*Math.sin(2*Math.PI*(a*d-f)/this.p)*.5+c+b},__class__:yp};var zp=function(a,b){this.a=a;this.p=b};r["motion.easing._Elastic.ElasticEaseOut"]=
zp;zp.__name__="motion.easing._Elastic.ElasticEaseOut";zp.__interfaces__=[ze];zp.prototype={a:null,p:null,calculate:function(a){if(a==0)return 0;if(a==1)return 1;if(this.a<1){this.a=1;var b=this.p/4}else b=this.p/(2*Math.PI)*Math.asin(1/this.a);return this.a*Math.exp(-6.931471805599453*a)*Math.sin(2*Math.PI*(a-b)/this.p)+1},ease:function(a,b,c,d){if(a==0)return b;if((a/=d)==1)return b+c;if(this.a<Math.abs(c)){this.a=c;var f=this.p/4}else f=this.p/(2*Math.PI)*Math.asin(c/this.a);return this.a*Math.exp(-6.931471805599453*
a)*Math.sin(2*Math.PI*(a*d-f)/this.p)+c+b},__class__:zp};var Ti=function(){};r["motion.easing.Elastic"]=Ti;Ti.__name__="motion.easing.Elastic";Ti.easeInWith=function(a,b){return new xp(a,b)};Ti.easeInOutWith=function(a,b){return new yp(a,b)};Ti.easeOutWith=function(a,b){return new zp(a,b)};var bg=function(){};r["motion.easing.Linear"]=bg;bg.__name__="motion.easing.Linear";bg.__properties__={get_easeNone:"get_easeNone"};bg.get_easeNone=function(){return new as};var as=function(){};r["motion.easing.LinearEaseNone"]=
as;as.__name__="motion.easing.LinearEaseNone";as.__interfaces__=[ze];as.prototype={calculate:function(a){return a},ease:function(a,b,c,d){return c*a/d+b},__class__:as};var bs=function(){};r["motion.easing._Quad.QuadEaseIn"]=bs;bs.__name__="motion.easing._Quad.QuadEaseIn";bs.__interfaces__=[ze];bs.prototype={calculate:function(a){return a*a},ease:function(a,b,c,d){return c*(a/=d)*a+b},__class__:bs};var cs=function(){};r["motion.easing._Quad.QuadEaseInOut"]=cs;cs.__name__="motion.easing._Quad.QuadEaseInOut";
cs.__interfaces__=[ze];cs.prototype={calculate:function(a){return(a*=2)<1?.5*a*a:-.5*((a-1)*(a-3)-1)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*((a-1)*(a-3)-1)+b},__class__:cs};var ds=function(){};r["motion.easing._Quad.QuadEaseOut"]=ds;ds.__name__="motion.easing._Quad.QuadEaseOut";ds.__interfaces__=[ze];ds.prototype={calculate:function(a){return-a*(a-2)},ease:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},__class__:ds};var Ai=function(){};r["motion.easing.Quad"]=Ai;Ai.__name__="motion.easing.Quad";
var es=function(){};r["motion.easing._Quart.QuartEaseIn"]=es;es.__name__="motion.easing._Quart.QuartEaseIn";es.__interfaces__=[ze];es.prototype={calculate:function(a){return a*a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a+b},__class__:es};var fs=function(){};r["motion.easing._Quart.QuartEaseInOut"]=fs;fs.__name__="motion.easing._Quart.QuartEaseInOut";fs.__interfaces__=[ze];fs.prototype={calculate:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},ease:function(a,b,c,d){return(a/=d/
2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},__class__:fs};var gs=function(){};r["motion.easing._Quart.QuartEaseOut"]=gs;gs.__name__="motion.easing._Quart.QuartEaseOut";gs.__interfaces__=[ze];gs.prototype={calculate:function(a){return-(--a*a*a*a-1)},ease:function(a,b,c,d){a=a/d-1;return-c*(a*a*a*a-1)+b},__class__:gs};var lh=function(){};r["motion.easing.Quart"]=lh;lh.__name__="motion.easing.Quart";var hs=function(){};r["motion.easing._Quint.QuintEaseIn"]=hs;hs.__name__="motion.easing._Quint.QuintEaseIn";
hs.__interfaces__=[ze];hs.prototype={calculate:function(a){return a*a*a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},__class__:hs};var is=function(){};r["motion.easing._Quint.QuintEaseInOut"]=is;is.__name__="motion.easing._Quint.QuintEaseInOut";is.__interfaces__=[ze];is.prototype={calculate:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},ease:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},__class__:is};var js=function(){};r["motion.easing._Quint.QuintEaseOut"]=
js;js.__name__="motion.easing._Quint.QuintEaseOut";js.__interfaces__=[ze];js.prototype={calculate:function(a){return--a*a*a*a*a+1},ease:function(a,b,c,d){a=a/d-1;return c*(a*a*a*a*a+1)+b},__class__:js};var yk=function(){};r["motion.easing.Quint"]=yk;yk.__name__="motion.easing.Quint";var ks=function(){};r["motion.easing._Sine.SineEaseIn"]=ks;ks.__name__="motion.easing._Sine.SineEaseIn";ks.__interfaces__=[ze];ks.prototype={calculate:function(a){return 1-Math.cos(Math.PI/2*a)},ease:function(a,b,c,d){return-c*
Math.cos(a/d*(Math.PI/2))+c+b},__class__:ks};var ls=function(){};r["motion.easing._Sine.SineEaseInOut"]=ls;ls.__name__="motion.easing._Sine.SineEaseInOut";ls.__interfaces__=[ze];ls.prototype={calculate:function(a){return-(Math.cos(Math.PI*a)-1)/2},ease:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},__class__:ls};var ms=function(){};r["motion.easing._Sine.SineEaseOut"]=ms;ms.__name__="motion.easing._Sine.SineEaseOut";ms.__interfaces__=[ze];ms.prototype={calculate:function(a){return Math.sin(Math.PI/
2*a)},ease:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},__class__:ms};var zk=function(){};r["motion.easing.Sine"]=zk;zk.__name__="motion.easing.Sine";var ix={exists:function(a,b){return a.exists(b)},get:function(a,b){return a.get(b)},keyValueIterator:function(a){return a.keyValueIterator()},remove:function(a,b){return a.remove(b)},set:function(a,b,c){a.set(b,c);return c},iterator:function(a){return a.keys()},each:function(a){return a.iterator()},toStringMap:function(a,b){return new aa},
toIntMap:function(a,b){return new we},toFloatMap:function(a,b){return new En},toEnumValueMapMap:function(a,b){return new Ye},toObjectMap:function(a,b){return new Na},toUtilsObjectMap:function(a,b){return new Fn},toClassMap:function(a,b){return new Gn},fromStringMap:function(a){return a},fromIntMap:function(a){return a},fromFloatMap:function(a){return a},fromObjectMap:function(a){return a},fromUtilsObjectMap:function(a){return a},fromClassMap:function(a){return a}},Oa=function(){};r["openfl.Lib"]=
Oa;Oa.__name__="openfl.Lib";Oa.__properties__={get_current:"get_current",get_application:"get_application"};Oa.as=function(a,b){return u.__instanceof(a,b)?a:null};Oa.attach=function(a){return new Lj};Oa.clearInterval=function(a){Oa.__timers.h.hasOwnProperty(a)&&(Oa.__timers.h[a].stop(),Oa.__timers.remove(a))};Oa.clearTimeout=function(a){Oa.__timers.h.hasOwnProperty(a)&&(Oa.__timers.h[a].stop(),Oa.__timers.remove(a))};Oa.getDefinitionByName=function(a){if(a==null)return null;a=Z.replace(a,"::",".");
return r[a]};Oa.getQualifiedClassName=function(a){if(a==null)return null;var b=u.__instanceof(a,Gt)?a:u.getClass(a);return b==null?typeof a=="boolean"||a==Yw?"Bool":typeof a=="number"&&(a|0)===a||a==Ft?"Int":typeof a=="number"||a==Zw?"Float":null:b.__name__};Oa.getQualifiedSuperclassName=function(a){if(a==null)return null;a=u.__instanceof(a,Gt)?a:u.getClass(a);if(a==null)return null;a=a.__super__;return a==null?null:a.__name__};Oa.getTimer=function(){return Hb.getTimer()};Oa.describeType=function(a){Oa.notImplemented({fileName:"openfl/Lib.hx",
lineNumber:272,className:"openfl.Lib",methodName:"describeType"});return null};Oa.getURL=function(a,b){Oa.navigateToURL(a,b)};Oa.navigateToURL=function(a,b){b==null&&(b="_blank");var c=a.url;if(Aa.typeof(a.data)==nb.TObject){for(var d="",f=A.fields(a.data),g=0;g<f.length;){var h=f[g];++g;d.length>0&&(d+="&");var l=encodeURIComponent(h)+"=";h=L.string(A.field(a.data,h));d+=l+encodeURIComponent(h)}c=c.indexOf("?")>-1?c+("&"+d):c+("?"+d)}Hb.openURL(c,b)};Oa.encodeURIComponent=function(a){return encodeURIComponent(a)};
Oa.decodeURIComponent=function(a){return decodeURIComponent(a.split("+").join(" "))};Oa.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(Oa.__sentWarnings.h,b)||(Oa.__sentWarnings.h[b]=!0,Mb.warn(a.methodName+" is not implemented",a))};Oa.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},!1)};Oa.sendToURL=function(a){(new Si).load(a)};Oa.setInterval=function(a,b,c){var d=++Oa.__lastTimerID;
b=new rd(b);Oa.__timers.h[d]=b;b.run=function(){if(Oa.get_current()!=null&&Oa.get_current().stage!=null&&Oa.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,c==null?[]:c)}catch(g){Rb.lastError=g;var f=la.caught(g).unwrap();Oa.get_current().stage.__handleError(f)}else a.apply(a,c==null?[]:c)};return d};Oa.setTimeout=function(a,b,c){var d=++Oa.__lastTimerID,f=Oa.__timers;b=rd.delay(function(){Oa.__timers.remove(d);if(Oa.get_current()!=null&&Oa.get_current().stage!=null&&Oa.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,
c==null?[]:c)}catch(h){Rb.lastError=h;var g=la.caught(h).unwrap();Oa.get_current().stage.__handleError(g)}else a.apply(a,c==null?[]:c)},b);f.h[d]=b;return d};Oa.trace=function(a){Me.trace(a,{fileName:"openfl/Lib.hx",lineNumber:672,className:"openfl.Lib",methodName:"trace"})};Oa.isXMLName=function(a){return a!=null&&(new sb("^[a-zA-Z_]","")).match(a)&&!(new sb("^[xX][mM][lL]","")).match(a)&&(new sb("^[a-zA-Z0-9_\\-\\.]+$","")).match(a)?!0:!1};Oa.getClassByAlias=function(a){if(!Object.prototype.hasOwnProperty.call(Oa.__registeredClassAliases.h,
a))throw new Ld("Class "+a+" could not be found.");return Oa.__registeredClassAliases.h[a]};Oa.registerClassAlias=function(a,b){if(b==null)throw new ne("Parameter classObject must be non-null");if(a==null)throw new ne("Parameter aliasName must be non-null");Oa.__registeredClassAliases.h[a]=b;Oa.__registeredClasses.set(b,a)};Oa.get_application=function(){return fd.application};Oa.get_current=function(){fd.current==null&&(fd.current=new Lj);return fd.current};var Pk=function(){};r["openfl._Vector.IVector"]=
Pk;Pk.__name__="openfl._Vector.IVector";Pk.__isInterface__=!0;Pk.prototype={get_length:null,set_length:null,fixed:null,concat:null,copy:null,filter:null,get:null,indexOf:null,insertAt:null,iterator:null,join:null,lastIndexOf:null,pop:null,push:null,removeAt:null,reverse:null,set:null,shift:null,slice:null,sort:null,splice:null,toString:null,unshift:null,__tempIndex:null,__class__:Pk,__properties__:{set_length:"set_length",get_length:"get_length"}};var Oi=function(a,b,c){b==null&&(b=!1);a==null&&(a=
0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};r["openfl._Vector.BoolVector"]=Oi;Oi.__name__="openfl._Vector.BoolVector";Oi.__interfaces__=[Pk];Oi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Oi(0,!1,this.__array.slice()):a.__array.length>0?new Oi(0,!1,this.__array.concat(a.__array)):new Oi(0,!1,this.__array.slice())},copy:function(){return new Oi(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],
d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Oi(0,b,c)},get:function(a){return a>=this.__array.length?!1:this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new zg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=
b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:!1},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?
null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new Oi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Oi(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=
this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=!1}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Oi,__properties__:{set_length:"set_length",get_length:"get_length"}};var Qi=function(a,b,c,d){d==null&&(d=!1);b==null&&(b=!1);a==null&&(a=0);if(d){if(this.__array=[],c!=null){d=0;for(var f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else c==null&&(c=[]),this.__array=c;a>0&&this.set_length(a);this.fixed=b};r["openfl._Vector.FloatVector"]=
Qi;Qi.__name__="openfl._Vector.FloatVector";Qi.__interfaces__=[Pk];Qi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Qi(0,!1,this.__array.slice()):a.__array.length>0?new Qi(0,!1,this.__array.concat(a.__array)):new Qi(0,!1,this.__array.slice())},copy:function(){return new Qi(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Qi(0,b,c)},get:function(a){return this.__array[a]},
indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new zg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:
this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new Qi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new Qi(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(a!=this.__array.length&&!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},
__class__:Qi,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ri=function(a,b,c){b==null&&(b=!1);a==null&&(a=0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};r["openfl._Vector.FunctionVector"]=Ri;Ri.__name__="openfl._Vector.FunctionVector";Ri.__interfaces__=[Pk];Ri.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Ri(0,!1,this.__array.slice()):a.__array.length>0?new Ri(0,!1,this.__array.concat(a.__array)):new Ri(0,
!1,this.__array.slice())},copy:function(){return new Ri(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Ri(0,b,c)},get:function(a){return a>=this.__array.length?null:this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},
iterator:function(){return new zg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();
return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new Ri(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Ri(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||
this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=null}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Ri,__properties__:{set_length:"set_length",get_length:"get_length"}};var Pi=function(a,b,c){b==null&&(b=!1);a==null&&(a=0);c==null&&(c=[]);this.__array=c;a>0&&this.set_length(a);this.fixed=b};r["openfl._Vector.IntVector"]=
Pi;Pi.__name__="openfl._Vector.IntVector";Pi.__interfaces__=[Pk];Pi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Pi(0,!1,this.__array.slice()):a.__array.length>0?new Pi(0,!1,this.__array.concat(a.__array)):new Pi(0,!1,this.__array.slice())},copy:function(){return new Pi(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Pi(0,b,c)},get:function(a){return this.__array[a]},
indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new zg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:
this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new Pi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new Pi(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Pi,
__properties__:{set_length:"set_length",get_length:"get_length"}};var xi=function(a,b,c,d){d==null&&(d=!1);b==null&&(b=!1);a==null&&(a=0);if(d){if(this.__array=[],c!=null){d=0;for(var f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else c==null&&(c=[]),this.__array=c;a>0&&this.set_length(a);this.fixed=b};r["openfl._Vector.ObjectVector"]=xi;xi.__name__="openfl._Vector.ObjectVector";xi.__interfaces__=[Pk];xi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new xi(0,
!1,this.__array.slice()):a.__array.length>0?new xi(0,!1,this.__array.concat(a.__array)):new xi(0,!1,this.__array.slice())},copy:function(){return new xi(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new xi(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){b==null&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,
b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return new zg(this.__array)},join:function(a){a==null&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=b==null||b>=this.__array.length?this.__array.length-1:b;b>=0;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?
this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){a==null&&(a=0);b==null&&(b=16777215);return new xi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new xi(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return this.__array!=
null?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;a<0&&(a=0);if(a>b)for(;b<a;)b++,this.__array.push(null);else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:xi,__properties__:{set_length:"set_length",get_length:"get_length"}};var bo=function(){Ha.call(this);fd.application==null&&(fd.application=this);fd.current==
null&&(fd.current=new Lj);fd.current.__loaderInfo=Ej.create(null);fd.current.__loaderInfo.content=fd.current};r["openfl.display.Application"]=bo;bo.__name__="openfl.display.Application";bo.__super__=Ha;bo.prototype=I(Ha.prototype,{createWindow:function(a){var b=new Ap(this,a);fd.current.__loaderInfo.width==-1&&(fd.current.__loaderInfo.width=b.__width,fd.current.__loaderInfo.height=b.__height);this.__windows.push(b);this.__windowByID.h[b.id]=b;var c=this;b.onClose.add(function(){c.__onWindowClose(b)},
!1,-1E4);this.__window==null&&(this.__window=b,b.onActivate.add(m(this,this.onWindowActivate)),b.onRenderContextLost.add(m(this,this.onRenderContextLost)),b.onRenderContextRestored.add(m(this,this.onRenderContextRestored)),b.onDeactivate.add(m(this,this.onWindowDeactivate)),b.onDropFile.add(m(this,this.onWindowDropFile)),b.onEnter.add(m(this,this.onWindowEnter)),b.onExpose.add(m(this,this.onWindowExpose)),b.onFocusIn.add(m(this,this.onWindowFocusIn)),b.onFocusOut.add(m(this,this.onWindowFocusOut)),
b.onFullscreen.add(m(this,this.onWindowFullscreen)),b.onKeyDown.add(m(this,this.onKeyDown)),b.onKeyUp.add(m(this,this.onKeyUp)),b.onLeave.add(m(this,this.onWindowLeave)),b.onMinimize.add(m(this,this.onWindowMinimize)),b.onMouseDown.add(m(this,this.onMouseDown)),b.onMouseMove.add(m(this,this.onMouseMove)),b.onMouseMoveRelative.add(m(this,this.onMouseMoveRelative)),b.onMouseUp.add(m(this,this.onMouseUp)),b.onMouseWheel.add(m(this,this.onMouseWheel)),b.onMove.add(m(this,this.onWindowMove)),b.onRender.add(m(this,
this.render)),b.onResize.add(m(this,this.onWindowResize)),b.onRestore.add(m(this,this.onWindowRestore)),b.onTextEdit.add(m(this,this.onTextEdit)),b.onTextInput.add(m(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(b);return b},exec:function(){return Ha.prototype.exec.call(this)},__checkForAllWindowsClosed:function(){this.__windows.length>0||Ha.prototype.__checkForAllWindowsClosed.call(this)},__onModuleExit:function(a){this.onExit.canceled||(fd.application==this&&(fd.application=
null),Ha.prototype.__onModuleExit.call(this,a))},__class__:bo});var cg=function(a,b,c){c==null&&(c=!1);ea.call(this);this.__drawableType=2;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;b==null&&(this.pixelSnapping=1)};r["openfl.display.Bitmap"]=cg;cg.__name__="openfl.display.Bitmap";cg.__super__=ea;cg.prototype=I(ea.prototype,{pixelSnapping:null,smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,__enterFrame:function(a){this.__bitmapData==null||this.__bitmapData.image==
null||this.__bitmapData.image.version==this.__imageVersion||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=Ea.__pool.get();this.__bitmapData!=null?c.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height):c.setTo(0,0,0,0);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.__bitmapData==null||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,
b))return!1;this.__getRenderTransform();var h=this.__renderTransform,l=h.a*h.d-h.b*h.c;c=l==0?-h.tx:1/l*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;l=h.a*h.d-h.b*h.c;a=l==0?-h.ty:1/l*(h.a*(b-h.ty)+h.b*(h.tx-a));if(c>0&&a>0&&c<=this.__bitmapData.width&&a<=this.__bitmapData.height){if(this.__scrollRect!=null&&!this.__scrollRect.contains(c,a))return!1;d==null||f||d.push(g);return!0}return!1},__hitTestMask:function(a,b){if(this.__bitmapData==null)return!1;this.__getRenderTransform();var c=this.__renderTransform,
d=c.a*c.d-c.b*c.c,f=d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;a=d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a));return f>0&&a>0&&f<=this.__bitmapData.width&&a<=this.__bitmapData.height?!0:!1},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=a;this.smoothing=!1;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());this.__imageVersion=-1;return this.__bitmapData},set_height:function(a){this.__bitmapData!=
null?this.set_scaleY(a/this.__bitmapData.height):this.set_scaleY(0);return a},set_width:function(a){this.__bitmapData!=null?this.set_scaleX(a/this.__bitmapData.width):this.set_scaleX(0);return a},__class__:cg,__properties__:I(ea.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var Ea=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};r["openfl.geom.Rectangle"]=Ea;Ea.__name__="openfl.geom.Rectangle";
Ea.prototype={height:null,width:null,x:null,y:null,clone:function(){return new Ea(this.x,this.y,this.width,this.height)},contains:function(a,b){return a>=this.x&&b>=this.y&&a<this.get_right()?b<this.get_bottom():!1},containsPoint:function(a){return this.contains(a.x,a.y)},containsRect:function(a){return a.width<=0||a.height<=0?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()?a.get_bottom()<this.get_bottom():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():
!1},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height},equals:function(a){return a==this?!0:a!=null&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},inflate:function(a,b){this.x-=a;this.width+=a*2;this.y-=b;this.height+=b*2},inflatePoint:function(a){this.inflate(a.x,a.y)},intersection:function(a){var b=this.x<a.x?a.x:this.x,c=this.get_right()>a.get_right()?a.get_right():this.get_right();if(c<=b)return new Ea;var d=this.y<a.y?a.y:this.y;a=this.get_bottom()>
a.get_bottom()?a.get_bottom():this.get_bottom();return a<=d?new Ea:new Ea(b,d,c-b,a-d)},intersectionToOutput:function(a,b){b==null&&(b=new Ea);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();if(d<=c)return b.setTo(0,0,0,0),b;var f=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();if(a<=f)return b.setTo(0,0,0,0),b;b.setTo(c,f,d-c,a-f);return b},intersects:function(a){var b=this.x<a.x?a.x:this.x;if((this.get_right()>
a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return this.width<=0?!0:this.height<=0},offset:function(a,b){this.x+=a;this.y+=b},offsetPoint:function(a){this.x+=a.x;this.y+=a.y},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},toString:function(){return"(x="+this.x+", y="+this.y+", width="+
this.width+", height="+this.height+")"},union:function(a){if(this.width==0||this.height==0)return a.clone();if(a.width==0||a.height==0)return this.clone();var b=this.x>a.x?a.x:this.x,c=this.get_right()<a.get_right()?a.get_right():this.get_right(),d=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();return new Ea(b,d,c-b,a-d)},unionToOutput:function(a,b){b==null&&(b=new Ea);if(this.width==0||this.height==0)return b.setTo(a.x,a.y,a.width,a.height),b;if(a.width==
0||a.height==0)return b.setTo(this.x,this.y,this.width,this.height),b;var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f);return b},__contract:function(a,b,c,d){if(this.width!=0||this.height!=0){var f=0,g=0,h=0,l=0;this.x<a&&(f=a-this.x);this.y<b&&(g=b-this.y);this.get_right()>a+c&&(h=a+c-this.get_right());this.get_bottom()>b+d&&(l=b+d-this.get_bottom());
this.x+=f;this.y+=g;this.width+=h-f;this.height+=l-g}},__expand:function(a,b,c,d){if(this.width==0&&this.height==0)this.x=a,this.y=b,this.width=c,this.height=d;else{var f=this.get_right(),g=this.get_bottom();this.x>a&&(this.x=a,this.width=f-a);this.y>b&&(this.y=b,this.height=g-b);f<a+c&&(this.width=a+c-this.x);g<b+d&&(this.height=b+d-this.y)}},__toLimeRectangle:function(){Ea.__limeRectangle==null&&(Ea.__limeRectangle=new We);Ea.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return Ea.__limeRectangle},
__transform:function(a,b){var c=b.a*this.x+b.c*this.y,d=c,f=b.b*this.x+b.d*this.y,g=f,h=b.a*(this.x+this.width)+b.c*this.y,l=b.b*(this.x+this.width)+b.d*this.y;h<c&&(c=h);l<f&&(f=l);h>d&&(d=h);l>g&&(g=l);h=b.a*(this.x+this.width)+b.c*(this.y+this.height);l=b.b*(this.x+this.width)+b.d*(this.y+this.height);h<c&&(c=h);l<f&&(f=l);h>d&&(d=h);l>g&&(g=l);h=b.a*this.x+b.c*(this.y+this.height);l=b.b*this.x+b.d*(this.y+this.height);h<c&&(c=h);l<f&&(f=l);h>d&&(d=h);l>g&&(g=l);a.setTo(c+b.tx,f+b.ty,d-c,g-f)},
get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Qa(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new Qa(this.width,
this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new Qa(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:Ea,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",
get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var uc=function(a,b,c,d){d==null&&(d=-1);c==null&&(c=!0);this.__drawableType=0;this.transparent=c;a==null&&(a=0);b==null&&(b=0);a<0&&(a=0);b<0&&(b=0);this.width=a;this.height=b;this.rect=new Ea(0,0,a,b);this.__textureWidth=a;this.__textureHeight=b;a>0&&b>0&&(c?(d&-16777216)==0&&(d=0):d=-16777216|d&16777215,this.image=new Ic(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),
this.readable=this.__isValid=!0);this.__renderTransform=new S;this.__worldAlpha=1;this.__worldTransform=new S;this.__worldColorTransform=new ca;this.__renderable=!0;this.__asset=!1};r["openfl.display.BitmapData"]=uc;uc.__name__="openfl.display.BitmapData";uc.__interfaces__=[$b];uc.fromBase64=function(a,b){return null};uc.fromBytes=function(a,b){return null};uc.fromCanvas=function(a,b){b==null&&(b=!0);if(a==null)return null;var c=new uc(0,0,b,0);c.__fromImage(Ic.fromCanvas(a));c.image.set_transparent(b);
return c};uc.fromFile=function(a){return null};uc.fromImage=function(a,b){b==null&&(b=!0);if(a==null||a.buffer==null)return null;var c=new uc(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return c.image!=null?c:null};uc.fromTexture=function(a){if(a==null)return null;var b=new uc(a.__width,a.__height,!0,0);b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};uc.loadFromBase64=function(a,b){return Ic.loadFromBase64(a,b).then(function(c){return zc.withValue(uc.fromImage(c))})};
uc.loadFromBytes=function(a,b){return Ic.loadFromBytes(cc.toBytes(a)).then(function(c){c=uc.fromImage(c);b!=null&&c.__applyAlpha(b);return zc.withValue(c)})};uc.loadFromFile=function(a){return Ic.loadFromFile(a).then(function(b){return zc.withValue(uc.fromImage(b))})};uc.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__blendMode:null,__drawableType:null,__framebuffer:null,__framebufferContext:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,
__indexBufferGrid:null,__isMask:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__stencilBuffer:null,__surface:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__transform: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,__asset:null,applyFilter:function(a,b,c,d){if(this.readable&&a!=null&&a.readable){a=d.__needSecondBitmapData;var f=d.__preserveObject,g=null;var h=a?new uc(this.width,this.height,!0,0):this;f&&(g=new uc(this.width,this.height,!0,0));d.__preserveObject&&g.copyPixels(this,this.rect,c);b=d.__applyFilter(h,this,b,c);d.__preserveObject&&b.draw(g,null,null);a&&b==h&&(h.image.version=this.image.version,this.image=h.image);this.image.dirty=!0;this.image.version++}},
clone:function(){if(this.__isValid)if(this.readable||this.image!=null)var a=uc.fromImage(this.image.clone(),this.transparent);else a=new uc(0,0,this.transparent,0),a.width=this.width,a.height=this.height,a.__textureWidth=this.__textureWidth,a.__textureHeight=this.__textureHeight,a.rect.copyFrom(this.rect),a.__framebuffer=this.__framebuffer,a.__framebufferContext=this.__framebufferContext,a.__texture=this.__texture,a.__textureContext=this.__textureContext,a.__isValid=!0;else a=new uc(this.width,this.height,
this.transparent,0);a.__worldTransform.copyFrom(this.__worldTransform);a.__renderTransform.copyFrom(this.__renderTransform);return a},colorTransform:function(a,b){this.readable&&this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix())},compare:function(a){if(a==this)return 0;if(a==null)return-1;if(this.readable==0||a.readable==0)return-2;if(this.width!=a.width)return-3;if(this.height!=a.height)return-4;if(this.image!=null&&a.image!=null&&this.image.get_format()==a.image.get_format()){for(var b=
this.image.get_data(),c=a.image.get_data(),d=!0,f=0,g=b.length;f<g;){var h=f++;if(b[h]!=c[h]){d=!1;break}}if(d)return 0}b=null;f=0;for(g=this.height;f<g;){h=f++;for(var l=0,k=this.width;l<k;){var q=l++;c=!1;var w=this.getPixel32(q,h);var v=a.getPixel32(q,h);d=0;if(w!=v){var z=(w>>>16&255)-(v>>>16&255),n=(w>>>8&255)-(v>>>8&255),E=(w&255)-(v&255);z<0&&(z*=-1);n<0&&(n*=-1);E<0&&(E*=-1);z==0&&n==0&&E==0?(w=(w>>>24&255)-(v>>>24&255),w!=0&&(d=(d>>>24&255)<<24|16711680|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<
24|(d>>>16&255)<<16|65280|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,d=(w&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)):(d=(d>>>24&255)<<24|(z&255)<<16|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(n&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|E&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(b==null&&(b=new uc(this.width,this.height,this.transparent||a.transparent,0)),b.setPixel32(q,h,d))}}return b==null?0:b},copyChannel:function(a,
b,c,d,f){if(this.readable){switch(d){case 1:d=ti.RED;break;case 2:d=ti.GREEN;break;case 4:d=ti.BLUE;break;case 8:d=ti.ALPHA;break;default:return}switch(f){case 1:f=ti.RED;break;case 2:f=ti.GREEN;break;case 4:f=ti.BLUE;break;case 8:f=ti.ALPHA;break;default:return}this.image.copyChannel(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f)}},copyPixels:function(a,b,c,d,f,g){g==null&&(g=!1);this.readable&&a!=null&&(f!=null&&(uc.__tempVector.x=f.x,uc.__tempVector.y=f.y),this.image.copyPixels(a.image,
b.__toLimeRectangle(),c.__toLimeVector2(),d!=null?d.image:null,f!=null?uc.__tempVector:null,g))},dispose:function(){if(this.image!=null&&this.image.type==Uf.CANVAS&&!this.__asset){var a=this.image.buffer.__srcCanvas,b=this.image.buffer.__srcContext;a!=null&&(a.width=0,a.height=0);b!=null&&b.clearRect(0,0,0,0)}this.image=null;this.height=this.width=0;this.rect=null;this.readable=this.__isValid=!1;this.__textureContext=this.__texture=this.__framebufferContext=this.__framebuffer=this.__vertexBuffer=
this.__surface=null},disposeImage:function(){this.readable=!1},draw:function(a,b,c,d,f,g){g==null&&(g=!1);if(a!=null){var h=!0,l=null;a instanceof ea&&(l=u.__cast(a,ea),l.get_visible()||(h=!1,l.set_visible(!0)));a.__update(!1,!0);var k=S.__pool.get();k.copyFrom(a.__renderTransform);k.invert();b!=null&&k.concat(b);b=null;f!=null&&(b=S.__pool.get(),b.copyFrom(k),b.invert());var q=new ca;q.__copyFrom(a.__worldColorTransform);q.__invert();if(this.readable||Oa.get_current().stage.context3D==null){if(c!=
null){var w=Ea.__pool.get(),v=S.__pool.get();a.__getBounds(w,v);var z=Math.ceil(w.width),n=Math.ceil(w.height);v.tx=-w.x;v.ty=-w.y;z=new uc(z,n,!0,0);z.draw(a,v);z.colorTransform(z.rect,c);z.__renderTransform.identity();z.__renderTransform.tx=w.x;z.__renderTransform.ty=w.y;z.__renderTransform.concat(a.__renderTransform);z.__worldAlpha=a.__worldAlpha;z.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=z;Ea.__pool.release(w);S.__pool.release(v)}kb.convertToCanvas(this.image);c=new Qk(this.image.buffer.__srcContext);
c.__allowSmoothing=g;c.__overrideBlendMode=d;c.__worldTransform=k;c.__worldAlpha=1/a.__worldAlpha;c.__worldColorTransform=q;f!=null&&c.__pushMaskRect(f,b);this.__drawCanvas(a,c)}else this.__textureContext==null&&(this.__textureContext=Ha.current.__window.context),c!=null&&q.__combine(c),c=new rc(Oa.get_current().stage.context3D,this),c.__allowSmoothing=g,c.__pixelRatio=Oa.get_current().stage.window.__scale,c.__overrideBlendMode=d,c.__worldTransform=k,c.__worldAlpha=1/a.__worldAlpha,c.__worldColorTransform=
q,c.__resize(this.width,this.height),f!=null&&c.__pushMaskRect(f,b),this.__drawGL(a,c);f!=null&&(c.__popMaskRect(),S.__pool.release(b));S.__pool.release(k);l==null||h||l.set_visible(!1)}},drawWithQuality:function(a,b,c,d,f,g,h){g==null&&(g=!1);this.draw(a,b,c,d,f,h!=2&&g)},encode:function(a,b,c){if(!this.readable||a==null)return null;c==null&&(c=new Pc(0));var d=this.image;if(!a.equals(this.rect)){var f=S.__pool.get();f.tx=Math.round(-a.x);f.ty=Math.round(-a.y);a=new uc(Math.ceil(a.width),Math.ceil(a.height),
!0,0);a.draw(this,f);d=a.image;S.__pool.release(f)}return b instanceof uv?(c.writeBytes(cc.fromBytes(d.encode(Ir.PNG)),0,0),c):b instanceof ns?(c.writeBytes(cc.fromBytes(d.encode(Ir.JPEG,u.__cast(b,ns).quality)),0,0),c):null},fillRect:function(a,b){this.__fillRect(a,b,!0)},floodFill:function(a,b,c){this.readable&&this.image.floodFill(a,b,c,1)},generateFilterRect:function(a,b){return a.clone()},getIndexBuffer:function(a,b){if(this.__indexBuffer==null||this.__indexBufferContext!=a.__context||b!=null&&
this.__indexBufferGrid==null||this.__indexBufferGrid!=null&&!this.__indexBufferGrid.equals(b)){this.__indexBufferContext=a.__context;this.__indexBuffer=null;if(b!=null){this.__indexBufferGrid==null&&(this.__indexBufferGrid=new Ea);this.__indexBufferGrid.copyFrom(b);var c=b.width;b=b.height;c!=0&&b!=0?(this.__indexBufferData=new Uint16Array(54),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=a.createIndexBuffer(54)):c==0&&b!=0?(this.__indexBufferData=new Uint16Array(18),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=
a.createIndexBuffer(18)):c!=0&&b==0&&(this.__indexBufferData=new Uint16Array(18),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=a.createIndexBuffer(18))}else this.__indexBufferGrid=null;this.__indexBuffer==null&&(this.__indexBufferData=new Uint16Array(6),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=a.createIndexBuffer(6));this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},
getVertexBuffer:function(a,b,c){if(this.__vertexBuffer==null||this.__vertexBufferContext!=a.__context||b!=null&&this.__vertexBufferGrid==null||this.__vertexBufferGrid!=null&&!this.__vertexBufferGrid.equals(b)||c!=null&&(this.__vertexBufferWidth!=c.get_width()||this.__vertexBufferHeight!=c.get_height()||this.__vertexBufferScaleX!=c.get_scaleX()||this.__vertexBufferScaleY!=c.get_scaleY())){this.__uvRect=new Ea(0,0,this.width,this.height);this.__vertexBufferContext=a.__context;this.__vertexBuffer=null;
c!=null&&(this.__vertexBufferWidth=c.get_width(),this.__vertexBufferHeight=c.get_height(),this.__vertexBufferScaleX=c.get_scaleX(),this.__vertexBufferScaleY=c.get_scaleY());if(b!=null&&c!=null){this.__vertexBufferGrid==null&&(this.__vertexBufferGrid=new Ea);this.__vertexBufferGrid.copyFrom(b);this.__vertexBufferWidth=c.get_width();this.__vertexBufferHeight=c.get_height();this.__vertexBufferScaleX=c.get_scaleX();this.__vertexBufferScaleY=c.get_scaleY();var d=b.width,f=b.height;if(d!=0&&f!=0){this.__vertexBufferData=
new Float32Array(224);var g=b.x,h=b.y,l=this.width-d-g,k=this.height-f-h;b=g/this.width;var q=h/this.height;d/=this.width;f/=this.height;g/=c.get_scaleX();h/=c.get_scaleY();l/=c.get_scaleX();var w=k/c.get_scaleY();k=c.get_width()/c.get_scaleX()-g-l;l=c.get_height()/c.get_scaleY()-h-w;this.__vertexBufferData[0]=g;this.__vertexBufferData[1]=h;this.__vertexBufferData[3]=1*b;this.__vertexBufferData[4]=1*q;this.__vertexBufferData[15]=h;this.__vertexBufferData[18]=1*q;this.__vertexBufferData[28]=g;this.__vertexBufferData[31]=
1*b;this.__vertexBufferData[56]=g+k;this.__vertexBufferData[57]=h;this.__vertexBufferData[59]=1*(b+d);this.__vertexBufferData[60]=1*q;this.__vertexBufferData[70]=g+k;this.__vertexBufferData[73]=1*(b+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=h;this.__vertexBufferData[87]=1;this.__vertexBufferData[88]=1*q;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=1;this.__vertexBufferData[112]=g;this.__vertexBufferData[113]=h+l;this.__vertexBufferData[115]=1*b;this.__vertexBufferData[116]=
1*(q+f);this.__vertexBufferData[127]=h+l;this.__vertexBufferData[130]=1*(q+f);this.__vertexBufferData[140]=g+k;this.__vertexBufferData[141]=h+l;this.__vertexBufferData[143]=1*(b+d);this.__vertexBufferData[144]=1*(q+f);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=h+l;this.__vertexBufferData[157]=1;this.__vertexBufferData[158]=1*(q+f);this.__vertexBufferData[168]=g;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=1*b;this.__vertexBufferData[172]=1;this.__vertexBufferData[183]=
this.height;this.__vertexBufferData[186]=1;this.__vertexBufferData[196]=g+k;this.__vertexBufferData[197]=this.height;this.__vertexBufferData[199]=1*(b+d);this.__vertexBufferData[200]=1;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=1;this.__vertexBufferData[214]=1;this.__vertexBuffer=a.createVertexBuffer(16,14)}else d==0&&f!=0?(this.__vertexBufferData=new Float32Array(112),h=b.y,k=this.height-f-h,q=h/this.height,f/=this.height,h/=c.get_scaleY(),
w=k/c.get_scaleY(),l=c.get_height()/c.get_scaleY()-h-w,c=c.get_width()/c.get_scaleX(),this.__vertexBufferData[0]=c,this.__vertexBufferData[1]=h,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1*q,this.__vertexBufferData[15]=h,this.__vertexBufferData[18]=1*q,this.__vertexBufferData[28]=c,this.__vertexBufferData[31]=1,this.__vertexBufferData[56]=c,this.__vertexBufferData[57]=h+l,this.__vertexBufferData[59]=1,this.__vertexBufferData[60]=1*(q+f),this.__vertexBufferData[71]=h+l,this.__vertexBufferData[74]=
1*(q+f),this.__vertexBufferData[84]=c,this.__vertexBufferData[85]=this.height,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=1,this.__vertexBufferData[99]=this.height,this.__vertexBufferData[102]=1,this.__vertexBuffer=a.createVertexBuffer(8,14)):f==0&&d!=0&&(this.__vertexBufferData=new Float32Array(112),g=b.x,l=this.width-d-g,b=g/this.width,d/=this.width,g/=c.get_scaleX(),l/=c.get_scaleX(),k=c.get_width()/c.get_scaleX()-g-l,c=c.get_height()/c.get_scaleY(),this.__vertexBufferData[0]=g,this.__vertexBufferData[1]=
c,this.__vertexBufferData[3]=1*b,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=c,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=g,this.__vertexBufferData[31]=1*b,this.__vertexBufferData[56]=g+k,this.__vertexBufferData[57]=c,this.__vertexBufferData[59]=1*(b+d),this.__vertexBufferData[60]=1,this.__vertexBufferData[70]=g+k,this.__vertexBufferData[73]=1*(b+d),this.__vertexBufferData[84]=this.width,this.__vertexBufferData[85]=c,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=
1,this.__vertexBufferData[98]=this.width,this.__vertexBufferData[101]=1,this.__vertexBuffer=a.createVertexBuffer(8,14))}else this.__vertexBufferGrid=null;this.__vertexBuffer==null&&(this.__vertexBufferData=new Float32Array(56),this.__vertexBufferData[0]=this.width,this.__vertexBufferData[1]=this.height,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=this.height,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=this.width,this.__vertexBufferData[31]=1,
this.__vertexBuffer=a.createVertexBuffer(3,14));this.__vertexBuffer.uploadFromTypedArray(Mk.toArrayBufferView(this.__vertexBufferData))}return this.__vertexBuffer},getColorBoundsRect:function(a,b,c){c==null&&(c=!0);if(!this.readable)return new Ea(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,b,c,1);return new Ea(a.x,a.y,a.width,a.height)},getPixel:function(a,b){return this.readable?this.image.getPixel(a,b,1):0},getPixel32:function(a,b){return this.readable?this.image.getPixel32(a,
b,1):0},getPixels:function(a){if(!this.readable)return null;a==null&&(a=this.rect);a=cc.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},getSurface:function(){if(!this.readable)return null;this.__surface==null&&(this.__surface=px.fromImage(this.image));return this.__surface},getTexture:function(a){if(!this.__isValid)return null;if(this.__texture==null||this.__textureContext!=a.__context)this.__textureContext=a.__context,this.__texture=a.createRectangleTexture(this.width,
this.height,1,!1),this.__textureVersion=-1;kb.sync(this.image,!1);this.image!=null&&this.image.version>this.__textureVersion&&(this.__surface!=null&&qx.flush(this.__surface),a=this.image,gd.__supportsBGRA||a.get_format()==0||(a=a.clone(),a.set_format(0)),this.__texture.__uploadFromImage(a),this.__textureVersion=this.image.version,this.__textureWidth=a.buffer.width,this.__textureHeight=a.buffer.height);this.readable||this.image==null||(this.image=this.__surface=null);return this.__texture},getVector:function(a){a=
this.getPixels(a);for(var b=ta.toFloat(cc.get_length(a))/ta.toFloat(4)|0,c=gb.toIntVector(null,b,!0),d=0;d<b;){var f=d++;c.set(f,a.readUnsignedInt())}return c},histogram:function(a){a=a!=null?a:new Ea(0,0,this.width,this.height);a=this.getPixels(a);for(var b=[],c=[],d=0;d<256;)d++,c.push(0);b.push(c);c=[];for(d=0;d<256;)d++,c.push(0);b.push(c);c=[];for(d=0;d<256;)d++,c.push(0);b.push(c);c=[];for(d=0;d<256;)d++,c.push(0);b.push(c);d=b;b=0;for(c=cc.get_length(a);b<c;){var f=b++;++d[f%4][a.readUnsignedByte()]}return d},
hitTest:function(a,b,c,d,f){f==null&&(f=1);if(!this.readable)return!1;c instanceof cg&&(c=u.__cast(c,cg).__bitmapData);if(c instanceof Qa){f=c;c=f.x-a.x|0;var g=f.y-a.y|0;if(this.rect.contains(c,g)){var h=this.getPixel32(c,g);if((h>>24&255)>b)return!0}}else if(c instanceof uc){h=c;d==null?g=c=0:(c=Math.round(d.x-a.x),g=Math.round(d.y-a.y));d=Ea.__pool.get();d.setTo(c,g,h.width,h.height);if(this.rect.intersects(d)){c<0?(d.x=0,d.width=Math.min(h.width+c,this.width)):d.width=Math.min(h.width,this.width-
c);g<0?(d.y=0,d.height=Math.min(h.height+g,this.height)):d.height=Math.min(h.height,this.height-g);a=this.getPixels(d);d.x=c<0?-c:0;d.y=g<0?-g:0;g=h.getPixels(d);h=d.width*d.height|0;c=0;for(var l=h;c<l;){c++;h=a.readUnsignedInt();var k=g.readUnsignedInt();if(ta.gt(h>>>24&255,b)&&ta.gt(k>>>24&255,f))return Ea.__pool.release(d),!0}}Ea.__pool.release(d)}else if(c instanceof Ea){f=Ea.__pool.get();f.copyFrom(c);f.offset(-a.x,-a.y);f.__contract(0,0,this.width,this.height);if(f.width>0&&f.height>0)for(a=
this.getPixels(f),h=ta.toFloat(cc.get_length(a))/ta.toFloat(4)|0,c=0,l=h;c<l;)if(c++,h=a.readUnsignedInt(),ta.gt(h>>>24&255,b))return Ea.__pool.release(f),!0;Ea.__pool.release(f)}return!1},lock:function(){},merge:function(a,b,c,d,f,g,h){this.readable&&a!=null&&a.readable&&b!=null&&c!=null&&this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f,g,h)},noise:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=7);c==null&&(c=255);b==null&&(b=0);if(this.readable){var g=function(){a=a*1103515245+
12345;return(Math.abs(a/65536)|0)%32768};g();c-=b;var h=(d&1)==1,l=(d&2)>>1==1,k=(d&4)>>2==1;d=(d&8)>>3==1;for(var q=0,w=this.height;q<w;)for(var v=q++,z=0,n=this.width;z<n;){var E=z++,H=0,J=0,Q=0,T=255;f?(H=Q=J=b+g()%c,T=255):(h&&(H=b+g()%c),l&&(Q=b+g()%c),k&&(J=b+g()%c),d&&(T=b+g()%c));T=(T<<8)+H;T=(T<<8)+Q;T=(T<<8)+J;this.setPixel32(E,v,T)}}},paletteMap:function(a,b,c,d,f,g,h){var l=b.width|0,k=b.height|0;a=a.getPixels(b);b=0;for(var q=k*l;b<q;){var w=b++;var v=a.readUnsignedInt();var z=h==null?
v&-16777216:h[v>>24&255];var n=d==null?v&16711680:d[v>>16&255];var E=f==null?v&65280:f[v>>8&255];v=g==null?v&255:g[v&255];n=z+n+E+v;a.position=w*4;a.writeUnsignedInt(n)}a.position=0;d=Ea.__pool.get();d.setTo(c.x,c.y,l,k);this.setPixels(d,a);Ea.__pool.release(d)},perlinNoise:function(a,b,c,d,f,g,h,l,k){l==null&&(l=!1);h==null&&(h=7);this.readable&&(new sm(d,c,h,l,.5,f,.15)).fill(this,a,b,0)},scroll:function(a,b){this.readable&&this.image.scroll(a,b)},setPixel:function(a,b,c){this.readable&&this.image.setPixel(a,
b,c,1)},setPixel32:function(a,b,c){this.readable&&this.image.setPixel32(a,b,c,1)},setPixels:function(a,b){if(this.readable&&a!=null){var c=a.width*a.height*4;if(ta.toFloat(b.length-b.position)<c)throw new Ld("End of file was encountered.",2030);this.image.setPixels(a.__toLimeRectangle(),cc.toBytePointer(b),1,Tw.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=new Pc(0);cc.set_length(c,b.get_length()*4);for(b=b.iterator();b.hasNext();){var d=b.next();c.writeUnsignedInt(d)}c.position=0;this.setPixels(a,
c)},threshold:function(a,b,c,d,f,g,h,l){l==null&&(l=!1);h==null&&(h=-1);g==null&&(g=0);return a==null||b==null||c==null||b.x>a.width||b.y>a.height||c.x>this.width||c.y>this.height?0:this.image.threshold(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f,g,h,l,1)},unlock:function(a){},__applyAlpha:function(a){kb.convertToCanvas(this.image);kb.createImageData(this.image);for(var b=this.image.buffer.data,c=0,d=cc.get_length(a);c<d;){var f=c++;b[f*4+3]=a.readUnsignedByte()}this.image.version++},__drawCairo:function(a,
b){},__drawCanvas:function(a,b){var c=this.image.buffer;b.__allowSmoothing||b.applySmoothing(c.__srcContext,!1);b.__render(a);b.__allowSmoothing||b.applySmoothing(c.__srcContext,!0);c.__srcContext.setTransform(1,0,0,1,0,0);c.__srcImageData=null;c.data=null;this.image.dirty=!0;this.image.version++},__drawGL:function(a,b){var c=b.__context3D,d=c.__state.renderToTexture,f=c.__state.renderToTextureDepthStencil,g=c.__state.renderToTextureAntiAlias,h=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.getTexture(c),
!0);b.__render(a);d!=null?c.setRenderToTexture(d,f,g,h):c.setRenderToBackBuffer()},__fillRect:function(a,b,c){if(a!=null)if(this.transparent&&(b&-16777216)==0&&(b=0),c&&this.__texture!=null&&this.__texture.__glFramebuffer!=null&&Oa.get_current().stage.__renderer.__type=="opengl"){c=Oa.get_current().stage.__renderer.__context3D;var d=!this.rect.equals(a),f=c.__state.renderToTexture,g=c.__state.renderToTextureDepthStencil,h=c.__state.renderToTextureAntiAlias,l=c.__state.renderToTextureSurfaceSelector;
c.setRenderToTexture(this.__texture);if(d){var k=Math.floor(a.x),q=Math.floor(a.y),w=a.width>0?Math.ceil(a.get_right())-k:0,v=a.height>0?Math.ceil(a.get_bottom())-q:0;c.__backBufferWantsBestResolution&&(k=Math.floor(a.x/c.__stage.window.__scale),q=Math.floor(a.y/c.__stage.window.__scale),w=a.width>0?Math.ceil(a.get_right()/c.__stage.window.__scale)-k:0,v=a.height>0?Math.ceil(a.get_bottom()/c.__stage.window.__scale)-q:0);uc.__fillRectRectangle.setTo(k,q,w,v);c.setScissorRectangle(uc.__fillRectRectangle)}c.__clear(d,
(b>>>16&255)/255,(b>>>8&255)/255,(b&255)/255,this.transparent?(b>>>24&255)/255:1,0,0,1);d&&c.setScissorRectangle(null);f!=null?c.setRenderToTexture(f,g,h,l):c.setRenderToBackBuffer()}else this.readable&&this.image.fillRect(a.__toLimeRectangle(),b,1)},__fromBase64:function(a,b){a=Ic.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,b){a=Ic.fromBytes(cc.toBytes(a));this.__fromImage(a);b!=null&&this.__applyAlpha(b)},__fromFile:function(a){a=Ic.fromFile(a);this.__fromImage(a)},__fromImage:function(a){a!=
null&&a.buffer!=null&&(this.image=a,this.width=a.width,this.height=a.height,this.rect=new Ea(0,0,a.width,a.height),this.__textureWidth=this.width,this.__textureHeight=this.height,this.__isValid=this.readable=!0)},__getBounds:function(a,b){var c=Ea.__pool.get();this.rect.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)},__loadFromBase64:function(a,b){var c=this;return Ic.loadFromBase64(a,b).then(function(d){c.__fromImage(d);return zc.withValue(c)})},__loadFromBytes:function(a,
b){var c=this;return Ic.loadFromBytes(cc.toBytes(a)).then(function(d){c.__fromImage(d);b!=null&&c.__applyAlpha(b);return zc.withValue(c)})},__loadFromFile:function(a){var b=this;return Ic.loadFromFile(a).then(function(c){b.__fromImage(c);return zc.withValue(b)})},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=b;this.__textureWidth=a;this.__textureHeight=b},__setUVRect:function(a,b,c,d,f){if(this.getVertexBuffer(a)!=null&&(d!=this.__uvRect.width||f!=this.__uvRect.height||
b!=this.__uvRect.x||c!=this.__uvRect.y)){this.__uvRect==null&&(this.__uvRect=new Ea);this.__uvRect.setTo(b,c,d,f);a=this.__textureWidth>0?b/this.__textureWidth:0;c=this.__textureHeight>0?c/this.__textureHeight:0;b=this.__textureWidth>0?d/this.__textureWidth:0;var g=this.__textureHeight>0?f/this.__textureHeight:0;this.__vertexBufferData[0]=d;this.__vertexBufferData[1]=f;this.__vertexBufferData[3]=a+b;this.__vertexBufferData[4]=c+g;this.__vertexBufferData[15]=f;this.__vertexBufferData[17]=a;this.__vertexBufferData[18]=
c+g;this.__vertexBufferData[28]=d;this.__vertexBufferData[31]=a+b;this.__vertexBufferData[32]=c;this.__vertexBufferData[45]=a;this.__vertexBufferData[46]=c;this.__vertexBuffer.uploadFromTypedArray(Mk.toArrayBufferView(this.__vertexBufferData))}},__sync:function(){kb.sync(this.image,!1)},__update:function(a,b){this.__updateTransforms()},__updateTransforms:function(a){a==null?this.__worldTransform.identity():this.__worldTransform.copyFrom(a);this.__renderTransform.copyFrom(this.__worldTransform)},__class__:uc};
var xh=function(){na.call(this);this.__allowSmoothing=!0;this.__pixelRatio=1;this.__tempColorTransform=new ca;this.__worldAlpha=1;this.__blendMode=10};r["openfl.display.DisplayObjectRenderer"]=xh;xh.__name__="openfl.display.DisplayObjectRenderer";xh.__super__=na;xh.prototype=I(na.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,__context:null,__overrideBlendMode:null,__pixelRatio:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__transparent:null,__type:null,__worldAlpha:null,
__worldColorTransform:null,__worldTransform:null,__clear:function(){},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return this.__worldColorTransform!=null?(this.__tempColorTransform.__copyFrom(this.__worldColorTransform),this.__tempColorTransform.__combine(a),this.__tempColorTransform):a},__popMask:function(){},__popMaskObject:function(a,b){},__popMaskRect:function(){},__pushMask:function(a){},__pushMaskObject:function(a,b){},__pushMaskRect:function(a,b){},__render:function(a){},
__renderEvent:function(a){if(a.__customRenderEvent!=null&&a.__renderable){a.__customRenderEvent.allowSmoothing=this.__allowSmoothing;a.__customRenderEvent.objectMatrix.copyFrom(a.__renderTransform);a.__customRenderEvent.objectColorTransform.__copyFrom(a.__worldColorTransform);a.__customRenderEvent.renderer=this;switch(this.__type){case "cairo":a.__customRenderEvent.type="renderCairo";break;case "canvas":a.__customRenderEvent.type="renderCanvas";break;case "dom":a.__customRenderEvent.type=a.stage!=
null&&a.__worldVisible?"renderDOM":"clearDOM";break;case "opengl":this.__cleared||this.__clear();this.setShader(a.__worldShader);this.__context3D.__flushGL();a.__customRenderEvent.type="renderOpenGL";break;default:return}this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(a.__customRenderEvent);this.__popMaskObject(a);this.__type=="opengl"&&this.setViewport()}},__resize:function(a,b){},__setBlendMode:function(a){},__shouldCacheHardware:function(a,b){if(a==null)return null;
switch(a.__drawableType){case 4:case 5:if(b==1)return!0;b=this.__shouldCacheHardware_DisplayObject(a,b);if(b==1)return!0;if(a.__children!=null){var c=0;for(a=a.__children;c<a.length;){var d=a[c];++c;b=this.__shouldCacheHardware_DisplayObject(d,b);if(b==1)return!0}}return b;case 7:return b==1?!0:!1;case 9:return!0;default:return this.__shouldCacheHardware_DisplayObject(a,b)}},__shouldCacheHardware_DisplayObject:function(a,b){return b==1||a.__filters!=null?!0:b==0||a.__graphics!=null&&!Ba.isCompatible(a.__graphics)?
!1:null},__updateCacheBitmap:function(a,b){if(a==null)return!1;switch(a.__drawableType){case 2:var c=a;if(c.__bitmapData==null||c.__filters==null&&this.__type=="opengl"&&c.__cacheBitmap==null)return!1;b=c.__bitmapData.image!=null&&c.__bitmapData.image.version!=c.__imageVersion;break;case 7:var d=a;if(d.__filters==null&&this.__type=="opengl"&&d.__cacheBitmap==null&&!d.__domRender)return!1;b&&(d.__renderDirty=!0);b=b||d.__dirty;break;case 9:if(a.__filters==null&&this.__type=="opengl"&&a.__cacheBitmap==
null)return!1}if(a.__isCacheBitmapRender)return!1;d=ca.__pool.get();d.__copyFrom(a.__worldColorTransform);this.__worldColorTransform!=null&&d.__combine(this.__worldColorTransform);var f=!1;if(a.get_cacheAsBitmap()||this.__type!="opengl"&&!d.__isDefault(!0)){f=null;var g=(b=a.__cacheBitmap==null||a.__renderDirty&&(b||a.__children!=null&&a.__children.length>0)||a.opaqueBackground!=a.__cacheBitmapBackground)||a.__graphics!=null&&a.__graphics.__softwareDirty||!a.__cacheBitmapColorTransform.__equals(d,
!0),h=b||a.__graphics!=null&&a.__graphics.__hardwareDirty,l=this.__type;if(g||h)l=="opengl"&&this.__shouldCacheHardware(a,null)==0&&(l="canvas"),!g||l!="canvas"&&l!="cairo"||(b=!0),h&&l=="opengl"&&(b=!0);g=b||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);c=a.__filters!=null;if(this.__type=="dom"&&!c)return!1;if(c&&!b){if(g){h=a.__cacheBitmap.__worldTransform;var k=a.__worldTransform;var q=Math.abs(h.a-k.a)>1E-4||Math.abs(h.b-k.b)>1E-4||Math.abs(h.c-k.c)>1E-4||Math.abs(h.d-k.d)>1E-4}else q=
!1;h=0;for(k=a.__filters;h<k.length;){var w=k[h];++h;if(w.__renderDirty){b=!0;break}if(q&&w instanceof pf){a.__cacheBitmapData=null;b=!0;break}}}a.__cacheBitmapMatrix==null&&(a.__cacheBitmapMatrix=new S);h=a.__cacheAsBitmapMatrix!=null?a.__cacheAsBitmapMatrix:a.__renderTransform;b||h.a==a.__cacheBitmapMatrix.a&&h.b==a.__cacheBitmapMatrix.b&&h.c==a.__cacheBitmapMatrix.c&&h.d==a.__cacheBitmapMatrix.d||(b=!0);!b&&this.__type!="opengl"&&a.__cacheBitmapData!=null&&a.__cacheBitmapData.image!=null&&a.__cacheBitmapData.image.version<
a.__cacheBitmapData.__textureVersion&&(b=!0);if(!b)for(k=a;k!=null;){if(k.get_scrollRect()!=null){g=!0;break}k=k.parent}a.__cacheBitmapMatrix.copyFrom(h);a.__cacheBitmapMatrix.tx=0;var v=q=a.__cacheBitmapMatrix.ty=0,z=0,n=0,E=w=0;k=this.__pixelRatio;if(g||b)f=Ea.__pool.get(),a.__getFilterBounds(f,a.__cacheBitmapMatrix),z=f.width>0?Math.ceil((f.width+1)*k):0,n=f.height>0?Math.ceil((f.height+1)*k):0,w=f.x>0?Math.ceil(f.x):Math.floor(f.x),E=f.y>0?Math.ceil(f.y):Math.floor(f.y),a.__cacheBitmapData!=null?
z>a.__cacheBitmapData.width||n>a.__cacheBitmapData.height?(q=Math.ceil(Math.max(z*1.25,a.__cacheBitmapData.width)),v=Math.ceil(Math.max(n*1.25,a.__cacheBitmapData.height)),b=!0):(q=a.__cacheBitmapData.width,v=a.__cacheBitmapData.height):(q=z,v=n);if(b)if(g=!0,a.__cacheBitmapBackground=a.opaqueBackground,z>=.5&&n>=.5){var H=a.opaqueBackground!=null&&(q!=z||v!=n),J=a.opaqueBackground!=null?-16777216|a.opaqueBackground:0,Q=H?0:J,T=this.__type=="opengl";a.__cacheBitmapData==null||q>a.__cacheBitmapData.width||
v>a.__cacheBitmapData.height?(a.__cacheBitmapData=new uc(q,v,!0,Q),a.__cacheBitmap==null&&(a.__cacheBitmap=new cg),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null):a.__cacheBitmapData.__fillRect(a.__cacheBitmapData.rect,Q,T);H&&(f.setTo(0,0,z,n),a.__cacheBitmapData.__fillRect(f,J,T))}else return ca.__pool.release(d),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapRenderer=null,a.__drawableType==7&&(d=a,
d.__cacheBitmap!=null&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX*k,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY*k)),!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;if(g||b)a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),h==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.scale(1/k,1/k),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+w,a.__cacheBitmap.__renderTransform.ty=
a.__renderTransform.ty+E):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.a*=1/k,a.__cacheBitmap.__renderTransform.d*=1/k,a.__cacheBitmap.__renderTransform.tx+=w,a.__cacheBitmap.__renderTransform.ty+=E);a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=
a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_clippingLayer(a.__mask);if(b){if(a.__cacheBitmapRenderer==null||l!=a.__cacheBitmapRenderer.__type)l=="opengl"?a.__cacheBitmapRenderer=new rc(u.__cast(this,rc).__context3D,a.__cacheBitmapData):(a.__cacheBitmapData.image==null&&(a.__cacheBitmapData=new uc(q,v,!0,a.opaqueBackground!=null?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),kb.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRenderer=
new Qk(a.__cacheBitmapData.image.buffer.__srcContext)),a.__cacheBitmapRenderer.__worldTransform=new S,a.__cacheBitmapRenderer.__worldColorTransform=new ca;a.__cacheBitmapColorTransform==null&&(a.__cacheBitmapColorTransform=new ca);a.__cacheBitmapRenderer.__stage=a.stage;a.__cacheBitmapRenderer.__allowSmoothing=this.__allowSmoothing;a.__cacheBitmapRenderer.__setBlendMode(10);a.__cacheBitmapRenderer.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRenderer.__worldTransform.copyFrom(a.__renderTransform);
a.__cacheBitmapRenderer.__worldTransform.invert();a.__cacheBitmapRenderer.__worldTransform.concat(a.__cacheBitmapMatrix);a.__cacheBitmapRenderer.__worldTransform.tx-=w;a.__cacheBitmapRenderer.__worldTransform.ty-=E;a.__cacheBitmapRenderer.__worldTransform.scale(k,k);a.__cacheBitmapRenderer.__pixelRatio=k;a.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(d);a.__cacheBitmapRenderer.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;if(a.__cacheBitmapRenderer.__type=="opengl"){H=a.__cacheBitmapRenderer;
J=H.__context3D;Q=J.__state.renderToTexture;T=J.__state.renderToTextureDepthStencil;var fa=J.__state.renderToTextureAntiAlias,da=J.__state.renderToTextureSurfaceSelector,pa=this.__blendMode;this.__suspendClipAndMask();H.__copyShader(this);a.__cacheBitmapData.__setUVRect(J,0,0,z,n);H.__setRenderTarget(a.__cacheBitmapData);a.__cacheBitmapData.image!=null&&(a.__cacheBitmapData.__textureVersion=a.__cacheBitmapData.image.version+1);a.__cacheBitmapData.__drawGL(a,H);if(c){var xa=!1;h=0;for(k=a.__filters;h<
k.length;)w=k[h],++h,w.__preserveObject&&(xa=!0);c=a.__cacheBitmapData;E=null;a.__cacheBitmapData2==null||q>a.__cacheBitmapData2.width||v>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new uc(q,v,!0,0):(a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),a.__cacheBitmapData2.image!=null&&(a.__cacheBitmapData2.__textureVersion=a.__cacheBitmapData2.image.version+1));a.__cacheBitmapData2.__setUVRect(J,0,0,z,n);l=a.__cacheBitmapData2;xa&&(a.__cacheBitmapData3==null||q>a.__cacheBitmapData3.width||
v>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new uc(q,v,!0,0):(a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),a.__cacheBitmapData3.image!=null&&(a.__cacheBitmapData3.__textureVersion=a.__cacheBitmapData3.image.version+1)),a.__cacheBitmapData3.__setUVRect(J,0,0,z,n),E=a.__cacheBitmapData3);H.__setBlendMode(10);H.__worldAlpha=1;H.__worldTransform.identity();H.__worldColorTransform.__identity();h=0;for(k=a.__filters;h<k.length;){w=k[h];++h;w.__preserveObject&&(H.__setRenderTarget(E),
H.__renderFilterPass(c,H.__defaultDisplayShader,w.__smooth));v=0;for(z=w.__numShaderPasses;v<z;)q=v++,q=w.__initShader(H,q,w.__preserveObject?E:null),H.__setBlendMode(w.__shaderBlendMode),H.__setRenderTarget(l),H.__renderFilterPass(c,q,w.__smooth),q=c,c=l,l=q;w.__renderDirty=!1}a.__cacheBitmap.__bitmapData=c}this.__blendMode=10;this.__setBlendMode(pa);this.__copyShader(H);Q!=null?J.setRenderToTexture(Q,T,fa,da):J.setRenderToBackBuffer();this.__resumeClipAndMask(H);this.setViewport();a.__cacheBitmapColorTransform.__copyFrom(d)}else{a.__cacheBitmapData.__drawCanvas(a,
a.__cacheBitmapRenderer);if(c){xa=z=!1;h=0;for(k=a.__filters;h<k.length;)w=k[h],++h,w.__needSecondBitmapData&&(z=!0),w.__preserveObject&&(xa=!0);c=a.__cacheBitmapData;E=null;z?(a.__cacheBitmapData2==null||a.__cacheBitmapData2.image==null||q>a.__cacheBitmapData2.width||v>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new uc(q,v,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),l=a.__cacheBitmapData2):l=c;xa&&(a.__cacheBitmapData3==null||a.__cacheBitmapData3.image==null||q>a.__cacheBitmapData3.width||
v>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new uc(q,v,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),E=a.__cacheBitmapData3);a.__tempPoint==null&&(a.__tempPoint=new Qa);v=a.__tempPoint;h=0;for(k=a.__filters;h<k.length;)w=k[h],++h,w.__preserveObject&&E.copyPixels(c,c.rect,v),q=w.__applyFilter(l,c,c.rect,v),w.__preserveObject&&q.draw(E,null,a.__objectTransform!=null?a.__objectTransform.__colorTransform:null),w.__renderDirty=!1,z&&q==l&&(q=c,c=l,l=q);a.__cacheBitmapData!=c&&
(q=a.__cacheBitmapData,a.__cacheBitmapData=c,a.__cacheBitmapData2=q,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(d);a.__cacheBitmapColorTransform.__isDefault(!0)||(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,a.__cacheBitmapColorTransform))}a.__isCacheBitmapRender=!1}(g||b)&&Ea.__pool.release(f);
f=g}else a.__cacheBitmap!=null&&(this.__type=="dom"&&this.__renderDrawableClear(a.__cacheBitmap),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRenderer=null,f=!0);ca.__pool.release(d);f&&a.__drawableType==7&&(d=a,d.__cacheBitmap!=null&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY));return f},__affineChanged:function(a,b,c){c==null&&(c=1E-4);
return Math.abs(a.a-b.a)>c||Math.abs(a.b-b.b)>c||Math.abs(a.c-b.c)>c?!0:Math.abs(a.d-b.d)>c},__isShaderFilter:function(a){return a instanceof pf},__class__:xh});var os=function(a){xh.call(this)};r["openfl.display.CairoRenderer"]=os;os.__name__="openfl.display.CairoRenderer";os.__super__=xh;os.prototype=I(xh.prototype,{cairo:null,__matrix:null,__matrix3:null,applyMatrix:function(a,b){b==null&&(b=this.cairo);this.__matrix.copyFrom(a);this.cairo==b&&this.__worldTransform!=null&&this.__matrix.concat(this.__worldTransform);
this.__matrix3[0]=this.__matrix.a;this.__matrix3[1]=this.__matrix.b;this.__matrix3[3]=this.__matrix.c;this.__matrix3[4]=this.__matrix.d;this.__roundPixels?(this.__matrix3[6]=Math.round(this.__matrix.tx),this.__matrix3[7]=Math.round(this.__matrix.ty)):(this.__matrix3[6]=this.__matrix.tx,this.__matrix3[7]=this.__matrix.ty);b.set_matrix(this.__matrix3)},__clear:function(){if(this.cairo!=null&&(this.cairo.identityMatrix(),this.__stage!=null&&this.__stage.__clearBeforeRender)){var a=this.__blendMode;this.__setBlendMode(10);
this.cairo.setSourceRGB(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2]);this.cairo.paint();this.__setBlendMode(a)}},__popMask:function(){this.cairo.restore()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__isCacheBitmapRender||a.__mask==null||this.__popMask();b&&a.__scrollRect!=null&&this.__popMaskRect()},__popMaskRect:function(){this.cairo.restore()},__pushMask:function(a){this.cairo.save();this.applyMatrix(a.__renderTransform,this.cairo);this.cairo.newPath();
this.__renderDrawableMask(a);this.cairo.clip()},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||a.__mask==null||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.cairo.save();this.applyMatrix(b,this.cairo);this.cairo.newPath();this.cairo.rectangle(a.x,a.y,a.width,a.height);this.cairo.clip()},__render:function(a){this.cairo!=null&&this.__renderDrawable(a)},__renderDrawable:function(a){if(a!=
null)switch(a.__drawableType){case 6:!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(this.__pushMaskObject(a),this.__renderDrawable(a.__currentState),this.__popMaskObject(a),this.__renderEvent(a))}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 2:this.cairo.rectangle(0,0,a.get_width(),a.get_height());break;case 6:this.__renderDrawableMask(a.__currentState)}},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);this.__blendMode!=
a&&(this.__blendMode=a,this.__setBlendModeCairo(this.cairo,a))},__setBlendModeCairo:function(a,b){switch(b){case 0:a.setOperator(12);break;case 2:a.setOperator(17);break;case 3:a.setOperator(23);break;case 5:a.setOperator(21);break;case 7:a.setOperator(2);break;case 8:a.setOperator(18);break;case 9:a.setOperator(14);break;case 11:a.setOperator(16);break;case 12:a.setOperator(15);break;default:a.setOperator(2)}},__class__:os});var Qk=function(a){xh.call(this);this.context=a;this.__tempMatrix=new S;
this.__type="canvas"};r["openfl.display.CanvasRenderer"]=Qk;Qk.__name__="openfl.display.CanvasRenderer";Qk.__super__=xh;Qk.prototype=I(xh.prototype,{context:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(a,b){a.imageSmoothingEnabled=b},setTransform:function(a,b){b==null?b=this.context:this.context==b&&this.__worldTransform!=null&&(this.__tempMatrix.copyFrom(a),this.__tempMatrix.concat(this.__worldTransform),a=this.__tempMatrix);this.__roundPixels?b.setTransform(a.a,a.b,a.c,a.d,a.tx|0,
a.ty|0):b.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)},__clear:function(){if(this.__stage!=null){var a=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;!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)):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(a)}},__popMask:function(){this.context.restore()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__isCacheBitmapRender||a.__mask==null||this.__popMask();b&&a.__scrollRect!=null&&this.__popMaskRect()},__popMaskRect:function(){this.context.restore()},__pushMask:function(a){this.context.save();this.setTransform(a.__renderTransform,
this.context);this.context.beginPath();this.__renderDrawableMask(a);this.context.closePath();this.context.clip()},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||a.__mask==null||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.context.save();this.setTransform(b,this.context);this.context.beginPath();this.context.rect(a.x,a.y,a.width,a.height);this.context.clip()},__render:function(a){this.__renderDrawable(a)},
__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 0:ps.renderDrawable(a,this);break;case 2:Hn.renderDrawable(a,this);break;case 3:zl.renderDrawable(a,this);break;case 4:case 5:qs.renderDrawable(a,this);break;case 6:rs.renderDrawable(a,this);break;case 7:ia.renderDrawable(a,this);break;case 8:tm.renderDrawable(a,this);break;case 9:ej.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:ps.renderDrawableMask(a,this);break;case 2:Hn.renderDrawableMask(a,
this);break;case 3:zl.renderDrawableMask(a,this);break;case 4:case 5:qs.renderDrawableMask(a,this);break;case 6:rs.renderDrawableMask(a,this);break;case 7:ia.renderDrawableMask(a,this);break;case 8:tm.renderDrawableMask(a,this);break;case 9:ej.renderDrawableMask(a,this)}},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeContext(this.context,a))},__setBlendModeContext:function(a,b){switch(b){case 0:a.globalCompositeOperation=
"lighter";break;case 2:a.globalCompositeOperation="darken";break;case 3:a.globalCompositeOperation="difference";break;case 5:a.globalCompositeOperation="hard-light";break;case 8:a.globalCompositeOperation="lighten";break;case 9:a.globalCompositeOperation="multiply";break;case 11:a.globalCompositeOperation="overlay";break;case 12:a.globalCompositeOperation="screen";break;default:a.globalCompositeOperation="source-over"}},__class__:Qk});var qw={fromInt:function(a){return a},fromString:function(a){switch(a){case "none":return 0;
case "round":return 1;case "square":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}}},ss=function(a){ea.call(this);this.__drawableType=10;this.__element=a};r["openfl.display.DOMElement"]=ss;ss.__name__="openfl.display.DOMElement";ss.__super__=ea;ss.prototype=I(ea.prototype,{__active:null,__element:null,__class__:ss});var Bp=function(a){xh.call(this);this.element=a;ea.__supportDOM=
!0;a=window.getComputedStyle(document.documentElement,"");a=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||a.OLink===""&&["","o"])[1];"WebKit|Moz|MS|O".match(new RegExp("("+a+")","i"));a[0].toUpperCase();a.substr(1);this.__vendorPrefix=a;this.__transformProperty=a=="webkit"?"-webkit-transform":"transform";this.__transformOriginProperty=a=="webkit"?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__z=this.__numClipRects=0;this.__type="dom";this.__canvasRenderer=
new Qk(null);this.__canvasRenderer.__isDOM=!0};r["openfl.display.DOMRenderer"]=Bp;Bp.__name__="openfl.display.DOMRenderer";Bp.__super__=xh;Bp.prototype=I(xh.prototype,{element:null,__canvasRenderer:null,__clipRects:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,__transformProperty:null,__vendorPrefix:null,__z:null,applyStyle:function(a,b){a!=null&&b!=null&&(a.__style!=null&&b.parentElement==this.element||this.__initializeElement(a,b),a.__style=b.style,this.__updateClip(a),
this.__applyStyle(a,!0,!0,!0))},clearStyle:function(a){a!=null&&a.parentElement==this.element&&this.element.removeChild(a)},__applyStyle:function(a,b,c,d){var f=a.__style;if(b&&a.__renderTransformChanged){b=a.__renderTransform;var g=this.__roundPixels;g==null&&(g=!1);f.setProperty(this.__transformProperty,g?"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+(b.tx|0)+", "+(b.ty|0)+", 0, 1)":"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+b.tx+", "+b.ty+
", 0, 1)",null)}a.__worldZ!=++this.__z&&(a.__worldZ=this.__z,f.setProperty("z-index",a.__worldZ==null?"null":""+a.__worldZ,null));c&&a.__worldAlphaChanged&&(a.__worldAlpha<1?f.setProperty("opacity",a.__worldAlpha==null?"null":""+a.__worldAlpha,null):f.removeProperty("opacity"));d&&a.__worldClipChanged&&(a.__worldClip==null?f.removeProperty("clip"):(a=a.__worldClip,f.setProperty("clip","rect("+a.y+"px, "+a.get_right()+"px, "+a.get_bottom()+"px, "+a.x+"px)",null)))},__initializeElement:function(a,b){var c=
a.__style=b.style;c.setProperty("position","absolute",null);c.setProperty("top","0",null);c.setProperty("left","0",null);c.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(b);a.__worldAlphaChanged=!0;a.__renderTransformChanged=!0;a.__worldVisibleChanged=!0;a.__worldClipChanged=!0;a.__worldClip=null;a.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(a,b){b==null&&(b=!0);a.__mask!=null&&this.__popMask();b&&a.__scrollRect!=null&&this.__popMaskRect()},
__popMaskRect:function(){this.__numClipRects>0&&(this.__numClipRects--,this.__currentClipRect=this.__numClipRects>0?this.__clipRects[this.__numClipRects-1]:null)},__pushMask:function(a){this.__pushMaskRect(a.getBounds(a),a.__renderTransform)},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__mask!=null&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=
new Ea);var c=this.__clipRects[this.__numClipRects];a.__transform(c,b);this.__numClipRects>0&&(a=this.__clipRects[this.__numClipRects-1],c.__contract(a.x,a.y,a.width,a.height));c.height<0&&(c.height=0);c.width<0&&(c.width=0);this.__currentClipRect=c;this.__numClipRects++},__render:function(a){this.element.style.background=this.__stage.__transparent?"none":this.__stage.__colorString;this.__z=1;this.__renderDrawable(a)},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 2:Md.renderDrawable(a,
this);break;case 3:ah.renderDrawable(a,this);break;case 4:case 5:ts.renderDrawable(a,this);break;case 6:us.renderDrawable(a,this);break;case 7:bh.renderDrawable(a,this);break;case 8:Rk.renderDrawable(a,this);break;case 9:gk.renderDrawable(a,this);break;case 10:a.stage!=null&&a.__worldVisible&&a.__renderable?(a.__active||(this.__initializeElement(a,a.__element),a.__active=!0),this.__updateClip(a),this.__applyStyle(a,!0,!0,!0)):a.__active&&(this.element.removeChild(a.__element),a.__active=!1),ah.renderDrawable(a,
this)}},__renderDrawableClear:function(a){if(a!=null)switch(a.__drawableType){case 2:Md.renderDrawableClear(a,this);break;case 3:ah.renderDrawableClear(a,this);break;case 4:case 5:ts.renderDrawableClear(a,this);break;case 6:us.renderDrawableClear(a,this);break;case 7:bh.renderDrawableClear(a,this);break;case 8:Rk.renderDrawableClear(a,this);break;case 9:gk.renderDrawableClear(a,this)}},__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=
a)},__updateClip:function(a){if(this.__currentClipRect==null)a.__worldClipChanged=a.__worldClip!=null,a.__worldClip=null;else{a.__worldClip==null&&(a.__worldClip=new Ea);var b=Ea.__pool.get(),c=S.__pool.get();c.copyFrom(a.__renderTransform);c.invert();this.__currentClipRect.__transform(b,c);b.equals(a.__worldClip)?a.__worldClipChanged=!1:(a.__worldClip.copyFrom(b),a.__worldClipChanged=!0);Ea.__pool.release(b);S.__pool.release(c)}},__class__:Bp});var vs=function(a){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}");
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}");
Hh.call(this,a);this.__isGenerated=!0;this.__initGL()};r["openfl.display.DisplayObjectShader"]=vs;vs.__name__="openfl.display.DisplayObjectShader";vs.__super__=Hh;vs.prototype=I(Hh.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__:vs});var Jc=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;
this.__mouseScrollVCounter=0;this.condenseWhite=!1;Da.call(this);this.__wordSelection=!1;this.__drawableType=7;this.__selectionIndex=this.__caretIndex=0;this.__displayAsPassword=!1;this.__passwordChar="*";this.__graphics=new Dh(this);this.__graphics.__commands.clear();this.__textEngine=new Oc(this);this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";Jc.__defaultTextFormat==null&&(Jc.__defaultTextFormat=new qf("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,
0,0),Jc.__defaultTextFormat.blockIndent=0,Jc.__defaultTextFormat.bullet=!1,Jc.__defaultTextFormat.letterSpacing=0,Jc.__defaultTextFormat.kerning=!1);this.__textFormat=Jc.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new yh(this.__textFormat,0,0));this.addEventListener("mouseDown",m(this,this.this_onMouseDown));this.addEventListener("focusIn",m(this,this.this_onFocusIn));this.addEventListener("focusOut",m(this,this.this_onFocusOut));this.addEventListener("keyDown",m(this,this.this_onKeyDown));
this.addEventListener("mouseWheel",m(this,this.this_onMouseWheel))};r["openfl.text.TextField"]=Jc;Jc.__name__="openfl.text.TextField";Jc.__super__=Da;Jc.prototype=I(Da.prototype,{condenseWhite:null,__wordSelection:null,__lineSelection:null,__specialSelectionInitialIndex:null,__bounds:null,__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__passwordChar:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseScrollVCounter:null,__mouseWheelEnabled:null,
__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__styleSheet:null,__text:null,__htmlText:null,__textEngine:null,__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM:null,__forceCachedBitmapUpdate:null,appendText:function(a){a!=null&&a!=""&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text+a),this.__selectionIndex=this.__caretIndex=this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-
1).end=this.__text.length)},getCharBoundaries:function(a){if(a<0||a>this.__text.length-1)return null;var b=new Ea;return this.__getCharBoundaries(a,b)?b:null},getCharIndexAtPoint:function(a,b){if(a<=2||a>this.get_width()+4||b<=0||b>this.get_height()+4)return-1;this.__updateLayout();a+=this.get_scrollH();for(var c=0,d=this.get_scrollV()-1;c<d;){var f=c++;b+=this.__textEngine.lineHeights.get(f)}for(c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var g=c.next();if(b>=g.offsetY&&b<=g.offsetY+
g.height&&a>=g.offsetX&&a<=g.offsetX+g.width){c=b=0;for(d=g.positions.length;c<d;)if(f=c++,b+=g.positions[f],a<=g.offsetX+b)return g.startIndex+f;return g.endIndex}}return-1},getFirstCharInParagraph:function(a){if(a<0||a>this.get_text().length)return-1;if(this.__textEngine.lineBreaks.get_length()==0)return 0;for(var b=0,c=this.__textEngine.lineBreaks.get_length();b<c;){var d=b++;if(a<=this.__textEngine.lineBreaks.get(d))return d==0?0:this.__textEngine.lineBreaks.get(d-1)+1}return this.__textEngine.lineBreaks.get(this.__textEngine.lineBreaks.get_length()-
1)+1},getLineIndexAtPoint:function(a,b){this.__updateLayout();if(a<=2||a>this.get_width()+4||b<=0||b>this.get_height()+4)return-1;a=0;for(var c=this.get_scrollV()-1;a<c;){var d=a++;b+=this.__textEngine.lineHeights.get(d)}for(a=this.__textEngine.layoutGroups.iterator();a.hasNext();)if(c=a.next(),b>=c.offsetY&&b<=c.offsetY+c.height)return c.lineIndex;return-1},getLineIndexOfChar:function(a){if(a<0||a>this.__text.length)return-1;this.__updateLayout();for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=
b.next();if(c.startIndex<=a&&c.endIndex>=a)return c.lineIndex}return-1},getLineLength:function(a){this.__updateLayout();if(a<0||a>this.__textEngine.numLines-1)return 0;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var f=d.next();if(f.lineIndex==a)b==-1&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}c==-1&&(c=this.__text.length);return c-b},getLineMetrics:function(a){this.__updateLayout();var b=this.__textEngine.lineAscents.get(a),c=this.__textEngine.lineDescents.get(a),
d=this.__textEngine.lineLeadings.get(a),f=this.__textEngine.lineHeights.get(a);a=this.__textEngine.lineWidths.get(a);switch(this.__textFormat.align){case 0:var g=(this.__textEngine.width-a)/2;break;case 1:case 4:g=this.__textEngine.width-a-2;break;case 2:case 3:case 5:g=2}return new vv(g,a,f,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(a<0)throw new oe;if(a>this.__textEngine.numLines-1)return-1;for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.lineIndex==
a)return c.startIndex}return 0},getLineText:function(a){this.__updateLayout();if(a<0)throw new oe;if(a>this.__textEngine.numLines-1)return null;for(var b=-1,c=-1,d=this.__textEngine.layoutGroups.iterator();d.hasNext();){var f=d.next();if(f.lineIndex==a)b==-1&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}c==-1&&(c=this.__text.length);return this.__textEngine.text.substring(b,c)},getParagraphLength:function(a){if(a<0||a>this.get_text().length)return-1;var b=this.getFirstCharInParagraph(a);
if(a>=this.get_text().length)return this.get_text().length-b+1;a=this.__textEngine.getLineBreakIndex(a)+1;a==0&&(a=this.__text.length);return a-b},getTextFormat:function(a,b){b==null&&(b=-1);a==null&&(a=-1);var c=null;if(a>=this.get_text().length||a<-1||b>this.get_text().length||b<-1)throw new oe("The supplied index is out of bounds");a==-1&&(a=0);b==-1&&(b=this.get_text().length);if(a>=b)return new qf;for(var d=this.__textEngine.textFormatRanges.iterator();d.hasNext();){var f=d.next();if(f.start<=
a&&f.end>a||f.start<b&&f.end>=b)c==null?c=f.format.clone():(f.format.font!=c.font&&c.set_font(null),f.format.size!=c.size&&c.set_size(null),f.format.color!=c.color&&(c.color=null),f.format.bold!=c.bold&&c.set_bold(null),f.format.italic!=c.italic&&c.set_italic(null),f.format.underline!=c.underline&&(c.underline=null),f.format.url!=c.url&&(c.url=null),f.format.target!=c.target&&(c.target=null),f.format.align!=c.align&&(c.align=null),f.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),f.format.rightMargin!=
c.rightMargin&&(c.rightMargin=null),f.format.indent!=c.indent&&(c.indent=null),f.format.leading!=c.leading&&(c.leading=null),f.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),f.format.bullet!=c.bullet&&(c.bullet=null),f.format.kerning!=c.kerning&&(c.kerning=null),f.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),f.format.tabStops!=c.tabStops&&(c.tabStops=null))}c==null&&(c=new qf);return c},replaceSelectedText:function(a){this.__replaceSelectedText(a,!1)},replaceText:function(a,
b,c){this.__replaceText(a,b,c,!1)},setSelection:function(a,b){this.__selectionIndex=a;this.__caretIndex=b;this.__updateScrollV();this.__updateScrollH();this.stage!=null&&this.stage.get_focus()==this&&(this.__stopCursorTimer(),this.__startCursorTimer())},setTextFormat:function(a,b,c){c==null&&(c=-1);b==null&&(b=-1);var d=this.get_text().length;b==-1?(c==-1&&(c=d),b=0):c==-1&&(c=b+1);if(b!=c){if(b<0||c<=0||c<b||b>=d||c>d)throw new oe;if(b==0&&c==d){this.__textEngine.textFormatRanges.set_length(1);var f=
this.__textEngine.textFormatRanges.get(0);f.start=0;f.end=d;f.format.__merge(a)}else{d=0;for(var g;d<this.__textEngine.textFormatRanges.get_length();)if(f=this.__textEngine.textFormatRanges.get(d),f.end<=b)++d;else if(f.start>=c)break;else if(f.start<=b&&f.end>=c)if(f.start==b&&f.end==c){f.format=f.format.clone();f.format.__merge(a);break}else if(f.start==b)g=new yh(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d,g),f.start=c,d+=2;else{f.end==c?(g=new yh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g)):(g=new yh(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),g=new yh(f.format.clone(),c,f.end),this.__textEngine.textFormatRanges.insertAt(d+2,g));f.end=b;break}else if(f.start>=b&&f.end<=c)f.start==b?(f.format=f.format.clone(),f.format.__merge(a),f.end=c):this.__textEngine.textFormatRanges.removeAt(d);else if(f.start>b&&f.end>b){f.start=c;break}else f.start<b&&f.end<=c?(g=new yh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),f.end=b,d+=2):(++d,Mb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/TextField.hx",lineNumber:1630,className:"openfl.text.TextField",methodName:"setTextFormat"}))}this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__setStageReference:function(a){this.__stopTextInput();
Da.prototype.__setStageReference.call(this,a)},__allowMouseFocus:function(){return this.mouseEnabled},__caretBeginningOfLine:function(){this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))},__caretBeginningOfNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1):this.__text.length},__caretBeginningOfPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);if(a>0){var b=
this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex));this.__caretIndex=this.__caretIndex==b?this.getLineOffset(a-1):b}},__caretEndOfLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1)-1:this.__text.length},__caretNextCharacter:function(){this.__caretIndex<this.__text.length&&this.__caretIndex++},__caretNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);a<this.__textEngine.numLines-1&&
(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a+1))},__caretPreviousCharacter:function(){this.__caretIndex>0&&this.__caretIndex--},__caretPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);a>0&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a-1))},__disableInput:function(){this.__inputEnabled&&this.stage!=null&&(this.stage.window.__backend.setTextInputEnabled(!1),this.stage.window.onTextInput.remove(m(this,this.window_onTextInput)),
this.stage.window.onKeyDown.remove(m(this,this.window_onKeyDown)),this.__inputEnabled=!1,this.__stopCursorTimer())},__dispatch:function(a){if(a.eventPhase==2&&a.type=="mouseUp"){var b=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);b!=null&&(b=b.format.url,b!=null&&b!=""&&(Z.startsWith(b,"event:")?this.dispatchEvent(new sg("link",!0,!1,X.substr(b,6,null))):Oa.getURL(new Ve(b))))}return Da.prototype.__dispatch.call(this,a)},__enableInput:function(){if(this.stage!=null){this.stage.window.__backend.setTextInputEnabled(!0);
var a=this.getBounds(this.stage);a=new We(a.x,a.y,a.width,a.height);this.stage.window.setTextInputRect(a);this.__inputEnabled||(this.stage.window.__backend.setTextInputEnabled(!0),this.stage.window.onTextInput.has(m(this,this.window_onTextInput))||(this.stage.window.onTextInput.add(m(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(m(this,this.window_onKeyDown))),this.__inputEnabled=!0,this.__stopCursorTimer(),this.__startCursorTimer())}},__getAdvance:function(a){return a},__getBounds:function(a,
b){this.__updateLayout();var c=Ea.__pool.get();c.copyFrom(this.__textEngine.bounds);c.offset(this.__offsetX,this.__offsetY);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)},__getCharBoundaries:function(a,b){if(a<0||a>this.__text.length-1)return!1;this.__updateLayout();for(var c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var d=c.next();if(a>=d.startIndex&&a<d.endIndex)try{for(var f=d.offsetX,g=0,h=a-d.startIndex;g<h;){var l=g++;f+=d.positions[l]}b.setTo(f,
d.offsetY,d.positions[a-d.startIndex],d.ascent+d.descent);return!0}catch(k){Rb.lastError=k}}return!1},__getCharIndexOnDifferentLine:function(a,b){if(a<0||a>this.__text.length||b<0||b>this.__textEngine.numLines-1)return-1;for(var c=null,d=null,f=this.__textEngine.layoutGroups.iterator();f.hasNext();){var g=f.next();if(a>=g.startIndex&&a<=g.endIndex){c=g.offsetX;for(var h=0,l=a-g.startIndex;h<l;){var k=h++;c+=g.positions[k]}if(d!=null)return this.__getPosition(c,d)}if(g.lineIndex==b){d=g.offsetY+g.height/
2;g=0;for(h=this.get_scrollV()-1;g<h;)l=g++,d-=this.__textEngine.lineHeights.get(l);if(c!=null)return this.__getPosition(c,d)}}return-1},__getCursor:function(){var a=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);return a!=null&&a.format.url!=""?"button":this.__textEngine.selectable?"ibeam":null},__getGroup:function(a,b,c){c==null&&(c=!1);this.__updateLayout();a+=this.get_scrollH();for(var d=0,f=this.get_scrollV()-1;d<f;){var g=d++;b+=this.__textEngine.lineHeights.get(g)}!c&&b>this.__textEngine.textHeight&&
(b=this.__textEngine.textHeight);var h=!0;d=0;for(f=this.__textEngine.layoutGroups.get_length();d<f;){g=d++;var l=this.__textEngine.layoutGroups.get(g);g=g<this.__textEngine.layoutGroups.get_length()-1?this.__textEngine.layoutGroups.get(g+1):null;h&&(b<l.offsetY&&(b=l.offsetY),a<l.offsetX&&(a=l.offsetX),h=!1);if(b>=l.offsetY&&b<=l.offsetY+l.height||!c&&g==null)if(a>=l.offsetX&&a<=l.offsetX+l.width||!c&&(g==null||g.lineIndex!=l.lineIndex))return l}return null},__getPosition:function(a,b){b=this.__getGroup(a,
b);if(b==null)return this.__text.length;for(var c=0,d=0,f=b.positions.length;d<f;){var g=d++;c+=b.positions[g];if(a<=b.offsetX+c){if(a<=b.offsetX+(c-b.positions[g])+b.positions[g]/2)return b.startIndex+g;if(b.startIndex+g<b.endIndex)return b.startIndex+g+1;break}}return b.endIndex},__getPositionByIdentifier:function(a,b,c){a=this.__getPosition(a,b);c=c?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"\n";b=this.__text.charAt(a);if(this.__specialSelectionInitialIndex<=a)for(;c.indexOf(b)==-1&&a<this.__text.length;)++a,
b=this.__text.charAt(a);else{for(;c.indexOf(b)==-1&&a>0;)--a,b=this.__text.charAt(a);if(a==0)return a;++a}return a},__getOppositeIdentifierBound:function(a,b){b=b?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"\n";var c=this.__text.charAt(a);if(a<=this.__caretIndex){if(a==0)return a;do--a,c=this.__text.charAt(a);while(b.indexOf(c)==-1&&a>0);if(a==0)return a;++a}else for(;b.indexOf(c)==-1&&a<this.__text.length;)++a,c=this.__text.charAt(a);return a},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||
f&&!this.mouseEnabled||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();this.__updateLayout();c=this.__renderTransform;f=c.a*c.d-c.b*c.c;var h=f==0?-c.tx:1/f*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;f=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(h,f==0?-c.ty:1/f*(c.a*(b-c.ty)+c.b*(c.tx-a)))?(d!=null&&d.push(g),!0):!1},__hitTestMask:function(a,b){this.__getRenderTransform();this.__updateLayout();var c=this.__renderTransform,d=c.a*
c.d-c.b*c.c,f=d==0?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(f,d==0?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a)))?!0:!1},__replaceSelectedText:function(a,b){b==null&&(b=!0);a==null&&(a="");if(a!=""||this.__selectionIndex!=this.__caretIndex){var c=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex,d=this.__caretIndex>this.__selectionIndex?this.__caretIndex:this.__selectionIndex;if(!(c==d&&this.__textEngine.maxChars>
0&&this.__text.length==this.__textEngine.maxChars)){c>this.__text.length&&(c=this.__text.length);d>this.__text.length&&(d=this.__text.length);if(d<c){var f=d;d=c;c=f}c<0&&(c=0);this.__replaceText(c,d,a,b)}}},__replaceText:function(a,b,c,d){if(!(b<a||a<0||b>this.__text.length||c==null)){d&&(c=this.__textEngine.restrictText(c),this.__textEngine.maxChars>0&&(d=this.__textEngine.maxChars-this.__text.length+(b-a),d<=0?c="":d<c.length&&(c=X.substr(c,0,d))));this.__updateText(this.__text.substring(0,a)+
c+this.__text.substring(b));d=c.length-(b-a);for(var f=0,g;f<this.__textEngine.textFormatRanges.get_length();){g=this.__textEngine.textFormatRanges.get(f);if(a==b)g.start==g.end?g.start!=0?Mb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/TextField.hx",lineNumber:2211,className:"openfl.text.TextField",methodName:"__replaceText"}):g.end+=d:g.end>=a&&(g.start>=a?(g.start+=d,g.end+=d):g.start<a&&
g.end>=b&&(g.end+=d));else if(g.end>a)if(g.start>b)g.start+=d,g.end+=d;else if(g.start<=a&&g.end>b)g.end+=d;else if(g.start>=a&&g.end<=b){g=this.__textEngine.textFormatRanges;g.__tempIndex=f--;for(var h=0,l=[];h<l.length;){var k=l[h++];g.insertAt(g.__tempIndex,k);g.__tempIndex++}g.splice(g.__tempIndex,1)}else g.end>b&&g.start>a&&g.start<=b?(g.start=a,g.end+=d):g.start<a&&g.end>a&&g.end<=b&&(g.end=a);++f}this.__textEngine.textFormatRanges.get_length()==0?this.__textEngine.textFormatRanges.push(new yh(this.get_defaultTextFormat().clone(),
0,c.length)):a==b&&this.__textEngine.textFormatRanges.get(0).start>0?this.__textEngine.textFormatRanges.unshift(new yh(this.get_defaultTextFormat().clone(),0,this.__textEngine.textFormatRanges.get(0).start)):a!=b&&this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end<this.__text.length&&this.__textEngine.textFormatRanges.push(new yh(this.get_defaultTextFormat().clone(),this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end,
this.__text.length));this.__selectionIndex=this.__caretIndex=a+c.length;this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__startCursorTimer:function(){this.get_type()==1?(this.__inputEnabled&&(this.__cursorTimer=rd.delay(m(this,this.__startCursorTimer),600),this.__showCursor=!this.__showCursor),this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())):this.get_selectable()&&(this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()))},__startTextInput:function(){this.__caretIndex<0&&(this.__selectionIndex=this.__caretIndex=this.__text.length);(ea.__supportDOM?this.__renderedOnCanvasWhileOnDOM:1)&&this.__enableInput()},__stopCursorTimer:function(){this.__cursorTimer!=null&&(this.__cursorTimer.stop(),this.__cursorTimer=null);this.__showCursor&&(this.__showCursor=!1,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},__stopTextInput:function(){(ea.__supportDOM?
this.__renderedOnCanvasWhileOnDOM:1)&&this.__disableInput()},__updateLayout:function(){if(this.__layoutDirty){var a=this.__textEngine.width;this.__textEngine.update();if(this.__textEngine.autoSize!=2){if(this.__textEngine.width!=a)switch(this.__textEngine.autoSize){case 0:this.set_x(this.get_x()+(a-this.__textEngine.width)/2);break;case 3:this.set_x(this.get_x()+(a-this.__textEngine.width))}this.__textEngine.getBounds()}this.__layoutDirty=!1;this.setSelection(this.__selectionIndex,this.__caretIndex)}},
__updateMouseDrag:function(){if(this.stage!=null){var a=this.get_scrollH(),b=this.get_scrollV(),c=this.getBounds(this);this.get_mouseX()>c.width-1?this.set_scrollH(this.get_scrollH()+(Math.max(Math.min((this.get_mouseX()-c.width)*.1,10),1)|0)):this.get_mouseX()<1&&this.set_scrollH(this.get_scrollH()-(Math.max(Math.min(this.get_mouseX()*-.1,10),1)|0));this.__mouseScrollVCounter++;this.__mouseScrollVCounter>this.stage.get_frameRate()/10&&(this.get_mouseY()>c.height-2?this.set_scrollV(Math.min(this.get_scrollV()+
Math.max(Math.min((this.get_mouseY()-c.height)*.03,5),1),this.get_maxScrollV())|0):this.get_mouseY()<2&&this.set_scrollV(this.get_scrollV()-(Math.max(Math.min(this.get_mouseY()*-.03,5),1)|0)),this.__mouseScrollVCounter=0);this.get_scrollH()==a&&this.get_scrollV()==b||this.stage_onMouseMove(null)}},__updateScrollH:function(){this.__updateLayout();var a=this.getBounds(this);if(this.get_textWidth()<=a.width-4)this.set_scrollH(0);else{var b=this.get_scrollH();if(this.__caretIndex==0||this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))==
this.__caretIndex)b=0;else{var c=Ea.__pool.get(),d=!1;this.__caretIndex<this.__text.length&&(d=this.__getCharBoundaries(this.__caretIndex,c));d||(this.__getCharBoundaries(this.__caretIndex-1,c),c.x+=c.width);for(;c.x<b&&b>0;)b-=24;for(;c.x>b+a.width-4;)b+=24;Ea.__pool.release(c)}b>0&&this.get_type()!=1&&(c=this.getLineLength(this.getLineIndexOfChar(this.__caretIndex)),this.get_scrollH()+a.width-4>c&&this.set_scrollH(Math.ceil(c-a.width+4)));b<0?this.set_scrollH(0):b>this.get_maxScrollH()?this.set_scrollH(this.get_maxScrollH()):
this.set_scrollH(b)}},__updateScrollV:function(){this.__updateLayout();if(this.get_textHeight()<=this.get_height()-4)this.set_scrollV(1);else{var a=this.getLineIndexOfChar(this.__caretIndex);a==-1&&this.__caretIndex>0&&(a=this.getLineIndexOfChar(this.__caretIndex-1)+1);if(a+1<this.get_scrollV())this.set_scrollV(a+1);else if(a+1>this.get_bottomScrollV()){var b=0;for(a>=this.__textEngine.lineHeights.get_length()&&(a=this.__textEngine.lineHeights.get_length()-1);a>=0;){b+=this.__textEngine.lineHeights.get(a);
if(b>this.get_height()-4){a+=b-this.get_height()<0?1:2;break}--a}this.set_scrollV(a)}else this.set_scrollV(this.get_scrollV())}},__updateText:function(a){ea.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=this.__text!=a);this.__textEngine.set_text(a);this.__text=this.__textEngine.text;this.stage!=null&&this.stage.get_focus()==this?(this.__text.length<this.__selectionIndex&&(this.__selectionIndex=this.__text.length),this.__text.length<this.__caretIndex&&(this.__caretIndex=
this.__text.length)):this.__isHTML?this.__selectionIndex=this.__caretIndex=this.__text.length:this.__caretIndex=this.__selectionIndex=0;if(!this.__displayAsPassword||ea.__supportDOM&&!this.__renderedOnCanvasWhileOnDOM)this.__textEngine.set_text(this.__text);else{a="";for(var b=0,c=this.get_text().length;b<c;)b++,a+=this.__passwordChar;this.__textEngine.set_text(a)}},__updateTransforms:function(a){Da.prototype.__updateTransforms.call(this,a);a=this.__renderTransform;var b=this.__offsetX,c=this.__offsetY;
a.tx=b*a.a+c*a.c+a.tx;a.ty=b*a.b+c*a.d+a.ty},get_antiAliasType:function(){return this.__textEngine.antiAliasType},set_antiAliasType:function(a){return this.__textEngine.antiAliasType=a},get_autoSize:function(){return this.__textEngine.autoSize},set_autoSize:function(a){a!=this.__textEngine.autoSize&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.autoSize=a},get_background:function(){return this.__textEngine.background},
set_background:function(a){a!=this.__textEngine.background&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.background=a},get_backgroundColor:function(){return this.__textEngine.backgroundColor},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.backgroundColor=a},get_border:function(){return this.__textEngine.border},
set_border:function(a){a!=this.__textEngine.border&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.border=a},get_borderColor:function(){return this.__textEngine.borderColor},set_borderColor:function(a){a!=this.__textEngine.borderColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.borderColor=a},get_bottomScrollV:function(){this.__updateLayout();return this.__textEngine.get_bottomScrollV()},
get_caretIndex:function(){return this.__caretIndex},get_defaultTextFormat:function(){return this.__textFormat.clone()},set_defaultTextFormat:function(a){this.__textFormat.__merge(a);this.__dirty=this.__layoutDirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_displayAsPassword:function(){return this.__displayAsPassword},set_displayAsPassword:function(a){a!=this.__displayAsPassword&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()),this.__displayAsPassword=a,this.__updateText(this.__text));return a},get_embedFonts:function(){return this.__textEngine.embedFonts},set_embedFonts:function(a){return this.__textEngine.embedFonts=a},get_gridFitType:function(){return this.__textEngine.gridFitType},set_gridFitType:function(a){return this.__textEngine.gridFitType=a},get_height:function(){this.__updateLayout();return this.__textEngine.height*Math.abs(this.get_scaleY())},set_height:function(a){a!=this.__textEngine.height&&
(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.height=a);return this.__textEngine.height*Math.abs(this.get_scaleY())},get_htmlText:function(){return this.__isHTML?this.__htmlText:this.__text},set_htmlText:function(a){if(a==null)throw a=new ne("Error #2007: Parameter text must be non-null."),a.errorID=2007,a;this.__isHTML&&this.__text==a||(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()));this.__isHTML=!0;this.condenseWhite&&(a=a.replace(RegExp("\\s+","g")," "));this.__htmlText=a;a=Zb.parse(a,this.get_multiline(),this.__styleSheet,this.__textFormat,this.__textEngine.textFormatRanges);this.__updateText(a);return a},get_length:function(){return this.__text!=null?this.__text.length:0},get_maxChars:function(){return this.__textEngine.maxChars},set_maxChars:function(a){a!=this.__textEngine.maxChars&&(this.__textEngine.maxChars=a,this.__layoutDirty=
this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_maxScrollH:function(){this.__updateLayout();return this.__textEngine.maxScrollH},get_maxScrollV:function(){this.__updateLayout();return this.__textEngine.get_maxScrollV()},get_mouseWheelEnabled:function(){return this.__mouseWheelEnabled},set_mouseWheelEnabled:function(a){return this.__mouseWheelEnabled=a},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(a){return this.__textEngine.multiline=
a},get_numLines:function(){this.__updateLayout();return this.__textEngine.numLines},get_restrict:function(){return this.__textEngine.restrict},set_restrict:function(a){this.__textEngine.restrict!=a&&(this.__textEngine.set_restrict(a),this.__updateText(this.__text));return a},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(a){this.__updateLayout();a>this.__textEngine.maxScrollH&&(a=this.__textEngine.maxScrollH);a<0&&(a=0);a!=this.__textEngine.scrollH&&(this.__dirty=!0,
this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.scrollH=a,this.dispatchEvent(new ka("scroll")));return this.__textEngine.scrollH},get_scrollV:function(){return this.__textEngine.get_scrollV()},set_scrollV:function(a){this.__updateLayout();a>this.__textEngine.get_maxScrollV()&&(a=this.__textEngine.get_maxScrollV());a<1&&(a=1);if(a!=this.__textEngine.get_scrollV()||this.__textEngine.get_scrollV()==0)this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()),this.__textEngine.set_scrollV(a),this.dispatchEvent(new ka("scroll"));return this.__textEngine.get_scrollV()},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(a){a!=this.__textEngine.selectable&&this.get_type()==1&&(this.stage!=null&&this.stage.get_focus()==this?this.__startTextInput():a||this.__stopTextInput());return this.__textEngine.selectable=a},get_selectionBeginIndex:function(){return Math.min(this.__caretIndex,this.__selectionIndex)|
0},get_selectionEndIndex:function(){return Math.max(this.__caretIndex,this.__selectionIndex)|0},get_sharpness:function(){return this.__textEngine.sharpness},set_sharpness:function(a){a!=this.__textEngine.sharpness&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.sharpness=a},get_styleSheet:function(){return this.__styleSheet},set_styleSheet:function(a){this.__styleSheet!=null&&a==null||a==null||(this.__isHTML&&a!=this.__styleSheet&&
(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.set_htmlText(this.__htmlText)),this.set_type(0));return this.__styleSheet=a},get_tabEnabled:function(){return this.__tabEnabled==null?this.__textEngine.type==1:this.__tabEnabled},get_text:function(){return this.__text},set_text:function(a){if(a==null)throw a=new ne("Error #2007: Parameter text must be non-null."),a.errorID=2007,a;if(this.__styleSheet!=null)return this.set_htmlText(a);
if(this.__isHTML||this.__text!=a)this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());else return a;if(this.__textEngine.textFormatRanges.get_length()>1){var b=this.__textEngine.textFormatRanges,c=this.__textEngine.textFormatRanges.get_length()-1;b.__tempIndex=1;for(var d=0,f=[];d<f.length;){var g=f[d++];b.insertAt(b.__tempIndex,g);b.__tempIndex++}b.splice(b.__tempIndex,c)}b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;
b.start=0;b.end=a.length;this.__isHTML=!1;this.__updateText(a);return a},get_textColor:function(){return this.__textFormat.color},set_textColor:function(a){a!=this.__textFormat.color&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));for(var b=this.__textEngine.textFormatRanges.iterator();b.hasNext();)b.next().format.color=a;return this.__textFormat.color=a},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(a){this.__styleSheet!=null&&(a=0);a!=this.__textEngine.type&&(this.__textEngine.type=a,a==1?(this.addEventListener("addedToStage",m(this,this.this_onAddedToStage)),this.this_onFocusIn(null),this.__textEngine.__useIntAdvances=!0):(this.removeEventListener("addedToStage",m(this,this.this_onAddedToStage)),this.__stopTextInput(),this.__textEngine.__useIntAdvances=null),this.__layoutDirty=this.__dirty=
!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.type},get_width:function(){this.__updateLayout();return this.__textEngine.width*Math.abs(this.__scaleX)},set_width:function(a){a!=this.__textEngine.width&&(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.width=a);return this.__textEngine.width*Math.abs(this.__scaleX)},get_wordWrap:function(){return this.__textEngine.wordWrap},
set_wordWrap:function(a){a!=this.__textEngine.wordWrap&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.wordWrap=a},get_passwordChar:function(){return this.__passwordChar},set_passwordChar:function(a){a!=this.__passwordChar&&(this.__passwordChar=a,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text));return a},get_x:function(){return this.__transform.tx+this.__offsetX},
set_x:function(a){a!=this.__transform.tx+this.__offsetX&&this.__setTransformDirty();this.__transform.tx=a-this.__offsetX;return a},get_y:function(){return this.__transform.ty+this.__offsetY},set_y:function(a){a!=this.__transform.ty+this.__offsetY&&this.__setTransformDirty();this.__transform.ty=a-this.__offsetY;return a},stage_onMouseMove:function(a){if(this.stage!=null&&this.get_selectable()&&this.__selectionIndex>=0&&(this.__updateLayout(),a=this.__lineSelection?this.__getPositionByIdentifier(this.get_mouseX()+
this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1):this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),a!=this.__caretIndex)){this.__caretIndex=a;if(this.__wordSelection||this.__lineSelection)this.__selectionIndex=this.__getOppositeIdentifierBound(this.__specialSelectionInitialIndex,this.__lineSelection);a=!0;ea.__supportDOM&&(this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=
!0),a=!1);a&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))}},stage_onMouseUp:function(a){a=a.currentTarget;a.removeEventListener("enterFrame",m(this,this.this_onEnterFrame));a.removeEventListener("mouseMove",m(this,this.stage_onMouseMove));a.removeEventListener("mouseUp",m(this,this.stage_onMouseUp));if(this.stage==a&&a.get_focus()==this){this.__getWorldTransform();this.__updateLayout();if(this.__lineSelection||this.__wordSelection){a=0;this.__lineSelection?
a=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection&&(a=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1));var b=Math.max(this.__selectionIndex,a)|0;this.__selectionIndex=Math.min(this.__selectionIndex,a)|0;this.__caretIndex=b}this.__lineSelection=this.__wordSelection=!1;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer(),ea.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&
(this.__forceCachedBitmapUpdate=!0))}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},this_onEnterFrame:function(a){this.__updateMouseDrag()},this_onFocusIn:function(a){this.get_type()==1&&this.stage!=null&&this.stage.get_focus()==this?this.__startTextInput():this.get_type()!=1&&this.get_selectable()&&this.stage!=null&&this.stage.get_focus()==this&&this.__startCursorTimer()},this_onFocusOut:function(a){this.__stopCursorTimer();this.__stopTextInput();this.__selectionIndex!=this.__caretIndex&&
(this.__selectionIndex=this.__caretIndex,this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},this_onKeyDown:function(a){this.get_selectable()&&this.get_type()!=1&&a.keyCode==67&&(a.commandKey||a.ctrlKey)&&(this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||zf.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)))},this_onMouseDown:function(a){if(this.get_selectable()||this.get_type()==1)this.__lineSelection=a.clickCount==
3,this.__wordSelection=a.clickCount==2,this.__lineSelection?(a=this.__caretIndex,this.__caretIndex=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0),this.__selectionIndex=this.__getOppositeIdentifierBound(a,!0)):this.__wordSelection?(a=this.__caretIndex,this.__caretIndex=this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1),this.__selectionIndex=this.__getOppositeIdentifierBound(a,!1),this.__specialSelectionInitialIndex=a):
this.__selectionIndex=this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),this.setSelection(this.__caretIndex,this.__selectionIndex),this.__updateLayout(),ea.__supportDOM||(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())),this.stage!=null&&(this.stage.addEventListener("enterFrame",m(this,this.this_onEnterFrame)),this.stage.addEventListener("mouseMove",m(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",
m(this,this.stage_onMouseUp)))},this_onMouseWheel:function(a){this.get_mouseWheelEnabled()&&this.set_scrollV(Math.min(this.get_scrollV()-a.delta,this.get_maxScrollV())|0)},window_onKeyDown:function(a,b){switch(a){case 8:this.__selectionIndex==this.__caretIndex&&this.__caretIndex>0&&(this.__selectionIndex=this.__caretIndex-1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new ka("change",!0))):(this.__stopCursorTimer(),
this.__startCursorTimer());break;case 97:this.get_selectable()&&(tc.get_metaKey(b)||tc.get_ctrlKey(b))&&this.setSelection(0,this.__text.length);break;case 99:if(tc.get_metaKey(b)||tc.get_ctrlKey(b))this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||zf.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:!tc.get_metaKey(b)&&!tc.get_ctrlKey(b)||this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||(zf.set_text(this.__text.substring(this.__caretIndex,
this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new ka("change",!0)));break;case 127:this.__selectionIndex==this.__caretIndex&&this.__caretIndex<this.__text.length&&(this.__selectionIndex=this.__caretIndex+1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new ka("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741898:this.get_selectable()&&(tc.get_metaKey(b)||
tc.get_ctrlKey(b)?this.__caretIndex=0:this.__caretBeginningOfLine(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741901:this.get_selectable()&&(tc.get_metaKey(b)||tc.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretEndOfLine(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741903:this.get_selectable()&&
(tc.get_metaKey(b)||tc.get_ctrlKey(b)?this.__caretBeginningOfNextLine():this.__caretNextCharacter(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741904:this.get_selectable()&&(tc.get_metaKey(b)||tc.get_ctrlKey(b)?this.__caretBeginningOfPreviousLine():this.__caretPreviousCharacter(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;
case 1073741905:this.get_selectable()&&(tc.get_metaKey(b)||tc.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretNextLine(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741906:this.get_selectable()&&(tc.get_metaKey(b)||tc.get_ctrlKey(b)?this.__caretIndex=0:this.__caretPreviousLine(),tc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));
break;case 13:case 1073741912:this.__textEngine.multiline?(a=new sg("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new ka("change",!0)))):(this.__stopCursorTimer(),this.__startCursorTimer())}},window_onTextInput:function(a){this.__replaceSelectedText(a,!0);this.dispatchEvent(new ka("change",!0))},__class__:Jc,__properties__:I(Da.prototype.__properties__,{set_passwordChar:"set_passwordChar",get_passwordChar:"get_passwordChar",
set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",get_textColor:"get_textColor",set_text:"set_text",get_text:"get_text",set_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",set_sharpness:"set_sharpness",get_sharpness:"get_sharpness",get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",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_restrict:"set_restrict",get_restrict:"get_restrict",get_numLines:"get_numLines",set_multiline:"set_multiline",get_multiline:"get_multiline",set_mouseWheelEnabled:"set_mouseWheelEnabled",get_mouseWheelEnabled:"get_mouseWheelEnabled",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",get_length:"get_length",
set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_gridFitType:"set_gridFitType",get_gridFitType:"get_gridFitType",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",get_caretIndex:"get_caretIndex",get_bottomScrollV:"get_bottomScrollV",set_borderColor:"set_borderColor",get_borderColor:"get_borderColor",
set_border:"set_border",get_border:"get_border",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_antiAliasType:"set_antiAliasType",get_antiAliasType:"get_antiAliasType"})});var ws=function(a,b,c){c==null&&(c=0);b==null&&(b=10);a==null&&(a=10);this.lastText=null;Jc.call(this);this.set_x(a);this.set_y(b);this.currentFPS=0;this.set_selectable(!1);
this.mouseEnabled=!1;this.set_defaultTextFormat(new qf("_sans",12,c));this.set_text("FPS: ");this.currentTime=this.cacheCount=0;this.times=[]};r["openfl.display.FPS"]=ws;ws.__name__="openfl.display.FPS";ws.__super__=Jc;ws.prototype=I(Jc.prototype,{currentFPS:null,cacheCount:null,currentTime:null,times:null,lastText:null,__enterFrame:function(a){this.currentTime+=a;for(this.times.push(this.currentTime);this.times[0]<this.currentTime-1E3;)this.times.shift();a=this.times.length;this.currentFPS=Math.round((a+
this.cacheCount)/2);if(a!=this.cacheCount){var b="FPS: "+this.currentFPS;b!=this.lastText&&(this.set_text(b),this.lastText=b)}this.cacheCount=a},__class__:ws});var wv=function(a,b){na.call(this);this.name=a;this.frame=b};r["openfl.display.FrameLabel"]=wv;wv.__name__="openfl.display.FrameLabel";wv.__super__=na;wv.prototype=I(na.prototype,{frame:null,name:null,__class__:wv});var rw=function(a,b){this.script=a;this.frame=b};r["openfl.display.FrameScript"]=rw;rw.__name__="openfl.display.FrameScript";
rw.prototype={frame:null,script:null,__class__:rw};var Dh=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new ch;this.__positionY=this.__positionX=this.__strokePadding=0;this.__renderTransform=new S;this.__usedShaderBuffers=new Xa;this.__worldTransform=new S;this.__height=this.__width=0;this.__bitmapScaleY=this.__bitmapScaleX=1;this.__shaderBufferPool=new Tb(function(){return new xs});this.moveTo(0,0)};r["openfl.display.Graphics"]=Dh;Dh.__name__="openfl.display.Graphics";Dh.prototype={__bounds:null,
__commands:null,__dirty:null,__hardwareDirty:null,__height:null,__managed: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,__bitmapScaleX:null,__bitmapScaleY:null,beginBitmapFill:function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.__commands.beginBitmapFill(a,b!=null?b.clone():null,c,d);this.__visible=!0},beginFill:function(a,b){b==null&&(b=1);a==null&&(a=0);this.__commands.beginFill(a&16777215,b);b>0&&(this.__visible=!0)},beginGradientFill:function(a,b,c,d,f,g,h,l){l==null&&(l=0);h==null&&(h=1);g==null&&(g=0);
if(b!=null&&b.length!=0){if(c==null){c=[];for(var k=0,q=b.length;k<q;)k++,c.push(1)}if(d==null)for(d=[],k=0,q=b.length;k<q;){var w=k++;d.push(Math.ceil(w/(b.length-1)*255))}if(!(c.length<b.length||d.length<b.length))for(this.__commands.beginGradientFill(a,b,c,d,f,g,h,l),k=0;k<c.length;)if(a=c[k],++k,a>0){this.__visible=!0;break}}},beginShaderFill:function(a,b){a!=null&&(b=this.__shaderBufferPool.get(),this.__usedShaderBuffers.add(b),b.update(a),this.__commands.beginShaderFill(b))},clear:function(){for(var a=
this.__usedShaderBuffers.h;a!=null;){var b=a.item;a=a.next;this.__shaderBufferPool.release(b)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;this.__bounds!=null&&(this.set___dirty(!0),this.__transformDirty=!0,this.__bounds=null);this.__visible=!1;this.__positionY=this.__positionX=0;this.moveTo(0,0)},copyFrom:function(a){this.__bounds=a.__bounds!=null?a.__bounds.clone():null;this.__commands=a.__commands.copy();this.set___dirty(!0);this.__strokePadding=a.__strokePadding;
this.__positionX=a.__positionX;this.__positionY=a.__positionY;this.__transformDirty=!0;this.__visible=a.__visible},cubicCurveTo:function(a,b,c,d,f,g){var h=this.__findExtrema(this.__positionX,a,c,f),l=this.__findExtrema(this.__positionY,b,d,g);this.__inflateBounds(h.min-this.__strokePadding,l.min-this.__strokePadding);this.__inflateBounds(h.max+this.__strokePadding,l.max+this.__strokePadding);this.__positionX=f;this.__positionY=g;this.__commands.cubicCurveTo(a,b,c,d,f,g);this.set___dirty(!0)},curveTo:function(a,
b,c,d){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var f=a<c&&a>this.__positionX||a>c&&a<this.__positionX?c:this.__calculateBezierQuadPoint((this.__positionX-a)/(this.__positionX-2*a+c),this.__positionX,a,c);var g=b<d&&b>this.__positionY||b>d&&b<this.__positionY?d:this.__calculateBezierQuadPoint((this.__positionY-b)/(this.__positionY-2*b+d),this.__positionY,
b,d);this.__inflateBounds(f-this.__strokePadding,g-this.__strokePadding);this.__inflateBounds(f+this.__strokePadding,g+this.__strokePadding);this.__positionX=c;this.__positionY=d;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.curveTo(a,b,c,d);this.set___dirty(!0)},drawCircle:function(a,b,c){c<=0||(this.__inflateBounds(a-c-this.__strokePadding,
b-c-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+c+this.__strokePadding),this.__commands.drawCircle(a,b,c),this.set___dirty(!0))},drawEllipse:function(a,b,c,d){c<=0||d<=0||(this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding),this.__commands.drawEllipse(a,b,c,d),this.set___dirty(!0))},drawGraphicsData:function(a){for(a=a.iterator();a.hasNext();){var b=a.next();switch(b.__graphicsDataType){case 0:if(b.fill!=
null){var c=b.thickness;isNaN(c)&&(c=null);switch(b.fill.__graphicsFillType){case 0:var d=b.fill;this.lineStyle(c,d.color,d.alpha,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);break;case 1:d=b.fill;this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);this.lineGradientStyle(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 2:d=b.fill,this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit),
this.lineBitmapStyle(d.bitmapData,d.matrix,d.repeat,d.smooth)}}else this.lineStyle();break;case 1:d=b;this.beginFill(d.color,d.alpha);break;case 2:d=b;this.beginGradientFill(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 3:this.drawPath(b.commands,b.data,b.winding);break;case 4:d=b;this.beginBitmapFill(d.bitmapData,d.matrix,d.repeat,d.smooth);break;case 5:this.endFill();break;case 6:this.drawQuads(b.rects,b.indices,b.transforms);break;
case 7:this.drawTriangles(b.vertices,b.indices,b.uvtData,b.culling);break;case 8:this.beginShaderFill(b.shader,b.matrix)}}},drawPath:function(a,b,c){c==null&&(c=0);var d=0;c==1&&this.__commands.windingNonZero();a=a.iterator();a:for(;a.hasNext();)switch(a.next()){case 1:this.moveTo(b.get(d),b.get(d+1));d+=2;break;case 2:this.lineTo(b.get(d),b.get(d+1));d+=2;break;case 3:this.curveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3));d+=4;break;case 4:this.moveTo(b.get(d+2),b.get(d+3));break a;case 5:this.lineTo(b.get(d+
2),b.get(d+3));break a;case 6:this.cubicCurveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3),b.get(d+4),b.get(d+5)),d+=6}},drawQuads:function(a,b,c){if(a!=null){var d=b!=null,f=!1,g=!1,h=d?b.get_length():Math.floor(a.get_length()/4);if(h!=0){c!=null&&(c.get_length()>=h*6?g=f=!0:c.get_length()>=h*4?f=!0:c.get_length()>=h*2&&(g=!0));for(var l=Ea.__pool.get(),k=S.__pool.get(),q=Infinity,w=Infinity,v=-Infinity,z=-Infinity,n,E=0;E<h;){var H=E++;n=d?b.get(H)*4:H*4;n<0||(l.setTo(0,0,a.get(n+2),a.get(n+3)),
l.width<=0||l.height<=0||(f&&g?(n=H*6,k.setTo(c.get(n),c.get(n+1),c.get(n+2),c.get(n+3),c.get(n+4),c.get(n+5))):f?(n=H*4,k.setTo(c.get(n),c.get(n+1),c.get(n+2),c.get(n+3),l.x,l.y)):g?(n=H*2,k.tx=c.get(n),k.ty=c.get(n+1)):(k.tx=l.x,k.ty=l.y),l.__transform(l,k),q>l.x&&(q=l.x),w>l.y&&(w=l.y),v<l.get_right()&&(v=l.get_right()),z<l.get_bottom()&&(z=l.get_bottom())))}this.__inflateBounds(q,w);this.__inflateBounds(v,z);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);this.__visible=!0;Ea.__pool.release(l);
S.__pool.release(k)}}},drawRect:function(a,b,c,d){if(c!=0||d!=0){var f=c<0?-1:1,g=d<0?-1:1;this.__inflateBounds(a-this.__strokePadding*f,b-this.__strokePadding*g);this.__inflateBounds(a+c+this.__strokePadding*f,b+d+this.__strokePadding*g);this.__commands.drawRect(a,b,c,d);this.set___dirty(!0)}},drawRoundRect:function(a,b,c,d,f,g){if(c!=0||d!=0){var h=c<0?-1:1,l=d<0?-1:1;this.__inflateBounds(a-this.__strokePadding*h,b-this.__strokePadding*l);this.__inflateBounds(a+c+this.__strokePadding*h,b+d+this.__strokePadding*
l);this.__commands.drawRoundRect(a,b,c,d,f,g);this.set___dirty(!0)}},drawRoundRectComplex:function(a,b,c,d,f,g,h,l){if(!(c<=0||d<=0)){this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding);this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding);var k=a+c,q=b+d;c=c<d?c*2:d*2;f<c||(f=c);g<c||(g=c);h<c||(h=c);l<c||(l=c);c=1-Math.sin(Math.PI/180*45);d=1-Math.tan(Math.PI/180*22.5);var w=l*c,v=l*d;this.moveTo(k,q-l);this.curveTo(k,q-v,k-w,q-w);this.curveTo(k-v,q,k-l,q);w=h*
c;v=h*d;this.lineTo(a+h,q);this.curveTo(a+v,q,a+w,q-w);this.curveTo(a,q-v,a,q-h);w=f*c;v=f*d;this.lineTo(a,b+f);this.curveTo(a,b+v,a+w,b+w);this.curveTo(a+v,b,a+f,b);w=g*c;v=g*d;this.lineTo(k-g,b);this.curveTo(k-v,b,k-w,b+w);this.curveTo(k,b+v,k,b+g);this.lineTo(k,q-l);this.set___dirty(!0)}},drawTriangles:function(a,b,c,d){d==null&&(d=1);if(a!=null&&a.get_length()!=0){var f=a.get_length()/2|0;if(b==null){if(f%3!=0)throw new rb("Not enough vertices to close a triangle.");b=gb.toIntVector(null);for(var g=
0,h=f;g<h;){var l=g++;b.push(l)}}d==null&&(d=1);var k=Infinity,q=Infinity,w=-Infinity,v=-Infinity;g=0;for(h=f;g<h;)l=g++,f=a.get(l*2),l=a.get(l*2+1),k>f&&(k=f),q>l&&(q=l),w<f&&(w=f),v<l&&(v=l);this.__inflateBounds(k,q);this.__inflateBounds(w,v);this.__commands.drawTriangles(a,b,c,d);this.set___dirty(!0);this.__visible=!0}},endFill:function(){this.__commands.endFill()},lineBitmapStyle:function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.__commands.lineBitmapStyle(a,b!=null?b.clone():null,c,d)},lineGradientStyle:function(a,
b,c,d,f,g,h,l){l==null&&(l=0);h==null&&(h=1);g==null&&(g=0);if(c==null){c=[];for(var k=0,q=b.length;k<q;)k++,c.push(1)}if(d==null)for(d=[],k=0,q=b.length;k<q;){var w=k++;d.push(Math.ceil(w/(b.length-1)*255))}this.__commands.lineGradientStyle(a,b,c,d,f,g,h,l)},lineStyle:function(a,b,c,d,f,g,h,l){l==null&&(l=3);f==null&&(f=2);d==null&&(d=!1);c==null&&(c=1);b==null&&(b=0);g==null&&(g=1);h==null&&(h=2);a!=null&&(h==1?a>this.__strokePadding&&(this.__strokePadding=Math.ceil(a)):a/2>this.__strokePadding&&
(this.__strokePadding=Math.ceil(a/2)));this.__commands.lineStyle(a,b,c,d,f,g,h,l);a!=null&&(this.__visible=!0)},lineTo:function(a,b){isFinite(a)&&isFinite(b)&&(this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding),this.__positionX=a,this.__positionY=b,this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding),this.__inflateBounds(this.__positionX+
this.__strokePadding*2,this.__positionY+this.__strokePadding),this.__commands.lineTo(a,b),this.set___dirty(!0))},moveTo:function(a,b){this.__positionX=a;this.__positionY=b;this.__commands.moveTo(a,b)},overrideBlendMode:function(a){a==null&&(a=10);this.__commands.overrideBlendMode(a)},readGraphicsData:function(a){a==null&&(a=!0);var b=gb.toObjectVector(null);this.__owner.__readGraphicsData(b,a);return b},__calculateBezierCubicPoint:function(a,b,c,d,f){var g=1-a;return g*g*g*b+3*c*a*(g*g)+3*d*g*(a*
a)+a*a*a*f},__calculateBezierQuadPoint:function(a,b,c,d){var f=1-a;return f*f*b+2*f*a*c+a*a*d},__cleanup:function(){this.__bounds!=null&&this.__canvas!=null&&(this.set___dirty(!0),this.__transformDirty=!0);this.__bitmap=null;this.__canvas!=null&&(this.__canvas.width=0,this.__canvas.height=0,this.__canvas=null);this.__context!=null&&(this.__context.clearRect(0,0,0,0),this.__context=null)},__getBounds:function(a,b){if(this.__bounds!=null){var c=Ea.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,
c.y,c.width,c.height);Ea.__pool.release(c)}},__hitTest:function(a,b,c,d){if(this.__bounds==null)return!1;var f=d.a*d.d-d.b*d.c,g=f==0?-d.tx:1/f*(d.c*(d.ty-b)+d.d*(a-d.tx));f=d.a*d.d-d.b*d.c;a=f==0?-d.ty:1/f*(d.a*(b-d.ty)+d.b*(d.tx-a));return g>this.__bounds.x&&a>this.__bounds.y&&this.__bounds.contains(g,a)?c?B.hitTest(this,g,a):!0:!1},__findExtrema:function(a,b,c,d){var f=[];if(!(b<d&&b>a||b>d&&b<a)||!(c<d&&c>a||c>d&&c<a)){var g=-a+3*b+d-3*c,h=2*a-4*b+2*c,l=b-a,k=h*h-4*g*l;g==0?(g=-l/h,g>0&&g<1&&
f.push(this.__calculateBezierCubicPoint(g,a,b,c,d))):k>=0&&(l=(-h+Math.sqrt(k))/(2*g),g=(-h-Math.sqrt(k))/(2*g),l>0&&l<1&&f.push(this.__calculateBezierCubicPoint(l,a,b,c,d)),g>0&&g<1&&f.push(this.__calculateBezierCubicPoint(g,a,b,c,d)))}b=a;f.push(d);for(d=0;d<f.length;)c=f[d],++d,c<b&&(b=c),c>a&&(a=c);return{min:b,max:a}},__inflateBounds:function(a,b){this.__bounds==null?(this.__bounds=new Ea(a,b,0,0),this.__transformDirty=!0):(a<this.__bounds.x&&(this.__bounds.width+=this.__bounds.x-a,this.__bounds.x=
a,this.__transformDirty=!0),b<this.__bounds.y&&(this.__bounds.height+=this.__bounds.y-b,this.__bounds.y=b,this.__transformDirty=!0),a>this.__bounds.x+this.__bounds.width&&(this.__bounds.width=a-this.__bounds.x),b>this.__bounds.y+this.__bounds.height&&(this.__bounds.height=b-this.__bounds.y))},__readGraphicsData:function(a){for(var b=new fj(this.__commands),c=null,d,f=0,g=this.__commands.types;f<g.length;){d=g[f];++f;switch(d._hx_index){case 4:case 5:case 6:case 7:case 9:case 10:case 17:case 18:c==
null&&(c=new In);break;default:c!=null&&(a.push(c),c=null)}switch(d._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_BITMAP_FILL;d=b;a.push(new ys(d.buffer.o[d.oPos],d.buffer.o[d.oPos+1],d.buffer.b[d.bPos],d.buffer.b[d.bPos+1]));break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_FILL;d=b;a.push(new Cp(d.buffer.i[d.iPos],d.buffer.f[d.fPos]));break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_GRADIENT_FILL;d=b;a.push(new zs(d.buffer.o[d.oPos],d.buffer.ii[d.iiPos],d.buffer.ff[d.ffPos],d.buffer.ii[d.iiPos+1],d.buffer.o[d.oPos+1],d.buffer.o[d.oPos+2],d.buffer.o[d.oPos+3],d.buffer.f[d.fPos]));break;case 3:break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;
break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CUBIC_CURVE_TO;d=b;c.cubicCurveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+
3],d.buffer.f[d.fPos+4],d.buffer.f[d.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CURVE_TO;d=b;c.curveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=
3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_CIRCLE;d=b;c.__drawCircle(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_ELLIPSE;d=b;c.__drawEllipse(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_RECT;d=b;c.__drawRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;
case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=va.DRAW_ROUND_RECT;d=b;c.__drawRoundRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.o[d.oPos]!=null?d.buffer.o[d.oPos]:d.buffer.f[d.fPos+4]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.END_FILL;a.push(new As);break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;
b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_BITMAP_STYLE;c=null;
break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=
2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_GRADIENT_STYLE;break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=
4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_STYLE;var h=b;d=new Bs(h.buffer.o[h.oPos],h.buffer.b[h.bPos],h.buffer.o[h.oPos+1],h.buffer.o[h.oPos+2],h.buffer.o[h.oPos+3],h.buffer.f[h.fPos+1]);d.fill=new Cp(h.buffer.i[h.iPos],h.buffer.f[h.fPos]);a.push(d);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_TO;d=b;c.lineTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;
case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.MOVE_TO;d=b;c.moveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}c!=null&&a.push(c)},__update:function(a,b){if(this.__bounds==null||this.__bounds.width<=
0||this.__bounds.height<=0)(this.__width>=1||this.__height>=1)&&this.set___dirty(!0),this.__height=this.__width=0;else{var c=this.__owner.__renderTransform;if(c!=null){var d=c.b==0?Math.abs(c.a):Math.sqrt(c.a*c.a+c.b*c.b);var f=c.c==0?Math.abs(c.d):Math.sqrt(c.c*c.c+c.d*c.d);a!=null&&(d=a.b==0?d*a.a:d*Math.sqrt(a.a*a.a+a.b*a.b),f=a.c==0?f*a.d:f*Math.sqrt(a.c*a.c+a.d*a.d));a=Math.abs(this.__bounds.width*d);d=Math.abs(this.__bounds.height*f);if(a<1||d<1)(this.__width>=1||this.__height>=1)&&this.set___dirty(!0),
this.__height=this.__width=0;else{Dh.maxTextureWidth!=null&&a>Dh.maxTextureWidth&&(a=Dh.maxTextureWidth);Dh.maxTextureWidth!=null&&d>Dh.maxTextureHeight&&(d=Dh.maxTextureHeight);f=Math.ceil(a+1);a=Math.ceil(d+1);if(this.__owner.__worldScale9Grid!=null){this.__renderTransform.a=b;this.__renderTransform.d=b;d=1/b;var g=1/b}else this.__renderTransform.a=f/this.__bounds.width,this.__renderTransform.d=a/this.__bounds.height,d=1/this.__renderTransform.a,g=1/this.__renderTransform.d;this.__worldTransform.a=
d*c.a;this.__worldTransform.b=d*c.b;this.__worldTransform.c=g*c.c;this.__worldTransform.d=g*c.d;g=this.__bounds.x;var h=this.__bounds.y;d=g*c.a+h*c.c+c.tx;c=g*c.b+h*c.d+c.ty;b>1?(b=1/b,this.__worldTransform.tx=Math.round(d/b)*b,this.__worldTransform.ty=Math.round(c/b)*b):(this.__worldTransform.tx=Math.round(d),this.__worldTransform.ty=Math.round(c));b=this.__worldTransform;g=b.a*b.d-b.b*b.c;this.__renderTransform.tx=g==0?-b.tx:1/g*(b.c*(b.ty-c)+b.d*(d-b.tx));b=this.__worldTransform;g=b.a*b.d-b.b*
b.c;this.__renderTransform.ty=g==0?-b.ty:1/g*(b.a*(c-b.ty)+b.b*(b.tx-d));f==this.__width&&a==this.__height||this.set___dirty(!0);this.__width=f;this.__height=a}}}},set___dirty:function(a){if(a&&this.__owner!=null){var b=this.__owner;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a&&(this.__hardwareDirty=this.__softwareDirty=!0);return this.__dirty=a},__class__:Dh,__properties__:{set___dirty:"set___dirty"}};var Al=function(){};r["openfl.display.IGraphicsFill"]=Al;Al.__name__="openfl.display.IGraphicsFill";
Al.__isInterface__=!0;Al.prototype={__graphicsFillType:null,__class__:Al};var gj=function(){};r["openfl.display.IGraphicsData"]=gj;gj.__name__="openfl.display.IGraphicsData";gj.__isInterface__=!0;gj.prototype={__graphicsDataType:null,__class__:gj};var ys=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!0);this.bitmapData=a;this.matrix=b;this.repeat=c;this.smooth=d;this.__graphicsDataType=4;this.__graphicsFillType=2};r["openfl.display.GraphicsBitmapFill"]=ys;ys.__name__="openfl.display.GraphicsBitmapFill";
ys.__interfaces__=[Al,gj];ys.prototype={bitmapData:null,matrix:null,repeat:null,smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:ys};var As=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};r["openfl.display.GraphicsEndFill"]=As;As.__name__="openfl.display.GraphicsEndFill";As.__interfaces__=[Al,gj];As.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:As};var zs=function(a,b,c,d,f,g,h,l){l==null&&(l=0);a==null&&(a=0);g==null&&(g=0);h==null&&(h=
1);this.type=a;this.colors=b;this.alphas=c;this.ratios=d;this.matrix=f;this.spreadMethod=g;this.interpolationMethod=h;this.focalPointRatio=l;this.__graphicsDataType=2;this.__graphicsFillType=1};r["openfl.display.GraphicsGradientFill"]=zs;zs.__name__="openfl.display.GraphicsGradientFill";zs.__interfaces__=[Al,gj];zs.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:zs};
var Cs=function(){};r["openfl.display.IGraphicsPath"]=Cs;Cs.__name__="openfl.display.IGraphicsPath";Cs.__isInterface__=!0;var In=function(a,b,c){c==null&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};r["openfl.display.GraphicsPath"]=In;In.__name__="openfl.display.GraphicsPath";In.__interfaces__=[Cs,gj];In.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,f,g){this.commands==null&&(this.commands=gb.toIntVector(null));
this.data==null&&(this.data=gb.toFloatVector(null));this.commands.push(6);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d);this.data.push(f);this.data.push(g)},curveTo:function(a,b,c,d){this.commands==null&&(this.commands=gb.toIntVector(null));this.data==null&&(this.data=gb.toFloatVector(null));this.commands.push(3);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d)},lineTo:function(a,b){this.commands==null&&(this.commands=gb.toIntVector(null));this.data==
null&&(this.data=gb.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,b){this.commands==null&&(this.commands=gb.toIntVector(null));this.data==null&&(this.data=gb.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){this.commands==null&&(this.commands=gb.toIntVector(null));this.data==null&&(this.data=gb.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,
b){this.commands==null&&(this.commands=gb.toIntVector(null));this.data==null&&(this.data=gb.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},__drawCircle:function(a,b,c){this.__drawRoundRect(a-c,b-c,c*2,c*2,c*2,c*2)},__drawEllipse:function(a,b,c,d){this.__drawRoundRect(a,b,c,d,c,d)},__drawRect:function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.lineTo(a,b)},__drawRoundRect:function(a,b,c,d,f,g){f*=.5;g*=.5;f>c/2&&(f=c/2);
g>d/2&&(g=d/2);c=a+c;d=b+d;var h=-f+f*.7071067811865476,l=-f+f*.41421356237309503,k=-g+g*.7071067811865476,q=-g+g*.41421356237309503;this.moveTo(c,d-g);this.curveTo(c,d+q,c+h,d+k);this.curveTo(c+l,d,c-f,d);this.lineTo(a+f,d);this.curveTo(a-l,d,a-h,d+k);this.curveTo(a,d+q,a,d-g);this.lineTo(a,b+g);this.curveTo(a,b-q,a-h,b-k);this.curveTo(a-l,b,a+f,b);this.lineTo(c-f,b);this.curveTo(c+l,b,c+h,b-k);this.curveTo(c,b-q,c,b+g);this.lineTo(c,d-g)},__class__:In};var xv=function(a,b,c){this.rects=a;this.indices=
b;this.transforms=c;this.__graphicsDataType=6};r["openfl.display.GraphicsQuadPath"]=xv;xv.__name__="openfl.display.GraphicsQuadPath";xv.__interfaces__=[Cs,gj];xv.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:xv};var yv=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};r["openfl.display.GraphicsShaderFill"]=yv;yv.__name__="openfl.display.GraphicsShaderFill";yv.__interfaces__=[Al,gj];yv.prototype={matrix:null,shader:null,
__graphicsDataType:null,__graphicsFillType:null,__class__:yv};var Cp=function(a,b){b==null&&(b=1);a==null&&(a=0);this.alpha=b;this.color=a;this.__graphicsDataType=1;this.__graphicsFillType=0};r["openfl.display.GraphicsSolidFill"]=Cp;Cp.__name__="openfl.display.GraphicsSolidFill";Cp.__interfaces__=[Al,gj];Cp.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Cp};var sw=function(){};r["openfl.display.IGraphicsStroke"]=sw;sw.__name__="openfl.display.IGraphicsStroke";
sw.__isInterface__=!0;var Bs=function(a,b,c,d,f,g,h){g==null&&(g=3);f==null&&(f=2);d==null&&(d=0);c==null&&(c=2);b==null&&(b=!1);a==null&&(a=NaN);this.caps=d;this.fill=h;this.joints=f;this.miterLimit=g;this.pixelHinting=b;this.scaleMode=c;this.thickness=a;this.__graphicsDataType=0};r["openfl.display.GraphicsStroke"]=Bs;Bs.__name__="openfl.display.GraphicsStroke";Bs.__interfaces__=[sw,gj];Bs.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,
__graphicsDataType:null,__class__:Bs};var zv=function(a,b,c,d){d==null&&(d=1);this.vertices=a;this.indices=b;this.uvtData=c;this.culling=d;this.__graphicsDataType=7};r["openfl.display.GraphicsTrianglePath"]=zv;zv.__name__="openfl.display.GraphicsTrianglePath";zv.__interfaces__=[Cs,gj];zv.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:zv};var Jn=function(){};r["openfl.display.IDisplayObjectLoader"]=Jn;Jn.__name__="openfl.display.IDisplayObjectLoader";
Jn.__isInterface__=!0;Jn.prototype={load:null,loadBytes:null,__class__:Jn};var Dp=function(){};r["openfl.display.ITileContainer"]=Dp;Dp.__name__="openfl.display.ITileContainer";Dp.__isInterface__=!0;Dp.prototype={get_numTiles:null,addTile:null,addTileAt:null,addTiles:null,contains:null,getTileAt:null,getTileIndex:null,removeTile:null,removeTileAt:null,removeTiles:null,setTileIndex:null,sortTiles:null,swapTiles:null,swapTilesAt:null,__class__:Dp,__properties__:{get_numTiles:"get_numTiles"}};var ns=
function(a){a==null&&(a=80);this.quality=a};r["openfl.display.JPEGEncoderOptions"]=ns;ns.__name__="openfl.display.JPEGEncoderOptions";ns.prototype={quality:null,__class__:ns};var tw={fromInt:function(a){return a},fromString:function(a){switch(a){case "bevel":return 0;case "miter":return 1;case "round":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}}},Ds=function(){};r["openfl.display._internal.BitmapDataLoader"]=
Ds;Ds.__name__="openfl.display._internal.BitmapDataLoader";Ds.__interfaces__=[Jn];Ds.prototype={load:function(a,b,c){var d=this;if(c.contentType.indexOf("image/")>-1&&a.method=="GET"&&(a.requestHeaders==null||a.requestHeaders.length==0)&&a.userAgent==null)return uc.loadFromFile(a.url).then(function(h){h=new cg(h);return zc.withValue(h)});var f=new yf,g=new Si;g.dataFormat=0;g.addEventListener("complete",function(h){f.completeWith(d.loadBytes(g.data,b,c))});g.addEventListener("ioError",function(h){f.error(h)});
g.addEventListener("progress",function(h){f.progress(h.bytesLoaded|0,h.bytesTotal|0)});g.load(a);return f.future},loadBytes:function(a,b,c){return uc.loadFromBytes(a).then(function(d){d=new cg(d);return zc.withValue(d)})},__class__:Ds};var Es=function(){};r["openfl.display._internal.ScriptLoader"]=Es;Es.__name__="openfl.display._internal.ScriptLoader";Es.__interfaces__=[Jn];Es.prototype={load:function(a,b,c){if(c.contentType!=null&&(c.contentType.indexOf("/javascript")>-1||c.contentType.indexOf("/ecmascript")>
-1)){var d=new yf,f=new Si;f.dataFormat=1;f.addEventListener("complete",function(g){eval("(function () {"+L.string(f.data)+"})()");d.complete(new za)});f.addEventListener("ioError",function(g){d.error(g)});f.addEventListener("progress",function(g){d.progress(g.bytesLoaded|0,g.bytesTotal|0)});f.load(a);return d.future}return null},loadBytes:function(a,b,c){return null},__class__:Es};var Fs=function(){};r["openfl.display._internal.AssetManifestLoader"]=Fs;Fs.__name__="openfl.display._internal.AssetManifestLoader";
Fs.__interfaces__=[Jn];Fs.prototype={load:function(a,b,c){if(c.contentType!=null&&c.contentType.indexOf("/json")>-1){var d=new yf,f=new Si;f.dataFormat=1;f.addEventListener("complete",function(g){g=a.url;var h=g.indexOf("?");h>-1&&(g=g.substring(0,h));var l=se.parse(f.data,rg.directory(g));if(l==null)d.error("Cannot parse asset manifest");else{var k=dd.fromManifest(l);if(k==null)d.error("Cannot open library");else if(k instanceof kf)k.load().onComplete(function(q){c.assetLibrary=k;ub.registerLibrary(c.url,
k);l.name==null||ub.hasLibrary(l.name)||ub.registerLibrary(l.name,k);q=k.getMovieClip("");d.complete(q)}).onProgress(m(d,d.progress)).onError(m(d,d.error));else d.error("Library is not an OpenFL AssetLibrary")}});f.addEventListener("ioError",function(g){d.error(g)});f.addEventListener("progress",function(g){d.progress(g.bytesLoaded|0,g.bytesTotal|0)});f.load(a);return d.future}return null},loadBytes:function(a,b,c){return null},__class__:Fs};var Gf=function(){lb.call(this);this.__drawableType=4;this.contentLoaderInfo=
Ej.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};r["openfl.display.Loader"]=Gf;Gf.__name__="openfl.display.Loader";Gf.__registerDefaultLoaders=function(){var a=[new Ds,new Es,new Fs];Gf.__registeredLoaders=Gf.__registeredLoaders==null?a:a.concat(Gf.__registeredLoaders)};Gf.registerLoader=function(a){a!=null&&(Gf.__registeredLoaders==null&&(Gf.__registeredLoaders=[]),X.remove(Gf.__registeredLoaders,a),Gf.__registeredLoaders.push(a))};Gf.__super__=
lb;Gf.prototype=I(lb.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__unloaded:null,addChild:function(a){throw new Ld("Error #2069: The Loader class does not implement this method.",2069);},addChildAt:function(a,b){throw new Ld("Error #2069: The Loader class does not implement this method.",2069);},close:function(){fd.notImplemented({fileName:"openfl/display/Loader.hx",lineNumber:245,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();
var c=new ka("open");this.contentLoaderInfo.dispatchEvent(c);this.contentLoaderInfo.loaderURL=Oa.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=a.url;this.__unloaded=!1;if(a.contentType==null||a.contentType==""){c="";var d=a.url,f=d.indexOf("?");for(f>-1&&(d=d.substring(0,f));Z.endsWith(d,"/");)d=d.substring(0,d.length-1);Z.endsWith(d,".bundle")&&(d+="/library.json",a.url=f>-1?d+a.url.substring(f):d);f=d.lastIndexOf(".");f>-1&&(c=d.substring(f+1));switch(c){case "gif":c="image/gif";
break;case "jpeg":case "jpg":c="image/jpeg";break;case "js":c="application/javascript";break;case "json":c="application/json";break;case "png":c="image/png";break;case "swf":c="application/x-shockwave-flash";break;default:c="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=c}else this.contentLoaderInfo.contentType=a.contentType;d=null;for(c=Gf.__registeredLoaders.length;c>0&&(--c,d=Gf.__registeredLoaders[c],d=d.load(a,b,this.contentLoaderInfo),d==null););d!=null?(d.onComplete(m(this,
this.Loader_onComplete)),d.onProgress(m(this,this.Loader_onProgress)),d.onError(m(this,this.Loader_onError))):this.__dispatchError("No DisplayObject loader found")},loadBytes:function(a,b){for(var c=null,d=Gf.__registeredLoaders.length;d>0&&(--d,c=Gf.__registeredLoaders[d],c=c.loadBytes(a,b,this.contentLoaderInfo),c==null););c!=null?(c.onComplete(m(this,this.Loader_onComplete)),c.onProgress(m(this,this.Loader_onProgress)),c.onError(m(this,this.Loader_onError))):this.__dispatchError("No DisplayObject loader found")},
removeChild:function(a){if(a==this.content)return lb.prototype.removeChild.call(this,this.content);throw new Ld("Error #2069: The Loader class does not implement this method.",2069);},removeChildAt:function(a){throw new Ld("Error #2069: The Loader class does not implement this method.",2069);},setChildIndex:function(a,b){throw new Ld("Error #2069: The Loader class does not implement this method.",2069);},unload:function(){this.__unloaded||(this.content!=null&&this.content.parent==this&&lb.prototype.removeChild.call(this,
this.content),this.__library!=null&&(ub.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=!0,this.contentLoaderInfo.dispatchEvent(new ka("unload")))},unloadAndStop:function(a){this.content!=null&&this.content.__stopAllMovieClips();
a=0;for(var b=this.get_numChildren();a<b;){var c=a++;this.getChildAt(c).__stopAllMovieClips()}this.unload()},__dispatchError:function(a){if(a instanceof ka)this.contentLoaderInfo.dispatchEvent(a);else{var b=new Eh("ioError");b.text=L.string(a);this.contentLoaderInfo.dispatchEvent(b)}},Loader_onComplete:function(a){if(a==null)this.__dispatchError("Unknown error");else{this.content=a;this.contentLoaderInfo.content=a;if(this.contentLoaderInfo.width==-1||this.contentLoaderInfo.height==-1){var b=a.get_width()|
0;this.contentLoaderInfo.width=b;b=a.get_height()|0;this.contentLoaderInfo.height=b}lb.prototype.addChildAt.call(this,a,0);this.contentLoaderInfo.dispatchEvent(new ka("complete"))}},Loader_onError:function(a){this.__dispatchError(a)},Loader_onProgress:function(a,b){var c=new kh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.contentLoaderInfo.dispatchEvent(c)},__class__:Gf});var Ej=function(){this.frameRate=this.height=this.width=-1;na.call(this);this.applicationDomain=Kn.currentDomain;this.bytesTotal=
this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};r["openfl.display.LoaderInfo"]=Ej;Ej.__name__="openfl.display.LoaderInfo";Ej.create=function(a){var b=new Ej;b.uncaughtErrorEvents=new Gs;a!=null?b.loader=a:b.url=Ej.__rootURL;return b};Ej.__super__=na;Ej.prototype=I(na.prototype,{applicationDomain:null,assetLibrary:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,frameRate:null,height:null,loader:null,loaderURL:null,parameters:null,
parentAllowsChild:null,sameDomain:null,sharedEvents:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){this.__completed||(this.bytesLoaded<this.bytesTotal&&(this.bytesLoaded=this.bytesTotal),this.__update(this.bytesLoaded,this.bytesTotal),this.__completed=!0,this.dispatchEvent(new ka("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new kh("progress",!1,!1,a,b))},__class__:Ej});var Lj=function(){za.call(this);this.__enabled=
!0};r["openfl.display.MovieClip"]=Lj;Lj.__name__="openfl.display.MovieClip";Lj.fromTimeline=function(a){var b=new Lj;b.attachTimeline(a);return b};Lj.__super__=za;Lj.prototype=I(za.prototype,{__enabled:null,__hasDown:null,__hasOver:null,__hasUp:null,__mouseIsDown:null,__scene:null,__timeline:null,addFrameScript:function(a,b){this.__timeline!=null&&this.__timeline.__addFrameScript(a,b)},attachTimeline:function(a){this.__timeline=a;a!=null&&(a.__attachMovieClip(this),this.play())},gotoAndPlay:function(a,
b){this.__timeline!=null&&this.__timeline.__gotoAndPlay(a,b)},gotoAndStop:function(a,b){this.__timeline!=null&&this.__timeline.__gotoAndStop(a,b)},nextFrame:function(){this.__timeline!=null&&this.__timeline.__nextFrame()},nextScene:function(){this.__timeline!=null&&this.__timeline.__nextScene()},play:function(){this.__timeline!=null&&this.__timeline.__play()},prevFrame:function(){this.__timeline!=null&&this.__timeline.__prevFrame()},prevScene:function(){this.__timeline!=null&&this.__timeline.__prevScene()},
stop:function(){this.__timeline!=null&&this.__timeline.__stop()},__enterFrame:function(a){this.__timeline!=null&&this.__timeline.__enterFrame(a);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__enterFrame(a)}},__stopAllMovieClips:function(){za.prototype.__stopAllMovieClips.call(this);this.stop()},__tabTest:function(a){this.__enabled&&za.prototype.__tabTest.call(this,a)},__onMouseDown:function(a){this.__enabled&&this.__hasDown&&this.gotoAndStop("_down");this.__mouseIsDown=!0;this.stage!=
null&&this.stage.addEventListener("mouseUp",m(this,this.__onMouseUp),!0)},__onMouseUp:function(a){this.__mouseIsDown=!1;this.stage!=null&&this.stage.removeEventListener("mouseUp",m(this,this.__onMouseUp));this.__buttonMode&&(ef.__eq(a.target,this)&&this.__enabled&&this.__hasOver?this.gotoAndStop("_over"):this.__enabled&&this.__hasUp&&this.gotoAndStop("_up"))},__onRollOut:function(a){this.__enabled&&(this.__mouseIsDown&&this.__hasOver?this.gotoAndStop("_over"):this.__hasUp&&this.gotoAndStop("_up"))},
__onRollOver:function(a){this.__enabled&&this.__hasOver&&this.gotoAndStop("_over")},set_buttonMode:function(a){if(this.__buttonMode!=a){if(a){this.__hasUp=this.__hasOver=this.__hasDown=!1;for(var b=0,c=this.get_currentLabels();b<c.length;){var d=c[b];++b;switch(d.name){case "_down":this.__hasDown=!0;break;case "_over":this.__hasOver=!0;break;case "_up":this.__hasUp=!0}}if(this.__hasDown||this.__hasOver||this.__hasUp)this.addEventListener("rollOver",m(this,this.__onRollOver)),this.addEventListener("rollOut",
m(this,this.__onRollOut)),this.addEventListener("mouseDown",m(this,this.__onMouseDown))}else this.removeEventListener("rollOver",m(this,this.__onRollOver)),this.removeEventListener("rollOut",m(this,this.__onRollOut)),this.removeEventListener("mouseDown",m(this,this.__onMouseDown));this.__buttonMode=a}return a},get_currentFrame:function(){return this.__timeline!=null?this.__timeline.__currentFrame:1},get_currentFrameLabel:function(){return this.__timeline!=null?this.__timeline.__currentFrameLabel:
null},get_currentLabel:function(){return this.__timeline!=null?this.__timeline.__currentLabel:null},get_currentLabels:function(){return this.__timeline!=null?this.__timeline.__currentLabels.slice():[]},get_currentScene:function(){if(this.__timeline!=null)return this.__timeline.__currentScene;this.__scene==null&&(this.__scene=new Av("",[],1));return this.__scene},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},get_framesLoaded:function(){return this.__timeline!=
null?this.__timeline.__framesLoaded:1},get_isPlaying:function(){return this.__timeline!=null?this.__timeline.__isPlaying:!1},get_scenes:function(){return this.__timeline!=null?this.__timeline.scenes.slice():[this.get_currentScene()]},get_totalFrames:function(){return this.__timeline!=null?this.__timeline.__totalFrames:1},__class__:Lj,__properties__:I(za.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_scenes:"get_scenes",get_isPlaying:"get_isPlaying",get_framesLoaded:"get_framesLoaded",
set_enabled:"set_enabled",get_enabled:"get_enabled",get_currentScene:"get_currentScene",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})});var rc=function(a,b){xh.call(this);this.__context3D=a;this.__context=a.__context;this.__gl=this.gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=this.__defaultRenderTarget==null;Dh.maxTextureWidth==null&&(Dh.maxTextureWidth=Dh.maxTextureHeight=
this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=ib._new();this.__values=[];this.__softwareRenderer=new Qk(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(!0);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=ib._new();this.__projectionFlipped=ib._new();this.__stencilReference=0;this.__tempRect=new Ea;rc.__staticDefaultDisplayShader==null&&(rc.__staticDefaultDisplayShader=new vs);rc.__staticDefaultGraphicsShader==null&&
(rc.__staticDefaultGraphicsShader=new Kf);rc.__staticMaskShader==null&&(rc.__staticMaskShader=new um);this.__defaultDisplayShader=rc.__staticDefaultDisplayShader;this.__defaultGraphicsShader=rc.__staticDefaultGraphicsShader;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new Tb(function(){return new zd});this.__maskShader=rc.__staticMaskShader};r["openfl.display.OpenGLRenderer"]=rc;rc.__name__="openfl.display.OpenGLRenderer";rc.__super__=
xh;rc.prototype=I(xh.prototype,{gl:null,__context3D:null,__clipRects:null,__currentDisplayShader:null,__currentGraphicsShader:null,__currentRenderTarget: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(a){rc.__alphaValue[0]=a*this.__worldAlpha;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",rc.__alphaValue):this.__currentShader!=null&&this.__currentShader.__alpha!=null&&(this.__currentShader.__alpha.value=rc.__alphaValue)},applyBitmapData:function(a,b,c){c==
null&&(c=!1);this.__currentShaderBuffer!=null?a!=null&&(rc.__textureSizeValue[0]=a.__textureWidth,rc.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",rc.__textureSizeValue)):this.__currentShader!=null&&(this.__currentShader.__bitmap!=null&&(this.__currentShader.__bitmap.input=a,this.__currentShader.__bitmap.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__bitmap.mipFilter=2,this.__currentShader.__bitmap.wrap=c?2:0),this.__currentShader.__texture!=
null&&(this.__currentShader.__texture.input=a,this.__currentShader.__texture.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__texture.mipFilter=2,this.__currentShader.__texture.wrap=c?2:0),this.__currentShader.__textureSize!=null&&(a!=null?(rc.__textureSizeValue[0]=a.__textureWidth,rc.__textureSizeValue[1]=a.__textureHeight,this.__currentShader.__textureSize.value=rc.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=a!=null&&!a.__isDefault(!0);
this.applyHasColorTransform(b);b?(a.__setArrays(rc.__colorMultipliersValue,rc.__colorOffsetsValue),this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",rc.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",rc.__colorOffsetsValue)):this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.value=rc.__colorMultipliersValue),this.__currentShader.__colorOffset!=
null&&(this.__currentShader.__colorOffset.value=rc.__colorOffsetsValue))):this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",rc.__emptyColorValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",rc.__emptyColorValue)):this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.value=rc.__emptyColorValue),this.__currentShader.__colorOffset!=null&&(this.__currentShader.__colorOffset.value=
rc.__emptyColorValue))},applyHasColorTransform:function(a){rc.__hasColorTransformValue[0]=a;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",rc.__hasColorTransformValue):this.__currentShader!=null&&this.__currentShader.__hasColorTransform!=null&&(this.__currentShader.__hasColorTransform.value=rc.__hasColorTransformValue)},applyMatrix:function(a){this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addFloatOverride("openfl_Matrix",a):this.__currentShader!=
null&&this.__currentShader.__matrix!=null&&(this.__currentShader.__matrix.value=a)},getMatrix:function(a){this.gl!=null?(a=this.__getMatrix(a,1),ib.set(this.__matrix,0,a[0]),ib.set(this.__matrix,1,a[1]),ib.set(this.__matrix,2,a[2]),ib.set(this.__matrix,3,a[3]),ib.set(this.__matrix,4,a[4]),ib.set(this.__matrix,5,a[5]),ib.set(this.__matrix,6,a[6]),ib.set(this.__matrix,7,a[7]),ib.set(this.__matrix,8,a[8]),ib.set(this.__matrix,9,a[9]),ib.set(this.__matrix,10,a[10]),ib.set(this.__matrix,11,a[11]),ib.set(this.__matrix,
12,a[12]),ib.set(this.__matrix,13,a[13]),ib.set(this.__matrix,14,a[14]),ib.set(this.__matrix,15,a[15])):(ib.identity(this.__matrix),ib.set(this.__matrix,0,a.a),ib.set(this.__matrix,1,a.b),ib.set(this.__matrix,4,a.c),ib.set(this.__matrix,5,a.d),ib.set(this.__matrix,12,a.tx),ib.set(this.__matrix,13,a.ty));return this.__matrix},setShader:function(a){this.__currentShaderBuffer=null;this.__currentShader!=a&&(a==null?(this.__currentShader=null,this.__context3D.setProgram(null)):(this.__currentShader=a,
this.__initShader(a),this.__context3D.setProgram(a.program),this.__context3D.__flushGLProgram(),this.__currentShader.__enable(),this.__context3D.__state.shader=a))},setViewport:function(){this.__gl.viewport(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight)},updateShader:function(){this.__currentShader!=null&&(this.__currentShader.__position!=null&&(this.__currentShader.__position.__useArray=!0),this.__currentShader.__textureCoord!=null&&(this.__currentShader.__textureCoord.__useArray=
!0),this.__context3D.setProgram(this.__currentShader.program),this.__context3D.__flushGLProgram(),this.__context3D.__flushGLTextures(),this.__currentShader.__update())},useAlphaArray:function(){this.__currentShader!=null&&this.__currentShader.__alpha!=null&&(this.__currentShader.__alpha.__useArray=!0)},useColorTransformArray:function(){this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.__useArray=!0),this.__currentShader.__colorOffset!=
null&&(this.__currentShader.__colorOffset.__useArray=!0))},__cleanup:function(){this.__stencilReference>0&&(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>0&&(this.__numClipRects=0,this.__scissorRect())},__clear:function(){this.__stage==null||this.__stage.__transparent?this.__context3D.clear(0,0,0,0,0,0,1):this.__context3D.clear(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2],
1,0,0,1);this.__cleared=!0},__clearShader:function(){this.__currentShader!=null&&(this.__currentShaderBuffer==null?this.__currentShader.__bitmap!=null&&(this.__currentShader.__bitmap.input=null):this.__currentShaderBuffer.clearOverride(),this.__currentShader.__texture!=null&&(this.__currentShader.__texture.input=null),this.__currentShader.__textureSize!=null&&(this.__currentShader.__textureSize.value=null),this.__currentShader.__hasColorTransform!=null&&(this.__currentShader.__hasColorTransform.value=
null),this.__currentShader.__position!=null&&(this.__currentShader.__position.value=null),this.__currentShader.__matrix!=null&&(this.__currentShader.__matrix.value=null),this.__currentShader.__clearUseArray())},__copyShader:function(a){this.__currentShader=a.__currentShader;this.__currentShaderBuffer=a.__currentShaderBuffer;this.__currentDisplayShader=a.__currentDisplayShader;this.__currentGraphicsShader=a.__currentGraphicsShader},__getMatrix:function(a,b){var c=S.__pool.get();c.copyFrom(a);c.concat(this.__worldTransform);
if(b==0||b==1&&c.b==0&&c.c==0&&c.a<1.001&&c.a>.999&&c.d<1.001&&c.d>.999)c.tx=Math.round(c.tx),c.ty=Math.round(c.ty);ib.identity(this.__matrix);ib.set(this.__matrix,0,c.a);ib.set(this.__matrix,1,c.b);ib.set(this.__matrix,4,c.c);ib.set(this.__matrix,5,c.d);ib.set(this.__matrix,12,c.tx);ib.set(this.__matrix,13,c.ty);ib.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);this.__values[0]=ib.get(this.__matrix,0);this.__values[1]=ib.get(this.__matrix,1);this.__values[2]=ib.get(this.__matrix,
2);this.__values[3]=ib.get(this.__matrix,3);this.__values[4]=ib.get(this.__matrix,4);this.__values[5]=ib.get(this.__matrix,5);this.__values[6]=ib.get(this.__matrix,6);this.__values[7]=ib.get(this.__matrix,7);this.__values[8]=ib.get(this.__matrix,8);this.__values[9]=ib.get(this.__matrix,9);this.__values[10]=ib.get(this.__matrix,10);this.__values[11]=ib.get(this.__matrix,11);this.__values[12]=ib.get(this.__matrix,12);this.__values[13]=ib.get(this.__matrix,13);this.__values[14]=ib.get(this.__matrix,
14);this.__values[15]=ib.get(this.__matrix,15);S.__pool.release(c);return this.__values},__initShader:function(a){return a!=null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultShader},__initDisplayShader:function(a){return a!=null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultDisplayShader},__initGraphicsShader:function(a){return a!=null?(a.__context==null&&(a.__context=this.__context3D,a.__init()),a):this.__defaultGraphicsShader},__initShaderBuffer:function(a){return a!=
null?this.__initGraphicsShader(a.shader):this.__defaultGraphicsShader},__popMask:function(){if(this.__stencilReference!=0){var a=this.__maskObjects.pop();this.__stencilReference>1?(this.__context3D.setStencilActions(2,1,0,0,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255),this.__context3D.setColorMask(!1,!1,!1,!1),this.__renderDrawableMask(a),this.__stencilReference--,this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,
255,0),this.__context3D.setColorMask(!0,!0,!0,!0)):(this.__stencilReference=0,this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0))}},__popMaskObject:function(a,b){b==null&&(b=!0);a.__mask!=null&&this.__popMask();b&&a.__scrollRect!=null&&(a.__renderTransform.b!=0||a.__renderTransform.c!=0?(this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-1]),this.__popMask()):this.__popMaskRect())},__popMaskRect:function(){this.__numClipRects>0&&(this.__numClipRects--,
this.__numClipRects>0?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect())},__pushMask:function(a){this.__stencilReference==0&&(this.__context3D.clear(0,0,0,0,0,0,4),this.__updatedStencil=!0);this.__context3D.setStencilActions(2,1,2,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.__context3D.setColorMask(!1,!1,!1,!1);this.__renderDrawableMask(a);this.__maskObjects.push(a);this.__stencilReference++;this.__context3D.setStencilActions(2,
1,5,5,5);this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.__context3D.setColorMask(!0,!0,!0,!0)},__pushMaskObject:function(a,b){b==null&&(b=!0);b&&a.__scrollRect!=null&&(a.__renderTransform.b!=0||a.__renderTransform.c!=0?(b=this.__scrollRectMasks.get(),b.get_graphics().clear(),b.get_graphics().beginFill(65280),b.get_graphics().drawRect(a.__scrollRect.x,a.__scrollRect.y,a.__scrollRect.width,a.__scrollRect.height),b.__renderTransform.copyFrom(a.__renderTransform),this.__pushMask(b)):
this.__pushMaskRect(a.__scrollRect,a.__renderTransform));a.__mask!=null&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new Ea);var c=S.__pool.get();c.copyFrom(b);c.concat(this.__worldTransform);b=this.__clipRects[this.__numClipRects];a.__transform(b,c);this.__numClipRects>0&&(a=this.__clipRects[this.__numClipRects-1],b.__contract(a.x,a.y,a.width,a.height));b.height<0&&(b.height=0);b.width<0&&(b.width=0);
S.__pool.release(c);this.__scissorRect(b);this.__numClipRects++},__render:function(a){this.__context3D.setColorMask(!0,!0,!0,!0);this.__context3D.setCulling(3);this.__context3D.setDepthTest(!1,0);this.__context3D.setStencilActions();this.__context3D.setStencilReferenceValue(0,0,0);this.__context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);if(this.__defaultRenderTarget==null){if(this.__context3D.__backBufferWantsBestResolution?rc.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):rc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight),this.__context3D.setScissorRectangle(rc.__scissorRectangle),this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1,this.__renderDrawable(a),this.__offsetX>0||this.__offsetY>0)this.__offsetX>0&&(rc.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),
this.__context3D.setScissorRectangle(rc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),rc.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.__context3D.setScissorRectangle(rc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.__offsetY>0&&(rc.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.__context3D.setScissorRectangle(rc.__scissorRectangle),
this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),rc.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height),this.__context3D.setScissorRectangle(rc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.__context3D.setScissorRectangle(null)}else{this.__context3D.__backBufferWantsBestResolution?rc.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):rc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(rc.__scissorRectangle);var b=a.__mask,c=a.__scrollRect;a.__mask=null;a.__scrollRect=null;this.__renderDrawable(a);a.__mask=b;a.__scrollRect=c}this.__context3D.present()},__renderDrawable:function(a){if(a!=null)switch(a.__drawableType){case 0:Hs.renderDrawable(a,
this);break;case 2:Hi.renderDrawable(a,this);break;case 3:Sk.renderDrawable(a,this);break;case 4:case 5:Is.renderDrawable(a,this);break;case 6:Js.renderDrawable(a,this);break;case 7:Tk.renderDrawable(a,this);break;case 8:Ii.renderDrawable(a,this);break;case 9:Fa.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:Hs.renderDrawableMask(a,this);break;case 2:Hi.renderDrawableMask(a,this);break;case 3:Sk.renderDrawableMask(a,this);break;case 4:case 5:Is.renderDrawableMask(a,
this);break;case 6:Js.renderDrawableMask(a,this);break;case 7:Tk.renderDrawableMask(a,this);break;case 8:Ii.renderDrawableMask(a,this);break;case 9:Fa.renderDrawableMask(a,this)}},__renderFilterPass:function(a,b,c,d){d==null&&(d=!0);if(a!=null&&b!=null&&this.__defaultRenderTarget!=null){var f=this.__context3D.__state.renderToTexture,g=this.__context3D.__state.renderToTextureDepthStencil,h=this.__context3D.__state.renderToTextureAntiAlias,l=this.__context3D.__state.renderToTextureSurfaceSelector;this.__context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.__context3D),
!1);d&&this.__context3D.clear(0,0,0,0,0,0,1);b=this.__initShader(b);this.setShader(b);this.applyAlpha(1);this.applyBitmapData(a,c);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(a.__renderTransform,1));this.updateShader();c=a.getVertexBuffer(this.__context3D);b.__position!=null&&this.__context3D.setVertexBufferAt(b.__position.index,c,0,3);b.__textureCoord!=null&&this.__context3D.setVertexBufferAt(b.__textureCoord.index,c,3,2);a=a.getIndexBuffer(this.__context3D);this.__context3D.drawTriangles(a);
f!=null?this.__context3D.setRenderToTexture(f,g,h,l):this.__context3D.setRenderToBackBuffer();this.__clearShader()}},__resize:function(a,b){this.__width=a;this.__height=b;a=this.__defaultRenderTarget==null?this.__stage.stageWidth:this.__defaultRenderTarget.width;b=this.__defaultRenderTarget==null?this.__stage.stageHeight:this.__defaultRenderTarget.height;if(this.__defaultRenderTarget==null){var c=this.__worldTransform;c=Math.round(0*c.a+0*c.c+c.tx)}else c=0;this.__offsetX=c;this.__defaultRenderTarget==
null?(c=this.__worldTransform,c=Math.round(0*c.b+0*c.d+c.ty)):c=0;this.__offsetY=c;this.__defaultRenderTarget==null?(c=this.__worldTransform,c=Math.round(a*c.a+0*c.c+c.tx-this.__offsetX)):c=a;this.__displayWidth=c;this.__defaultRenderTarget==null?(c=this.__worldTransform,c=Math.round(0*c.b+b*c.d+c.ty-this.__offsetY)):c=b;this.__displayHeight=c;ib.createOrtho(this.__projection,0,this.__displayWidth+this.__offsetX*2,0,this.__displayHeight+this.__offsetY*2,-1E3,1E3);ib.createOrtho(this.__projectionFlipped,
0,this.__displayWidth+this.__offsetX*2,this.__displayHeight+this.__offsetY*2,0,-1E3,1E3)},__resumeClipAndMask:function(a){this.__stencilReference>0?(this.__context3D.setStencilActions(2,1,5,5,5),this.__context3D.setStencilReferenceValue(this.__stencilReference,255,0)):(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>0?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect()},__scissorRect:function(a){if(a!=null){var b=
Math.floor(a.x),c=Math.floor(a.y),d=a.width>0?Math.ceil(a.get_right())-b:0,f=a.height>0?Math.ceil(a.get_bottom())-c:0;this.__context3D.__backBufferWantsBestResolution&&(f=1.5/this.__pixelRatio,b=a.x/this.__pixelRatio,c=a.y/this.__pixelRatio,d=a.width>0?a.get_right()/this.__pixelRatio-b+f:0,f=a.height>0?a.get_bottom()/this.__pixelRatio-c+f:0);d<0&&(d=0);f<0&&(f=0);rc.__scissorRectangle.setTo(b,c,d,f);this.__context3D.setScissorRectangle(rc.__scissorRectangle)}else this.__context3D.setScissorRectangle(null)},
__setBlendMode:function(a){this.__overrideBlendMode!=null&&(a=this.__overrideBlendMode);if(this.__blendMode!=a)switch(this.__blendMode=a,a){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(a){this.__defaultRenderTarget=
a;this.__flipped=a==null;a!=null&&this.__resize(a.width,a.height)},__setShaderBuffer:function(a){this.setShader(a.shader);this.__currentShaderBuffer=a},__suspendClipAndMask:function(){this.__stencilReference>0&&(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));this.__numClipRects>0&&this.__scissorRect()},__updateShaderBuffer:function(a){this.__currentShader!=null&&this.__currentShaderBuffer!=null&&this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,
a)},__class__:rc});var uv=function(a){a==null&&(a=!1);this.fastCompression=a};r["openfl.display.PNGEncoderOptions"]=uv;uv.__name__="openfl.display.PNGEncoderOptions";uv.prototype={fastCompression:null,__class__:uv};var cq=function(a){this.onComplete=new Se;this.display=a;a!=null&&(a.addEventListener("unload",m(this,this.display_onUnload)),Oa.get_current().addChild(a))};r["openfl.display.Preloader"]=cq;cq.__name__="openfl.display.Preloader";cq.prototype={onComplete:null,complete:null,display:null,
ready:null,start:function(){this.ready=!0;Oa.get_current().get_loaderInfo().__complete();if(this.display!=null){var a=new ka("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new ka("unload"))}else this.complete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){Oa.get_current().get_loaderInfo().__update(a,b);this.display!=null&&this.display.dispatchEvent(new kh("progress",!0,!0,a,b))},display_onUnload:function(a){this.display!=null&&
(this.display.removeEventListener("unload",m(this,this.display_onUnload)),this.display.parent==Oa.get_current()&&Oa.get_current().removeChild(this.display),Oa.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,this.onComplete.dispatch())},__class__:cq};var Ks=function(){za.call(this);var a=this.getBackgroundColor(),b=0;.299*(a>>16&255)+.587*(a>>8&255)+.114*(a&255)<70&&(b=16777215);a=this.getHeight()/2-3.5;var c=this.getWidth()-60;this.outline=new zd;
this.outline.get_graphics().beginFill(b,.07);this.outline.get_graphics().drawRect(0,0,c,7);this.outline.set_x(30);this.outline.set_y(a);this.outline.set_alpha(0);this.addChild(this.outline);this.progress=new zd;this.progress.get_graphics().beginFill(b,.35);this.progress.get_graphics().drawRect(0,0,c-4,3);this.progress.set_x(32);this.progress.set_y(a+2);this.progress.set_scaleX(0);this.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=Oa.getTimer()+100;this.endAnimation=this.startAnimation+
1E3;this.addEventListener("addedToStage",m(this,this.this_onAddedToStage))};r["openfl.display.DefaultPreloader"]=Ks;Ks.__name__="openfl.display.DefaultPreloader";Ks.__super__=za;Ks.prototype=I(za.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var a=Oa.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&a.background!=null?a.background:0},getHeight:function(){var a=Oa.get_current().stage.window.__height;
return a>0?a:Oa.get_current().stage.stageHeight},getWidth:function(){var a=Oa.get_current().stage.window.__width;return a>0?a:Oa.get_current().stage.stageWidth},onInit:function(){this.addEventListener("enterFrame",m(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",m(this,this.this_onEnterFrame));this.dispatchEvent(new ka("unload"))},onUpdate:function(a,b){var c=0;b>0&&(c=a/b,c>1&&(c=1));this.progress.set_scaleX(c)},this_onAddedToStage:function(a){this.removeEventListener("addedToStage",
m(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",m(this,this.this_onProgress));this.addEventListener("complete",m(this,this.this_onComplete))},this_onComplete:function(a){a.preventDefault();this.removeEventListener("progress",m(this,this.this_onProgress));this.removeEventListener("complete",m(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(a){a=(Oa.getTimer()-this.startAnimation)/
(this.endAnimation-this.startAnimation);a<0&&(a=0);a>1&&(a=1);this.outline.set_alpha(this.progress.set_alpha(a))},this_onProgress:function(a){this.onUpdate(a.bytesLoaded|0,a.bytesTotal|0)},__class__:Ks});var Av=function(a,b,c){this.name=a;this.labels=b;this.numFrames=c};r["openfl.display.Scene"]=Av;Av.__name__="openfl.display.Scene";Av.prototype={labels:null,name:null,numFrames:null,__class__:Av};var ax={_new:function(a){return{}}},Bq=function(){this.channels=0;this.filter=5;this.index=this.height=
0;this.mipFilter=2;this.wrap=this.width=0};r["openfl.display.ShaderInput"]=Bq;Bq.__name__="openfl.display.ShaderInput";Bq.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,width:null,wrap:null,__isUniform:null,__disableGL:function(a,b){b<0||a.setTextureAt(b,null)},__updateGL:function(a,b,c,d,f,g){c=c!=null?c:this.input;d=d!=null?d:this.filter;f=f!=null?f:this.mipFilter;g=g!=null?g:this.wrap;c!=null?(a.setTextureAt(b,c.getTexture(a)),a.setSamplerStateAt(b,
g,d,f)):a.setTextureAt(b,null)},__class__:Bq};var Xm=function(){this.index=0};r["openfl.display.ShaderParameter"]=Xm;Xm.__name__="openfl.display.ShaderParameter";Xm.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(a){if(!(this.index<0||(a=a.gl,this.__isUniform)))for(var b=0,c=this.__arrayLength;b<c;){var d=b++;a.disableVertexAttribArray(this.index+
d)}},__updateGL:function(a,b){if(!(this.index<0)){a=a.gl;b=b!=null?b:this.value;var c=this.__isBool?b:null,d=this.__isFloat?b:null,f=this.__isInt?b:null;if(this.__isUniform)if(b!=null&&b.length>=this.__length)switch(this.type){case 0:a.uniform1i(this.index,c[0]?1:0);break;case 1:a.uniform2i(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.uniform3i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.uniform4i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.uniform1f(this.index,d[0]);
break;case 5:a.uniform2f(this.index,d[0],d[1]);break;case 6:a.uniform3f(this.index,d[0],d[1],d[2]);break;case 7:a.uniform4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.uniform1i(this.index,f[0]);break;case 9:a.uniform2i(this.index,f[0],f[1]);break;case 10:a.uniform3i(this.index,f[0],f[1],f[2]);break;case 11:a.uniform4i(this.index,f[0],f[1],f[2],f[3]);break;case 12:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];pd.uniformMatrix2fv(a,
this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];this.__uniformMatrix[4]=d[4];this.__uniformMatrix[5]=d[5];this.__uniformMatrix[6]=d[6];this.__uniformMatrix[7]=d[7];this.__uniformMatrix[8]=d[8];pd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=d[0],this.__uniformMatrix[1]=d[1],this.__uniformMatrix[2]=d[2],this.__uniformMatrix[3]=d[3],this.__uniformMatrix[4]=
d[4],this.__uniformMatrix[5]=d[5],this.__uniformMatrix[6]=d[6],this.__uniformMatrix[7]=d[7],this.__uniformMatrix[8]=d[8],this.__uniformMatrix[9]=d[9],this.__uniformMatrix[10]=d[10],this.__uniformMatrix[11]=d[11],this.__uniformMatrix[12]=d[12],this.__uniformMatrix[13]=d[13],this.__uniformMatrix[14]=d[14],this.__uniformMatrix[15]=d[15],pd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else switch(this.type){case 4:a.uniform1f(this.index,0);break;case 5:a.uniform2f(this.index,0,0);break;case 6:a.uniform3f(this.index,
0,0,0);break;case 7:a.uniform4f(this.index,0,0,0,0);break;case 0:case 8:a.uniform1i(this.index,0);break;case 1:case 9:a.uniform2i(this.index,0,0);break;case 2:case 10:a.uniform3i(this.index,0,0,0);break;case 3:case 11:a.uniform4i(this.index,0,0,0,0);break;case 12:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;pd.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=
0;this.__uniformMatrix[3]=0;this.__uniformMatrix[4]=0;this.__uniformMatrix[5]=0;this.__uniformMatrix[6]=0;this.__uniformMatrix[7]=0;this.__uniformMatrix[8]=0;pd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=0,this.__uniformMatrix[1]=0,this.__uniformMatrix[2]=0,this.__uniformMatrix[3]=0,this.__uniformMatrix[4]=0,this.__uniformMatrix[5]=0,this.__uniformMatrix[6]=0,this.__uniformMatrix[7]=0,this.__uniformMatrix[8]=0,this.__uniformMatrix[9]=0,this.__uniformMatrix[10]=
0,this.__uniformMatrix[11]=0,this.__uniformMatrix[12]=0,this.__uniformMatrix[13]=0,this.__uniformMatrix[14]=0,this.__uniformMatrix[15]=0,pd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else if(this.__useArray||b!=null&&b.length!=this.__length)for(g=0,h=this.__arrayLength;g<h;)l=g++,a.enableVertexAttribArray(this.index+l);else{for(var g=0,h=this.__arrayLength;g<h;){var l=g++;a.disableVertexAttribArray(this.index+l)}if(b!=null)switch(this.type){case 0:a.vertexAttrib1f(this.index,c[0]?1:0);
break;case 1:a.vertexAttrib2f(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.vertexAttrib3f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.vertexAttrib4f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.vertexAttrib1f(this.index,d[0]);break;case 5:a.vertexAttrib2f(this.index,d[0],d[1]);break;case 6:a.vertexAttrib3f(this.index,d[0],d[1],d[2]);break;case 7:a.vertexAttrib4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.vertexAttrib1f(this.index,f[0]);break;case 9:a.vertexAttrib2f(this.index,
f[0],f[1]);break;case 10:a.vertexAttrib3f(this.index,f[0],f[1],f[2]);break;case 11:a.vertexAttrib4f(this.index,f[0],f[1],f[2],f[3]);break;case 12:a.vertexAttrib2f(this.index+0,d[0],d[1]);a.vertexAttrib2f(this.index+1,d[2],d[3]);break;case 16:a.vertexAttrib3f(this.index+0,d[0],d[1],d[2]);a.vertexAttrib3f(this.index+1,d[3],d[4],d[5]);a.vertexAttrib3f(this.index+2,d[6],d[7],d[8]);break;case 20:a.vertexAttrib4f(this.index+0,d[0],d[1],d[2],d[3]),a.vertexAttrib4f(this.index+1,d[4],d[5],d[6],d[7]),a.vertexAttrib4f(this.index+
2,d[8],d[9],d[10],d[11]),a.vertexAttrib4f(this.index+3,d[12],d[13],d[14],d[15])}else switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+
1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}}},__updateGLFromBuffer:function(a,b,c,d,f){if(!(this.index<0))if(a=a.gl,this.__isUniform){if(d>=this.__length)switch(this.type){case 4:a.uniform1f(this.index,b[c]);break;case 5:a.uniform2f(this.index,b[c],b[c+1]);break;case 6:a.uniform3f(this.index,b[c],b[c+1],b[c+2]);break;case 7:a.uniform4f(this.index,
b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 8:a.uniform1i(this.index,b[c]|0);break;case 1:case 9:a.uniform2i(this.index,b[c]|0,b[c+1]|0);break;case 2:case 10:a.uniform3i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0);break;case 3:case 11:a.uniform4i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0,b[c+3]|0);break;case 12:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];pd.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=
b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];this.__uniformMatrix[4]=b[c+4];this.__uniformMatrix[5]=b[c+5];this.__uniformMatrix[6]=b[c+6];this.__uniformMatrix[7]=b[c+7];this.__uniformMatrix[8]=b[c+8];pd.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=b[c],this.__uniformMatrix[1]=b[c+1],this.__uniformMatrix[2]=b[c+2],this.__uniformMatrix[3]=b[c+3],this.__uniformMatrix[4]=b[c+4],this.__uniformMatrix[5]=
b[c+5],this.__uniformMatrix[6]=b[c+6],this.__uniformMatrix[7]=b[c+7],this.__uniformMatrix[8]=b[c+8],this.__uniformMatrix[9]=b[c+9],this.__uniformMatrix[10]=b[c+10],this.__uniformMatrix[11]=b[c+11],this.__uniformMatrix[12]=b[c+12],this.__uniformMatrix[13]=b[c+13],this.__uniformMatrix[14]=b[c+14],this.__uniformMatrix[15]=b[c+15],pd.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}}else if(this.__internal||d!=0&&d!=this.__length){b=a.FLOAT;this.__isBool?b=a.INT:this.__isInt&&(b=a.INT);g=0;for(h=
this.__arrayLength;g<h;)l=g++,a.enableVertexAttribArray(this.index+l);if(d>0)for(g=0,h=this.__arrayLength;g<h;)l=g++,a.vertexAttribPointer(this.index+l,this.__length,b,!1,this.__length*4,(c+f*this.__length+l*this.__arrayLength)*4)}else{for(var g=0,h=this.__arrayLength;g<h;){var l=g++;a.disableVertexAttribArray(this.index+l)}if(d>0)switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,b[c]);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,b[c],b[c+1]);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,
b[c],b[c+1],b[c+2]);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 12:a.vertexAttrib2f(this.index+0,b[c],b[c+1]);a.vertexAttrib2f(this.index+1,b[c+2],b[c+2+1]);break;case 16:a.vertexAttrib3f(this.index+0,b[c],b[c+1],b[c+2]);a.vertexAttrib3f(this.index+1,b[c+3],b[c+3+1],b[c+3+2]);a.vertexAttrib3f(this.index+2,b[c+6],b[c+6+1],b[c+6+2]);break;case 20:a.vertexAttrib4f(this.index+0,b[c],b[c+1],b[c+2],b[c+3]),a.vertexAttrib4f(this.index+1,b[c+4],b[c+4+1],b[c+
4+2],b[c+4+3]),a.vertexAttrib4f(this.index+2,b[c+8],b[c+8+1],b[c+8+2],b[c+8+3]),a.vertexAttrib4f(this.index+3,b[c+12],b[c+12+1],b[c+12+2],b[c+12+3])}else switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;
case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}},set_name:function(a){this.__internal=Z.startsWith(a,"openfl_");return this.name=a},__class__:Xm,__properties__:{set_name:"set_name"}};var zd=function(){ea.call(this);this.__drawableType=3};r["openfl.display.Shape"]=
zd;zd.__name__="openfl.display.Shape";zd.__super__=ea;zd.prototype=I(ea.prototype,{get_graphics:function(){this.__graphics==null&&(this.__graphics=new Dh(this));return this.__graphics},__class__:zd,__properties__:I(ea.prototype.__properties__,{get_graphics:"get_graphics"})});var Ln=function(a,b,c,d){Da.call(this);this.__drawableType=6;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=a!=null?a:new ea;this.__overState=b;this.__downState=c;this.set_hitTestState(d!=null?d:new ea);
this.addEventListener("mouseDown",m(this,this.__this_onMouseDown));this.addEventListener("mouseOut",m(this,this.__this_onMouseOut));this.addEventListener("mouseOver",m(this,this.__this_onMouseOver));this.addEventListener("mouseUp",m(this,this.__this_onMouseUp));this.__tabEnabled=!0;this.set___currentState(this.__upState);Ln.__constructor!=null&&(a=Ln.__constructor,Ln.__constructor=null,a(this))};r["openfl.display.SimpleButton"]=Ln;Ln.__name__="openfl.display.SimpleButton";Ln.__super__=Da;Ln.prototype=
I(Da.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,__overState:null,__previousStates:null,__soundTransform:null,__upState:null,__getBounds:function(a,b){Da.prototype.__getBounds.call(this,a,b);var c=S.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getBounds(a,
c);S.__pool.release(c)},__getRenderBounds:function(a,b){if(this.__scrollRect!=null)Da.prototype.__getRenderBounds.call(this,a,b);else if(Da.prototype.__getBounds.call(this,a,b),this.__currentState!=null){var c=S.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getRenderBounds(a,c);S.__pool.release(c)}},__getCursor:function(){return this.useHandCursor&&
!this.__ignoreEvent&&this.enabled?"button":null},__hitTest:function(a,b,c,d,f,g){var h=!1;this.get_hitTestState()!=null?this.get_hitTestState().__hitTest(a,b,c,d,f,g)&&(d!=null&&(d.length==0?d[0]=g:d[d.length-1]=g),h=!f||this.mouseEnabled):this.__currentState!=null&&(!g.get_visible()||this.__isMask||f&&!this.mouseEnabled||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b)?h=!1:this.__currentState.__hitTest(a,b,c,d,f,g)&&(h=f));if(d!=null)for(;d.length>1&&d[d.length-1]==d[d.length-2];)d.pop();
return h},__hitTestMask:function(a,b){var c=!1;this.__currentState.__hitTestMask(a,b)&&(c=!0);return c},__setStageReference:function(a){Da.prototype.__setStageReference.call(this,a);this.__currentState!=null&&this.__currentState.__setStageReference(a);this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setStageReference(a)},__setTransformDirty:function(){Da.prototype.__setTransformDirty.call(this);this.__currentState!=null&&this.__currentState.__setTransformDirty();
this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setTransformDirty()},__update:function(a,b){Da.prototype.__update.call(this,a,b);b&&(this.__currentState!=null&&this.__currentState.__update(a,!0),this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__update(a,!0))},__updateTransforms:function(a){Da.prototype.__updateTransforms.call(this,a);this.__currentState!=null&&this.__currentState.__updateTransforms();
this.get_hitTestState()!=null&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__updateTransforms()},get_downState:function(){return this.__downState},set_downState:function(a){this.__downState!=null&&this.__currentState==this.__downState&&this.set___currentState(a);return this.__downState=a},get_hitTestState:function(){return this.__hitTestState},set_hitTestState:function(a){this.__hitTestState!=null&&this.__hitTestState!=a&&this.__hitTestState!=this.get_downState()&&this.__hitTestState!=
this.get_upState()&&this.__hitTestState!=this.get_overState()&&(this.__hitTestState.__renderParent=null);a!=null&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__hitTestState=a},get_overState:function(){return this.__overState},set_overState:function(a){this.__overState!=null&&this.__currentState==this.__overState&&this.set___currentState(a);return this.__overState=a},get_soundTransform:function(){this.__soundTransform==null&&(this.__soundTransform=
new ci);return new ci(this.__soundTransform.volume,this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new ci(a.volume,a.pan);return a},get_upState:function(){return this.__upState},set_upState:function(a){this.__upState!=null&&this.__currentState==this.__upState&&this.set___currentState(a);return this.__upState=a},set___currentState:function(a){this.__currentState!=null&&this.__currentState!=this.get_hitTestState()&&(this.__currentState.__renderParent=null);a!=null&&
a.parent!=null&&a.parent.removeChild(a);ea.__supportDOM&&this.__previousStates==null&&(this.__previousStates=gb.toObjectVector(null));if(a!=this.__currentState){if(ea.__supportDOM){this.__currentState!=null&&(this.__currentState.__setStageReference(null),this.__previousStates.push(this.__currentState));var b=this.__previousStates.indexOf(a,0);if(b>-1){var c=this.__previousStates;c.__tempIndex=b;b=0;for(var d=[];b<d.length;){var f=d[b++];c.insertAt(c.__tempIndex,f);c.__tempIndex++}c.splice(c.__tempIndex,
1)}}a!=null&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}return this.__currentState=a},__this_onMouseDown:function(a){this.enabled&&this.set___currentState(this.get_downState())},__this_onMouseOut:function(a){this.__ignoreEvent=!1;this.get_upState()!=this.__currentState&&this.set___currentState(this.get_upState())},__this_onMouseOver:function(a){a.buttonDown&&(this.__ignoreEvent=
!0);this.get_overState()!=this.__currentState&&this.get_overState()!=null&&!this.__ignoreEvent&&this.enabled&&this.set___currentState(this.get_overState())},__this_onMouseUp:function(a){this.__ignoreEvent=!1;this.enabled&&this.get_overState()!=null?this.set___currentState(this.get_overState()):this.set___currentState(this.get_upState())},__class__:Ln,__properties__:I(Da.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",set_soundTransform:"set_soundTransform",
get_soundTransform:"get_soundTransform",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 cd=function(a,b){this.__oldStageOrientation=3;lb.call(this);this.__drawableType=5;this.set_name(null);this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__deltaTime=this.__currentTabOrderIndex=0;this.__displayState=
2;this.__logicalHeight=this.__logicalWidth=this.__lastClickTime=this.__untransformedMouseY=this.__untransformedMouseX=this.__mouseY=this.__mouseX=0;this.__displayMatrix=new S;this.__displayRect=new Ea;this.__renderDirty=!0;this.stage3Ds=gb.toObjectVector(null);this.stage3Ds.push(new vm(this));this.stage3Ds.push(new vm(this));this.stage3Ds.push(new vm(this));this.stage3Ds.push(new vm(this));this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=
2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new Ea;this.stageFocusRect=!0;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=!0;this.__forceRender=!1;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new we;Oa.get_current().__loaderInfo==null&&(Oa.get_current().__loaderInfo=Ej.create(null),Oa.get_current().__loaderInfo.content=Oa.get_current());this.__uncaughtErrorEvents=
Oa.get_current().__loaderInfo.uncaughtErrorEvents;this.application=a.application;this.window=a;this.set_color(b);this.__contentsScaleFactor=a.__scale;this.__wasFullscreen=a.__fullscreen;this.__resize();Oa.get_current().stage==null&&this.stage.addChild(Oa.get_current())};r["openfl.display.Stage"]=cd;cd.__name__="openfl.display.Stage";cd.__interfaces__=[ma];cd.__properties__={get_supportsOrientationChange:"get_supportsOrientationChange"};cd.get_supportsOrientationChange=function(){return!1};cd.__super__=
lb;cd.prototype=I(lb.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,__dirty:null,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,
__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullscreen:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime:null,__lastClickTarget:null,__logicalWidth:null,__logicalHeight:null,__macKeyboard:null,__mouseDownLeft:null,__mouseDownMiddle:null,__mouseDownRight:null,__mouseOutStack:null,__mouseOverTarget:null,__mouseX:null,__mouseY:null,__untransformedMouseX:null,__untransformedMouseY:null,__pendingMouseEvent:null,__pendingMouseX:null,__pendingMouseY:null,
__quality:null,__renderer:null,__rendering:null,__rollOutStack:null,__scaleMode:null,__stack:null,__touchData:null,__transparent:null,__uncaughtErrorEvents:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,__oldStageOrientation:null,invalidate:function(){this.__renderDirty=this.__invalidated=!0},localToGlobal:function(a){return a.clone()},setOrientation:function(a){},__broadcastEvent:function(a){if(Object.prototype.hasOwnProperty.call(ea.__broadcastEvents.h,a.type))for(var b=ea.__broadcastEvents.h[a.type],
c=0;c<b.length;){var d=b[c];++c;if(d.stage==this||d.stage==null)if(this.__uncaughtErrorEvents.__enabled)try{d.__dispatch(a)}catch(f){Rb.lastError=f,d=la.caught(f).unwrap(),this.__handleError(d)}else d.__dispatch(a)}},__createRenderer:function(){var a=this.window.__width*this.window.__scale|0,b=this.window.__height*this.window.__scale|0;switch(this.window.context.type){case "canvas":this.__renderer=new Qk(this.window.context.canvas2D);break;case "dom":this.__renderer=new Bp(this.window.context.dom);
break;case "opengl":case "opengles":case "webgl":this.context3D=new Uc(this),this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0),this.context3D.present(),this.__renderer=new rc(this.context3D)}if(this.__renderer!=null){var c=this.get_quality();this.__renderer.__allowSmoothing=c!=2;this.__renderer.__pixelRatio=this.window.__scale;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(a,b)}},__dispatchEvent:function(a){if(this.__uncaughtErrorEvents.__enabled)try{var b=
lb.prototype.__dispatchEvent.call(this,a)}catch(c){Rb.lastError=c,a=la.caught(c).unwrap(),this.__handleError(a),b=!1}else b=lb.prototype.__dispatchEvent.call(this,a);return b},__dispatchPendingMouseEvent:function(){if(this.__pendingMouseEvent)this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0),this.__pendingMouseEvent=!1;else if(this.__mouseOverTarget!=null)if(!this.__mouseOverTarget.__transformDirty&&this.__mouseOverTarget.stage!=null&&this.__mouseOverTarget.get_visible()&&this.__mouseOverTarget.mouseEnabled)for(var a=
this.__mouseOverTarget.parent;a!=null;){if(a.__transformDirty||a.stage==null||!a.get_visible()||!a.mouseChildren){this.__onMouse(null,this.__untransformedMouseX,this.__untransformedMouseY,0);break}a=a.parent}else this.__onMouse(null,this.__untransformedMouseX,this.__untransformedMouseY,0)},__dispatchStack:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{var c=b.length;if(c==0){a.eventPhase=2;var d=a.target;d.__dispatch(a)}else{a.eventPhase=1;a.target=b[b.length-1];for(var f=0,g=c-1;f<g;){var h=
f++;b[h].__dispatch(a);if(a.__isCanceled)return}a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,h=c-2;h>=0;){b[h].__dispatch(a);if(a.__isCanceled)break;--h}}}catch(l){Rb.lastError=l,a=la.caught(l).unwrap(),this.__handleError(a)}else if(c=b.length,c==0)a.eventPhase=2,d=a.target,d.__dispatch(a);else{a.eventPhase=1;a.target=b[b.length-1];f=0;for(g=c-1;f<g;)if(h=f++,b[h].__dispatch(a),a.__isCanceled)return;a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&
a.bubbles)for(a.eventPhase=3,h=c-2;h>=0;){b[h].__dispatch(a);if(a.__isCanceled)break;--h}}},__dispatchTarget:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{return a.__dispatchEvent(b)}catch(c){return Rb.lastError=c,a=la.caught(c).unwrap(),this.__handleError(a),!1}else return a.__dispatchEvent(b)},__drag:function(a){var b=this.__dragObject.parent;if(b!=null){b=b.__getWorldTransform();var c=b.a*b.d-b.b*b.c;if(c==0)a.x=-b.tx,a.y=-b.ty;else{var d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx));a.y=1/c*
(b.a*(a.y-b.ty)+b.b*(b.tx-a.x));a.x=d}}b=a.x+this.__dragOffsetX;a=a.y+this.__dragOffsetY;this.__dragBounds!=null&&(b<this.__dragBounds.x?b=this.__dragBounds.x:b>this.__dragBounds.get_right()&&(b=this.__dragBounds.get_right()),a<this.__dragBounds.y?a=this.__dragBounds.y:a>this.__dragBounds.get_bottom()&&(a=this.__dragBounds.get_bottom()));this.__dragObject.set_x(b);this.__dragObject.set_y(a)},__getInteractive:function(a){a!=null&&a.push(this);return!0},__globalToLocal:function(a,b){a!=b&&b.copyFrom(a);
return b},__handleError:function(a){var b=new dl("uncaughtError",!0,!0,a);Oa.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b);if(!b.__preventDefault){b=si.toString(si.exceptionStack());console.log(b);b=L.string(a);console.log(b);try{if(a!=null&&Object.prototype.hasOwnProperty.call(a,"stack")&&a.stack!=null&&a.stack!="")console.log(a.stack),a.stack=a.stack;else{var c=si.toString(si.callStack());console.log(c)}}catch(d){Rb.lastError=d}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();
Bc.__altKey=tc.get_altKey(c);Bc.__commandKey=tc.get_metaKey(c);Bc.__controlKey=tc.get_ctrlKey(c);Bc.__ctrlKey=this.__macKeyboard?tc.get_ctrlKey(c)||tc.get_metaKey(c):tc.get_ctrlKey(c);Bc.__shiftKey=tc.get_shiftKey(c);var d=[];this.__focus==null?this.__getInteractive(d):this.__focus.__getInteractive(d);if(d.length>0){switch(b){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:var f=
3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:f=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:f=2;break;default:f=0}switch(b){case 8:b=8;break;case 9:b=9;break;case 13:b=13;break;case 27:b=27;break;case 32:b=32;break;case 33:b=49;break;case 34:b=222;break;case 35:b=51;break;case 36:b=52;break;case 37:b=53;break;case 38:b=55;break;case 39:b=222;break;case 40:b=57;break;case 41:b=48;break;case 42:b=56;break;case 44:b=188;break;case 45:b=189;break;
case 46:b=190;break;case 47:b=191;break;case 48:b=48;break;case 49:b=49;break;case 50:b=50;break;case 51:b=51;break;case 52:b=52;break;case 53:b=53;break;case 54:b=54;break;case 55:b=55;break;case 56:b=56;break;case 57:b=57;break;case 58:b=186;break;case 59:b=186;break;case 60:b=60;break;case 61:b=187;break;case 62:b=190;break;case 63:b=191;break;case 64:b=50;break;case 91:b=219;break;case 92:b=220;break;case 93:b=221;break;case 94:b=54;break;case 95:b=189;break;case 96:b=192;break;case 97:b=65;break;
case 98:b=66;break;case 99:b=67;break;case 100:b=68;break;case 101:b=69;break;case 102:b=70;break;case 103:b=71;break;case 104:b=72;break;case 105:b=73;break;case 106:b=74;break;case 107:b=75;break;case 108:b=76;break;case 109:b=77;break;case 110:b=78;break;case 111:b=79;break;case 112:b=80;break;case 113:b=81;break;case 114:b=82;break;case 115:b=83;break;case 116:b=84;break;case 117:b=85;break;case 118:b=86;break;case 119:b=87;break;case 120:b=88;break;case 121:b=89;break;case 122:b=90;break;case 127:b=
46;break;case 1073741881:b=20;break;case 1073741882:b=112;break;case 1073741883:b=113;break;case 1073741884:b=114;break;case 1073741885:b=115;break;case 1073741886:b=116;break;case 1073741887:b=117;break;case 1073741888:b=118;break;case 1073741889:b=119;break;case 1073741890:b=120;break;case 1073741891:b=121;break;case 1073741892:b=122;break;case 1073741893:b=123;break;case 1073741894:b=301;break;case 1073741895:b=145;break;case 1073741896:b=19;break;case 1073741897:b=45;break;case 1073741898:b=36;
break;case 1073741899:b=33;break;case 1073741901:b=35;break;case 1073741902:b=34;break;case 1073741903:b=39;break;case 1073741904:b=37;break;case 1073741905:b=40;break;case 1073741906:b=38;break;case 1073741907:b=144;break;case 1073741908:b=111;break;case 1073741909:b=106;break;case 1073741910:b=109;break;case 1073741911:b=107;break;case 1073741912:b=13;break;case 1073741913:b=97;break;case 1073741914:b=98;break;case 1073741915:b=99;break;case 1073741916:b=100;break;case 1073741917:b=101;break;case 1073741918:b=
102;break;case 1073741919:b=103;break;case 1073741920:b=104;break;case 1073741921:b=105;break;case 1073741922:b=96;break;case 1073741923:b=110;break;case 1073741925:b=302;break;case 1073741928:b=124;break;case 1073741929:b=125;break;case 1073741930:b=126;break;case 1073741982:b=13;break;case 1073742044:b=110;break;case 1073742048:b=17;break;case 1073742049:b=16;break;case 1073742050:b=18;break;case 1073742051:b=15;break;case 1073742052:b=17;break;case 1073742053:b=16;break;case 1073742054:b=18;break;
case 1073742055:b=15;break}var g=pb.__getCharCode(b,tc.get_shiftKey(c),tc.get_capsLock(c));if(a=="keyUp"&&(b==32||b==13)&&this.__focus instanceof za){var h=u.__cast(this.__focus,za);if(h.get_buttonMode()&&h.focusRect==1){var l=Qa.__pool.get(),k=Qa.__pool.get();k.x=this.__mouseX;k.y=this.__mouseY;h=Bc.__create("click",0,0,this.__mouseX,this.__mouseY,h.__globalToLocal(k,l),h);this.__dispatchStack(h,d);h.__updateAfterEventFlag&&this.__renderAfterEvent();Qa.__pool.release(k);Qa.__pool.release(l)}}f=new wm(a,
!0,!0,g,b,f,this.__macKeyboard?tc.get_ctrlKey(c)||tc.get_metaKey(c):tc.get_ctrlKey(c),tc.get_altKey(c),tc.get_shiftKey(c),tc.get_ctrlKey(c),tc.get_metaKey(c));d.reverse();this.__dispatchStack(f,d);if(f.__preventDefault)a=="keyDown"?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel();else if(a=="keyDown"&&b==9){d=[];this.__tabTest(d);g=-1;a=null;b=tc.get_shiftKey(c)?-1:1;if(d.length>1){Sf.sort(d,function(q,w){return q.get_tabIndex()-w.get_tabIndex()});if(d[d.length-1].get_tabIndex()!=-1)for(k=
0;k<d.length;){if(d[k].get_tabIndex()>-1){k>0&&d.splice(0,k);break}++k}if(this.get_focus()!=null){k=this.get_focus();for(l=d.indexOf(k);l==-1&&k!=null;){g=k.parent;if(g!=null&&g.get_tabChildren()){k=g.getChildIndex(k);if(k==-1){k=g;continue}for(k+=b;tc.get_shiftKey(c)?k>=0:k<g.get_numChildren();){h=g.getChildAt(k);if(h instanceof Da&&(l=u.__cast(h,Da),l=d.indexOf(l),l!=-1)){b=0;break}k+=b}}else tc.get_shiftKey(c)&&(l=d.indexOf(g),l!=-1&&(b=0));k=g}g=l<0?0:l+b}else g=this.__currentTabOrderIndex}else d.length==
1&&(a=d[0],this.get_focus()==a&&(a=null));l=g>=0&&g<d.length;d.length==1||d.length==0&&this.get_focus()!=null?g=0:d.length>1&&(g<0&&(g+=d.length),g%=d.length,a=d[g],a==this.get_focus()&&(g+=b,g<0&&(g+=d.length),g%=d.length,a=d[g]));b=null;this.get_focus()!=null&&(b=new hj("keyFocusChange",!0,!0,a,tc.get_shiftKey(c),0),d=[],this.get_focus().__getInteractive(d),d.reverse(),this.__dispatchStack(b,d),b.isDefaultPrevented()&&this.window.onKeyDown.cancel());b!=null&&b.isDefaultPrevented()||(this.__currentTabOrderIndex=
g,a!=null&&this.set_focus(a),l&&this.window.onKeyDown.cancel())}else if(a=="keyDown"&&this.get_focus()!=null&&!(this.get_focus()instanceof Jc)&&(this.__macKeyboard?tc.get_ctrlKey(c)||tc.get_metaKey(c):tc.get_ctrlKey(c))&&!tc.get_altKey(c)&&!tc.get_shiftKey(c))switch(b){case 65:c=new ka("selectAll",!0,!0);this.get_focus().dispatchEvent(c);break;case 67:c=new ka("copy",!0,!0);this.get_focus().dispatchEvent(c);break;case 86:c=new ka("paste",!0,!0);this.get_focus().dispatchEvent(c);break;case 88:c=new ka("cut",
!0,!0),this.get_focus().dispatchEvent(c)}f.__updateAfterEventFlag&&this.__renderAfterEvent()}},__onLimeCreateWindow:function(a){if(this.window==a){var b=this;a.onActivate.add(function(){b.__onLimeWindowActivate(a)});var c=this;a.onClose.add(function(){c.__onLimeWindowClose(a)},!1,-9E3);var d=this;a.onDeactivate.add(function(){d.__onLimeWindowDeactivate(a)});var f=this;var g=function(Ka){f.__onLimeWindowDropFile(a,Ka)};a.onDropFile.add(g);var h=this;a.onEnter.add(function(){h.__onLimeWindowEnter(a)});
var l=this;a.onExpose.add(function(){l.__onLimeWindowExpose(a)});var k=this;a.onFocusIn.add(function(){k.__onLimeWindowFocusIn(a)});var q=this;a.onFocusOut.add(function(){q.__onLimeWindowFocusOut(a)});var w=this;a.onFullscreen.add(function(){w.__onLimeWindowFullscreen(a)});var v=this;g=function(Ka,hb){v.__onLimeKeyDown(a,Ka,hb)};a.onKeyDown.add(g);var z=this;g=function(Ka,hb){z.__onLimeKeyUp(a,Ka,hb)};a.onKeyUp.add(g);var n=this;a.onLeave.add(function(){n.__onLimeWindowLeave(a)});var E=this;a.onMinimize.add(function(){E.__onLimeWindowMinimize(a)});
var H=this;g=function(Ka,hb,Ra){H.__onLimeMouseDown(a,Ka,hb,Ra)};a.onMouseDown.add(g);var J=this;g=function(Ka,hb){J.__onLimeMouseMove(a,Ka,hb)};a.onMouseMove.add(g);var Q=this;g=function(Ka,hb){Q.__onLimeMouseMoveRelative(a,Ka,hb)};a.onMouseMoveRelative.add(g);var T=this;g=function(Ka,hb,Ra){T.__onLimeMouseUp(a,Ka,hb,Ra)};a.onMouseUp.add(g);var fa=this;g=function(Ka,hb,Ra){fa.__onLimeMouseWheel(a,Ka,hb,Ra)};a.onMouseWheel.add(g);var da=this;g=function(Ka,hb){da.__onLimeWindowMove(a,Ka,hb)};a.onMove.add(g);
a.onRender.add(m(this,this.__onLimeRender));a.onRenderContextLost.add(m(this,this.__onLimeRenderContextLost));a.onRenderContextRestored.add(m(this,this.__onLimeRenderContextRestored));var pa=this;g=function(Ka,hb){pa.__onLimeWindowResize(a,Ka,hb)};a.onResize.add(g);var xa=this;a.onRestore.add(function(){xa.__onLimeWindowRestore(a)});var Ua=this;g=function(Ka,hb,Ra){Ua.__onLimeTextEdit(a,Ka,hb,Ra)};a.onTextEdit.add(g);var Sa=this;g=function(Ka){Sa.__onLimeTextInput(a,Ka)};a.onTextInput.add(g);this.__onLimeWindowCreate(a)}},
__onLimeGamepadAxisMove:function(a,b,c){if(this.__uncaughtErrorEvents.__enabled)try{Nc.__onGamepadAxisMove(a,b,c)}catch(d){Rb.lastError=d,a=la.caught(d).unwrap(),this.__handleError(a)}else Nc.__onGamepadAxisMove(a,b,c)},__onLimeGamepadButtonDown:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Nc.__onGamepadButtonDown(a,b)}catch(c){Rb.lastError=c,a=la.caught(c).unwrap(),this.__handleError(a)}else Nc.__onGamepadButtonDown(a,b)},__onLimeGamepadButtonUp:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Nc.__onGamepadButtonUp(a,
b)}catch(c){Rb.lastError=c,a=la.caught(c).unwrap(),this.__handleError(a)}else Nc.__onGamepadButtonUp(a,b)},__onLimeGamepadConnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Nc.__onGamepadConnect(a)}catch(h){Rb.lastError=h;var b=la.caught(h).unwrap();this.__handleError(b)}else Nc.__onGamepadConnect(a);var c=this;b=function(h,l){c.__onLimeGamepadAxisMove(a,h,l)};a.onAxisMove.add(b);var d=this;b=function(h){d.__onLimeGamepadButtonDown(a,h)};a.onButtonDown.add(b);var f=this;b=function(h){f.__onLimeGamepadButtonUp(a,
h)};a.onButtonUp.add(b);var g=this;a.onDisconnect.add(function(){g.__onLimeGamepadDisconnect(a)})},__onLimeGamepadDisconnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Nc.__onGamepadDisconnect(a)}catch(b){Rb.lastError=b,a=la.caught(b).unwrap(),this.__handleError(a)}else Nc.__onGamepadDisconnect(a)},__onLimeKeyDown:function(a,b,c){this.window!=null&&this.window==a&&this.__onKey("keyDown",b,c)},__onLimeKeyUp:function(a,b,c){this.window!=null&&this.window==a&&this.__onKey("keyUp",b,c)},
__onLimeModuleExit:function(a){this.window!=null&&(a=new ka("deactivate"),this.__broadcastEvent(a))},__onLimeMouseDown:function(a,b,c,d){if(this.window!=null&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var f="middleMouseDown";break;case 2:f="rightMouseDown";break;default:f="mouseDown"}this.__onMouse(f,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||d!=2||a.onMouseDown.cancel()}},__onLimeMouseMove:function(a,b,c){this.window!=null&&this.window==a&&(this.__pendingMouseEvent=
!0,this.__pendingMouseX=b*a.__scale|0,this.__pendingMouseY=c*a.__scale|0)},__onLimeMouseMoveRelative:function(a,b,c){},__onLimeMouseUp:function(a,b,c,d){if(this.window!=null&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var f="middleMouseUp";break;case 2:f="rightMouseUp";break;default:f="mouseUp"}this.__onMouse(f,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||d!=2||a.onMouseUp.cancel()}},__onLimeMouseWheel:function(a,b,c,d){this.window!=null&&this.window==a&&(this.__dispatchPendingMouseEvent(),
d==yl.PIXELS?this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0,d):this.__onMouseWheel(b|0,c|0,d))},__onLimeDisplayOrientationChange:function(a,b){switch(b){case 1:a=1;break;case 2:a=2;break;case 3:a=0;break;case 4:a=4;break;default:a=3}b=this.__oldStageOrientation;this.__oldStageOrientation=a;this.dispatchEvent(new xm("orientationChange",!0,!1,b,a))},__renderAfterEvent:function(){this.__render(this.window.context)},__render:function(a){a=!1;var b=this.__renderer!=null&&(this.__renderDirty||this.__forceRender);
if(this.__invalidated&&b){this.__invalidated=!1;var c=new ka("render");this.__broadcastEvent(c)}this.__update(!1,!0);if(this.__renderer!=null){if(this.context3D!=null){for(c=this.stage3Ds.iterator();c.hasNext();){var d=c.next();this.context3D.__renderStage3D(d)}this.context3D.__present&&(b=!0)}b?(this.context3D==null&&this.__renderer.__clear(),this.__renderer.__render(this)):this.context3D==null&&(a=!0);this.context3D!=null&&(this.context3D.__present?(this.__renderer.__cleared||this.__renderer.__clear(),
this.context3D.__present=!1,this.context3D.__cleared=!1):a=!0);this.__renderer.__cleared=!1}return a},__onLimeRender:function(a){this.__rendering||(this.__rendering=!0,this.__broadcastEvent(new ka("enterFrame")),this.__broadcastEvent(new ka("frameConstructed")),this.__broadcastEvent(new ka("exitFrame")),this.__renderable=!0,this.__enterFrame(this.__deltaTime),this.__deltaTime=0,this.__render(a)&&this.window.onRender.cancel(),this.__rendering=!1)},__onLimeRenderContextLost:function(){this.context3D=
this.__renderer=null;for(var a=this.stage3Ds.iterator();a.hasNext();)a.next().__lostContext()},__onLimeRenderContextRestored:function(a){this.__createRenderer();for(a=this.stage3Ds.iterator();a.hasNext();)a.next().__restoreContext()},__onLimeTextEdit:function(a,b,c,d){},__onLimeTextInput:function(a,b){if(this.window!=null&&this.window==a){var c=[];this.__focus==null?this.__getInteractive(c):this.__focus.__getInteractive(c);b=new sg("textInput",!0,!0,b);c.length>0?(c.reverse(),this.__dispatchStack(b,
c)):this.__dispatchEvent(b);b.isDefaultPrevented()&&a.onTextInput.cancel()}},__onLimeTouchCancel:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchMove:function(a){this.__onTouch("touchMove",a,this.__primaryTouch==a)},__onLimeTouchEnd:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchStart:function(a){this.__primaryTouch==null&&(this.__primaryTouch=a);this.__onTouch("touchBegin",
a,this.__primaryTouch==a)},__onLimeUpdate:function(a){this.__deltaTime=a;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(a){},__onLimeWindowClose:function(a){this.window==a&&(this.window=null);this.__primaryTouch=null;a=new ka("deactivate");this.__broadcastEvent(a)},__onLimeWindowCreate:function(a){if(this.window!=null&&this.window==a&&(a.context!=null&&this.__createRenderer(),a.get_display()!=null))switch(a.get_display().orientation){case 1:this.__oldStageOrientation=1;break;
case 2:this.__oldStageOrientation=2;break;case 3:this.__oldStageOrientation=0;break;case 4:this.__oldStageOrientation=4;break;default:this.__oldStageOrientation=3}},__onLimeWindowDeactivate:function(a){},__onLimeWindowDropFile:function(a,b){},__onLimeWindowEnter:function(a){},__onLimeWindowExpose:function(a){this.window!=null&&this.window==a&&(this.__renderDirty=!0)},__onLimeWindowFocusIn:function(a){this.window!=null&&this.window==a&&(this.__renderDirty=!0,a=new ka("activate"),this.__broadcastEvent(a),
this.set_focus(this.__cacheFocus))},__onLimeWindowFocusOut:function(a){this.window!=null&&this.window==a&&(this.__primaryTouch=null,a=new ka("deactivate"),this.__broadcastEvent(a),a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a,Bc.__altKey=!1,Bc.__commandKey=!1,Bc.__ctrlKey=!1,Bc.__shiftKey=!1)},__onLimeWindowFullscreen:function(a){this.window!=null&&this.window==a&&(this.__resize(),this.__wasFullscreen||(this.__wasFullscreen=!0,this.__displayState==2&&(this.__displayState=1),this.__dispatchEvent(new nj("fullScreen",
!1,!1,!0,!0))))},__onLimeWindowLeave:function(a){this.window==null||this.window!=a||Bc.__buttonDown||(this.__dispatchPendingMouseEvent(),a=new ka("mouseLeave"),this.__dispatchEvent(a))},__onLimeWindowMinimize:function(a){},__onLimeWindowMove:function(a,b,c){},__onLimeWindowResize:function(a,b,c){this.window!=null&&this.window==a&&(this.__resize(),this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new nj("fullScreen",!1,!1,!1,!0))))},__onLimeWindowRestore:function(a){this.window!=
null&&this.window==a&&this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new nj("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,b,c,d){if(!(d>2)){this.__untransformedMouseX=b;this.__untransformedMouseY=c;var f=Qa.__pool.get();f.setTo(b,c);b=this.__displayMatrix;c=b.a*b.d-b.b*b.c;if(c==0)f.x=-b.tx,f.y=-b.ty;else{var g=1/c*(b.c*(b.ty-f.y)+b.d*(f.x-b.tx));f.y=1/c*(b.a*(f.y-b.ty)+b.b*(b.tx-f.x));f.x=g}this.__mouseX=f.x;this.__mouseY=f.y;b=[];this.__hitTest(this.__mouseX,
this.__mouseY,!0,b,!0,this)?g=b[b.length-1]:(g=this,b=[this]);g==null&&(g=this);var h=null,l=!1;if(a!=null)switch(a){case "middleMouseDown":this.__mouseDownMiddle=g;l=!0;break;case "middleMouseUp":this.__mouseDownMiddle==g&&(h="middleClick");this.__mouseDownMiddle=null;l=!0;break;case "mouseDown":this.get_focus()!=null?this.get_focus()!=g&&(c=new hj("mouseFocusChange",!0,!0,g,!1,0),this.get_focus().dispatchEvent(c),c.isDefaultPrevented()||(g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null))):
g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null);this.__mouseDownLeft=g;this.__lastClickTarget!=g&&(this.__lastClickTarget=null,this.__lastClickTime=0);l=Bc.__buttonDown=!0;break;case "mouseUp":this.__mouseDownLeft!=null&&(Bc.__buttonDown=!1,this.__mouseDownLeft==g?h="click":(l=Bc.__create("releaseOutside",1,0,this.__mouseX,this.__mouseY,new Qa(this.__mouseX,this.__mouseY),this),this.__mouseDownLeft.dispatchEvent(l)),this.__mouseDownLeft=null);l=!0;break;case "rightMouseDown":this.__mouseDownRight=
g;l=!0;break;case "rightMouseUp":this.__mouseDownRight==g&&(h="rightClick"),this.__mouseDownRight=null,l=!0}c=Qa.__pool.get();a!=null&&(l=Bc.__create(a,d,l?this.window.clickCount:0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent());h!=null&&(l=Bc.__create(h,d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent(),a=="mouseUp"&&(g.doubleClickEnabled?
(a=Oa.getTimer(),a-this.__lastClickTime<500&&g==this.__lastClickTarget?(l=Bc.__create("doubleClick",d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent(),this.__lastClickTime=0,this.__lastClickTarget=null):(this.__lastClickTarget=g,this.__lastClickTime=a)):(this.__lastClickTarget=null,this.__lastClickTime=0)));if(Id.__cursor=="auto"&&!Id.__hidden){l=null;if(this.__mouseDownLeft!=null)l=this.__mouseDownLeft.__getCursor();
else for(a=0;a<b.length;)if(l=b[a],++a,l=l.__getCursor(),l!=null&&this.window!=null){this.window.set_cursor(Vg.toLimeCursor(l));break}l==null&&this.window!=null&&this.window.set_cursor($c.ARROW)}g!=this.__mouseOverTarget&&this.__mouseOverTarget!=null&&(l=Bc.__create("mouseOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),this.__mouseOverTarget),this.__dispatchStack(l,this.__mouseOutStack),l.__updateAfterEventFlag&&this.__renderAfterEvent());for(a=0;a<this.__rollOutStack.length;)h=
this.__rollOutStack[a],b.indexOf(h)==-1?(X.remove(this.__rollOutStack,h),h.hasEventListener("rollOut")&&(l=Bc.__create("rollOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),h),l.bubbles=!1,this.__dispatchTarget(h,l),l.__updateAfterEventFlag&&this.__renderAfterEvent())):++a;var k=null;g!=this.__mouseOverTarget&&(this.__mouseOverTarget=k=g,this.__mouseOutStack=b);for(a=0;a<b.length;)h=b[a],++a,this.__rollOutStack.indexOf(h)==-1&&this.__mouseOverTarget!=null&&(h.hasEventListener("rollOver")&&
(l=Bc.__create("rollOver",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),h),l.bubbles=!1,this.__dispatchTarget(h,l),l.__updateAfterEventFlag&&this.__renderAfterEvent()),this.__rollOutStack.push(h));k!=null&&(l=Bc.__create("mouseOver",d,0,this.__mouseX,this.__mouseY,k.__globalToLocal(f,c),k),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent());this.__dragObject!=null&&(this.__drag(f),d=null,this.__mouseOverTarget==this.__dragObject?(g=this.__dragObject.mouseEnabled,
a=this.__dragObject.mouseChildren,this.__dragObject.mouseEnabled=!1,this.__dragObject.mouseChildren=!1,b=[],this.__hitTest(this.__mouseX,this.__mouseY,!0,b,!0,this)&&(d=b[b.length-1]),this.__dragObject.mouseEnabled=g,this.__dragObject.mouseChildren=a):this.__mouseOverTarget!=this&&(d=this.__mouseOverTarget),this.__dragObject.dropTarget=d);Qa.__pool.release(f);Qa.__pool.release(c)}},__onMouseWheel:function(a,b,c){var d=this.__mouseX,f=this.__mouseY;a=[];if(this.__hitTest(this.__mouseX,this.__mouseY,
!0,a,!0,this))var g=a[a.length-1];else g=this,a=[this];g==null&&(g=this);c=Qa.__pool.get();c.setTo(d,f);d=this.__displayMatrix;f=d.a*d.d-d.b*d.c;if(f==0)c.x=-d.tx,c.y=-d.ty;else{var h=1/f*(d.c*(d.ty-c.y)+d.d*(c.x-d.tx));c.y=1/f*(d.a*(c.y-d.ty)+d.b*(d.tx-c.x));c.x=h}b|=0;b=Bc.__create("mouseWheel",0,0,this.__mouseX,this.__mouseY,g.__globalToLocal(c,c),g,b);b.cancelable=!0;this.__dispatchStack(b,a);b.isDefaultPrevented()&&this.window.onMouseWheel.cancel();b.__updateAfterEventFlag&&this.__renderAfterEvent();
Qa.__pool.release(c)},__onTouch:function(a,b,c){var d=Qa.__pool.get();d.setTo(Math.round(b.x*this.window.__width*this.window.__scale),Math.round(b.y*this.window.__height*this.window.__scale));var f=this.__displayMatrix,g=f.a*f.d-f.b*f.c;if(g==0)d.x=-f.tx,d.y=-f.ty;else{var h=1/g*(f.c*(f.ty-d.y)+f.d*(d.x-f.tx));d.y=1/g*(f.a*(d.y-f.ty)+f.b*(f.tx-d.x));d.x=h}f=d.x;g=d.y;h=[];if(this.__hitTest(f,g,!1,h,!0,this))var l=h[h.length-1];else l=this,h=[this];l==null&&(l=this);var k=b.id;if(this.__touchData.h.hasOwnProperty(k))var q=
this.__touchData.h[k];else q=ym.__pool.get(),q.reset(),q.touch=b,this.__touchData.h[k]=q;var w=null,v=!1;switch(a){case "touchBegin":q.touchDownTarget=l;break;case "touchEnd":q.touchDownTarget==l&&(w="touchTap"),q.touchDownTarget=null,v=!0}var z=Qa.__pool.get();a=Ef.__create(a,null,f,g,l.__globalToLocal(d,z),l);a.touchPointID=k;a.isPrimaryTouchPoint=c;a.pressure=b.pressure;this.__dispatchStack(a,h);a.__updateAfterEventFlag&&this.__renderAfterEvent();w!=null&&(a=Ef.__create(w,null,f,g,l.__globalToLocal(d,
z),l),a.touchPointID=k,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchStack(a,h),a.__updateAfterEventFlag&&this.__renderAfterEvent());w=q.touchOverTarget;l!=w&&w!=null&&(a=Ef.__create("touchOut",null,f,g,w.__globalToLocal(d,z),w),a.touchPointID=k,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchTarget(w,a),a.__updateAfterEventFlag&&this.__renderAfterEvent());for(var n=q.rollOutStack,E,H=0;H<n.length;)E=n[H],h.indexOf(E)==-1?(X.remove(n,E),a=Ef.__create("touchRollOut",null,
f,g,w.__globalToLocal(d,z),w),a.touchPointID=k,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(E,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()):++H;for(H=0;H<h.length;)E=h[H],++H,n.indexOf(E)==-1&&(E.hasEventListener("touchRollOver")&&(a=Ef.__create("touchRollOver",null,f,g,w.__globalToLocal(d,z),E),a.touchPointID=k,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(E,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),E.hasEventListener("touchRollOut")&&
n.push(E));l!=w&&(l!=null&&(a=Ef.__create("touchOver",null,f,g,l.__globalToLocal(d,z),l),a.touchPointID=k,a.isPrimaryTouchPoint=c,a.bubbles=!0,a.pressure=b.pressure,this.__dispatchTarget(l,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),q.touchOverTarget=l);Qa.__pool.release(d);Qa.__pool.release(z);v&&(this.__touchData.remove(k),q.reset(),ym.__pool.release(q))},__registerLimeModule:function(a){a.onCreateWindow.add(m(this,this.__onLimeCreateWindow));a.onUpdate.add(m(this,this.__onLimeUpdate));
a.onExit.add(m(this,this.__onLimeModuleExit),!1,0);a.onDisplayOrientationChange.add(m(this,this.__onLimeDisplayOrientationChange));for(a=cf.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}cf.onConnect.add(m(this,this.__onLimeGamepadConnect));De.onStart.add(m(this,this.__onLimeTouchStart));De.onMove.add(m(this,this.__onLimeTouchMove));De.onEnd.add(m(this,this.__onLimeTouchEnd));De.onCancel.add(m(this,this.__onLimeTouchCancel))},__applyScaleAndAlign:function(a,b,c,d){a=
this.__logicalWidth-Math.round((this.__logicalWidth*c-a)/c);b=this.__logicalHeight-Math.round((this.__logicalHeight*d-b)/d);var f=0,g=0;switch(this.align){case 0:f=Math.round((this.__logicalWidth-a)/2);g=Math.round(this.__logicalHeight-b);break;case 1:g=Math.round(this.__logicalHeight-b);break;case 2:f=Math.round(this.__logicalWidth-a);g=Math.round(this.__logicalHeight-b);break;case 3:g=Math.round((this.__logicalHeight-b)/2);break;case 4:f=Math.round(this.__logicalWidth-a);g=Math.round((this.__logicalHeight-
b)/2);break;case 5:f=Math.round((this.__logicalWidth-a)/2);break;case 7:f=Math.round(this.__logicalWidth-a)}this.__displayMatrix.translate(-f,-g);this.__displayMatrix.scale(c,d);this.__displayRect.setTo(f,g,a,b)},__resize:function(){var a=this.stageWidth,b=this.stageHeight,c=this.window.__width*this.window.__scale|0,d=this.window.__height*this.window.__scale|0;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 f=c/this.stageWidth,g=d/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(f,g);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.get_scaleMode()==
2||c==0||d==0)this.stageWidth=Math.round(c/this.window.__scale),this.stageHeight=Math.round(d/this.window.__scale),this.__displayMatrix.scale(this.window.__scale,this.window.__scale),this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);else switch(this.stageWidth=this.__logicalWidth,this.stageHeight=this.__logicalHeight,this.get_scaleMode()){case 0:f=c/this.__logicalWidth;g=d/this.__logicalHeight;this.__displayMatrix.scale(f,g);this.__displayRect.setTo(0,0,this.__logicalWidth,this.__logicalHeight);
break;case 1:f=c/this.__logicalWidth;g=d/this.__logicalHeight;f=Math.max(f,g);this.__applyScaleAndAlign(c,d,f,f);break;default:f=c/this.__logicalWidth,g=d/this.__logicalHeight,f=Math.min(f,g),this.__applyScaleAndAlign(c,d,f,f)}this.context3D!=null&&this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0);for(f=this.stage3Ds.iterator();f.hasNext();)f.next().__resize(c,d);this.__renderer!=null&&this.__renderer.__resize(c,d);this.__renderDirty=!0;if(this.stageWidth!=a||this.stageHeight!=
b)this.__setTransformDirty(),a=new ka("resize"),this.__dispatchEvent(a)},__setLogicalSize:function(a,b){this.__logicalWidth=a;this.__logicalHeight=b;this.__resize()},__startDrag:function(a,b,c){if(c==null)this.__dragBounds=null;else{this.__dragBounds=new Ea;var d=c.get_right(),f=c.get_bottom();this.__dragBounds.x=d<c.x?d:c.x;this.__dragBounds.y=f<c.y?f:c.y;this.__dragBounds.width=Math.abs(c.width);this.__dragBounds.height=Math.abs(c.height)}this.__dragObject=a;this.__dragObject!=null&&(b?this.__dragOffsetY=
this.__dragOffsetX=0:(a=Qa.__pool.get(),a.setTo(this.get_mouseX(),this.get_mouseY()),b=this.__dragObject.parent,b!=null&&(b=b.__getWorldTransform(),c=b.a*b.d-b.b*b.c,c==0?(a.x=-b.tx,a.y=-b.ty):(d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx)),a.y=1/c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x)),a.x=d)),this.__dragOffsetX=this.__dragObject.get_x()-a.x,this.__dragOffsetY=this.__dragObject.get_y()-a.y,Qa.__pool.release(a)))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__unregisterLimeModule:function(a){a.onCreateWindow.remove(m(this,
this.__onLimeCreateWindow));a.onUpdate.remove(m(this,this.__onLimeUpdate));a.onExit.remove(m(this,this.__onLimeModuleExit));a.onDisplayOrientationChange.remove(m(this,this.__onLimeDisplayOrientationChange));cf.onConnect.remove(m(this,this.__onLimeGamepadConnect));De.onStart.remove(m(this,this.__onLimeTouchStart));De.onMove.remove(m(this,this.__onLimeTouchMove));De.onEnd.remove(m(this,this.__onLimeTouchEnd));De.onCancel.remove(m(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&
(lb.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||this.__renderDirty?(lb.prototype.__update.call(this,!1,b),b&&ea.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(lb.prototype.__update.call(this,!1,b),b&&(this.__wasDirty=!1))},get_autoOrients:function(){return!1},set_autoOrients:function(a){return!1},get_color:function(){return this.__color},set_color:function(a){a==null?(this.__transparent=!0,a=0):this.__transparent=!1;this.__color!=
a&&(this.__colorSplit[0]=((a&16711680)>>>16)/255,this.__colorSplit[1]=((a&65280)>>>8)/255,this.__colorSplit[2]=(a&255)/255,this.__colorString="#"+Z.hex(a&16777215,6),this.__renderDirty=!0,this.__color=-16777216|a&16777215);return a},get_contentsScaleFactor:function(){return this.__contentsScaleFactor},get_deviceOrientation:function(){switch(this.application.get_deviceOrientation()){case 1:return 1;case 2:return 2;case 3:return 0;case 4:return 4;default:return 3}},get_displayState:function(){return this.__displayState},
set_displayState:function(a){this.window!=null&&(a==2?this.window.__fullscreen&&this.window.set_fullscreen(!1):this.window.__fullscreen||this.window.set_fullscreen(!0));return this.__displayState=a},get_focus:function(){return this.__focus},set_focus:function(a){if(a!=this.__focus||a==null&&this.__cacheFocus!=null){var b=this.__focus;this.__cacheFocus=this.__focus=a;if(b!=null){var c=new hj("focusOut",!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}a!=null&&(c=new hj("focusIn",
!0,!1,b,!1,0),d=[],a.__getInteractive(d),d.reverse(),this.__dispatchStack(c,d))}return a},get_frameRate:function(){return this.window!=null?this.window.__backend.getFrameRate():0},set_frameRate:function(a){return this.window!=null?this.window.__backend.setFrameRate(a):a},get_fullScreenHeight:function(){return Math.ceil(this.window.get_display().currentMode.height*this.window.__scale)},get_fullScreenSourceRect:function(){return this.__fullScreenSourceRect==null?null:this.__fullScreenSourceRect.clone()},
set_fullScreenSourceRect:function(a){a==null?this.__fullScreenSourceRect!=null&&(this.__fullScreenSourceRect=null,this.__resize()):a.equals(this.__fullScreenSourceRect)||(this.__fullScreenSourceRect=a.clone(),this.__resize());return a},get_fullScreenWidth:function(){return Math.ceil(this.window.get_display().currentMode.width*this.window.__scale)},set_height:function(a){return this.get_height()},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},get_orientation:function(){var a=
this.window.get_display();if(a!=null)switch(a.orientation){case 1:return 2;case 2:return 1;case 3:return 0;case 4:return 4}return 3},get_quality:function(){return this.__quality},set_quality:function(a){this.__quality=a;if(this.__renderer!=null){var b=this.get_quality();this.__renderer.__allowSmoothing=b!=2}return a},set_rotation:function(a){return 0},get_scaleMode:function(){return this.__scaleMode},set_scaleMode:function(a){a!=this.__scaleMode&&(this.__scaleMode=a,this.__resize());return a},set_scaleX:function(a){return 0},
set_scaleY:function(a){return 0},get_supportedOrientations:function(){return gb.toNullVector(null)},get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new fb("Error: The Stage class does not implement this property or method.");},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new fb("Error: The Stage class does not implement this property or method.");},set_transform:function(a){return this.get_transform()},set_width:function(a){return this.get_width()},set_x:function(a){return 0},
set_y:function(a){return 0},__class__:cd,__properties__:I(lb.prototype.__properties__,{get_supportedOrientations:"get_supportedOrientations",set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",set_quality:"set_quality",get_quality:"get_quality",get_orientation:"get_orientation",get_fullScreenWidth:"get_fullScreenWidth",set_fullScreenSourceRect:"set_fullScreenSourceRect",get_fullScreenSourceRect:"get_fullScreenSourceRect",get_fullScreenHeight:"get_fullScreenHeight",set_frameRate:"set_frameRate",
get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",get_deviceOrientation:"get_deviceOrientation",get_contentsScaleFactor:"get_contentsScaleFactor",set_color:"set_color",get_color:"get_color",set_autoOrients:"set_autoOrients",get_autoOrients:"get_autoOrients"})});var vm=function(a){na.call(this);this.__stage=a;this.__height=0;this.__projectionTransform=new lf;this.__renderTransform=new lf;this.__y=this.__x=
this.__width=0;this.visible=!0;a.stageWidth>0&&a.stageHeight>0&&this.__resize(a.stageWidth,a.stageHeight)};r["openfl.display.Stage3D"]=vm;vm.__name__="openfl.display.Stage3D";vm.__super__=na;vm.prototype=I(na.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,__renderContext:null,__style:null,__webgl:null,requestContext3D:function(a,
b){this.__contextLost?this.__contextRequested=!0:this.context3D!=null?(this.__contextRequested=!0,rd.delay(m(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,rd.delay(m(this,this.__createContext),1))},requestContext3DMatchingProfiles:function(a){this.requestContext3D()},__createContext:function(){var a=this.__stage,b=a.__renderer;if(b.__type=="cairo"||b.__type=="canvas")this.__dispatchError();else if(b.__type=="opengl")this.context3D=new Uc(a,a.context3D.__contextState,
this),this.__dispatchCreate();else if(b.__type=="dom")if(a.context3D==null){this.__canvas=window.document.createElement("canvas");this.__canvas.width=a.stageWidth;this.__canvas.height=a.stageHeight;var c=a.window.context.attributes,d=Object.prototype.hasOwnProperty.call(c,"background")&&c.background==null,f=Object.prototype.hasOwnProperty.call(c,"colorDepth")?c.colorDepth:32;c=Object.prototype.hasOwnProperty.call(c,"antialiasing")&&c.antialiasing>0;this.__webgl=Yv.getContextWebGL(this.__canvas,{alpha:d||
f>16,antialias:c,depth:!0,premultipliedAlpha:!0,stencil:!0,preserveDrawingBuffer:!1});this.__webgl!=null&&(y.context==null&&(y.context=this.__webgl,y.type="webgl",y.version=1),a.context3D=new Uc(a),a.context3D.configureBackBuffer(a.window.__width,a.window.__height,0,!0,!0,!0),a.context3D.present(),b.element.appendChild(this.__canvas),this.__style=this.__canvas.style,this.__style.setProperty("position","absolute",null),this.__style.setProperty("top","0",null),this.__style.setProperty("left","0",null),
this.__style.setProperty(b.__transformOriginProperty,"0 0 0",null),this.__style.setProperty("z-index","-1",null));a.context3D!=null&&(this.context3D=new Uc(a,a.context3D.__contextState,this));this.__dispatchCreate()}else this.__dispatchError()},__dispatchError:function(){this.__contextRequested=!1;this.dispatchEvent(new jg("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new ka("context3DCreate")))},__lostContext:function(){this.__contextLost=
!0;this.context3D!=null&&(this.context3D.__dispose(),this.__contextRequested=!0)},__resize:function(a,b){if(a!=this.__width||b!=this.__height){this.__canvas!=null&&(this.__canvas.width=a,this.__canvas.height=b);this.__projectionTransform.copyRawDataFrom(gb.toFloatVector(null,null,null,[2/(a>0?a:1),0,0,0,0,-2/(b>0?b:1),0,0,0,0,-.001,0,-1,1,0,1]));var c=this.__stage.window.__scale;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*c,this.__y*c,0);this.__renderTransform.append(this.__projectionTransform);
this.__width=a;this.__height=b}},__restoreContext:function(){this.__contextLost=!1;this.__createContext()},get_x:function(){return this.__x},set_x:function(a){if(this.__x==a)return a;this.__x=a;var b=this.__stage.window.__scale;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*b,this.__y*b,0);this.__renderTransform.append(this.__projectionTransform);return a},get_y:function(){return this.__y},set_y:function(a){if(this.__y==a)return a;this.__y=a;var b=this.__stage.window.__scale;
this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x*b,this.__y*b,0);this.__renderTransform.append(this.__projectionTransform);return a},__class__:vm,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var Bl=function(a,b,c,d,f,g,h,l){l==null&&(l=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=1);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.__id=a;this.__matrix=new S;b!=0&&this.set_x(b);c!=0&&this.set_y(c);d!=1&&this.set_scaleX(d);
f!=1&&this.set_scaleY(f);g!=0&&this.set_rotation(g);this.__dirty=!0;this.__length=0;this.__originX=h;this.__originY=l;this.__alpha=1;this.__blendMode=null;this.__visible=!0};r["openfl.display.Tile"]=Bl;Bl.__name__="openfl.display.Tile";Bl.prototype={data:null,parent:null,__alpha:null,__blendMode:null,__colorTransform:null,__dirty:null,__id:null,__length:null,__matrix:null,__originX:null,__originY:null,__rect:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scaleX:null,__scaleY:null,
__shader:null,__tileset:null,__visible:null,clone:function(){var a=new Bl(this.__id);a.__alpha=this.__alpha;a.__blendMode=this.__blendMode;a.__originX=this.__originX;a.__originY=this.__originY;this.__rect!=null&&(a.__rect=this.__rect.clone());a.set_matrix(this.__matrix.clone());a.__shader=this.__shader;a.set_tileset(this.__tileset);this.__colorTransform!=null&&(a.__colorTransform=this.__colorTransform.__clone());return a},getBounds:function(a){var b=new Ea;this.__findTileRect(b);var c=S.__pool.get();
if(a!=null&&a!=this){c.copyFrom(this.__getWorldTransform());var d=S.__pool.get();d.copyFrom(a.__getWorldTransform());d.invert();c.concat(d);S.__pool.release(d)}else c.identity();this.__getBounds(b,c);S.__pool.release(c);return b},__getBounds:function(a,b){a.__transform(a,b)},hitTestTile:function(a){if(a!=null&&a.parent!=null&&this.parent!=null){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},invalidate:function(){this.__setRenderDirty()},__findTileRect:function(a){if(this.get_tileset()==
null)if(this.parent!=null){var b=this.parent.__findTileset();b==null?a.setTo(0,0,0,0):(b=b.getRect(this.get_id()),b==null?a.setTo(0,0,0,0):a.copyFrom(b))}else a.setTo(0,0,0,0);else a.copyFrom(this.get_tileset().getRect(this.get_id()));a.x=0;a.y=0},__findTileset:function(){return this.get_tileset()!=null?this.get_tileset():this.parent instanceof Ep?this.parent.get_tileset():this.parent==null?null:this.parent.__findTileset()},__getWorldTransform:function(){var a=this.get_matrix().clone();this.parent!=
null&&a.concat(this.parent.__getWorldTransform());return a},__setRenderDirty:function(){this.__dirty||(this.__dirty=!0,this.parent!=null&&this.parent.__setRenderDirty())},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__alpha=a,this.__setRenderDirty());return a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a!=this.__blendMode&&(this.__blendMode=a,this.__setRenderDirty());return a},get_colorTransform:function(){return this.__colorTransform},
set_colorTransform:function(a){a!=this.__colorTransform&&(this.__colorTransform=a,this.__setRenderDirty());return a},get_height:function(){var a=Ea.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;Ea.__pool.release(a);return b},set_height:function(a){var b=Ea.__pool.get();this.__findTileRect(b);b.height!=0&&this.set_scaleY(a/b.height);Ea.__pool.release(b);return a},get_id:function(){return this.__id},set_id:function(a){a!=this.__id&&(this.__id=a,this.__setRenderDirty());
return a},get_matrix:function(){return this.__matrix},set_matrix:function(a){a!=this.__matrix&&(this.__scaleY=this.__scaleX=this.__rotation=null,this.__matrix=a,this.__setRenderDirty());return a},get_originX:function(){return this.__originX},set_originX:function(a){a!=this.__originX&&(this.__originX=a,this.__setRenderDirty());return a},get_originY:function(){return this.__originY},set_originY:function(a){a!=this.__originY&&(this.__originY=a,this.__setRenderDirty());return a},get_rect:function(){return this.__rect},
set_rect:function(a){a!=this.__rect&&(this.__rect=a,this.__setRenderDirty());return a},get_rotation:function(){if(this.__rotation==null)if(this.__matrix.b==0&&this.__matrix.c==0)this.__rotationSine=this.__rotation=0,this.__rotationCosine=1;else{var a=Math.atan2(this.__matrix.d,this.__matrix.c)-Math.PI/2;this.__rotation=180/Math.PI*a;this.__rotationSine=Math.sin(a);this.__rotationCosine=Math.cos(a)}return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/
180*a;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);b=this.get_scaleX();var c=this.get_scaleY();this.__matrix.a=this.__rotationCosine*b;this.__matrix.b=this.__rotationSine*b;this.__matrix.c=-this.__rotationSine*c;this.__matrix.d=this.__rotationCosine*c;this.__setRenderDirty()}return a},get_scaleX:function(){this.__scaleX==null&&(this.get_matrix().b==0?this.__scaleX=this.__matrix.a:this.__scaleX=Math.sqrt(this.__matrix.a*this.__matrix.a+this.__matrix.b*this.__matrix.b));return this.__scaleX},
set_scaleX:function(a){if(a!=this.__scaleX){this.__scaleX=a;if(this.__matrix.b==0)this.__matrix.a=a;else{this.get_rotation();var b=this.__rotationSine*a;this.__matrix.a=this.__rotationCosine*a;this.__matrix.b=b}this.__setRenderDirty()}return a},get_scaleY:function(){this.__scaleY==null&&(this.__scaleY=this.__matrix.c==0?this.get_matrix().d:Math.sqrt(this.__matrix.c*this.__matrix.c+this.__matrix.d*this.__matrix.d));return this.__scaleY},set_scaleY:function(a){if(a!=this.__scaleY){this.__scaleY=a;if(this.__matrix.c==
0)this.__matrix.d=a;else{this.get_rotation();var b=this.__rotationCosine*a;this.__matrix.c=-this.__rotationSine*a;this.__matrix.d=b}this.__setRenderDirty()}return a},get_shader:function(){return this.__shader},set_shader:function(a){a!=this.__shader&&(this.__shader=a,this.__setRenderDirty());return a},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__setRenderDirty());return a},get_visible:function(){return this.__visible},set_visible:function(a){a!=
this.__visible&&(this.__visible=a,this.__setRenderDirty());return a},get_width:function(){var a=Ea.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;Ea.__pool.release(a);return b},set_width:function(a){var b=Ea.__pool.get();this.__findTileRect(b);b.width!=0&&this.set_scaleX(a/b.width);Ea.__pool.release(b);return a},get_x:function(){return this.__matrix.tx},set_x:function(a){a!=this.__matrix.tx&&(this.__matrix.tx=a,this.__setRenderDirty());return a},get_y:function(){return this.__matrix.ty},
set_y:function(a){a!=this.__matrix.ty&&(this.__matrix.ty=a,this.__setRenderDirty());return a},__class__:Bl,__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_tileset:"set_tileset",get_tileset:"get_tileset",set_shader:"set_shader",get_shader:"get_shader",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",
set_rect:"set_rect",get_rect:"get_rect",set_originY:"set_originY",get_originY:"get_originY",set_originX:"set_originX",get_originX:"get_originX",set_matrix:"set_matrix",get_matrix:"get_matrix",set_id:"set_id",get_id:"get_id",set_height:"set_height",get_height:"get_height",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform",set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}};var Mn=function(a,b,c,d,f,g,h){h==null&&(h=
0);g==null&&(g=0);f==null&&(f=0);d==null&&(d=1);c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);Bl.call(this,-1,a,b,c,d,f,g,h);this.__tiles=[];this.__length=0};r["openfl.display.TileContainer"]=Mn;Mn.__name__="openfl.display.TileContainer";Mn.__interfaces__=[Dp];Mn.__super__=Bl;Mn.prototype=I(Bl.prototype,{__tiles:null,addTile:function(a){if(a==null)return null;a.parent==this&&(X.remove(this.__tiles,a),this.__length--);this.__tiles[this.get_numTiles()]=a;a.parent=this;this.__length++;this.__setRenderDirty();
return a},addTileAt:function(a,b){if(a==null)return null;a.parent==this&&(X.remove(this.__tiles,a),this.__length--);this.__tiles.splice(b,0,a);a.parent=this;this.__length++;this.__setRenderDirty();return a},addTiles:function(a){for(var b=0;b<a.length;){var c=a[b];++b;this.addTile(c)}return a},clone:function(){for(var a=new Mn,b=0,c=this.__tiles;b<c.length;){var d=c[b];++b;a.addTile(d.clone())}return a},contains:function(a){return this.__tiles.indexOf(a)>-1},getBounds:function(a){for(var b=new Ea,
c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(a),b.__expand(c.x,c.y,c.width,c.height);return b},getTileAt:function(a){return a>=0&&a<this.get_numTiles()?this.__tiles[a]:null},getTileIndex:function(a){for(var b=0,c=this.__tiles.length;b<c;){var d=b++;if(this.__tiles[d]==a)return d}return-1},removeTile:function(a){a!=null&&a.parent==this&&(a.parent=null,X.remove(this.__tiles,a),this.__length--,this.__setRenderDirty());return a},removeTileAt:function(a){return a>=0&&a<this.get_numTiles()?
this.removeTile(this.__tiles[a]):null},removeTiles:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);a<0&&(a=0);b>this.__tiles.length-1&&(b=this.__tiles.length-1);a=this.__tiles.splice(a,b-a+1);for(b=0;b<a.length;){var c=a[b];++b;c.parent=null}this.__length=this.__tiles.length;this.__setRenderDirty()},setTileIndex:function(a,b){b>=0&&b<=this.get_numTiles()&&a.parent==this&&(X.remove(this.__tiles,a),this.__tiles.splice(b,0,a),this.__setRenderDirty())},sortTiles:function(a){this.__tiles.sort(a);
this.__setRenderDirty()},swapTiles:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__tiles.indexOf(a),d=this.__tiles.indexOf(b);this.__tiles[c]=b;this.__tiles[d]=a;this.__setRenderDirty()}},swapTilesAt:function(a,b){var c=this.__tiles[a];this.__tiles[a]=this.__tiles[b];this.__tiles[b]=c;this.__setRenderDirty()},get_numTiles:function(){return this.__length},get_height:function(){for(var a=Ea.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,
b.width,b.height);this.__getBounds(a,this.get_matrix());c=a.height;Ea.__pool.release(a);return c},set_height:function(a){for(var b=Ea.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);b.height!=0&&this.set_scaleY(a/b.height);Ea.__pool.release(b);return a},get_width:function(){for(var a=Ea.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());
c=a.width;Ea.__pool.release(a);return c},set_width:function(a){for(var b=Ea.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);b.width!=0&&this.set_scaleX(a/b.width);Ea.__pool.release(b);return a},__class__:Mn,__properties__:I(Bl.prototype.__properties__,{get_numTiles:"get_numTiles"})});var Ep=function(a,b,c,d){d==null&&(d=!0);ea.call(this);this.__drawableType=9;this.__tileset=c;this.smoothing=d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=
this.tileAlphaEnabled=!0;this.__group=new Mn;this.__group.set_tileset(c);this.__width=a;this.__height=b};r["openfl.display.Tilemap"]=Ep;Ep.__name__="openfl.display.Tilemap";Ep.__interfaces__=[Dp];Ep.__super__=ea;Ep.prototype=I(ea.prototype,{tileAlphaEnabled:null,tileBlendModeEnabled:null,tileColorTransformEnabled:null,smoothing:null,__group:null,__tileset:null,__buffer:null,__bufferDirty:null,__height:null,__width:null,addTile:function(a){return this.__group.addTile(a)},addTileAt:function(a,b){return this.__group.addTileAt(a,
b)},addTiles:function(a){return this.__group.addTiles(a)},contains:function(a){return this.__group.contains(a)},getTileAt:function(a){return this.__group.getTileAt(a)},getTileIndex:function(a){return this.__group.getTileIndex(a)},getTiles:function(){return this.__group.clone()},removeTile:function(a){return this.__group.removeTile(a)},removeTileAt:function(a){return this.__group.removeTileAt(a)},removeTiles:function(a,b){b==null&&(b=2147483647);a==null&&(a=0);this.__group.removeTiles(a,b)},setTileIndex:function(a,
b){this.__group.setTileIndex(a,b)},setTiles:function(a){for(var b=0,c=this.__group.__tiles;b<c.length;){var d=c[b];++b;this.removeTile(d)}b=0;for(c=a.__tiles;b<c.length;)d=c[b],++b,this.addTile(d)},sortTiles:function(a){this.__group.sortTiles(a)},swapTiles:function(a,b){this.__group.swapTiles(a,b)},swapTilesAt:function(a,b){this.__group.swapTilesAt(a,b)},__enterFrame:function(a){this.__group.__dirty&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,
b){var c=Ea.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var h=this.__renderTransform,l=h.a*h.d-h.b*h.c;c=l==0?-h.tx:1/l*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;l=h.a*h.d-h.b*h.c;a=l==0?-h.ty:1/l*(h.a*(b-h.ty)+h.b*(h.tx-a));return c>0&&a>
0&&c<=this.__width&&a<=this.__height?(d==null||f||d.push(g),!0):!1},__renderFlash:function(){},get_height:function(){return this.__height*Math.abs(this.get_scaleY())},set_height:function(a){this.__height=a|0;return this.__height*Math.abs(this.get_scaleY())},get_numTiles:function(){return this.__group.__length},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__group.set_tileset(a),this.__group.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()));return a},get_width:function(){return this.__width*Math.abs(this.__scaleX)},set_width:function(a){this.__width=a|0;return this.__width*Math.abs(this.__scaleX)},__class__:Ep,__properties__:I(ea.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var Bv=function(a,b){this.__bitmapData=a;this.rectData=gb.toFloatVector(null);this.__data=[];if(b!=null)for(a=0;a<b.length;){var c=b[a];++a;this.addRect(c)}};r["openfl.display.Tileset"]=
Bv;Bv.__name__="openfl.display.Tileset";Bv.prototype={rectData:null,__bitmapData:null,__data:null,addRect:function(a){if(a==null)return-1;this.rectData.push(a.x);this.rectData.push(a.y);this.rectData.push(a.width);this.rectData.push(a.height);a=new Ls(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},clone:function(){for(var a=new Bv(this.__bitmapData,null),b=Ea.__pool.get(),c=0,d=this.__data;c<d.length;){var f=d[c];++c;b.setTo(f.x,f.y,f.width,f.height);a.addRect(b)}Ea.__pool.release(b);
return a},hasRect:function(a){for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;if(a.x==d.x&&a.y==d.y&&a.width==d.width&&a.height==d.height)return!0}return!1},getRect:function(a){return a<this.__data.length&&a>=0?new Ea(this.__data[a].x,this.__data[a].y,this.__data[a].width,this.__data[a].height):null},getRectID:function(a){for(var b,c=0,d=this.__data.length;c<d;){var f=c++;b=this.__data[f];if(a.x==b.x&&a.y==b.y&&a.width==b.width&&a.height==b.height)return f}return null},get_bitmapData:function(){return this.__bitmapData},
set_bitmapData:function(a){this.__bitmapData=a;for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;d.__update(this.__bitmapData)}return a},get_numRects:function(){return this.__data.length},__class__:Bv,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};var Ls=function(a){a!=null&&(this.x=a.x|0,this.y=a.y|0,this.width=a.width|0,this.height=a.height|0)};r["openfl.display.TileData"]=Ls;Ls.__name__="openfl.display.TileData";Ls.prototype={height:null,
width:null,x:null,y:null,__bitmapData:null,__uvHeight:null,__uvWidth:null,__uvX:null,__uvY:null,__update:function(a){if(a!=null){var b=a.width;a=a.height;this.__uvX=this.x/b;this.__uvY=this.y/a;this.__uvWidth=(this.x+this.width)/b;this.__uvHeight=(this.y+this.height)/a}},__class__:Ls};var uw=function(){this.__totalFrames=this.__framesLoaded=1;this.__currentLabels=[];this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1};r["openfl.display.Timeline"]=uw;uw.__name__="openfl.display.Timeline";
uw.prototype={frameRate:null,scenes:null,scripts:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__currentScene:null,__frameScripts:null,__framesLoaded:null,__frameTime:null,__isPlaying:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__scope:null,__timeElapsed:null,__totalFrames:null,attachMovieClip:function(a){},enterFrame:function(a){},initializeSprite:function(a){},__addFrameScript:function(a,b){a<0||(a+=1,b!=null?(this.__frameScripts==null&&(this.__frameScripts=
new we),this.__frameScripts.h[a]=function(c){b()}):this.__frameScripts!=null&&this.__frameScripts.remove(a))},__attachMovieClip:function(a){this.__scope=a;this.__framesLoaded=this.__totalFrames=0;if(this.scenes!=null&&this.scenes.length>0){for(var b=0,c=this.scenes;b<c.length;){var d=c[b];++b;this.__totalFrames+=d.numFrames;this.__framesLoaded+=d.numFrames;d.labels!=null&&(this.__currentLabels=this.__currentLabels.concat(d.labels))}this.__currentScene=this.scenes[0]}if(this.scripts!=null&&this.scripts.length>
0)for(this.__frameScripts=new we,b=0,c=this.scripts;b<c.length;)d=c[b],++b,this.__frameScripts.h.hasOwnProperty(d.frame)?this.__frameScripts.h[d.frame]=function(f,g){return function(h){g[0](h);f[0](h)}}([d.script],[this.__frameScripts.h[d.frame]]):this.__frameScripts.h[d.frame]=d.script;this.attachMovieClip(a)},__enterFrame:function(a){if(this.__isPlaying){a=this.__getNextFrame(a);if(this.__lastFrameScriptEval==a)return;if(this.__frameScripts!=null){if(a<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames))return;
this.__currentFrame=1}if(!this.__evaluateFrameScripts(a))return}else this.__currentFrame=a}this.__updateSymbol(this.__currentFrame)},__evaluateFrameScripts:function(a){if(this.__frameScripts==null)return!0;var b=this.__currentFrame;for(a+=1;b<a;){var c=b++;if(c!=this.__lastFrameScriptEval&&(this.__currentFrame=this.__lastFrameScriptEval=c,this.__frameScripts.h.hasOwnProperty(c)&&(this.__updateSymbol(c),(0,this.__frameScripts.h[c])(this.__scope),this.__currentFrame!=c)||!this.__isPlaying))return!1}return!0},
__getNextFrame:function(a){this.frameRate!=null?(this.__timeElapsed+=a,a=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime),a<1&&(a=1),a>this.__totalFrames&&(a=Math.floor((a-1)%this.__totalFrames)+1),this.__timeElapsed%=this.__frameTime):(a=this.__currentFrame+1,a>this.__totalFrames&&(a=1));return a},__goto:function(a){a<1?a=1:a>this.__totalFrames&&(a=this.__totalFrames);this.__lastFrameScriptEval=-1;this.__currentFrame=a;this.__updateSymbol(this.__currentFrame);this.__evaluateFrameScripts(this.__currentFrame)},
__gotoAndPlay:function(a,b){this.__play();this.__goto(this.__resolveFrameReference(a))},__gotoAndStop:function(a,b){this.__stop();this.__goto(this.__resolveFrameReference(a))},__nextFrame:function(){this.__stop();this.__goto(this.__currentFrame+1)},__nextScene:function(){},__play:function(){this.__isPlaying||this.__totalFrames<2||(this.__isPlaying=!0,this.frameRate!=null&&(this.__frameTime=1E3/this.frameRate|0,this.__timeElapsed=0))},__prevFrame:function(){this.__stop();this.__goto(this.__currentFrame-
1)},__prevScene:function(){},__stop:function(){this.__isPlaying=!1},__resolveFrameReference:function(a){if(typeof a=="number"&&(a|0)===a)return a;if(typeof a=="string"){for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;if(d.name==a)return d.frame}throw new rb("Error #2109: Frame label "+a+" not found in scene.");}throw la.thrown("Invalid type for frame "+a.__name__);},__updateFrameLabel:function(){this.__currentFrameLabel=this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<
b.length;){var c=b[a];++a;if(c.frame<this.__currentFrame)this.__currentLabel=c.name;else if(c.frame==this.__currentFrame)this.__currentFrameLabel=this.__currentLabel=c.name;else break}},__updateSymbol:function(a){this.__currentFrame!=this.__lastFrameUpdate&&(this.__updateFrameLabel(),this.enterFrame(a),this.__lastFrameUpdate=this.__currentFrame)},__class__:uw};var Ap=function(a,b){Pl.call(this,a,b);this.stage=new cd(this,Object.prototype.hasOwnProperty.call(b.context,"background")?b.context.background:
16777215);if(Object.prototype.hasOwnProperty.call(b,"parameters"))try{this.stage.get_loaderInfo().parameters=b.parameters}catch(c){Rb.lastError=c}this.stage.__setLogicalSize(b.width,b.height);Object.prototype.hasOwnProperty.call(b,"resizable")&&!b.resizable&&this.stage.set_scaleMode(3);a.addModule(this.stage)};r["openfl.display.Window"]=Ap;Ap.__name__="openfl.display.Window";Ap.__super__=Pl;Ap.prototype=I(Pl.prototype,{close:function(){Pl.prototype.close.call(this);this.onClose.canceled||this.stage==
null||(this.application.removeModule(this.stage),this.stage=null)},__class__:Ap});var Nn=function(a,b,c,d,f,g,h){h==null&&(h=.05);g==null&&(g=!1);this.stitch=g;this.stitch_threshold=h;this.octaves=b;this.channels=c;this.grayscale=d;this.calculateOctaves(f)};r["openfl.display._internal.AbstractNoise"]=Nn;Nn.__name__="openfl.display._internal.AbstractNoise";Nn.prototype={octaves:null,stitch:null,stitch_threshold:null,channels:null,grayscale:null,octaves_frequencies:null,octaves_persistences:null,persistence_max:null,
fill:function(a,b,c,d){},stitching:function(a,b,c,d,f,g,h,l){var k=b>>16&255,q=b>>8&255;b&=255;if(h-f<c){var w=a.getPixel32(h-c,d),v=w>>8&255,z=w&255;f=(h-c)/f;k=this.mixI(w>>16&255,k,f);q=this.mixI(v,q,f);b=this.mixI(z,b,f)}l-g<d&&(w=a.getPixel32(c,l-d),v=w>>8&255,z=w&255,f=(l-d)/g,k=this.mixI(w>>16&255,k,f),q=this.mixI(v,q,f),b=this.mixI(z,b,f));return-16777216|k<<16|q<<8|b},color:function(a,b,c){var d=0,f=0,g=0;null!=a&&(d=this.noiseToColor(a));null!=b&&(f=this.noiseToColor(b));null!=c&&(g=this.noiseToColor(c));
return-16777216|d<<16|f<<8|g},noiseToColor:function(a){return(a*this.persistence_max+1)*128|0},fade:function(a){return a*a*a*(a*(a*6-15)+10)},mixI:function(a,b,c){return(1-c)*a+c*b|0},mix:function(a,b,c){return(1-c)*a+c*b},fastfloor:function(a){return a>0?a|0:a-1|0},dot2d:function(a,b,c){return a[0]*b+a[1]*c},dot:function(a,b,c,d){return a[0]*b+a[1]*c+a[2]*d},calculateOctaves:function(a){this.octaves_frequencies=[];this.octaves_persistences=[];for(var b=this.persistence_max=0,c=this.octaves;b<c;){var d=
b++;var f=Math.pow(2,d);d=Math.pow(a,d);this.persistence_max+=d;this.octaves_frequencies.push(f);this.octaves_persistences.push(d)}this.persistence_max=1/this.persistence_max},__class__:Nn};var Ms=function(){};r["openfl.display._internal.CairoBitmap"]=Ms;Ms.__name__="openfl.display._internal.CairoBitmap";Ms.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(c>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid){var d=b.cairo;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);
b.applyMatrix(a.__renderTransform,d);var f=a.__bitmapData.getSurface();f!=null&&(f=jv.createForSurface(f),jv.set_filter(f,b.__allowSmoothing&&a.smoothing?1:3),d.set_source(f),c==1?d.paint():d.paintWithAlpha(c));b.__popMaskObject(a);b.__setBlendMode(10)}}};Ms.renderDrawable=function(a,b){};Ms.renderDrawableMask=function(a,b){b.cairo.rectangle(0,0,a.get_width(),a.get_height())};var vw=function(){};r["openfl.display._internal.CairoBitmapData"]=vw;vw.__name__="openfl.display._internal.CairoBitmapData";
vw.renderDrawable=function(a,b){};vw.renderDrawableMask=function(a,b){};var Ns=function(){};r["openfl.display._internal.CairoDisplayObject"]=Ns;Ns.__name__="openfl.display._internal.CairoDisplayObject";Ns.render=function(a,b){};Ns.renderDrawable=function(a,b){};Ns.renderDrawableMask=function(a,b){};var ww=function(){};r["openfl.display._internal.CairoDisplayObjectContainer"]=ww;ww.__name__="openfl.display._internal.CairoDisplayObjectContainer";ww.renderDrawable=function(a,b){};ww.renderDrawableMask=
function(a,b){};var Os=function(){};r["openfl.display._internal.CairoGraphics"]=Os;Os.__name__="openfl.display._internal.CairoGraphics";Os.hitTest=function(a,b,c){return!1};Os.render=function(a,b){};Os.renderMask=function(a,b){};var xw=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};r["openfl.display._internal._CairoGraphics.Scale9GridBounds"]=xw;xw.__name__="openfl.display._internal._CairoGraphics.Scale9GridBounds";
xw.prototype={scale9MinX:null,scale9MinY:null,scale9MaxX:null,scale9MaxY:null,unscaledMinX:null,unscaledMinY:null,unscaledMaxX:null,unscaledMaxY:null,getScaleX:function(){if(this.scale9MaxX==null||this.unscaledMaxX==null)return 1;var a=this.unscaledMaxX-this.unscaledMinX;return a==0?1:(this.scale9MaxX-this.scale9MinX)/a},getScaleY:function(){if(this.scale9MaxY==null||this.unscaledMaxY==null)return 1;var a=this.unscaledMaxY-this.unscaledMinY;return a==0?1:(this.scale9MaxY-this.scale9MinY)/a},clear:function(){this.scale9MaxY=
this.scale9MinY=this.scale9MaxX=this.scale9MinX=this.unscaledMaxY=this.unscaledMinY=this.unscaledMaxX=this.unscaledMinX=null},applyUnscaledX:function(a){if(this.unscaledMinX==null||this.unscaledMinX>a)this.unscaledMinX=a;if(this.unscaledMaxX==null||this.unscaledMaxX<a)this.unscaledMaxX=a},applyUnscaledY:function(a){if(this.unscaledMinY==null||this.unscaledMinY>a)this.unscaledMinY=a;if(this.unscaledMaxY==null||this.unscaledMaxY<a)this.unscaledMaxY=a},applyScaledX:function(a){if(this.scale9MinX==null||
this.scale9MinX>a)this.scale9MinX=a;if(this.scale9MaxX==null||this.scale9MaxX<a)this.scale9MaxX=a},applyScaledY:function(a){if(this.scale9MinY==null||this.scale9MinY>a)this.scale9MinY=a;if(this.scale9MaxY==null||this.scale9MaxY<a)this.scale9MaxY=a},__class__:xw};var Ps=function(){};r["openfl.display._internal.CairoShape"]=Ps;Ps.__name__="openfl.display._internal.CairoShape";Ps.render=function(a,b){};Ps.renderDrawable=function(a,b){};Ps.renderDrawableMask=function(a,b){};var yw=function(){};r["openfl.display._internal.CairoSimpleButton"]=
yw;yw.__name__="openfl.display._internal.CairoSimpleButton";yw.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};yw.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var Qs=function(){};r["openfl.display._internal.CairoTextField"]=Qs;Qs.__name__="openfl.display._internal.CairoTextField";Qs.render=function(a,b,c){};Qs.renderDrawable=function(a,
b){};Qs.renderDrawableMask=function(a,b){};var zm=function(){};r["openfl.display._internal.CairoTilemap"]=zm;zm.__name__="openfl.display._internal.CairoTilemap";zm.render=function(a,b){if(a.__renderable&&a.__group.__tiles.length!=0){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=Ea.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);zm.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,
b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,N._new());b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}}};zm.renderTileContainer=function(a,b,c,d,f,g,h,l,k,q,w,v,z,n){var E=b.cairo,H=S.__pool.get();a=a.__tiles;for(var J,Q,T,fa=null,da,pa=0;pa<a.length;)if(da=a[pa],++pa,H.setTo(1,0,0,1,-da.get_originX(),-da.get_originY()),H.concat(da.get_matrix()),H.concat(c),J=da.get_tileset()!=null?da.get_tileset():d,Q=da.get_alpha()*
h,(T=da.get_visible())&&!(Q<=0))if(g||(Q=1),l&&(fa=da.__blendMode!=null?da.__blendMode:k),da.__length>0)zm.renderTileContainer(da,b,H,J,f,g,Q,l,fa,q,w,v,z,n);else if(J!=null){T=da.get_id();if(T==-1){if(da=da.__rect,da==null||da.width<=0||da.height<=0)continue}else{da=J.__data[T];if(da==null)continue;z.setTo(da.x,da.y,da.width,da.height);da=z}J=J.__bitmapData;J!=null&&J.image!=null&&(J!=q&&(w=J.getSurface(),v=jv.createForSurface(w),jv.set_filter(v,f?1:3),E.set_source(v),q=J),l&&b.__setBlendMode(fa),
b.applyMatrix(H,E),n[6]=da.x,n[7]=da.y,jv.set_matrix(v,n),E.set_source(v),E.save(),E.newPath(),E.rectangle(0,0,da.width,da.height),E.clip(),Q==1?E.paint():E.paintWithAlpha(Q),E.restore())}S.__pool.release(H)};zm.renderDrawable=function(a,b){};zm.renderDrawableMask=function(a,b){};var Hn=function(){};r["openfl.display._internal.CanvasBitmap"]=Hn;Hn.__name__="openfl.display._internal.CanvasBitmap";Hn.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(c>0&&a.__bitmapData!=
null&&a.__bitmapData.__isValid&&a.__bitmapData.readable){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a,!1);kb.convertToCanvas(a.__bitmapData.image);d.globalAlpha=c;c=a.__scrollRect;b.setTransform(a.__renderTransform,d);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);c==null?d.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):d.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,c.width,c.height,c.x,c.y,c.width,
c.height);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a,!1)}}};Hn.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);a.__bitmapData!=null&&a.__bitmapData.image!=null&&(a.__imageVersion=a.__bitmapData.image.version);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(l=b.__getAlpha(a.__worldAlpha),l<=0))){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>
0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);k=b.context;b.setTransform(a.__renderTransform,k);var c=a.opaqueBackground;k.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";k.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(l=b.__getAlpha(a.__worldAlpha),!(l<=0)&&(c=a.__graphics,c!=null))){B.render(c,b);var d=c.__width,f=c.__height,g=c.__canvas;if(g!=null&&c.__visible&&d>=1&&f>=1){var h=c.__worldTransform;k=b.context;
q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),k.globalAlpha=l,l=S.__pool.get(),l.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),l.concat(h),b.setTransform(l,k),k.drawImage(g,0,0,d,f),S.__pool.release(l),b.__popMaskObject(a)}}}a.__renderable&&(l=b.__getAlpha(a.__worldAlpha),l>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(k=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),kb.convertToCanvas(a.__bitmapData.image),
k.globalAlpha=l,q=a.__scrollRect,b.setTransform(a.__renderTransform,k),b.__allowSmoothing&&a.smoothing||(k.imageSmoothingEnabled=!1),q==null?k.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):k.drawImage(a.__bitmapData.image.get_src(),q.x,q.y,q.width,q.height,q.x,q.y,q.width,q.height),b.__allowSmoothing&&a.smoothing||(k.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))}else if(c=a.__cacheBitmap,c.__renderable){var l=b.__getAlpha(c.__worldAlpha);
if(l>0&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var k=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);kb.convertToCanvas(c.__bitmapData.image);k.globalAlpha=l;var q=c.__scrollRect;b.setTransform(c.__renderTransform,k);b.__allowSmoothing&&c.smoothing||(k.imageSmoothingEnabled=!1);q==null?k.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):k.drawImage(c.__bitmapData.image.get_src(),q.x,q.y,q.width,
q.height,q.x,q.y,q.width,q.height);b.__allowSmoothing&&c.smoothing||(k.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};Hn.renderDrawableMask=function(a,b){b.context.rect(0,0,a.get_width(),a.get_height())};var ps=function(){};r["openfl.display._internal.CanvasBitmapData"]=ps;ps.__name__="openfl.display._internal.CanvasBitmapData";ps.renderDrawable=function(a,b){if(a.readable){var c=a.image;c.type==Uf.DATA&&kb.convertToCanvas(c);var d=b.context;d.globalAlpha=1;b.setTransform(a.__renderTransform,
d);d.drawImage(c.get_src(),0,0,c.width,c.height)}};ps.renderDrawableMask=function(a,b){};var zl=function(){};r["openfl.display._internal.CanvasDisplayObject"]=zl;zl.__name__="openfl.display._internal.CanvasDisplayObject";zl.render=function(a,b){if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);
var d=b.context;b.setTransform(a.__renderTransform,d);var f=a.opaqueBackground;d.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";d.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(c=b.__getAlpha(a.__worldAlpha),!(c<=0)&&(f=a.__graphics,f!=null))){B.render(f,b);var g=f.__width,h=f.__height,l=f.__canvas;if(l!=null&&f.__visible&&g>=1&&h>=1){var k=f.__worldTransform;d=b.context;var q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),
b.__pushMaskObject(a),d.globalAlpha=c,c=S.__pool.get(),c.scale(1/f.__bitmapScaleX,1/f.__bitmapScaleY),c.concat(k),b.setTransform(c,d),d.drawImage(l,0,0,g,h),S.__pool.release(c),b.__popMaskObject(a)}}}}};zl.renderDrawable=function(a,b){if(a.get_mask()==null||a.get_mask().get_width()>0&&a.get_mask().get_height()>0)if(b.__updateCacheBitmap(a,!1),a.__cacheBitmap!=null&&!a.__isCacheBitmapRender){var c=a.__cacheBitmap;if(c.__renderable){var d=b.__getAlpha(c.__worldAlpha);if(d>0&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&
c.__bitmapData.readable){var f=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);kb.convertToCanvas(c.__bitmapData.image);f.globalAlpha=d;var g=c.__scrollRect;b.setTransform(c.__renderTransform,f);b.__allowSmoothing&&c.smoothing||(f.imageSmoothingEnabled=!1);g==null?f.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):f.drawImage(c.__bitmapData.image.get_src(),g.x,g.y,g.width,g.height,g.x,g.y,g.width,g.height);b.__allowSmoothing&&
c.smoothing||(f.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}}else if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),d<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),f=b.context,b.setTransform(a.__renderTransform,f),d=a.opaqueBackground,f.fillStyle="rgb("+(d>>>16&255)+","+(d>>>8&255)+","+(d&255)+")",f.fillRect(0,0,a.get_width(),a.get_height()),
b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),d<=0||(c=a.__graphics,c==null)))))){B.render(c,b);var h=c.__width,l=c.__height,k=c.__canvas;if(k!=null&&c.__visible&&h>=1&&l>=1){var q=c.__worldTransform;f=b.context;g=a.__scrollRect;if(g==null||g.width>0&&g.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),f.globalAlpha=d,d=S.__pool.get(),d.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),d.concat(q),b.setTransform(d,f),f.drawImage(k,0,0,h,l),
S.__pool.release(d),b.__popMaskObject(a)}}b.__renderEvent(a)};zl.renderDrawableMask=function(a,b){a.__graphics!=null&&B.renderMask(a.__graphics,b)};var qs=function(){};r["openfl.display._internal.CanvasDisplayObjectContainer"]=qs;qs.__name__="openfl.display._internal.CanvasDisplayObjectContainer";qs.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);if(!(!a.__renderable||a.__worldAlpha<=
0||a.get_mask()!=null&&(a.get_mask().get_width()<=0||a.get_mask().get_height()<=0))&&(zl.renderDrawable(a,b),a.__cacheBitmap==null||a.__isCacheBitmapRender)){b.__pushMaskObject(a);if(b.__stage!=null){c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}};qs.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=
c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);a.__graphics!=null&&B.renderMask(a.__graphics,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var ch=function(){ch.empty==null?(this.types=[],this.b=[],this.i=[],this.f=[],this.o=[],this.ff=[],this.ii=[],this.copyOnWrite=!0):this.clear()};r["openfl.display._internal.DrawCommandBuffer"]=ch;ch.__name__="openfl.display._internal.DrawCommandBuffer";ch.prototype={types:null,b:null,copyOnWrite:null,f:null,
ff:null,i:null,ii:null,o:null,append:function(a){if(this.get_length()==0)return this.types=a.types,this.b=a.b,this.i=a.i,this.f=a.f,this.o=a.o,this.ff=a.ff,this.ii=a.ii,this.copyOnWrite=a.copyOnWrite=!0,a;for(var b=new fj(a),c=0,d=a.types;c<d.length;){var f=d[c];++c;switch(f._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=
4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_BITMAP_FILL;f=b;this.beginBitmapFill(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],
f.buffer.b[f.bPos+1]);break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_FILL;f=b;this.beginFill(f.buffer.i[f.iPos],f.buffer.f[f.fPos]);break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;
case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_GRADIENT_FILL;f=b;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:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_SHADER_FILL;f=b;this.beginShaderFill(f.buffer.o[f.oPos]);break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=
4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CUBIC_CURVE_TO;f=b;this.cubicCurveTo(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.f[f.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CURVE_TO;f=b;this.curveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_CIRCLE;f=b;this.drawCircle(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;
b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_ELLIPSE;
f=b;this.drawEllipse(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 8:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_QUADS;f=b;this.drawQuads(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_RECT;f=b;this.drawRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+
2],f.buffer.f[f.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_ROUND_RECT;f=b;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:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;
case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_TRIANGLES;f=b;this.drawTriangles(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+
2],f.buffer.o[f.oPos+3]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.END_FILL;this.endFill();break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;
b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_BITMAP_STYLE;f=b;this.lineBitmapStyle(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1]);break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=
1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=va.LINE_GRADIENT_STYLE;f=b;this.lineGradientStyle(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 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;
case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_STYLE;f=b;this.lineStyle(f.buffer.o[f.oPos],f.buffer.i[f.iPos],f.buffer.f[f.fPos],f.buffer.b[f.bPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+
3],f.buffer.f[f.fPos+1]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_TO;f=b;this.lineTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;
case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.MOVE_TO;f=b;this.moveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);break;case 20:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.OVERRIDE_MATRIX;
f=b;this.overrideMatrix(f.buffer.o[f.oPos]);break;case 21:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.WINDING_EVEN_ODD;this.windingEvenOdd();break;case 22:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=
4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();this.types.push(va.BEGIN_BITMAP_FILL);this.o.push(a);this.o.push(b);this.b.push(c);
this.b.push(d)},beginFill:function(a,b){this.prepareWrite();this.types.push(va.BEGIN_FILL);this.i.push(a);this.f.push(b)},beginGradientFill:function(a,b,c,d,f,g,h,l){this.prepareWrite();this.types.push(va.BEGIN_GRADIENT_FILL);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(h);this.f.push(l)},beginShaderFill:function(a){this.prepareWrite();this.types.push(va.BEGIN_SHADER_FILL);this.o.push(a)},clear:function(){this.types=ch.empty.types;this.b=
ch.empty.b;this.i=ch.empty.i;this.f=ch.empty.f;this.o=ch.empty.o;this.ff=ch.empty.ff;this.ii=ch.empty.ii;this.copyOnWrite=!0},copy:function(){var a=new ch;a.append(this);return a},cubicCurveTo:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(va.CUBIC_CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.f.push(g)},curveTo:function(a,b,c,d){this.prepareWrite();this.types.push(va.CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},destroy:function(){this.clear();
this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},drawCircle:function(a,b,c){this.prepareWrite();this.types.push(va.DRAW_CIRCLE);this.f.push(a);this.f.push(b);this.f.push(c)},drawEllipse:function(a,b,c,d){this.prepareWrite();this.types.push(va.DRAW_ELLIPSE);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawQuads:function(a,b,c){this.prepareWrite();this.types.push(va.DRAW_QUADS);this.o.push(a);this.o.push(b);this.o.push(c)},drawRect:function(a,b,c,d){this.prepareWrite();this.types.push(va.DRAW_RECT);
this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawRoundRect:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(va.DRAW_ROUND_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.o.push(g)},drawTriangles:function(a,b,c,d){this.prepareWrite();this.types.push(va.DRAW_TRIANGLES);this.o.push(a);this.o.push(b);this.o.push(c);this.o.push(d)},endFill:function(){this.prepareWrite();this.types.push(va.END_FILL)},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();
this.types.push(va.LINE_BITMAP_STYLE);this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},lineGradientStyle:function(a,b,c,d,f,g,h,l){this.prepareWrite();this.types.push(va.LINE_GRADIENT_STYLE);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(h);this.f.push(l)},lineStyle:function(a,b,c,d,f,g,h,l){this.prepareWrite();this.types.push(va.LINE_STYLE);this.o.push(a);this.i.push(b);this.f.push(c);this.b.push(d);this.o.push(f);this.o.push(g);
this.o.push(h);this.f.push(l)},lineTo:function(a,b){this.prepareWrite();this.types.push(va.LINE_TO);this.f.push(a);this.f.push(b)},moveTo:function(a,b){this.prepareWrite();this.types.push(va.MOVE_TO);this.f.push(a);this.f.push(b)},prepareWrite:function(){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=!1)},overrideBlendMode:function(a){this.prepareWrite();
this.types.push(va.OVERRIDE_BLEND_MODE);this.o.push(a)},overrideMatrix:function(a){this.prepareWrite();this.types.push(va.OVERRIDE_MATRIX);this.o.push(a)},windingEvenOdd:function(){this.prepareWrite();this.types.push(va.WINDING_EVEN_ODD)},windingNonZero:function(){this.prepareWrite();this.types.push(va.WINDING_NON_ZERO)},get_length:function(){return this.types.length},__class__:ch,__properties__:{get_length:"get_length"}};var B=function(){};r["openfl.display._internal.CanvasGraphics"]=B;B.__name__=
"openfl.display._internal.CanvasGraphics";B.closePath=function(a){a==null&&(a=!1);if(B.context.strokeStyle!=null){a||B.context.closePath();if(!B.hitTesting&&B.strokePattern!=null){var b=B.graphics.__owner.__scale9Grid!=null&&!B.graphics.__owner.__isMask&&B.graphics.__worldTransform.b==0&&B.graphics.__worldTransform.c==0;if(B.bitmapStrokeMatrix!=null||b&&B.strokeScale9Bounds!=null&&B.bitmapStroke!=null){var c=S.__pool.get();B.bitmapStrokeMatrix!=null?c.copyFrom(B.bitmapStrokeMatrix):c.identity();if(b&&
B.strokeScale9Bounds!=null&&B.bitmapStroke!=null){b=B.strokeScale9Bounds.getScaleX();var d=B.strokeScale9Bounds.getScaleY();b>0&&d>0&&c.scale(b,d)}b=new DOMMatrix([c.a,c.b,c.c,c.d,c.tx,c.ty]);B.strokePattern.setTransform(b);S.__pool.release(c)}}B.context.stroke();a&&B.context.closePath();B.context.beginPath()}};B.createBitmapFill=function(a,b,c){kb.convertToCanvas(a.image);B.setSmoothing(c);return B.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};B.createGradientPattern=function(a,
b,c,d,f,g,h,l){h=!1;f==null&&(f=S.__pool.get(),f.identity(),h=!0);switch(a){case 0:if(g==0){a=Qa.__pool.get();a.setTo(-819.2,0);l=a.x;var k=a.y;a.x=l*f.a+k*f.c+f.tx;a.y=l*f.b+k*f.d+f.ty;var q=Qa.__pool.get();q.setTo(819.2,0);l=q.x;k=q.y;q.x=l*f.a+k*f.c+f.tx;q.y=l*f.b+k*f.d+f.ty;l=B.graphics.__owner.__scale9Grid;if(k=l!=null&&!B.graphics.__owner.__isMask&&B.graphics.__worldTransform.b==0&&B.graphics.__worldTransform.c==0)a.x=B.toScale9Position(a.x,l.x,l.width,B.bounds.width,B.graphics.__owner.get_scaleX()),
a.y=B.toScale9Position(a.y,l.y,l.height,B.bounds.height,B.graphics.__owner.get_scaleY()),q.x=B.toScale9Position(q.x,l.x,l.width,B.bounds.width,B.graphics.__owner.get_scaleX()),q.y=B.toScale9Position(q.y,l.y,l.height,B.bounds.height,B.graphics.__owner.get_scaleY());l=B.context.createLinearGradient(a.x,a.y,q.x,q.y);B.pendingMatrix=null;B.inversePendingMatrix=null;k=0;for(var w=b.length;k<w;){var v=k++;g=d[v]/255;g<0?g=0:g>1&&(g=1);l.addColorStop(g,B.getRGBA(b[v],c[v]))}a!=null&&Qa.__pool.release(a);
q!=null&&Qa.__pool.release(q);h&&S.__pool.release(f);return l}l=.5*((g==0?1:25)-1)*1638.4;h=window.document.createElement("canvas");a=h.getContext("2d");q=B.getDimensions(f);h.width=B.context.canvas.width;h.height=B.context.canvas.height;l=B.context.createLinearGradient(-819.2-l,0,819.2+l,0);if(g==1)for(var z=0,n=.04;z<1;){k=0;for(w=b.length;k<w;)v=k++,g=d[v]/255,g=z+g*n,g<0?g=0:g>1&&(g=1),l.addColorStop(g,B.getRGBA(b[v],c[v]));z+=n;for(k=b.length-1;k>=0;)g=d[k]/255,g=z+(1-g)*n,g<0?g=0:g>1&&(g=1),
l.addColorStop(g,B.getRGBA(b[k],c[k])),--k;z+=n}else if(g==2)for(z=0,n=.04;z<1;){k=0;for(w=b.length;k<w;)v=k++,g=d[v]/255,g=z+g*n,g<0?g=0:g>1&&(g=.999),l.addColorStop(g,B.getRGBA(b[v],c[v]));g=z+.001;g<0?g=0:g>1&&(g=1);l.addColorStop(g-.001,B.getRGBA(b[b.length-1],c[c.length-1]));l.addColorStop(g,B.getRGBA(b[0],c[0]));z+=n}B.pendingMatrix=new S;B.pendingMatrix.tx=f.tx-q.width/2;B.pendingMatrix.ty=f.ty-q.height/2;B.inversePendingMatrix=B.pendingMatrix.clone();B.inversePendingMatrix.invert();b=new Path2D;
b.rect(0,0,h.width,h.height);b.closePath();f=new DOMMatrix([f.a,f.b,f.c,f.d,f.tx,f.ty]);c=f.inverse();d=new Path2D;d.addPath(b,c);a.fillStyle=l;a.setTransform(f.a,f.b,f.c,f.d,f.e,f.f);a.fill(d);return B.context.createPattern(h,"no-repeat");case 1:l>1?l=1:l<-1&&(l=-1);a=Qa.__pool.get();a.x=l*819.2;a.y=0;l=a.x;k=a.y;a.x=l*f.a+k*f.c+f.tx;a.y=l*f.b+k*f.d+f.ty;q=Qa.__pool.get();q.setTo(0,0);l=q.x;k=q.y;q.x=l*f.a+k*f.c+f.tx;q.y=l*f.b+k*f.d+f.ty;g=Qa.__pool.get();g.x=819.2;g.y=0;l=g.x;k=g.y;g.x=l*f.a+k*
f.c+f.tx;g.y=l*f.b+k*f.d+f.ty;l=B.graphics.__owner.__scale9Grid;if(k=l!=null&&!B.graphics.__owner.__isMask&&B.graphics.__worldTransform.b==0&&B.graphics.__worldTransform.c==0)a.x=B.toScale9Position(a.x,l.x,l.width,B.bounds.width,B.graphics.__owner.get_scaleX()),a.y=B.toScale9Position(a.y,l.y,l.height,B.bounds.height,B.graphics.__owner.get_scaleY()),q.x=B.toScale9Position(q.x,l.x,l.width,B.bounds.width,B.graphics.__owner.get_scaleX()),q.y=B.toScale9Position(q.y,l.y,l.height,B.bounds.height,B.graphics.__owner.get_scaleY()),
g.x=B.toScale9Position(g.x,l.x,l.width,B.bounds.width,B.graphics.__owner.get_scaleX()),g.y=B.toScale9Position(g.y,l.y,l.height,B.bounds.height,B.graphics.__owner.get_scaleY());l=g.x-q.x;k=g.y-q.y;Qa.__pool.release(g);l=B.context.createRadialGradient(a.x,a.y,0,q.x,q.y,Math.sqrt(l*l+k*k));B.pendingMatrix=null;B.inversePendingMatrix=null;k=0;for(w=b.length;k<w;)v=k++,g=d[v]/255,g<0?g=0:g>1&&(g=1),l.addColorStop(g,B.getRGBA(b[v],c[v]));a!=null&&Qa.__pool.release(a);q!=null&&Qa.__pool.release(q);h&&S.__pool.release(f);
return l}};B.getRGBA=function(a,b){var c=(a&16711680)>>>16,d=(a&65280)>>>8;a&=255;return"rgba("+(c==null?"null":L.string(ta.toFloat(c)))+", "+(d==null?"null":L.string(ta.toFloat(d)))+", "+(a==null?"null":L.string(ta.toFloat(a)))+", "+b+")"};B.getDimensions=function(a){var b=Math.cos(Math.atan2(a.c,a.a)),c=a.a/b*1638.4;a=a.d/b*1638.4;c==0&&a==0&&(c=a=819.2);return{width:c,height:a}};B.createTempPatternCanvas=function(a,b,c,d){var f=window.document.createElement("canvas"),g=f.getContext("2d");f.width=
c;f.height=d;a=a.image.get_src();g.fillStyle=g.createPattern(a,b?"repeat":"no-repeat");g.beginPath();g.moveTo(0,0);g.lineTo(0,d);g.lineTo(c,d);g.lineTo(c,0);g.lineTo(0,0);g.closePath();B.hitTesting||g.fill(B.windingRule);return f};B.drawRoundRect=function(a,b,c,d,f,g,h,l,k,q,w){g==null&&(g=f);f*=.5;g*=.5;f>c/2&&(f=c/2);g>d/2&&(g=d/2);if(h!=null){var v=B.toScale9Position(a,h.x,h.width,l,q),z=B.toScale9Position(b,h.y,h.height,k,w),n=B.toScale9Position(a+c,h.x,h.width,l,q),E=B.toScale9Position(b+d,h.y,
h.height,k,w);if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(a),B.applyScale9GridUnscaledY(b),B.applyScale9GridUnscaledX(a+c),B.applyScale9GridUnscaledY(b+d),B.applyScale9GridScaledX(v),B.applyScale9GridScaledY(z),B.applyScale9GridScaledX(n),B.applyScale9GridScaledY(E);var H=B.toScale9Position(a+f,h.x,h.width,l,q),J=B.toScale9Position(b+g,h.y,h.height,k,w);a=B.toScale9Position(a+c-f,h.x,h.width,l,q);b=B.toScale9Position(b+
d-g,h.y,h.height,k,w);B.context.moveTo(H,z);B.context.lineTo(a,z);B.context.quadraticCurveTo(n,z,n,J);B.context.lineTo(n,b);B.context.quadraticCurveTo(n,E,a,E);B.context.lineTo(H,E);B.context.quadraticCurveTo(v,E,v,b);B.context.lineTo(v,J);B.context.quadraticCurveTo(v,z,H,z)}else v=a+c,d=b+d,z=-f+f*.7071067811865476,n=-f+f*.41421356237309503,E=-g+g*.7071067811865476,H=-g+g*.41421356237309503,B.context.moveTo(v,d-g),B.context.quadraticCurveTo(v,d+H,v+z,d+E),B.context.quadraticCurveTo(v+n,d,v-f,d),
B.context.lineTo(a+f,d),B.context.quadraticCurveTo(a-n,d,a-z,d+E),B.context.quadraticCurveTo(a,d+H,a,d-g),B.context.lineTo(a,b+g),B.context.quadraticCurveTo(a,b-H,a-z,b-E),B.context.quadraticCurveTo(a-n,b,a+f,b),B.context.lineTo(v-f,b),B.context.quadraticCurveTo(v+n,b,v+z,b-E),B.context.quadraticCurveTo(v,b-H,v,b+g),B.context.lineTo(v,d-g)};B.endFill=function(){B.context.beginPath();B.playCommands(B.fillCommands,!1);B.fillCommands.clear()};B.endStroke=function(){B.context.beginPath();B.playCommands(B.strokeCommands,
!0);B.context.closePath();B.strokeCommands.clear()};B.toScale9Position=function(a,b,c,d,f){if(f<=0)return 0;var g=d-c-b;d=d*f-b-g;return a<=b?d<0?a*(b+g+d)/(b+g):a:a>=b+c?d<0?(b+(a-b-c))*(b+g+d)/(b+g):b+d+(a-b-c):d<0?b*(b+g+d)/(b+g):b+d*(a-b)/c};B.applyScale9GridUnscaledX=function(a){B.fillScale9Bounds!=null&&B.bitmapFill!=null&&B.fillScale9Bounds.applyUnscaledX(a);B.strokeScale9Bounds!=null&&B.bitmapStroke!=null&&B.strokeScale9Bounds.applyUnscaledX(a)};B.applyScale9GridUnscaledY=function(a){B.fillScale9Bounds!=
null&&B.bitmapFill!=null&&B.fillScale9Bounds.applyUnscaledY(a);B.strokeScale9Bounds!=null&&B.bitmapStroke!=null&&B.strokeScale9Bounds.applyUnscaledY(a)};B.applyScale9GridScaledX=function(a){B.fillScale9Bounds!=null&&B.bitmapFill!=null&&B.fillScale9Bounds.applyScaledX(a);B.strokeScale9Bounds!=null&&B.bitmapStroke!=null&&B.strokeScale9Bounds.applyScaledX(a)};B.applyScale9GridScaledY=function(a){B.fillScale9Bounds!=null&&B.bitmapFill!=null&&B.fillScale9Bounds.applyScaledY(a);B.strokeScale9Bounds!=null&&
B.bitmapStroke!=null&&B.strokeScale9Bounds.applyScaledY(a)};B.hitTest=function(a,b,c){B.bounds=a.__bounds;B.graphics=a;if(a.__commands.get_length()==0||B.bounds==null||B.bounds.width<=0||B.bounds.height<=0)return B.graphics=null,!1;B.hitTesting=!0;var d=a.__renderTransform,f=b*d.b+c*d.d+d.ty;b=b*d.a+c*d.c+d.tx;c=f;b-=B.bounds.x*d.a+B.bounds.y*d.c+d.tx;c-=B.bounds.x*d.b+B.bounds.y*d.d+d.ty;f=a.__canvas;var g=a.__context;a.__canvas=B.hitTestCanvas;a.__context=B.hitTestContext;B.context=a.__context;
B.context.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);B.fillCommands.clear();B.strokeCommands.clear();B.hasFill=!1;B.hasStroke=!1;B.bitmapFill=null;B.bitmapRepeat=!1;B.windingRule="evenodd";d=new fj(a.__commands);for(var h=0,l=a.__commands.types;h<l.length;){var k=l[h];++h;switch(k._hx_index){case 0:case 1:case 2:case 3:B.endFill();if(B.hasFill&&B.context.isPointInPath(b,c,B.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,B.graphics=null,!0;B.endStroke();if(B.hasStroke&&B.context.isPointInStroke(b,
c))return d.destroy(),a.__canvas=f,a.__context=g,B.graphics=null,!0;if(k==va.BEGIN_BITMAP_FILL){switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=
4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.BEGIN_BITMAP_FILL;k=d;B.fillCommands.beginBitmapFill(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1]);B.strokeCommands.beginBitmapFill(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1])}else if(k==va.BEGIN_GRADIENT_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.BEGIN_GRADIENT_FILL;k=d;B.fillCommands.beginGradientFill(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos]);B.strokeCommands.beginGradientFill(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos])}else if(k==va.BEGIN_SHADER_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.BEGIN_SHADER_FILL;k=d;B.fillCommands.beginShaderFill(k.buffer.o[k.oPos]);B.strokeCommands.beginShaderFill(k.buffer.o[k.oPos])}else{switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.BEGIN_FILL;k=d;B.fillCommands.beginFill(k.buffer.i[k.iPos],1);B.strokeCommands.beginFill(k.buffer.i[k.iPos],1)}break;case 4:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=va.CUBIC_CURVE_TO;k=d;B.fillCommands.cubicCurveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.f[k.fPos+5]);B.strokeCommands.cubicCurveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.f[k.fPos+5]);break;case 5:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=
1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.CURVE_TO;k=d;B.fillCommands.curveTo(k.buffer.f[k.fPos],
k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);B.strokeCommands.curveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);break;case 6:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.DRAW_CIRCLE;k=d;B.fillCommands.drawCircle(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2]);B.strokeCommands.drawCircle(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2]);break;case 7:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.DRAW_ELLIPSE;k=d;B.fillCommands.drawEllipse(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);B.strokeCommands.drawEllipse(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);break;case 9:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;
case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.DRAW_RECT;k=d;B.fillCommands.drawRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+
2],k.buffer.f[k.fPos+3]);B.strokeCommands.drawRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);break;case 10:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=
4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.DRAW_ROUND_RECT;k=d;B.fillCommands.drawRoundRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.o[k.oPos]);B.strokeCommands.drawRoundRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+
2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.o[k.oPos]);break;case 13:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.END_FILL;B.endFill();if(B.hasFill&&B.context.isPointInPath(b,c,B.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,B.graphics=null,!0;B.endStroke();if(B.hasStroke&&B.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,B.graphics=null,!0;B.hasFill=!1;B.bitmapFill=null;break;case 14:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.LINE_BITMAP_STYLE;k=d;B.strokeCommands.lineBitmapStyle(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1]);break;case 15:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.LINE_GRADIENT_STYLE;k=d;B.strokeCommands.lineGradientStyle(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+
3],k.buffer.f[k.fPos]);break;case 16:B.endStroke();if(B.hasStroke&&B.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,B.graphics=null,!0;switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;
case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.LINE_STYLE;k=d;B.strokeCommands.lineStyle(k.buffer.o[k.oPos],k.buffer.i[k.iPos],1,k.buffer.b[k.bPos],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos+1]);break;case 17:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.LINE_TO;k=d;B.fillCommands.lineTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);B.strokeCommands.lineTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);break;case 18:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=va.MOVE_TO;k=d;B.fillCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);B.strokeCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);break;case 21:B.windingRule="evenodd";break;case 22:B.windingRule=
"nonzero";break;default:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=
1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=k}}h=!1;B.fillCommands.get_length()>0&&B.endFill();B.hasFill&&B.context.isPointInPath(b,c,B.windingRule)&&(h=!0);B.strokeCommands.get_length()>0&&B.endStroke();B.hasStroke&&B.context.isPointInStroke(b,c)&&(h=!0);d.destroy();a.__canvas=f;a.__context=g;B.graphics=null;return h};B.isCCW=function(a,b,c,d,f,g){return(c-a)*(g-b)-(d-b)*(f-a)<0};B.normalizeUVT=function(a,b){b==null&&
(b=!1);for(var c=-Infinity,d,f=a.get_length(),g=1,h=f+1;g<h;)d=g++,b&&d%3==0||(d=a.get(d-1),c<d&&(c=d));if(!b)return{max:c,uvt:a};var l=gb.toFloatVector(null);g=1;for(h=f+1;g<h;)d=g++,b&&d%3==0||l.push(a.get(d-1));return{max:c,uvt:l}};B.playCommands=function(a,b){b==null&&(b=!1);B.bounds=B.graphics.__bounds;var c=B.bounds.x,d=B.bounds.y,f=0,g=0,h=!1,l=0,k=0,q=!1;B.windingRule="evenodd";B.setSmoothing(!0);var w=!1,v=B.graphics.__owner.__scale9Grid,z=v!=null&&!B.graphics.__owner.__isMask&&B.graphics.__worldTransform.b==
0&&B.graphics.__worldTransform.c==0;z||(v=null,B.fillScale9Bounds!=null&&B.fillScale9Bounds.clear(),B.strokeScale9Bounds!=null&&B.strokeScale9Bounds.clear());var n=new fj(a),E,H,J,Q=null,T=null,fa=0,da=a.types;a:for(;fa<da.length;){var pa=da[fa];++fa;switch(pa._hx_index){case 0:switch(n.prev._hx_index){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 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}n.prev=va.BEGIN_BITMAP_FILL;var xa=n;if(xa.buffer.o[xa.oPos].readable)B.context.fillStyle=B.createBitmapFill(xa.buffer.o[xa.oPos],xa.buffer.b[xa.bPos],
xa.buffer.b[xa.bPos+1]),B.bitmapFill=xa.buffer.o[xa.oPos];else{var Ua=Z.hex(0,6);B.context.fillStyle="#"+Ua;B.bitmapFill=null}B.bitmapRepeat=xa.buffer.b[xa.bPos];B.hasFill=!0;B.fillScale9Bounds!=null?B.fillScale9Bounds.clear():z&&B.bitmapFill!=null&&(B.fillScale9Bounds=new Rs);xa.buffer.o[xa.oPos+1]!=null?(B.pendingMatrix=xa.buffer.o[xa.oPos+1],B.inversePendingMatrix=xa.buffer.o[xa.oPos+1].clone(),B.inversePendingMatrix.invert()):(B.pendingMatrix=null,B.inversePendingMatrix=null);break;case 1:switch(n.prev._hx_index){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 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}n.prev=va.BEGIN_FILL;var Sa=n;if(Sa.buffer.f[Sa.fPos]<.005)B.hasFill=!1;else{if(Sa.buffer.f[Sa.fPos]==1){var Ka=Z.hex(Sa.buffer.i[Sa.iPos]&16777215,6);B.context.fillStyle="#"+Ka}else{var hb=(Sa.buffer.i[Sa.iPos]&16711680)>>>16;var Ra=(Sa.buffer.i[Sa.iPos]&65280)>>>8;var Jb=Sa.buffer.i[Sa.iPos]&255;B.context.fillStyle="rgba("+hb+", "+Ra+", "+Jb+", "+Sa.buffer.f[Sa.fPos]+")"}B.hasFill=!0;B.setSmoothing(!0)}B.bitmapFill=null;B.fillScale9Bounds!=null&&
B.fillScale9Bounds.clear();break;case 2:switch(n.prev._hx_index){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 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}n.prev=va.BEGIN_GRADIENT_FILL;var vb=n;B.context.fillStyle=B.createGradientPattern(vb.buffer.o[vb.oPos],vb.buffer.ii[vb.iiPos],vb.buffer.ff[vb.ffPos],vb.buffer.ii[vb.iiPos+1],vb.buffer.o[vb.oPos+1],vb.buffer.o[vb.oPos+2],vb.buffer.o[vb.oPos+3],vb.buffer.f[vb.fPos]);B.hasFill=!0;B.bitmapFill=null;B.setSmoothing(!0);B.fillScale9Bounds!=null&&B.fillScale9Bounds.clear();break;
case 3:switch(n.prev._hx_index){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 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}n.prev=va.BEGIN_SHADER_FILL;var Cb=n,pc=Cb.buffer.o[Cb.oPos];if(pc.inputCount>0){B.bitmapFill=pc.inputs[0];if(B.bitmapFill.readable)B.context.fillStyle=B.createBitmapFill(B.bitmapFill,pc.inputWrap[0]!=0,pc.inputFilter[0]!=5);else{var qd=Z.hex(0,6);B.context.fillStyle="#"+qd}B.hasFill=!0;B.pendingMatrix=null;B.inversePendingMatrix=null}B.fillScale9Bounds!=null&&B.fillScale9Bounds.clear();break;case 4:switch(n.prev._hx_index){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 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}n.prev=va.CUBIC_CURVE_TO;var Gb=n;w=!0;if(z){var nd=B.toScale9Position(Gb.buffer.f[Gb.fPos],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),le=B.toScale9Position(Gb.buffer.f[Gb.fPos+1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),Pf=B.toScale9Position(Gb.buffer.f[Gb.fPos+2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),mf=B.toScale9Position(Gb.buffer.f[Gb.fPos+3],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),
Ig=B.toScale9Position(Gb.buffer.f[Gb.fPos+4],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Af=B.toScale9Position(Gb.buffer.f[Gb.fPos+5],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(Gb.buffer.f[Gb.fPos+4]),B.applyScale9GridUnscaledY(Gb.buffer.f[Gb.fPos+5]),B.applyScale9GridScaledX(Ig),B.applyScale9GridScaledY(Af);B.context.bezierCurveTo(nd-c,le-
d,Pf-c,mf-d,Ig-c,Af-d);f=Ig;g=Af}else B.context.bezierCurveTo(Gb.buffer.f[Gb.fPos]-c,Gb.buffer.f[Gb.fPos+1]-d,Gb.buffer.f[Gb.fPos+2]-c,Gb.buffer.f[Gb.fPos+3]-d,Gb.buffer.f[Gb.fPos+4]-c,Gb.buffer.f[Gb.fPos+5]-d),f=Gb.buffer.f[Gb.fPos+4],g=Gb.buffer.f[Gb.fPos+5];break;case 5:switch(n.prev._hx_index){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 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}n.prev=va.CURVE_TO;var Xd=n;w=!0;if(z){var Yd=B.toScale9Position(Xd.buffer.f[Xd.fPos],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),
Uk=B.toScale9Position(Xd.buffer.f[Xd.fPos+1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),jd=B.toScale9Position(Xd.buffer.f[Xd.fPos+2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),be=B.toScale9Position(Xd.buffer.f[Xd.fPos+3],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(Xd.buffer.f[Xd.fPos+2]),B.applyScale9GridUnscaledY(Xd.buffer.f[Xd.fPos+
3]),B.applyScale9GridScaledX(jd),B.applyScale9GridScaledY(be);B.context.quadraticCurveTo(Yd-c,Uk-d,jd-c,be-d);f=jd;g=be}else B.context.quadraticCurveTo(Xd.buffer.f[Xd.fPos]-c,Xd.buffer.f[Xd.fPos+1]-d,Xd.buffer.f[Xd.fPos+2]-c,Xd.buffer.f[Xd.fPos+3]-d),f=Xd.buffer.f[Xd.fPos+2],g=Xd.buffer.f[Xd.fPos+3];break;case 6:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_CIRCLE;var Gc=n;w=!0;if(z){var hk=B.toScale9Position(Gc.buffer.f[Gc.fPos]-Gc.buffer.f[Gc.fPos+
2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Rc=B.toScale9Position(Gc.buffer.f[Gc.fPos+1]-Gc.buffer.f[Gc.fPos+2],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),ad=B.toScale9Position(Gc.buffer.f[Gc.fPos]+Gc.buffer.f[Gc.fPos+2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Nd=B.toScale9Position(Gc.buffer.f[Gc.fPos+1]+Gc.buffer.f[Gc.fPos+2],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=
null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(Gc.buffer.f[Gc.fPos]-Gc.buffer.f[Gc.fPos+2]),B.applyScale9GridUnscaledY(Gc.buffer.f[Gc.fPos+1]-Gc.buffer.f[Gc.fPos+2]),B.applyScale9GridUnscaledX(Gc.buffer.f[Gc.fPos]+Gc.buffer.f[Gc.fPos+2]),B.applyScale9GridUnscaledY(Gc.buffer.f[Gc.fPos+1]+Gc.buffer.f[Gc.fPos+2]),B.applyScale9GridScaledX(hk),B.applyScale9GridScaledY(Rc),B.applyScale9GridScaledX(ad),B.applyScale9GridScaledY(Nd);var Hc=hk-c;var Fd=Rc-d;var Te=ad-hk;var Vf=Nd-Rc;if(Te!=0||Vf!=0){var Jg=
Te/2*.5522848;var bf=Vf/2*.5522848;var ik=Hc+Te;var jk=Fd+Vf;var Le=Hc+Te/2;var Wf=Fd+Vf/2;B.context.moveTo(Hc,Wf);B.context.bezierCurveTo(Hc,Wf-bf,Le-Jg,Fd,Le,Fd);B.context.bezierCurveTo(Le+Jg,Fd,ik,Wf-bf,ik,Wf);B.context.bezierCurveTo(ik,Wf+bf,Le+Jg,jk,Le,jk);B.context.bezierCurveTo(Le-Jg,jk,Hc,Wf+bf,Hc,Wf)}}else Gc.buffer.f[Gc.fPos+2]!=0&&(B.context.moveTo(Gc.buffer.f[Gc.fPos]-c+Gc.buffer.f[Gc.fPos+2],Gc.buffer.f[Gc.fPos+1]-d),B.context.arc(Gc.buffer.f[Gc.fPos]-c,Gc.buffer.f[Gc.fPos+1]-d,Gc.buffer.f[Gc.fPos+
2],0,Math.PI*2,!0));break;case 7:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_ELLIPSE;var ed=n;w=!0;if(z){var dh=B.toScale9Position(ed.buffer.f[ed.fPos],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Cl=B.toScale9Position(ed.buffer.f[ed.fPos+1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),Vk=B.toScale9Position(ed.buffer.f[ed.fPos]+ed.buffer.f[ed.fPos+2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),
On=B.toScale9Position(ed.buffer.f[ed.fPos+1]+ed.buffer.f[ed.fPos+3],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(ed.buffer.f[ed.fPos]),B.applyScale9GridUnscaledY(ed.buffer.f[ed.fPos+1]),B.applyScale9GridUnscaledX(ed.buffer.f[ed.fPos]+ed.buffer.f[ed.fPos+2]),B.applyScale9GridUnscaledY(ed.buffer.f[ed.fPos+1]+ed.buffer.f[ed.fPos+3]),B.applyScale9GridScaledX(dh),
B.applyScale9GridScaledY(Cl),B.applyScale9GridScaledX(Vk),B.applyScale9GridScaledY(On);Hc=dh;Fd=Cl;Te=Vk-dh;Vf=On-Cl}else Hc=ed.buffer.f[ed.fPos],Fd=ed.buffer.f[ed.fPos+1],Te=ed.buffer.f[ed.fPos+2],Vf=ed.buffer.f[ed.fPos+3];if(Te!=0||Vf!=0)Hc-=c,Fd-=d,Jg=Te/2*.5522848,bf=Vf/2*.5522848,ik=Hc+Te,jk=Fd+Vf,Le=Hc+Te/2,Wf=Fd+Vf/2,B.context.moveTo(Hc,Wf),B.context.bezierCurveTo(Hc,Wf-bf,Le-Jg,Fd,Le,Fd),B.context.bezierCurveTo(Le+Jg,Fd,ik,Wf-bf,ik,Wf),B.context.bezierCurveTo(ik,Wf+bf,Le+Jg,jk,Le,jk),B.context.bezierCurveTo(Le-
Jg,jk,Hc,Wf+bf,Hc,Wf);break;case 8:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_QUADS;var kk=n,Rh=kk.buffer.o[kk.oPos],Wk=kk.buffer.o[kk.oPos+1],he=kk.buffer.o[kk.oPos+2],Xk=Wk!=null,Dl=!1,Ae=!1,Fj=Xk?Wk.get_length():Math.floor(Rh.get_length()/4);if(Fj==0)return;he!=null&&(he.get_length()>=Fj*6?Ae=Dl=!0:he.get_length()>=Fj*4?Dl=!0:he.get_length()>=Fj*2&&(Ae=!0));var te=Ea.__pool.get(),ue=S.__pool.get(),El=B.graphics.__renderTransform;
B.context.save();for(var Fl=0,Am=Fj;Fl<Am;){var lk=Fl++;var vi=Xk?Wk.get(lk)*4:lk*4;if(!(vi<0||(te.setTo(Rh.get(vi),Rh.get(vi+1),Rh.get(vi+2),Rh.get(vi+3)),te.width<=0||te.height<=0))){if(Dl&&Ae){var Bf=lk*6;ue.setTo(he.get(Bf),he.get(Bf+1),he.get(Bf+2),he.get(Bf+3),he.get(Bf+4),he.get(Bf+5))}else Dl?(Bf=lk*4,ue.setTo(he.get(Bf),he.get(Bf+1),he.get(Bf+2),he.get(Bf+3),te.x,te.y)):Ae?(Bf=lk*2,ue.tx=he.get(Bf),ue.ty=he.get(Bf+1)):(ue.tx=te.x,ue.ty=te.y);ue.tx+=f-c;ue.ty+=g-d;ue.concat(El);B.context.setTransform(ue.a,
ue.b,ue.c,ue.d,ue.tx,ue.ty);B.bitmapFill!=null&&B.bitmapFill.readable?B.context.drawImage(B.bitmapFill.image.get_src(),te.x,te.y,te.width,te.height,0,0,te.width,te.height):B.context.fillRect(0,0,te.width,te.height)}}Ea.__pool.release(te);S.__pool.release(ue);B.context.restore();break;case 9:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_RECT;var Xb=n;var Yk=!1;if(B.bitmapFill!=null&&B.bitmapFill.readable&&!B.hitTesting&&!z){var mk=
J=H=E=0;var kg=!0;if(B.pendingMatrix!=null)if(B.pendingMatrix.b!=0||B.pendingMatrix.c!=0)kg=!1;else{Q==null&&(Q=Qa.__pool.get());T==null&&(T=Qa.__pool.get());Q.setTo(Xb.buffer.f[Xb.fPos],Xb.buffer.f[Xb.fPos+1]);var Zk=B.inversePendingMatrix,Bm=Q.x,Gj=Q.y;Q.x=Bm*Zk.a+Gj*Zk.c+Zk.tx;Q.y=Bm*Zk.b+Gj*Zk.d+Zk.ty;T.setTo(Xb.buffer.f[Xb.fPos]+Xb.buffer.f[Xb.fPos+2],Xb.buffer.f[Xb.fPos+1]+Xb.buffer.f[Xb.fPos+3]);var Kg=B.inversePendingMatrix,lg=T.x,Pn=T.y;T.x=lg*Kg.a+Pn*Kg.c+Kg.tx;T.y=lg*Kg.b+Pn*Kg.d+Kg.ty;
E=Q.y;mk=Q.x;J=T.y;H=T.x}else E=Xb.buffer.f[Xb.fPos+1],mk=Xb.buffer.f[Xb.fPos],J=Xb.buffer.f[Xb.fPos+1]+Xb.buffer.f[Xb.fPos+3],H=Xb.buffer.f[Xb.fPos]+Xb.buffer.f[Xb.fPos+2];kg&&E>=0&&mk>=0&&H<=B.bitmapFill.width&&J<=B.bitmapFill.height&&(Yk=!0,B.hitTesting||B.context.drawImage(B.bitmapFill.image.get_src(),mk,E,H-mk,J-E,Xb.buffer.f[Xb.fPos]-c,Xb.buffer.f[Xb.fPos+1]-d,Xb.buffer.f[Xb.fPos+2],Xb.buffer.f[Xb.fPos+3]))}if(!Yk)if(w=!0,z){var Ue=B.toScale9Position(Xb.buffer.f[Xb.fPos],v.x,v.width,B.bounds.width,
B.graphics.__owner.get_scaleX()),$k=B.toScale9Position(Xb.buffer.f[Xb.fPos+1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),Fp=B.toScale9Position(Xb.buffer.f[Xb.fPos]+Xb.buffer.f[Xb.fPos+2],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),al=B.toScale9Position(Xb.buffer.f[Xb.fPos+1]+Xb.buffer.f[Xb.fPos+3],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(Xb.buffer.f[Xb.fPos]),
B.applyScale9GridUnscaledY(Xb.buffer.f[Xb.fPos+1]),B.applyScale9GridUnscaledX(Xb.buffer.f[Xb.fPos]+Xb.buffer.f[Xb.fPos+2]),B.applyScale9GridUnscaledY(Xb.buffer.f[Xb.fPos+1]+Xb.buffer.f[Xb.fPos+3]),B.applyScale9GridScaledX(Ue),B.applyScale9GridScaledY($k),B.applyScale9GridScaledX(Fp),B.applyScale9GridScaledY(al);var tg=Fp-Ue,nk=al-$k;tg==0&&nk==0||B.context.rect(Ue-c,$k-d,tg,nk)}else Xb.buffer.f[Xb.fPos+2]==0&&Xb.buffer.f[Xb.fPos+3]==0||B.context.rect(Xb.buffer.f[Xb.fPos]-c,Xb.buffer.f[Xb.fPos+1]-
d,Xb.buffer.f[Xb.fPos+2],Xb.buffer.f[Xb.fPos+3]);break;case 10:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_ROUND_RECT;var ug=n;w=!0;B.drawRoundRect(ug.buffer.f[ug.fPos]-c,ug.buffer.f[ug.fPos+1]-d,ug.buffer.f[ug.fPos+2],ug.buffer.f[ug.fPos+3],ug.buffer.f[ug.fPos+4],ug.buffer.o[ug.oPos],v,B.bounds.width,B.bounds.height,B.graphics.__owner.get_scaleX(),B.graphics.__owner.get_scaleY());break;case 12:switch(n.prev._hx_index){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 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}n.prev=va.DRAW_TRIANGLES;var Sh=n,Od=Sh.buffer.o[Sh.oPos],Ji=Sh.buffer.o[Sh.oPos+1],zh=Sh.buffer.o[Sh.oPos+2],Ah=null,ok=B.bitmapFill==null;if(ok&&zh!=null)break a;if(!ok&&zh!=null){var Ss=zh.get_length()!=Od.get_length(),Gp=B.normalizeUVT(zh,Ss),Ts=Gp.max;zh=Gp.uvt;Ah=Ts>1?B.createTempPatternCanvas(B.bitmapFill,B.bitmapRepeat,B.bounds.width|0,B.bounds.height|0):B.createTempPatternCanvas(B.bitmapFill,B.bitmapRepeat,B.bitmapFill.width,B.bitmapFill.height)}for(var ij=
0,Hp=Ji.get_length(),jj,Gl,kj,ie,vg,Hj,Th,Ki,pk,Bh,Lg,wg,Mg,eh,Xf,Ij,Jj,Cf,fh,Yf,xg,lj,Ip,Jp,Cv,zw,Qn,ve;ij<Hp;){jj=ij;Gl=ij+1;kj=ij+2;ie=Ji.get(jj)*2;vg=Ji.get(jj)*2+1;Hj=Ji.get(Gl)*2;Th=Ji.get(Gl)*2+1;Ki=Ji.get(kj)*2;pk=Ji.get(kj)*2+1;if(z){var Aw=B.toScale9Position(Od.get(ie),v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Bw=B.toScale9Position(Od.get(vg),v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),Cw=B.toScale9Position(Od.get(Hj),v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),
Dw=B.toScale9Position(Od.get(Th),v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY()),Kp=B.toScale9Position(Od.get(Ki),v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Dv=B.toScale9Position(Od.get(pk),v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(Od.get(ie)),B.applyScale9GridUnscaledY(Od.get(vg)),B.applyScale9GridUnscaledX(Od.get(Hj)),B.applyScale9GridUnscaledY(Od.get(Th)),
B.applyScale9GridUnscaledX(Od.get(Ki)),B.applyScale9GridUnscaledY(Od.get(pk)),B.applyScale9GridScaledX(Aw),B.applyScale9GridScaledY(Bw),B.applyScale9GridScaledX(Cw),B.applyScale9GridScaledY(Dw),B.applyScale9GridScaledX(Kp),B.applyScale9GridScaledY(Dv);Bh=Aw-c;Lg=Bw-d;wg=Cw-c;Mg=Dw-d;eh=Kp-c;Xf=Dv-d}else Bh=Od.get(ie)-c,Lg=Od.get(vg)-d,wg=Od.get(Hj)-c,Mg=Od.get(Th)-d,eh=Od.get(Ki)-c,Xf=Od.get(pk)-d;switch(Sh.buffer.o[Sh.oPos+3]){case 0:if((wg-Bh)*(Xf-Lg)-(Mg-Lg)*(eh-Bh)<0){ij+=3;continue}break;case 2:if(!((wg-
Bh)*(Xf-Lg)-(Mg-Lg)*(eh-Bh)<0)){ij+=3;continue}}if(ok||zh==null){B.context.beginPath();B.context.moveTo(Bh,Lg);B.context.lineTo(wg,Mg);B.context.lineTo(eh,Xf);B.context.closePath();var Lp=0,Mp=0,Ch=1,Hl=1;if(!B.hitTesting&&z&&B.fillScale9Bounds!=null&&B.bitmapFill!=null){var Zf=B.fillScale9Bounds.getScaleX(),yg=B.fillScale9Bounds.getScaleY();if(Zf>0&&yg>0){B.context.scale(Zf,yg);Ch=1/Zf;Hl=1/yg;var Ev=B.fillScale9Bounds.unscaledMinX%B.bitmapFill.width,Np=B.fillScale9Bounds.unscaledMinY%B.bitmapFill.height,
Op=B.fillScale9Bounds.scale9MinX%(B.bitmapFill.width*Zf)/Zf,Us=B.fillScale9Bounds.scale9MinY%(B.bitmapFill.height*yg)/yg,Il=Op-Ev,Cm=Us-Np;B.context.translate(Il,Cm);Lp=-Il;Mp=-Cm}}B.hitTesting||B.context.fill(B.windingRule);!B.hitTesting&&z&&B.fillScale9Bounds!=null&&B.bitmapFill!=null&&(B.context.translate(Lp,Mp),B.context.scale(Ch,Hl));ij+=3}else Ij=zh.get(ie)*Ah.width,Cf=zh.get(Hj)*Ah.width,Yf=zh.get(Ki)*Ah.width,Jj=zh.get(vg)*Ah.height,fh=zh.get(Th)*Ah.height,xg=zh.get(pk)*Ah.height,lj=Ij*(xg-
fh)-Cf*xg+Yf*fh+(Cf-Yf)*Jj,lj==0?(ij+=3,B.context.restore()):(B.context.save(),B.context.beginPath(),B.context.moveTo(Bh,Lg),B.context.lineTo(wg,Mg),B.context.lineTo(eh,Xf),B.context.closePath(),B.context.clip(),Ip=-(Jj*(eh-wg)-fh*eh+xg*wg+(fh-xg)*Bh)/lj,Jp=(fh*Xf+Jj*(Mg-Xf)-xg*Mg+(xg-fh)*Lg)/lj,Cv=(Ij*(eh-wg)-Cf*eh+Yf*wg+(Cf-Yf)*Bh)/lj,zw=-(Cf*Xf+Ij*(Mg-Xf)-Yf*Mg+(Yf-Cf)*Lg)/lj,Qn=(Ij*(xg*wg-fh*eh)+Jj*(Cf*eh-Yf*wg)+(Yf*fh-Cf*xg)*Bh)/lj,ve=(Ij*(xg*Mg-fh*Xf)+Jj*(Cf*Xf-Yf*Mg)+(Yf*fh-Cf*xg)*Lg)/lj,B.context.transform(Ip,
Jp,Cv,zw,Qn,ve),B.context.drawImage(Ah,0,0,Ah.width,Ah.height),B.context.restore(),ij+=3)}break;case 14:switch(n.prev._hx_index){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 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}n.prev=va.LINE_BITMAP_STYLE;var Ng=n;b&&B.hasStroke&&B.closePath(!0);B.context.moveTo(f-c,g-d);if(Ng.buffer.o[Ng.oPos].readable)B.strokePattern=B.createBitmapFill(Ng.buffer.o[Ng.oPos],Ng.buffer.b[Ng.bPos],Ng.buffer.b[Ng.bPos+1]),B.context.strokeStyle=B.strokePattern,B.bitmapStroke=Ng.buffer.o[Ng.oPos],
B.bitmapStrokeMatrix=Ng.buffer.o[Ng.oPos+1];else{var Fv=Z.hex(0,6);B.context.strokeStyle="#"+Fv;B.strokePattern=null;B.bitmapStroke=null;B.bitmapStrokeMatrix=null}B.strokeScale9Bounds!=null?B.strokeScale9Bounds.clear():z&&B.bitmapStroke!=null&&(B.strokeScale9Bounds=new Rs);B.hasStroke=!0;break;case 15:switch(n.prev._hx_index){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 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}n.prev=va.LINE_GRADIENT_STYLE;var gh=n;b&&B.hasStroke&&B.closePath(!0);B.context.moveTo(f-c,g-d);B.strokePattern=
B.createGradientPattern(gh.buffer.o[gh.oPos],gh.buffer.ii[gh.iiPos],gh.buffer.ff[gh.ffPos],gh.buffer.ii[gh.iiPos+1],gh.buffer.o[gh.oPos+1],gh.buffer.o[gh.oPos+2],gh.buffer.o[gh.oPos+3],gh.buffer.f[gh.fPos]);B.context.strokeStyle=B.strokePattern;B.setSmoothing(!0);B.hasStroke=!0;B.bitmapStroke=null;B.bitmapStrokeMatrix=null;break;case 16:switch(n.prev._hx_index){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 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}n.prev=va.LINE_STYLE;var xd=n;b&&B.hasStroke&&B.closePath(!0);B.context.moveTo(f-
c,g-d);if(xd.buffer.o[xd.oPos]==null)B.hasStroke=!1;else{B.hasStroke=!0;B.context.lineWidth=xd.buffer.o[xd.oPos]>0?xd.buffer.o[xd.oPos]:1;var Ew=xd.buffer.o[xd.oPos+3]==null?"round":(xd.buffer.o[xd.oPos+3]==null?"null":tw.toString(xd.buffer.o[xd.oPos+3])).toLowerCase();B.context.lineJoin=Ew;var Jl=xd.buffer.o[xd.oPos+2]==null?"round":xd.buffer.o[xd.oPos+2]==0?"butt":(xd.buffer.o[xd.oPos+2]==null?"null":qw.toString(xd.buffer.o[xd.oPos+2])).toLowerCase();B.context.lineCap=Jl;B.context.miterLimit=xd.buffer.f[xd.fPos+
1];if(xd.buffer.f[xd.fPos]==1){var bl=Z.hex(xd.buffer.i[xd.iPos]&16777215,6);B.context.strokeStyle="#"+bl}else hb=(xd.buffer.i[xd.iPos]&16711680)>>>16,Ra=(xd.buffer.i[xd.iPos]&65280)>>>8,Jb=xd.buffer.i[xd.iPos]&255,B.context.strokeStyle="rgba("+hb+", "+Ra+", "+Jb+", "+xd.buffer.f[xd.fPos]+")";B.setSmoothing(!0)}B.strokePattern=null;B.bitmapStroke=null;B.bitmapStrokeMatrix=null;break;case 17:switch(n.prev._hx_index){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 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}n.prev=va.LINE_TO;
var nf=n;w=!0;if(z){var Dm=B.toScale9Position(nf.buffer.f[nf.fPos],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Em=B.toScale9Position(nf.buffer.f[nf.fPos+1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(nf.buffer.f[nf.fPos]),B.applyScale9GridUnscaledY(nf.buffer.f[nf.fPos+1]),B.applyScale9GridScaledX(Dm),B.applyScale9GridScaledY(Em);f==Dm&&g==Em||
B.context.lineTo(Dm-c,Em-d);f=Dm;g=Em}else f==nf.buffer.f[nf.fPos]&&g==nf.buffer.f[nf.fPos+1]||B.context.lineTo(nf.buffer.f[nf.fPos]-c,nf.buffer.f[nf.fPos+1]-d),f=nf.buffer.f[nf.fPos],g=nf.buffer.f[nf.fPos+1];f==l&&g==k&&(h=!0);break;case 18:switch(n.prev._hx_index){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 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}n.prev=va.MOVE_TO;var hh=n;if(z){var Gv=B.toScale9Position(hh.buffer.f[hh.fPos],v.x,v.width,B.bounds.width,B.graphics.__owner.get_scaleX()),Fm=B.toScale9Position(hh.buffer.f[hh.fPos+
1],v.y,v.height,B.bounds.height,B.graphics.__owner.get_scaleY());if(B.fillScale9Bounds!=null&&B.bitmapFill!=null||B.strokeScale9Bounds!=null&&B.bitmapStroke!=null)B.applyScale9GridUnscaledX(hh.buffer.f[hh.fPos]),B.applyScale9GridUnscaledY(hh.buffer.f[hh.fPos+1]),B.applyScale9GridScaledX(Gv),B.applyScale9GridScaledY(Fm);B.context.moveTo(Gv-c,Fm-d);f=Gv;g=Fm}else B.context.moveTo(hh.buffer.f[hh.fPos]-c,hh.buffer.f[hh.fPos+1]-d),f=hh.buffer.f[hh.fPos],g=hh.buffer.f[hh.fPos+1];q&&f!=l&&g!=k&&(h=!0);l=
f;k=g;q=!0;break;case 21:B.windingRule="evenodd";break;case 22:B.windingRule="nonzero";break;default:switch(n.prev._hx_index){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 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}n.prev=pa}}Q!=null&&Qa.__pool.release(Q);T!=null&&Qa.__pool.release(T);n.destroy();if(w){if(b&&B.hasStroke){if(B.hasFill){if(f!=l||g!=k)B.context.lineTo(l-c,k-d),h=!0;h&&B.closePath(!0)}else h&&f==l&&g==k&&B.closePath(!0);if(!B.hitTesting&&B.strokePattern!=null&&(B.bitmapStrokeMatrix!=null||z&&B.strokeScale9Bounds!=
null&&B.bitmapStroke!=null)){var Uh=S.__pool.get();B.bitmapStrokeMatrix!=null?Uh.copyFrom(B.bitmapStrokeMatrix):Uh.identity();z&&B.strokeScale9Bounds!=null&&B.bitmapStroke!=null&&(Zf=B.strokeScale9Bounds.getScaleX(),yg=B.strokeScale9Bounds.getScaleY(),Zf>0&&yg>0&&Uh.scale(Zf,yg));var Vs=new DOMMatrix([Uh.a,Uh.b,Uh.c,Uh.d,Uh.tx,Uh.ty]);B.strokePattern.setTransform(Vs);S.__pool.release(Uh)}B.hitTesting||B.context.stroke()}b||!B.hasFill&&B.bitmapFill==null||(B.context.translate(-B.bounds.x,-B.bounds.y),
Mp=Lp=0,Hl=Ch=1,!B.hitTesting&&z&&B.fillScale9Bounds!=null&&B.bitmapFill!=null&&(Zf=B.fillScale9Bounds.getScaleX(),yg=B.fillScale9Bounds.getScaleY(),Zf>0&&yg>0&&(B.context.scale(Zf,yg),Ch=1/Zf,Hl=1/yg,Ev=B.fillScale9Bounds.unscaledMinX%B.bitmapFill.width,Np=B.fillScale9Bounds.unscaledMinY%B.bitmapFill.height,Op=B.fillScale9Bounds.scale9MinX%(B.bitmapFill.width*Zf)/Zf,Us=B.fillScale9Bounds.scale9MinY%(B.bitmapFill.height*yg)/yg,Il=Op-Ev,Cm=Us-Np,B.context.translate(Il,Cm),Lp=-Il,Mp=-Cm)),B.pendingMatrix!=
null?(B.context.transform(B.pendingMatrix.a,B.pendingMatrix.b,B.pendingMatrix.c,B.pendingMatrix.d,B.pendingMatrix.tx,B.pendingMatrix.ty),B.hitTesting||B.context.fill(B.windingRule),B.context.transform(B.inversePendingMatrix.a,B.inversePendingMatrix.b,B.inversePendingMatrix.c,B.inversePendingMatrix.d,B.inversePendingMatrix.tx,B.inversePendingMatrix.ty)):B.hitTesting||B.context.fill(B.windingRule),!B.hitTesting&&z&&B.fillScale9Bounds!=null&&B.bitmapFill!=null&&(B.context.translate(Lp,Mp),B.context.scale(Ch,
Hl)),B.context.translate(B.bounds.x,B.bounds.y),B.context.closePath())}};B.render=function(a,b){var c=b.__pixelRatio;a.__owner.__scale9Grid==null||a.__owner.__isMask||a.__worldTransform.b!=0||a.__worldTransform.c!=0?(a.__bitmapScaleX=1,a.__bitmapScaleY=1):(a.__bitmapScaleX=a.__owner.get_scaleX(),a.__bitmapScaleY=a.__owner.get_scaleY());a.__update(b.__worldTransform,c);if(a.__softwareDirty){B.hitTesting=!1;B.graphics=a;B.allowSmoothing=b.__allowSmoothing;B.worldAlpha=b.__getAlpha(a.__owner.__worldAlpha);
B.bounds=a.__bounds;var d=a.__width,f=a.__height;if(!a.__visible||a.__commands.get_length()==0||B.bounds==null||d<1||f<1)a.__canvas=null,a.__context=null,a.__bitmap=null;else{a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));B.context=a.__context;var g=a.__renderTransform,h=a.__canvas;c=b.__pixelRatio;var l=d*c|0,k=f*c|0;b.__setBlendModeContext(B.context,10);b.__isDOM?(h.width==l&&h.height==k?B.context.clearRect(0,0,l,k):(h.width=l,h.height=
k,h.style.width=d+"px",h.style.height=f+"px"),d=a.__renderTransform,B.context.setTransform(d.a*c,d.b*c,d.c*c,d.d*c,d.tx*c,d.ty*c)):(h.width==l&&h.height==k?(B.context.closePath(),B.context.setTransform(1,0,0,1,0,0),B.context.clearRect(0,0,l,k)):(h.width=d,h.height=f),B.context.setTransform(g.a,g.b,g.c,g.d,g.tx,g.ty));B.fillCommands.clear();B.strokeCommands.clear();B.hasFill=!1;B.hasStroke=!1;B.bitmapFill=null;c=B.bitmapRepeat=!1;f=d=0;B.windingRule="evenodd";g=new fj(a.__commands);h=0;for(l=a.__commands.types;h<
l.length;)switch(k=l[h],++h,k._hx_index){case 0:case 1:case 2:case 3:B.endFill();B.endStroke();if(k==va.BEGIN_BITMAP_FILL){switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.BEGIN_BITMAP_FILL;k=g;B.fillCommands.beginBitmapFill(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1]);B.strokeCommands.beginBitmapFill(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1])}else if(k==va.BEGIN_GRADIENT_FILL){switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.BEGIN_GRADIENT_FILL;k=g;B.fillCommands.beginGradientFill(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos]);B.strokeCommands.beginGradientFill(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos])}else if(k==va.BEGIN_SHADER_FILL){switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.BEGIN_SHADER_FILL;k=g;B.fillCommands.beginShaderFill(k.buffer.o[k.oPos]);B.strokeCommands.beginShaderFill(k.buffer.o[k.oPos])}else{switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=
5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.BEGIN_FILL;k=g;B.fillCommands.beginFill(k.buffer.i[k.iPos],k.buffer.f[k.fPos]);B.strokeCommands.beginFill(k.buffer.i[k.iPos],k.buffer.f[k.fPos])}break;case 4:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;
case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=
1;break;case 20:g.oPos+=1}g.prev=va.CUBIC_CURVE_TO;k=g;B.fillCommands.cubicCurveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.f[k.fPos+5]);c?B.strokeCommands.cubicCurveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.f[k.fPos+5]):(d=k.buffer.f[k.fPos+4],f=k.buffer.f[k.fPos+5]);break;case 5:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;
g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;
case 20:g.oPos+=1}g.prev=va.CURVE_TO;k=g;B.fillCommands.curveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);c?B.strokeCommands.curveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]):(d=k.buffer.f[k.fPos+2],f=k.buffer.f[k.fPos+3]);break;case 6:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=
6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_CIRCLE;k=g;B.fillCommands.drawCircle(k.buffer.f[k.fPos],k.buffer.f[k.fPos+
1],k.buffer.f[k.fPos+2]);c&&B.strokeCommands.drawCircle(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2]);break;case 7:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_ELLIPSE;k=g;B.fillCommands.drawEllipse(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);c&&B.strokeCommands.drawEllipse(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);break;case 8:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_QUADS;k=g;B.fillCommands.drawQuads(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2]);break;case 9:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=
1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_RECT;k=g;B.fillCommands.drawRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3]);c&&B.strokeCommands.drawRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+
3]);break;case 10:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;
g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_ROUND_RECT;k=g;B.fillCommands.drawRoundRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.o[k.oPos]);c&&B.strokeCommands.drawRoundRect(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1],k.buffer.f[k.fPos+2],k.buffer.f[k.fPos+3],k.buffer.f[k.fPos+4],k.buffer.o[k.oPos]);break;case 12:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.DRAW_TRIANGLES;k=g;B.fillCommands.drawTriangles(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3]);break;case 13:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=
4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.END_FILL;B.endFill();B.endStroke();B.hasFill=!1;B.bitmapFill=null;f=d=0;break;case 14:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=
4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.LINE_BITMAP_STYLE;
k=g;c||d==0&&f==0||(B.strokeCommands.moveTo(d,f),f=d=0);c=!0;B.strokeCommands.lineBitmapStyle(k.buffer.o[k.oPos],k.buffer.o[k.oPos+1],k.buffer.b[k.bPos],k.buffer.b[k.bPos+1]);break;case 15:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=
5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.LINE_GRADIENT_STYLE;k=g;c||d==0&&f==0||(B.strokeCommands.moveTo(d,f),f=d=0);c=!0;B.strokeCommands.lineGradientStyle(k.buffer.o[k.oPos],k.buffer.ii[k.iiPos],k.buffer.ff[k.ffPos],k.buffer.ii[k.iiPos+1],k.buffer.o[k.oPos+
1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos]);break;case 16:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=
2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.LINE_STYLE;k=g;c||k.buffer.o[k.oPos]==null||d==0&&f==0||(B.strokeCommands.moveTo(d,f),f=d=0);c=k.buffer.o[k.oPos]!=null;B.strokeCommands.lineStyle(k.buffer.o[k.oPos],k.buffer.i[k.iPos],k.buffer.f[k.fPos],k.buffer.b[k.bPos],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos+1]);break;case 17:switch(g.prev._hx_index){case 0:g.oPos+=
2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.LINE_TO;k=g;B.fillCommands.lineTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);c?B.strokeCommands.lineTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]):(d=k.buffer.f[k.fPos],f=k.buffer.f[k.fPos+1]);break;case 18:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=
4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.MOVE_TO;k=g;B.fillCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);c?B.strokeCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]):(d=
k.buffer.f[k.fPos],f=k.buffer.f[k.fPos+1]);break;case 19:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=
1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.OVERRIDE_BLEND_MODE;k=g;b.__setBlendModeContext(B.context,k.buffer.o[k.oPos]);break;case 21:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=
4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=va.WINDING_EVEN_ODD;B.fillCommands.windingEvenOdd();B.windingRule="evenodd";break;case 22:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;
case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=
1;break;case 20:g.oPos+=1}g.prev=va.WINDING_NON_ZERO;B.fillCommands.windingNonZero();B.windingRule="nonzero";break;default:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=
2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=k}B.fillCommands.get_length()>0&&B.endFill();B.strokeCommands.get_length()>0&&B.endStroke();g.destroy();a.__bitmap==null?a.__bitmap=uc.fromCanvas(a.__canvas):a.__bitmap.width!=a.__canvas.width||a.__bitmap.height!=a.__canvas.height?(b=a.__bitmap.__texture,b!=null&&b.dispose(),
a.__bitmap=uc.fromCanvas(a.__canvas)):a.__bitmap.image.version++}a.__softwareDirty=!1;a.set___dirty(!1);B.graphics=null}};B.renderMask=function(a,b){if(a.__commands.get_length()!=0){B.context=b.context;b=new fj(a.__commands);var c=0;for(a=a.__commands.types;c<a.length;){var d=a[c];++c;switch(d._hx_index){case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;
case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CUBIC_CURVE_TO;d=b;B.context.bezierCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-
0,d.buffer.f[d.fPos+2]-0,d.buffer.f[d.fPos+3]-0,d.buffer.f[d.fPos+4]-0,d.buffer.f[d.fPos+5]-0);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;
break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.CURVE_TO;d=b;B.context.quadraticCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2]-0,d.buffer.f[d.fPos+3]-0);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;
case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_CIRCLE;d=b;B.context.arc(d.buffer.f[d.fPos]-
0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],0,Math.PI*2,!0);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_ELLIPSE;var f=b;d=f.buffer.f[f.fPos];var g=f.buffer.f[f.fPos+1];var h=f.buffer.f[f.fPos+2];var l=f.buffer.f[f.fPos+3];d-=0;g-=0;f=h/2*.5522848;var k=l/2*.5522848;var q=d+h;var w=g+l;h=d+h/2;l=g+l/2;B.context.moveTo(d,l);B.context.bezierCurveTo(d,l-k,h-f,g,h,g);B.context.bezierCurveTo(h+f,g,q,l-k,q,l);B.context.bezierCurveTo(q,
l+k,h+f,w,h,w);B.context.bezierCurveTo(h-f,w,d,l+k,d,l);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_RECT;d=b;B.context.beginPath();B.context.rect(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);B.context.closePath();break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.DRAW_ROUND_RECT;d=b;B.drawRoundRect(d.buffer.f[d.fPos]-
0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.o[d.oPos]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.LINE_TO;d=b;B.context.lineTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;
break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.MOVE_TO;d=b;B.context.moveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0);break;
default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;
b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}b.destroy()}};B.setSmoothing=function(a){B.allowSmoothing||(a=!1);B.context.imageSmoothingEnabled!=a&&(B.context.imageSmoothingEnabled=a)};var Rs=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};r["openfl.display._internal._CanvasGraphics.Scale9GridBounds"]=Rs;Rs.__name__="openfl.display._internal._CanvasGraphics.Scale9GridBounds";
Rs.prototype={scale9MinX:null,scale9MinY:null,scale9MaxX:null,scale9MaxY:null,unscaledMinX:null,unscaledMinY:null,unscaledMaxX:null,unscaledMaxY:null,getScaleX:function(){if(this.scale9MaxX==null||this.unscaledMaxX==null)return 1;var a=this.unscaledMaxX-this.unscaledMinX;return a==0?1:(this.scale9MaxX-this.scale9MinX)/a},getScaleY:function(){if(this.scale9MaxY==null||this.unscaledMaxY==null)return 1;var a=this.unscaledMaxY-this.unscaledMinY;return a==0?1:(this.scale9MaxY-this.scale9MinY)/a},clear:function(){this.scale9MaxY=
this.scale9MinY=this.scale9MaxX=this.scale9MinX=this.unscaledMaxY=this.unscaledMinY=this.unscaledMaxX=this.unscaledMinX=null},applyUnscaledX:function(a){if(this.unscaledMinX==null||this.unscaledMinX>a)this.unscaledMinX=a;if(this.unscaledMaxX==null||this.unscaledMaxX<a)this.unscaledMaxX=a},applyUnscaledY:function(a){if(this.unscaledMinY==null||this.unscaledMinY>a)this.unscaledMinY=a;if(this.unscaledMaxY==null||this.unscaledMaxY<a)this.unscaledMaxY=a},applyScaledX:function(a){if(this.scale9MinX==null||
this.scale9MinX>a)this.scale9MinX=a;if(this.scale9MaxX==null||this.scale9MaxX<a)this.scale9MaxX=a},applyScaledY:function(a){if(this.scale9MinY==null||this.scale9MinY>a)this.scale9MinY=a;if(this.scale9MaxY==null||this.scale9MaxY<a)this.scale9MaxY=a},__class__:Rs};var Fw=function(){};r["openfl.display._internal.CanvasShape"]=Fw;Fw.__name__="openfl.display._internal.CanvasShape";Fw.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=a.__graphics;if(d!=null){B.render(d,
b);var f=d.__width,g=d.__height,h=d.__canvas;if(h!=null&&d.__visible&&f>=1&&g>=1){var l=d.__worldTransform,k=b.context,q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),k.globalAlpha=c,c=S.__pool.get(),c.scale(1/d.__bitmapScaleX,1/d.__bitmapScaleY),c.concat(l),b.setTransform(c,k),k.drawImage(h,0,0,f,g),S.__pool.release(c),b.__popMaskObject(a)}}}}};var rs=function(){};r["openfl.display._internal.CanvasSimpleButton"]=rs;rs.__name__="openfl.display._internal.CanvasSimpleButton";
rs.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};rs.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var ia=function(){};r["openfl.display._internal.CanvasTextField"]=ia;ia.__name__="openfl.display._internal.CanvasTextField";ia.render=function(a,b,c){var d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;c=a.__graphics;
var h=0;if(a.__dirty){a.__updateLayout();c.__bounds==null&&(c.__bounds=new Ea);if(a.get_text().length==0){h=d.bounds.width-4;var l=a.get_defaultTextFormat().align;h=l==3?0:l==4?h:h/2;switch(l){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;
case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}c.__bounds.copyFrom(g)}l=b.__pixelRatio;if(c.__bitmapScaleX!=l||c.__bitmapScaleY!=l)c.__softwareDirty=!0;c.__update(b.__worldTransform,l);if(a.__dirty||c.__softwareDirty){var k=Math.round(c.__width*l),q=Math.round(c.__height*l);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||
d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));ia.context=c.__context;c.__canvas.width=k;c.__canvas.height=q;b.__isDOM&&(c.__canvas.style.width=Math.round(k/l)+"px",
c.__canvas.style.height=Math.round(q/l)+"px");k=S.__pool.get();k.scale(l,l);k.concat(c.__renderTransform);ia.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);S.__pool.release(k);ia.clearRect==null&&(ia.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");ia.clearRect&&ia.context.clearRect(0,0,c.__canvas.width,c.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;c.__context.imageSmoothingEnabled=!b.__allowSmoothing||d.antiAliasType==0&&d.sharpness==
400?!1:!0;if(d.border||d.background){ia.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var w=Z.hex(d.backgroundColor&16777215,6);ia.context.fillStyle="#"+w;ia.context.fill()}d.border&&(ia.context.lineWidth=1,w=Z.hex(d.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke())}ia.context.textBaseline="alphabetic";ia.context.textAlign="start";b=-a.get_scrollH();var v=h=0;for(w=a.get_scrollV()-1;v<w;){var z=v++;h-=d.lineHeights.get(z)}var n;for(k=d.layoutGroups.iterator();k.hasNext();)if(q=
k.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var E="#"+Z.hex(q.format.color&16777215,6);ia.context.font=Oc.getFont(q.format);ia.context.fillStyle=E;ia.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+b-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=n=0;for(w=a.__caretIndex-q.startIndex;v<w;){z=v++;if(q.positions.length<=
z)break;n+=q.positions[z]}v=0;w=a.get_scrollV();for(z=q.lineIndex+1;w<z;){var H=w++;v+=d.lineHeights.get(H-1)}ia.context.beginPath();w=Z.hex(q.format.color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(q.offsetX+n-a.get_scrollH()-g.x,v+2-g.y);ia.context.lineWidth=1;ia.context.lineTo(q.offsetX+n-a.get_scrollH()-g.x,v+Oc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);ia.context.stroke();ia.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=
a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)n=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>n&&(n=q.startIndex),q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(n),v>=q.endIndex?(w=a.getCharBoundaries(q.endIndex-1),w!=null&&(w.x+=w.width+2)):w=a.getCharBoundaries(v),z!=null&&w!=null&&(ia.context.fillStyle="#000000",
ia.context.fillRect(z.x+b-g.x,z.y+h,w.x-z.x,q.height),ia.context.fillStyle="#FFFFFF",ia.context.fillText(f.substring(n,v),b+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(ia.context.beginPath(),ia.context.strokeStyle=E,ia.context.lineWidth=1,n=q.offsetX+b-g.x,v=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,ia.context.moveTo(n,v),ia.context.lineTo(n+q.width,v),ia.context.stroke(),ia.context.closePath());q.format.strikethrough&&(ia.context.beginPath(),ia.context.strokeStyle=
E,ia.context.lineWidth=1,E=q.offsetX+b-g.x,n=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),ia.context.moveTo(E,n),ia.context.lineTo(E+q.width,n),ia.context.stroke(),ia.context.closePath())}}else{if(d.border||d.background)d.border?ia.context.rect(.5,.5,g.width-1,g.height-1):ia.context.rect(0,0,g.width,g.height),d.background&&(w=Z.hex(d.backgroundColor&16777215,6),ia.context.fillStyle="#"+w,ia.context.fill()),d.border&&(ia.context.lineWidth=1,ia.context.lineCap="square",w=Z.hex(d.borderColor&16777215,6),
ia.context.strokeStyle="#"+w,ia.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){b=-a.get_scrollH()+(f?0:h);v=h=0;for(w=a.get_scrollV()-1;v<w;)z=v++,h+=d.lineHeights.get(z);ia.context.beginPath();w=Z.hex(a.get_defaultTextFormat().color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(b+2.5,h+2.5);ia.context.lineWidth=1;ia.context.lineTo(b+2.5,h+Oc.getFormatHeight(a.get_defaultTextFormat())-1);ia.context.stroke();ia.context.closePath()}}c.__bitmap==null?c.__bitmap=uc.fromCanvas(c.__canvas):
c.__bitmap.width!=c.__canvas.width||c.__bitmap.height!=c.__canvas.height?(d=c.__bitmap.__texture,d!=null&&d.dispose(),c.__bitmap=uc.fromCanvas(c.__canvas)):c.__bitmap.image.version++;c.__bitmapScaleX=l;c.__bitmapScaleY=l;c.__visible=!0;a.__dirty=!1;c.__softwareDirty=!1;c.set___dirty(!1)}}};ia.renderDrawable=function(a,b){b.__isDOM&&!a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!0,a.get_type()==1&&a.replaceText(0,a.__text.length,a.__text),a.__isHTML&&a.__updateText(Zb.parse(a.__text,
a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges)),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));if(a.get_mask()==null||a.get_mask().get_width()>0&&a.get_mask().get_height()>0)if(b.__updateCacheBitmap(a,a.__dirty),a.__cacheBitmap==null||a.__isCacheBitmapRender){var c=a.__textEngine,d=!(c.background||c.border),f=d?c.textBounds:c.bounds,g=a.__graphics,h=0;if(a.__dirty){a.__updateLayout();g.__bounds==null&&(g.__bounds=
new Ea);if(a.get_text().length==0){var l=c.bounds.width-4;var k=a.get_defaultTextFormat().align;h=k==3?0:k==4?l:l/2;switch(k){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;
h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}d&&(f.y=c.bounds.y,f.x=h)}g.__bounds.copyFrom(f)}k=b.__pixelRatio;if(g.__bitmapScaleX!=k||g.__bitmapScaleY!=k)g.__softwareDirty=!0;g.__update(b.__worldTransform,k);if(a.__dirty||g.__softwareDirty){l=Math.round(g.__width*k);var q=Math.round(g.__height*k);if(!(c.text!=null&&c.text!=""||c.background||c.border||c.__hasFocus||c.type==1&&c.selectable)||(c.width<=0||c.height<=0)&&c.autoSize!=2)a.__graphics.__canvas=
null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));ia.context=g.__context;g.__canvas.width=l;g.__canvas.height=q;b.__isDOM&&(g.__canvas.style.width=Math.round(l/k)+"px",g.__canvas.style.height=Math.round(q/k)+"px");l=S.__pool.get();l.scale(k,k);l.concat(g.__renderTransform);
ia.context.setTransform(l.a,l.b,l.c,l.d,l.tx,l.ty);S.__pool.release(l);ia.clearRect==null&&(ia.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");ia.clearRect&&ia.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(c.text!=null&&c.text!=""||c.__hasFocus){l=c.text;g.__context.imageSmoothingEnabled=!b.__allowSmoothing||c.antiAliasType==0&&c.sharpness==400?!1:!0;if(c.border||c.background){ia.context.rect(.5,.5,f.width-1,f.height-1);if(c.background){var w=Z.hex(c.backgroundColor&
16777215,6);ia.context.fillStyle="#"+w;ia.context.fill()}c.border&&(ia.context.lineWidth=1,w=Z.hex(c.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke())}ia.context.textBaseline="alphabetic";ia.context.textAlign="start";q=-a.get_scrollH();var v=d=0;for(w=a.get_scrollV()-1;v<w;){var z=v++;d-=c.lineHeights.get(z)}var n;for(h=c.layoutGroups.iterator();h.hasNext();){var E=h.next();if(!(E.lineIndex<a.get_scrollV()-1)){if(E.lineIndex>c.get_bottomScrollV()-1)break;var H="#"+Z.hex(E.format.color&
16777215,6);ia.context.font=Oc.getFont(E.format);ia.context.fillStyle=H;ia.context.fillText(l.substring(E.startIndex,E.endIndex),E.offsetX+q-f.x,E.offsetY+E.ascent+d-f.y);if(a.__caretIndex>-1&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&E.startIndex<=a.__caretIndex&&E.endIndex>=a.__caretIndex){v=n=0;for(w=a.__caretIndex-E.startIndex;v<w;){z=v++;if(E.positions.length<=z)break;n+=E.positions[z]}v=0;w=a.get_scrollV();for(z=E.lineIndex+1;w<z;){var J=w++;v+=c.lineHeights.get(J-
1)}ia.context.beginPath();w=Z.hex(E.format.color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(E.offsetX+n-a.get_scrollH()-f.x,v+2-f.y);ia.context.lineWidth=1;ia.context.lineTo(E.offsetX+n-a.get_scrollH()-f.x,v+Oc.getFormatHeight(a.get_defaultTextFormat())-1-f.y);ia.context.stroke();ia.context.closePath()}}else if(E.startIndex<=a.__caretIndex&&E.endIndex>=a.__caretIndex||E.startIndex<=a.__selectionIndex&&E.endIndex>=a.__selectionIndex||E.startIndex>a.__caretIndex&&E.endIndex<a.__selectionIndex||
E.startIndex>a.__selectionIndex&&E.endIndex<a.__caretIndex)n=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,E.startIndex>n&&(n=E.startIndex),E.endIndex<v&&(v=E.endIndex),z=a.getCharBoundaries(n),v>=E.endIndex?(w=a.getCharBoundaries(E.endIndex-1),w!=null&&(w.x+=w.width+2)):w=a.getCharBoundaries(v),z!=null&&w!=null&&(ia.context.fillStyle="#000000",ia.context.fillRect(z.x+q-f.x,z.y+d,w.x-z.x,E.height),ia.context.fillStyle="#FFFFFF",ia.context.fillText(l.substring(n,
v),q+z.x-f.x,E.offsetY+E.ascent+d));E.format.underline&&(ia.context.beginPath(),ia.context.strokeStyle=H,ia.context.lineWidth=1,n=E.offsetX+q-f.x,v=Math.ceil(E.offsetY+d+E.ascent-f.y)+Math.floor(E.ascent*.185)+.5,ia.context.moveTo(n,v),ia.context.lineTo(n+E.width,v),ia.context.stroke(),ia.context.closePath());E.format.strikethrough&&(ia.context.beginPath(),ia.context.strokeStyle=H,ia.context.lineWidth=1,H=E.offsetX+q-f.x,n=Math.ceil(E.offsetY+d+2*E.ascent/3-f.y),ia.context.moveTo(H,n),ia.context.lineTo(H+
E.width,n),ia.context.stroke(),ia.context.closePath())}}}else{if(c.border||c.background)c.border?ia.context.rect(.5,.5,f.width-1,f.height-1):ia.context.rect(0,0,f.width,f.height),c.background&&(w=Z.hex(c.backgroundColor&16777215,6),ia.context.fillStyle="#"+w,ia.context.fill()),c.border&&(ia.context.lineWidth=1,ia.context.lineCap="square",w=Z.hex(c.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke());if(a.__caretIndex>-1&&c.selectable&&a.__showCursor){q=-a.get_scrollH()+(d?0:h);
v=d=0;for(w=a.get_scrollV()-1;v<w;)z=v++,d+=c.lineHeights.get(z);ia.context.beginPath();w=Z.hex(a.get_defaultTextFormat().color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(q+2.5,d+2.5);ia.context.lineWidth=1;ia.context.lineTo(q+2.5,d+Oc.getFormatHeight(a.get_defaultTextFormat())-1);ia.context.stroke();ia.context.closePath()}}g.__bitmap==null?g.__bitmap=uc.fromCanvas(g.__canvas):g.__bitmap.width!=g.__canvas.width||g.__bitmap.height!=g.__canvas.height?(c=g.__bitmap.__texture,c!=null&&
c.dispose(),g.__bitmap=uc.fromCanvas(g.__canvas)):g.__bitmap.image.version++;g.__bitmapScaleX=k;g.__bitmapScaleY=k;g.__visible=!0;a.__dirty=!1;g.__softwareDirty=!1;g.set___dirty(!1)}}f=!1;a.__textEngine.antiAliasType==0&&a.__textEngine.gridFitType==1&&(f=b.context.imageSmoothingEnabled)&&(b.context.imageSmoothingEnabled=!1);a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(h=b.__getAlpha(a.__worldAlpha),h<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>
0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=b.context,b.setTransform(a.__renderTransform,c),H=a.opaqueBackground,c.fillStyle="rgb("+(H>>>16&255)+","+(H>>>8&255)+","+(H&255)+")",c.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(h=b.__getAlpha(a.__worldAlpha),h<=0||(g=a.__graphics,!(g!=null&&(B.render(g,b),l=g.__width,q=g.__height,d=g.__canvas,d!=null&&g.__visible&&l>=1&&q>=1&&(k=g.__worldTransform,c=b.context,E=a.__scrollRect,
E==null||E.width>0&&E.height>0)))))))||(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c.globalAlpha=h,h=S.__pool.get(),h.scale(1/g.__bitmapScaleX,1/g.__bitmapScaleY),h.concat(k),b.setTransform(h,c),c.drawImage(d,0,0,l,q),S.__pool.release(h),b.__popMaskObject(a));f&&(b.context.imageSmoothingEnabled=!0)}else a=a.__cacheBitmap,a.__renderable&&(h=b.__getAlpha(a.__worldAlpha),h>0&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(c=b.context,b.__setBlendMode(a.__worldBlendMode),
b.__pushMaskObject(a,!1),kb.convertToCanvas(a.__bitmapData.image),c.globalAlpha=h,E=a.__scrollRect,b.setTransform(a.__renderTransform,c),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),E==null?c.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):c.drawImage(a.__bitmapData.image.get_src(),E.x,E.y,E.width,E.height,E.x,E.y,E.width,E.height),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))};ia.renderDrawableMask=
function(a,b){zl.renderDrawableMask(a,b)};var ej=function(){};r["openfl.display._internal.CanvasTilemap"]=ej;ej.__name__="openfl.display._internal.CanvasTilemap";ej.render=function(a,b){if(a.__renderable&&a.__group.__tiles.length!=0){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var f=Ea.__pool.get();f.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(f,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=
!1);ej.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,f);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(f)}}};ej.renderTileContainer=function(a,b,c,d,f,g,h,l,k,q,w,v){var z=b.context,n=b.__roundPixels,E=S.__pool.get(),H=a.__tiles,J,Q=null,T=0;for(a=a.__length;T<a;){var fa=T++;var da=H[fa];E.setTo(1,0,0,1,-da.get_originX(),
-da.get_originY());E.concat(da.get_matrix());E.concat(c);n&&(E.tx=Math.round(E.tx),E.ty=Math.round(E.ty));var pa=da.get_tileset()!=null?da.get_tileset():d;fa=da.get_alpha()*h;if((J=da.get_visible())&&!(fa<=0))if(g||(fa=1),l&&(Q=da.__blendMode!=null?da.__blendMode:k),da.__length>0)ej.renderTileContainer(da,b,E,pa,f,g,fa,l,Q,q,w,v);else if(pa!=null){J=da.get_id();if(J==-1){if(da=da.__rect,da==null||da.width<=0||da.height<=0)continue}else{da=pa.__data[J];if(da==null)continue;v.setTo(da.x,da.y,da.width,
da.height);da=v}pa=pa.__bitmapData;pa!=null&&pa.image!=null&&(pa!=q&&(pa.image.buffer.__srcImage==null&&kb.convertToCanvas(pa.image),w=pa.image.get_src(),q=pa),z.globalAlpha=fa,l&&b.__setBlendMode(Q),b.setTransform(E,z),z.drawImage(w,da.x,da.y,da.width,da.height,0,0,da.width,da.height))}}S.__pool.release(E)};ej.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||(l=b.__getAlpha(a.__worldAlpha),
l<=0||(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),k=b.context,b.setTransform(a.__renderTransform,k),l=a.opaqueBackground,k.fillStyle="rgb("+(l>>>16&255)+","+(l>>>8&255)+","+(l&255)+")",k.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),a.__graphics==null||!a.__renderable||(l=b.__getAlpha(a.__worldAlpha),l<=0))))){var c=a.__graphics;if(c!=null){B.render(c,b);var d=c.__width,f=c.__height,
g=c.__canvas;if(g!=null&&c.__visible&&d>=1&&f>=1){var h=c.__worldTransform;k=b.context;q=a.__scrollRect;if(q==null||q.width>0&&q.height>0)b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),k.globalAlpha=l,l=S.__pool.get(),l.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),l.concat(h),b.setTransform(l,k),k.drawImage(g,0,0,d,f),S.__pool.release(l),b.__popMaskObject(a)}}}a.__renderable&&a.__group.__tiles.length!=0&&(l=b.__getAlpha(a.__worldAlpha),l<=0||(k=b.context,b.__setBlendMode(a.__worldBlendMode),
b.__pushMaskObject(a),c=Ea.__pool.get(),c.setTo(0,0,a.__width,a.__height),b.__pushMaskRect(c,a.__renderTransform),b.__allowSmoothing&&a.smoothing||(k.imageSmoothingEnabled=!1),ej.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,l,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,c),b.__allowSmoothing&&a.smoothing||(k.imageSmoothingEnabled=!0),b.__popMaskRect(),b.__popMaskObject(a),Ea.__pool.release(c)))}else if(c=a.__cacheBitmap,
c.__renderable){var l=b.__getAlpha(c.__worldAlpha);if(l>0&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var k=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);kb.convertToCanvas(c.__bitmapData.image);k.globalAlpha=l;var q=c.__scrollRect;b.setTransform(c.__renderTransform,k);b.__allowSmoothing&&c.smoothing||(k.imageSmoothingEnabled=!1);q==null?k.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):k.drawImage(c.__bitmapData.image.get_src(),
q.x,q.y,q.width,q.height,q.x,q.y,q.width,q.height);b.__allowSmoothing&&c.smoothing||(k.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};ej.renderDrawableMask=function(a,b){};var tm=function(){};r["openfl.display._internal.CanvasVideo"]=tm;tm.__name__="openfl.display._internal.CanvasVideo";tm.render=function(a,b){if(a.__renderable&&a.__stream!=null){var c=b.__getAlpha(a.__worldAlpha);if(!(c<=0)){var d=b.context;if(a.__stream.__video!=null){b.__setBlendMode(a.__worldBlendMode);
b.__pushMaskObject(a);d.globalAlpha=c;c=a.__scrollRect;var f=a.smoothing;b.setTransform(a.__worldTransform,d);f||(d.imageSmoothingEnabled=!1);c==null?d.drawImage(a.__stream.__video,0,0,a.get_width(),a.get_height()):d.drawImage(a.__stream.__video,c.x,c.y,c.width,c.height,c.x,c.y,c.width,c.height);f||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a)}}}};tm.renderDrawable=function(a,b){tm.render(a,b);b.__renderEvent(a)};tm.renderDrawableMask=function(a,b){};var Hi=function(){};r["openfl.display._internal.Context3DBitmap"]=
Hi;Hi.__name__="openfl.display._internal.Context3DBitmap";Hi.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&a.__bitmapData!=null&&a.__bitmapData.__isValid){var c=b.__context3D;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.__initDisplayShader(a.__worldShader);b.setShader(d);b.applyBitmapData(a.__bitmapData,b.__allowSmoothing&&(a.smoothing||b.__upscaled));b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);
b.updateShader();var f=a.__bitmapData.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);d=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(d);b.__clearShader();b.__popMaskObject(a)}};Hi.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);a.__bitmapData!=null&&a.__bitmapData.image!=null&&(a.__imageVersion=a.__bitmapData.image.version);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==
null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}a.__graphics!=null&&
mj.render(a,b)}Hi.render(a,b)}else Hi.render(a.__cacheBitmap,b);b.__renderEvent(a)};Hi.renderDrawableMask=function(a,b){Hi.renderMask(a,b)};Hi.renderMask=function(a,b){if(a.__bitmapData!=null&&a.__bitmapData.__isValid){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(um.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.updateShader();var f=a.__bitmapData.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);
d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var Hs=function(){};r["openfl.display._internal.Context3DBitmapData"]=Hs;Hs.__name__="openfl.display._internal.Context3DBitmapData";Hs.renderDrawable=function(a,b){var c=b.__context3D;b.__setBlendMode(10);var d=b.__defaultDisplayShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.applyAlpha(a.__worldAlpha);
b.applyColorTransform(a.__worldColorTransform);b.updateShader();var f=a.getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};Hs.renderDrawableMask=function(a,b){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.updateShader();var f=a.getVertexBuffer(c);
d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};var Kl=function(a,b,c,d){this.context3D=a;this.elementType=b;this.dataPerVertex=d;this.vertexCount=this.indexCount=0;this.resize(c)};r["openfl.display._internal.Context3DBuffer"]=Kl;Kl.__name__="openfl.display._internal.Context3DBuffer";Kl.prototype={dataPerVertex:null,elementCount:null,elementType:null,
indexBufferData:null,indexBuffers:null,indexCount:null,vertexBuffer:null,vertexBufferData:null,vertexCount:null,context3D:null,drawElements:function(a,b){b==null&&(b=-1);if(this.indexCount!=0&&this.vertexCount!=0&&this.elementType._hx_index==0)if(b==-1&&(b=this.elementCount*2),a<10922&&b-a<10922)this.context3D.drawTriangles(this.indexBuffers[0],a,b*2);else for(var c=a+b;a<c;){var d=Math.floor(a/10922);b=Math.min(c-a,10922)|0;if(b<=0)break;this.context3D.drawTriangles(this.indexBuffers[d],(a-d*10922)*
3,b*2);a+=b}},flushVertexBufferData:function(){this.vertexBufferData.length>this.vertexCount&&(this.vertexCount=this.vertexBufferData.length,this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0));this.vertexBuffer.uploadFromTypedArray(Mk.toArrayBufferView(this.vertexBufferData))},resize:function(a,b){b==null&&(b=-1);this.elementCount=a;b==-1&&(b=this.dataPerVertex);b!=this.dataPerVertex&&(this.vertexBuffer=null,this.vertexCount=0,this.dataPerVertex=b);var c=0;
switch(this.elementType._hx_index){case 0:c=a*4;break;case 1:c=a*3;break;case 2:c=a*3}b*=c;if(this.vertexBufferData==null){var d=c=null,f=null,g=null,h=null;this.vertexBufferData=b=b!=null?new Float32Array(b):c!=null?new Float32Array(c):d!=null?new Float32Array(d.__array):f!=null?new Float32Array(f):g!=null?h==null?new Float32Array(g,0):new Float32Array(g,0,h):null}else b>this.vertexBufferData.length&&(a=this.vertexBufferData,h=g=f=d=c=null,this.vertexBufferData=b=b!=null?new Float32Array(b):c!=null?
new Float32Array(c):d!=null?new Float32Array(d.__array):f!=null?new Float32Array(f):g!=null?h==null?new Float32Array(g,0):new Float32Array(g,0,h):null,this.vertexBufferData.set(a))},__class__:Kl};var Ws=O["openfl.display._internal.Context3DElementType"]={__ename__:"openfl.display._internal.Context3DElementType",__constructs__:null,QUADS:{_hx_name:"QUADS",_hx_index:0,__enum__:"openfl.display._internal.Context3DElementType",toString:D},TRIANGLES:{_hx_name:"TRIANGLES",_hx_index:1,__enum__:"openfl.display._internal.Context3DElementType",
toString:D},TRIANGLE_INDICES:{_hx_name:"TRIANGLE_INDICES",_hx_index:2,__enum__:"openfl.display._internal.Context3DElementType",toString:D}};Ws.__constructs__=[Ws.QUADS,Ws.TRIANGLES,Ws.TRIANGLE_INDICES];var Sk=function(){};r["openfl.display._internal.Context3DDisplayObject"]=Sk;Sk.__name__="openfl.display._internal.Context3DDisplayObject";Sk.render=function(a,b){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&
a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}a.__graphics!=null&&mj.render(a,b)}};Sk.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap!=null&&!a.__isCacheBitmapRender)Hi.render(a.__cacheBitmap,
b);else if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}a.__graphics!=
null&&mj.render(a,b)}b.__renderEvent(a)};Sk.renderDrawableMask=function(a,b){a.__graphics!=null&&mj.renderMask(a,b)};Sk.renderMask=function(a,b){if(a.opaqueBackground!=null||a.__graphics!=null)a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height(),a.__graphics!=null&&mj.renderMask(a,b)};var Is=function(){};r["openfl.display._internal.Context3DDisplayObjectContainer"]=Is;Is.__name__="openfl.display._internal.Context3DDisplayObjectContainer";Is.renderDrawable=function(a,
b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(a.__worldAlpha<=0)&&(Sk.renderDrawable(a,b),a.__cacheBitmap==null||a.__isCacheBitmapRender)){if(a.__children.length>0)if(b.__pushMaskObject(a),b.__stage!=null){c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);
a.__children.length>0&&b.__popMaskObject(a)}};Is.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&d.__cleanup()}a.__removedChildren.set_length(0);a.__graphics!=null&&mj.renderMask(a,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var Ba=function(){};r["openfl.display._internal.Context3DGraphics"]=Ba;Ba.__name__="openfl.display._internal.Context3DGraphics";Ba.buildBuffer=function(a,b){var c=0,d=0,f=0,g=
a.__bounds,h=new fj(a.__commands),l=b.__context3D,k=Ea.__pool.get(),q=S.__pool.get(),w=null,v=a.__owner.__scale9Grid,z=v!=null&&!a.__owner.__isMask&&a.__worldTransform.b==0&&a.__worldTransform.c==0;z||(v=null);for(var n=0,E=a.__commands.types;n<E.length;){var H=E[n];++n;switch(H._hx_index){case 0:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=
4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.BEGIN_BITMAP_FILL;var J=h;w=J.buffer.o[J.oPos];break;case 1:w=null;switch(h.prev._hx_index){case 0:h.oPos+=
2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=
2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=H;break;case 2:w=null;switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=
2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=H;break;case 3:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;
case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.BEGIN_SHADER_FILL;var Q=h,T=Q.buffer.o[Q.oPos];w=null;if(T!=null)for(var fa=0,da=T.inputCount;fa<da;){var pa=fa++;if(T.inputRefs[pa].name=="bitmap"){w=T.inputs[pa];break}}break;case 6:switch(h.prev._hx_index){case 0:h.oPos+=
2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=
2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_CIRCLE;var xa=h,Ua=xa.buffer.f[xa.fPos],Sa=xa.buffer.f[xa.fPos+1],Ka=xa.buffer.f[xa.fPos+2],hb=a.__owner.get_scaleX(),Ra=a.__owner.get_scaleY();Gm.buildEllipseVerticesAndIndices(Ua-Ka,Sa-Ka,Ka,Ka,hb,Ra,Ba.tempVerticesVector,Ba.tempIndicesVector);var Jb=Ba.tempVerticesVector,vb=Ba.tempIndicesVector,Cb=null;if(z){Ba.tempScale9VerticesVector==null?Ba.tempScale9VerticesVector=gb.toFloatVector(null,Jb.get_length()):Ba.tempScale9VerticesVector.set_length(Jb.get_length());
for(var pc=0,qd=Jb.get_length(),Gb=!0;pc<qd;)Gb?Ba.tempScale9VerticesVector.set(pc,Ba.toScale9Position(Jb.get(pc),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ba.tempScale9VerticesVector.set(pc,Ba.toScale9Position(Jb.get(pc),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++pc,Gb=!Gb;Jb=Ba.tempScale9VerticesVector}w!=null&&Cb==null&&(Cb=Ba.tempUvtVector,Ba.populateUvtVector(Jb,w,Cb));var nd=vb!=null,le=Math.floor(Jb.get_length()/2),Pf=nd?vb.get_length():
le,mf=Cb!=null,Ig=mf&&Cb.get_length()>=le*3,Af=Ig?4:2,Xd=Ig?3:2,Yd=Af+2,Uk=Ig?f:d;Ba.resizeVertexBuffer(a,Ig,Uk+Pf*Yd);for(var jd=Ig?a.__vertexBufferDataUVT:a.__vertexBufferData,be,Gc,hk,Rc,ad=0,Nd=Pf;ad<Nd;){var Hc=ad++;be=Uk+Hc*Yd;Gc=nd?vb.get(Hc)*2:Hc*2;hk=nd?vb.get(Hc)*Xd:Hc*Xd;Ig?(Rc=Cb.get(hk+2),jd[be]=Jb.get(Gc)/Rc,jd[be+1]=Jb.get(Gc+1)/Rc,jd[be+2]=0,jd[be+3]=1/Rc):(jd[be]=Jb.get(Gc),jd[be+1]=Jb.get(Gc+1));jd[be+Af]=mf?Cb.get(hk):0;jd[be+Af+1]=mf?Cb.get(hk+1):0}Ig?f+=Pf*Yd:d+=Pf*Yd;break;case 7:switch(h.prev._hx_index){case 0:h.oPos+=
2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=
2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_ELLIPSE;var Fd=h,Te=Fd.buffer.f[Fd.fPos],Vf=Fd.buffer.f[Fd.fPos+1],Jg=Fd.buffer.f[Fd.fPos+2]/2,bf=Fd.buffer.f[Fd.fPos+3]/2,ik=a.__owner.get_scaleX(),jk=a.__owner.get_scaleY();Gm.buildEllipseVerticesAndIndices(Te,Vf,Jg,bf,ik,jk,Ba.tempVerticesVector,Ba.tempIndicesVector);var Le=Ba.tempVerticesVector,Wf=Ba.tempIndicesVector,ed=null;if(z){Ba.tempScale9VerticesVector==null?Ba.tempScale9VerticesVector=gb.toFloatVector(null,Le.get_length()):
Ba.tempScale9VerticesVector.set_length(Le.get_length());for(var dh=0,Cl=Le.get_length(),Vk=!0;dh<Cl;)Vk?Ba.tempScale9VerticesVector.set(dh,Ba.toScale9Position(Le.get(dh),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ba.tempScale9VerticesVector.set(dh,Ba.toScale9Position(Le.get(dh),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++dh,Vk=!Vk;Le=Ba.tempScale9VerticesVector}w!=null&&ed==null&&(ed=Ba.tempUvtVector,Ba.populateUvtVector(Le,w,ed));var On=Wf!=null,
kk=Math.floor(Le.get_length()/2),Rh=On?Wf.get_length():kk,Wk=ed!=null,he=Wk&&ed.get_length()>=kk*3,Xk=he?4:2,Dl=he?3:2,Ae=Xk+2,Fj=he?f:d;Ba.resizeVertexBuffer(a,he,Fj+Rh*Ae);for(var te=he?a.__vertexBufferDataUVT:a.__vertexBufferData,ue,El,Fl,Am,lk=0,vi=Rh;lk<vi;){var Bf=lk++;ue=Fj+Bf*Ae;El=On?Wf.get(Bf)*2:Bf*2;Fl=On?Wf.get(Bf)*Dl:Bf*Dl;he?(Am=ed.get(Fl+2),te[ue]=Le.get(El)/Am,te[ue+1]=Le.get(El+1)/Am,te[ue+2]=0,te[ue+3]=1/Am):(te[ue]=Le.get(El),te[ue+1]=Le.get(El+1));te[ue+Xk]=Wk?ed.get(Fl):0;te[ue+
Xk+1]=Wk?ed.get(Fl+1):0}he?f+=Rh*Ae:d+=Rh*Ae;break;case 8:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=
1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_QUADS;var Xb=h,Yk=Xb.buffer.o[Xb.oPos],mk=Xb.buffer.o[Xb.oPos+1],kg=Xb.buffer.o[Xb.oPos+2],Zk=mk!=null,Bm=!1,Gj=!1,Kg=Zk?mk.get_length():Math.floor(Yk.get_length()/4);if(Kg==0)return;kg!=null&&(kg.get_length()>=Kg*6?Gj=Bm=!0:kg.get_length()>=Kg*4?Bm=!0:kg.get_length()>=Kg*2&&(Gj=!0));a.__quadBuffer==null?a.__quadBuffer=new Kl(l,Ws.QUADS,
Kg,4):a.__quadBuffer.resize(c+Kg,4);var lg=a.__quadBuffer.vertexBufferData,Pn=1,Ue=1;w!=null&&(Pn=w.width,Ue=w.height);for(var $k=0,Fp=Kg;$k<Fp;){var al=$k++;var tg=(c+al)*16;var nk=Zk?mk.get(al)*4:al*4;if(!(nk<0)){k.setTo(Yk.get(nk),Yk.get(nk+1),Yk.get(nk+2),Yk.get(nk+3));var ug=k.width;var Sh=k.height;if(!(ug<=0||Sh<=0)){if(Bm&&Gj){var Od=al*6;q.setTo(kg.get(Od),kg.get(Od+1),kg.get(Od+2),kg.get(Od+3),kg.get(Od+4),kg.get(Od+5))}else Bm?(Od=al*4,q.setTo(kg.get(Od),kg.get(Od+1),kg.get(Od+2),kg.get(Od+
3),k.x,k.y)):Gj?(Od=al*2,q.tx=kg.get(Od),q.ty=kg.get(Od+1)):(q.tx=k.x,q.ty=k.y);var Ji=k.x/Pn;var zh=k.y/Ue;var Ah=k.get_right()/Pn;var ok=k.get_bottom()/Ue;var Ss=0*q.a+0*q.c+q.tx;var Gp=0*q.b+0*q.d+q.ty;var Ts=ug*q.a+0*q.c+q.tx;var ij=ug*q.b+0*q.d+q.ty;var Hp=0*q.a+Sh*q.c+q.tx;var jj=0*q.b+Sh*q.d+q.ty;var Gl=ug*q.a+Sh*q.c+q.tx;var kj=ug*q.b+Sh*q.d+q.ty;lg[tg]=Ss;lg[tg+1]=Gp;lg[tg+2]=Ji;lg[tg+3]=zh;lg[tg+4]=Ts;lg[tg+4+1]=ij;lg[tg+4+2]=Ah;lg[tg+4+3]=zh;lg[tg+8]=Hp;lg[tg+8+1]=jj;lg[tg+8+2]=Ji;lg[tg+
8+3]=ok;lg[tg+12]=Gl;lg[tg+12+1]=kj;lg[tg+12+2]=Ah;lg[tg+12+3]=ok}}}c+=Kg;break;case 9:if(w!=null){switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=
4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_RECT;var ie=h;Ba.tempVerticesVector.set_length(8);Ba.tempVerticesVector.set(0,ie.buffer.f[ie.fPos]);Ba.tempVerticesVector.set(1,ie.buffer.f[ie.fPos+1]);Ba.tempVerticesVector.set(2,ie.buffer.f[ie.fPos]+ie.buffer.f[ie.fPos+2]);Ba.tempVerticesVector.set(3,ie.buffer.f[ie.fPos+1]);Ba.tempVerticesVector.set(4,
ie.buffer.f[ie.fPos]);Ba.tempVerticesVector.set(5,ie.buffer.f[ie.fPos+1]+ie.buffer.f[ie.fPos+3]);Ba.tempVerticesVector.set(6,ie.buffer.f[ie.fPos]+ie.buffer.f[ie.fPos+2]);Ba.tempVerticesVector.set(7,ie.buffer.f[ie.fPos+1]+ie.buffer.f[ie.fPos+3]);Ba.tempIndicesVector.set_length(6);Ba.tempIndicesVector.set(0,0);Ba.tempIndicesVector.set(1,1);Ba.tempIndicesVector.set(2,2);Ba.tempIndicesVector.set(3,1);Ba.tempIndicesVector.set(4,2);Ba.tempIndicesVector.set(5,3);var vg=Ba.tempVerticesVector,Hj=Ba.tempIndicesVector,
Th=null;if(z){Ba.tempScale9VerticesVector==null?Ba.tempScale9VerticesVector=gb.toFloatVector(null,vg.get_length()):Ba.tempScale9VerticesVector.set_length(vg.get_length());for(var Ki=0,pk=vg.get_length(),Bh=!0;Ki<pk;)Bh?Ba.tempScale9VerticesVector.set(Ki,Ba.toScale9Position(vg.get(Ki),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ba.tempScale9VerticesVector.set(Ki,Ba.toScale9Position(vg.get(Ki),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++Ki,Bh=!Bh;
vg=Ba.tempScale9VerticesVector}w!=null&&Th==null&&(Th=Ba.tempUvtVector,Ba.populateUvtVector(vg,w,Th));var Lg=Hj!=null,wg=Math.floor(vg.get_length()/2),Mg=Lg?Hj.get_length():wg,eh=Th!=null,Xf=eh&&Th.get_length()>=wg*3,Ij=Xf?4:2,Jj=Xf?3:2,Cf=Ij+2,fh=Xf?f:d;Ba.resizeVertexBuffer(a,Xf,fh+Mg*Cf);for(var Yf=Xf?a.__vertexBufferDataUVT:a.__vertexBufferData,xg,lj,Ip,Jp,Cv=0,zw=Mg;Cv<zw;){var Qn=Cv++;xg=fh+Qn*Cf;lj=Lg?Hj.get(Qn)*2:Qn*2;Ip=Lg?Hj.get(Qn)*Jj:Qn*Jj;Xf?(Jp=Th.get(Ip+2),Yf[xg]=vg.get(lj)/Jp,Yf[xg+
1]=vg.get(lj+1)/Jp,Yf[xg+2]=0,Yf[xg+3]=1/Jp):(Yf[xg]=vg.get(lj),Yf[xg+1]=vg.get(lj+1));Yf[xg+Ij]=eh?Th.get(Ip):0;Yf[xg+Ij+1]=eh?Th.get(Ip+1):0}Xf?f+=Mg*Cf:d+=Mg*Cf}break;case 10:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=
5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_ROUND_RECT;var ve=h,Aw=ve.buffer.f[ve.fPos],Bw=ve.buffer.f[ve.fPos+1],Cw=ve.buffer.f[ve.fPos+2],Dw=ve.buffer.f[ve.fPos+3],Kp=ve.buffer.f[ve.fPos+4]/2,Dv=(ve.buffer.o[ve.oPos]!=null?ve.buffer.o[ve.oPos]:ve.buffer.f[ve.fPos+
4])/2,Lp=z&&ve.buffer.f[ve.fPos]+Kp<=v.x&&ve.buffer.f[ve.fPos]+ve.buffer.f[ve.fPos+2]-Kp>=v.x+v.width?1:a.__owner.get_scaleX(),Mp=z&&ve.buffer.f[ve.fPos+1]+Dv<=v.y&&ve.buffer.f[ve.fPos+1]+ve.buffer.f[ve.fPos+3]-Kp>=v.y+v.height?1:a.__owner.get_scaleY();Gm.buildRoundRectVerticesAndIndices(Aw,Bw,Cw,Dw,Kp,Dv,Lp,Mp,Ba.tempVerticesVector,Ba.tempIndicesVector);var Ch=Ba.tempVerticesVector,Hl=Ba.tempIndicesVector,Zf=null;if(z){Ba.tempScale9VerticesVector==null?Ba.tempScale9VerticesVector=gb.toFloatVector(null,
Ch.get_length()):Ba.tempScale9VerticesVector.set_length(Ch.get_length());for(var yg=0,Ev=Ch.get_length(),Np=!0;yg<Ev;)Np?Ba.tempScale9VerticesVector.set(yg,Ba.toScale9Position(Ch.get(yg),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ba.tempScale9VerticesVector.set(yg,Ba.toScale9Position(Ch.get(yg),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++yg,Np=!Np;Ch=Ba.tempScale9VerticesVector}w!=null&&Zf==null&&(Zf=Ba.tempUvtVector,Ba.populateUvtVector(Ch,w,Zf));
var Op=Hl!=null,Us=Math.floor(Ch.get_length()/2),Il=Op?Hl.get_length():Us,Cm=Zf!=null,Ng=Cm&&Zf.get_length()>=Us*3,Fv=Ng?4:2,gh=Ng?3:2,xd=Fv+2,Ew=Ng?f:d;Ba.resizeVertexBuffer(a,Ng,Ew+Il*xd);for(var Jl=Ng?a.__vertexBufferDataUVT:a.__vertexBufferData,bl,nf,Dm,Em,hh=0,Gv=Il;hh<Gv;){var Fm=hh++;bl=Ew+Fm*xd;nf=Op?Hl.get(Fm)*2:Fm*2;Dm=Op?Hl.get(Fm)*gh:Fm*gh;Ng?(Em=Zf.get(Dm+2),Jl[bl]=Ch.get(nf)/Em,Jl[bl+1]=Ch.get(nf+1)/Em,Jl[bl+2]=0,Jl[bl+3]=1/Em):(Jl[bl]=Ch.get(nf),Jl[bl+1]=Ch.get(nf+1));Jl[bl+Fv]=Cm?
Zf.get(Dm):0;Jl[bl+Fv+1]=Cm?Zf.get(Dm+1):0}Ng?f+=Il*xd:d+=Il*xd;break;case 12:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=
2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=1;break;case 20:h.oPos+=1}h.prev=va.DRAW_TRIANGLES;var Uh=h,Vs=Uh.buffer.o[Uh.oPos+1],qk=Uh.buffer.o[Uh.oPos],Rn=Uh.buffer.o[Uh.oPos+2];if(z){Ba.tempScale9VerticesVector==null?Ba.tempScale9VerticesVector=gb.toFloatVector(null,qk.get_length()):Ba.tempScale9VerticesVector.set_length(qk.get_length());for(var Xs=0,tx=qk.get_length(),Uw=!0;Xs<tx;)Uw?Ba.tempScale9VerticesVector.set(Xs,
Ba.toScale9Position(qk.get(Xs),v.x,v.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ba.tempScale9VerticesVector.set(Xs,Ba.toScale9Position(qk.get(Xs),v.y,v.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++Xs,Uw=!Uw;qk=Ba.tempScale9VerticesVector}w!=null&&Rn==null&&(Rn=Ba.tempUvtVector,Ba.populateUvtVector(qk,w,Rn));var Vw=Vs!=null,jx=Math.floor(qk.get_length()/2),Gw=Vw?Vs.get_length():jx,Ww=Rn!=null,Pp=Ww&&Rn.get_length()>=jx*3,Xw=Pp?4:2,kx=Pp?3:2,Hw=Xw+2,lx=Pp?f:d;
Ba.resizeVertexBuffer(a,Pp,lx+Gw*Hw);for(var Sn=Pp?a.__vertexBufferDataUVT:a.__vertexBufferData,Hm,Hv,Iw,Jw,mx=0,ux=Gw;mx<ux;){var Iv=mx++;Hm=lx+Iv*Hw;Hv=Vw?Vs.get(Iv)*2:Iv*2;Iw=Vw?Vs.get(Iv)*kx:Iv*kx;Pp?(Jw=Rn.get(Iw+2),Sn[Hm]=qk.get(Hv)/Jw,Sn[Hm+1]=qk.get(Hv+1)/Jw,Sn[Hm+2]=0,Sn[Hm+3]=1/Jw):(Sn[Hm]=qk.get(Hv),Sn[Hm+1]=qk.get(Hv+1));Sn[Hm+Xw]=Ww?Rn.get(Iw):0;Sn[Hm+Xw+1]=Ww?Rn.get(Iw+1):0}Pp?f+=Gw*Hw:d+=Gw*Hw;break;case 13:w=null;break;default:switch(h.prev._hx_index){case 0:h.oPos+=2;h.bPos+=2;break;
case 1:h.iPos+=1;h.fPos+=1;break;case 2:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 3:h.oPos+=1;break;case 4:h.fPos+=6;break;case 5:h.fPos+=4;break;case 6:h.fPos+=3;break;case 7:h.fPos+=4;break;case 8:h.oPos+=3;break;case 9:h.fPos+=4;break;case 10:h.fPos+=5;h.oPos+=1;break;case 12:h.oPos+=4;break;case 14:h.oPos+=2;h.bPos+=2;break;case 15:h.oPos+=4;h.iiPos+=2;h.ffPos+=1;h.fPos+=1;break;case 16:h.oPos+=4;h.iPos+=1;h.fPos+=2;h.bPos+=1;break;case 17:h.fPos+=2;break;case 18:h.fPos+=2;break;case 19:h.oPos+=
1;break;case 20:h.oPos+=1}h.prev=H}}c>0&&a.__quadBuffer.flushVertexBufferData();if(d>0){var Im=a.__vertexBuffer;if(Im==null||d>a.__vertexBufferCount)Im=l.createVertexBuffer(d,4,0),a.__vertexBuffer=Im,a.__vertexBufferCount=d;Im.uploadFromTypedArray(Mk.toArrayBufferView(a.__vertexBufferData))}if(f>0){Im=a.__vertexBufferUVT;if(Im==null||f>a.__vertexBufferCountUVT)Im=l.createVertexBuffer(f,6,0),a.__vertexBufferUVT=Im,a.__vertexBufferCountUVT=f;Im.uploadFromTypedArray(Mk.toArrayBufferView(a.__vertexBufferDataUVT))}Ea.__pool.release(k);
S.__pool.release(q)};Ba.isCompatible=function(a){if(a.__owner.__worldScale9Grid!=null)return!1;var b=new fj(a.__commands),c=!1,d=!1,f=!1,g=0;for(a=a.__commands.types;g<a.length;){var h=a[g];++g;switch(h._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;
case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=va.BEGIN_BITMAP_FILL;c=b;if(c.buffer.o[c.oPos+1]!=null)return b.destroy(),!1;d=!0;f=c=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;
case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=h;break;case 1:d=!1;c=!0;f=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 3:c=d=!1;f=!0;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;
case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 8:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;
break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 9:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=
2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;
break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 12:if(c||d||f){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h}else return b.destroy(),!1;break;case 13:f=c=d=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;case 19:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=h;break;default:return b.destroy(),!1}}b.destroy();return!0};Ba.render=function(a,b){if(a.__visible&&a.__commands.get_length()!=0){if(a.__bitmap!=null&&!a.__dirty||!Ba.isCompatible(a)){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer.__worldTransform;b.__softwareRenderer.__worldTransform=a.__owner.__drawableType==7?S.__identity:b.__worldTransform;B.render(a,b.__softwareRenderer);b.__softwareRenderer.__worldTransform=
c}else{a.__bitmap=null;a.__update(b.__worldTransform,b.__pixelRatio);var d=a.__bounds,f=a.__width,g=a.__height;if(d!=null&&f>=1&&g>=1){(a.__hardwareDirty||a.__quadBuffer==null&&a.__vertexBuffer==null&&a.__vertexBufferUVT==null)&&Ba.buildBuffer(a,b);var h=a.__owner.__scale9Grid,l=h!=null&&!a.__owner.__isMask&&a.__worldTransform.b==0&&a.__worldTransform.c==0;l||(h=null);for(var k=new fj(a.__commands),q=b.__context3D,w=S.__pool.get(),v=null,z=null,n=!1,E=!1,H=null,J=0,Q=0,T=0,fa=0,da=0,pa=a.__commands.types;da<
pa.length;){var xa=pa[da];++da;switch(xa._hx_index){case 0:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=
1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.BEGIN_BITMAP_FILL;var Ua=k;z=Ua.buffer.o[Ua.oPos];n=Ua.buffer.b[Ua.bPos];E=Ua.buffer.b[Ua.bPos+1];H=v=null;break;case 1:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=
3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.BEGIN_FILL;var Sa=k;H=(Sa.buffer.i[Sa.iPos]|0)&16777215|(Sa.buffer.f[Sa.fPos]*255|0)<<24;z=v=null;break;case 2:switch(k.prev._hx_index){case 0:k.oPos+=
2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=
2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=xa;H=0;z=v=null;break;case 3:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=
4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.BEGIN_SHADER_FILL;var Ka=k;v=Ka.buffer.o[Ka.oPos];Q=0;z=v==null||v.shader==null||v.shader.__bitmap==null?null:v.shader.__bitmap.input;H=null;break;case 6:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=
1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_CIRCLE;var hb=k,Ra=hb.buffer.f[hb.fPos+2],Jb=Math.PI*
(Ra+Ra)/4|0;Jb<6&&(Jb=6);var vb=Jb,Cb=vb*2,pc=(vb-2)*3,qd=0;z!=null&&qd==0&&(qd=Cb);if(z!=null||v!=null||qd==0&&H!=null){var Gb=Math.floor(Cb/2),nd=pc>0?pc:Gb,le=qd>=Gb*3,Pf=le?4:2,mf=Pf+2,Ig=le?a.__vertexBufferUVT:a.__vertexBuffer,Af=le?fa:T,Xd=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var Yd=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Yd);b.applyMatrix(Xd);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Yd=
Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Yd);b.applyMatrix(Xd);b.applyBitmapData(Ba.blankBitmapData,!0,n);var Uk=H;Ba.tempColorTransform.redOffset=Uk>>>16&255;Ba.tempColorTransform.greenOffset=Uk>>>8&255;Ba.tempColorTransform.blueOffset=Uk&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Uk>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else Yd=b.__initShaderBuffer(v),b.__setShaderBuffer(v),
b.applyMatrix(Xd),b.applyBitmapData(z,!1,n),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);Yd.__position!=null&&q.setVertexBufferAt(Yd.__position.index,Ig,Af,le?4:2);Yd.__textureCoord!=null&&q.setVertexBufferAt(Yd.__textureCoord.index,Ig,Af+Pf,2);q.setCulling(3);q.__drawTriangles(0,nd);Q+=nd;le?fa+=mf*nd:T+=mf*nd;q.setCulling(0);b.__clearShader()}break;case 7:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=
2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_ELLIPSE;
var jd=k,be=jd.buffer.f[jd.fPos+2]/2,Gc=jd.buffer.f[jd.fPos+3]/2,hk=a.__owner.get_scaleX(),Rc=a.__owner.get_scaleY(),ad=Math.PI*(be*hk+Gc*Rc)/4|0;ad<6&&(ad=6);var Nd=ad,Hc=Nd*2,Fd=(Nd-2)*3,Te=0;z!=null&&Te==0&&(Te=Hc);if(z!=null||v!=null||Te==0&&H!=null){var Vf=Math.floor(Hc/2),Jg=Fd>0?Fd:Vf,bf=Te>=Vf*3,ik=bf?4:2,jk=ik+2,Le=bf?a.__vertexBufferUVT:a.__vertexBuffer,Wf=bf?fa:T,ed=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var dh=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);
b.setShader(dh);b.applyMatrix(ed);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{dh=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(dh);b.applyMatrix(ed);b.applyBitmapData(Ba.blankBitmapData,!0,n);var Cl=H;Ba.tempColorTransform.redOffset=Cl>>>16&255;Ba.tempColorTransform.greenOffset=Cl>>>8&255;Ba.tempColorTransform.blueOffset=Cl&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Cl>>>
24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else dh=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(ed),b.applyBitmapData(z,!1,n),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);dh.__position!=null&&q.setVertexBufferAt(dh.__position.index,Le,Wf,bf?4:2);dh.__textureCoord!=null&&q.setVertexBufferAt(dh.__textureCoord.index,Le,Wf+ik,2);q.setCulling(3);q.__drawTriangles(0,Jg);Q+=Jg;bf?fa+=jk*Jg:T+=jk*Jg;q.setCulling(0);
b.__clearShader()}break;case 8:if(z!=null||H!=null){switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;
break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_QUADS;var Vk=k,On=Vk.buffer.o[Vk.oPos],kk=Vk.buffer.o[Vk.oPos+1],Rh=kk!=null?kk.get_length():Math.floor(On.get_length()/4),Wk=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var he=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(he);b.applyMatrix(Wk);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);
b.applyColorTransform(a.__owner.__worldColorTransform)}else{he=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(he);b.applyMatrix(Wk);b.applyBitmapData(Ba.blankBitmapData,!0,n);var Xk=H;Ba.tempColorTransform.redOffset=Xk>>>16&255;Ba.tempColorTransform.greenOffset=Xk>>>8&255;Ba.tempColorTransform.blueOffset=Xk&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Xk>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else he=
b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(Wk),b.applyBitmapData(z,!1,n),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform);for(var Dl=J+Rh;J<Dl;){Rh=Math.min(Dl-J,q.__quadIndexBufferElements)|0;if(Rh<=0)break;v==null||Ba.maskRender||b.__updateShaderBuffer(Q);he.__position!=null&&q.setVertexBufferAt(he.__position.index,a.__quadBuffer.vertexBuffer,J*16,2);he.__textureCoord!=null&&q.setVertexBufferAt(he.__textureCoord.index,a.__quadBuffer.vertexBuffer,
J*16+2,2);q.drawTriangles(q.__quadIndexBuffer,0,Rh*2);Q+=Rh*4;J+=Rh}b.__clearShader()}break;case 9:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=
4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_RECT;var Ae=k;if(z!=null){var Fj=0;z!=null&&Fj==0&&(Fj=8);if(z!=null||v!=null||Fj==0&&H!=null){var te=Fj>=12,ue=te?4:2,El=ue+2,Fl=te?a.__vertexBufferUVT:a.__vertexBuffer,Am=te?fa:T,lk=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var vi=Ba.maskRender?b.__maskShader:
b.__initGraphicsShader(null);b.setShader(vi);b.applyMatrix(lk);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{vi=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(vi);b.applyMatrix(lk);b.applyBitmapData(Ba.blankBitmapData,!0,n);var Bf=H;Ba.tempColorTransform.redOffset=Bf>>>16&255;Ba.tempColorTransform.greenOffset=Bf>>>8&255;Ba.tempColorTransform.blueOffset=Bf&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);
b.applyAlpha((Bf>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else vi=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(lk),b.applyBitmapData(z,!1,n),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);vi.__position!=null&&q.setVertexBufferAt(vi.__position.index,Fl,Am,te?4:2);vi.__textureCoord!=null&&q.setVertexBufferAt(vi.__textureCoord.index,Fl,Am+ue,2);q.setCulling(3);q.__drawTriangles(0,6);Q+=6;te?fa+=El*6:T+=
El*6;q.setCulling(0);b.__clearShader()}}else if(H!=null){var Xb=Ae.buffer.f[Ae.fPos],Yk=Ae.buffer.f[Ae.fPos+1];f=Ae.buffer.f[Ae.fPos+2];g=Ae.buffer.f[Ae.fPos+3];if(l){var mk=Ba.toScale9Position(Ae.buffer.f[Ae.fPos],h.x,h.width,d.width,a.__owner.get_scaleX()),kg=Ba.toScale9Position(Ae.buffer.f[Ae.fPos+1],h.y,h.height,d.height,a.__owner.get_scaleY()),Zk=Ba.toScale9Position(Ae.buffer.f[Ae.fPos]+Ae.buffer.f[Ae.fPos+2],h.x,h.width,d.width,a.__owner.get_scaleX()),Bm=Ba.toScale9Position(Ae.buffer.f[Ae.fPos+
1]+Ae.buffer.f[Ae.fPos+3],h.y,h.height,d.height,a.__owner.get_scaleY());Xb=mk/a.__owner.get_scaleX();Yk=kg/a.__owner.get_scaleY();f=(Zk-mk)/a.__owner.get_scaleX();g=(Bm-kg)/a.__owner.get_scaleY()}w.identity();w.scale(f,g);w.tx=Xb;w.ty=Yk;w.concat(a.__owner.__renderTransform);var Gj=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Gj);b.applyMatrix(b.__getMatrix(w,1));b.applyBitmapData(Ba.blankBitmapData,!0,n);var Kg=H;Ba.tempColorTransform.redOffset=Kg>>>16&255;Ba.tempColorTransform.greenOffset=
Kg>>>8&255;Ba.tempColorTransform.blueOffset=Kg&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Kg>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform);b.updateShader();var lg=Ba.blankBitmapData.getVertexBuffer(q);Gj.__position!=null&&q.setVertexBufferAt(Gj.__position.index,lg,0,3);Gj.__textureCoord!=null&&q.setVertexBufferAt(Gj.__textureCoord.index,lg,3,2);var Pn=Ba.blankBitmapData.getIndexBuffer(q);q.drawTriangles(Pn);Q+=4;b.__clearShader()}break;
case 10:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;
k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_ROUND_RECT;var Ue=k,$k=Ue.buffer.f[Ue.fPos+4]/2,Fp=(Ue.buffer.o[Ue.oPos]!=null?Ue.buffer.o[Ue.oPos]:Ue.buffer.f[Ue.fPos+4])/2,al=l&&Ue.buffer.f[Ue.fPos]+$k<=h.x&&Ue.buffer.f[Ue.fPos]+Ue.buffer.f[Ue.fPos+2]-$k>=h.x+h.width?1:a.__owner.get_scaleX(),tg=l&&Ue.buffer.f[Ue.fPos+1]+Fp<=h.y&&Ue.buffer.f[Ue.fPos+1]+Ue.buffer.f[Ue.fPos+3]-$k>=h.y+h.height?1:a.__owner.get_scaleY(),nk=Math.ceil(Math.PI*
($k*al+Fp*tg)/8);nk<3&&(nk=3);var ug=nk*4,Sh=ug*2,Od=(ug-2)*3,Ji=0;z!=null&&Ji==0&&(Ji=Sh);if(z!=null||v!=null||Ji==0&&H!=null){var zh=Math.floor(Sh/2),Ah=Od>0?Od:zh,ok=Ji>=zh*3,Ss=ok?4:2,Gp=Ss+2,Ts=ok?a.__vertexBufferUVT:a.__vertexBuffer,ij=ok?fa:T,Hp=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var jj=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(jj);b.applyMatrix(Hp);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{jj=
Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(jj);b.applyMatrix(Hp);b.applyBitmapData(Ba.blankBitmapData,!0,n);var Gl=H;Ba.tempColorTransform.redOffset=Gl>>>16&255;Ba.tempColorTransform.greenOffset=Gl>>>8&255;Ba.tempColorTransform.blueOffset=Gl&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Gl>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else jj=b.__initShaderBuffer(v),b.__setShaderBuffer(v),
b.applyMatrix(Hp),b.applyBitmapData(z,!1,n),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);jj.__position!=null&&q.setVertexBufferAt(jj.__position.index,Ts,ij,ok?4:2);jj.__textureCoord!=null&&q.setVertexBufferAt(jj.__textureCoord.index,Ts,ij+Ss,2);q.setCulling(3);q.__drawTriangles(0,Ah);Q+=Ah;ok?fa+=Gp*Ah:T+=Gp*Ah;q.setCulling(0);b.__clearShader()}break;case 12:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=
2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.DRAW_TRIANGLES;
var kj=k,ie=kj.buffer.o[kj.oPos+1],vg=kj.buffer.o[kj.oPos+2],Hj=kj.buffer.o[kj.oPos+3],Th=kj.buffer.o[kj.oPos].get_length(),Ki=ie!=null?ie.get_length():0,pk=vg!=null?vg.get_length():0;z!=null&&pk==0&&(pk=Th);if(z!=null||v!=null||pk==0&&H!=null){var Bh=Math.floor(Th/2),Lg=Ki>0?Ki:Bh,wg=pk>=Bh*3,Mg=wg?4:2,eh=Mg+2,Xf=wg?a.__vertexBufferUVT:a.__vertexBuffer,Ij=wg?fa:T,Jj=b.__getMatrix(a.__owner.__renderTransform,1);if(v==null||Ba.maskRender){if(z!=null){var Cf=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);
b.setShader(Cf);b.applyMatrix(Jj);b.applyBitmapData(z,E,n);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Cf=Ba.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Cf);b.applyMatrix(Jj);b.applyBitmapData(Ba.blankBitmapData,!0,n);var fh=H;Ba.tempColorTransform.redOffset=fh>>>16&255;Ba.tempColorTransform.greenOffset=fh>>>8&255;Ba.tempColorTransform.blueOffset=fh&255;Ba.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((fh>>>
24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ba.tempColorTransform)}b.updateShader()}else Cf=b.__initShaderBuffer(v),b.__setShaderBuffer(v),b.applyMatrix(Jj),b.applyBitmapData(z,!1,n),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(Q);Cf.__position!=null&&q.setVertexBufferAt(Cf.__position.index,Xf,Ij,wg?4:2);Cf.__textureCoord!=null&&q.setVertexBufferAt(Cf.__textureCoord.index,Xf,Ij+Mg,2);switch(Hj){case 0:q.setCulling(0);break;case 1:q.setCulling(3);break;case 2:q.setCulling(1)}q.__drawTriangles(0,
Lg);Q+=Lg;wg?fa+=eh*Lg:T+=eh*Lg;switch(Hj){case 1:case 2:q.setCulling(0)}b.__clearShader()}break;case 13:v=H=z=null;switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=
2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=xa;q.setCulling(3);break;case 18:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=
4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.MOVE_TO;break;case 19:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=
1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=va.OVERRIDE_BLEND_MODE;
var Yf=k;b.__setBlendMode(Yf.buffer.o[Yf.oPos]);break;default:switch(k.prev._hx_index){case 0:k.oPos+=2;k.bPos+=2;break;case 1:k.iPos+=1;k.fPos+=1;break;case 2:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;k.fPos+=1;break;case 3:k.oPos+=1;break;case 4:k.fPos+=6;break;case 5:k.fPos+=4;break;case 6:k.fPos+=3;break;case 7:k.fPos+=4;break;case 8:k.oPos+=3;break;case 9:k.fPos+=4;break;case 10:k.fPos+=5;k.oPos+=1;break;case 12:k.oPos+=4;break;case 14:k.oPos+=2;k.bPos+=2;break;case 15:k.oPos+=4;k.iiPos+=2;k.ffPos+=1;
k.fPos+=1;break;case 16:k.oPos+=4;k.iPos+=1;k.fPos+=2;k.bPos+=1;break;case 17:k.fPos+=2;break;case 18:k.fPos+=2;break;case 19:k.oPos+=1;break;case 20:k.oPos+=1}k.prev=xa}}S.__pool.release(w)}a.set___dirty(!1)}a.__hardwareDirty=!1}};Ba.renderMask=function(a,b){Ba.maskRender=!0;Ba.render(a,b);Ba.maskRender=!1};Ba.resizeIndexBuffer=function(a,b,c){if(!b){var d=b?null:a.__triangleIndexBufferData,f=null;if(d==null){var g=f=null,h=null,l=null,k=null;f=c=c!=null?new Uint16Array(c):f!=null?new Uint16Array(f):
g!=null?new Uint16Array(g.__array):h!=null?new Uint16Array(h):l!=null?k==null?new Uint16Array(l,0):new Uint16Array(l,0,k):null}else c>d.length&&(k=l=h=g=f=null,f=c=c!=null?new Uint16Array(c):f!=null?new Uint16Array(f):g!=null?new Uint16Array(g.__array):h!=null?new Uint16Array(h):l!=null?k==null?new Uint16Array(l,0):new Uint16Array(l,0,k):null,f.set(d));f==null||b||(a.__triangleIndexBufferData=f)}};Ba.resizeVertexBuffer=function(a,b,c){var d=b?a.__vertexBufferDataUVT:a.__vertexBufferData,f=null;if(d==
null){var g=f=null,h=null,l=null,k=null;f=c=c!=null?new Float32Array(c):f!=null?new Float32Array(f):g!=null?new Float32Array(g.__array):h!=null?new Float32Array(h):l!=null?k==null?new Float32Array(l,0):new Float32Array(l,0,k):null}else c>d.length&&(k=l=h=g=f=null,f=c=c!=null?new Float32Array(c):f!=null?new Float32Array(f):g!=null?new Float32Array(g.__array):h!=null?new Float32Array(h):l!=null?k==null?new Float32Array(l,0):new Float32Array(l,0,k):null,f.set(d));f!=null&&(b?a.__vertexBufferDataUVT=
f:a.__vertexBufferData=f)};Ba.populateUvtVector=function(a,b,c){for(var d=a.get(0),f=d,g=a.get(1),h=g,l=2,k=a.get_length();l<k;){var q=a.get(l);d>q?d=q:f<q&&(f=q);q=a.get(l+1);g>q?g=q:h<q&&(h=q);l+=2}d=f-d;g=h-g;c.set_length(k);for(l=0;l<k;)c.set(l,d*(a.get(l)/d)/b.width),c.set(l+1,g*(a.get(l+1)/g)/b.height),l+=2};Ba.toScale9Position=function(a,b,c,d,f){if(f<=0)return 0;var g=d-c-b;d=d*f-b-g;return a<=b?d<0?a*(b+g+d)/(b+g):a:a>=b+c?d<0?(b+(a-b-c))*(b+g+d)/(b+g):b+d+(a-b-c):d<0?b*(b+g+d)/(b+g):b+d*
(a-b)/c};var Gm=function(){};r["openfl.display._internal._Context3DGraphics.PolygonFunctions"]=Gm;Gm.__name__="openfl.display._internal._Context3DGraphics.PolygonFunctions";Gm.getEllipseNumVertices=function(a,b){a=Math.PI*(a+b)/4|0;a<6&&(a=6);return a};Gm.buildEllipseVerticesAndIndices=function(a,b,c,d,f,g,h,l){f=Math.PI*(c*f+d*g)/4|0;f<6&&(f=6);g=2*Math.PI/f;var k=0;h.set_length(f*2);for(var q=0,w=f;q<w;){var v=q++;h.set(v*2,Math.cos(k)*c+a+c);h.set(v*2+1,Math.sin(k)*d+b+d);k+=g}l.set_length((f-
2)*3);q=0;for(w=f-2;q<w;)v=q++,l.set(v*3,0),l.set(v*3+1,v+1),l.set(v*3+2,v+2)};Gm.getRoundRectNumVertices=function(a,b){a=Math.ceil(Math.PI*(a+b)/8);a<3&&(a=3);return a*4};Gm.buildRoundRectVerticesAndIndices=function(a,b,c,d,f,g,h,l,k,q){h=Math.ceil(Math.PI*(f*h+g*l)/8);h<3&&(h=3);l=h*4;var w=l/4|0,v=Math.PI/2/(w-1),z=0,n=c-f-f,E=d-g-g,H=!0;k.set_length(l*2);var J=0,Q=w;for(h=0;h<4;){for(h++;J<Q;)k.set(J*2,n+Math.cos(z)*f+a+f),k.set(J*2+1,E+Math.sin(z)*g+b+g),z+=v,++J;z-=v;H?n=n==0?c-f-f:0:E=E==0?
d-g-g:0;H=!H;Q+=w}q.set_length((l-2)*3);h=0;for(b=l-2;h<b;)a=h++,q.set(a*3,0),q.set(a*3+1,a+1),q.set(a*3+2,a+2)};var um=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\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\tdiscard;\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = color;\n\n\t\t\t}\n\n\t\t}");this.__glVertexSource==
null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");Hh.call(this);this.__isGenerated=!0;this.__initGL()};r["openfl.display._internal.Context3DMaskShader"]=um;um.__name__="openfl.display._internal.Context3DMaskShader";um.__super__=
Hh;um.prototype=I(Hh.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:um});var mj=function(){};r["openfl.display._internal.Context3DShape"]=mj;mj.__name__="openfl.display._internal.Context3DShape";mj.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)){var c=a.__graphics;if(c!=null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);Ba.render(c,b);if(c.__bitmap!=null&&c.__visible){var d=b.__context3D,f=b.__initDisplayShader(a.__worldShader);
b.setShader(f);b.applyBitmapData(c.__bitmap,!0);var g=S.__pool.get();g.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY);g.concat(c.__worldTransform);b.applyMatrix(b.__getMatrix(g,1));S.__pool.release(g);b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();g=c.__bitmap.getVertexBuffer(d);f.__position!=null&&d.setVertexBufferAt(f.__position.index,g,0,3);f.__textureCoord!=null&&d.setVertexBufferAt(f.__textureCoord.index,g,3,2);c=c.__bitmap.getIndexBuffer(d);d.drawTriangles(c);
b.__clearShader()}b.__popMaskObject(a)}}};mj.renderMask=function(a,b){var c=a.__graphics;if(c!=null&&(Ba.renderMask(c,b),c.__bitmap!=null)){a=b.__context3D;var d=b.__maskShader;b.setShader(d);b.applyBitmapData(c.__bitmap,!0);b.applyMatrix(b.__getMatrix(c.__worldTransform,1));b.updateShader();var f=c.__bitmap.getVertexBuffer(a);d.__position!=null&&a.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&a.setVertexBufferAt(d.__textureCoord.index,f,3,2);c=c.__bitmap.getIndexBuffer(a);a.drawTriangles(c);
b.__clearShader()}};var Js=function(){};r["openfl.display._internal.Context3DSimpleButton"]=Js;Js.__name__="openfl.display._internal.Context3DSimpleButton";Js.renderDrawable=function(a,b){!a.__renderable||a.__worldAlpha<=0||a.__currentState==null||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};Js.renderDrawableMask=function(a,b){a.__currentState!=null&&b.__renderDrawableMask(a.__currentState)};var Tk=function(){};r["openfl.display._internal.Context3DTextField"]=
Tk;Tk.__name__="openfl.display._internal.Context3DTextField";Tk.render=function(a,b){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer,d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;b=a.__graphics;var h=0;if(a.__dirty){a.__updateLayout();b.__bounds==null&&(b.__bounds=new Ea);if(a.get_text().length==0){h=d.bounds.width-4;var l=a.get_defaultTextFormat().align;h=l==3?0:l==4?h:h/2;switch(l){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/
2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}b.__bounds.copyFrom(g)}l=c.__pixelRatio;if(b.__bitmapScaleX!=l||b.__bitmapScaleY!=
l)b.__softwareDirty=!0;b.__update(c.__worldTransform,l);if(a.__dirty||b.__softwareDirty){var k=Math.round(b.__width*l),q=Math.round(b.__height*l);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),
a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));ia.context=b.__context;b.__canvas.width=k;b.__canvas.height=q;c.__isDOM&&(b.__canvas.style.width=Math.round(k/l)+"px",b.__canvas.style.height=Math.round(q/l)+"px");k=S.__pool.get();k.scale(l,l);k.concat(b.__renderTransform);ia.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);S.__pool.release(k);ia.clearRect==null&&(ia.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");ia.clearRect&&ia.context.clearRect(0,
0,b.__canvas.width,b.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||d.antiAliasType==0&&d.sharpness==400?!1:!0;if(d.border||d.background){ia.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var w=Z.hex(d.backgroundColor&16777215,6);ia.context.fillStyle="#"+w;ia.context.fill()}d.border&&(ia.context.lineWidth=1,w=Z.hex(d.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke())}ia.context.textBaseline=
"alphabetic";ia.context.textAlign="start";c=-a.get_scrollH();var v=h=0;for(w=a.get_scrollV()-1;v<w;){var z=v++;h-=d.lineHeights.get(z)}var n;for(k=d.layoutGroups.iterator();k.hasNext();)if(q=k.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var E="#"+Z.hex(q.format.color&16777215,6);ia.context.font=Oc.getFont(q.format);ia.context.fillStyle=E;ia.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+c-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&
d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=n=0;for(w=a.__caretIndex-q.startIndex;v<w;){z=v++;if(q.positions.length<=z)break;n+=q.positions[z]}v=0;w=a.get_scrollV();for(z=q.lineIndex+1;w<z;){var H=w++;v+=d.lineHeights.get(H-1)}ia.context.beginPath();w=Z.hex(q.format.color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(q.offsetX+n-a.get_scrollH()-g.x,v+2-g.y);ia.context.lineWidth=1;ia.context.lineTo(q.offsetX+
n-a.get_scrollH()-g.x,v+Oc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);ia.context.stroke();ia.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)n=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>n&&(n=q.startIndex),
q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(n),v>=q.endIndex?(w=a.getCharBoundaries(q.endIndex-1),w!=null&&(w.x+=w.width+2)):w=a.getCharBoundaries(v),z!=null&&w!=null&&(ia.context.fillStyle="#000000",ia.context.fillRect(z.x+c-g.x,z.y+h,w.x-z.x,q.height),ia.context.fillStyle="#FFFFFF",ia.context.fillText(f.substring(n,v),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(ia.context.beginPath(),ia.context.strokeStyle=E,ia.context.lineWidth=1,n=q.offsetX+c-g.x,v=Math.ceil(q.offsetY+h+q.ascent-
g.y)+Math.floor(q.ascent*.185)+.5,ia.context.moveTo(n,v),ia.context.lineTo(n+q.width,v),ia.context.stroke(),ia.context.closePath());q.format.strikethrough&&(ia.context.beginPath(),ia.context.strokeStyle=E,ia.context.lineWidth=1,E=q.offsetX+c-g.x,n=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),ia.context.moveTo(E,n),ia.context.lineTo(E+q.width,n),ia.context.stroke(),ia.context.closePath())}}else{if(d.border||d.background)d.border?ia.context.rect(.5,.5,g.width-1,g.height-1):ia.context.rect(0,0,g.width,g.height),
d.background&&(w=Z.hex(d.backgroundColor&16777215,6),ia.context.fillStyle="#"+w,ia.context.fill()),d.border&&(ia.context.lineWidth=1,ia.context.lineCap="square",w=Z.hex(d.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);v=h=0;for(w=a.get_scrollV()-1;v<w;)z=v++,h+=d.lineHeights.get(z);ia.context.beginPath();w=Z.hex(a.get_defaultTextFormat().color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(c+
2.5,h+2.5);ia.context.lineWidth=1;ia.context.lineTo(c+2.5,h+Oc.getFormatHeight(a.get_defaultTextFormat())-1);ia.context.stroke();ia.context.closePath()}}b.__bitmap==null?b.__bitmap=uc.fromCanvas(b.__canvas):b.__bitmap.width!=b.__canvas.width||b.__bitmap.height!=b.__canvas.height?(d=b.__bitmap.__texture,d!=null&&d.dispose(),b.__bitmap=uc.fromCanvas(b.__canvas)):b.__bitmap.image.version++;b.__bitmapScaleX=l;b.__bitmapScaleY=l;b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=
!1};Tk.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(Tk.render(a,b),!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;
c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}a.__graphics!=null&&mj.render(a,b)}}else Hi.render(a.__cacheBitmap,b);b.__renderEvent(a)};Tk.renderDrawableMask=function(a,b){Tk.renderMask(a,b);Sk.renderDrawableMask(a,b)};Tk.renderMask=function(a,b){var c=b.__softwareRenderer,d=a.__textEngine,f=!(d.background||d.border),g=f?d.textBounds:d.bounds;b=a.__graphics;var h=0;if(a.__dirty){a.__updateLayout();b.__bounds==null&&(b.__bounds=
new Ea);if(a.get_text().length==0){h=d.bounds.width-4;var l=a.get_defaultTextFormat().align;h=l==3?0:l==4?h:h/2;switch(l){case 0:h+=a.get_defaultTextFormat().leftMargin/2;h-=a.get_defaultTextFormat().rightMargin/2;h+=a.get_defaultTextFormat().indent/2;h+=a.get_defaultTextFormat().blockIndent/2;break;case 2:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;h+=a.get_defaultTextFormat().blockIndent;break;case 3:h+=a.get_defaultTextFormat().leftMargin;h+=a.get_defaultTextFormat().indent;
h+=a.get_defaultTextFormat().blockIndent;break;case 4:h-=a.get_defaultTextFormat().rightMargin}f&&(g.y=d.bounds.y,g.x=h)}b.__bounds.copyFrom(g)}l=c.__pixelRatio;if(b.__bitmapScaleX!=l||b.__bitmapScaleY!=l)b.__softwareDirty=!0;b.__update(c.__worldTransform,l);if(a.__dirty||b.__softwareDirty){var k=Math.round(b.__width*l),q=Math.round(b.__height*l);if(!(d.text!=null&&d.text!=""||d.background||d.border||d.__hasFocus||d.type==1&&d.selectable)||(d.width<=0||d.height<=0)&&d.autoSize!=2)a.__graphics.__canvas=
null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{a.__graphics.__canvas==null&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));ia.context=b.__context;b.__canvas.width=k;b.__canvas.height=q;c.__isDOM&&(b.__canvas.style.width=Math.round(k/l)+"px",b.__canvas.style.height=Math.round(q/l)+"px");k=S.__pool.get();k.scale(l,l);k.concat(b.__renderTransform);
ia.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);S.__pool.release(k);ia.clearRect==null&&(ia.clearRect=typeof navigator!=="undefined"&&typeof navigator.isCocoonJS!=="undefined");ia.clearRect&&ia.context.clearRect(0,0,b.__canvas.width,b.__canvas.height);if(d.text!=null&&d.text!=""||d.__hasFocus){f=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||d.antiAliasType==0&&d.sharpness==400?!1:!0;if(d.border||d.background){ia.context.rect(.5,.5,g.width-1,g.height-1);if(d.background){var w=Z.hex(d.backgroundColor&
16777215,6);ia.context.fillStyle="#"+w;ia.context.fill()}d.border&&(ia.context.lineWidth=1,w=Z.hex(d.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke())}ia.context.textBaseline="alphabetic";ia.context.textAlign="start";c=-a.get_scrollH();var v=h=0;for(w=a.get_scrollV()-1;v<w;){var z=v++;h-=d.lineHeights.get(z)}var n;for(k=d.layoutGroups.iterator();k.hasNext();)if(q=k.next(),!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>d.get_bottomScrollV()-1)break;var E="#"+Z.hex(q.format.color&
16777215,6);ia.context.font=Oc.getFont(q.format);ia.context.fillStyle=E;ia.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+c-g.x,q.offsetY+q.ascent+h-g.y);if(a.__caretIndex>-1&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){v=n=0;for(w=a.__caretIndex-q.startIndex;v<w;){z=v++;if(q.positions.length<=z)break;n+=q.positions[z]}v=0;w=a.get_scrollV();for(z=q.lineIndex+1;w<z;){var H=w++;v+=d.lineHeights.get(H-
1)}ia.context.beginPath();w=Z.hex(q.format.color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(q.offsetX+n-a.get_scrollH()-g.x,v+2-g.y);ia.context.lineWidth=1;ia.context.lineTo(q.offsetX+n-a.get_scrollH()-g.x,v+Oc.getFormatHeight(a.get_defaultTextFormat())-1-g.y);ia.context.stroke();ia.context.closePath()}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=a.__selectionIndex&&q.endIndex>=a.__selectionIndex||q.startIndex>a.__caretIndex&&q.endIndex<a.__selectionIndex||
q.startIndex>a.__selectionIndex&&q.endIndex<a.__caretIndex)n=Math.min(a.__selectionIndex,a.__caretIndex)|0,v=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>n&&(n=q.startIndex),q.endIndex<v&&(v=q.endIndex),z=a.getCharBoundaries(n),v>=q.endIndex?(w=a.getCharBoundaries(q.endIndex-1),w!=null&&(w.x+=w.width+2)):w=a.getCharBoundaries(v),z!=null&&w!=null&&(ia.context.fillStyle="#000000",ia.context.fillRect(z.x+c-g.x,z.y+h,w.x-z.x,q.height),ia.context.fillStyle="#FFFFFF",ia.context.fillText(f.substring(n,
v),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(ia.context.beginPath(),ia.context.strokeStyle=E,ia.context.lineWidth=1,n=q.offsetX+c-g.x,v=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,ia.context.moveTo(n,v),ia.context.lineTo(n+q.width,v),ia.context.stroke(),ia.context.closePath());q.format.strikethrough&&(ia.context.beginPath(),ia.context.strokeStyle=E,ia.context.lineWidth=1,E=q.offsetX+c-g.x,n=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),ia.context.moveTo(E,n),ia.context.lineTo(E+
q.width,n),ia.context.stroke(),ia.context.closePath())}}else{if(d.border||d.background)d.border?ia.context.rect(.5,.5,g.width-1,g.height-1):ia.context.rect(0,0,g.width,g.height),d.background&&(w=Z.hex(d.backgroundColor&16777215,6),ia.context.fillStyle="#"+w,ia.context.fill()),d.border&&(ia.context.lineWidth=1,ia.context.lineCap="square",w=Z.hex(d.borderColor&16777215,6),ia.context.strokeStyle="#"+w,ia.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);
v=h=0;for(w=a.get_scrollV()-1;v<w;)z=v++,h+=d.lineHeights.get(z);ia.context.beginPath();w=Z.hex(a.get_defaultTextFormat().color&16777215,6);ia.context.strokeStyle="#"+w;ia.context.moveTo(c+2.5,h+2.5);ia.context.lineWidth=1;ia.context.lineTo(c+2.5,h+Oc.getFormatHeight(a.get_defaultTextFormat())-1);ia.context.stroke();ia.context.closePath()}}b.__bitmap==null?b.__bitmap=uc.fromCanvas(b.__canvas):b.__bitmap.width!=b.__canvas.width||b.__bitmap.height!=b.__canvas.height?(d=b.__bitmap.__texture,d!=null&&
d.dispose(),b.__bitmap=uc.fromCanvas(b.__canvas)):b.__bitmap.image.version++;b.__bitmapScaleX=l;b.__bitmapScaleY=l;b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};var Fa=function(){};r["openfl.display._internal.Context3DTilemap"]=Fa;Fa.__name__="openfl.display._internal.Context3DTilemap";Fa.buildBuffer=function(a,b){if(!a.__renderable||a.__group.__tiles.length==0||a.__worldAlpha<=0)a.__group.__dirty=!1;else{Fa.numTiles=0;Fa.vertexBufferData=a.__buffer!=
null?a.__buffer.vertexBufferData:null;Fa.vertexDataPosition=0;var c=Ea.__pool.get(),d=S.__pool.get(),f=S.__pool.get();Fa.dataPerVertex=4;a.tileAlphaEnabled&&Fa.dataPerVertex++;a.tileColorTransformEnabled&&(Fa.dataPerVertex+=8);Fa.buildBufferTileContainer(a,a.__group,b,f,a.__tileset,a.tileAlphaEnabled,a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();Ea.__pool.release(c);S.__pool.release(d);S.__pool.release(f)}};Fa.buildBufferTileContainer=
function(a,b,c,d,f,g,h,l,k,q,w,v,z){z==null&&(z=!0);var n=S.__pool.get(),E=c.__roundPixels,H=b.__tiles;z&&Fa.resizeBuffer(a,Fa.numTiles+Fa.getRecursiveLength(b));z=null;for(var J,Q,T,fa,da,pa,xa,Ua,Sa,Ka,hb,Ra=g?5:4,Jb=0;Jb<H.length;){fa=H[Jb];++Jb;n.setTo(1,0,0,1,-fa.get_originX(),-fa.get_originY());n.concat(fa.get_matrix());n.concat(d);E&&(n.tx=Math.round(n.tx),n.ty=Math.round(n.ty));var vb=fa.get_tileset()!=null?fa.get_tileset():f;var Cb=fa.get_alpha()*h;var pc=fa.get_visible();fa.__dirty=!1;if(pc&&
!(Cb<=0))if(l&&(fa.get_colorTransform()!=null?k==null?z=fa.get_colorTransform():(Fa.cacheColorTransform==null&&(Fa.cacheColorTransform=new ca),z=Fa.cacheColorTransform,z.redMultiplier=k.redMultiplier*fa.get_colorTransform().redMultiplier,z.greenMultiplier=k.greenMultiplier*fa.get_colorTransform().greenMultiplier,z.blueMultiplier=k.blueMultiplier*fa.get_colorTransform().blueMultiplier,z.alphaMultiplier=k.alphaMultiplier*fa.get_colorTransform().alphaMultiplier,z.redOffset=k.redOffset+fa.get_colorTransform().redOffset,
z.greenOffset=k.greenOffset+fa.get_colorTransform().greenOffset,z.blueOffset=k.blueOffset+fa.get_colorTransform().blueOffset,z.alphaOffset=k.alphaOffset+fa.get_colorTransform().alphaOffset):z=k),g||(Cb=1),fa.__length>0)Fa.buildBufferTileContainer(a,fa,c,n,vb,g,Cb,l,z,q,w,v,!1);else if(vb!=null&&(pc=fa.get_id(),J=vb.__bitmapData,J!=null)){if(pc==-1){Q=fa.__rect;if(Q==null||Q.width<=0||Q.height<=0)continue;vb=Q.x/J.width;fa=Q.y/J.height;pc=Q.get_right()/J.width;da=Q.get_bottom()/J.height}else{J=vb.__data[pc];
if(J==null)continue;w.setTo(J.x,J.y,J.width,J.height);Q=w;vb=J.__uvX;fa=J.__uvY;pc=J.__uvWidth;da=J.__uvHeight}J=Q.width;T=Q.height;Q=0*n.a+0*n.c+n.tx;pa=0*n.b+0*n.d+n.ty;xa=J*n.a+0*n.c+n.tx;Ua=J*n.b+0*n.d+n.ty;Sa=0*n.a+T*n.c+n.tx;Ka=0*n.b+T*n.d+n.ty;hb=J*n.a+T*n.c+n.tx;T=J*n.b+T*n.d+n.ty;J=Fa.vertexDataPosition;Fa.vertexBufferData[J]=Q;Fa.vertexBufferData[J+1]=pa;Fa.vertexBufferData[J+2]=vb;Fa.vertexBufferData[J+3]=fa;Fa.vertexBufferData[J+Fa.dataPerVertex]=xa;Fa.vertexBufferData[J+Fa.dataPerVertex+
1]=Ua;Fa.vertexBufferData[J+Fa.dataPerVertex+2]=pc;Fa.vertexBufferData[J+Fa.dataPerVertex+3]=fa;Fa.vertexBufferData[J+Fa.dataPerVertex*2]=Sa;Fa.vertexBufferData[J+Fa.dataPerVertex*2+1]=Ka;Fa.vertexBufferData[J+Fa.dataPerVertex*2+2]=vb;Fa.vertexBufferData[J+Fa.dataPerVertex*2+3]=da;Fa.vertexBufferData[J+Fa.dataPerVertex*3]=hb;Fa.vertexBufferData[J+Fa.dataPerVertex*3+1]=T;Fa.vertexBufferData[J+Fa.dataPerVertex*3+2]=pc;Fa.vertexBufferData[J+Fa.dataPerVertex*3+3]=da;g&&(Fa.vertexBufferData[J+Fa.dataPerVertex*
0+4]=Cb,Fa.vertexBufferData[J+Fa.dataPerVertex+4]=Cb,Fa.vertexBufferData[J+Fa.dataPerVertex*2+4]=Cb,Fa.vertexBufferData[J+Fa.dataPerVertex*3+4]=Cb);if(l)if(z!=null)for(Cb=0;Cb<4;)vb=Cb++,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra]=z.redMultiplier,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+1]=z.greenMultiplier,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+2]=z.blueMultiplier,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+3]=z.alphaMultiplier,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+4]=z.redOffset,
Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+5]=z.greenOffset,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+6]=z.blueOffset,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+7]=z.alphaOffset;else for(Cb=0;Cb<4;)vb=Cb++,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra]=1,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+1]=1,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+2]=1,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+3]=1,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+4]=0,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+
Ra+5]=0,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+6]=0,Fa.vertexBufferData[J+Fa.dataPerVertex*vb+Ra+7]=0;Fa.vertexDataPosition+=Fa.dataPerVertex*4}}b.__dirty=!1;S.__pool.release(n)};Fa.flush=function(a,b,c){Fa.currentShader==null&&(Fa.currentShader=b.__defaultDisplayShader);if(Fa.bufferPosition>Fa.lastFlushedPosition&&Fa.currentBitmapData!=null&&Fa.currentShader!=null){var d=b.__initDisplayShader(Fa.currentShader);b.setShader(d);b.applyBitmapData(Fa.currentBitmapData,a.smoothing);b.applyMatrix(b.__getMatrix(a.__renderTransform,
1));a.tileAlphaEnabled?b.useAlphaArray():b.applyAlpha(a.__worldAlpha);a.tileBlendModeEnabled&&b.__setBlendMode(c);a.tileColorTransformEnabled?(b.applyHasColorTransform(!0),b.useColorTransformArray()):b.applyColorTransform(a.__worldColorTransform);b.updateShader();c=a.__buffer.vertexBuffer;for(var f=Fa.lastFlushedPosition*Fa.dataPerVertex*4,g;Fa.lastFlushedPosition<Fa.bufferPosition;){g=Math.min(Fa.bufferPosition-Fa.lastFlushedPosition,Fa.context.__quadIndexBufferElements)|0;if(g<=0)break;d.__position!=
null&&Fa.context.setVertexBufferAt(d.__position.index,c,f,2);d.__textureCoord!=null&&Fa.context.setVertexBufferAt(d.__textureCoord.index,c,f+2,2);a.tileAlphaEnabled&&d.__alpha!=null&&Fa.context.setVertexBufferAt(d.__alpha.index,c,f+4,1);if(a.tileColorTransformEnabled){var h=a.tileAlphaEnabled?5:4;d.__colorMultiplier!=null&&Fa.context.setVertexBufferAt(d.__colorMultiplier.index,c,f+h,4);d.__colorOffset!=null&&Fa.context.setVertexBufferAt(d.__colorOffset.index,c,f+h+4,4)}Fa.context.drawTriangles(Fa.context.__quadIndexBuffer,
0,g*2);Fa.lastFlushedPosition+=g}b.__clearShader()}Fa.lastUsedBitmapData=Fa.currentBitmapData;Fa.lastUsedShader=Fa.currentShader};Fa.getRecursiveLength=function(a){a=a.__tiles;for(var b=0,c=0;c<a.length;){var d=a[c];++c;d.__length>0?b+=Fa.getRecursiveLength(d):++b}return b};Fa.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&(Fa.context=b.__context3D,Fa.buildBuffer(a,b),Fa.numTiles!=0)){Fa.bufferPosition=0;Fa.lastFlushedPosition=0;Fa.lastUsedBitmapData=null;Fa.lastUsedShader=null;Fa.currentBitmapData=
null;Fa.currentShader=null;Fa.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(Fa.currentBlendMode);b.__pushMaskObject(a);var c=Ea.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);Fa.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,Fa.currentBlendMode,null);Fa.flush(a,b,Fa.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(c)}};Fa.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(!(a.opaqueBackground==null&&a.__graphics==null||!a.__renderable||a.__worldAlpha<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=Ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.__clear(!0,(f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,
1);b.__popMaskRect();b.__popMaskObject(a);Ea.__pool.release(d)}a.__graphics!=null&&mj.render(a,b)}Fa.render(a,b)}else Hi.render(a.__cacheBitmap,b);b.__renderEvent(a)};Fa.renderDrawableMask=function(a,b){if(a.opaqueBackground!=null||a.__graphics!=null)a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height(),a.__graphics!=null&&mj.renderMask(a,b);Fa.renderMask(a,b)};Fa.renderTileContainer=function(a,b,c,d,f,g,h,l,k){c=c.__tiles;for(var q,w,v,z=null,n,E=0;E<c.length;){var H=
c[E];++E;q=H.get_tileset()!=null?H.get_tileset():f;w=H.get_alpha()*g;if((v=H.get_visible())&&!(w<=0))if(v=H.get_shader()!=null?H.get_shader():d,h&&(z=H.__blendMode!=null?H.__blendMode:l),H.__length>0)Fa.renderTileContainer(a,b,H,v,q,w,h,z,k);else if(q!=null&&(n=H.get_id(),w=q.__bitmapData,w!=null)){if(n==-1){if(q=H.__rect,q==null||q.width<=0||q.height<=0)continue}else if(q=q.__data[n],q==null)continue;(Fa.bufferPosition-Fa.lastFlushedPosition>=16383||v!=Fa.currentShader||w!=Fa.currentBitmapData&&
Fa.currentBitmapData!=null||Fa.currentBlendMode!=z)&&Fa.flush(a,b,Fa.currentBlendMode);Fa.currentBitmapData=w;Fa.currentShader=v;Fa.currentBlendMode=z;Fa.bufferPosition++}}};Fa.renderMask=function(a,b){};Fa.resizeBuffer=function(a,b){Fa.numTiles=b;a.__buffer==null?a.__buffer=new Kl(Fa.context,Ws.QUADS,Fa.numTiles,Fa.dataPerVertex):a.__buffer.resize(Fa.numTiles,Fa.dataPerVertex);Fa.vertexBufferData=a.__buffer.vertexBufferData};var Ii=function(){};r["openfl.display._internal.Context3DVideo"]=Ii;Ii.__name__=
"openfl.display._internal.Context3DVideo";Ii.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&a.__stream!=null&&a.__stream.__video!=null){var c=b.__context3D,d=c.gl;if(a.__getTexture(c)!=null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var f=b.__initDisplayShader(a.__worldShader);b.setShader(f);b.applyBitmapData(null,!0,!1);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);f.__textureSize!=null&&
(Ii.__textureSizeValue[0]=a.__stream!=null?a.__stream.__video.videoWidth:0,Ii.__textureSizeValue[1]=a.__stream!=null?a.__stream.__video.videoHeight:0,f.__textureSize.value=Ii.__textureSizeValue);b.updateShader();c.setTextureAt(0,a.__getTexture(c));c.__flushGLTextures();d.uniform1i(f.__texture.index,0);a.smoothing?(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR)):(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MIN_FILTER,d.NEAREST));d=a.__getVertexBuffer(c);f.__position!=null&&c.setVertexBufferAt(f.__position.index,d,0,3);f.__textureCoord!=null&&c.setVertexBufferAt(f.__textureCoord.index,d,3,2);f=a.__getIndexBuffer(c);c.drawTriangles(f);b.__clearShader();b.__popMaskObject(a)}}};Ii.renderDrawable=function(a,b){Ii.render(a,b);b.__renderEvent(a)};Ii.renderDrawableMask=function(a,b){Ii.renderMask(a,b)};Ii.renderMask=function(a,b){if(a.__stream!=null&&a.__stream.__video!=null){var c=b.__context3D,
d=b.__maskShader;b.setShader(d);b.applyBitmapData(um.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.updateShader();var f=a.__getVertexBuffer(c);d.__position!=null&&c.setVertexBufferAt(d.__position.index,f,0,3);d.__textureCoord!=null&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var Md=function(){};r["openfl.display._internal.DOMBitmap"]=Md;Md.__name__="openfl.display._internal.DOMBitmap";Md.clear=function(a,
b){ah.clear(a,b);a.__image!=null&&(b.element.removeChild(a.__image),a.__image=null,a.__style=null);a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Md.render=function(a,b){if(a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable){b.__pushMaskObject(a);if(a.__bitmapData.image.buffer.__srcImage!=null){var c=a.__bitmapData.image.buffer.__srcImage.src;Z.startsWith(c,"data:")||Z.startsWith(c,"blob:")?
Md.renderCanvas(a,b):Md.renderImage(a,b)}else Md.renderCanvas(a,b);b.__popMaskObject(a)}else Md.clear(a,b)};Md.renderCanvas=function(a,b){a.__image!=null&&(b.element.removeChild(a.__image),a.__image=null);a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),a.__imageVersion=-1,b.__allowSmoothing&&a.smoothing||(a.__context.imageSmoothingEnabled=!1),b.__initializeElement(a,a.__canvas));a.__imageVersion!=a.__bitmapData.image.version&&(kb.convertToCanvas(a.__bitmapData.image),
a.__canvas.width=a.__bitmapData.width+1,a.__canvas.width=a.__bitmapData.width,a.__canvas.height=a.__bitmapData.height,a.__context.drawImage(a.__bitmapData.image.buffer.__srcCanvas,0,0),a.__imageVersion=a.__bitmapData.image.version);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};Md.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=a.__graphics;if(a.stage!=
null&&a.__worldVisible&&a.__renderable&&c!=null){B.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Li.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=
!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Li.clear(a,b);a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__bitmapData!=null&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(b.__pushMaskObject(a),a.__bitmapData.image.buffer.__srcImage!=null?(d=a.__bitmapData.image.buffer.__srcImage.src,Z.startsWith(d,"data:")||Z.startsWith(d,"blob:")?Md.renderCanvas(a,b):Md.renderImage(a,b)):Md.renderCanvas(a,b),b.__popMaskObject(a)):Md.clear(a,b)}else b.__renderDrawableClear(a),
a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,Z.startsWith(d,"data:")||Z.startsWith(d,"blob:")?Md.renderCanvas(c,b):Md.renderImage(c,b)):Md.renderCanvas(c,b),b.__popMaskObject(c)):Md.clear(c,b);b.__renderEvent(a)};Md.renderDrawableClear=function(a,b){Md.clear(a,b)};
Md.renderImage=function(a,b){a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null);a.__image==null&&(a.__image=window.document.createElement("img"),a.__image.crossOrigin="Anonymous",a.__image.src=a.__bitmapData.image.buffer.__srcImage.src,b.__initializeElement(a,a.__image));b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};var ah=function(){};r["openfl.display._internal.DOMDisplayObject"]=ah;ah.__name__="openfl.display._internal.DOMDisplayObject";ah.clear=function(a,b){a.__cacheBitmap!=
null&&Md.clear(a.__cacheBitmap,b);Li.clear(a,b)};ah.render=function(a,b){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){B.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):
Li.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Li.clear(a,b)};ah.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height();var c=
a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){B.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Li.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=
!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Li.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,Z.startsWith(d,"data:")||Z.startsWith(d,"blob:")?
Md.renderCanvas(c,b):Md.renderImage(c,b)):Md.renderCanvas(c,b),b.__popMaskObject(c)):Md.clear(c,b);b.__renderEvent(a)};ah.renderDrawableClear=function(a,b){ah.clear(a,b)};var ts=function(){};r["openfl.display._internal.DOMDisplayObjectContainer"]=ts;ts.__name__="openfl.display._internal.DOMDisplayObjectContainer";ts.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&b.__renderDrawable(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=
c.next(),d.stage==null&&d.__cleanup();a.__removedChildren.set_length(0);ah.renderDrawable(a,b);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){b.__pushMaskObject(a);if(b.__stage!=null){c=0;for(d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f),f.__renderDirty=!1;a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}else{c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}Li.clear(a,b);a.__cacheBitmap.stage=
a.stage}};ts.renderDrawableClear=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();d.stage==null&&b.__renderDrawableClear(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=c.next(),d.stage==null&&d.__cleanup();a.__removedChildren.set_length(0);c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}ah.clear(a,b)};var Li=function(){};r["openfl.display._internal.DOMShape"]=Li;Li.__name__="openfl.display._internal.DOMShape";Li.clear=function(a,
b){a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Li.render=function(a,b){var c=a.__graphics;if(a.stage!=null&&a.__worldVisible&&a.__renderable&&c!=null){B.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)c.__canvas!=null?a.__canvas!=c.__canvas&&(a.__canvas!=null&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Li.clear(a,b);if(a.__canvas!=null){b.__pushMaskObject(a);
var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Li.clear(a,b)};var us=function(){};r["openfl.display._internal.DOMSimpleButton"]=us;us.__name__="openfl.display._internal.DOMSimpleButton";us.renderDrawable=function(a,b){b.__pushMaskObject(a);for(var c=a.__previousStates.iterator();c.hasNext();){var d=c.next();b.__renderDrawable(d)}a.__previousStates.set_length(0);
a.__currentState!=null&&(a.__currentState.stage!=a.stage&&a.__currentState.__setStageReference(a.stage),b.__renderDrawable(a.__currentState));b.__popMaskObject(a);b.__renderEvent(a)};us.renderDrawableClear=function(a,b){ah.renderDrawableClear(a,b)};var bh=function(){};r["openfl.display._internal.DOMTextField"]=bh;bh.__name__="openfl.display._internal.DOMTextField";bh.clear=function(a,b){ah.clear(a,b);a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};bh.measureText=function(a){var b=
a.__textEngine,c=a.__div;c==null&&(c=window.document.createElement("div"),c.innerHTML=b.text.replace(RegExp("\n","g"),"<br>"),c.style.setProperty("font",Oc.getFont(a.__textFormat),null),c.style.setProperty("pointer-events","none",null),c.style.position="absolute",c.style.top="110%",window.document.body.appendChild(c));b.__measuredWidth=c.clientWidth;a.__div==null&&(c.style.width=L.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;a.__div==null&&window.document.body.removeChild(c)};bh.render=
function(a,b){var c=a.__textEngine;if(a.stage!=null&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||a.__div==null)if(c.text!=""||c.background||c.border||c.type==1){a.__updateLayout();a.__div==null&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",function(v){v.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new sg("textInput",
!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select","text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor",
"inherit",null);a.__div.contentEditable=c.type==1;var d=a.__style;c.background?d.setProperty("background-color","#"+Z.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,h="";a.__isHTML&&a.__updateText(Zb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));for(var l=-a.get_scrollH(),k=c.layoutGroups.iterator();k.hasNext();){var q=k.next();if(!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>c.get_bottomScrollV()-
1)break;h+='<div style="';q.format.font!=null&&(h+="font: "+Oc.getFont(q.format)+"; ");q.format.color!=null&&(h+="color: #"+Z.hex(q.format.color&16777215,6)+"; ");q.format.underline==1&&(h+="text-decoration: underline; ");if(q.format.align!=null)switch(q.format.align){case 0:h+="text-align: center; ";break;case 2:h+="text-align: justify; ";break;case 4:h+="text-align: right; ";break;default:h+="text-align: left; "}q.format.leftMargin!=null&&(h+="padding-left: "+q.format.leftMargin*1+"px; ");q.format.rightMargin!=
null&&(h+="padding-right: "+q.format.rightMargin*1+"px; ");q.format.indent!=null&&(h+="text-indent: "+q.format.indent*1+"px; ");h+="left: "+(q.offsetX+l)+"px; top: "+(q.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(q.format.url!=null&&q.format.url!=""){var w="text-decoration: underline; ";q.format.color!=null&&(w+="color: #"+Z.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+w+"' href='"+q.format.url+"' target='"+q.format.target+"'>"}h=a.__isHTML?h+Z.replace(c.text.substring(q.startIndex,
q.endIndex)," ","&nbsp;"):h+Z.replace(Z.htmlEscape(c.text.substring(q.startIndex,q.endIndex))," ","&nbsp;");q.format.url!=null&&q.format.url!=""&&(h+="</a>");h+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+Z.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=!0,a.__transformDirty=!0):d.border!=""&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=
h;a.__dirty=!1}else a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null);a.__div!=null&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else bh.clear(a,b)};bh.renderDrawable=function(a,b){a.__domRender=!0;b.__updateCacheBitmap(a,a.__forceCachedBitmapUpdate);a.__forceCachedBitmapUpdate=!1;a.__domRender=!1;if(a.__cacheBitmap==null||a.__isCacheBitmapRender){a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!1,a.__isHTML&&a.__htmlText!=
null&&(a.__updateText(a.__htmlText),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())));var c=a.__textEngine;if(a.stage!=null&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||a.__div==null)if(c.text!=""||c.background||c.border||c.type==1){a.__updateLayout();a.__div==null&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",
function(v){v.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new sg("textInput",!1,!1,a.get_htmlText())))},!0));c.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select",
"text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=c.type==1;var d=a.__style;c.background?d.setProperty("background-color","#"+Z.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,h="";a.__isHTML&&a.__updateText(Zb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));
for(var l=-a.get_scrollH(),k=c.layoutGroups.iterator();k.hasNext();){var q=k.next();if(!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>c.get_bottomScrollV()-1)break;h+='<div style="';q.format.font!=null&&(h+="font: "+Oc.getFont(q.format)+"; ");q.format.color!=null&&(h+="color: #"+Z.hex(q.format.color&16777215,6)+"; ");q.format.underline==1&&(h+="text-decoration: underline; ");if(q.format.align!=null)switch(q.format.align){case 0:h+="text-align: center; ";break;case 2:h+="text-align: justify; ";break;
case 4:h+="text-align: right; ";break;default:h+="text-align: left; "}q.format.leftMargin!=null&&(h+="padding-left: "+q.format.leftMargin*1+"px; ");q.format.rightMargin!=null&&(h+="padding-right: "+q.format.rightMargin*1+"px; ");q.format.indent!=null&&(h+="text-indent: "+q.format.indent*1+"px; ");h+="left: "+(q.offsetX+l)+"px; top: "+(q.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(q.format.url!=null&&q.format.url!=""){var w="text-decoration: underline; ";q.format.color!=null&&
(w+="color: #"+Z.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+w+"' href='"+q.format.url+"' target='"+q.format.target+"'>"}h=a.__isHTML?h+Z.replace(c.text.substring(q.startIndex,q.endIndex)," ","&nbsp;"):h+Z.replace(Z.htmlEscape(c.text.substring(q.startIndex,q.endIndex))," ","&nbsp;");q.format.url!=null&&q.format.url!=""&&(h+="</a>");h+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+Z.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=
!0,a.__transformDirty=!0):d.border!=""&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("width",f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=h;a.__dirty=!1}else a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null);a.__div!=null&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else bh.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&
c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,Z.startsWith(d,"data:")||Z.startsWith(d,"blob:")?Md.renderCanvas(c,b):Md.renderImage(c,b)):Md.renderCanvas(c,b),b.__popMaskObject(c)):Md.clear(c,b);b.__renderEvent(a)};bh.renderDrawableClear=function(a,b){bh.clear(a,b)};bh.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};
var gk=function(){};r["openfl.display._internal.DOMTilemap"]=gk;gk.__name__="openfl.display._internal.DOMTilemap";gk.clear=function(a,b){ah.clear(a,b);a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};gk.render=function(a,b){if(a.stage!=null&&a.__worldVisible&&a.__renderable&&a.__group.__tiles.length>0){a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=
a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=S.__identity;var d=b.__canvasRenderer;if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(f<=0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);f=a.opaqueBackground;g.fillStyle=
"rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(f<=0))){var h=a.__graphics;if(h!=null){B.render(h,d);var l=h.__width,k=h.__height,q=h.__canvas;if(q!=null&&h.__visible&&l>=1&&k>=1){var w=h.__worldTransform;g=d.context;var v=a.__scrollRect;if(v==null||v.width>0&&v.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,f=S.__pool.get(),
f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(w),d.setTransform(f,g),g.drawImage(q,0,0,l,k),S.__pool.release(f),d.__popMaskObject(a)}}}}}d=b.__canvasRenderer;a.__renderable&&a.__group.__tiles.length!=0&&(f=d.__getAlpha(a.__worldAlpha),f<=0||(g=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),h=Ea.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),ej.renderTileContainer(a.__group,
d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,h),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),Ea.__pool.release(h)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else gk.clear(a,b)};gk.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender)if(a.stage!=
null&&a.__worldVisible&&a.__renderable&&a.__group.__tiles.length>0){a.__canvas==null&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),b.__initializeElement(a,a.__canvas));a.__canvas.width=a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=a.__renderTransform;a.__renderTransform=S.__identity;var d=b.__canvasRenderer;if((a.opaqueBackground!=null||a.__graphics!=null)&&a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(f<=
0)){if(a.opaqueBackground!=null&&!a.__isCacheBitmapRender&&a.get_width()>0&&a.get_height()>0){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);f=a.opaqueBackground;g.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(a.__graphics!=null&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(f<=0))){var h=a.__graphics;if(h!=null){B.render(h,d);var l=h.__width,k=
h.__height,q=h.__canvas;if(q!=null&&h.__visible&&l>=1&&k>=1){var w=h.__worldTransform;g=d.context;var v=a.__scrollRect;if(v==null||v.width>0&&v.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,f=S.__pool.get(),f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(w),d.setTransform(f,g),g.drawImage(q,0,0,l,k),S.__pool.release(f),d.__popMaskObject(a)}}}}}d=b.__canvasRenderer;a.__renderable&&a.__group.__tiles.length!=0&&(f=d.__getAlpha(a.__worldAlpha),f<=0||(g=d.context,
d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),h=Ea.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),ej.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,h),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),Ea.__pool.release(h)));
a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else gk.clear(a,b);else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,c.stage!=null&&c.__worldVisible&&c.__renderable&&c.__bitmapData!=null&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),c.__bitmapData.image.buffer.__srcImage!=null?(d=c.__bitmapData.image.buffer.__srcImage.src,Z.startsWith(d,"data:")||Z.startsWith(d,"blob:")?Md.renderCanvas(c,b):
Md.renderImage(c,b)):Md.renderCanvas(c,b),b.__popMaskObject(c)):Md.clear(c,b);b.__renderEvent(a)};gk.renderDrawableClear=function(a,b){gk.clear(a,b)};var Rk=function(){};r["openfl.display._internal.DOMVideo"]=Rk;Rk.__name__="openfl.display._internal.DOMVideo";Rk.clear=function(a,b){ah.clear(a,b);a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};Rk.render=function(a,b){a.stage!=null&&a.__stream!=null&&a.__worldVisible&&a.__renderable?(a.__active||(b.__initializeElement(a,a.__stream.__video),
a.__active=!0,a.__dirty=!0),a.__dirty&&(a.__stream.__video.width=a.__width|0,a.__stream.__video.height=a.__height|0,a.__dirty=!1),b.__updateClip(a),b.__applyStyle(a,!0,!0,!0)):Rk.clear(a,b)};Rk.renderDrawable=function(a,b){Rk.render(a,b);b.__renderEvent(a)};Rk.renderDrawableClear=function(a,b){ah.renderDrawableClear(a,b)};var fj=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=va.UNKNOWN};r["openfl.display._internal.DrawCommandReader"]=
fj;fj.__name__="openfl.display._internal.DrawCommandReader";fj.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,advance:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=
3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}},bool:function(a){return this.buffer.b[this.bPos+a]},destroy:function(){this.buffer=null;this.reset()},fArr:function(a){return this.buffer.ff[this.ffPos+
a]},float:function(a){return this.buffer.f[this.fPos+a]},iArr:function(a){return this.buffer.ii[this.iiPos+a]},int:function(a){return this.buffer.i[this.iPos+a]},obj:function(a){return this.buffer.o[this.oPos+a]},readBeginBitmapFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=
3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.BEGIN_BITMAP_FILL;return this},readBeginFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.BEGIN_FILL;return this},readBeginGradientFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.BEGIN_GRADIENT_FILL;return this},readBeginShaderFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.BEGIN_SHADER_FILL;return this},readCubicCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.CUBIC_CURVE_TO;return this},readCurveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.CURVE_TO;return this},readDrawCircle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_CIRCLE;return this},readDrawEllipse:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_ELLIPSE;return this},readDrawQuads:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_QUADS;return this},readDrawRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_RECT;return this},readDrawRoundRect:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_ROUND_RECT;return this},readDrawTriangles:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.DRAW_TRIANGLES;return this},readEndFill:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.END_FILL;return this},readLineBitmapStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.LINE_BITMAP_STYLE;return this},readLineGradientStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;
case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.LINE_GRADIENT_STYLE;return this},readLineStyle:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.LINE_STYLE;return this},readLineTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.LINE_TO;return this},readMoveTo:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.MOVE_TO;return this},readOverrideBlendMode:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.OVERRIDE_BLEND_MODE;return this},readOverrideMatrix:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.OVERRIDE_MATRIX;return this},readWindingEvenOdd:function(){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.WINDING_EVEN_ODD;return this},readWindingNonZero:function(){switch(this.prev._hx_index){case 0:this.oPos+=
2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=va.WINDING_NON_ZERO;return this},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},skip:function(a){switch(this.prev._hx_index){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 3:this.oPos+=1;break;
case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=
a},__class__:fj};var va=O["openfl.display._internal.DrawCommandType"]={__ename__:"openfl.display._internal.DrawCommandType",__constructs__:null,BEGIN_BITMAP_FILL:{_hx_name:"BEGIN_BITMAP_FILL",_hx_index:0,__enum__:"openfl.display._internal.DrawCommandType",toString:D},BEGIN_FILL:{_hx_name:"BEGIN_FILL",_hx_index:1,__enum__:"openfl.display._internal.DrawCommandType",toString:D},BEGIN_GRADIENT_FILL:{_hx_name:"BEGIN_GRADIENT_FILL",_hx_index:2,__enum__:"openfl.display._internal.DrawCommandType",toString:D},
BEGIN_SHADER_FILL:{_hx_name:"BEGIN_SHADER_FILL",_hx_index:3,__enum__:"openfl.display._internal.DrawCommandType",toString:D},CUBIC_CURVE_TO:{_hx_name:"CUBIC_CURVE_TO",_hx_index:4,__enum__:"openfl.display._internal.DrawCommandType",toString:D},CURVE_TO:{_hx_name:"CURVE_TO",_hx_index:5,__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_CIRCLE:{_hx_name:"DRAW_CIRCLE",_hx_index:6,__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_ELLIPSE:{_hx_name:"DRAW_ELLIPSE",_hx_index:7,
__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_QUADS:{_hx_name:"DRAW_QUADS",_hx_index:8,__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_RECT:{_hx_name:"DRAW_RECT",_hx_index:9,__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_ROUND_RECT:{_hx_name:"DRAW_ROUND_RECT",_hx_index:10,__enum__:"openfl.display._internal.DrawCommandType",toString:D},DRAW_TILES:{_hx_name:"DRAW_TILES",_hx_index:11,__enum__:"openfl.display._internal.DrawCommandType",
toString:D},DRAW_TRIANGLES:{_hx_name:"DRAW_TRIANGLES",_hx_index:12,__enum__:"openfl.display._internal.DrawCommandType",toString:D},END_FILL:{_hx_name:"END_FILL",_hx_index:13,__enum__:"openfl.display._internal.DrawCommandType",toString:D},LINE_BITMAP_STYLE:{_hx_name:"LINE_BITMAP_STYLE",_hx_index:14,__enum__:"openfl.display._internal.DrawCommandType",toString:D},LINE_GRADIENT_STYLE:{_hx_name:"LINE_GRADIENT_STYLE",_hx_index:15,__enum__:"openfl.display._internal.DrawCommandType",toString:D},LINE_STYLE:{_hx_name:"LINE_STYLE",
_hx_index:16,__enum__:"openfl.display._internal.DrawCommandType",toString:D},LINE_TO:{_hx_name:"LINE_TO",_hx_index:17,__enum__:"openfl.display._internal.DrawCommandType",toString:D},MOVE_TO:{_hx_name:"MOVE_TO",_hx_index:18,__enum__:"openfl.display._internal.DrawCommandType",toString:D},OVERRIDE_BLEND_MODE:{_hx_name:"OVERRIDE_BLEND_MODE",_hx_index:19,__enum__:"openfl.display._internal.DrawCommandType",toString:D},OVERRIDE_MATRIX:{_hx_name:"OVERRIDE_MATRIX",_hx_index:20,__enum__:"openfl.display._internal.DrawCommandType",
toString:D},WINDING_EVEN_ODD:{_hx_name:"WINDING_EVEN_ODD",_hx_index:21,__enum__:"openfl.display._internal.DrawCommandType",toString:D},WINDING_NON_ZERO:{_hx_name:"WINDING_NON_ZERO",_hx_index:22,__enum__:"openfl.display._internal.DrawCommandType",toString:D},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:23,__enum__:"openfl.display._internal.DrawCommandType",toString:D}};va.__constructs__=[va.BEGIN_BITMAP_FILL,va.BEGIN_FILL,va.BEGIN_GRADIENT_FILL,va.BEGIN_SHADER_FILL,va.CUBIC_CURVE_TO,va.CURVE_TO,va.DRAW_CIRCLE,
va.DRAW_ELLIPSE,va.DRAW_QUADS,va.DRAW_RECT,va.DRAW_ROUND_RECT,va.DRAW_TILES,va.DRAW_TRIANGLES,va.END_FILL,va.LINE_BITMAP_STYLE,va.LINE_GRADIENT_STYLE,va.LINE_STYLE,va.LINE_TO,va.MOVE_TO,va.OVERRIDE_BLEND_MODE,va.OVERRIDE_MATRIX,va.WINDING_EVEN_ODD,va.WINDING_NON_ZERO,va.UNKNOWN];var Ll=function(){};r["openfl.display._internal.FlashRenderer"]=Ll;Ll.__name__="openfl.display._internal.FlashRenderer";Ll.register=function(a){Ll.instances==null&&(Ll.instances=ix.toObjectMap(null,!0),Oa.get_current().stage.addEventListener("enterFrame",
Ll.render,!1,-2147483648));Ll.instances.set(a,!0)};Ll.render=function(a){for(a=Ll.instances.keys();a.hasNext();)a.next().__renderFlash()};var Jv=function(){};r["openfl.display._internal.IDisplayObject"]=Jv;Jv.__name__="openfl.display._internal.IDisplayObject";Jv.__isInterface__=!0;Jv.prototype={__renderFlash:null,__class__:Jv};var Jm=function(){};r["openfl.display._internal.FlashTilemap"]=Jm;Jm.__name__="openfl.display._internal.FlashTilemap";Jm.render=function(a){};Jm.renderTileContainer=function(a,
b,c,d,f,g,h,l,k,q,w,v){};var sm=function(a,b,c,d,f,g,h){h==null&&(h=.05);g==null&&(g=!1);Nn.call(this,a,b,c,d,f,g,h);this.p_perm=[];for(b=0;b<512;)c=b++,this.p_perm[c]=sm.P[c&255];this.base_factor=.03125;this.setSeed(a)};r["openfl.display._internal.PerlinNoise"]=sm;sm.__name__="openfl.display._internal.PerlinNoise";sm.__super__=Nn;sm.prototype=I(Nn.prototype,{p_perm:null,x_offset:null,y_offset:null,z_offset:null,base_factor:null,fill:function(a,b,c,d){var f=a.width,g=a.height,h=this.octaves,l=this.octaves_frequencies,
k=this.octaves_persistences,q=(1&this.channels)==1,w=(2&this.channels)==2,v=(4&this.channels)==4,z=0;q&&++z;w&&++z;v&&++z;var n=this.grayscale,E=this.stitch_threshold*f|0,H=this.stitch_threshold*g|0,J=b*this.base_factor+this.x_offset;c=c*this.base_factor+this.y_offset;d=d*this.base_factor+this.z_offset;for(var Q=0;Q<g;){var T=Q++;b=J;for(var fa=0,da=f;fa<da;){for(var pa=fa++,xa=0,Ua=0,Sa=0,Ka=0,hb=h;Ka<hb;){var Ra=Ka++,Jb=l[Ra];Ra=k[Ra];xa+=this.noise(b*Jb,c*Jb,d*Jb)*Ra;n||(1<z&&(Ua+=this.noise((b+
1)*Jb,(c+1)*Jb,d*Jb)*Ra),2<z&&(Sa+=this.noise((b+2)*Jb,(c+2)*Jb,d*Jb)*Ra))}Ka=0;n?Ka=this.color(xa,xa,xa):q&&w&&v?Ka=this.color(xa,Ua,Sa):q&&w?Ka=this.color(xa,Ua,null):q&&v?Ka=this.color(xa,null,Ua):w&&v?Ka=this.color(null,xa,Ua):q?Ka=this.color(xa,null,null):w?Ka=this.color(null,xa,null):v&&(Ka=this.color(null,null,xa));this.stitch&&(Ka=this.stitching(a,Ka,pa,T,E,H,f,g));a.setPixel32(pa,T,Ka);b+=this.base_factor}c+=this.base_factor}},noise:function(a,b,c){var d=a-a%1,f=b-b%1,g=c-c%1;a-=d;b-=f;c-=
g;var h=(d|0)&255,l=(f|0)&255,k=(g|0)&255;g=this.fade(a);f=this.fade(b);d=this.fade(c);var q=this.p_perm[h]+l,w=this.p_perm[q]+k;q=this.p_perm[q+1]+k;l=this.p_perm[h+1]+l;h=this.p_perm[l]+k;var v=this.p_perm[l+1]+k,z=a-1,n=b-1,E=c-1,H=this.p_perm[v+1]&15;k=((H&1)==0?H<8?z:n:H<8?-z:-n)+((H&2)==0?H<4?n:H==12?z:E:H<4?-n:H==14?-z:-E);H=this.p_perm[q+1]&15;l=((H&1)==0?H<8?a:n:H<8?-a:-n)+((H&2)==0?H<4?n:H==12?a:E:H<4?-n:H==14?-a:-E);H=this.p_perm[h+1]&15;var J=((H&1)==0?H<8?z:b:H<8?-z:-b)+((H&2)==0?H<4?
b:H==12?z:E:H<4?-b:H==14?-z:-E);H=this.p_perm[w+1]&15;E=((H&1)==0?H<8?a:b:H<8?-a:-b)+((H&2)==0?H<4?b:H==12?a:E:H<4?-b:H==14?-a:-E);H=this.p_perm[v]&15;v=((H&1)==0?H<8?z:n:H<8?-z:-n)+((H&2)==0?H<4?n:H==12?z:c:H<4?-n:H==14?-z:-c);H=this.p_perm[q]&15;q=((H&1)==0?H<8?a:n:H<8?-a:-n)+((H&2)==0?H<4?n:H==12?a:c:H<4?-n:H==14?-a:-c);H=this.p_perm[h]&15;h=((H&1)==0?H<8?z:b:H<8?-z:-b)+((H&2)==0?H<4?b:H==12?z:c:H<4?-b:H==14?-z:-c);H=this.p_perm[w]&15;a=((H&1)==0?H<8?a:b:H<8?-a:-b)+((H&2)==0?H<4?b:H==12?a:c:H<
4?-b:H==14?-a:-c);E+=g*(J-E);a+=g*(h-a);a+=f*(q+g*(v-q)-a);return a+d*(E+f*(l+g*(k-l)-E)-a)},setSeed:function(a){this.x_offset=a=a*16807%2147483647|0;this.y_offset=a=a*16807%2147483647|0;this.z_offset=a*16807%2147483647|0},__class__:sm});var Km=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=2);b==null&&(b=5);a==null&&(a=0);this.wrap=a;this.filter=b;this.mipfilter=c;this.lodBias=d;this.ignoreSampler=f;this.centroid=g;this.textureAlpha=h};r["openfl.display._internal.SamplerState"]=
Km;Km.__name__="openfl.display._internal.SamplerState";Km.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new Km(this.wrap,this.filter,this.mipfilter,this.lodBias,this.ignoreSampler,this.centroid,this.textureAlpha);a.mipmapGenerated=this.mipmapGenerated;return a},copyFrom:function(a){a==null||a.ignoreSampler||(this.wrap=a.wrap,this.filter=a.filter,this.mipfilter=a.mipfilter,this.lodBias=a.lodBias,
this.centroid=a.centroid,this.textureAlpha=a.textureAlpha)},equals:function(a){return a==null?!1:this.wrap==a.wrap&&this.filter==a.filter&&this.mipfilter==a.mipfilter&&this.lodBias==a.lodBias?this.textureAlpha==a.textureAlpha:!1},__class__:Km};var xs=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=[]};r["openfl.display._internal.ShaderBuffer"]=xs;xs.__name__="openfl.display._internal.ShaderBuffer";xs.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,paramIntCount:null,paramLengths:null,paramPositions:null,paramRefs_Bool:null,paramRefs_Float:null,paramRefs_Int:null,paramTypes:null,shader:null,addBoolOverride:function(a,b){this.overrideBoolNames[this.overrideBoolCount]=a;this.overrideBoolValues[this.overrideBoolCount]=b;this.overrideBoolCount++},addFloatOverride:function(a,b){this.overrideFloatNames[this.overrideFloatCount]=
a;this.overrideFloatValues[this.overrideFloatCount]=b;this.overrideFloatCount++},addIntOverride:function(a,b){this.overrideIntNames[this.overrideIntCount]=a;this.overrideIntValues[this.overrideIntCount]=b;this.overrideIntCount++},clearOverride:function(){this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=0},update:function(a){this.paramIntCount=this.paramFloatCount=this.paramDataLength=this.paramCount=this.paramBoolCount=this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=
this.inputCount=0;this.shader=null;if(a!=null){a.__init();this.inputCount=a.__inputBitmapData.length;for(var b,c=0,d=this.inputCount;c<d;){var f=c++;b=a.__inputBitmapData[f];this.inputs[f]=b.input;this.inputFilter[f]=b.filter;this.inputMipFilter[f]=b.mipFilter;this.inputRefs[f]=b;this.inputWrap[f]=b.wrap}b=a.__paramBool.length;var g=a.__paramFloat.length,h=a.__paramInt.length;this.paramCount=b+g+h;this.paramBoolCount=b;this.paramFloatCount=g;this.paramIntCount=h;var l=0;c=0;for(d=b;c<d;){f=c++;var k=
a.__paramBool[f];this.paramPositions[l]=this.paramDataLength;var q=k.value!=null?k.value.length:0;this.paramLengths[l]=q;this.paramDataLength+=q;this.paramTypes[l]=0;this.paramRefs_Bool[f]=k;++l}c=0;for(d=g;c<d;)f=c++,k=a.__paramFloat[f],this.paramPositions[l]=this.paramDataLength,q=k.value!=null?k.value.length:0,this.paramLengths[l]=q,this.paramDataLength+=q,this.paramTypes[l]=1,this.paramRefs_Float[f]=k,++l;c=0;for(d=h;c<d;)f=c++,k=a.__paramInt[f],this.paramPositions[l]=this.paramDataLength,q=k.value!=
null?k.value.length:0,this.paramLengths[l]=q,this.paramDataLength+=q,this.paramTypes[l]=2,this.paramRefs_Int[f]=k,++l;if(this.paramDataLength>0)if(this.paramData==null){c=this.paramDataLength;var w=k=l=h=d=null;this.paramData=c=c!=null?new Float32Array(c):d!=null?new Float32Array(d):h!=null?new Float32Array(h.__array):l!=null?new Float32Array(l):k!=null?w==null?new Float32Array(k,0):new Float32Array(k,0,w):null}else this.paramDataLength>this.paramData.length&&(c=this.paramDataLength,w=k=l=h=d=null,
c=c!=null?new Float32Array(c):d!=null?new Float32Array(d):h!=null?new Float32Array(h.__array):l!=null?new Float32Array(l):k!=null?w==null?new Float32Array(k,0):new Float32Array(k,0,w):null,c.set(this.paramData),this.paramData=c);c=w=k=l=h=0;for(d=this.paramCount;c<d;)if(f=c++,q=this.paramLengths[f],f<b){f=this.paramRefs_Bool[h];++h;for(var v=0;v<q;){var z=v++;this.paramData[w]=f.value[z]?1:0;++w}}else if(f<b+g)for(f=this.paramRefs_Float[l],++l,v=0;v<q;)z=v++,this.paramData[w]=f.value[z],++w;else for(f=
this.paramRefs_Int[k],++k,v=0;v<q;)z=v++,this.paramData[w]=f.value[z],++w;this.shader=a}},__class__:xs};var Qp=function(){this.drawCallsCounter=this.currentDrawCallsNum=this.currentDrawCallsNum=this.drawCallsCounter=0};r["openfl.display._internal.stats.DrawCallCounter"]=Qp;Qp.__name__="openfl.display._internal.stats.DrawCallCounter";Qp.prototype={currentDrawCallsNum:null,drawCallsCounter:null,increment:function(){this.drawCallsCounter++},reset:function(){this.currentDrawCallsNum=this.drawCallsCounter;
this.drawCallsCounter=0},__class__:Qp};var Kj=function(){};r["openfl.display._internal.stats.Context3DStats"]=Kj;Kj.__name__="openfl.display._internal.stats.Context3DStats";Kj.incrementDrawCall=function(a){Kj.drawCallsCounters.h[a].increment()};Kj.resetDrawCalls=function(){for(var a=Kj.drawCallsCounters.iterator();a.hasNext();)a.next().reset()};Kj.totalDrawCalls=function(){for(var a=0,b=Kj.drawCallsCounters.iterator();b.hasNext();){var c=b.next();a+=c.currentDrawCallsNum}return a};Kj.contextDrawCalls=
function(a){return Kj.drawCallsCounters.h[a].currentDrawCallsNum};var Uc=function(a,b,c){this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=0;na.call(this);this.__stage=a;this.__contextState=b;this.__stage3D=c;this.__context=a.window.context;this.gl=this.__context.webgl;this.__contextState==null&&(this.__contextState=new Rp);this.__state=new Rp;var d;this.__vertexConstants=new Float32Array(512);this.__fragmentConstants=new Float32Array(512);var f=
null;a=[1,1,1,1];var g=d=c=b=null;this.__positionScale=a=f!=null?new Float32Array(f):a!=null?new Float32Array(a):b!=null?new Float32Array(b.__array):c!=null?new Float32Array(c):d!=null?g==null?new Float32Array(d,0):new Float32Array(d,0,g):null;this.__programs=new aa;Uc.__glMaxViewportDims==-1&&(Uc.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=this.maxBackBufferWidth=Uc.__glMaxViewportDims;Uc.__glMaxTextureMaxAnisotropy==-1&&(a=this.gl.getExtension("EXT_texture_filter_anisotropic"),
a!=null&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")),a!=null&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")),a!=null?(Uc.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,Uc.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):(Uc.__glTextureMaxAnisotropy=0,Uc.__glMaxTextureMaxAnisotropy=
0));Uc.__glDepthStencil==-1&&(Uc.__glDepthStencil=this.gl.DEPTH_STENCIL);Uc.__glMemoryTotalAvailable==-1&&(a=this.gl.getExtension("NVX_gpu_memory_info"),a!=null&&(Uc.__glMemoryTotalAvailable=a.GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,Uc.__glMemoryCurrentAvailable=a.GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX));Uc.__driverInfo==null&&(a=this.gl.getParameter(this.gl.VENDOR),b=this.gl.getParameter(this.gl.VERSION),c=this.gl.getParameter(this.gl.RENDERER),d=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION),
Uc.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d);this.driverInfo=Uc.__driverInfo;this.__quadIndexBufferElements=16383;f=this.__quadIndexBufferCount=this.__quadIndexBufferElements*6;g=d=c=b=a=null;a=f!=null?new Uint16Array(f):a!=null?new Uint16Array(a):b!=null?new Uint16Array(b.__array):c!=null?new Uint16Array(c):d!=null?g==null?new Uint16Array(d,0):new Uint16Array(d,0,g):null;d=c=b=0;for(g=this.__quadIndexBufferElements;d<g;)d++,a[b]=c,a[b+1]=c+1,a[b+2]=c+2,a[b+3]=c+2,a[b+
4]=c+1,a[b+5]=c+3,b+=6,c+=4;this.__quadIndexBuffer=this.createIndexBuffer(this.__quadIndexBufferCount);this.__quadIndexBuffer.uploadFromTypedArray(a)};r["openfl.display3D.Context3D"]=Uc;Uc.__name__="openfl.display3D.Context3D";Uc.__super__=na;Uc.prototype=I(na.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,profile: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(a,b,c,d,f,g,h){h==null&&(h=7);g==null&&(g=0);f==null&&(f=1);d==null&&(d=1);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.__clear(!1,
a,b,c,d,f,g,h)},__clear:function(a,b,c,d,f,g,h,l){l==null&&(l=7);h==null&&(h=0);g==null&&(g=1);f==null&&(f=1);d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);this.__flushGLFramebuffer();this.__flushGLViewport();var k=0;if((l&1)!=0){this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared||(this.__stage.__renderer.__cleared=!0),this.__cleared=!0);k|=this.gl.COLOR_BUFFER_BIT;if(this.__contextState.colorMaskRed!=1||this.__contextState.colorMaskGreen!=1||this.__contextState.colorMaskBlue!=
1||this.__contextState.colorMaskAlpha!=1)this.gl.colorMask(!0,!0,!0,!0),this.__contextState.colorMaskRed=!0,this.__contextState.colorMaskGreen=!0,this.__contextState.colorMaskBlue=!0,this.__contextState.colorMaskAlpha=!0;this.gl.clearColor(b,c,d,f)}(l&2)!=0&&(k|=this.gl.DEPTH_BUFFER_BIT,this.__contextState.depthMask!=1&&(this.gl.depthMask(!0),this.__contextState.depthMask=!0),this.gl.clearDepth(g));(l&4)!=0&&(k|=this.gl.STENCIL_BUFFER_BIT,this.__contextState.stencilWriteMask!=255&&(this.gl.stencilMask(255),
this.__contextState.stencilWriteMask=255),this.gl.clearStencil(h),this.__contextState.stencilWriteMask=255);k!=0&&(a?this.__flushGLScissor():this.__setGLScissorTest(!1),this.gl.clear(k))},configureBackBuffer:function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);d==null&&(d=!0);f&&(a=a*this.__stage.window.__scale|0,b=b*this.__stage.window.__scale|0);if(this.__stage3D==null)this.backBufferWidth=a,this.backBufferHeight=b,this.__backBufferAntiAlias=c,this.__state.backBufferEnableDepthAndStencil=d,this.__backBufferWantsBestResolution=
f,this.__backBufferWantsBestResolutionOnBrowserZoom=g;else{if(this.__backBufferTexture==null||this.backBufferWidth!=a||this.backBufferHeight!=b){this.__backBufferTexture!=null&&this.__backBufferTexture.dispose();this.__frontBufferTexture!=null&&this.__frontBufferTexture.dispose();this.__backBufferTexture=this.createRectangleTexture(a,b,1,!0);this.__frontBufferTexture=this.createRectangleTexture(a,b,1,!0);this.__stage3D.__vertexBuffer==null&&(this.__stage3D.__vertexBuffer=this.createVertexBuffer(4,
5));var h=f?a:a*this.__stage.window.__scale|0,l=f?b:b*this.__stage.window.__scale|0;h=gb.toFloatVector(null,null,null,[h,l,0,1,1,0,l,0,0,1,h,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(h,0,20);this.__stage3D.__indexBuffer==null&&(this.__stage3D.__indexBuffer=this.createIndexBuffer(6),h=gb.toIntVector(null,null,null,[0,1,2,2,1,3]),this.__stage3D.__indexBuffer.uploadFromVector(h,0,6))}this.backBufferWidth=a;this.backBufferHeight=b;this.__backBufferAntiAlias=c;this.__state.backBufferEnableDepthAndStencil=
d;this.__backBufferWantsBestResolution=f;this.__backBufferWantsBestResolutionOnBrowserZoom=g;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(d,c,0);this.__frontBufferTexture.__getGLFramebuffer(d,c,0)}},createCubeTexture:function(a,b,c,d){d==null&&(d=0);return new Tn(this,a,b,c,d)},createIndexBuffer:function(a,b){b==null&&(b=1);return new Kv(this,a,b)},createProgram:function(a){a==null&&(a=0);return new Lv(this,a)},createRectangleTexture:function(a,b,c,d){return new Sp(this,
a,b,Tp.toString(c),d)},createTexture:function(a,b,c,d,f){f==null&&(f=0);return new Lm(this,a,b,c,d,f)},createVertexBuffer:function(a,b,c){c==null&&(c=1);return new Mv(this,a,b,Kw.toString(c))},createVideoTexture:function(){return new Ys(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,b,c){if(a!=null)if(b=b!=null?b.__toLimeRectangle():new We(0,0,this.backBufferWidth,this.backBufferHeight),c=c!=null?c.__toLimeVector2():new Ff,this.__stage.context3D==this){if(this.__stage.window!=
null){if(this.__stage3D!=null){var d=-this.__stage3D.get_x()|0,f=-this.__stage3D.get_y()|0;c.x=d;c.y=f}f=this.__stage.window.readPixels();a.image.copyPixels(f,b,c)}}else if(this.__backBufferTexture!=null){d=this.__state.renderToTexture;this.setRenderToBackBuffer();this.__flushGLFramebuffer();this.__flushGLViewport();f=this.backBufferWidth*this.backBufferHeight*4;var g=f=f!=null?new Uint8Array(f):null;f=this.gl;f.readPixels(0,0,this.backBufferWidth,this.backBufferHeight,this.__backBufferTexture.__format,
this.gl.UNSIGNED_BYTE,g);f=new Ic(new bj(g,this.backBufferWidth,this.backBufferHeight,32,2));a.image.copyPixels(f,b,c);d!=null&&this.setRenderToTexture(d,this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector)}},drawTriangles:function(a,b,c){c==null&&(c=-1);b==null&&(b=0);this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());
this.__flushGL();this.__state.program!=null&&this.__state.program.__flush();c=c==-1?a.__numIndices:c*3;this.__bindGLElementArrayBuffer(a.__id);this.gl.drawElements(this.gl.TRIANGLES,c,this.gl.UNSIGNED_SHORT,b*2)},present:function(){this.setRenderToBackBuffer();if(this.__stage3D!=null&&this.__backBufferTexture!=null){this.__cleared||this.clear(0,0,0,0,1,0,1);var a=this.__backBufferTexture;this.__backBufferTexture=this.__frontBufferTexture;this.__frontBufferTexture=a;this.__state.__primaryGLFramebuffer=
this.__backBufferTexture.__getGLFramebuffer(this.__state.backBufferEnableDepthAndStencil,this.__backBufferAntiAlias,0);this.__cleared=!1}this.__present=!0},setBlendFactors:function(a,b){this.setBlendFactorsSeparate(a,b,a,b)},setBlendFactorsSeparate:function(a,b,c,d){this.__state.blendSourceRGBFactor=a;this.__state.blendDestinationRGBFactor=b;this.__state.blendSourceAlphaFactor=c;this.__state.blendDestinationAlphaFactor=d;this.__setGLBlendEquation(this.gl.FUNC_ADD)},setColorMask:function(a,b,c,d){this.__state.colorMaskRed=
a;this.__state.colorMaskGreen=b;this.__state.colorMaskBlue=c;this.__state.colorMaskAlpha=d},setCulling:function(a){this.__state.culling=a},setDepthTest:function(a,b){this.__state.depthMask=a;this.__state.depthCompareMode=b},setProgram:function(a){this.__state.program=a;this.__state.shader=null;if(a!=null)for(var b=0,c=a.__samplerStates.length;b<c;){var d=b++;this.__state.samplerStates[d]==null?this.__state.samplerStates[d]=a.__samplerStates[d].clone():this.__state.samplerStates[d].copyFrom(a.__samplerStates[d])}},
setProgramConstantsFromByteArray:function(a,b,c,d,f){if(c!=0&&this.__state.program!=null&&(this.__state.program==null||this.__state.program.__format!=1)){c==-1&&(c=(cc.get_length(d)>>>2)-f);var g=(a=a==1)?this.__vertexConstants:this.__fragmentConstants;d=cc.toBytes(d);var h=0;h==null&&(h=0);d=h==null?new Float32Array(d.b.bufferValue):new Float32Array(d.b.bufferValue,h);h=b*4;f=ta.toFloat(f)/ta.toFloat(4)|0;for(var l=0,k=c*4;l<k;){var q=l++;g[h+q]=d[f+q]}this.__state.program!=null&&this.__state.program.__markDirty(a,
b,c)}},setProgramConstantsFromMatrix:function(a,b,c,d){d==null&&(d=!1);if(this.__state.program!=null&&this.__state.program.__format==1)this.__flushGLProgram(),a=new Float32Array(16),a[0]=c.rawData.get(0),a[1]=c.rawData.get(1),a[2]=c.rawData.get(2),a[3]=c.rawData.get(3),a[4]=c.rawData.get(4),a[5]=c.rawData.get(5),a[6]=c.rawData.get(6),a[7]=c.rawData.get(7),a[8]=c.rawData.get(8),a[9]=c.rawData.get(9),a[10]=c.rawData.get(10),a[11]=c.rawData.get(11),a[12]=c.rawData.get(12),a[13]=c.rawData.get(13),a[14]=
c.rawData.get(14),a[15]=c.rawData.get(15),pd.uniformMatrix4fv(this.gl,b,d,a);else{var f=(a=a==1)?this.__vertexConstants:this.__fragmentConstants;c=c.rawData;var g=b*4;d?(f[g++]=c.get(0),f[g++]=c.get(4),f[g++]=c.get(8),f[g++]=c.get(12),f[g++]=c.get(1),f[g++]=c.get(5),f[g++]=c.get(9),f[g++]=c.get(13),f[g++]=c.get(2),f[g++]=c.get(6),f[g++]=c.get(10),f[g++]=c.get(14),f[g++]=c.get(3),f[g++]=c.get(7),f[g++]=c.get(11)):(f[g++]=c.get(0),f[g++]=c.get(1),f[g++]=c.get(2),f[g++]=c.get(3),f[g++]=c.get(4),f[g++]=
c.get(5),f[g++]=c.get(6),f[g++]=c.get(7),f[g++]=c.get(8),f[g++]=c.get(9),f[g++]=c.get(10),f[g++]=c.get(11),f[g++]=c.get(12),f[g++]=c.get(13),f[g++]=c.get(14));f[g++]=c.get(15);this.__state.program!=null&&this.__state.program.__markDirty(a,b,4)}},setProgramConstantsFromVector:function(a,b,c,d){d==null&&(d=-1);if(d!=0&&(this.__state.program==null||this.__state.program.__format!=1)){d==-1&&(d=c.get_length()>>2);for(var f=(a=a==1)?this.__vertexConstants:this.__fragmentConstants,g=0,h=b*4,l=0,k=d;l<k;)l++,
f[h++]=c.get(g++),f[h++]=c.get(g++),f[h++]=c.get(g++),f[h++]=c.get(g++);this.__state.program!=null&&this.__state.program.__markDirty(a,b,d)}},setRenderToBackBuffer:function(){this.__state.renderToTexture=null},setRenderToTexture:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=!1);this.__state.renderToTexture=a;this.__state.renderToTextureDepthStencil=b;this.__state.renderToTextureAntiAlias=c;this.__state.renderToTextureSurfaceSelector=d},setSamplerStateAt:function(a,b,c,d){this.__state.samplerStates[a]==
null&&(this.__state.samplerStates[a]=new Km);a=this.__state.samplerStates[a];a.wrap=b;a.filter=c;a.mipfilter=d},setScissorRectangle:function(a){a!=null?(this.__state.scissorEnabled=!0,this.__state.scissorRectangle.copyFrom(a)):this.__state.scissorEnabled=!1},setStencilActions:function(a,b,c,d,f){f==null&&(f=5);d==null&&(d=5);c==null&&(c=5);b==null&&(b=0);a==null&&(a=2);this.__state.stencilTriangleFace=a;this.__state.stencilCompareMode=b;this.__state.stencilPass=c;this.__state.stencilDepthFail=d;this.__state.stencilFail=
f},setStencilReferenceValue:function(a,b,c){c==null&&(c=255);b==null&&(b=255);this.__state.stencilReferenceValue=a;this.__state.stencilReadMask=b;this.__state.stencilWriteMask=c},setTextureAt:function(a,b){this.__state.textures[a]=b},setVertexBufferAt:function(a,b,c,d){d==null&&(d=4);c==null&&(c=0);if(!(a<0))if(b==null)this.gl.disableVertexAttribArray(a),this.__bindGLArrayBuffer(null);else switch(this.__bindGLArrayBuffer(b.__id),this.gl.enableVertexAttribArray(a),c*=4,d){case 0:this.gl.vertexAttribPointer(a,
4,this.gl.UNSIGNED_BYTE,!0,b.__stride,c);break;case 1:this.gl.vertexAttribPointer(a,1,this.gl.FLOAT,!1,b.__stride,c);break;case 2:this.gl.vertexAttribPointer(a,2,this.gl.FLOAT,!1,b.__stride,c);break;case 3:this.gl.vertexAttribPointer(a,3,this.gl.FLOAT,!1,b.__stride,c);break;case 4:this.gl.vertexAttribPointer(a,4,this.gl.FLOAT,!1,b.__stride,c);break;default:throw new fb;}},__bindGLArrayBuffer:function(a){this.__contextState.__currentGLArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a),this.__contextState.__currentGLArrayBuffer=
a)},__bindGLElementArrayBuffer:function(a){this.__contextState.__currentGLElementArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a),this.__contextState.__currentGLElementArrayBuffer=a)},__bindGLFramebuffer:function(a){this.__contextState.__currentGLFramebuffer!=a&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a),this.__contextState.__currentGLFramebuffer=a)},__bindGLTexture2D:function(a){this.gl.bindTexture(this.gl.TEXTURE_2D,a);this.__contextState.__currentGLTexture2D=a},__bindGLTextureCubeMap:function(a){this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP,
a);this.__contextState.__currentGLTextureCubeMap=a},__dispose:function(){this.driverInfo+=" (Disposed)";this.__stage3D!=null&&(this.__stage3D.__indexBuffer=null,this.__stage3D.__vertexBuffer=null,this.__stage3D=this.__stage3D.context3D=null);this.__positionScale=this.__frontBufferTexture=this.__fragmentConstants=this.__renderStage3DProgram=this.__context=this.__backBufferTexture=null;this.__present=!1;this.__vertexConstants=this.__stage=this.__quadIndexBuffer=null},__drawTriangles:function(a,b){a==
null&&(a=0);this.__state.renderToTexture==null&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();this.__state.program!=null&&this.__state.program.__flush();this.gl.drawArrays(this.gl.TRIANGLES,a,b)},__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(!0),
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)):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},__flushGLColor:function(){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},__flushGLCulling:function(){if(this.__contextState.culling!=
this.__state.culling){if(this.__state.culling==3)this.__setGLCullFace(!1);else switch(this.__setGLCullFace(!0),this.__state.culling){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 fb;}this.__contextState.culling=this.__state.culling}},__flushGLDepth:function(){var a=this.__state.depthMask&&(this.__state.renderToTexture!=null?this.__state.renderToTextureDepthStencil:this.__state.backBufferEnableDepthAndStencil);
this.__contextState.depthMask!=a&&(this.gl.depthMask(a),this.__contextState.depthMask=a);if(this.__contextState.depthCompareMode!=this.__state.depthCompareMode){switch(this.__state.depthCompareMode){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 fb;}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 a=this.__state.renderToTexture.__getGLFramebuffer(this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,
this.__state.renderToTextureSurfaceSelector);this.__bindGLFramebuffer(a);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(!0)}else{if(this.__stage==null&&this.backBufferWidth==0&&this.backBufferHeight==0)throw new Ld("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 a=this.__state.shader,b=this.__state.program;this.__contextState.shader!=a&&(this.__contextState.shader!=null&&this.__contextState.shader.__disable(),a!=null&&a.__enable(),this.__contextState.shader=a);this.__contextState.program!=b&&
(this.__contextState.program!=null&&this.__contextState.program.__disable(),b!=null&&b.__enable(),this.__contextState.program=b);b!=null&&b.__format==0&&(this.__positionScale[1]=this.__stage.context3D==this&&this.__state.renderToTexture==null?1:-1,b.__setPositionScale(this.__positionScale))},__flushGLScissor:function(){if(this.__state.scissorEnabled){this.__setGLScissorTest(!0);this.__contextState.scissorEnabled=!0;var a=this.__state.scissorRectangle.x|0,b=this.__state.scissorRectangle.y|0,c=this.__state.scissorRectangle.width|
0,d=this.__state.scissorRectangle.height|0;this.__backBufferWantsBestResolution&&(a=this.__state.scissorRectangle.x*this.__stage.window.__scale|0,b=this.__state.scissorRectangle.y*this.__stage.window.__scale|0,c=this.__state.scissorRectangle.width*this.__stage.window.__scale|0,d=this.__state.scissorRectangle.height*this.__stage.window.__scale|0);this.__state.renderToTexture==null&&this.__stage3D==null&&(b=(this.__stage.window.__height*this.__stage.window.__scale|0)-d-b);if(this.__contextState.scissorRectangle.x!=
a||this.__contextState.scissorRectangle.y!=b||this.__contextState.scissorRectangle.width!=c||this.__contextState.scissorRectangle.height!=d)this.gl.scissor(a,b,c,d),this.__contextState.scissorRectangle.setTo(a,b,c,d)}else this.__contextState.scissorEnabled!=this.__state.scissorEnabled&&(this.__setGLScissorTest(!1),this.__contextState.scissorEnabled=!1)},__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;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(){for(var a=0,b,c,d=0,f=this.__state.textures.length;d<f;){var g=d++;b=this.__state.textures[g];
c=this.__state.samplerStates[g];c==null&&(this.__state.samplerStates[g]=new Km,c=this.__state.samplerStates[g]);this.gl.activeTexture(this.gl.TEXTURE0+a);b!=null?(b.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__getTexture()):this.__bindGLTextureCubeMap(b.__getTexture()),this.__contextState.textures[g]=b,b.__setSamplerState(c)):this.__bindGLTexture2D(null);this.__state.program!=null&&this.__state.program.__format==0&&c.textureAlpha&&(this.gl.activeTexture(this.gl.TEXTURE0+a+4),b!=
null&&b.__alphaTexture!=null?(b.__alphaTexture.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__alphaTexture.__getTexture()):this.__bindGLTextureCubeMap(b.__alphaTexture.__getTexture()),b.__alphaTexture.__setSamplerState(c),this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,1)):(this.__bindGLTexture2D(null),this.__state.program.__agalAlphaSamplerEnabled[a]!=null&&this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,0)));++a}},__flushGLViewport:function(){if(this.__state.renderToTexture==
null)if(this.__stage.context3D==this){var a=this.backBufferWidth,b=this.backBufferHeight;this.__stage3D!=null||this.__backBufferWantsBestResolution||(a=this.backBufferWidth*this.__stage.window.__scale|0,b=this.backBufferHeight*this.__stage.window.__scale|0);var c=this.__stage3D==null?0:this.__stage3D.get_x()|0,d=this.__stage.window.__height*this.__stage.window.__scale-b-(this.__stage3D==null?0:this.__stage3D.get_y())|0;this.gl.viewport(c,d,a,b)}else this.gl.viewport(0,0,this.backBufferWidth,this.backBufferHeight);
else b=a=0,this.__state.renderToTexture instanceof Lm?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Sp?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Tn&&(b=this.__state.renderToTexture,b=a=b.__size),this.gl.viewport(0,0,a,b)},__getGLBlend:function(a){switch(a){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 fb;}},__getGLCompareMode:function(a){switch(a){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(a){switch(a){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(a){switch(a){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(a){var b=a.context3D;if(b!=null&&b!=this&&b.__frontBufferTexture!=null&&a.visible&&this.backBufferHeight>0&&this.backBufferWidth>0){if(this.__renderStage3DProgram==null){var c=new ra;c.assemble(Lw.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=new ra;d.assemble(Lw.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\nmov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(c.agalcode,d.agalcode)}this.setProgram(this.__renderStage3DProgram);
this.setBlendFactors(2,9);this.setColorMask(!0,!0,!0,!0);this.setCulling(3);this.setDepthTest(!1,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,b.__frontBufferTexture);this.setVertexBufferAt(0,a.__vertexBuffer,0,3);this.setVertexBufferAt(1,a.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,a.__renderTransform,!0);this.drawTriangles(a.__indexBuffer);this.__present=!0}},__setGLBlend:function(a){this.__contextState.__enableGLBlend!=
a&&(a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this.__contextState.__enableGLBlend=a)},__setGLBlendEquation:function(a){this.__contextState.__glBlendEquation!=a&&(this.gl.blendEquation(a),this.__contextState.__glBlendEquation=a)},__setGLCullFace:function(a){this.__contextState.__enableGLCullFace!=a&&(a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this.__contextState.__enableGLCullFace=a)},__setGLDepthTest:function(a){this.__contextState.__enableGLDepthTest!=
a&&(a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this.__contextState.__enableGLDepthTest=a)},__setGLFrontFace:function(a){this.__contextState.__frontFaceGLCCW!=a&&(this.gl.frontFace(a?this.gl.CCW:this.gl.CW),this.__contextState.__frontFaceGLCCW=a)},__setGLScissorTest:function(a){this.__contextState.__enableGLScissorTest!=a&&(a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this.__contextState.__enableGLScissorTest=a)},__setGLStencilTest:function(a){this.__contextState.__enableGLStencilTest!=
a&&(a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this.__contextState.__enableGLStencilTest=a)},get_enableErrorChecking:function(){return this.__enableErrorChecking},set_enableErrorChecking:function(a){return this.__enableErrorChecking=a},get_totalGPUMemory:function(){if(Uc.__glMemoryCurrentAvailable!=-1){var a=this.gl.getParameter(Uc.__glMemoryCurrentAvailable),b=this.gl.getParameter(Uc.__glMemoryTotalAvailable);if(b>0)return(b-a)*1024}return 0},__class__:Uc,__properties__:{get_totalGPUMemory:"get_totalGPUMemory",
set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Kw={fromString:function(a){switch(a){case "dynamicDraw":return 0;case "staticDraw":return 1;default:return null}},toString:function(a){switch(a){case 0:return"dynamicDraw";case 1:return"staticDraw";default:return null}}},Lw={fromString:function(a){switch(a){case "fragment":return 0;case "vertex":return 1;default:return null}},toString:function(a){switch(a){case 0:return"fragment";case 1:return"vertex";
default:return null}}},Tp={fromString:function(a){switch(a){case "bgrPacked565":return 0;case "bgra":return 1;case "bgraPacked4444":return 2;case "compressed":return 3;case "compressedAlpha":return 4;case "rgbaHalfFloat":return 5;default:return null}},toString:function(a){switch(a){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}}},Kv=function(a,b,c){this.__context=
a;this.__numIndices=b;a=this.__context.gl;this.__id=a.createBuffer();this.__usage=c==0?a.DYNAMIC_DRAW:a.STATIC_DRAW};r["openfl.display3D.IndexBuffer3D"]=Kv;Kv.__name__="openfl.display3D.IndexBuffer3D";Kv.prototype={__context:null,__id:null,__memoryUsage:null,__numIndices:null,__tempUInt16Array:null,__usage:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*2;a=cc.toArrayBuffer(a);b==null&&(b=0);d=a!=null?d==null?new Uint16Array(a,b):new Uint16Array(a,
b,d):null;this.uploadFromTypedArray(d)},uploadFromTypedArray:function(a,b){a!=null&&(b=this.__context.gl,this.__context.__bindGLElementArrayBuffer(this.__id),pd.bufferData(b,b.ELEMENT_ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(a!=null){var d=b+c,f=this.__tempUInt16Array;if(this.__tempUInt16Array==null||this.__tempUInt16Array.length<c)this.__tempUInt16Array=c!=null?new Uint16Array(c):null,f!=null&&this.__tempUInt16Array.set(f);for(c=b;c<d;)f=c++,this.__tempUInt16Array[f-b]=
a.get(f);this.uploadFromTypedArray(this.__tempUInt16Array)}},__class__:Kv};var Lv=function(a,b){this.__context=a;this.__format=b;this.__format==0?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new Xa,this.__agalSamplerUniforms=new Xa,this.__agalAlphaSamplerUniforms=new Xa,this.__agalAlphaSamplerEnabled=[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};
r["openfl.display3D.Program3D"]=Lv;Lv.__name__="openfl.display3D.Program3D";Lv.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,dispose:function(){this.__deleteShaders()},getAttributeIndex:function(a){if(this.__format==0)return Z.startsWith(a,"va")?L.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslAttribNames.length;b<c;){var d=b++;if(this.__glslAttribNames[d]==a)return d}return-1},getConstantIndex:function(a){if(this.__format==0)return Z.startsWith(a,"vc")?L.parseInt(a.substring(2)):Z.startsWith(a,"fc")?L.parseInt(a.substring(2)):
-1;for(var b=0,c=this.__glslUniformNames.length;b<c;){var d=b++;if(this.__glslUniformNames[d]==a)return this.__glslUniformLocations[d]}return-1},upload:function(a,b){if(this.__format==0){var c=[];a=Og.convertToGLSL(a,null);b=Og.convertToGLSL(b,c);Mb.level==5&&(Mb.info(a,{fileName:"openfl/display3D/Program3D.hx",lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Mb.info(b,{fileName:"openfl/display3D/Program3D.hx",lineNumber:400,className:"openfl.display3D.Program3D",methodName:"upload"}));
this.__deleteShaders();this.__uploadFromGLSL(a,b);this.__buildAGALUniformList();b=0;for(a=c.length;b<a;){var d=b++;this.__samplerStates[d]=c[d]}}},uploadSources:function(a,b){if(this.__format==1){var c="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+a,d="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+
b;if(c!=this.__glVertexSource||d!=this.__glFragmentSource){this.__processGLSLData(a,"attribute");this.__processGLSLData(a,"uniform");this.__processGLSLData(b,"uniform");this.__deleteShaders();this.__uploadFromGLSL(c,d);var f=this.__glslSamplerNames;d=this.__glslAttribNames;var g=this.__glslAttribTypes;a=this.__glslUniformNames;this.__glslSamplerNames=[];this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslUniformLocations=[];b=this.__context.gl;for(c=0;c<f.length;){var h=f[c];++c;var l=
b.getUniformLocation(this.__glProgram,h);this.__glslSamplerNames[l]=h}c=0;for(f=d.length;c<f;)h=c++,l=b.getAttribLocation(this.__glProgram,d[h]),this.__glslAttribNames[l]=d[h],this.__glslAttribTypes[l]=g[h];c=0;for(f=a.length;c<f;)h=c++,d=b.getUniformLocation(this.__glProgram,a[h]),this.__glslUniformLocations[h]=d}}},__buildAGALUniformList:function(){if(this.__format!=1){var a=this.__context.gl;this.__agalUniforms.clear();this.__agalSamplerUniforms.clear();this.__agalAlphaSamplerUniforms.clear();
this.__agalAlphaSamplerEnabled=[];this.__agalSamplerUsageMask=0;var b=a.getProgramParameter(this.__glProgram,a.ACTIVE_UNIFORMS);for(var c=new Xa,d=new Xa,f=0;f<b;){var g=f++,h=a.getActiveUniform(this.__glProgram,g),l=h.name,k=h.size,q=h.type;h=new Zs(this.__context);h.name=l;h.size=k;h.type=q;h.location=a.getUniformLocation(this.__glProgram,h.name);l=h.name.indexOf("[");l>=0&&(h.name=h.name.substring(0,l));switch(h.type){case 35674:h.regCount=2;break;case 35675:h.regCount=3;break;case 35676:h.regCount=
4;break;default:h.regCount=1}h.regCount*=h.size;this.__agalUniforms.add(h);if(h.name=="vcPositionScale")this.__agalPositionScale=h;else if(Z.startsWith(h.name,"vc"))h.regIndex=L.parseInt(h.name.substring(2)),h.regData=this.__context.__vertexConstants,c.add(h);else if(Z.startsWith(h.name,"fc"))h.regIndex=L.parseInt(h.name.substring(2)),h.regData=this.__context.__fragmentConstants,d.add(h);else if(Z.startsWith(h.name,"sampler")&&h.name.indexOf("alpha")==-1)for(h.regIndex=L.parseInt(h.name.substring(7)),
this.__agalSamplerUniforms.add(h),l=0,k=h.regCount;l<k;)q=l++,this.__agalSamplerUsageMask|=1<<h.regIndex+q;else Z.startsWith(h.name,"sampler")&&Z.endsWith(h.name,"_alpha")?(l=h.name.indexOf("_")-7,h.regIndex=L.parseInt(h.name.substring(7,7+l))+4,this.__agalAlphaSamplerUniforms.add(h)):Z.startsWith(h.name,"sampler")&&Z.endsWith(h.name,"_alphaEnabled")&&(h.regIndex=L.parseInt(h.name.substring(7)),this.__agalAlphaSamplerEnabled[h.regIndex]=h);Mb.level==5&&Mb.verbose(""+g+" name:"+h.name+" type:"+h.type+
" size:"+h.size+" location:"+L.string(h.location),{fileName:"openfl/display3D/Program3D.hx",lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new Up(V.array(c));this.__agalFragmentUniformMap=new Up(V.array(d))}},__deleteShaders:function(){var a=this.__context.gl;this.__glProgram!=null&&(this.__glProgram=null);this.__glVertexShader!=null&&(a.deleteShader(this.__glVertexShader),this.__glVertexShader=null);this.__glFragmentShader!=
null&&(a.deleteShader(this.__glFragmentShader),this.__glFragmentShader=null)},__disable:function(){},__enable:function(){var a=this.__context.gl;a.useProgram(this.__glProgram);if(this.__format==0){this.__agalVertexUniformMap.markAllDirty();this.__agalFragmentUniformMap.markAllDirty();for(var b=this.__agalSamplerUniforms.h;b!=null;){var c=b.item;b=b.next;if(c.regCount==1)a.uniform1i(c.location,c.regIndex);else throw new fb("!!! TODO: uniform location on webgl");}for(b=this.__agalAlphaSamplerUniforms.h;b!=
null;)if(c=b.item,b=b.next,c.regCount==1)a.uniform1i(c.location,c.regIndex);else throw new fb("!!! TODO: uniform location on webgl");}},__flush:function(){this.__format==0&&(this.__agalVertexUniformMap.flush(),this.__agalFragmentUniformMap.flush())},__getSamplerState:function(a){return this.__samplerStates[a]},__markDirty:function(a,b,c){this.__format!=1&&(a?this.__agalVertexUniformMap.markDirty(b,c):this.__agalFragmentUniformMap.markDirty(b,c))},__processGLSLData:function(a,b){var c=0,d;for(d=b==
"uniform"?new sb("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new sb("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);if(!Z.startsWith(g,"gl_")){if(Z.startsWith(f,"sampler"))this.__glslSamplerNames.push(g);else{switch(f){case "bool":c=0;break;case "bvec2":c=1;break;case "bvec3":c=2;break;case "bvec4":c=3;break;case "dvec2":case "vec2":c=5;break;case "dvec3":case "vec3":c=6;break;case "dvec4":case "vec4":c=7;break;case "double":case "float":c=4;
break;case "mat2":case "mat2x2":c=12;break;case "mat2x3":c=13;break;case "mat2x4":c=14;break;case "mat3x2":c=15;break;case "mat3":case "mat3x3":c=16;break;case "mat3x4":c=17;break;case "mat4x2":c=18;break;case "mat4x3":c=19;break;case "mat4":case "mat4x4":c=20;break;case "int":case "uint":c=8;break;case "ivec2":case "uvec2":c=9;break;case "ivec3":case "uvec3":c=10;break;case "ivec4":case "uvec4":c=11;break;default:c=null}b=="uniform"?(this.__glslUniformNames.push(g),this.__glslUniformTypes.push(c)):
(this.__glslAttribNames.push(g),this.__glslAttribTypes.push(c))}g=d.matchedPos();c=g.pos+g.len}}},__setPositionScale:function(a){this.__format!=1&&this.__agalPositionScale!=null&&this.__context.gl.uniform4fv(this.__agalPositionScale.location,a)},__setSamplerState:function(a,b){this.__samplerStates[a]=b},__uploadFromGLSL:function(a,b){var c=this.__context.gl;this.__glVertexSource=a;this.__glFragmentSource=b;this.__glVertexShader=c.createShader(c.VERTEX_SHADER);c.shaderSource(this.__glVertexShader,
a);c.compileShader(this.__glVertexShader);if(c.getShaderParameter(this.__glVertexShader,c.COMPILE_STATUS)==0){var d="Error compiling vertex shader\n"+c.getShaderInfoLog(this.__glVertexShader);Mb.error(d+("\n"+a),{fileName:"openfl/display3D/Program3D.hx",lineNumber:869,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}this.__glFragmentShader=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(this.__glFragmentShader,b);c.compileShader(this.__glFragmentShader);c.getShaderParameter(this.__glFragmentShader,
c.COMPILE_STATUS)==0&&(d="Error compiling fragment shader\n"+c.getShaderInfoLog(this.__glFragmentShader),Mb.error(d+("\n"+b),{fileName:"openfl/display3D/Program3D.hx",lineNumber:881,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}));this.__glProgram=c.createProgram();if(this.__format==0)for(b=0;b<16;){var f=b++;d="va"+f;a.indexOf(" "+d)!=-1&&c.bindAttribLocation(this.__glProgram,f,d)}else for(b=0,a=this.__glslAttribNames;b<a.length;)if(d=a[b],++b,d.indexOf("Position")>-1&&Z.startsWith(d,
"openfl_")){c.bindAttribLocation(this.__glProgram,0,d);break}c.attachShader(this.__glProgram,this.__glVertexShader);c.attachShader(this.__glProgram,this.__glFragmentShader);c.linkProgram(this.__glProgram);c.getProgramParameter(this.__glProgram,c.LINK_STATUS)==0&&(d="Unable to initialize the shader program\n"+c.getProgramInfoLog(this.__glProgram),Mb.error(d,{fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}))},__class__:Lv};
var Zs=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new dj(null,0)};r["openfl.display3D.Uniform"]=Zs;Zs.__name__="openfl.display3D.Uniform";Zs.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,context:null,regDataPointer:null,flush:function(){var a=this.context.gl,b=this.regIndex*4;switch(this.type){case 35664:ex.uniform2fv(a,this.location,this.regData.subarray(b,b+this.regCount*2));break;case 35665:var c=this.location;b=
this.regData.subarray(b,b+this.regCount*3);var d=null;d!=null?a.uniform3fv(c,b,d,null):a.uniform3fv(c,b);break;case 35666:c=this.location;b=this.regData.subarray(b,b+this.regCount*4);d=null;d!=null?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b);break;case 35674:pd.uniformMatrix2fv(a,this.location,!1,this.regData.subarray(b,b+this.size*2*2));break;case 35675:pd.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+this.size*3*3));break;case 35676:pd.uniformMatrix4fv(a,this.location,!1,this.regData.subarray(b,
b+this.size*4*4));break;default:c=this.location,b=this.regData.subarray(b,b+this.regCount*4),d=null,d!=null?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b)}},__getUniformRegisters:function(a,b){return this.regData.subarray(a,a+b)},__class__:Zs};var Up=function(a){this.__uniforms=a;this.__uniforms.sort(function(h,l){return A.compare(h.regIndex,l.regIndex)});var b=0;a=0;for(var c=this.__uniforms;a<c.length;){var d=c[a];++a;d.regIndex+d.regCount>b&&(b=d.regIndex+d.regCount)}this.__registerLookup=gb.toObjectVector(null,
b);a=0;for(c=this.__uniforms;a<c.length;){d=c[a];++a;b=0;for(var f=d.regCount;b<f;){var g=b++;this.__registerLookup.set(d.regIndex+g,d)}}this.__anyDirty=this.__allDirty=!0};r["openfl.display3D.UniformMap"]=Up;Up.__name__="openfl.display3D.UniformMap";Up.prototype={__allDirty:null,__anyDirty:null,__registerLookup:null,__uniforms:null,flush:function(){if(this.__anyDirty){for(var a=0,b=this.__uniforms;a<b.length;){var c=b[a];++a;if(this.__allDirty||c.isDirty)c.flush(),c.isDirty=!1}this.__anyDirty=this.__allDirty=
!1}},markAllDirty:function(){this.__anyDirty=this.__allDirty=!0},markDirty:function(a,b){if(!this.__allDirty)for(b=a+b,b>this.__registerLookup.get_length()&&(b=this.__registerLookup.get_length());a<b;){var c=this.__registerLookup.get(a);c!=null?(this.__anyDirty=c.isDirty=!0,a=c.regIndex+c.regCount):++a}},__class__:Up};var Mv=function(a,b,c,d){this.__context=a;this.__numVertices=b;this.__vertexSize=c;a=this.__context.gl;this.__id=a.createBuffer();this.__stride=this.__vertexSize*4;this.__usage=Kw.fromString(d)==
0?a.DYNAMIC_DRAW:a.STATIC_DRAW};r["openfl.display3D.VertexBuffer3D"]=Mv;Mv.__name__="openfl.display3D.VertexBuffer3D";Mv.prototype={__context:null,__data:null,__id:null,__memoryUsage:null,__numVertices:null,__stride:null,__tempFloat32Array:null,__usage:null,__vertexSize:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*this.__stride;d*=this.__vertexSize;a=cc.toArrayBuffer(a);b==null&&(b=0);a=a!=null?d==null?new Float32Array(a,b):new Float32Array(a,
b,d):null;this.uploadFromTypedArray(Mk.toArrayBufferView(a))},uploadFromTypedArray:function(a,b){a!=null&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),pd.bufferData(b,b.ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(a!=null){b*=this.__vertexSize;var d=c*this.__vertexSize;c=b+d;var f=this.__tempFloat32Array;if(this.__tempFloat32Array==null||this.__tempFloat32Array.length<d)this.__tempFloat32Array=d!=null?new Float32Array(d):null,f!=null&&this.__tempFloat32Array.set(f);
for(d=b;d<c;)f=d++,this.__tempFloat32Array[f-b]=a.get(f);this.uploadFromTypedArray(Mk.toArrayBufferView(this.__tempFloat32Array))}},__class__:Mv};var Og=function(){};r["openfl.display3D._internal.AGALConverter"]=Og;Og.__name__="openfl.display3D._internal.AGALConverter";Og.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==rk.VERTEX?"vc":"fc";case 2:return b==rk.VERTEX?"vt":"ft";case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new fb("Invalid data!");
}};Og.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new zb(a,b)};Og.convertToGLSL=function(a,b){a.position=0;a.__endian=1;var c=a.readByte()&255;if(c==176)return a.readUTF();if(c!=160)throw new fb("Magic value must be 0xA0, may not be AGAL");var d=a.readInt();if((a.readByte()&255)!=161)throw new fb("Shader type ID must be 0xA1");c=(a.readByte()&255)==0?rk.VERTEX:rk.FRAGMENT;for(var f=new $s,g="";;){var h=a.position;if(!ta.gt(cc.get_length(a),h))break;var l=a.readInt();h=a.readUnsignedInt();
var k=Og.readUInt64(a),q=Og.readUInt64(a);h=Un.parse(h,c);k=Mm.parse(k,c,h.mask);var w=Mm.parse(q,c,h.mask);g+="\t";switch(l){case 0:g+=L.string(h.toGLSL()+" = "+k.toGLSL()+"; // mov");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 1:g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" + "+w.toGLSL()+"; // add");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 2:g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" - "+w.toGLSL()+"; // sub");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);
f.addSR(w,$a.VECTOR_4);break;case 3:g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" * "+w.toGLSL()+"; // mul");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 4:g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" / "+w.toGLSL()+"; // div");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 5:g=k.toGLSL().indexOf(".")>-1?g+L.string(h.toGLSL()+" = 1.0 / "+k.toGLSL()+"; // rcp"):g+L.string(h.toGLSL()+" = vec4(1) / "+k.toGLSL()+"; // rcp");f.addDR(h,$a.VECTOR_4);
f.addSR(k,$a.VECTOR_4);break;case 6:g+=L.string(h.toGLSL()+" = min("+k.toGLSL()+", "+w.toGLSL()+"); // min");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 7:g+=L.string(h.toGLSL()+" = max("+k.toGLSL()+", "+w.toGLSL()+"); // max");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 8:g+=L.string(h.toGLSL()+" = fract("+k.toGLSL()+"); // frc");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 9:g+=L.string(h.toGLSL()+" = sqrt("+k.toGLSL()+
"); // sqrt");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 10:g+=L.string(h.toGLSL()+" = inversesqrt("+k.toGLSL()+"); // rsq");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 11:g+=L.string(h.toGLSL()+" = pow("+k.toGLSL()+", "+w.toGLSL()+"); // pow");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 12:g+=L.string(h.toGLSL()+" = log2("+k.toGLSL()+"); // log");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 13:g+=L.string(h.toGLSL()+" = exp2("+
k.toGLSL()+"); // exp");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 14:g+=L.string(h.toGLSL()+" = normalize("+k.toGLSL()+"); // normalize");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 15:g+=L.string(h.toGLSL()+" = sin("+k.toGLSL()+"); // sin");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 16:g+=L.string(h.toGLSL()+" = cos("+k.toGLSL()+"); // cos");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 17:k.sourceMask=w.sourceMask=7;g+=L.string(h.toGLSL()+" = cross(vec3("+
k.toGLSL()+"), vec3("+w.toGLSL()+")); // crs");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 18:k.sourceMask=w.sourceMask=7;g+=L.string(h.toGLSL()+" = vec4(dot(vec3("+k.toGLSL()+"), vec3("+w.toGLSL()+")))"+h.getWriteMask()+"; // dp3");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 19:k.sourceMask=w.sourceMask=15;g+=L.string(h.toGLSL()+" = vec4(dot(vec4("+k.toGLSL()+"), vec4("+w.toGLSL()+")))"+h.getWriteMask()+"; // dp4");f.addDR(h,
$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 20:g+=L.string(h.toGLSL()+" = abs("+k.toGLSL()+"); // abs");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 21:g+=L.string(h.toGLSL()+" = -"+k.toGLSL()+"; // neg");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 22:g+=L.string(h.toGLSL()+" = clamp("+k.toGLSL()+", 0.0, 1.0); // saturate");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 23:l=f.getRegisterUsage(w);l!=$a.VECTOR_4&&l!=$a.VECTOR_4_ARRAY?(g+=
L.string(h.toGLSL()+" = "+k.toGLSL()+" * mat3("+w.toGLSL(!1)+"); // m33"),f.addDR(h,$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.MATRIX_4_4)):(k.sourceMask=w.sourceMask=7,g+=L.string(h.toGLSL()+" = vec3(dot("+k.toGLSL(!0)+","+w.toGLSL(!0,0)+"), dot("+k.toGLSL(!0)+","+w.toGLSL(!0,1)+"),dot("+k.toGLSL(!0)+","+w.toGLSL(!0,2)+")); // m33"),f.addDR(h,$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.VECTOR_4,0),f.addSR(w,$a.VECTOR_4,1),f.addSR(w,$a.VECTOR_4,2));break;case 24:l=f.getRegisterUsage(w);
l!=$a.VECTOR_4&&l!=$a.VECTOR_4_ARRAY?(g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" * "+w.toGLSL(!1)+"; // m44"),f.addDR(h,$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.MATRIX_4_4)):(k.sourceMask=w.sourceMask=15,g+=L.string(h.toGLSL()+" = vec4(dot("+k.toGLSL(!0)+","+w.toGLSL(!0,0)+"), dot("+k.toGLSL(!0)+","+w.toGLSL(!0,1)+"), dot("+k.toGLSL(!0)+","+w.toGLSL(!0,2)+"), dot("+k.toGLSL(!0)+","+w.toGLSL(!0,3)+")); // m44"),f.addDR(h,$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.VECTOR_4,0),f.addSR(w,
$a.VECTOR_4,1),f.addSR(w,$a.VECTOR_4,2),f.addSR(w,$a.VECTOR_4,3));break;case 25:h.mask&=7;l=f.getRegisterUsage(w);l!=$a.VECTOR_4&&l!=$a.VECTOR_4_ARRAY?(g+=L.string(h.toGLSL()+" = "+k.toGLSL()+" * "+w.toGLSL(!1)+"; // m34"),f.addDR(h,$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.MATRIX_4_4)):(k.sourceMask=w.sourceMask=15,g+=L.string(h.toGLSL()+" = vec3(dot("+k.toGLSL(!0)+","+w.toGLSL(!0,0)+"), dot("+k.toGLSL(!0)+","+w.toGLSL(!0,1)+"),dot("+k.toGLSL(!0)+","+w.toGLSL(!0,2)+")); // m34"),f.addDR(h,
$a.VECTOR_4),f.addSR(k,$a.VECTOR_4),f.addSR(w,$a.VECTOR_4,0),f.addSR(w,$a.VECTOR_4,1),f.addSR(w,$a.VECTOR_4,2));break;case 26:if(d<2)throw new fb("Version must be 2");g+=L.string(h.toGLSL()+" = ddx("+k.toGLSL()+"); // ddx");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 27:if(d<2)throw new fb("Version must be 2");g+=L.string(h.toGLSL()+" = ddy("+k.toGLSL()+"); // ddy");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);break;case 28:if(d<2)throw new fb("Version must be 2");k.sourceMask=w.sourceMask=
1;g+=L.string("if ("+k.toGLSL()+" == "+w.toGLSL()+") { // ife");f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 29:if(d<2)throw new fb("Version must be 2");k.sourceMask=w.sourceMask=1;g+=L.string("if ("+k.toGLSL()+" != "+w.toGLSL()+") { // ine");f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 30:if(d<2)throw new fb("Version must be 2");k.sourceMask=w.sourceMask=1;g+=L.string("if ("+k.toGLSL()+" >= "+w.toGLSL()+") { // ifg");f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 31:if(d<
2)throw new fb("Version must be 2");k.sourceMask=w.sourceMask=1;g+=L.string("if ("+k.toGLSL()+" < "+w.toGLSL()+") { // ifl");f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 32:if(d<2)throw new fb("Version must be 2");g+="} else { // els";break;case 33:if(d<2)throw new fb("Version must be 2");g+="} // eif";break;case 39:k.sourceMask=15;g+=L.string("if (any(lessThan("+k.toGLSL()+", vec4(0)))) discard;");f.addSR(k,$a.VECTOR_4);break;case 40:w=Vn.parse(q,c);switch(w.d){case 0:w.t==2?(k.sourceMask=
3,f.addSaR(w,$a.SAMPLER_2D_ALPHA),g+=L.string("if ("+w.toGLSL()+"_alphaEnabled) {\n"),g+=L.string("\t\t"+h.toGLSL()+" = vec4(texture2D("+w.toGLSL()+", "+k.toGLSL()+").xyz, texture2D("+w.toGLSL()+"_alpha, "+k.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=L.string("\t\t"+h.toGLSL()+" = texture2D("+w.toGLSL()+", "+k.toGLSL()+"); // tex\n"),g+="\t}"):(k.sourceMask=3,f.addSaR(w,$a.SAMPLER_2D),g+=L.string(h.toGLSL()+" = texture2D("+w.toGLSL()+", "+k.toGLSL()+"); // tex"));break;case 1:w.t==2?
(k.sourceMask=7,f.addSaR(w,$a.SAMPLER_CUBE_ALPHA),g+=L.string("if ("+w.toGLSL()+"_alphaEnabled) {\n"),g+=L.string("\t\t"+h.toGLSL()+" = vec4(textureCube("+w.toGLSL()+", "+k.toGLSL()+").xyz, textureCube("+w.toGLSL()+"_alpha, "+k.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=L.string("\t\t"+h.toGLSL()+" = textureCube("+w.toGLSL()+", "+k.toGLSL()+"); // tex"),g+="\t}"):(k.sourceMask=7,g+=L.string(h.toGLSL()+" = textureCube("+w.toGLSL()+", "+k.toGLSL()+"); // tex"),f.addSaR(w,$a.SAMPLER_CUBE))}f.addDR(h,
$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);b!=null&&(b[w.n]=w.toSamplerState());break;case 41:k.sourceMask=w.sourceMask=15;g+=L.string(h.toGLSL()+" = vec4(greaterThanEqual("+k.toGLSL()+", "+w.toGLSL()+"))"+h.getWriteMask()+"; // ste");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 42:k.sourceMask=w.sourceMask=15;g+=L.string(h.toGLSL()+" = vec4(lessThan("+k.toGLSL()+", "+w.toGLSL()+"))"+h.getWriteMask()+"; // slt");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);
break;case 44:k.sourceMask=w.sourceMask=15;g+=L.string(h.toGLSL()+" = vec4(equal("+k.toGLSL()+", "+w.toGLSL()+"))"+h.getWriteMask()+"; // seq");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;case 45:k.sourceMask=w.sourceMask=15;g+=L.string(h.toGLSL()+" = vec4(notEqual("+k.toGLSL()+", "+w.toGLSL()+"))"+h.getWriteMask()+"; // sne");f.addDR(h,$a.VECTOR_4);f.addSR(k,$a.VECTOR_4);f.addSR(w,$a.VECTOR_4);break;default:throw new fb("Opcode "+l);}g+="\n"}Og.limitedProfile==null&&
(d=y.context.getParameter(7938),Og.limitedProfile=d.indexOf("OpenGL ES")>-1||d.indexOf("WebGL")>-1);a=""+L.string("// AGAL "+(c==rk.VERTEX?"vertex":"fragment")+" shader\n");a=Og.limitedProfile?a+"#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n":a+"#version 120\n";a+=L.string(f.toGLSL(!1));c==rk.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+L.string(f.toGLSL(!0));a+=L.string(g);c==rk.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");
return a+"}\n"};var Un=function(){};r["openfl.display3D._internal._AGALConverter.DestRegister"]=Un;Un.__name__="openfl.display3D._internal._AGALConverter.DestRegister";Un.parse=function(a,b){var c=new Un;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};Un.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var a=".";(this.mask&1)!=0&&(a+="x");(this.mask&2)!=0&&(a+="y");(this.mask&4)!=0&&(a+="z");(this.mask&8)!=0&&(a+="w");return a},toGLSL:function(a){a==
null&&(a=!0);var b=this.type==3?this.programType==rk.VERTEX?"gl_Position":"gl_FragColor":Og.prefixFromType(this.type,this.programType)+this.n;a&&this.mask!=15&&(b+=this.getWriteMask());return b},__class__:Un};var rk=O["openfl.display3D._internal._AGALConverter.ProgramType"]={__ename__:"openfl.display3D._internal._AGALConverter.ProgramType",__constructs__:null,VERTEX:{_hx_name:"VERTEX",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:D},FRAGMENT:{_hx_name:"FRAGMENT",
_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:D}};rk.__constructs__=[rk.VERTEX,rk.FRAGMENT];var $s=function(){this.mEntries=[]};r["openfl.display3D._internal.RegisterMap"]=$s;$s.__name__="openfl.display3D._internal.RegisterMap";$s.prototype={mEntries:null,add:function(a,b,c,d){for(var f=0,g=this.mEntries;f<g.length;){var h=g[f];++f;if(h.type==a&&h.name==b&&h.number==c){if(h.usage!=d)throw new fb("Cannot use register in multiple ways yet (mat4/vec4)");return}}h=
new Nv;h.type=a;h.name=b;h.number=c;h.usage=d;this.mEntries.push(h)},addDR:function(a,b){this.add(a.type,a.toGLSL(!1),a.n,b)},addSaR:function(a,b){this.add(a.type,a.toGLSL(),a.n,b)},addSR:function(a,b,c){c==null&&(c=0);a.d!=0?(this.add(a.itype,Og.prefixFromType(a.itype,a.programType)+a.n,a.n,$a.VECTOR_4),this.add(a.type,Og.prefixFromType(a.type,a.programType)+a.o,a.o,$a.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return a.d!=0?$a.VECTOR_4_ARRAY:this.getUsage(a.type,
a.toGLSL(!1),a.n)},getUsage:function(a,b,c){for(var d=0,f=this.mEntries;d<f.length;){var g=f[d];++d;if(g.type==a&&g.name==b&&g.number==c)return g.usage}return $a.UNUSED},toGLSL:function(a){this.mEntries.sort(function(g,h){return g.number-h.number});this.mEntries.sort(function(g,h){return u.__cast(g.type,Ft)-u.__cast(h.type,Ft)});for(var b="",c=0,d=this.mEntries.length;c<d;){var f=c++;f=this.mEntries[f];if(!(a&&f.type!=2||!a&&f.type==2)&&f.type!=3){switch(f.type){case 0:b+="attribute ";break;case 1:b+=
"uniform ";break;case 2:b+="\t";break;case 3:break;case 4:b+="varying ";break;case 5:b+="uniform ";break;default:throw new fb;}switch(f.usage._hx_index){case 0:Mb.info("Missing switch patten: RegisterUsage.UNUSED",{fileName:"openfl/display3D/_internal/AGALConverter.hx",lineNumber:825,className:"openfl.display3D._internal.RegisterMap",methodName:"toGLSL"});break;case 1:b+="vec4 ";break;case 2:b+="mat4 ";break;case 3:b+="sampler2D ";break;case 5:b+="samplerCube ";break;case 7:b+="vec4 "}f.usage==$a.SAMPLER_2D_ALPHA?
(b+="sampler2D ",b+=L.string(f.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=L.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=L.string(f.name+"_alphaEnabled")):f.usage==$a.SAMPLER_CUBE_ALPHA?(b+="samplerCube ",b+=L.string(f.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=L.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=L.string(f.name+"_alphaEnabled")):b=f.usage==$a.VECTOR_4_ARRAY?b+L.string(f.name+"[128]"):b+L.string(f.name);b+=";\n"}}return b},__class__:$s};var Nv=
function(){};r["openfl.display3D._internal._AGALConverter.RegisterMapEntry"]=Nv;Nv.__name__="openfl.display3D._internal._AGALConverter.RegisterMapEntry";Nv.prototype={name:null,number:null,type:null,usage:null,__class__:Nv};var $a=O["openfl.display3D._internal._AGALConverter.RegisterUsage"]={__ename__:"openfl.display3D._internal._AGALConverter.RegisterUsage",__constructs__:null,UNUSED:{_hx_name:"UNUSED",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},VECTOR_4:{_hx_name:"VECTOR_4",
_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},MATRIX_4_4:{_hx_name:"MATRIX_4_4",_hx_index:2,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},SAMPLER_2D:{_hx_name:"SAMPLER_2D",_hx_index:3,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},SAMPLER_2D_ALPHA:{_hx_name:"SAMPLER_2D_ALPHA",_hx_index:4,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},SAMPLER_CUBE:{_hx_name:"SAMPLER_CUBE",
_hx_index:5,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},SAMPLER_CUBE_ALPHA:{_hx_name:"SAMPLER_CUBE_ALPHA",_hx_index:6,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D},VECTOR_4_ARRAY:{_hx_name:"VECTOR_4_ARRAY",_hx_index:7,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:D}};$a.__constructs__=[$a.UNUSED,$a.VECTOR_4,$a.MATRIX_4_4,$a.SAMPLER_2D,$a.SAMPLER_2D_ALPHA,$a.SAMPLER_CUBE,$a.SAMPLER_CUBE_ALPHA,$a.VECTOR_4_ARRAY];
var Vn=function(){};r["openfl.display3D._internal._AGALConverter.SamplerRegister"]=Vn;Vn.__name__="openfl.display3D._internal._AGALConverter.SamplerRegister";Vn.parse=function(a,b){var c=new Vn;c.programType=b;b=60;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.f=b;b=56;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.m=b;b=52;b=b==0?new zb(a.high,a.low):b<
32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.w=b;b=48;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.s=b;b=44;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.d=b;b=40;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.t=b;b=32;b=b==0?new zb(a.high,
a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;c.type=b;b=16;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&255;c.b=b;b=a.low&65535;c.n=b;return c};Vn.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return Og.prefixFromType(this.type,this.programType)+this.n},toSamplerState:function(){switch(this.f){case 0:var a=5;break;
case 1:a=4;break;default:throw new fb;}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new fb;}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new fb;}return new Km(c,a,b,(this.b<<24>>24)/8,(this.s&4)==4,(this.s&1)==1,this.t==2)},__class__:Vn};var Mm=function(){};r["openfl.display3D._internal._AGALConverter.SourceRegister"]=Mm;Mm.__name__="openfl.display3D._internal._AGALConverter.SourceRegister";Mm.parse=function(a,b,c){var d=new Mm;d.programType=
b;b=63;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&1;d.d=b;b=48;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&3;d.q=b;b=40;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&15;d.itype=b;b=32;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=
b.low&15;d.type=b;b=24;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&255;d.s=b;b=16;b=b==0?new zb(a.high,a.low):b<32?new zb(a.high>>b,a.high<<32-b|a.low>>>b):new zb(a.high>>31,a.high>>b-32);b=b.low&255;d.o=b;b=a.low&65535;d.n=b;d.sourceMask=c;return d};Mm.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(a,b){b==null&&(b=0);a==null&&(a=!0);if(this.type==3)return this.programType==
rk.VERTEX?"gl_Position":"gl_FragColor";var c=this.s==228&&this.sourceMask==15,d="";if(this.type!=5&&!c){if((this.sourceMask&1)!=0)switch(this.s&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&2)!=0)switch(this.s>>2&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&4)!=0)switch(this.s>>4&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if((this.sourceMask&8)!=0)switch(this.s>>
6&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}}c=Og.prefixFromType(this.type,this.programType);if(this.d==0)c+=this.n+b;else{c+=this.o;var f="";switch(this.q){case 0:f="x";break;case 1:f="y";break;case 2:f="z";break;case 3:f="w"}f=Og.prefixFromType(this.itype,this.programType)+this.n+"."+f;c+="[ int("+f+") +"+b+"]"}a&&d!=""&&(c+="."+d);return c},__class__:Mm};var Vp=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if(c!="ATF")throw new fb("ATF signature not found");
a.b[b+6]==255?(this.version=a.b[b+7],a.position=b+8,c=this.__readUInt32(a)):(this.version=0,a.position=b+3,c=this.__readUInt24(a));if(ta.gt(u.__cast(b+c,Ft),cc.get_length(a)))throw new fb("ATF length exceeds byte array length");this.data=a};r["openfl.display3D._internal.ATFReader"]=Vp;Vp.__name__="openfl.display3D._internal.ATFReader";Vp.prototype={atfFormat:null,cubeMap:null,data:null,height:null,mipCount:null,version:null,width:null,readHeader:function(a,b,c){var d=this.data.readUnsignedByte(),
f=d>>>7;if(!c&&f!=0)throw new fb("ATF Cube map not expected");if(c&&f!=1)throw new fb("ATF Cube map expected");this.cubeMap=c;this.atfFormat=d&127;this.atfFormat!=3&&this.atfFormat!=5&&Mb.warn("Only ATF block compressed textures without JPEG-XR+LZMA are supported",{fileName:"openfl/display3D/_internal/ATFReader.hx",lineNumber:97,className:"openfl.display3D._internal.ATFReader",methodName:"readHeader"});this.width=1<<this.data.readUnsignedByte();this.height=1<<this.data.readUnsignedByte();if(this.width!=
a||this.height!=b)throw new fb("ATF width and height dont match");this.mipCount=this.data.readUnsignedByte();return this.atfFormat==5},readTextures:function(a){for(var b=this.version<3?3:4,c=0,d=this.cubeMap?6:1;c<d;)for(var f=c++,g=0,h=this.mipCount;g<h;)for(var l=g++,k=0,q=b;k<q;){var w=k++,v=this.version==0?this.__readUInt24(this.data):this.__readUInt32(this.data);if(ta.gt(this.data.position+v,cc.get_length(this.data)))throw new fb("Block length exceeds ATF file length");if(ta.gt(v,0)){var z=new Ia(new ArrayBuffer(v)),
n=this.data,E=cc.fromBytes(z),H=0,J=v;J==null&&(J=0);H==null&&(H=0);n.readBytes(E,H,J);a(f,l,w,this.width>>l,this.height>>l,v,z)}}},__readUInt24:function(a){var b=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__readUInt32:function(a){var b=a.readUnsignedByte()<<24;b|=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__class__:Vp};var Rp=function(){this.backBufferEnableDepthAndStencil=!1;this.blendDestinationAlphaFactor=9;this.blendSourceAlphaFactor=
2;this.blendDestinationRGBFactor=9;this.blendSourceRGBFactor=2;this.colorMaskAlpha=this.colorMaskBlue=this.colorMaskGreen=this.colorMaskRed=!0;this.culling=3;this.depthCompareMode=4;this.depthMask=!0;this.samplerStates=[];this.scissorRectangle=new Ea;this.stencilCompareMode=0;this.stencilPass=this.stencilFail=this.stencilDepthFail=5;this.stencilReadMask=255;this.stencilReferenceValue=0;this.stencilTriangleFace=2;this.stencilWriteMask=255;this.textures=[];this.__frontFaceGLCCW=!0;this.__glBlendEquation=
32774};r["openfl.display3D._internal.Context3DState"]=Rp;Rp.__name__="openfl.display3D._internal.Context3DState";Rp.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,__rttDepthGLRenderbuffer:null,__rttGLFramebuffer:null,__rttGLRenderbuffer:null,__rttStencilGLRenderbuffer:null,__class__:Rp};var gd=function(a){na.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=this.__context.__context;if(gd.__supportsBGRA==null){gd.__textureInternalFormat=b.RGBA;gd.__supportsBGRA=!1;gd.__textureFormat=
b.RGBA;gd.__compressedFormats=new we;gd.__compressedFormatsAlpha=new we;a=b.getExtension("WEBGL_compressed_texture_s3tc");var c=b.getExtension("WEBGL_compressed_texture_etc1");b=b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");if(a!=null){var d=a.COMPRESSED_RGBA_S3TC_DXT1_EXT;gd.__compressedFormats.h[0]=d;d=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;gd.__compressedFormatsAlpha.h[0]=d}c!=null&&(d=c.COMPRESSED_RGB_ETC1_WEBGL,gd.__compressedFormats.h[2]=d,d=c.COMPRESSED_RGB_ETC1_WEBGL,gd.__compressedFormatsAlpha.h[2]=
d);b!=null&&(d=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,gd.__compressedFormats.h[1]=d,d=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,gd.__compressedFormatsAlpha.h[1]=d)}this.__internalFormat=gd.__textureInternalFormat;this.__format=gd.__textureFormat};r["openfl.display3D.textures.TextureBase"]=gd;gd.__name__="openfl.display3D.textures.TextureBase";gd.__super__=na;gd.prototype=I(na.prototype,{__alphaTexture:null,__context:null,__format:null,__glDepthRenderbuffer:null,__glFramebuffer:null,__glStencilRenderbuffer:null,
__height:null,__internalFormat:null,__optimizeForRenderToTexture:null,__samplerState:null,__streamingLevels:null,__textureContext:null,__textureID:null,__textureTarget:null,__width:null,dispose:function(){var a=this.__context.gl;this.__alphaTexture!=null&&(this.__alphaTexture.dispose(),this.__alphaTexture=null);this.__textureID!=null&&(a.deleteTexture(this.__textureID),this.__textureID=null);this.__glFramebuffer!=null&&(a.deleteFramebuffer(this.__glFramebuffer),this.__glFramebuffer=null);this.__glDepthRenderbuffer!=
null&&(a.deleteRenderbuffer(this.__glDepthRenderbuffer),this.__glDepthRenderbuffer=null);this.__glStencilRenderbuffer!=null&&(a.deleteRenderbuffer(this.__glStencilRenderbuffer),this.__glStencilRenderbuffer=null)},__getGLFramebuffer:function(a,b,c){b=this.__context.gl;this.__glFramebuffer==null&&(this.__glFramebuffer=b.createFramebuffer(),this.__context.__bindGLFramebuffer(this.__glFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.__textureID,0),this.__context.__enableErrorChecking&&
(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Mb.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:201,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})));a&&this.__glDepthRenderbuffer==null&&(this.__context.__bindGLFramebuffer(this.__glFramebuffer),Uc.__glDepthStencil!=0?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=
b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,Uc.__glDepthStencil,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer)):(this.__glDepthRenderbuffer=b.createRenderbuffer(),this.__glStencilRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,
this.__width,this.__height),b.bindRenderbuffer(b.RENDERBUFFER,this.__glStencilRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.STENCIL_INDEX8,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glStencilRenderbuffer)),this.__context.__enableErrorChecking&&(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Mb.warn("Error: Context3D.setRenderToTexture status:"+
c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:239,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})),b.bindRenderbuffer(b.RENDERBUFFER,null));return this.__glFramebuffer},__getImage:function(a){var b=a.image;if(!a.__isValid||b==null)return null;kb.sync(b,!1);a=this.__context.gl;b.type==Uf.DATA||b.get_premultiplied()?!b.get_premultiplied()&&b.get_transparent()&&(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
0),b=b.clone(),b.set_premultiplied(!0)):a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);b.get_format()!=0&&(b=b.clone(),b.set_format(0),b.buffer.premultiplied=!0);return b},__getTexture:function(){return this.__textureID},__setSamplerState:function(a){if(!a.equals(this.__samplerState)){var b=this.__context.gl;this.__textureTarget==this.__context.gl.TEXTURE_CUBE_MAP?this.__context.__bindGLTextureCubeMap(this.__textureID):this.__context.__bindGLTexture2D(this.__textureID);var c;switch(a.wrap){case 0:var d=
c=b.CLAMP_TO_EDGE;break;case 1:c=b.CLAMP_TO_EDGE;d=b.REPEAT;break;case 2:d=c=b.REPEAT;break;case 3:c=b.REPEAT;d=b.CLAMP_TO_EDGE;break;default:throw new Ld("wrap bad enum");}var f=a.filter==5?b.NEAREST:b.LINEAR;switch(a.mipfilter){case 0:var g=a.filter==5?b.NEAREST_MIPMAP_LINEAR:b.LINEAR_MIPMAP_LINEAR;break;case 1:g=a.filter==5?b.NEAREST_MIPMAP_NEAREST:b.LINEAR_MIPMAP_NEAREST;break;case 2:g=a.filter==5?b.NEAREST:b.LINEAR;break;default:throw new Ld("mipfiter bad enum");}b.texParameteri(this.__textureTarget,
b.TEXTURE_MIN_FILTER,g);b.texParameteri(this.__textureTarget,b.TEXTURE_MAG_FILTER,f);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_S,c);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_T,d);this.__samplerState==null&&(this.__samplerState=a.clone());this.__samplerState.copyFrom(a);return!0}return!1},__uploadFromImage:function(a){var b=this.__context.gl,c;if(this.__textureTarget==b.TEXTURE_2D){if(a.buffer.bitsPerPixel==1)var d=c=b.ALPHA;else c=gd.__textureInternalFormat,d=gd.__textureFormat;
this.__context.__bindGLTexture2D(this.__textureID);a.type==Uf.DATA||a.get_premultiplied()?!a.get_premultiplied()&&a.get_transparent()&&b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1):b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);a.type==Uf.DATA?pd.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):pd.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:gd});var Tn=function(a,b,c,d,f){gd.call(this,
a);this.__width=this.__height=this.__size=b;this.__optimizeForRenderToTexture=d;this.__streamingLevels=f;this.__textureTarget=this.__context.gl.TEXTURE_CUBE_MAP;this.__uploadedSides=0};r["openfl.display3D.textures.CubeTexture"]=Tn;Tn.__name__="openfl.display3D.textures.CubeTexture";Tn.__super__=gd;Tn.prototype=I(gd.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){c==null&&(c=!1);var d=this;c?rd.delay(function(){d.__uploadCompressedTextureFromByteArray(a,
b);var f=new ka("textureReady");d.dispatchEvent(f)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c,d){c==null&&(c=0);if(a!=null&&(d=this.__size>>c,d!=0&&(a=this.__getImage(a),a!=null)))if(c==0&&a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=null){var f=this.__context.gl;d=this.__size>>c;d!=0&&(d=this.__sideToTarget(b),this.__context.__bindGLTextureCubeMap(this.__textureID),pd.texImage2D(f,d,c,this.__internalFormat,this.__format,f.UNSIGNED_BYTE,a.buffer.get_src()),
this.__context.__bindGLTextureCubeMap(null),this.__uploadedSides|=1<<b)}else this.uploadFromTypedArray(a.get_data(),b,c)},uploadFromByteArray:function(a,b,c,d){d==null&&(d=0);b==0?this.uploadFromTypedArray(a.b,c,d):(a=cc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c,d))},uploadFromTypedArray:function(a,b,c){c==null&&(c=0);if(a!=null){var d=this.__context.gl,f=this.__size>>c;if(f!=0){var g=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);
pd.texImage2D(d,g,c,this.__internalFormat,f,f,0,this.__format,d.UNSIGNED_BYTE,a);this.__context.__bindGLTextureCubeMap(null);this.__uploadedSides|=1<<b}}},__getGLFramebuffer:function(a,b,c){var d=this.__context.gl;this.__glFramebuffer==null&&(this.__glFramebuffer=d.createFramebuffer(),this.__framebufferSurface=-1);if(this.__framebufferSurface!=c&&(this.__framebufferSurface=c,this.__context.__bindGLFramebuffer(this.__glFramebuffer),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+
c,this.__textureID,0),this.__context.__enableErrorChecking)){var f=d.checkFramebufferStatus(d.FRAMEBUFFER);f!=d.FRAMEBUFFER_COMPLETE&&Mb.error("Error: Context3D.setRenderToTexture status:"+f+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/CubeTexture.hx",lineNumber:279,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"})}return gd.prototype.__getGLFramebuffer.call(this,a,b,c)},__setSamplerState:function(a){if(gd.prototype.__setSamplerState.call(this,
a)){var b=this.__context.gl;a.mipfilter==2||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_CUBE_MAP),this.__samplerState.mipmapGenerated=!0);if(Uc.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Uc.__glMaxTextureMaxAnisotropy&&(a=Uc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,Uc.__glTextureMaxAnisotropy,a)}return!0}return!1},__sideToTarget:function(a){var b=this.__context.gl;switch(a){case 0:return b.TEXTURE_CUBE_MAP_POSITIVE_X;
case 1:return b.TEXTURE_CUBE_MAP_NEGATIVE_X;case 2:return b.TEXTURE_CUBE_MAP_POSITIVE_Y;case 3:return b.TEXTURE_CUBE_MAP_NEGATIVE_Y;case 4:return b.TEXTURE_CUBE_MAP_POSITIVE_Z;case 5:return b.TEXTURE_CUBE_MAP_NEGATIVE_Z;default:throw new fb;}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Vp(a,b);var d=a.readHeader(this.__size,this.__size,!0),f=this.__context.gl;this.__context.__bindGLTextureCubeMap(this.__textureID);var g=!1;a.readTextures(function(w,v,z,n,E,H,J){var Q=d?
gd.__compressedFormatsAlpha.h[z]:gd.__compressedFormats.h[z];if(Q!=0)if(g=!0,w=c.__sideToTarget(w),c.__format=Q,c.__internalFormat=Q,d&&z==2){H=H/2|0;var T=z=null,fa=null,da=null,pa=J.b.buffer,xa=0;xa==null&&(xa=0);z=z!=null?new Uint8Array(z):T!=null?new Uint8Array(T):fa!=null?new Uint8Array(fa.__array):da!=null?new Uint8Array(da):pa!=null?H==null?new Uint8Array(pa,xa):new Uint8Array(pa,xa,H):null;pd.compressedTexImage2D(f,w,v,c.__internalFormat,n,E,0,z);var Ua=new Tn(c.__context,c.__size,3,c.__optimizeForRenderToTexture,
c.__streamingLevels);Ua.__format=Q;Ua.__internalFormat=Q;c.__context.__bindGLTextureCubeMap(Ua.__textureID);da=fa=T=z=null;pa=J.b.buffer;xa=H;xa==null&&(xa=0);z=z!=null?new Uint8Array(z):T!=null?new Uint8Array(T):fa!=null?new Uint8Array(fa.__array):da!=null?new Uint8Array(da):pa!=null?H==null?new Uint8Array(pa,xa):new Uint8Array(pa,xa,H):null;pd.compressedTexImage2D(f,w,v,Ua.__internalFormat,n,E,0,z);c.__alphaTexture=Ua}else da=fa=T=z=null,pa=J.b.buffer,xa=0,xa==null&&(xa=0),z=z!=null?new Uint8Array(z):
T!=null?new Uint8Array(T):fa!=null?new Uint8Array(fa.__array):da!=null?new Uint8Array(da):pa!=null?H==null?new Uint8Array(pa,xa):new Uint8Array(pa,xa,H):null,pd.compressedTexImage2D(f,w,v,c.__internalFormat,n,E,0,z)});if(!g){a=this.__size*this.__size*4;var h=b=null,l=null,k=null,q=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(0),
0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=k=l=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(1),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=k=l=h=b=null;a=a!=null?new Uint8Array(a):b!=null?
new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(2),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=k=l=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(3),
0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=k=l=h=b=null;a=a!=null?new Uint8Array(a):b!=null?new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(4),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;q=k=l=h=b=null;a=a!=null?new Uint8Array(a):b!=null?
new Uint8Array(b):h!=null?new Uint8Array(h.__array):l!=null?new Uint8Array(l):k!=null?q==null?new Uint8Array(k,0):new Uint8Array(k,0,q):null;pd.texImage2D(f,this.__sideToTarget(5),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a)}this.__context.__bindGLTextureCubeMap(null)},__class__:Tn});var Sp=function(a,b,c,d,f){gd.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=f;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);
f&&this.__getGLFramebuffer(!0,0,0)};r["openfl.display3D.textures.RectangleTexture"]=Sp;Sp.__name__="openfl.display3D.textures.RectangleTexture";Sp.__super__=gd;Sp.prototype=I(gd.prototype,{uploadFromBitmapData:function(a){if(a!=null&&(a=this.__getImage(a),a!=null))if(a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=null){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);pd.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__format,b.UNSIGNED_BYTE,a.buffer.get_src());
this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data())},uploadFromByteArray:function(a,b){b==0?this.uploadFromTypedArray(a.b):(a=cc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b))},uploadFromTypedArray:function(a){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);pd.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,b.UNSIGNED_BYTE,a);this.__context.__bindGLTexture2D(null)},
__setSamplerState:function(a){if(gd.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if(Uc.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Uc.__glMaxTextureMaxAnisotropy&&(a=Uc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Uc.__glTextureMaxAnisotropy,a)}return!0}return!1},__class__:Sp});var Lm=function(a,b,c,d,f,g){gd.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=
f;this.__streamingLevels=g;a=this.__context.gl;this.__textureTarget=a.TEXTURE_2D;this.__context.__bindGLTexture2D(this.__textureID);pd.texImage2D(a,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,a.UNSIGNED_BYTE,null);this.__context.__bindGLTexture2D(null);f&&this.__getGLFramebuffer(!0,0,0)};r["openfl.display3D.textures.Texture"]=Lm;Lm.__name__="openfl.display3D.textures.Texture";Lm.__super__=gd;Lm.prototype=I(gd.prototype,{uploadCompressedTextureFromByteArray:function(a,
b,c){c==null&&(c=!1);var d=this;c?rd.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var f=new ka("textureReady");d.dispatchEvent(f)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c){b==null&&(b=0);if(a!=null){c=this.__width>>b;var d=this.__height>>b;if(c!=0||d!=0){c==0&&(c=1);d==0&&(d=1);if(a.width!=c||a.height!=d)c=new uc(c,d,!0,0),c.draw(a),a=c;a=this.__getImage(a);if(a!=null)if(b==0&&a.buffer!=null&&a.buffer.data==null&&a.buffer.get_src()!=
null){var f=this.__context.gl;c=this.__width>>b;d=this.__height>>b;if(c!=0||d!=0)this.__context.__bindGLTexture2D(this.__textureID),pd.texImage2D(f,this.__textureTarget,b,this.__internalFormat,this.__format,f.UNSIGNED_BYTE,a.buffer.get_src()),this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data(),b)}}},uploadFromByteArray:function(a,b,c){c==null&&(c=0);b==0?this.uploadFromTypedArray(a.b,c):(a=cc.toArrayBuffer(a),b==null&&(b=0),b=a!=null?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,
c))},uploadFromTypedArray:function(a,b){b==null&&(b=0);if(a!=null){var c=this.__context.gl,d=this.__width>>b,f=this.__height>>b;if(d!=0||f!=0)d==0&&(d=1),f==0&&(f=1),this.__context.__bindGLTexture2D(this.__textureID),pd.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,f,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},__setSamplerState:function(a){if(gd.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;a.mipfilter==2||this.__samplerState.mipmapGenerated||
(b.generateMipmap(b.TEXTURE_2D),this.__samplerState.mipmapGenerated=!0);if(Uc.__glMaxTextureMaxAnisotropy!=0){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Uc.__glMaxTextureMaxAnisotropy&&(a=Uc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Uc.__glTextureMaxAnisotropy,a)}return!0}return!1},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Vp(a,b);var d=a.readHeader(this.__width,this.__height,!1),f=this.__context.gl;
this.__context.__bindGLTexture2D(this.__textureID);var g=!1;a.readTextures(function(h,l,k,q,w,v,z){h=d?gd.__compressedFormatsAlpha.h[k]:gd.__compressedFormats.h[k];if(h!=0)if(g=!0,c.__format=h,c.__internalFormat=h,d&&k==2){v=v/2|0;var n=k=null,E=null,H=null,J=z.b.buffer,Q=0;Q==null&&(Q=0);k=k!=null?new Uint8Array(k):n!=null?new Uint8Array(n):E!=null?new Uint8Array(E.__array):H!=null?new Uint8Array(H):J!=null?v==null?new Uint8Array(J,Q):new Uint8Array(J,Q,v):null;pd.compressedTexImage2D(f,c.__textureTarget,
l,c.__internalFormat,q,w,0,k);var T=new Lm(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);T.__format=h;T.__internalFormat=h;c.__context.__bindGLTexture2D(T.__textureID);H=E=n=k=null;J=z.b.buffer;Q=v;Q==null&&(Q=0);k=k!=null?new Uint8Array(k):n!=null?new Uint8Array(n):E!=null?new Uint8Array(E.__array):H!=null?new Uint8Array(H):J!=null?v==null?new Uint8Array(J,Q):new Uint8Array(J,Q,v):null;pd.compressedTexImage2D(f,T.__textureTarget,l,T.__internalFormat,q,w,0,
k);c.__alphaTexture=T}else H=E=n=k=null,J=z.b.buffer,Q=0,Q==null&&(Q=0),k=k!=null?new Uint8Array(k):n!=null?new Uint8Array(n):E!=null?new Uint8Array(E.__array):H!=null?new Uint8Array(H):J!=null?v==null?new Uint8Array(J,Q):new Uint8Array(J,Q,v):null,pd.compressedTexImage2D(f,c.__textureTarget,l,c.__internalFormat,q,w,0,k)});g||(a=this.__width*this.__height*4,a=a!=null?new Uint8Array(a):null,pd.texImage2D(f,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,f.UNSIGNED_BYTE,
a));this.__context.__bindGLTexture2D(null)},__class__:Lm});var Ys=function(a){gd.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};r["openfl.display3D.textures.VideoTexture"]=Ys;Ys.__name__="openfl.display3D.textures.VideoTexture";Ys.__super__=gd;Ys.prototype=I(gd.prototype,{videoHeight:null,videoWidth:null,__cacheTime:null,__netStream:null,attachNetStream:function(a){var b=this;this.__netStream!=null&&this.__netStream.__video.removeEventListener("canplay",m(this,this.__onCanPlay),!1);
this.__cacheTime=-1;this.__netStream=a;this.__netStream!=null&&(this.__netStream.__video.readyState>=2?rd.delay(function(){b.__textureReady()},0):this.__netStream.__video.addEventListener("canplay",m(this,this.__onCanPlay),!1))},dispose:function(){this.__netStream!=null&&this.__netStream.__video!=null&&this.__netStream.__video.removeEventListener("timeupdate",m(this,this.__onTimeUpdate));gd.prototype.dispose.call(this)},__onCanPlay:function(a){this.__netStream.__video.addEventListener("timeupdate",
m(this,this.__onTimeUpdate));this.__textureReady()},__onTimeUpdate:function(a){this.__netStream!=null&&this.__netStream.__video.currentTime!=this.__cacheTime&&this.__netStream.__video.readyState>=2&&this.__textureReady()},__getTexture:function(){if(this.__netStream.__video.currentTime!=this.__cacheTime&&this.__netStream.__video.readyState>=2){var a=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);pd.texImage2D(a,a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.__netStream.__video);
this.__cacheTime=this.__netStream.__video.currentTime}return this.__textureID},__textureReady:function(){this.videoWidth=this.__netStream.__video.videoWidth;this.videoHeight=this.__netStream.__video.videoHeight;var a=new ka("textureReady");this.dispatchEvent(a)},__class__:Ys});var Ld=function(a,b){b==null&&(b=0);a==null&&(a="");la.call(this,a);this.errorID=b;this.name="Error";this.__skipStack++};r["openfl.errors.Error"]=Ld;Ld.__name__="openfl.errors.Error";Ld.__super__=la;Ld.prototype=I(la.prototype,
{errorID:null,name:null,getStackTrace:function(){return si.toString(si.exceptionStack())},toString:function(){return this.get_message()!=null?this.get_message():"Error"},__class__:Ld});var rb=function(a){a==null&&(a="");Ld.call(this,a);this.name="ArgumentError";this.__skipStack++};r["openfl.errors.ArgumentError"]=rb;rb.__name__="openfl.errors.ArgumentError";rb.__super__=Ld;rb.prototype=I(Ld.prototype,{__class__:rb});var Tl=function(a){a==null&&(a="");Ld.call(this,a);this.name="IOError";this.__skipStack++};
r["openfl.errors.IOError"]=Tl;Tl.__name__="openfl.errors.IOError";Tl.__super__=Ld;Tl.prototype=I(Ld.prototype,{__class__:Tl});var sk=function(a,b){Tl.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030;this.__skipStack++};r["openfl.errors.EOFError"]=sk;sk.__name__="openfl.errors.EOFError";sk.__super__=Tl;sk.prototype=I(Tl.prototype,{__class__:sk});var fb=function(a){a==null&&(a="");Ld.call(this,a,0);this.name="IllegalOperationError";this.__skipStack++};r["openfl.errors.IllegalOperationError"]=
fb;fb.__name__="openfl.errors.IllegalOperationError";fb.__super__=Ld;fb.prototype=I(Ld.prototype,{__class__:fb});var oe=function(a){a==null&&(a="");Ld.call(this,a,0);this.name="RangeError";this.__skipStack++};r["openfl.errors.RangeError"]=oe;oe.__name__="openfl.errors.RangeError";oe.__super__=Ld;oe.prototype=I(Ld.prototype,{__class__:oe});var Qq=function(a){a==null&&(a="");Ld.call(this,a,0);this.name="SecurityError";this.__skipStack++};r["openfl.errors.SecurityError"]=Qq;Qq.__name__="openfl.errors.SecurityError";
Qq.__super__=Ld;Qq.prototype=I(Ld.prototype,{__class__:Qq});var ne=function(a){a==null&&(a="");Ld.call(this,a,0);this.name="TypeError";this.__skipStack++};r["openfl.errors.TypeError"]=ne;ne.__name__="openfl.errors.TypeError";ne.__super__=Ld;ne.prototype=I(Ld.prototype,{__class__:ne});var cl=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.activating=d};r["openfl.events.ActivityEvent"]=cl;cl.__name__="openfl.events.ActivityEvent";cl.__super__=ka;cl.prototype=
I(ka.prototype,{activating:null,clone:function(){var a=new cl(this.type,this.bubbles,this.cancelable,this.activating);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"])},__init:function(){ka.prototype.__init.call(this);this.activating=!1},__class__:cl});var sg=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);
this.text=d};r["openfl.events.TextEvent"]=sg;sg.__name__="openfl.events.TextEvent";sg.__super__=ka;sg.prototype=I(ka.prototype,{text:null,clone:function(){var a=new sg(this.type,this.bubbles,this.cancelable,this.text);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"])},__init:function(){ka.prototype.__init.call(this);this.text=""},__class__:sg});var jg=function(a,
b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);sg.call(this,a,b,c,d);this.errorID=f};r["openfl.events.ErrorEvent"]=jg;jg.__name__="openfl.events.ErrorEvent";jg.__super__=sg;jg.prototype=I(sg.prototype,{errorID:null,clone:function(){var a=new jg(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ErrorEvent",["type","bubbles",
"cancelable","text","errorID"])},__init:function(){sg.prototype.__init.call(this);this.errorID=0},__class__:jg});var Wp=function(a,b,c,d,f){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);jg.call(this,a,b,c);this.text=d;this.error=f};r["openfl.events.AsyncErrorEvent"]=Wp;Wp.__name__="openfl.events.AsyncErrorEvent";Wp.__super__=jg;Wp.prototype=I(jg.prototype,{error:null,clone:function(){var a=new Wp(this.type,this.bubbles,this.cancelable,this.text,this.error);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("AsyncErrorEvent",["type","bubbles","cancelable","text","error"])},__init:function(){jg.prototype.__init.call(this);this.text="";this.error=null},__class__:Wp});var Nm=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);sg.call(this,a,b,c);this.data=d};r["openfl.events.DataEvent"]=Nm;Nm.__name__="openfl.events.DataEvent";Nm.__super__=sg;Nm.prototype=I(sg.prototype,{data:null,clone:function(){var a=
new Nm(this.type,this.bubbles,this.cancelable,this.data);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("DataEvent",["type","bubbles","cancelable","data"])},__init:function(){sg.prototype.__init.call(this);this.data=""},__class__:Nm});var co=function(a){this.active=!1;this.reset(a)};r["openfl.events._EventDispatcher.DispatchIterator"]=co;co.__name__="openfl.events._EventDispatcher.DispatchIterator";co.prototype=
{active:null,index:null,isCopy:null,list:null,copy:function(){this.isCopy||(this.list=this.list.slice(),this.isCopy=!0)},hasNext:function(){return this.index<this.list.length},next:function(){return this.list[this.index++]},remove:function(a,b){if(this.active)if(this.isCopy){b=this.index;for(var c=this.list.length;b<c;){var d=b++;if(this.list[d]==a){this.list.splice(d,1);break}}}else b<this.index&&this.index--},reset:function(a){this.list=a;this.isCopy=!1;this.index=0},start:function(){this.active=
!0},stop:function(){this.active=!1},__class__:co};var Ql=function(a,b,c,d){d&&Ql.supportsWeakReference?this.weakRefCallback=new WeakRef(a):this.callback=a;this.useCapture=b;this.priority=c;this.useWeakReference=d};r["openfl.events._EventDispatcher.Listener"]=Ql;Ql.__name__="openfl.events._EventDispatcher.Listener";Ql.prototype={callback:null,weakRefCallback:null,priority:null,useCapture:null,useWeakReference:null,match:function(a,b){var c=this.callback;return this.weakRefCallback!=null&&(c=this.weakRefCallback.deref(),
c==null)?!1:c==a?this.useCapture==b:!1},__class__:Ql};var hj=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=!1);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.keyCode=g;this.shiftKey=f;this.relatedObject=d};r["openfl.events.FocusEvent"]=hj;hj.__name__="openfl.events.FocusEvent";hj.__super__=ka;hj.prototype=I(ka.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new hj(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);a.target=
this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FocusEvent","type bubbles cancelable relatedObject shiftKey keyCode".split(" "))},__init:function(){ka.prototype.__init.call(this);this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:hj});var nj=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);cl.call(this,a,b,c);this.fullScreen=d;this.interactive=f};r["openfl.events.FullScreenEvent"]=
nj;nj.__name__="openfl.events.FullScreenEvent";nj.__super__=cl;nj.prototype=I(cl.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new nj(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"])},__init:function(){cl.prototype.__init.call(this);this.interactive=
this.fullScreen=!1},__class__:nj});var tk=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!0);ka.call(this,a,b,c);this.device=d};r["openfl.events.GameInputEvent"]=tk;tk.__name__="openfl.events.GameInputEvent";tk.__super__=ka;tk.prototype=I(ka.prototype,{device:null,clone:function(){var a=new tk(this.type,this.bubbles,this.cancelable,this.device);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("GameInputEvent",
["type","bubbles","cancelable","device"])},__init:function(){ka.prototype.__init.call(this);this.bubbles=!0;this.device=null},__class__:tk});var Ml=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);this.responseHeaders=[];this.status=d;this.redirected=f;ka.call(this,a,b,c)};r["openfl.events.HTTPStatusEvent"]=Ml;Ml.__name__="openfl.events.HTTPStatusEvent";Ml.__super__=ka;Ml.prototype=I(ka.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,
clone:function(){var a=new Ml(this.type,this.bubbles,this.cancelable,this.status,this.redirected);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"])},__init:function(){ka.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:Ml});var Eh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!0);
jg.call(this,a,b,c,d,f)};r["openfl.events.IOErrorEvent"]=Eh;Eh.__name__="openfl.events.IOErrorEvent";Eh.__super__=jg;Eh.prototype=I(jg.prototype,{clone:function(){var a=new Eh(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:Eh});var wm=function(a,b,c,d,f,g,h,l,k,q,w){w==
null&&(w=!1);q==null&&(q=!1);k==null&&(k=!1);l==null&&(l=!1);h==null&&(h=!1);f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.charCode=d;this.keyCode=f;this.keyLocation=g!=null?g:0;this.ctrlKey=h;this.altKey=l;this.shiftKey=k;this.controlKey=q;this.commandKey=w;this.__updateAfterEventFlag=!1};r["openfl.events.KeyboardEvent"]=wm;wm.__name__="openfl.events.KeyboardEvent";wm.__super__=ka;wm.prototype=I(ka.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,
ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__updateAfterEventFlag:null,clone:function(){var a=new wm(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("KeyboardEvent","type bubbles cancelable charCode keyCode keyLocation ctrlKey altKey shiftKey".split(" "))},
updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){ka.prototype.__init.call(this);this.keyLocation=this.keyCode=this.charCode=0;this.__updateAfterEventFlag=this.commandKey=this.controlKey=this.shiftKey=this.altKey=this.ctrlKey=!1},__class__:wm});var Bc=function(a,b,c,d,f,g,h,l,k,q,w,v,z,n){n==null&&(n=0);z==null&&(z=!1);v==null&&(v=!1);w==null&&(w=0);q==null&&(q=!1);k==null&&(k=!1);l==null&&(l=!1);h==null&&(h=!1);f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=
!0);ka.call(this,a,b,c);this.shiftKey=k;this.altKey=l;this.ctrlKey=h;this.bubbles=b;this.relatedObject=g;this.delta=w;this.localX=d;this.localY=f;this.buttonDown=q;this.commandKey=v;this.controlKey=z;this.clickCount=n;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};r["openfl.events.MouseEvent"]=Bc;Bc.__name__="openfl.events.MouseEvent";Bc.__create=function(a,b,c,d,f,g,h,l){l==null&&(l=0);a=new Bc(a,!0,!1,g.x,g.y,null,Bc.__ctrlKey,Bc.__altKey,Bc.__shiftKey,
Bc.__buttonDown,l,Bc.__commandKey,Bc.__controlKey,c);a.stageX=d;a.stageY=f;a.target=h;return a};Bc.__super__=ka;Bc.prototype=I(ka.prototype,{altKey:null,buttonDown:null,commandKey:null,controlKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,__updateAfterEventFlag:null,clone:function(){var a=new Bc(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,
this.altKey,this.shiftKey,this.buttonDown,this.delta,this.commandKey,this.controlKey,this.clickCount);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("MouseEvent","type bubbles cancelable localX localY relatedObject ctrlKey altKey shiftKey buttonDown delta".split(" "))},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){ka.prototype.__init.call(this);this.bubbles=!0;this.ctrlKey=
this.altKey=this.shiftKey=!1;this.relatedObject=null;this.localY=this.localX=this.delta=0;this.controlKey=this.commandKey=this.buttonDown=!1;this.clickCount=0;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1},__class__:Bc});var Om=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!1);this.info=d;ka.call(this,a,b,c)};r["openfl.events.NetStatusEvent"]=Om;Om.__name__="openfl.events.NetStatusEvent";Om.__super__=ka;Om.prototype=I(ka.prototype,{info:null,clone:function(){var a=
new Om(this.type,this.bubbles,this.cancelable,this.info);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"])},__init:function(){ka.prototype.__init.call(this);this.info=null},__class__:Om});var kh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=f};r["openfl.events.ProgressEvent"]=
kh;kh.__name__="openfl.events.ProgressEvent";kh.__super__=ka;kh.prototype=I(ka.prototype,{bytesLoaded:null,bytesTotal:null,clone:function(){var a=new kh(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"])},__init:function(){ka.prototype.__init.call(this);this.bytesTotal=
this.bytesLoaded=0},__class__:kh});var Mj=function(a,b,c,d,f,g){g==null&&(g=!0);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=f;this.allowSmoothing=g};r["openfl.events.RenderEvent"]=Mj;Mj.__name__="openfl.events.RenderEvent";Mj.__super__=ka;Mj.prototype=I(ka.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,clone:function(){var a=new Mj(this.type,this.bubbles,this.cancelable,this.objectMatrix.clone(),this.objectColorTransform.__clone(),
this.allowSmoothing);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("RenderEvent",["type","bubbles","cancelable"])},__init:function(){ka.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:Mj});var Wn=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.data=new Pc(0);this.data.__endian=1;this.position=0};
r["openfl.events.SampleDataEvent"]=Wn;Wn.__name__="openfl.events.SampleDataEvent";Wn.__super__=ka;Wn.prototype=I(ka.prototype,{data:null,position:null,tempBuffer:null,leftChannel:null,rightChannel:null,clone:function(){var a=new Wn(this.type,this.bubbles,this.cancelable);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;a.data=this.data;a.position=this.position;return a},toString:function(){return this.__formatToString("SampleDataEvent",["type","bubbles","cancelable"])},
__init:function(){ka.prototype.__init.call(this);this.data=new Pc(0);this.data.__endian=1;this.position=0},getBufferSize:function(){var a=ta.toFloat(cc.get_length(this.data))/ta.toFloat(4)/2|0;if(a>0){if(a!=0&&(a&a-1)==0&&a>=2048&&a<=8192)return this.tempBuffer=new Float32Array(a*2),a;throw new Ld("To be consistent with flash the listener function registered to SampleDataEvent has to provide 2048, 4096 or 8192 samples if targeting HTML5.");}return 0},getSamples:function(a){this.data.position=0;this.tempBuffer=
ox.fromBytes(cc.toBytes(this.data));this.leftChannel=a.outputBuffer.getChannelData(0);this.rightChannel=a.outputBuffer.getChannelData(1);for(var b=a=0,c=ta.toFloat(cc.get_length(this.data))/ta.toFloat(2)|0;b<c;){var d=b++;this.leftChannel[d]=this.tempBuffer[a++];this.rightChannel[d]=this.tempBuffer[a++]}},__class__:Wn});var dm=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);jg.call(this,a,b,c,d,f)};r["openfl.events.SecurityErrorEvent"]=dm;dm.__name__="openfl.events.SecurityErrorEvent";
dm.__super__=jg;dm.prototype=I(jg.prototype,{clone:function(){var a=new dm(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:dm});var xm=function(a,b,c,d,f){f==null&&(f=3);d==null&&(d=3);c==null&&(c=!1);b==null&&(b=!1);ka.call(this,a,b,c);this.beforeOrientation=
d;this.afterOrientation=f};r["openfl.events.StageOrientationEvent"]=xm;xm.__name__="openfl.events.StageOrientationEvent";xm.__super__=ka;xm.prototype=I(ka.prototype,{beforeOrientation:null,afterOrientation:null,clone:function(){var a=new xm(this.type,this.bubbles,this.cancelable,this.beforeOrientation,this.afterOrientation);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("StageOrientationEvent",["type",
"bubbles","cancelable","beforeOrientation","afterOrientation"])},__class__:xm});var Ef=function(a,b,c,d,f,g,h,l,k,q,w,v,z,n,E,H,J,Q,T,fa){H==null&&(H=!1);E==null&&(E=!1);n==null&&(n=!1);z==null&&(z=!1);v==null&&(v=!1);q==null&&(q=0);k==null&&(k=0);l==null&&(l=0);h==null&&(h=0);g==null&&(g=0);f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!0);ka.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=f;this.localX=g;this.localY=h;this.sizeX=l;this.sizeY=k;this.pressure=q;this.relatedObject=
w;this.ctrlKey=v;this.altKey=z;this.shiftKey=n;this.commandKey=E;this.controlKey=H;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};r["openfl.events.TouchEvent"]=Ef;Ef.__name__="openfl.events.TouchEvent";Ef.__create=function(a,b,c,d,f,g){a=new Ef(a,!0,!1,0,!0,f.x,f.y,1,1,1);a.stageX=c;a.stageY=d;a.target=g;return a};Ef.__super__=ka;Ef.prototype=I(ka.prototype,{altKey:null,commandKey:null,controlKey:null,ctrlKey:null,delta:null,isPrimaryTouchPoint:null,localX:null,localY:null,pressure:null,
relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,__updateAfterEventFlag:null,clone:function(){var a=new Ef(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TouchEvent",
"type bubbles cancelable touchPointID isPrimaryTouchPoint localX localY sizeX sizeY pressure relatedObject ctrlKey altKey shiftKey commandKey controlKey".split(" "))},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){ka.prototype.__init.call(this);this.bubbles=!0;this.touchPointID=0;this.isPrimaryTouchPoint=!1;this.pressure=this.sizeY=this.sizeX=this.localY=this.localX=0;this.relatedObject=null;this.controlKey=this.commandKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.stageY=
this.stageX=NaN;this.__updateAfterEventFlag=!1},__class__:Ef});var dl=function(a,b,c,d){c==null&&(c=!0);b==null&&(b=!0);jg.call(this,a,b,c);this.error=d};r["openfl.events.UncaughtErrorEvent"]=dl;dl.__name__="openfl.events.UncaughtErrorEvent";dl.__super__=jg;dl.prototype=I(jg.prototype,{error:null,clone:function(){var a=new dl(this.type,this.bubbles,this.cancelable,this.error);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("UncaughtErrorEvent",
["type","bubbles","cancelable","error"])},__init:function(){jg.prototype.__init.call(this);this.cancelable=this.bubbles=!0;this.error=null},__class__:dl});var Gs=function(){this.__enabled=!0;na.call(this)};r["openfl.events.UncaughtErrorEvents"]=Gs;Gs.__name__="openfl.events.UncaughtErrorEvents";Gs.__super__=na;Gs.prototype=I(na.prototype,{__enabled:null,addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);na.prototype.addEventListener.call(this,a,b,c,d,f);Object.prototype.hasOwnProperty.call(this.__eventMap.h,
"uncaughtError")&&(this.__enabled=!0)},removeEventListener:function(a,b,c){c==null&&(c=!1);na.prototype.removeEventListener.call(this,a,b,c);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")||(this.__enabled=!1)},__class__:Gs});var Xn=function(){};r["openfl.external.ExternalInterface"]=Xn;Xn.__name__="openfl.external.ExternalInterface";Xn.__properties__={get_objectID:"get_objectID"};Xn.addCallback=function(a,b){fd.application.__window.element!=null&&(fd.application.__window.element[a]=
b)};Xn.call=function(a,b,c,d,f,g){if(!(new sb("^\\(.+\\)$","")).match(a)){var h=a.split(".").slice(0,-1).join(".");h.length>0&&(a+=".bind("+h+")")}try{var l=eval(a)}catch(k){return Rb.lastError=k,null}return Aa.typeof(l)!=nb.TFunction?null:b==null?l():c==null?l(b):d==null?l(b,c):f==null?l(b,c,d):g==null?l(b,c,d,f):l(b,c,d,f,g)};Xn.get_objectID=function(){return fd.application!=null&&fd.application.__window!=null&&fd.application.__window.element!=null?fd.application.__window.element.id:null};var Vh=
function(){this.__leftExtension=this.__bottomExtension=0;this.__needSecondBitmapData=!0;this.__numShaderPasses=0;this.__preserveObject=!1;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=!0};r["openfl.filters.BitmapFilter"]=Vh;Vh.__name__="openfl.filters.BitmapFilter";Vh.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,__shaderBlendMode:null,
__smooth:null,__topExtension:null,clone:function(){return new Vh},__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:Vh};var Be=function(a){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}");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}");Hh.call(this,a);this.__isGenerated=!0;this.__initGL()};r["openfl.filters.BitmapFilterShader"]=Be;Be.__name__="openfl.filters.BitmapFilterShader";Be.__super__=Hh;Be.prototype=
I(Hh.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Be});var at=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\n\t\tvarying vec2 vBlurCoords[7];\n\n\t\tvoid main(void) {\n\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\n\t\t\tgl_FragColor = sum;\n\n\t\t}");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r;\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;\n\n\t\t}");
Be.call(this);this.uRadius.value=[0,0];this.__isGenerated=!0;this.__initGL()};r["openfl.filters._BlurFilter.BlurShader"]=at;at.__name__="openfl.filters._BlurFilter.BlurShader";at.__super__=Be;at.prototype=I(Be.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];Be.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:at});var Ui=function(a,b,c){c==null&&(c=1);b==null&&(b=4);a==null&&(a=4);Vh.call(this);this.set_blurX(a);
this.set_blurY(b);this.set_quality(c);this.__needSecondBitmapData=!0;this.__preserveObject=!1;this.__renderDirty=!0};r["openfl.filters.BlurFilter"]=Ui;Ui.__name__="openfl.filters.BlurFilter";Ui.__super__=Vh;Ui.prototype=I(Vh.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,clone:function(){return new Ui(this.__blurX,this.__blurY,this.__quality)},__applyFilter:function(a,b,c,d){(new Date).getTime();c=Lb.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),
d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);(new Date).getTime();return c==a.image?a:b},__initShader:function(a,b,c){b<this.__horizontalPasses?(a=Math.pow(.5,b>>1),Ui.__blurShader.uRadius.value[0]=this.get_blurX()*a,Ui.__blurShader.uRadius.value[1]=0):(a=Math.pow(.5,b-this.__horizontalPasses>>1),Ui.__blurShader.uRadius.value[0]=0,Ui.__blurShader.uRadius.value[1]=this.get_blurY()*a);return Ui.__blurShader},__padFor:function(a){return a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:
1)*3)|0)+2},get_blurX:function(){return this.__blurX},set_blurX:function(a){if(a!=this.__blurX){this.__blurX=a;this.__renderDirty=!0;var b;this.__rightExtension=this.__leftExtension=b=a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:1)*3)|0)+2}return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){if(a!=this.__blurY){this.__blurY=a;this.__renderDirty=!0;var b;this.__bottomExtension=this.__topExtension=b=a<=0?0:(Math.ceil(a*(this.__quality>0?this.__quality:1)*3)|0)+2}return a},
get_quality:function(){return this.__quality},set_quality:function(a){this.__horizontalPasses=this.__blurX<=0?0:Math.round(a/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(a/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;a!=this.__quality&&(this.__renderDirty=!0);this.__quality=a;this.set_blurX(this.__blurX);this.set_blurY(this.__blurY);return this.__quality},__class__:Ui,__properties__:{set_quality:"set_quality",get_quality:"get_quality",
set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX"}});var bt=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_FragColor = texture2D(openfl_Texture, textureCoords.zw);\n\t\t}\n\t");this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");
Be.call(this);this.offset.value=[0,0];this.__isGenerated=!0;this.__initGL()};r["openfl.filters._DropShadowFilter.HideShader"]=bt;bt.__name__="openfl.filters._DropShadowFilter.HideShader";bt.__super__=Be;bt.prototype=I(Be.prototype,{offset:null,sourceBitmap:null,__class__:bt});var il=function(a,b,c,d,f,g,h,l,k,q,w){w==null&&(w=!1);q==null&&(q=!1);k==null&&(k=!1);l==null&&(l=1);h==null&&(h=1);g==null&&(g=4);f==null&&(f=4);d==null&&(d=1);c==null&&(c=0);b==null&&(b=45);a==null&&(a=4);Vh.call(this);this.__offsetY=
this.__offsetX=0;this.__distance=a;this.__angle=b;this.__color=c;this.__alpha=d;this.__blurX=f;this.__blurY=g;this.__strength=h;this.__quality=l;this.__inner=k;this.__knockout=q;this.__hideObject=w;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};r["openfl.filters.DropShadowFilter"]=il;il.__name__="openfl.filters.DropShadowFilter";il.__super__=Vh;il.prototype=I(Vh.prototype,{__alpha:null,__angle:null,__blurX:null,__blurY:null,__color:null,__distance:null,
__hideObject:null,__horizontalPasses:null,__inner:null,__knockout:null,__offsetX:null,__offsetY:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new il(this.__distance,this.__angle,this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout,this.__hideObject)},__applyFilter:function(a,b,c,d){var f=this.__color>>16&255,g=this.__color>>8&255,h=this.__color&255;d=new Qa(d.x+this.__offsetX,d.y+this.__offsetY);c=Lb.gaussianBlur(a.image,
b.image,c.__toLimeRectangle(),d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new ca(0,0,0,this.__alpha,f,g,h,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&b==0)return Zd.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=Zd.__blurAlphaShader;a<this.__horizontalPasses?(c=Math.pow(.5,a>>1)*.5,d.uRadius.value[0]=this.get_blurX()*c,d.uRadius.value[1]=
0):(c=Math.pow(.5,a-this.__horizontalPasses>>1)*.5,d.uRadius.value[0]=0,d.uRadius.value[1]=this.get_blurY()*c);d.uColor.value[0]=(this.get_color()>>16&255)/255;d.uColor.value[1]=(this.get_color()>>8&255)/255;d.uColor.value[2]=(this.get_color()&255)/255;d.uColor.value[3]=this.get_alpha();d.uStrength.value[0]=a==b-1?this.__strength:1;return d}if(this.__inner){if(this.__knockout||this.__hideObject)return d=Zd.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=
this.__offsetY,d;d=Zd.__innerCombineShader}else{if(this.__knockout)return d=Zd.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;if(this.__hideObject)return d=il.__hideShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;d=Zd.__combineShader}d.sourceBitmap.input=c;d.offset.value[0]=this.__offsetX;d.offset.value[1]=this.__offsetY;return d},__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);this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=
this.__blurX<=0?0:Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_angle:function(){return this.__angle},set_angle:function(a){a!=this.__angle&&(this.__angle=a,this.__renderDirty=!0,this.__updateSize());
return a},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_distance:function(){return this.__distance},set_distance:function(a){a!=
this.__distance&&(this.__distance=a,this.__renderDirty=!0,this.__updateSize());return a},get_hideObject:function(){return this.__hideObject},set_hideObject:function(a){a!=this.__hideObject&&(this.__renderDirty=!0);return this.__hideObject=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=this.__inner&&(this.__renderDirty=!0);return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=!0);return this.__knockout=
a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0);return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=a},__class__:il,__properties__:{set_strength:"set_strength",get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_inner",
set_hideObject:"set_hideObject",get_hideObject:"get_hideObject",set_distance:"set_distance",get_distance:"get_distance",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_angle:"set_angle",get_angle:"get_angle",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var ct=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec4 uColor;\n\t\tuniform float uStrength;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void)\n\t\t{\n            vec4 texel = texture2D(openfl_Texture, vTexCoord);\n\n            vec3 contributions = vec3(0.00443, 0.05399, 0.24197);\n            vec3 top = vec3(\n                texture2D(openfl_Texture, vBlurCoords[0]).a,\n                texture2D(openfl_Texture, vBlurCoords[1]).a,\n                texture2D(openfl_Texture, vBlurCoords[2]).a\n            );\n            vec3 bottom = vec3(\n                texture2D(openfl_Texture, vBlurCoords[3]).a,\n                texture2D(openfl_Texture, vBlurCoords[4]).a,\n                texture2D(openfl_Texture, vBlurCoords[5]).a\n            );\n\n            float a = texel.a * 0.39894;\n\t\t\ta += dot(top, contributions.xyz);\n            a += dot(bottom, contributions.zyx);\n\n\t\t\tgl_FragColor = uColor * clamp(a * uStrength, 0.0, 1.0);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\n\t\t\tvec3 offset = vec3(0.5, 0.75, 1.0);\n\t\t\tvec2 r = uRadius / openfl_TextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * offset.z;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * offset.y;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * offset.x;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord + r * offset.x;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * offset.y;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * offset.z;\n\t\t}\n\t");
Be.call(this);this.uRadius.value=[0,0];this.uColor.value=[0,0,0,0];this.uStrength.value=[1];this.__isGenerated=!0;this.__initGL()};r["openfl.filters._GlowFilter.BlurAlphaShader"]=ct;ct.__name__="openfl.filters._GlowFilter.BlurAlphaShader";ct.__super__=Be;ct.prototype=I(Be.prototype,{uRadius:null,uColor:null,uStrength:null,__class__:ct});var dt=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = glow * (1.0 - src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Be.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};r["openfl.filters._GlowFilter.CombineKnockoutShader"]=dt;dt.__name__="openfl.filters._GlowFilter.CombineKnockoutShader";dt.__super__=Be;dt.prototype=I(Be.prototype,{offset:null,sourceBitmap:null,__class__:dt});var et=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = src + glow * (1.0 - src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Be.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};r["openfl.filters._GlowFilter.CombineShader"]=et;et.__name__="openfl.filters._GlowFilter.CombineShader";et.__super__=Be;et.prototype=I(Be.prototype,{offset:null,sourceBitmap:null,__class__:et});var ft=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = glow * src.a;\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Be.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};r["openfl.filters._GlowFilter.InnerCombineKnockoutShader"]=ft;ft.__name__="openfl.filters._GlowFilter.InnerCombineKnockoutShader";ft.__super__=Be;ft.prototype=I(Be.prototype,{offset:null,sourceBitmap:null,__class__:ft});var gt=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw);\n\n\t\t\tgl_FragColor = vec4((src.rgb * (1.0 - glow.a)) + (glow.rgb * src.a), src.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Be.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};r["openfl.filters._GlowFilter.InnerCombineShader"]=gt;gt.__name__="openfl.filters._GlowFilter.InnerCombineShader";gt.__super__=Be;gt.prototype=I(Be.prototype,{offset:null,sourceBitmap:null,__class__:gt});var ht=function(){this.__glFragmentSource==null&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tvec4 texel = texture2D(openfl_Texture, vTexCoord);\n\t\t\tgl_FragColor = vec4(texel.rgb, 1.0 - texel.a);\n\t\t}\n\t");
this.__glVertexSource==null&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\t\t}\n\t");Be.call(this);this.__isGenerated=!0;this.__initGL()};r["openfl.filters._GlowFilter.InvertAlphaShader"]=ht;ht.__name__="openfl.filters._GlowFilter.InvertAlphaShader";ht.__super__=
Be;ht.prototype=I(Be.prototype,{__class__:ht});var Zd=function(a,b,c,d,f,g,h,l){l==null&&(l=!1);h==null&&(h=!1);g==null&&(g=1);f==null&&(f=2);d==null&&(d=6);c==null&&(c=6);b==null&&(b=1);a==null&&(a=16711680);Vh.call(this);this.__color=a;this.__alpha=b;this.__blurX=c;this.__blurY=d;this.__strength=f;this.__inner=h;this.__knockout=l;this.__quality=g;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};r["openfl.filters.GlowFilter"]=Zd;Zd.__name__="openfl.filters.GlowFilter";
Zd.__super__=Vh;Zd.prototype=I(Vh.prototype,{__alpha:null,__blurX:null,__blurY:null,__color:null,__horizontalPasses:null,__inner:null,__knockout:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new Zd(this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout)},__applyFilter:function(a,b,c,d){var f=this.__color>>16&255,g=this.__color>>8&255,h=this.__color&255;c=Lb.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),
d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new ca(0,0,0,this.__alpha,f,g,h,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&b==0)return Zd.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=Zd.__blurAlphaShader;a<this.__horizontalPasses?(c=Math.pow(.5,a>>1)*.5,d.uRadius.value[0]=this.get_blurX()*c,d.uRadius.value[1]=0):(c=Math.pow(.5,
a-this.__horizontalPasses>>1)*.5,d.uRadius.value[0]=0,d.uRadius.value[1]=this.get_blurY()*c);d.uColor.value[0]=(this.get_color()>>16&255)/255;d.uColor.value[1]=(this.get_color()>>8&255)/255;d.uColor.value[2]=(this.get_color()&255)/255;d.uColor.value[3]=this.get_alpha();d.uStrength.value[0]=a==b-1?this.__strength:1;return d}if(this.__inner){if(this.__knockout)return d=Zd.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=Zd.__innerCombineShader}else{if(this.__knockout)return d=
Zd.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=Zd.__combineShader}d.sourceBitmap.input=c;d.offset.value[0]=0;d.offset.value[1]=0;return d},__updateSize:function(){this.__rightExtension=this.__leftExtension=this.__blurX>0?Math.ceil(this.__blurX*1.5):0;this.__bottomExtension=this.__topExtension=this.__blurY>0?Math.ceil(this.__blurY*1.5):0;this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=this.__blurX<=0?0:
Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=this.__blurY<=0?0:Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},
set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=this.__inner&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=
!0,this.__calculateNumShaderPasses());return this.__knockout=a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=a},__class__:Zd,__properties__:{set_strength:"set_strength",get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",
set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_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 pf=function(a){this.blendMode=10;Vh.call(this);this.shader=a;this.__numShaderPasses=1};r["openfl.filters.ShaderFilter"]=pf;pf.__name__="openfl.filters.ShaderFilter";pf.__super__=Vh;pf.prototype=I(Vh.prototype,{blendMode:null,
shader:null,clone:function(){var a=new pf(this.shader);a.set_bottomExtension(this.get_bottomExtension());a.set_leftExtension(this.get_leftExtension());a.set_rightExtension(this.get_rightExtension());a.set_topExtension(this.get_topExtension());a.blendMode=this.blendMode;return a},invalidate:function(){this.__renderDirty=!0},get_topExtension:function(){return this.__topExtension},set_topExtension:function(a){return this.__topExtension=a},get_bottomExtension:function(){return this.__bottomExtension},
set_bottomExtension:function(a){return this.__bottomExtension=a},get_leftExtension:function(){return this.__leftExtension},set_leftExtension:function(a){return this.__leftExtension=a},get_rightExtension:function(){return this.__rightExtension},set_rightExtension:function(a){return this.__rightExtension=a},__initShader:function(a,b,c){this.__shaderBlendMode=this.blendMode;return this.shader},__class__:pf,__properties__:{set_topExtension:"set_topExtension",get_topExtension:"get_topExtension",set_rightExtension:"set_rightExtension",
get_rightExtension:"get_rightExtension",set_leftExtension:"set_leftExtension",get_leftExtension:"get_leftExtension",set_bottomExtension:"set_bottomExtension",get_bottomExtension:"get_bottomExtension"}});var lf=function(a){a!=null&&a.get_length()==16?this.rawData=a.concat(null):this.rawData=gb.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};r["openfl.geom.Matrix3D"]=lf;lf.__name__="openfl.geom.Matrix3D";lf.create2D=function(a,b,c,d){d==null&&(d=0);c==null&&(c=1);var f=d*Math.PI/180;
d=Math.cos(f);f=Math.sin(f);return new lf(gb.toFloatVector(null,null,null,[d*c,-f*c,0,0,f*c,d*c,0,0,0,0,1,0,a,b,0,1]))};lf.createABCD=function(a,b,c,d,f,g){return new lf(gb.toFloatVector(null,null,null,[a,b,0,0,c,d,0,0,0,0,1,0,f,g,0,1]))};lf.createOrtho=function(a,b,c,d,f,g){var h=1/(b-a),l=1/(d-c),k=1/(g-f);return new lf(gb.toFloatVector(null,null,null,[2*h,0,0,0,0,2*l,0,0,0,0,-2*k,0,-(a+b)*h,-(c+d)*l,-(f+g)*k,1]))};lf.interpolate=function(a,b,c){for(var d=new lf,f=0;f<16;){var g=f++;d.rawData.set(g,
a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};lf.interpolateToOutput=function(a,b,c,d){d==null&&(d=new lf);for(var f=0;f<16;){var g=f++;d.rawData.set(g,a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};lf.__getAxisRotation=function(a,b,c,d){var f=new lf;a=new Pd(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;f.rawData.set(0,c+a.x*a.x*b);f.rawData.set(5,c+a.y*a.y*b);f.rawData.set(10,c+a.z*a.z*b);c=a.x*a.y*b;var g=a.z*d;f.rawData.set(4,c+g);f.rawData.set(1,
c-g);c=a.x*a.z*b;g=a.y*d;f.rawData.set(8,c-g);f.rawData.set(2,c+g);c=a.y*a.z*b;g=a.x*d;f.rawData.set(9,c+g);f.rawData.set(6,c-g);return f};lf.prototype={rawData:null,append:function(a){var b=this.rawData.get(0),c=this.rawData.get(4),d=this.rawData.get(8),f=this.rawData.get(12),g=this.rawData.get(1),h=this.rawData.get(5),l=this.rawData.get(9),k=this.rawData.get(13),q=this.rawData.get(2),w=this.rawData.get(6),v=this.rawData.get(10),z=this.rawData.get(14),n=this.rawData.get(3),E=this.rawData.get(7),
H=this.rawData.get(11),J=this.rawData.get(15),Q=a.rawData.get(0),T=a.rawData.get(4),fa=a.rawData.get(8),da=a.rawData.get(12),pa=a.rawData.get(1),xa=a.rawData.get(5),Ua=a.rawData.get(9),Sa=a.rawData.get(13),Ka=a.rawData.get(2),hb=a.rawData.get(6),Ra=a.rawData.get(10),Jb=a.rawData.get(14),vb=a.rawData.get(3),Cb=a.rawData.get(7),pc=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*Q+g*T+q*fa+n*da);this.rawData.set(1,b*pa+g*xa+q*Ua+n*Sa);this.rawData.set(2,b*Ka+g*hb+q*Ra+n*Jb);this.rawData.set(3,
b*vb+g*Cb+q*pc+n*a);this.rawData.set(4,c*Q+h*T+w*fa+E*da);this.rawData.set(5,c*pa+h*xa+w*Ua+E*Sa);this.rawData.set(6,c*Ka+h*hb+w*Ra+E*Jb);this.rawData.set(7,c*vb+h*Cb+w*pc+E*a);this.rawData.set(8,d*Q+l*T+v*fa+H*da);this.rawData.set(9,d*pa+l*xa+v*Ua+H*Sa);this.rawData.set(10,d*Ka+l*hb+v*Ra+H*Jb);this.rawData.set(11,d*vb+l*Cb+v*pc+H*a);this.rawData.set(12,f*Q+k*T+z*fa+J*da);this.rawData.set(13,f*pa+k*xa+z*Ua+J*Sa);this.rawData.set(14,f*Ka+k*hb+z*Ra+J*Jb);this.rawData.set(15,f*vb+k*Cb+z*pc+J*a)},appendRotation:function(a,
b,c){var d=0,f=d,g=f;c!=null&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var h=b.x,l=b.y;b=b.z;var k=h*h,q=l*l,w=b*b,v=k+q+w;if(v!=0){var z=Math.sqrt(v);h/=z;l/=z;b/=z;k/=v;q/=v;w/=v}v=1-a;z=new lf;var n=z.rawData;n.set(0,k+(q+w)*a);n.set(1,h*l*v+b*c);n.set(2,h*b*v-l*c);n.set(4,h*l*v-b*c);n.set(5,q+(k+w)*a);n.set(6,l*b*v+h*c);n.set(8,h*b*v+l*c);n.set(9,l*b*v-h*c);n.set(10,w+(k+q)*a);n.set(12,(g*(q+w)-h*(f*l+d*b))*v+(f*b-d*l)*c);n.set(13,(f*(k+w)-l*(g*h+d*b))*v+(d*h-g*b)*c);n.set(14,
(d*(k+q)-b*(g*h+f*l))*v+(g*l-f*h)*c);this.append(z)},appendScale:function(a,b,c){this.append(new lf(gb.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},appendTranslation:function(a,b,c){var d=this.rawData;d.set(12,d.get(12)+a);d=this.rawData;d.set(13,d.get(13)+b);d=this.rawData;d.set(14,d.get(14)+c)},clone:function(){return new lf(this.rawData.copy())},copyColumnFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(1,b.y);this.rawData.set(2,b.z);this.rawData.set(3,
b.w);break;case 1:this.rawData.set(4,b.x);this.rawData.set(5,b.y);this.rawData.set(6,b.z);this.rawData.set(7,b.w);break;case 2:this.rawData.set(8,b.x);this.rawData.set(9,b.y);this.rawData.set(10,b.z);this.rawData.set(11,b.w);break;case 3:this.rawData.set(12,b.x),this.rawData.set(13,b.y),this.rawData.set(14,b.z),this.rawData.set(15,b.w)}},copyColumnTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(1);b.z=this.rawData.get(2);b.w=this.rawData.get(3);break;case 1:b.x=this.rawData.get(4);
b.y=this.rawData.get(5);b.z=this.rawData.get(6);b.w=this.rawData.get(7);break;case 2:b.x=this.rawData.get(8);b.y=this.rawData.get(9);b.z=this.rawData.get(10);b.w=this.rawData.get(11);break;case 3:b.x=this.rawData.get(12),b.y=this.rawData.get(13),b.z=this.rawData.get(14),b.w=this.rawData.get(15)}},copyFrom:function(a){this.rawData=a.rawData.copy()},copyRawDataFrom:function(a,b,c){c==null&&(c=!1);b==null&&(b=0);c&&this.transpose();for(var d=0,f=a.get_length()-b;d<f;){var g=d++;this.rawData.set(g,a.get(g+
b))}c&&this.transpose()},copyRawDataTo:function(a,b,c){c==null&&(c=!1);b==null&&(b=0);c&&this.transpose();for(var d=0,f=this.rawData.get_length();d<f;){var g=d++;a.set(g+b,this.rawData.get(g))}c&&this.transpose()},copyRowFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(4,b.y);this.rawData.set(8,b.z);this.rawData.set(12,b.w);break;case 1:this.rawData.set(1,b.x);this.rawData.set(5,b.y);this.rawData.set(9,b.z);this.rawData.set(13,b.w);break;case 2:this.rawData.set(2,b.x);
this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,b.w);break;case 3:this.rawData.set(3,b.x),this.rawData.set(7,b.y),this.rawData.set(11,b.z),this.rawData.set(15,b.w)}},copyRowTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(4);b.z=this.rawData.get(8);b.w=this.rawData.get(12);break;case 1:b.x=this.rawData.get(1);b.y=this.rawData.get(5);b.z=this.rawData.get(9);b.w=this.rawData.get(13);break;case 2:b.x=this.rawData.get(2);b.y=this.rawData.get(6);b.z=this.rawData.get(10);
b.w=this.rawData.get(14);break;case 3:b.x=this.rawData.get(3),b.y=this.rawData.get(7),b.z=this.rawData.get(11),b.w=this.rawData.get(15)}},copyToMatrix3D:function(a){a.rawData=this.rawData.copy()},decompose:function(a){a==null&&(a=1);var b=gb.toObjectVector(null),c=this.clone().rawData.copy(),d=new Pd(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=new Pd;f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+
c.get(6)*c.get(6));f.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+c.get(10)*c.get(10));c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))<0&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/f.z);g=c;g.set(10,g.get(10)/f.z);g=new Pd;switch(a){case 0:g.w=
Math.acos((c.get(0)+c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));a!=0?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));c.get(2)!=1&&c.get(2)!=-1?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),a>0?
(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-
c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.push(d);b.push(g);b.push(f);return b},decomposeToOutput:function(a,b){a==null&&(a=1);b==null&&(b=gb.toObjectVector(null));var c=this.clone().rawData.copy(),d=b.get(0);d==null?d=new Pd(c.get(12),c.get(13),c.get(14)):d.setTo(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=b.get(1);f==null&&(f=new Pd);f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));
f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+c.get(6)*c.get(6));f.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+c.get(10)*c.get(10));c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))<0&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/
f.z);g=c;g.set(10,g.get(10)/f.z);g=b.get(2);g==null&&(g=new Pd);switch(a){case 0:g.w=Math.acos((c.get(0)+c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));a!=0?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));c.get(2)!=1&&c.get(2)!=-1?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=
0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),a>0?(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/
(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.set(0,d);b.set(1,g);b.set(2,f);return b},deltaTransformVector:function(a){var b=a.x,c=a.y;a=a.z;return new Pd(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10),b*this.rawData.get(3)+
c*this.rawData.get(7)+a*this.rawData.get(11))},deltaTransformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=a.z;return b!=null?(b.setTo(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11),b):new Pd(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+
d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10),c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11))},identity:function(){this.rawData=gb.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},interpolateTo:function(a,b){for(var c=0;c<16;){var d=c++;this.rawData.set(d,this.rawData.get(d)+(a.rawData.get(d)-this.rawData.get(d))*b)}},invert:function(){var a=this.get_determinant(),b=Math.abs(a)>1E-11;if(b){a=1/a;var c=
this.rawData.get(0),d=this.rawData.get(4),f=this.rawData.get(8),g=this.rawData.get(12),h=this.rawData.get(1),l=this.rawData.get(5),k=this.rawData.get(9),q=this.rawData.get(13),w=this.rawData.get(2),v=this.rawData.get(6),z=this.rawData.get(10),n=this.rawData.get(14),E=this.rawData.get(3),H=this.rawData.get(7),J=this.rawData.get(11),Q=this.rawData.get(15);this.rawData.set(0,a*(l*(z*Q-n*J)-k*(v*Q-n*H)+q*(v*J-z*H)));this.rawData.set(1,-a*(h*(z*Q-n*J)-k*(w*Q-n*E)+q*(w*J-z*E)));this.rawData.set(2,a*(h*
(v*Q-n*H)-l*(w*Q-n*E)+q*(w*H-v*E)));this.rawData.set(3,-a*(h*(v*J-z*H)-l*(w*J-z*E)+k*(w*H-v*E)));this.rawData.set(4,-a*(d*(z*Q-n*J)-f*(v*Q-n*H)+g*(v*J-z*H)));this.rawData.set(5,a*(c*(z*Q-n*J)-f*(w*Q-n*E)+g*(w*J-z*E)));this.rawData.set(6,-a*(c*(v*Q-n*H)-d*(w*Q-n*E)+g*(w*H-v*E)));this.rawData.set(7,a*(c*(v*J-z*H)-d*(w*J-z*E)+f*(w*H-v*E)));this.rawData.set(8,a*(d*(k*Q-q*J)-f*(l*Q-q*H)+g*(l*J-k*H)));this.rawData.set(9,-a*(c*(k*Q-q*J)-f*(h*Q-q*E)+g*(h*J-k*E)));this.rawData.set(10,a*(c*(l*Q-q*H)-d*(h*Q-
q*E)+g*(h*H-l*E)));this.rawData.set(11,-a*(c*(l*J-k*H)-d*(h*J-k*E)+f*(h*H-l*E)));this.rawData.set(12,-a*(d*(k*n-q*z)-f*(l*n-q*v)+g*(l*z-k*v)));this.rawData.set(13,a*(c*(k*n-q*z)-f*(h*n-q*w)+g*(h*z-k*w)));this.rawData.set(14,-a*(c*(l*n-q*v)-d*(h*n-q*w)+g*(h*v-l*w)));this.rawData.set(15,a*(c*(l*z-k*v)-d*(h*z-k*w)+f*(h*v-l*w)))}return b},pointAt:function(a,b,c){b==null&&(b=new Pd(0,0,-1));c==null&&(c=new Pd(0,-1,0));b=b.subtract(a);c=c.clone();b.normalize();c.normalize();var d=b.clone();d.scaleBy(c.dotProduct(b));
c=c.subtract(d);c.get_length()>0?c.normalize():c=b.x!=0?new Pd(-b.y,b.x,0):new Pd(1,0,0);d=c.crossProduct(b);d.normalize();this.rawData.set(0,d.x);this.rawData.set(4,d.y);this.rawData.set(8,d.z);this.rawData.set(12,0);this.rawData.set(1,c.x);this.rawData.set(5,c.y);this.rawData.set(9,c.z);this.rawData.set(13,0);this.rawData.set(2,b.x);this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,0);this.rawData.set(3,a.x);this.rawData.set(7,a.y);this.rawData.set(11,a.z);this.rawData.set(15,
1)},prepend:function(a){var b=a.rawData.get(0),c=a.rawData.get(4),d=a.rawData.get(8),f=a.rawData.get(12),g=a.rawData.get(1),h=a.rawData.get(5),l=a.rawData.get(9),k=a.rawData.get(13),q=a.rawData.get(2),w=a.rawData.get(6),v=a.rawData.get(10),z=a.rawData.get(14),n=a.rawData.get(3),E=a.rawData.get(7),H=a.rawData.get(11);a=a.rawData.get(15);var J=this.rawData.get(0),Q=this.rawData.get(4),T=this.rawData.get(8),fa=this.rawData.get(12),da=this.rawData.get(1),pa=this.rawData.get(5),xa=this.rawData.get(9),
Ua=this.rawData.get(13),Sa=this.rawData.get(2),Ka=this.rawData.get(6),hb=this.rawData.get(10),Ra=this.rawData.get(14),Jb=this.rawData.get(3),vb=this.rawData.get(7),Cb=this.rawData.get(11),pc=this.rawData.get(15);this.rawData.set(0,b*J+g*Q+q*T+n*fa);this.rawData.set(1,b*da+g*pa+q*xa+n*Ua);this.rawData.set(2,b*Sa+g*Ka+q*hb+n*Ra);this.rawData.set(3,b*Jb+g*vb+q*Cb+n*pc);this.rawData.set(4,c*J+h*Q+w*T+E*fa);this.rawData.set(5,c*da+h*pa+w*xa+E*Ua);this.rawData.set(6,c*Sa+h*Ka+w*hb+E*Ra);this.rawData.set(7,
c*Jb+h*vb+w*Cb+E*pc);this.rawData.set(8,d*J+l*Q+v*T+H*fa);this.rawData.set(9,d*da+l*pa+v*xa+H*Ua);this.rawData.set(10,d*Sa+l*Ka+v*hb+H*Ra);this.rawData.set(11,d*Jb+l*vb+v*Cb+H*pc);this.rawData.set(12,f*J+k*Q+z*T+a*fa);this.rawData.set(13,f*da+k*pa+z*xa+a*Ua);this.rawData.set(14,f*Sa+k*Ka+z*hb+a*Ra);this.rawData.set(15,f*Jb+k*vb+z*Cb+a*pc)},prependRotation:function(a,b,c){var d=0,f=d,g=f;c!=null&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var h=b.x,l=b.y;b=b.z;var k=h*h,q=l*l,
w=b*b,v=k+q+w;if(v!=0){var z=Math.sqrt(v);h/=z;l/=z;b/=z;k/=v;q/=v;w/=v}v=1-a;z=new lf;var n=z.rawData;n.set(0,k+(q+w)*a);n.set(1,h*l*v+b*c);n.set(2,h*b*v-l*c);n.set(4,h*l*v-b*c);n.set(5,q+(k+w)*a);n.set(6,l*b*v+h*c);n.set(8,h*b*v+l*c);n.set(9,l*b*v-h*c);n.set(10,w+(k+q)*a);n.set(12,(g*(q+w)-h*(f*l+d*b))*v+(f*b-d*l)*c);n.set(13,(f*(k+w)-l*(g*h+d*b))*v+(d*h-g*b)*c);n.set(14,(d*(k+q)-b*(g*h+f*l))*v+(g*l-f*h)*c);this.prepend(z)},prependScale:function(a,b,c){this.prepend(new lf(gb.toFloatVector(null,
null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},prependTranslation:function(a,b,c){var d=new lf;d.set_position(new Pd(a,b,c));this.prepend(d)},recompose:function(a,b){b==null&&(b=1);if(a.get_length()<3||a.get(2).x==0||a.get(2).y==0||a.get(2).z==0)return!1;this.identity();var c=[];c[0]=c[1]=c[2]=a.get(2).x;c[4]=c[5]=c[6]=a.get(2).y;c[8]=c[9]=c[10]=a.get(2).z;if(b==1){b=Math.cos(a.get(1).x);var d=Math.cos(a.get(1).y),f=Math.cos(a.get(1).z),g=Math.sin(a.get(1).x),h=Math.sin(a.get(1).y),l=Math.sin(a.get(1).z);
this.rawData.set(0,d*f*c[0]);this.rawData.set(1,d*l*c[1]);this.rawData.set(2,-h*c[2]);this.rawData.set(3,0);this.rawData.set(4,(g*h*f-b*l)*c[4]);this.rawData.set(5,(g*h*l+b*f)*c[5]);this.rawData.set(6,g*d*c[6]);this.rawData.set(7,0);this.rawData.set(8,(b*h*f+g*l)*c[8]);this.rawData.set(9,(b*h*l-g*f)*c[9]);this.rawData.set(10,b*d*c[10])}else d=a.get(1).x,f=a.get(1).y,g=a.get(1).z,h=a.get(1).w,b==0&&(d*=Math.sin(h/2),f*=Math.sin(h/2),g*=Math.sin(h/2),h=Math.cos(h/2)),this.rawData.set(0,(1-2*f*f-2*g*
g)*c[0]),this.rawData.set(1,(2*d*f+2*h*g)*c[1]),this.rawData.set(2,(2*d*g-2*h*f)*c[2]),this.rawData.set(3,0),this.rawData.set(4,(2*d*f-2*h*g)*c[4]),this.rawData.set(5,(1-2*d*d-2*g*g)*c[5]),this.rawData.set(6,(2*f*g+2*h*d)*c[6]),this.rawData.set(7,0),this.rawData.set(8,(2*d*g+2*h*f)*c[8]),this.rawData.set(9,(2*f*g-2*h*d)*c[9]),this.rawData.set(10,(1-2*d*d-2*f*f)*c[10]);this.rawData.set(11,0);this.rawData.set(12,a.get(0).x);this.rawData.set(13,a.get(0).y);this.rawData.set(14,a.get(0).z);this.rawData.set(15,
1);a.get(2).x==0&&this.rawData.set(0,1E-15);a.get(2).y==0&&this.rawData.set(5,1E-15);a.get(2).z==0&&this.rawData.set(10,1E-15);return!(a.get(2).x==0||a.get(2).y==0||a.get(2).y==0)},transformVector:function(a){var b=a.x,c=a.y;a=a.z;return new Pd(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),
b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=a.z;return b!=null?(b.setTo(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+
this.rawData.get(15),b):new Pd(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectors:function(a,b){for(var c=0,d,f,g;c+3<=a.get_length();)d=a.get(c),f=a.get(c+1),g=a.get(c+2),b.set(c,d*this.rawData.get(0)+
f*this.rawData.get(4)+g*this.rawData.get(8)+this.rawData.get(12)),b.set(c+1,d*this.rawData.get(1)+f*this.rawData.get(5)+g*this.rawData.get(9)+this.rawData.get(13)),b.set(c+2,d*this.rawData.get(2)+f*this.rawData.get(6)+g*this.rawData.get(10)+this.rawData.get(14)),c+=3},transpose:function(){var a=this.rawData.copy();this.rawData.set(1,a.get(4));this.rawData.set(2,a.get(8));this.rawData.set(3,a.get(12));this.rawData.set(4,a.get(1));this.rawData.set(6,a.get(9));this.rawData.set(7,a.get(13));this.rawData.set(8,
a.get(2));this.rawData.set(9,a.get(6));this.rawData.set(11,a.get(14));this.rawData.set(12,a.get(3));this.rawData.set(13,a.get(7));this.rawData.set(14,a.get(11))},get_determinant:function(){return(this.rawData.get(0)*this.rawData.get(5)-this.rawData.get(4)*this.rawData.get(1))*(this.rawData.get(10)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(11))-(this.rawData.get(0)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(15)-this.rawData.get(14)*
this.rawData.get(7))+(this.rawData.get(0)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(7))+(this.rawData.get(4)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(3))-(this.rawData.get(4)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(11)-this.rawData.get(10)*
this.rawData.get(3))+(this.rawData.get(8)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(9))*(this.rawData.get(2)*this.rawData.get(7)-this.rawData.get(6)*this.rawData.get(3))},get_position:function(){return new Pd(this.rawData.get(12),this.rawData.get(13),this.rawData.get(14))},set_position:function(a){this.rawData.set(12,a.x);this.rawData.set(13,a.y);this.rawData.set(14,a.z);return a},__class__:lf,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};
var eq=function(a){this.__colorTransform=new ca;this.concatenatedColorTransform=new ca;this.pixelBounds=new Ea;this.__displayObject=a;this.__hasMatrix=!0};r["openfl.geom.Transform"]=eq;eq.__name__="openfl.geom.Transform";eq.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform.__clone()},set_colorTransform:function(a){this.__colorTransform.__equals(a,!1)||
(this.__colorTransform.__copyFrom(a),a!=null&&this.__displayObject.set_alpha(a.alphaMultiplier),a=this.__displayObject,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__colorTransform},get_concatenatedMatrix:function(){return this.__hasMatrix?this.__displayObject.__getWorldTransform().clone():null},get_matrix:function(){return this.__hasMatrix?this.__displayObject.__transform.clone():null},set_matrix:function(a){if(a==null)return this.__hasMatrix=!1,null;this.__hasMatrix=
!0;this.__hasMatrix3D=!1;this.__displayObject!=null&&this.__setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty);return a},get_matrix3D:function(){if(this.__hasMatrix3D){var a=this.__displayObject.__transform;return new lf(gb.toFloatVector(null,null,null,[a.a,a.b,0,0,a.c,a.d,0,0,0,0,1,0,a.tx,a.ty,0,1]))}return null},set_matrix3D:function(a){if(a==null)return this.__hasMatrix3D=!1,null;this.__hasMatrix=!1;this.__hasMatrix3D=!0;this.__setTransform(a.rawData.get(0),a.rawData.get(1),a.rawData.get(4),a.rawData.get(5),
a.rawData.get(12),a.rawData.get(13));return a},__setTransform:function(a,b,c,d,f,g){if(this.__displayObject!=null){var h=this.__displayObject.__transform;if(h.a!=a||h.b!=b||h.c!=c||h.d!=d||h.tx!=f||h.ty!=g){var l=b==0?a:Math.sqrt(a*a+b*b);var k=c==0?d:Math.sqrt(c*c+d*d);this.__displayObject.__scaleX=l;this.__displayObject.__scaleY=k;l=180/Math.PI*Math.atan2(d,c)-90;l!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=l,l*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(l),
this.__displayObject.__rotationCosine=Math.cos(l));h.a=a;h.b=b;h.c=c;h.d=d;h.tx=f;h.ty=g;this.__displayObject.__setTransformDirty()}}},__class__:eq,__properties__:{set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var Pd=function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);b==null&&(b=0);a==null&&(a=0);this.w=d;this.x=a;
this.y=b;this.z=c};r["openfl.geom.Vector3D"]=Pd;Pd.__name__="openfl.geom.Vector3D";Pd.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};Pd.angleBetween=function(a,b){var c=a.get_length(),d=b.get_length();a=a.dotProduct(b);c!=0&&(a/=c);d!=0&&(a/=d);return Math.acos(a)};Pd.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};Pd.get_X_AXIS=function(){return new Pd(1,0,0)};Pd.get_Y_AXIS=function(){return new Pd(0,1,0)};Pd.get_Z_AXIS=
function(){return new Pd(0,0,1)};Pd.prototype={w:null,x:null,y:null,z:null,add:function(a){return new Pd(this.x+a.x,this.y+a.y,this.z+a.z)},addToOutput:function(a,b){return b!=null?(b.setTo(this.x+a.x,this.y+a.y,this.z+a.z),b):new Pd(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new Pd(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a){return new Pd(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},crossProductToOutput:function(a,
b){return b!=null?(b.setTo(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x),b.w=1,b):new Pd(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){b==null&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z?b?this.w==a.w:!0:!1},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){c==null&&
(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b?c?Math.abs(this.w-a.w)<b:!0:!1},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=this.get_length();a!=0&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a){return new Pd(this.x-a.x,this.y-a.y,this.z-a.z)},subtractToOutput:function(a,
b){return b!=null?(b.setTo(this.x-a.x,this.y-a.y,this.z-a.z),b):new Pd(this.x-a.x,this.y-a.y,this.z-a.z)},toString:function(){return"Vector3D("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:Pd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Bo=function(a,b,c){c==null&&(c=1);b==null&&(b=1);this.requestedLocaleIDName=
a;this._normalizedRequestedLocaleIDName=Pm.normalizeRequestedLocaleIDName(a);this.setDateTimeStyles(b,c);this.actualLocaleIDName=this.intlDateTimeFormat.resolvedOptions().locale;this.lastOperationStatus=7};r["openfl.globalization.DateTimeFormatter"]=Bo;Bo.__name__="openfl.globalization.DateTimeFormatter";Bo.getAvailableLocaleIDNames=function(){return gb.toObjectVector(null)};Bo.prototype={intlDateTimeFormat:null,intlDateTimeFormatUTC:null,dateStyle:null,timeStyle:null,dateTimePattern:null,getDateStyle:function(){this.lastOperationStatus=
7;return this.dateStyle},getTimeStyle:function(){this.lastOperationStatus=7;return this.timeStyle},getDateTimePattern:function(){this.lastOperationStatus=7;return this.dateTimePattern},getFirstWeekday:function(){this.lastOperationStatus=11;return 0},actualLocaleIDName:null,requestedLocaleIDName:null,_normalizedRequestedLocaleIDName:null,lastOperationStatus:null,format:function(a){if(this.dateStyle==0||this.timeStyle==0){var b=this.formatPatternJS(a,!1);this.lastOperationStatus=7;return b}try{return b=
this.intlDateTimeFormat.format(a),this.lastOperationStatus=7,b}catch(c){return Rb.lastError=c,this.lastOperationStatus=1,null}},formatUTC:function(a){if(this.dateTimePattern!=null){var b=this.formatPatternJS(a,!0);this.lastOperationStatus=7;return b}try{return b=this.intlDateTimeFormatUTC.format(a),this.lastOperationStatus=7,b}catch(c){return Rb.lastError=c,this.lastOperationStatus=1,null}},formatPatternJS:function(a,b){var c="",d=Ov.tokenize(this.dateTimePattern);b=b?"UTC":void 0;for(var f=0;f<d.length;){var g=
d[f];++f;switch(g._hx_index){case 0:var h=g.text;break;case 1:h="";break;case 2:switch(g.length){case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"long",timeZone:b})).formatToParts(a);break;case 5:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"narrow",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{weekday:"short",timeZone:b})).formatToParts(a)}h=this.getDateFormatPart("weekday",
h);break;case 3:switch(g.length){case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"long",timeZone:b})).formatToParts(a);break;case 5:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"narrow",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{era:"short",timeZone:b})).formatToParts(a)}h=this.getDateFormatPart("era",h);break;case 4:h=g.length;switch(h){case 1:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{year:"numeric",timeZone:b})).formatToParts(a)[0].value;break;case 2:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{year:"2-digit",timeZone:b})).formatToParts(a)[0].value;break;default:h=Z.lpad((new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{year:"numeric",timeZone:b})).formatToParts(a)[0].value,"0",Math.min(4,h)|0)}break;case 5:switch(g.length){case 1:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"numeric",timeZone:b})).formatToParts(a);
break;case 2:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"2-digit",timeZone:b})).formatToParts(a);break;case 3:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"short",timeZone:b})).formatToParts(a);break;case 4:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"long",timeZone:b})).formatToParts(a);break;default:h=(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{month:"narrow",timeZone:b})).formatToParts(a)}h=
this.getDateFormatPart("month",h);break;case 6:h=this.getDateFormatPart("day",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{day:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{day:"2-digit",timeZone:b})).formatToParts(a));break;case 7:h="";break;case 8:h="";break;case 9:h="";break;case 10:h="";break;case 11:h="";break;case 12:h=this.getDateFormatPart("dayPeriod",(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{hour:"numeric",hour12:!0,timeZone:b})).formatToParts(a));break;case 13:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h11",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h11",timeZone:b})).formatToParts(a));break;case 14:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",
hourCycle:"h12",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h12",timeZone:b})).formatToParts(a));break;case 15:h=this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h23",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h23",timeZone:b})).formatToParts(a));break;case 16:h=
this.getDateFormatPart("hour",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"numeric",hourCycle:"h24",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{hour:"2-digit",hourCycle:"h24",timeZone:b})).formatToParts(a));break;case 17:h=this.getDateFormatPart("minute",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{minute:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{minute:"2-digit",timeZone:b})).formatToParts(a));break;case 18:h=this.getDateFormatPart("second",g.length==1?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{second:"numeric",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{second:"2-digit",timeZone:b})).formatToParts(a));break;case 19:h="";break;case 20:h="";break;case 21:h=this.getDateFormatPart("timeZoneName",g.length==4?(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,
{timeZoneName:"long",timeZone:b})).formatToParts(a):(new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,{timeZoneName:"short",timeZone:b})).formatToParts(a));break;case 22:h=""}c+=h}return c},getDateFormatPart:function(a,b){for(var c="",d=0;d<b.length;){var f=b[d];++d;L.string(f.type)==a&&(c=f.value)}return c},getMonthNames:function(a,b){a==null&&(a=0);try{var c=new Intl.DateTimeFormat(this.actualLocaleIDName,{month:a==0?"long":"short"});a=[];for(b=0;b<12;){var d=b++;a[d]=c.format(new Date(2E3,
d,1,0,0,0))}this.lastOperationStatus=7;return gb.toObjectVector(null,a.length,!0,a)}catch(f){return Rb.lastError=f,this.lastOperationStatus=1,null}},getWeekdayNames:function(a,b){a==null&&(a=0);try{switch(a){case 0:var c="long";break;case 2:c="narrow";break;default:c="short"}var d=new Intl.DateTimeFormat(this.actualLocaleIDName,{weekday:c});a=[];var f=new Date(2006,0,1,0,0,0);a[0]=d.format(f);f=new Date(2006,0,2,0,0,0);a[1]=d.format(f);f=new Date(2006,0,3,0,0,0);a[2]=d.format(f);f=new Date(2006,0,
4,0,0,0);a[3]=d.format(f);f=new Date(2006,0,5,0,0,0);a[4]=d.format(f);f=new Date(2006,0,6,0,0,0);a[5]=d.format(f);f=new Date(2006,0,7,0,0,0);a[6]=d.format(f);this.lastOperationStatus=7;return gb.toObjectVector(null,a.length,!0,a)}catch(g){return Rb.lastError=g,this.lastOperationStatus=1,null}},setDateTimeStyles:function(a,b){b==null&&(b=1);a==null&&(a=1);if(a==0||b==0)this.lastOperationStatus=2;else{this.dateStyle=a;this.timeStyle=b;this.dateTimePattern=null;var c={};if(a!=3){switch(a){case 1:a="full";
break;case 2:a="long";break;default:a="short"}c.dateStyle=a}if(b!=3){switch(b){case 1:a="medium";break;case 2:a="medium";break;default:a="short"}c.timeStyle=a}try{this.intlDateTimeFormat=new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,c),c.timeZone="UTC",this.intlDateTimeFormatUTC=new Intl.DateTimeFormat(this._normalizedRequestedLocaleIDName,c),this.resolveDateTimePattern(),this.lastOperationStatus=7}catch(d){Rb.lastError=d,this.lastOperationStatus=1}}},setDateTimePattern:function(a){if(a==
null||a.length>255)this.lastOperationStatus=10;else{this.timeStyle=this.dateStyle=0;this.dateTimePattern=a;try{var b=Ov.tokenize(this.dateTimePattern);this.lastOperationStatus=7;for(a=0;a<b.length;){var c=b[a];++a;switch(c._hx_index){case 1:this.lastOperationStatus=10;return;case 7:this.lastOperationStatus=14;return;case 8:this.lastOperationStatus=14;return;case 9:this.lastOperationStatus=14;return;case 10:this.lastOperationStatus=14;return;case 11:this.lastOperationStatus=14;return;case 19:this.lastOperationStatus=
14;break;case 20:this.lastOperationStatus=14;return;case 22:this.lastOperationStatus=14;return}}}catch(d){Rb.lastError=d,b=la.caught(d).unwrap(),Me.trace("Date time tokenization error: "+L.string(b),{fileName:"openfl/globalization/DateTimeFormatter.hx",lineNumber:830,className:"openfl.globalization.DateTimeFormatter",methodName:"setDateTimePattern"}),this.dateTimePattern="",this.lastOperationStatus=10}}},resolveDateTimePattern:function(){for(var a="",b=this.intlDateTimeFormat.formatToParts(new Date(2021,
9,12,0,0,0)),c=0;c<b.length;){var d=b[c];++c;switch(d.type){case "day":d="d";break;case "dayPeriod":d="a";break;case "era":d="G";break;case "hour":d="h";break;case "literal":d=d.value;break;case "minute":d="m";break;case "month":d="M";break;case "second":d="s";break;case "timeZoneName":d="z";break;case "weekday":d="E";break;case "year":d="y";break;default:d=""}a+=d}this.dateTimePattern=a},__class__:Bo};var Ov=function(){};r["openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer"]=Ov;Ov.__name__=
"openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer";Ov.tokenize=function(a){for(var b=[],c="",d=null,f=0;f<a.length;){var g=a.charAt(f);++f;if(d!=null&&d._hx_index==0){var h=d.text;g=="'"?(f<a.length?a.charAt(f):null)=="'"?(d=ac.Text(h+g),++f):(b.push(d),d=null):d=ac.Text(h+g)}else{switch(g){case "'":g=ac.Text("");break;case "D":g=ac.DayOfYear(1);break;case "E":g=ac.Weekday(1);break;case "F":g=ac.DayOfWeekOccurence;break;case "G":g=ac.Era(1);break;case "H":g=ac.Hour23(1);break;case "K":g=
ac.Hour11(1);break;case "M":g=ac.Month(1);break;case "Q":g=ac.Quarter(1);break;case "S":g=ac.Millisecond(1);break;case "W":g=ac.WeekOfMonth;break;case "Z":g=ac.TimeZoneOffset(1);break;case "a":g=ac.AMPM;break;case "d":g=ac.Date(1);break;case "h":g=ac.Hour12(1);break;case "k":g=ac.Hour24(1);break;case "m":g=ac.Minute(1);break;case "s":g=ac.Second(1);break;case "v":g=ac.TimeZone(1);break;case "w":g=ac.WeekOfYear(1);break;case "y":g=ac.Year(1);break;case "z":g=ac.TimeZoneDST(1);break;default:(new sb("^[A-Za-z]$",
"")).match(g)?g=ac.Invalid(g):(c+=g,g=null)}g!=null&&c.length>0&&(b.push(ac.Text(c)),c="");if(d!=null&&g!=null&&O[g.__enum__].__constructs__[g._hx_index]._hx_name==O[d.__enum__].__constructs__[d._hx_index]._hx_name)switch(d._hx_index){case 0:d=ac.Invalid(d.text);break;case 1:d=ac.Invalid(d.text);break;case 2:d=ac.Weekday(Math.min(5,d.length+1)|0);break;case 3:d=ac.Era(Math.min(5,d.length+1)|0);break;case 4:d=ac.Year(Math.min(5,d.length+1)|0);break;case 5:d=ac.Month(Math.min(5,d.length+1)|0);break;
case 6:d=ac.Date(Math.min(2,d.length+1)|0);break;case 7:d=ac.Quarter(Math.min(4,d.length+1)|0);break;case 8:d=ac.WeekOfYear(Math.min(2,d.length+1)|0);break;case 9:d=ac.WeekOfMonth;break;case 10:d=ac.DayOfYear(Math.min(3,d.length+1)|0);break;case 11:d=ac.DayOfWeekOccurence;break;case 12:d=ac.AMPM;break;case 13:d=ac.Hour11(Math.min(2,d.length+1)|0);break;case 14:d=ac.Hour12(Math.min(2,d.length+1)|0);break;case 15:d=ac.Hour23(Math.min(2,d.length+1)|0);break;case 16:d=ac.Hour24(Math.min(2,d.length+1)|
0);break;case 17:d=ac.Minute(Math.min(2,d.length+1)|0);break;case 18:d=ac.Second(Math.min(2,d.length+1)|0);break;case 19:d=ac.Millisecond(Math.min(5,d.length+1)|0);break;case 20:d=ac.TimeZone(Math.min(4,d.length+1)|0);break;case 21:d=ac.TimeZoneDST(Math.min(4,d.length+1)|0);break;case 22:d=ac.TimeZoneOffset(Math.min(4,d.length+1)|0)}else d!=null&&b.push(d),d=g}}d!=null&&b.push(d);c.length>0&&b.push(ac.Text(c));return b};var ac=O["openfl.globalization._DateTimeFormatter.DateTimeFormatToken"]={__ename__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
__constructs__:null,Text:(G=function(a){return{_hx_index:0,text:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Text",G.__params__=["text"],G),Invalid:(G=function(a){return{_hx_index:1,text:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Invalid",G.__params__=["text"],G),Weekday:(G=function(a){return{_hx_index:2,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},
G._hx_name="Weekday",G.__params__=["length"],G),Era:(G=function(a){return{_hx_index:3,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Era",G.__params__=["length"],G),Year:(G=function(a){return{_hx_index:4,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Year",G.__params__=["length"],G),Month:(G=function(a){return{_hx_index:5,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:D}},G._hx_name="Month",G.__params__=["length"],G),Date:(G=function(a){return{_hx_index:6,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Date",G.__params__=["length"],G),Quarter:(G=function(a){return{_hx_index:7,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Quarter",G.__params__=["length"],G),WeekOfYear:(G=function(a){return{_hx_index:8,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:D}},G._hx_name="WeekOfYear",G.__params__=["length"],G),WeekOfMonth:{_hx_name:"WeekOfMonth",_hx_index:9,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D},DayOfYear:(G=function(a){return{_hx_index:10,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="DayOfYear",G.__params__=["length"],G),DayOfWeekOccurence:{_hx_name:"DayOfWeekOccurence",_hx_index:11,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:D},AMPM:{_hx_name:"AMPM",_hx_index:12,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D},Hour11:(G=function(a){return{_hx_index:13,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Hour11",G.__params__=["length"],G),Hour12:(G=function(a){return{_hx_index:14,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Hour12",G.__params__=["length"],G),Hour23:(G=
function(a){return{_hx_index:15,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Hour23",G.__params__=["length"],G),Hour24:(G=function(a){return{_hx_index:16,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Hour24",G.__params__=["length"],G),Minute:(G=function(a){return{_hx_index:17,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Minute",
G.__params__=["length"],G),Second:(G=function(a){return{_hx_index:18,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Second",G.__params__=["length"],G),Millisecond:(G=function(a){return{_hx_index:19,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="Millisecond",G.__params__=["length"],G),TimeZone:(G=function(a){return{_hx_index:20,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",
toString:D}},G._hx_name="TimeZone",G.__params__=["length"],G),TimeZoneDST:(G=function(a){return{_hx_index:21,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="TimeZoneDST",G.__params__=["length"],G),TimeZoneOffset:(G=function(a){return{_hx_index:22,length:a,__enum__:"openfl.globalization._DateTimeFormatter.DateTimeFormatToken",toString:D}},G._hx_name="TimeZoneOffset",G.__params__=["length"],G)};ac.__constructs__=[ac.Text,ac.Invalid,ac.Weekday,
ac.Era,ac.Year,ac.Month,ac.Date,ac.Quarter,ac.WeekOfYear,ac.WeekOfMonth,ac.DayOfYear,ac.DayOfWeekOccurence,ac.AMPM,ac.Hour11,ac.Hour12,ac.Hour23,ac.Hour24,ac.Minute,ac.Second,ac.Millisecond,ac.TimeZone,ac.TimeZoneDST,ac.TimeZoneOffset];var Pm=function(a){if(a=="i-default")this.language=this.name=a,this.script=this.region="",this.rtl=!1,this.lastOperationStatus=7;else try{var b=(new Intl.Locale(a)).maximize();this.name=A.field(b,"baseName");this.language=A.field(b,"language");this.region=A.field(b,
"region");this.script=A.field(b,"script");this.rtl=Pm.RTL_LANGUAGES.indexOf(this.language)!=-1;this.lastOperationStatus=7}catch(c){Rb.lastError=c,this.lastOperationStatus=1}};r["openfl.globalization.LocaleID"]=Pm;Pm.__name__="openfl.globalization.LocaleID";Pm.normalizeRequestedLocaleIDName=function(a){if(a==null)return null;a=="i-default"&&(a=Intl.DateTimeFormat().resolvedOptions().locale);a=a.replace(RegExp("_","g"),"-");var b=a.split("-"),c=b.shift();c=c.toLowerCase();c=="root"&&(c="und");var d=
a=null;if(b.length>0){var f=b.shift();f!=null&&f.length==4&&(a=f.charAt(0).toUpperCase()+X.substr(f,1,null).toLowerCase(),f=b.shift());f==null||f.length!=2&&f.length!=3||(d=f.toUpperCase(),b.shift())}b=c;a!=null&&(b+="-"+a);d!=null&&(b+="-"+d);return b};Pm.prototype={name:null,lastOperationStatus:null,language:null,region:null,script:null,rtl:null,getLanguage:function(){return this.language},getRegion:function(){return this.region},getScript:function(){return this.script},getVariant:function(){return""},
isRightToLeft:function(){return this.rtl},__class__:Pm};var Bt=function(){};r["openfl.media.ID3Info"]=Bt;Bt.__name__="openfl.media.ID3Info";Bt.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,__class__:Bt};var oq=function(a,b,c){this.__firstRun=!0;na.call(this,this);this.__sound=a;this.rightPeak=this.leftPeak=1;this.__soundTransform=c!=null?c:new ci;this.__initAudioSource(b);fe.__registerSoundChannel(this)};r["openfl.media.SoundChannel"]=oq;oq.__name__=
"openfl.media.SoundChannel";oq.__super__=na;oq.prototype=I(na.prototype,{leftPeak:null,rightPeak:null,__sound:null,__isValid:null,__soundTransform:null,__audioSource:null,__sampleDataEvent:null,__processor:null,__firstRun:null,stop:function(){fe.__unregisterSoundChannel(this);this.__isValid&&(this.__processor!=null&&(this.__processor.disconnect(),this.__processor=this.__processor.onaudioprocess=null),this.__audioSource.stop(),this.__dispose())},__dispose:function(){this.__isValid&&(this.__audioSource.onComplete.remove(m(this,
this.audioSource_onComplete)),this.__audioSource.dispose(),this.__audioSource=null,this.__isValid=!1)},__startSampleData:function(){var a=this,b=this.__sound.__webAudioContext;if(b!=null){this.__sampleDataEvent=new Wn("sampleData");this.__sound.dispatchEvent(this.__sampleDataEvent);var c=this.__sampleDataEvent.getBufferSize();c==0?Oa.setTimeout(function(){a.stop();a.dispatchEvent(new ka("soundComplete"))},1):(this.__processor=b.createScriptProcessor(c,0,2),this.__processor.connect(b.destination),
this.__processor.onaudioprocess=m(this,this.onSample),b.resume())}},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},__initAudioSource:function(a){this.__audioSource=a;this.__audioSource!=null&&(this.__audioSource.onComplete.add(m(this,this.audioSource_onComplete)),this.__isValid=!0,this.__audioSource.play())},get_position:function(){return this.__isValid?this.__audioSource.get_currentTime()+this.__audioSource.offset:0},set_position:function(a){if(!this.__isValid)return 0;
this.__audioSource.set_currentTime((a|0)-this.__audioSource.offset);return a},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){if(a!=null){this.__soundTransform.pan=a.pan;this.__soundTransform.volume=a.volume;var b=fe.__soundTransform.pan+this.__soundTransform.pan;b<-1&&(b=-1);b>1&&(b=1);var c=fe.__soundTransform.volume*this.__soundTransform.volume;this.__isValid&&(this.__audioSource.set_gain(c),c=this.__audioSource.get_position(),c.x=b,c.z=-1*Math.sqrt(1-
Math.pow(b,2)),this.__audioSource.set_position(c))}return a},audioSource_onComplete:function(){fe.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new ka("soundComplete"))},onSample:function(a){if(this.__firstRun){var b=!0;this.__firstRun=!1}else cc.set_length(this.__sampleDataEvent.data,0),this.__sound.dispatchEvent(this.__sampleDataEvent),b=ta.gt(cc.get_length(this.__sampleDataEvent.data),0);b?this.__sampleDataEvent.getSamples(a):(this.stop(),this.dispatchEvent(new ka("soundComplete")))},
__class__:oq,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Mw=function(a,b){b==null&&(b=!1);a==null&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};r["openfl.media.SoundLoaderContext"]=Mw;Mw.__name__="openfl.media.SoundLoaderContext";Mw.prototype={bufferTime:null,checkPolicyFile:null,__class__:Mw};var ci=function(a,b){b==null&&(b=0);a==null&&(a=1);this.volume=a;this.pan=b;this.rightToRight=
this.rightToLeft=this.leftToRight=this.leftToLeft=0};r["openfl.media.SoundTransform"]=ci;ci.__name__="openfl.media.SoundTransform";ci.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new ci(this.volume,this.pan)},__class__:ci};var fe=function(){};r["openfl.media.SoundMixer"]=fe;fe.__name__="openfl.media.SoundMixer";fe.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};fe.areSoundsInaccessible=
function(){return!1};fe.stopAll=function(){for(var a=fe.__soundChannels.length;a>0;)--a,fe.__soundChannels[a].stop()};fe.__registerSoundChannel=function(a){fe.__soundChannels.push(a)};fe.__unregisterSoundChannel=function(a){X.remove(fe.__soundChannels,a)};fe.get_soundTransform=function(){return fe.__soundTransform};fe.__unregisterSoundChannelByBuffer=function(a){for(var b=fe.__soundChannels.length;b>0;){--b;var c=fe.__soundChannels[b];c.__audioSource.buffer==a&&c.stop()}};fe.set_soundTransform=function(a){fe.__soundTransform=
a.clone();for(var b=0,c=fe.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var fo=function(a,b){b==null&&(b=240);a==null&&(a=320);ea.call(this);this.__drawableType=8;this.__width=a;this.__height=b;this.__textureTime=-1;this.smoothing=!1;this.deblocking=0};r["openfl.media.Video"]=fo;fo.__name__="openfl.media.Video";fo.__super__=ea;fo.prototype=I(ea.prototype,{deblocking:null,smoothing:null,__active:null,__buffer:null,__bufferAlpha:null,__bufferColorTransform:null,__bufferContext:null,
__bufferData:null,__currentWidth:null,__currentHeight:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__width:null,attachNetStream:function(a){this.__stream=a;this.__stream==null||this.__stream.__video==null||this.__stream.__closed||this.__stream.__video.play()},clear:function(){},__enterFrame:function(a){this.__renderable&&
this.__stream!=null&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=Ea.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ea.__pool.release(c)},__getIndexBuffer:function(a){if(this.__indexBuffer==null||this.__indexBufferContext!=a.__context)this.__indexBufferData=new Uint16Array(6),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=a.__context,this.__indexBuffer=a.createIndexBuffer(6),this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData);return this.__indexBuffer},__getTexture:function(a){if(this.__stream==null||this.__stream.__video==null)return null;var b=a.__context.webgl,c=b.RGBA,d=b.RGBA;this.__stream.__closed||this.__stream.__video.currentTime==this.__textureTime||(this.__texture==null&&(this.__texture=a.createRectangleTexture(this.__stream.__video.videoWidth,
this.__stream.__video.videoHeight,1,!1)),a.__bindGLTexture2D(this.__texture.__textureID),pd.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,this.__stream.__video),this.__textureTime=this.__stream.__video.currentTime);return this.__texture},__getVertexBuffer:function(a){if(this.__vertexBuffer==null||this.__vertexBufferContext!=a.__context||this.__currentWidth!=this.get_width()||this.__currentHeight!=this.get_height())this.__currentWidth=this.get_width(),this.__currentHeight=this.get_height(),this.__vertexBufferData=
new Float32Array(20),this.__vertexBufferData[0]=this.get_width(),this.__vertexBufferData[1]=this.get_height(),this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[6]=this.get_height(),this.__vertexBufferData[9]=1,this.__vertexBufferData[10]=this.get_width(),this.__vertexBufferData[13]=1,this.__vertexBufferContext=a.__context,this.__vertexBuffer=a.createVertexBuffer(3,5),this.__vertexBuffer.uploadFromTypedArray(Mk.toArrayBufferView(this.__vertexBufferData));return this.__vertexBuffer},
__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||this.get_mask()!=null&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var h=this.__renderTransform,l=h.a*h.d-h.b*h.c;c=l==0?-h.tx:1/l*(h.c*(h.ty-b)+h.d*(a-h.tx));h=this.__renderTransform;l=h.a*h.d-h.b*h.c;a=l==0?-h.ty:1/l*(h.a*(b-h.ty)+h.b*(h.tx-a));return c>0&&a>0&&c<=this.__width&&a<=this.__height?(d==null||f||d.push(g),!0):!1},__hitTestMask:function(a,b){var c=Qa.__pool.get();c.setTo(a,b);this.__globalToLocal(c,
c);a=c.x>0&&c.y>0&&c.x<=this.__width&&c.y<=this.__height;Qa.__pool.release(c);return a},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(a){if(this.get_scaleY()!=1||a!=this.__height)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleY(1);return this.__height=a},get_videoHeight:function(){return this.__stream!=null&&this.__stream.__video!=null?this.__stream.__video.videoHeight|0:0},get_videoWidth:function(){return this.__stream!=null&&this.__stream.__video!=null?
this.__stream.__video.videoWidth|0:0},get_width:function(){return this.__width*this.__scaleX},set_width:function(a){if(this.__scaleX!=1||this.__width!=a)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleX(1);return this.__width=a},__class__:fo,__properties__:I(ea.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var zt=function(a,b,c){this.description=a;this.extension=b;this.macType=c};r["openfl.net.FileFilter"]=zt;zt.__name__="openfl.net.FileFilter";
zt.prototype={description:null,extension:null,macType:null,__class__:zt};var eo=function(){this.__pendingDownload=!1;na.call(this);this.__inputControl=window.document.createElement("input");this.__inputControl.setAttribute("type","file");this.__inputControl.onclick=function(a){a.cancelBubble=!0;a.stopPropagation()}};r["openfl.net.FileReference"]=eo;eo.__name__="openfl.net.FileReference";eo.__super__=na;eo.prototype=I(na.prototype,{creationDate:null,creator:null,data:null,modificationDate:null,name:null,
size:null,type:null,extension:null,__data:null,__path:null,__urlLoader:null,__inputControl:null,__pendingDownload:null,__pendingDefaultFileName:null,browse:function(a){var b=this,c=this.__path=this.__data=null;if(a!=null){c=[];for(var d=0;d<a.length;){var f=a[d];++d;c.push(Z.replace(Z.replace(f.extension,"*.","."),";",","))}c=c.join(",")}c!=null?this.__inputControl.setAttribute("accept",c):this.__inputControl.removeAttribute("accept");this.__inputControl.onchange=function(){if(b.__inputControl.files.length==
0)b.dispatchEvent(new ka("cancel"));else{var g=b.__inputControl.files[0],h=new Date(g.lastModified);b.modificationDate=h;b.creationDate=b.get_modificationDate();b.size=g.size;h=rg.extension(g.name);b.type="."+h;b.name=rg.withoutDirectory(g.name);b.__path=g.name;b.dispatchEvent(new ka("select"))}};this.__inputControl.click();return!0},cancel:function(){this.__urlLoader!=null&&this.__urlLoader.close()},download:function(a,b){this.__path=this.__data=null;this.__urlLoader=new Si;this.__urlLoader.dataFormat=
0;this.__urlLoader.addEventListener("open",m(this,this.urlLoader_onOpen));this.__urlLoader.addEventListener("complete",m(this,this.urlLoader_download_onComplete));this.__urlLoader.addEventListener("ioError",m(this,this.urlLoader_onIOError));this.__urlLoader.addEventListener("progress",m(this,this.urlLoader_onProgress));this.__urlLoader.load(a);a=new sp;a.onCancel.add(m(this,this.saveFileDialog_onCancel));a.onSelect.add(m(this,this.saveFileDialog_onSelect));a.browse(Pr.SAVE,b!=null?rg.extension(b):
null,b);this.__pendingDownload=!0;this.__pendingDefaultFileName=b},load:function(){var a=this,b=this.__inputControl.files[0],c=new FileReader;c.onload=function(d){a.data=cc.fromArrayBuffer(d.target.result);a.openFileDialog_onComplete()};c.onerror=function(d){a.dispatchEvent(new Eh("ioError"))};c.readAsArrayBuffer(b)},save:function(a,b){this.__path=this.__data=null;a!=null&&(a instanceof Pc?this.__data=a:(this.__data=new Pc(0),this.__data.writeUTFBytes(L.string(a))),a=new sp,a.onCancel.add(m(this,
this.saveFileDialog_onCancel)),a.onSave.add(m(this,this.saveFileDialog_onSave)),a.save(this.__data,b!=null?rg.extension(b):null,b))},upload:function(a,b,c){c==null&&(c=!1);b==null&&(b="Filedata");var d=this;c=new FileReader;c.onload=function(f){f=cc.fromArrayBuffer(f.target.result);d.__uploadFileBytes(a,b,f)};c.onerror=function(f){d.dispatchEvent(new Eh("ioError"))}},__uploadFileBytes:function(a,b,c){var d=Aa.typeof(a.data)==nb.TObject;if(d&&a.method=="GET"){for(var f="",g=A.fields(a.data),h=a.url.lastIndexOf("?")==
-1?"?":"&",l=0;l<g.length;){var k=g[l];++l;var q=A.field(a.data,k);f+=f.length==0?h:"&";f+=k+"="+q}a.url+=f}f=new Pc(0);if(d&&a.method=="POST")for(g=A.fields(a.data),l=0;l<g.length;)k=g[l],++l,q=A.field(a.data,k),f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n"),f.writeUTFBytes('Content-Disposition: form-data; name="'+k+'"\r\n\r\n'),f.writeUTFBytes(L.string(q)),f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="Filename"\r\n\r\n');
f.writeUTFBytes(this.get_name());f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="'+b+'"; ');f.writeUTFBytes('filename="'+this.get_name()+'"\r\n');f.writeUTFBytes("Content-Type: application/octet-stream\r\n\r\n");f.writeBytes(c,0,0);f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n");f.writeUTFBytes('Content-Disposition: form-data; name="Upload"\r\n\r\n');f.writeUTFBytes("Submit Query");
f.writeUTFBytes("\r\n");f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2--\r\n");a.data=f;a.method="POST";a.contentType="multipart/form-data; boundary=----------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2";a.requestHeaders=[new Xp("Accept","text/*"),new Xp("Cache-Control","no-cache")];b=new Si;b.dataFormat=0;b.addEventListener("open",m(this,this.urlLoader_onOpen));b.addEventListener("complete",m(this,this.urlLoader_upload_onComplete));b.addEventListener("httpResponseStatus",m(this,this.urlLoader_upload_onHttpResponseStatus));
b.addEventListener("httpStatus",m(this,this.urlLoader_upload_onHttpStatus));b.addEventListener("progress",m(this,this.urlLoader_onProgress));b.addEventListener("ioError",m(this,this.urlLoader_onIOError));b.load(a)},openFileDialog_onCancel:function(){this.dispatchEvent(new ka("cancel"))},openFileDialog_onComplete:function(){this.dispatchEvent(new ka("complete"))},openFileDialog_onSelect:function(a){this.name=rg.withoutDirectory(a);this.__path=a;this.dispatchEvent(new ka("select"))},saveFileDialog_onCancel:function(){this.dispatchEvent(new ka("cancel"))},
saveFileDialog_onSave:function(a){var b=this;rd.delay(function(){b.dispatchEvent(new ka("complete"))},1)},saveFileDialog_onSelect:function(a){this.dispatchEvent(new ka("select"))},urlLoader_download_onComplete:function(a){this.__urlLoader.data instanceof Pc?this.__data=this.__urlLoader.data:(this.__data=new Pc(0),this.__data.writeUTFBytes(L.string(this.__urlLoader.data)));this.__pendingDownload&&((new sp).save(this.__data,this.__pendingDefaultFileName!=null?rg.extension(this.__pendingDefaultFileName):
null,this.__pendingDefaultFileName),this.__pendingDownload=!1,this.__pendingDefaultFileName=null);this.dispatchEvent(a)},urlLoader_upload_onHttpResponseStatus:function(a){this.dispatchEvent(a)},urlLoader_upload_onHttpStatus:function(a){a.status==200?this.dispatchEvent(new ka("complete")):a.status!=0&&this.dispatchEvent(a)},urlLoader_upload_onComplete:function(a){this.dispatchEvent(new Nm("uploadCompleteData",!1,!1,a.currentTarget.data))},urlLoader_onIOError:function(a){this.__pendingDownload&&(this.__pendingDownload=
!1,this.__pendingDefaultFileName=null);this.dispatchEvent(a)},urlLoader_onProgress:function(a){this.dispatchEvent(a)},urlLoader_onOpen:function(a){this.dispatchEvent(a)},get_creationDate:function(){return this.creationDate},get_modificationDate:function(){return this.modificationDate},get_name:function(){return this.name},get_size:function(){return this.size},get_type:function(){return this.type},get_extension:function(){return this.extension},__class__:eo,__properties__:{get_extension:"get_extension",
get_type:"get_type",get_size:"get_size",get_name:"get_name",get_modificationDate:"get_modificationDate",get_creationDate:"get_creationDate"}});var Pv=function(){};r["openfl.net.IDynamicPropertyOutput"]=Pv;Pv.__name__="openfl.net.IDynamicPropertyOutput";Pv.__isInterface__=!0;Pv.prototype={writeDynamicProperty:null,__class__:Pv};var Qv=function(){};r["openfl.net.IDynamicPropertyWriter"]=Qv;Qv.__name__="openfl.net.IDynamicPropertyWriter";Qv.__isInterface__=!0;Qv.prototype={writeDynamicProperties:null,
__class__:Qv};var Vm=function(){na.call(this)};r["openfl.net.NetConnection"]=Vm;Vm.__name__="openfl.net.NetConnection";Vm.__super__=na;Vm.prototype=I(na.prototype,{connect:function(a,b,c,d,f,g){if(a!=null)throw la.thrown('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new Om("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:Vm});var go=function(a,b){na.call(this);this.__connection=a;this.__soundTransform=new ci;this.__video=window.document.createElement("video");
this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.setAttribute("crossorigin","anonymous");this.__video.addEventListener("error",m(this,this.video_onError),!1);this.__video.addEventListener("waiting",m(this,this.video_onWaiting),!1);this.__video.addEventListener("ended",m(this,this.video_onEnd),!1);this.__video.addEventListener("pause",m(this,this.video_onPause),!1);this.__video.addEventListener("seeking",m(this,this.video_onSeeking),!1);this.__video.addEventListener("playing",
m(this,this.video_onPlaying),!1);this.__video.addEventListener("timeupdate",m(this,this.video_onTimeUpdate),!1);this.__video.addEventListener("loadstart",m(this,this.video_onLoadStart),!1);this.__video.addEventListener("stalled",m(this,this.video_onStalled),!1);this.__video.addEventListener("durationchange",m(this,this.video_onDurationChange),!1);this.__video.addEventListener("canplay",m(this,this.video_onCanPlay),!1);this.__video.addEventListener("canplaythrough",m(this,this.video_onCanPlayThrough),
!1);this.__video.addEventListener("loadedmetadata",m(this,this.video_onLoadMetaData),!1)};r["openfl.net.NetStream"]=go;go.__name__="openfl.net.NetStream";go.__super__=na;go.prototype=I(na.prototype,{audioCodec:null,bufferLength:null,bufferTime:null,bytesLoaded:null,bytesTotal:null,checkPolicyFile:null,client:null,currentFPS:null,decodedFrames:null,liveDelay:null,objectEncoding:null,time:null,videoCode:null,__closed:null,__connection:null,__soundTransform:null,__timer:null,__video:null,close:function(){this.__video!=
null&&(this.__closed=!0,this.__video.pause(),this.__video.src="",this.time=0)},dispose:function(){this.close();this.__video=null},pause:function(){this.__video!=null&&this.__video.pause()},play:function(a,b,c,d,f,g){this.__video!=null&&(this.__video.volume=fe.__soundTransform.volume*this.__soundTransform.volume,typeof a=="string"?this.__video.src=a:this.__video.srcObject=a,this.__video.play())},requestVideoStatus:function(){var a=this;this.__video!=null&&(this.__timer==null&&(this.__timer=new rd(1)),
this.__timer.run=function(){a.__video.paused?a.__playStatus("NetStream.Play.pause"):a.__playStatus("NetStream.Play.playing");a.__timer.stop()})},resume:function(){this.__video!=null&&this.__video.play()},seek:function(a){this.__video!=null&&(a<0?a=0:a>this.__video.duration&&(a=this.__video.duration),this.__dispatchStatus("NetStream.SeekStart.Notify"),this.__video.currentTime=a)},togglePause:function(){this.__video!=null&&(this.__video.paused?this.__video.play():this.__video.pause())},__dispatchStatus:function(a){a=
new Om("netStatus",!1,!1,{code:a});this.__connection.dispatchEvent(a);this.dispatchEvent(a)},__playStatus:function(a){if(this.__video!=null&&this.client!=null)try{var b=this.client.onPlayStatus;b({code:a,duration:this.__video.duration,position:this.__video.currentTime,speed:this.__video.playbackRate,start:this.__video.startTime})}catch(c){Rb.lastError=c}},video_onCanPlay:function(a){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(a){this.__playStatus("NetStream.Play.canplaythrough")},
video_onDurationChange:function(a){this.__playStatus("NetStream.Play.durationchange")},video_onEnd:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__dispatchStatus("NetStream.Play.Complete");this.__playStatus("NetStream.Play.Complete")},video_onError:function(a){this.__dispatchStatus("NetStream.Play.Stop");this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(a){if(this.__video!=null&&this.client!=null)try{var b=this.client.onMetaData;b({width:this.__video.videoWidth,
height:this.__video.videoHeight,duration:this.__video.duration})}catch(c){Rb.lastError=c}},video_onLoadStart:function(a){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(a){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(a){this.__dispatchStatus("NetStream.Play.Start");this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(a){this.__playStatus("NetStream.Play.seeking");this.__dispatchStatus("NetStream.Seek.Complete")},video_onStalled:function(a){this.__playStatus("NetStream.Play.stalled")},
video_onTimeUpdate:function(a){this.__video!=null&&(this.time=this.__video.currentTime,this.__playStatus("NetStream.Play.timeupdate"))},video_onWaiting:function(a){this.__playStatus("NetStream.Play.waiting")},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){a!=null&&(this.__soundTransform.pan=a.pan,this.__soundTransform.volume=a.volume,this.__video!=null&&(this.__video.volume=fe.__soundTransform.volume*this.__soundTransform.volume));return a},get_speed:function(){return this.__video!=
null?this.__video.playbackRate:1},set_speed:function(a){return this.__video!=null?this.__video.playbackRate=a:a},__class__:go,__properties__:{set_speed:"set_speed",get_speed:"get_speed",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}});var Ge=function(){na.call(this);this.client=this;this.objectEncoding=Ge.defaultObjectEncoding};r["openfl.net.SharedObject"]=Ge;Ge.__name__="openfl.net.SharedObject";Ge.getLocal=function(a,b,c){c=" ~%&\\;:\"',<>?#".split("");var d=!0;
if(a==null||a=="")d=!1;else for(var f=0;f<c.length;){var g=c[f];++f;if(a.indexOf(g)>-1){d=!1;break}}if(!d)throw new Ld("Error #2134: Cannot create SharedObject.");Ge.__sharedObjects==null&&(Ge.__sharedObjects=new aa,Ha.current!=null&&Ha.current.onExit.add(Ge.application_onExit));c=b+"/"+a;if(!Object.prototype.hasOwnProperty.call(Ge.__sharedObjects.h,c)){d=null;try{var h=Lk.getLocalStorage();b==null&&(h!=null&&(d=h.getItem(window.location.href+":"+a),h.removeItem(window.location.href+":"+a)),b=window.location.pathname);
h!=null&&d==null&&(d=h.getItem(b+":"+a))}catch(k){Rb.lastError=k}h=new Ge;h.data={};h.__localPath=b;h.__name=a;if(d!=null&&d!="")try{var l=new Gg(d);l.setResolver({resolveEnum:Aa.resolveEnum,resolveClass:Ge.__resolveClass});h.data=l.unserialize()}catch(k){Rb.lastError=k}Ge.__sharedObjects.h[c]=h}return Ge.__sharedObjects.h[c]};Ge.getRemote=function(a,b,c,d){fd.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:808,className:"openfl.net.SharedObject",methodName:"getRemote"});return null};
Ge.__getPath=function(a,b){a=Hb.get_applicationStorageDirectory()+"/"+a+"/";b=Z.replace(b,"//","/");b=Z.replace(b,"//","/");Z.startsWith(b,"/")&&(b=X.substr(b,1,null));Z.endsWith(b,"/")&&(b=b.substring(0,b.length-1));if(b.indexOf("/")>-1){var c=b.split("/");b="";for(var d=0,f=c.length-1;d<f;){var g=d++;b+="#"+c[g]+"/"}b+=c[c.length-1]}return a+b+".sol"};Ge.__mkdir=function(a){};Ge.__resolveClass=function(a){return a!=null?(Z.startsWith(a,"neash.")&&(a=Z.replace(a,"neash.","openfl.")),Z.startsWith(a,
"native.")&&(a=Z.replace(a,"native.","openfl.")),Z.startsWith(a,"flash.")&&(a=Z.replace(a,"flash.","openfl.")),Z.startsWith(a,"openfl._v2.")&&(a=Z.replace(a,"openfl._v2.","openfl.")),Z.startsWith(a,"openfl._legacy.")&&(a=Z.replace(a,"openfl._legacy.","openfl.")),r[a]):null};Ge.application_onExit=function(a){a=Ge.__sharedObjects.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].flush()};Ge.__super__=na;Ge.prototype=I(na.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,
__name:null,clear:function(){this.data={};try{var a=Lk.getLocalStorage();a!=null&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){Rb.lastError=b}},close:function(){},connect:function(a,b){fd.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(A.fields(this.data).length==0)return 0;a=qg.run(this.data);try{var b=Lk.getLocalStorage();b!=null&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+
":"+this.__name,a))}catch(c){return Rb.lastError=c,1}return 0},send:function(a){fd.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:824,className:"openfl.net.SharedObject",methodName:"send"})},setDirty:function(a){},setProperty:function(a,b){this.data!=null&&(this.data[a]=b)},get_size:function(){try{var a=qg.run(this.data);return Ia.ofString(a).length}catch(b){return Rb.lastError=b,0}},__class__:Ge,__properties__:{get_size:"get_size"}});var Si=function(a){na.call(this);this.bytesTotal=
this.bytesLoaded=0;this.dataFormat=1;a!=null&&this.load(a)};r["openfl.net.URLLoader"]=Si;Si.__name__="openfl.net.URLLoader";Si.__super__=na;Si.prototype=I(na.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,close:function(){this.__httpRequest!=null&&this.__httpRequest.cancel()},load:function(a){var b=this,c=new ka("open");this.dispatchEvent(c);this.dataFormat==0?(c=new Nr,this.__prepareRequest(c,a),c.load().onProgress(m(this,this.httpRequest_onProgress)).onError(m(this,
this.httpRequest_onError)).onComplete(function(d){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=d;d=new ka("complete");b.dispatchEvent(d)})):(c=new Bn,this.__prepareRequest(c,a),c.load().onProgress(m(this,this.httpRequest_onProgress)).onError(m(this,this.httpRequest_onError)).onComplete(function(d){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=b.dataFormat==2?Rl._new(d):d;d=new ka("complete");b.dispatchEvent(d)}))},__dispatchResponseStatus:function(){var a=new Ml("httpResponseStatus",
!1,!1,this.__httpRequest.responseStatus);a.responseURL=this.__httpRequest.uri;var b=[];if(this.__httpRequest.enableResponseHeaders&&this.__httpRequest.responseHeaders!=null)for(var c=0,d=this.__httpRequest.responseHeaders;c<d.length;){var f=d[c];++c;b.push(new Xp(f.name,f.value))}a.responseHeaders=b;this.dispatchEvent(a)},__dispatchStatus:function(){var a=new Ml("httpStatus",!1,!1,this.__httpRequest.responseStatus);this.dispatchEvent(a)},__prepareRequest:function(a,b){this.__httpRequest=a;this.__httpRequest.uri=
b.url;this.__httpRequest.method=b.method;if(b.data!=null)if(Aa.typeof(b.data)==nb.TObject){var c=A.fields(b.data);for(a=0;a<c.length;){var d=c[a];++a;this.__httpRequest.formData.h[d]=A.field(b.data,d)}}else this.__httpRequest.data=b.data instanceof Ia?b.data:Ia.ofString(L.string(b.data));this.__httpRequest.contentType=b.contentType;if(b.requestHeaders!=null)for(a=0,c=b.requestHeaders;a<c.length;)d=c[a],++a,this.__httpRequest.headers.push(new yr(d.name,d.value));this.__httpRequest.followRedirects=
b.followRedirects;this.__httpRequest.timeout=b.idleTimeout|0;this.__httpRequest.manageCookies=b.manageCookies;this.__httpRequest.withCredentials=b.withCredentials;this.__httpRequest.userAgent=b.userAgent;this.__httpRequest.enableResponseHeaders=!0},httpRequest_onError:function(a){this.__dispatchResponseStatus();this.__dispatchStatus();this.__httpRequest instanceof ck?this.data=this.__httpRequest.responseData:this.__httpRequest instanceof Bn&&(this.data=this.__httpRequest.responseData);var b=a==403?
new dm("securityError"):new Eh("ioError");b.text=L.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=new kh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:Si});var Ve=function(a){this.withCredentials=!1;a!=null&&(this.url=a);this.contentType=null;this.followRedirects=Nl.followRedirects;this.idleTimeout=Nl.idleTimeout>0?Nl.idleTimeout:3E4;this.manageCookies=Nl.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=Nl.userAgent};
r["openfl.net.URLRequest"]=Ve;Ve.__name__="openfl.net.URLRequest";Ve.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,withCredentials:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:Ve};var Nl=function(){};r["openfl.net.URLRequestDefaults"]=Nl;Nl.__name__="openfl.net.URLRequestDefaults";var Xp=function(a,b){b==null&&(b="");a==null&&(a="");this.name=a;this.value=b};r["openfl.net.URLRequestHeader"]=Xp;Xp.__name__="openfl.net.URLRequestHeader";
Xp.prototype={name:null,value:null,__class__:Xp};var Rl={_new:function(a){var b={};a!=null&&Rl.decode(b,a);return b},decode:function(a,b){for(var c=A.fields(a),d=0;d<c.length;){var f=c[d];++d;A.deleteField(a,f)}c=b.split("&");for(d=0;d<c.length;)if(f=c[d],++d,b=f.indexOf("="),b>0){var g=X.substr(f,0,b);g=decodeURIComponent(g.split("+").join(" "));f=X.substr(f,b+1,null);a[g]=decodeURIComponent(f.split("+").join(" "))}else b!=0&&(a[decodeURIComponent(f.split("+").join(" "))]="")},toString:function(a){for(var b=
[],c=A.fields(a),d=0;d<c.length;){var f=c[d];++d;var g=A.field(a,f);if(f.indexOf("[]")>-1&&g instanceof Array){var h=[];for(g=Ga(g);g.hasNext();){var l=g.next();h.push(encodeURIComponent(l))}h=h.join("&amp;"+f+"=");b.push(encodeURIComponent(f)+"="+h)}else f=encodeURIComponent(f)+"=",h=L.string(g),b.push(f+encodeURIComponent(h))}return b.join("&")},__get:function(a,b){return A.field(a,b)},__set:function(a,b,c){a[b]=c}},Kn=function(a){this.parentDomain=a!=null?a:Kn.currentDomain};r["openfl.system.ApplicationDomain"]=
Kn;Kn.__name__="openfl.system.ApplicationDomain";Kn.prototype={parentDomain:null,getDefinition:function(a){return r[a]},hasDefinition:function(a){return r[a]!=null},__class__:Kn};var ud=function(){};r["openfl.system.Capabilities"]=ud;ud.__name__="openfl.system.Capabilities";ud.__properties__={get_version:"get_version",get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX",get_screenDPI:"get_screenDPI",get_pixelAspectRatio:"get_pixelAspectRatio",get_os:"get_os",
get_manufacturer:"get_manufacturer",get_language:"get_language",get_cpuArchitecture:"get_cpuArchitecture"};ud.hasMultiChannelAudio=function(a){return!1};ud.get_cpuArchitecture=function(){return"x86"};ud.get_language=function(){var a=wh.get_language(wh.get_currentLocale());if(a!=null)switch(a=a.toLowerCase(),a){case "cs":case "da":case "de":case "en":case "es":case "fi":case "fr":case "hu":case "it":case "ja":case "ko":case "nb":case "nl":case "pl":case "pt":case "ru":case "sv":case "tr":return a;
case "zh":a=wh.get_region(wh.get_currentLocale());if(a!=null)switch(a.toUpperCase()){case "HANT":case "TW":return"zh-TW"}return"zh-CN";default:return"xu"}return"en"};ud.get_manufacturer=function(){var a=Hb.get_platformName();return"OpenFL"+(a!=null?" "+a:"")};ud.get_os=function(){var a=Hb.get_platformLabel();return a!=null?a:""};ud.get_pixelAspectRatio=function(){return 1};ud.get_screenDPI=function(){var a=fd.application!=null?fd.application.__window:null,b=72;a!=null&&(b*=a.__scale);return b};ud.get_screenResolutionX=
function(){var a=fd.current.stage,b=0;if(a==null)return 0;if(a.window!=null){var c=a.window.get_display();c!=null&&(b=Math.ceil(c.currentMode.width*a.window.__scale))}return b>0?b:a.stageWidth};ud.get_screenResolutionY=function(){var a=fd.current.stage,b=0;if(a==null)return 0;if(a.window!=null){var c=a.window.get_display();c!=null&&(b=Math.ceil(c.currentMode.height*a.window.__scale))}return b>0?b:a.stageHeight};ud.get_version=function(){return"WEB "+(Z.replace("9.5.1",".",",")+",0")};var Nw=function(a,
b,c){a==null&&(a=!1);this.checkPolicyFile=a;this.securityDomain=c;this.applicationDomain=b;this.allowLoadBytesCodeExecution=this.allowCodeImport=!0};r["openfl.system.LoaderContext"]=Nw;Nw.__name__="openfl.system.LoaderContext";Nw.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,checkPolicyFile:null,securityDomain:null,__class__:Nw};var Yp=function(){};r["openfl.system.SecurityDomain"]=Yp;Yp.__name__="openfl.system.SecurityDomain";Yp.prototype={__class__:Yp};
var $d=function(a){hf.call(this,a)};r["openfl.text.Font"]=$d;$d.__name__="openfl.text.Font";$d.enumerateFonts=function(a){return $d.__registeredFonts};$d.fromBytes=function(a){var b=new $d;b.__fromBytes(cc.toBytes(a));return b};$d.fromFile=function(a){if(a==null)return null;var b=new $d;b.__fromFile(a);return b};$d.loadFromBytes=function(a){return hf.loadFromBytes(cc.toBytes(a)).then(function(b){var c=new $d;c.__fromLimeFont(b);return zc.withValue(c)})};$d.loadFromFile=function(a){return hf.loadFromFile(a).then(function(b){var c=
new $d;c.__fromLimeFont(b);return zc.withValue(c)})};$d.loadFromName=function(a){return hf.loadFromName(a).then(function(b){var c=new $d;c.__fromLimeFont(b);return zc.withValue(c)})};$d.registerFont=function(a){a=u.getClass(a)==null?u.__cast(Aa.createInstance(a,[]),$d):u.__cast(a,$d);a!=null&&($d.__registeredFonts.push(a),$d.__fontByName.h[a.name]=a)};$d.__super__=hf;$d.prototype=I(hf.prototype,{fontStyle:null,fontType:null,__initialized:null,__fromLimeFont:function(a){this.__copyFrom(a)},__initialize:function(){return this.__initialized},
get_fontName:function(){return this.name},set_fontName:function(a){return this.name=a},__class__:$d,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var qf=function(a,b,c,d,f,g,h,l,k,q,w,v,z){this.set_font(a);this.set_size(b);this.color=c;this.set_bold(d);this.set_italic(f);this.underline=g;this.url=h;this.target=l;this.align=k;this.leftMargin=q;this.rightMargin=w;this.indent=v;this.leading=z};r["openfl.text.TextFormat"]=qf;qf.__name__="openfl.text.TextFormat";qf.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,strikethrough:null,tabStops:null,target:null,underline:null,url:null,__ascent:null,__descent:null,__cacheKey:null,clone:function(){var a=new qf(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);a.align=this.align;a.leftMargin=this.leftMargin;a.rightMargin=this.rightMargin;a.indent=
this.indent;a.leading=this.leading;a.blockIndent=this.blockIndent;a.bullet=this.bullet;a.kerning=this.kerning;a.letterSpacing=this.letterSpacing;a.tabStops=this.tabStops;a.strikethrough=this.strikethrough;a.__ascent=this.__ascent;a.__descent=this.__descent;a.__cacheKey=this.__toCacheKey();return a},__merge:function(a){a.font!=null&&this.set_font(a.font);a.size!=null&&this.set_size(a.size);a.color!=null&&(this.color=a.color);a.bold!=null&&this.set_bold(a.bold);a.italic!=null&&this.set_italic(a.italic);
a.underline!=null&&(this.underline=a.underline);a.url!=null&&(this.url=a.url);a.target!=null&&(this.target=a.target);a.align!=null&&(this.align=a.align);a.leftMargin!=null&&(this.leftMargin=a.leftMargin);a.rightMargin!=null&&(this.rightMargin=a.rightMargin);a.indent!=null&&(this.indent=a.indent);a.leading!=null&&(this.leading=a.leading);a.blockIndent!=null&&(this.blockIndent=a.blockIndent);a.bullet!=null&&(this.bullet=a.bullet);a.kerning!=null&&(this.kerning=a.kerning);a.letterSpacing!=null&&(this.letterSpacing=
a.letterSpacing);a.tabStops!=null&&(this.tabStops=a.tabStops);a.strikethrough!=null&&(this.strikethrough=a.strikethrough);a.__ascent!=null&&(this.__ascent=a.__ascent);a.__descent!=null&&(this.__descent=a.__descent);this.__toCacheKey()},__toCacheKey:function(){return this.__cacheKey=""+this.font+this.size+L.string(this.bold)+L.string(this.italic)},set_font:function(a){this.font!=a&&(this.font=a,this.__toCacheKey());return this.font},set_size:function(a){this.size!=a&&(this.size=a,this.__toCacheKey());
return this.size},set_bold:function(a){this.bold!=a&&(this.bold=a,this.__toCacheKey());return this.bold},set_italic:function(a){this.italic!=a&&(this.italic=a,this.__toCacheKey());return this.italic},__class__:qf,__properties__:{set_size:"set_size",set_italic:"set_italic",set_font:"set_font",set_bold:"set_bold"}};var vk={fromString:function(a){switch(a){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}},
toString:function(a){switch(a){case 0:return"center";case 1:return"end";case 2:return"justify";case 3:return"left";case 4:return"right";case 5:return"start";default:return null}}},vv=function(a,b,c,d,f,g){this.x=a;this.width=b;this.height=c;this.ascent=d;this.descent=f;this.leading=g};r["openfl.text.TextLineMetrics"]=vv;vv.__name__="openfl.text.TextLineMetrics";vv.prototype={ascent:null,descent:null,height:null,leading:null,width:null,x:null,__class__:vv};var Et=function(a){this.importRegex=new sb("@import .*?;",
"ig");this.commentRegex="(\\/\\*[\\s\\S]*?\\*\\/)";this.combinedCSSRegex="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)*?})";this.keyframeRegex="((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.mediaQueryRegex="((@media [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.cssRegex=new sb("([\\s\\S]*?){([\\s\\S]*?)*}","ig");this.keyframeStatements=[];this.importStatements=[]};r["openfl.text._internal.CSSParser"]=Et;Et.__name__="openfl.text._internal.CSSParser";
Et.prototype={source:null,options:null,importStatements:null,keyframeStatements:null,cssRegex:null,mediaQueryRegex:null,keyframeRegex:null,combinedCSSRegex:null,commentRegex:null,importRegex:null,stripComments:function(a){return a.replace(new RegExp(this.commentRegex,"ig"),"")},parseRules:function(a){for(var b=new sb("(\\*?[-#/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)+((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)","g"),c=this.getMatches(b,a),d=[],f=0,g=c.length;f<g;){a=f++;if(!b.match(c[a]))return null;
var h=a=b.matched(0).split("\r\n").join("\n");h=Z.trim(h);if(h.indexOf(":")!=-1){if(a=Z.trim(h.split(":")[0]),h=Z.trim(h.split(":")[1]),!(a.length<1||h.length<1)){var l=new aa;l.h.type="declaration";l.h.property=a;l.h.value=h;d.push(l)}}else X.substr(Z.trim(h),0,7)=="base64,"?(a=h+Z.trim(h),d[d.length-1].h.value=a):h.length>0&&(a=new aa,a.h.type="declaration",a.h.property="",a.h.value=h,a.h.defective=!0,d.push(a))}return d},findCorrespondingRule:function(a,b,c){for(var d=null,f=0,g=a.length;f<g;){var h=
f++;if(a[h].h.directive==b&&(d=a[h],c==a[h].h.value))break}return d},findBySelector:function(a,b,c){c==null&&(c=!1);for(var d=[],f=0,g=a.length;f<g;){var h=f++;c==0?a[h].h.selector==b&&d.push(a[h]):u.__cast(a[h].h.selector,String).indexOf(b)!=-1&&d.push(a[h])}if(b=="@imports"||d.length<2)return d;a=d[0];f=0;for(g=d.length;f<g;)h=f++,this.intelligentCSSPush([a],d[h]);return[a]},deleteBySelector:function(a,b){for(var c=[],d=0,f=a.length;d<f;){var g=d++;a[g].h.selector!=b&&c.push(a[g])}return c},compress:function(a){for(var b=
[],c=Object.create(null),d=0,f=a.length;d<f;){var g=d++;g=a[g];c[g.h.selector]!=1&&(g=this.findBySelector(a,g.h.selector),g.length!=0&&(b=b.concat(g),c.selector=!0))}return b},diff:function(a,b){if(a.h.selector==b.h.selector||a.h.type=="media"||b.h.type=="media")return null;var c=new aa;c.h.selector=a.h.selector;c.h.rules=[];var d=c;new aa;new aa;var f=u.__cast(a.h.rules,Array).length;var g=u.__cast(b.h.rules,Array).length;c=0;for(var h=f;c<h;){c++;f=u.__cast(a.h.rules,Array)[1];var l=this.findCorrespondingRule(b.h.rules,
a.h.directive,a.h.value);l==null?u.__cast(d.h.rules,Array).push(f):f.h.value!=l.h.value&&u.__cast(d.h.rules,Array).push(f)}c=0;for(h=g;c<h;)c++,l=u.__cast(a.h.rules,Array)[1],f=this.findCorrespondingRule(a.h.rules,b.h.directive),f==null&&(l.h.type="DELETED",u.__cast(d.h.rules,Array).push(l));return u.__cast(d.h.rules,Array).length==0?null:d},intelligentMerge:function(a,b,c){c==null&&(c=!1);for(var d=0,f=b.length;d<f;){var g=d++;this.intelligentCSSPush(a,b[g],c)}d=0;for(f=a.length;d<f;)g=d++,b=a[g],
b.h.type!="media"&&b.h.type!="keyframes"&&(c=this.compactRules(b.h.rules),b.h.rules=c)},intelligentCSSPush:function(a,b,c){c==null&&(c=!1);var d=null;if(c==0){c=0;for(var f=a.length;c<f;){var g=c++;if(a[g].h.selector==b.h.selector){d=a[g];break}}}else for(c=a.length-1;c>-1;){if(a[c].h.selector==b.h.selector){d=a[c];break}--c}if(d==null)a.push(b);else if(b.h.type!="media")for(a=b.h.rules,c=0,f=a.length;c<f;)g=c++,b=a[g],g=this.findCorrespondingRule(d.h.rules,b.h.directive),g==null?d.h.rules.push(b):
b.h.type=="DELETED"?g.h.type="DELETED":g.h.value=b.h.value;else c=u.__cast(d.h.subStyles,Array).concat(b.h.subStyles),d.h.value=c},compactRules:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;a[f].h.type!="DELETED"&&b.push(a[f])}return b},getImports:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;a[f].h.type=="imports"&&b.push(a[f].h.styles)}return b},parse:function(a){if(a==null)return null;var b=RegExp("^\\s+|\\s+$","g");a=a.replace(b,"");for(var c=[],d=this.importRegex.match(a);d;){var f=
this.importRegex.matched(0);if(f!=null){this.importStatements.push(f);var g=new aa;g.h.selector="@imports";g.h.type="imports";g.h.styles=f;c.push(g)}else break}a=a.replace(this.importRegex.r,"");for(f=new sb(this.keyframeRegex,"gi");f.match(a);){d=this.getMatches(f,a);if(d==null)break;g=new aa;g.h.selectors="@keyframes";g.h.type="keyframes";var h=f.matchedRight();g.h.styles=h;c.push(g)}a=a.replace(f.r,"");for(g=new sb(this.combinedCSSRegex,"gi");g.match(a);){d=this.getMatches(g,a);if(d==null)break;
a="";g=0;for(f=d.length;g<f;){var l=g++;h=new sb("^([^{]+)","");if(h.match(d[l]))h.matched(0)!=null&&(a=Z.trim(h.matched(0).split("\r\n").join("\n"))),b=new sb(this.commentRegex,"gi"),l=this.getMatches(b,a),l!=null&&(a=Z.trim(a.replace(b.r,""))),b=RegExp("\n+",""),a=a.replace(b,"\n"),a.indexOf("@media")!=-1?(b=new aa,b.h.selectors=a,b.h.type="media",h=this.parse(h.matchedRight()+"\n}"),b.h.subStyles=h,h=b,l!=null&&(h.h.comments=l[0]),c.push(h)):h.matchedRight()!=null&&(h=this.parseRules(h.matchedRight()),
b=new aa,b.h.selectors=a,b.h.type="rule",b.h.declarations=h,h=b,a=="@font-face"&&(h.h.type="font-face"),l!=null&&(h.h.comments=l[0]),c.push(h));else break}break}g=new aa;g.h.type="stylesheet";g.h.rules=c;g.h.parsingErrors=[];return g},getMatches:function(a,b,c){c==null&&(c=0);for(var d=[];a.match(b);)b=Z.trim(a.matched(c)),d.push(b),b=Z.trim(a.matchedRight());return d.length==0?null:d},__class__:Et};var Zp=function(a,b){this.__collisions=[];this.__wordMap=new we;this.set(a,b)};r["openfl.text._internal.CacheMeasurement"]=
Zp;Zp.__name__="openfl.text._internal.CacheMeasurement";Zp.prototype={__collisions:null,__wordMap:null,hash:null,set:function(a,b){this.__addCollision(a,b)},get:function(a){return this.__collisions.length>1?this.__wordMap.h[this.__collisions.indexOf(a)]:this.__wordMap.h[0]},__addCollision:function(a,b){if(!this.exists(a)){var c=this.__wordMap;a=this.__collisions.push(a)-1;c.h[a]=b}},exists:function(a){return this.__collisions.length==0?!1:this.__collisions.indexOf(a)>-1},__class__:Zp};var Rv=function(a,
b,c){this.glyph=a;this.advance=b;this.offset=c!=null?c:new Ff};r["openfl.text._internal.GlyphPosition"]=Rv;Rv.__name__="openfl.text._internal.GlyphPosition";Rv.prototype={advance:null,glyph:null,offset:null,__class__:Rv};var Zb=function(){};r["openfl.text._internal.HTMLParser"]=Zb;Zb.__name__="openfl.text._internal.HTMLParser";Zb.parse=function(a,b,c,d,f){a=b?a.replace(Zb.__regexBreakTag.r,"\n"):a.replace(Zb.__regexBreakTag.r,"");a=a.replace(Zb.__regexEntityNbsp.r," ");a=Zb.__regexCharEntity.map(a,
function(T){var fa=T.matched(1),da=T.matched(2);return fa!=null&&(fa=L.parseInt(fa),fa!=null)?String.fromCodePoint(fa):da!=null&&(da=L.parseInt("0"+da),da!=null)?String.fromCodePoint(da):T.matched(0)});var g=a.split("<");if(g.length==1){a=Zb.__htmlUnescape(a.replace(Zb.__regexHTMLTag.r,""));if(f.get_length()>1){var h=f.get_length()-1;f.__tempIndex=1;for(var l=0,k=[];l<k.length;){var q=k[l++];f.insertAt(f.__tempIndex,q);f.__tempIndex++}f.splice(f.__tempIndex,h)}b=f.get(0);b.format=d;b.start=0;b.end=
a.length}else{h=f.get_length();l=f.__tempIndex=0;for(k=[];l<k.length;)q=k[l++],f.insertAt(f.__tempIndex,q),f.__tempIndex++;f.splice(f.__tempIndex,h);a="";h=[d.clone()];l=[];q=!1;for(k=0;k<g.length;){var w=g[k];++k;if(w!=""){var v=X.substr(w,0,1)=="/",z=w.indexOf(">"),n=z+1,E=w.indexOf(" ");E=w.substring(v?1:0,E>-1&&E<z?E:z).toLowerCase();if(v)l.length!=0&&E==l[l.length-1]&&(l.pop(),h.pop(),v=h[h.length-1].clone(),(E=="p"||E=="li")&&f.get_length()>0&&(b&&(a+="\n"),q=!0),n<w.length&&(q=Zb.__htmlUnescape(X.substr(w,
n,null)),f.push(new yh(v,a.length,a.length+q.length)),a+=q,q=!1));else if(v=h[h.length-1].clone(),z>-1){c!=null&&(c.__applyStyle(E,v),Zb.__regexClass.match(w)&&(c.__applyStyle("."+Zb.__getAttributeMatch(Zb.__regexClass),v),c.__applyStyle(E+"."+Zb.__getAttributeMatch(Zb.__regexClass),v)));switch(E){case "a":c!=null&&c.__applyStyle("a:link",v);Zb.__regexHref.match(w)&&(v.url=Zb.__getAttributeMatch(Zb.__regexHref));break;case "b":v.set_bold(!0);break;case "em":case "i":v.set_italic(!0);break;case "font":Zb.__regexFace.match(w)&&
v.set_font(Zb.__getAttributeMatch(Zb.__regexFace));Zb.__regexColor.match(w)&&(v.color=L.parseInt("0x"+Zb.__getAttributeMatch(Zb.__regexColor)));if(Zb.__regexSize.match(w)){z=Zb.__getAttributeMatch(Zb.__regexSize);var H=X.cca(z,0);H==43||H==45?v.set_size((h.length>=2?h[h.length-2]:d).size+L.parseInt(z)):v.set_size(L.parseInt(z))}break;case "li":f.get_length()>0&&!q&&(a+="\n");z=v.clone();z.underline=!1;f.push(new yh(z,a.length,a.length+2));a+="\u2022 ";break;case "p":f.get_length()>0&&!q&&(a+="\n");
Zb.__regexAlign.match(w)&&(z=Zb.__getAttributeMatch(Zb.__regexAlign).toLowerCase(),v.align=vk.fromString(z));break;case "textformat":Zb.__regexBlockIndent.match(w)&&(v.blockIndent=L.parseInt(Zb.__getAttributeMatch(Zb.__regexBlockIndent)));Zb.__regexIndent.match(w)&&(v.indent=L.parseInt(Zb.__getAttributeMatch(Zb.__regexIndent)));Zb.__regexLeading.match(w)&&(v.leading=L.parseInt(Zb.__getAttributeMatch(Zb.__regexLeading)));Zb.__regexLeftMargin.match(w)&&(v.leftMargin=L.parseInt(Zb.__getAttributeMatch(Zb.__regexLeftMargin)));
Zb.__regexRightMargin.match(w)&&(v.rightMargin=L.parseInt(Zb.__getAttributeMatch(Zb.__regexRightMargin)));if(Zb.__regexTabStops.match(w)){z=Zb.__getAttributeMatch(Zb.__regexTabStops).split(" ");H=[];for(var J=0;J<z.length;){var Q=z[J];++J;H.push(L.parseInt(Q))}v.tabStops=H}break;case "u":v.underline=!0}h.push(v);l.push(E);n<w.length&&(q=Zb.__htmlUnescape(w.substring(n)),f.push(new yh(v,a.length,a.length+q.length)),a+=q,q=!1)}else q=Zb.__htmlUnescape(w),f.push(new yh(v,a.length,a.length+q.length)),
a+=q,q=!1}}f.get_length()==0&&f.push(new yh(h[0],0,0))}return a};Zb.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};Zb.__htmlUnescape=function(a){a=a.replace(Zb.__regexEntityApos.r,"'");return Z.htmlUnescape(a)};var Yn=function(){this.__shortWordMap=new aa;this.__longWordMap=new aa};r["openfl.text._internal.ShapeCache"]=Yn;Yn.__name__="openfl.text._internal.ShapeCache";Yn.hashFunction=function(a){for(var b=0,c,d=0,f=a.length;d<f;)c=d++,c=X.cca(a,c),b=(b<<5)-b+
c,b|=0;return b};Yn.prototype={__shortWordMap:null,__longWordMap:null,cache:function(a,b,c){a=a.format.__cacheKey;return c.length>15?this.__cacheLongWord(c,a,b):this.__cacheShortWord(c,a,b)},__cacheShortWord:function(a,b,c){if(Object.prototype.hasOwnProperty.call(this.__shortWordMap.h,b)){var d=this.__shortWordMap.h[b];if(Object.prototype.hasOwnProperty.call(d.h,a))return d.h[a];var f=c();d.h[a]=f}else d=new aa,f=c(),d.h[a]=f,this.__shortWordMap.h[b]=d;return c()},__cacheLongWord:function(a,b,c){var d=
Yn.hashFunction(a);if(Object.prototype.hasOwnProperty.call(this.__longWordMap.h,b)){var f=this.__longWordMap.h[b];if(f.h.hasOwnProperty(d)){var g=f.h[d];if(g.exists(a))return g.get(a);g.set(a,c())}else g=new Zp(a,c()),f.h[d]=g}else f=new we,g=new Zp(a,c()),g.hash=d,f.h[d]=g,this.__longWordMap.h[b]=f;return c()},__class__:Yn};var Oc=function(a){this.__shapeCache=new Yn;this.textField=a;this.height=this.width=100;this.set_text("");this.bounds=new Ea(0,0,0,0);this.textBounds=new Ea(0,0,0,0);this.type=
0;this.autoSize=2;this.embedFonts=!1;this.selectable=!0;this.borderColor=0;this.border=!1;this.backgroundColor=16777215;this.background=!1;this.gridFitType=1;this.maxChars=0;this.multiline=!1;this.numLines=1;this.scrollH=this.sharpness=0;this.set_scrollV(1);this.wordWrap=!1;this.lineAscents=gb.toFloatVector(null);this.lineBreaks=gb.toIntVector(null);this.lineDescents=gb.toFloatVector(null);this.lineLeadings=gb.toFloatVector(null);this.lineHeights=gb.toFloatVector(null);this.lineWidths=gb.toFloatVector(null);
this.layoutGroups=gb.toObjectVector(null);this.textFormatRanges=gb.toObjectVector(null);Oc.__context==null&&(Oc.__context=window.document.createElement("canvas").getContext("2d"))};r["openfl.text._internal.TextEngine"]=Oc;Oc.__name__="openfl.text._internal.TextEngine";Oc.findFont=function(a){return $d.__fontByName.h[a]};Oc.findFontVariant=function(a){var b=a.font,c=a.bold;a=a.italic;b==null&&(b="_serif");var d=Z.replace(Z.replace(b," Normal","")," Regular","");return c&&a&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,
d+" Bold Italic")?Oc.findFont(d+" Bold Italic"):c&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,d+" Bold")?Oc.findFont(d+" Bold"):a&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,d+" Italic")?Oc.findFont(d+" Italic"):Oc.findFont(b)};Oc.getDefaultFont=function(a,b,c){Oc.__defaultFonts==null&&(Oc.__defaultFonts=new aa);a=Oc.__defaultFonts.h[a];return a==null?null:b&&c&&a.boldItalic!=null?a.boldItalic:c&&a.italic!=null?a.italic:b&&a.bold!=null?a.bold:a.normal};Oc.getFormatHeight=function(a){var b=
Oc.getFont(a);Oc.__context.font=b;b=Oc.getFontInstance(a);if(a.__ascent!=null){var c=a.size*a.__ascent;b=a.size*a.__descent}else b!=null&&b.unitsPerEM!=0?(c=b.ascender/b.unitsPerEM*a.size,b=Math.abs(b.descender/b.unitsPerEM*a.size)):(c=a.size,b=a.size*.185);return c+b+a.leading};Oc.getFont=function(a){var b=a.font,c=a.bold,d=a.italic;b==null&&(b="_serif");var f=Z.replace(Z.replace(b," Normal","")," Regular","");c&&d&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,f+" Bold Italic")?(b=f+" Bold Italic",
d=c=!1):c&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,f+" Bold")?(b=f+" Bold",c=!1):d&&Object.prototype.hasOwnProperty.call($d.__fontByName.h,f+" Italic")?(b=f+" Italic",d=!1):(c&&(b.indexOf(" Bold ")>-1||Z.endsWith(b," Bold"))&&(c=!1),d&&(b.indexOf(" Italic ")>-1||Z.endsWith(b," Italic"))&&(d=!1));c=(d?"italic ":"normal ")+"normal "+(c?"bold ":"normal ");c+=a.size+"px";c+="/"+(a.size+3)+"px ";switch(b){case "_sans":a="sans-serif";break;case "_serif":a="serif";break;case "_typewriter":a=
"monospace";break;default:a="'"+b.replace(RegExp("^[\\s'\"]+(.*)[\\s'\"]+$",""),"$1")+"'"}return c+=""+a};Oc.getFontInstance=function(a){return Oc.findFontVariant(a)};Oc.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,caretIndex: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,restrict: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,__cursorTimer:null,__hasFocus:null,__isKeyDown:null,__measuredHeight:null,__measuredWidth:null,__restrictRegexp:null,__selectionStart:null,__shapeCache:null,__showCursor:null,__textFormat:null,__textLayout:null,__texture:null,__useIntAdvances:null,
__cairoFont:null,__font:null,createRestrictRegexp:function(a){var b="",c=!1;a=(new sb("\\^([^\\^]+)","gu")).map(a,function(f){if(c)return c=!c,f.matched(1);b+=f.matched(1);c=!c;return""});var d=[];a.length>0&&d.push("[^"+a+"]");b.length>0&&d.push("["+b+"]");return new sb("("+d.join("|")+")","g")},getBounds:function(){var a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a;a=this.width;for(var b=this.height,c=this.layoutGroups.get_length()-1,d=0,f=this.layoutGroups.get_length();d<
f;){var g=d++,h=this.layoutGroups.get(g);if(g!=c||h.startIndex!=h.endIndex||this.type==1)h.offsetX<a&&(a=h.offsetX),h.offsetY<b&&(b=h.offsetY)}a>=this.width&&(a=2);b>=this.height&&(b=2);this.textBounds.setTo(Math.max(a-2,0),Math.max(b-2,0),Math.min(this.textWidth+4,this.bounds.width),Math.min(this.textHeight*1.185+4,this.bounds.height))},getLine:function(a){return a<0||a>this.lineBreaks.get_length()+1?null:this.lineBreaks.get_length()==0?this.text:this.text.substring(a>0?this.lineBreaks.get(a-1):
0,this.lineBreaks.get(a))},getLineBreaks:function(){this.lineBreaks.set_length(0);for(var a=-1,b;a<this.text.length;)if(b=this.text.indexOf("\n",a+1),a=this.text.indexOf("\r",a+1),a=a==-1?b:b==-1?a:a<b?a:b,a>-1)this.lineBreaks.push(a);else break},getLineBreakIndex:function(a){a==null&&(a=0);for(var b=this.lineBreaks.iterator();b.hasNext();){var c=b.next();if(c>=a)return c}return-1},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 a=0,b=0,c=null,d=0,f=0;this.textHeight=this.textWidth=0;this.numLines=1;this.maxScrollH=0;for(var g=this.layoutGroups.get_length()-1,h=0,l=this.layoutGroups.get_length();h<l;){var k=h++;var q=this.layoutGroups.get(k);if(k!=g||q.startIndex!=q.endIndex||this.type==1){for(;q.lineIndex>this.numLines-1;)this.lineAscents.push(a),this.lineDescents.push(b),this.lineLeadings.push(c!=null?c:0),this.lineHeights.push(d),this.lineWidths.push(f),
b=a=0,c=null,f=d=0,this.numLines++;a=Math.max(a,q.ascent);b=Math.max(b,q.descent);c=c==null?q.leading:Math.max(c,q.leading)|0;d=Math.max(d,q.height);f=q.offsetX-2+q.width;f>this.textWidth&&(this.textWidth=f);k=Math.ceil(q.offsetY-2+q.ascent+q.descent);k>this.textHeight&&(this.textHeight=k)}}this.textHeight==0&&this.textField!=null&&this.type==1&&(a=this.textField.__textFormat,b=Oc.getFontInstance(a),a.__ascent!=null?(g=a.size*a.__ascent,h=a.size*a.__descent):b!=null&&b.unitsPerEM!=0?(g=b.ascender/
b.unitsPerEM*a.size,h=Math.abs(b.descender/b.unitsPerEM*a.size)):(g=a.size,h=a.size*.185),c=a.leading,a=g,b=h,this.textHeight=k=Math.ceil(g+h));this.lineAscents.push(a);this.lineDescents.push(b);this.lineLeadings.push(c!=null?c:0);this.lineHeights.push(d);this.lineWidths.push(f);this.numLines==1&&c>0&&(this.textHeight+=c);if(this.autoSize!=2)switch(this.autoSize){case 0:case 1:case 3:this.wordWrap||(this.width=this.textWidth+4),this.height=this.textHeight+4,this.bottomScrollV=this.numLines}this.maxScrollH=
this.textWidth>this.width-4?this.textWidth-this.width+4|0:0;this.scrollH>this.maxScrollH&&(this.scrollH=this.maxScrollH)},getLayoutGroups:function(){var a=this;this.layoutGroups.set_length(0);if(this.text!=null&&this.text!=""){var b=-1,c=null,d=null,f=Jc.__defaultTextFormat.clone(),g=0,h=0,l=0,k=0,q=3,w=0,v=0,z=0,n=0,E=!0,H=null,J=null,Q=0,T=0,fa=0,da=-2,pa=-1,xa=this.text.indexOf(" "),Ua=0,Sa=Ua<this.lineBreaks.get_length()?this.lineBreaks.get(Ua):-1,Ka=0,hb=0,Ra=0,Jb=0,vb=function(Rc,ad,Nd){var Hc=
function(){var Fd=[];if(a.__useIntAdvances==null){var Te=new sb("Trident/7.0","");a.__useIntAdvances=Te.match(sa.navigator.userAgent)}if(a.__useIntAdvances){var Vf=0;Te=ad;for(var Jg=Nd;Te<Jg;){var bf=Te++;bf=a.measureText(Rc.substring(ad,bf+1));Fd.push(bf-Vf);Vf=bf}}else for(Te=ad,Jg=Nd;Te<Jg;)bf=Te++,bf<Rc.length-1?(Vf=a.measureText(Rc.charAt(bf+1)),Vf=a.measureText(X.substr(Rc,bf,2))-Vf):Vf=Oc.__context.measureText(Rc.charAt(bf)).width,Fd.push(Vf);return Fd};return f.align==2?Hc():a.__shapeCache.cache(c,
Hc,Rc.substring(ad,Nd))},Cb=function(Rc){for(var ad=0,Nd=0;Nd<Rc.length;){var Hc=Rc[Nd];++Nd;ad+=Hc}return ad},pc=function(){return 2+z+w+(E?v:0)},qd=function(){return a.width-2-n-pc()},Gb=function(Rc,ad){H==null||H.startIndex!=H.endIndex?(H=new it(c.format,Rc,ad),a.layoutGroups.push(H)):(H.format=c.format,H.startIndex=Rc,H.endIndex=ad)},nd=function(){f.__ascent!=null?(h=f.size*f.__ascent,k=f.size*f.__descent):d!=null&&d.unitsPerEM!=0?(h=d.ascender/d.unitsPerEM*f.size,k=Math.abs(d.descender/d.unitsPerEM*
f.size)):(h=f.size,k=f.size*.185);g=f.leading;T=Math.ceil(h+k+g);T>fa&&(fa=T);h>l&&(l=h)},le=function(){E=!0;q=f.align!=null?f.align:3;w=f.blockIndent!=null?f.blockIndent:0;v=f.indent!=null?f.indent:0;z=f.leftMargin!=null?f.leftMargin:0;n=f.rightMargin!=null?f.rightMargin:0},Pf=function(){if(b<a.textFormatRanges.get_length()-1){b+=1;c=a.textFormatRanges.get(b);f.__merge(c.format);var Rc=Oc.getFont(f);Oc.__context.font=Rc;d=Oc.getFontInstance(f);return!0}return!1},mf=function(Rc,ad){if(Rc>=ad)J=[],
Q=0;else if(ad<=c.end)J=vb(a.text,Rc,ad),Q=Cb(J);else{var Nd=Rc;Rc=c.end;var Hc=0;J=[];for(Q=0;;)if(Nd!=Rc&&(Nd=vb(a.text,Nd,Rc),J=J.concat(Nd)),Rc!=ad){if(!Pf()){Mb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1186,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}Nd=Rc;Rc=ad<c.end?ad:c.end;++Hc}else{Q=Cb(J);break}b-=Hc+1;
Pf()}},Ig=function(Rc){if(Rc<=c.end){J=vb(a.text,Ra,Rc);Q=Cb(J);Gb(Ra,Rc);H.positions=J;var ad=Ka,Nd=pc();H.offsetX=ad+Nd;H.ascent=h;H.descent=k;H.leading=g;H.lineIndex=Jb;H.offsetY=hb+2;H.width=Q;H.height=T;Ka+=Q;Rc==c.end&&(H=null,Pf(),nd())}else for(;;){var Hc=Rc<c.end?Rc:c.end;Ra!=Hc&&(J=vb(a.text,Ra,Hc),Q=Cb(J),Gb(Ra,Hc),H.positions=J,ad=Ka,Nd=pc(),H.offsetX=ad+Nd,H.ascent=h,H.descent=k,H.leading=g,H.lineIndex=Jb,H.offsetY=hb+2,H.width=Q,H.height=T,Ka+=Q,Ra=Hc);Hc==c.end&&(H=null);if(Hc==Rc)break;
if(!Pf()){Mb.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1274,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}nd()}Ra=Rc},Af=function(){nd();for(var Rc=a.layoutGroups.get_length();--Rc>-1;){var ad=a.layoutGroups.get(Rc);if(ad.lineIndex<Jb)break;ad.lineIndex>Jb||(ad.ascent=l,ad.height=fa)}hb+=fa;fa=l=0;Jb+=1;Ka=0;E=!1},Xd=
function(Rc){if(a.width>=4&&a.wordWrap){var ad=J;var Nd=Cb(ad);for(var Hc=ad.length-1;Hc>=0;){var Fd=X.cca(a.text,Ra+Hc);if(Fd!=32&&Fd!=9)break;Nd-=ad[Hc];--Hc}for(;ad.length>0&&Ka+Nd>qd();){for(Fd=Hc=Nd=0;Ka+Fd<qd();){var Te=ad[Hc];Te==0?(++Hc,++Nd):(Fd+=Te,++Hc)}if(Hc==Nd)Hc=Nd+1;else for(;Hc>1&&Ka+Fd>qd();)--Hc,Hc-Nd>0?(mf(Ra,Ra+Hc-Nd),Fd=Q):(Hc=1,Nd=0,mf(Ra,Ra+1),Fd=0);ad=Ra+Hc-Nd;Ig(ad);Af();mf(ad,Rc);ad=J;Nd=Q}}Ig(Rc)};Pf();le();nd();for(var Yd,Uk=this.text.length+1;Ra<Uk;)if(Sa>-1&&(xa==-1||
Sa<xa))Ra<=Sa?(mf(Ra,Sa),Xd(Sa),H=null):H!=null&&H.startIndex!=H.endIndex&&(H.endIndex==xa&&(H.width-=H.positions[H.positions.length-1]),H=null),Af(),c.end==Sa&&(Pf(),nd()),Ra=Sa+1,pa=Sa,++Ua,Sa=Ua<this.lineBreaks.get_length()?this.lineBreaks.get(Ua):-1,le();else if(xa>-1)for(H!=null&&H.startIndex!=H.endIndex&&(H=null),Yd=!1;Ra<this.text.length;){var jd=-1;xa==-1?jd=Sa:(jd=xa+1,Sa>-1&&Sa<jd&&(jd=Sa));jd==-1&&(jd=this.text.length);mf(Ra,jd);if(q==2){if(J.length>0&&Ra==da){Ra+=1;var be=J.shift();Q-=
be;Ka+=be}J.length>0&&jd==xa+1&&(--jd,be=J.pop(),Q-=be)}this.wordWrap&&Ka+Q>qd()&&(Yd=!0,J.length>0&&jd==xa+1&&Ka+Q-J[J.length-1]<=qd()&&(Yd=!1));if(Yd){q!=2&&(H!=null||this.layoutGroups.get_length()>0)&&(Yd=H,Yd==null&&(Yd=this.layoutGroups.get(this.layoutGroups.get_length()-1)),Yd.width-=Yd.positions[Yd.positions.length-1],Yd.endIndex--);Yd=this.layoutGroups.get_length()-1;for(be=0;Yd>=0;){H=this.layoutGroups.get(Yd);if(Yd>0&&H.startIndex>da)++be;else break;--Yd}Ra==da+1&&Af();Ka=0;if(be>0){Yd=
this.layoutGroups.get(this.layoutGroups.get_length()-be).offsetX;be=this.layoutGroups.get_length()-be;for(var Gc=this.layoutGroups.get_length();be<Gc;){var hk=be++;H=this.layoutGroups.get(hk);H.offsetX-=Yd;H.offsetY=hb+2;H.lineIndex=Jb;Ka+=H.width}}Xd(jd);Yd=!1}else H!=null&&Ra==xa&&da!=xa-1?(q!=2&&(H.endIndex=xa,H.positions=H.positions.concat(J),H.width+=Q),Ka+=Q,Ra=jd):H==null||q==2?(Xd(jd),jd==this.text.length&&Af()):(be=jd<c.end?jd:c.end,be<jd&&(J=vb(this.text,Ra,be),Q=Cb(J)),H.endIndex=be,H.positions=
H.positions.concat(J),H.width+=Q,Ka+=Q,be==c.end&&(H=null,Pf(),nd(),Ra=be,be!=jd&&Ig(jd)),Sa==jd&&++jd,Ra=jd,jd==this.text.length&&(Af(),Sa!=-1&&(pa=Sa,++Ua,Sa=Ua<this.lineBreaks.get_length()?this.lineBreaks.get(Ua):-1)));jd=this.text.indexOf(" ",Ra);Sa==da&&(H.endIndex=Sa,Sa-H.startIndex-H.positions.length<0&&H.positions.push(0),Ra=Sa+1);da=xa;xa=jd;if(Sa>-1&&Sa<=Ra&&(xa>Sa||xa==-1)||Ra>this.text.length)break}else Ra<this.text.length&&(mf(Ra,this.text.length),Xd(this.text.length),Af()),Ra+=1;pa==
Ra-2&&pa>-1&&(Gb(Ra-1,Ra-1),H.positions=[],H.ascent=h,H.descent=k,H.leading=g,H.lineIndex=Jb,H.offsetX=pc(),H.offsetY=hb+2,H.width=0,H.height=T)}},measureText:function(a){return Oc.__context.measureText(a).width},restrictText:function(a){if(a==null)return a;this.__restrictRegexp!=null&&(a=this.__restrictRegexp.split(a).join(""));return a},setTextAlignment:function(){for(var a=-1,b=0,c,d,f=!1,g=0,h=this.layoutGroups.get_length();g<h;){var l=g++;c=this.layoutGroups.get(l);if(c.lineIndex!=a)switch(a=
c.lineIndex,b=this.width-4-c.format.rightMargin,c.format.align){case 0:b=this.lineWidths.get(a)<b?Math.round((b-this.lineWidths.get(a))/2):0;break;case 2:if(this.lineWidths.get(a)<b){d=1;for(var k=l+1,q=this.layoutGroups.get_length();k<q;){var w=k++;if(this.layoutGroups.get(w).lineIndex==a)w!=0&&X.cca(this.text,this.layoutGroups.get(w).startIndex-1)!=32||++d;else break}if(d>1&&(c=this.layoutGroups.get(l+d-1),k=X.cca(this.text,c.endIndex),c.endIndex<this.text.length&&k!=10&&k!=13)){b=(b-this.lineWidths.get(a))/
(d-1);f=!0;k=1;do this.layoutGroups.get(l+k).offsetX+=b*k;while(++k<d)}}b=0;break;case 4:b=this.lineWidths.get(a)<b?Math.round(b-this.lineWidths.get(a)):0;break;default:b=0}b>0&&(c.offsetX+=b)}f&&this.getLineMeasurements()},trimText:function(a){if(a==null)return a;this.maxChars>0&&a.length>this.maxChars&&(a=X.substr(a,0,this.maxChars));return a},update:function(){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.textHeight=this.textWidth=0,this.numLines=1,this.maxScrollH=0,this.bottomScrollV=this.maxScrollV=1):(this.getLineBreaks(),this.getLayoutGroups(),this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},get_bottomScrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;for(var a=this.lineHeights.get_length(),b=this.lineLeadings.get_length()==
a?-this.lineLeadings.get(a-1):0,c=(this.get_scrollV()>0?this.get_scrollV():1)-1,d=this.lineHeights.get_length();c<d;){var f=c++,g=this.lineHeights.get(f);b+=g;if(b>this.height-4){a=f+(b-this.height>=0?0:1);break}}return a<this.get_scrollV()?this.get_scrollV():a},get_maxScrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;for(var a=this.numLines-1,b=0;a>=0;){b+=this.lineHeights.get(a);if(b>this.height-4){a+=b-this.height<0?1:2;break}--a}return a<1?1:a},set_restrict:function(a){if(this.restrict==
a)return this.restrict;this.restrict=a;this.__restrictRegexp=this.restrict==null||this.restrict.length==0?null:this.createRestrictRegexp(a);return this.restrict},get_scrollV:function(){if(this.numLines==1||this.lineHeights==null)return 1;var a=this.get_maxScrollV();return this.scrollV>a?a:this.scrollV},set_scrollV:function(a){a<1?a=1:a>this.get_maxScrollV()&&(a=this.get_maxScrollV());return this.scrollV=a},set_text:function(a){return this.text=a},__class__:Oc,__properties__:{set_text:"set_text",set_scrollV:"set_scrollV",
get_scrollV:"get_scrollV",set_restrict:"set_restrict",get_maxScrollV:"get_maxScrollV",get_bottomScrollV:"get_bottomScrollV"}};var Ow=function(a,b,c,d){this.normal=a;this.bold=b;this.italic=c;this.boldItalic=d};r["openfl.text._internal._TextEngine.DefaultFontSet"]=Ow;Ow.__name__="openfl.text._internal._TextEngine.DefaultFontSet";Ow.prototype={bold:null,boldItalic:null,italic:null,normal:null,getFont:function(a,b){return a&&b&&this.boldItalic!=null?this.boldItalic:b&&this.italic!=null?this.italic:a&&
this.bold!=null?this.bold:this.normal},__class__:Ow};var yh=function(a,b,c){this.format=a;this.start=b;this.end=c};r["openfl.text._internal.TextFormatRange"]=yh;yh.__name__="openfl.text._internal.TextFormatRange";yh.prototype={end:null,format:null,start:null,__class__:yh};var Df=function(a,b,c,d,f,g){g==null&&(g="en");f==null&&(f="Zyyy");d==null&&(d=4);c==null&&(c=12);a==null&&(a="");this.__hbFontSize=-1;this.letterSpacing=0;this.set_text(a);this.set_font(b);this.set_size(c);this.__direction=d;this.__script=
f;this.__language=g;this.positions=[];this.__dirty=!0;this.__create(this.__direction,this.__script,this.__language)};r["openfl.text._internal.TextLayout"]=Df;Df.__name__="openfl.text._internal.TextLayout";Df.prototype={autoHint:null,font:null,glyphs:null,letterSpacing:null,positions:null,size:null,text:null,__buffer:null,__direction:null,__dirty:null,__handle:null,__language:null,__script:null,__font:null,__hbBuffer:null,__hbFont:null,__hbFontSize:null,__create:function(a,b,c){c.length==4&&(this.__hbBuffer=
rx._new(),gx._new(c))},__position:function(){this.positions=[]},get_positions:function(){this.__dirty&&(this.__dirty=!1,this.__position());return this.positions},get_direction:function(){return this.__direction},set_direction:function(a){if(a==this.__direction)return a;this.__direction=a;this.__dirty=!0;return a},set_font:function(a){if(a==this.font)return a;this.font=a;this.__dirty=!0;return a},get_glyphs:function(){for(var a=[],b=0,c=this.get_positions();b<c.length;){var d=c[b];++b;a.push(d.glyph)}return a},
get_language:function(){return this.__language},set_language:function(a){if(a==this.__language)return a;this.__language=a;this.__dirty=!0;return a},get_script:function(){return this.__script},set_script:function(a){if(a==this.__script)return a;this.__script=a;this.__dirty=!0;return a},set_size:function(a){if(a==this.size)return a;this.size=a;this.__dirty=!0;return a},set_text:function(a){if(a==this.text)return a;this.text=a;this.__dirty=!0;return a},__class__:Df,__properties__:{set_text:"set_text",
set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}};var it=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};r["openfl.text._internal.TextLayoutGroup"]=it;it.__name__="openfl.text._internal.TextLayoutGroup";it.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,getAdvance:function(a){return this.positions[a]},__class__:it};var Nc=function(){na.call(this);Nc.__instances.push(this)};r["openfl.ui.GameInput"]=Nc;Nc.__name__="openfl.ui.GameInput";Nc.getDeviceAt=function(a){return a>=0&&a<Nc.__deviceList.length?Nc.__deviceList[a]:null};Nc.__getDevice=function(a){if(a==null)return null;if(Nc.__devices.h.__keys__[a.__id__]==null){var b=new jt(a.__jsGamepad.id,a.__jsGamepad.id);
Nc.__deviceList.push(b);Nc.__devices.set(a,b);Nc.numDevices=Nc.__deviceList.length}return Nc.__devices.h[a.__id__]};Nc.__onGamepadAxisMove=function(a,b,c){a=Nc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){if(b==null)var d="null";else switch(b){case 0:d="LEFT_X";break;case 1:d="LEFT_Y";break;case 2:d="RIGHT_X";break;case 3:d="RIGHT_Y";break;case 4:d="TRIGGER_LEFT";break;case 5:d="TRIGGER_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new Mi(a,"AXIS_"+d,-1,1);a.__axis.h[b]=d;
a.__controls.push(d)}d=a.__axis.h[b];d.value=c;d.dispatchEvent(new ka("change"))}};Nc.__onGamepadButtonDown=function(a,b){a=Nc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(b==null)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;
case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new Mi(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=1;c.dispatchEvent(new ka("change"))}};Nc.__onGamepadButtonUp=function(a,b){a=Nc.__getDevice(a);if(a!=null&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(b==null)var c="null";else switch(b){case 0:c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;
case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new Mi(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=0;c.dispatchEvent(new ka("change"))}};Nc.__onGamepadConnect=function(a){a=Nc.__getDevice(a);
if(a!=null)for(var b=0,c=Nc.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new tk("deviceAdded",!0,!1,a))}};Nc.__onGamepadDisconnect=function(a){var b=Nc.__devices.h[a.__id__];if(b!=null){Nc.__devices.h.__keys__[a.__id__]!=null&&(X.remove(Nc.__deviceList,Nc.__devices.h[a.__id__]),Nc.__devices.remove(a));Nc.numDevices=Nc.__deviceList.length;a=0;for(var c=Nc.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new tk("deviceRemoved",!0,!1,b))}}};Nc.__super__=na;Nc.prototype=I(na.prototype,
{addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);na.prototype.addEventListener.call(this,a,b,c,d,f);if(a=="deviceAdded")for(a=0,b=Nc.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new tk("deviceAdded",!0,!1,c))},__class__:Nc});var Mi=function(a,b,c,d,f){f==null&&(f=0);na.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=f};r["openfl.ui.GameInputControl"]=Mi;Mi.__name__="openfl.ui.GameInputControl";Mi.__super__=na;Mi.prototype=
I(na.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:Mi});var jt=function(a,b){this.__controls=[];this.__button=new we;this.__axis=new we;this.id=a;this.name=b;a=new Mi(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);a=new Mi(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new Mi(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new Mi(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);a=new Mi(this,"AXIS_4",
-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new Mi(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;b<15;){var c=b++;a=new Mi(this,"BUTTON_"+c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};r["openfl.ui.GameInputDevice"]=jt;jt.__name__="openfl.ui.GameInputDevice";jt.prototype={enabled:null,id:null,name:null,sampleInterval:null,__axis:null,__button:null,__controls:null,__gamepad:null,getCachedSamples:function(a,b){return 0},getControlAt:function(a){return a>=0&&a<
this.__controls.length?this.__controls[a]:null},startCachingSamples:function(a,b){},stopCachingSamples:function(){},get_numControls:function(){return this.__controls.length},__class__:jt,__properties__:{get_numControls:"get_numControls"}};var pb=function(){};r["openfl.ui.Keyboard"]=pb;pb.__name__="openfl.ui.Keyboard";pb.isAccessible=function(){return!1};pb.__convertKeyCode=function(a){switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 33:return 49;
case 34:return 222;case 35:return 51;case 36:return 52;case 37:return 53;case 38:return 55;case 39:return 222;case 40:return 57;case 41:return 48;case 42:return 56;case 44:return 188;case 45:return 189;case 46:return 190;case 47:return 191;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 58:return 186;case 59:return 186;case 60:return 60;case 61:return 187;case 62:return 190;
case 63:return 191;case 64:return 50;case 91:return 219;case 92:return 220;case 93:return 221;case 94:return 54;case 95:return 189;case 96:return 192;case 97:return 65;case 98:return 66;case 99:return 67;case 100:return 68;case 101:return 69;case 102:return 70;case 103:return 71;case 104:return 72;case 105:return 73;case 106:return 74;case 107:return 75;case 108:return 76;case 109:return 77;case 110:return 78;case 111:return 79;case 112:return 80;case 113:return 81;case 114:return 82;case 115:return 83;
case 116:return 84;case 117:return 85;case 118:return 86;case 119:return 87;case 120:return 88;case 121:return 89;case 122:return 90;case 127:return 46;case 1073741881:return 20;case 1073741882:return 112;case 1073741883:return 113;case 1073741884:return 114;case 1073741885:return 115;case 1073741886:return 116;case 1073741887:return 117;case 1073741888:return 118;case 1073741889:return 119;case 1073741890:return 120;case 1073741891:return 121;case 1073741892:return 122;case 1073741893:return 123;
case 1073741894:return 301;case 1073741895:return 145;case 1073741896:return 19;case 1073741897:return 45;case 1073741898:return 36;case 1073741899:return 33;case 1073741901:return 35;case 1073741902:return 34;case 1073741903:return 39;case 1073741904:return 37;case 1073741905:return 40;case 1073741906:return 38;case 1073741907:return 144;case 1073741908:return 111;case 1073741909:return 106;case 1073741910:return 109;case 1073741911:return 107;case 1073741912:return 13;case 1073741913:return 97;
case 1073741914:return 98;case 1073741915:return 99;case 1073741916:return 100;case 1073741917:return 101;case 1073741918:return 102;case 1073741919:return 103;case 1073741920:return 104;case 1073741921:return 105;case 1073741922:return 96;case 1073741923:return 110;case 1073741925:return 302;case 1073741928:return 124;case 1073741929:return 125;case 1073741930:return 126;case 1073741982:return 13;case 1073742044:return 110;case 1073742048:return 17;case 1073742049:return 16;case 1073742050:return 18;
case 1073742051:return 15;case 1073742052:return 17;case 1073742053:return 16;case 1073742054:return 18;case 1073742055:return 15;default:return a}};pb.__getCharCode=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);var d=b;a>=65&&a<=90&&(d=b!=c);if(d){switch(a){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(a>=65&&a<=90)return a-65+65}else{switch(a){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(a>=48&&a<=57)return a-
48+48;if(a>=65&&a<=90)return a-65+97}if(a>=96&&a<=105)return a-96+48;switch(a){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};pb.__getKeyLocation=function(a){switch(a){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:return 3;
case 1073742048:case 1073742049:case 1073742050:case 1073742051:return 1;case 1073742052:case 1073742053:case 1073742054:case 1073742055:return 2;default:return 0}};var Id=function(){};r["openfl.ui.Mouse"]=Id;Id.__name__="openfl.ui.Mouse";Id.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};Id.hide=function(){Id.__hidden=!0;for(var a=0,b=Ha.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};Id.show=function(){Id.__hidden=!1;var a=Id.__cursor;Id.__cursor=null;Id.set_cursor(a)};
Id.get_cursor=function(){return Id.__cursor};Id.set_cursor=function(a){a==null&&(a="auto");var b=null;switch(a){case "arrow":b=$c.ARROW;break;case "button":b=$c.POINTER;break;case "crosshair":b=$c.CROSSHAIR;break;case "custom":b=$c.CUSTOM;break;case "hand":b=$c.MOVE;break;case "ibeam":b=$c.TEXT;break;case "resize_nesw":b=$c.RESIZE_NESW;break;case "resize_ns":b=$c.RESIZE_NS;break;case "resize_nwse":b=$c.RESIZE_NWSE;break;case "resize_we":b=$c.RESIZE_WE;break;case "wait":b=$c.WAIT;break;case "waitarrow":b=
$c.WAIT_ARROW}if(b!=null&&!Id.__hidden)for(var c=0,d=Ha.current.__windows;c<d.length;){var f=d[c];++c;f.set_cursor(b)}return Id.__cursor=a};var Vg={fromLimeCursor:function(a){switch(a._hx_index){case 0:return"arrow";case 1:return"crosshair";case 2:return"auto";case 3:return"hand";case 4:return"button";case 5:return"resize_nesw";case 6:return"resize_ns";case 7:return"resize_nwse";case 8:return"resize_we";case 9:return"ibeam";case 10:return"wait";case 11:return"waitarrow";case 12:return"custom"}},toLimeCursor:function(a){switch(a){case "arrow":return $c.ARROW;
case "auto":return $c.DEFAULT;case "button":return $c.POINTER;case "crosshair":return $c.CROSSHAIR;case "custom":return $c.CUSTOM;case "hand":return $c.MOVE;case "ibeam":return $c.TEXT;case "resize_nesw":return $c.RESIZE_NESW;case "resize_ns":return $c.RESIZE_NS;case "resize_nwse":return $c.RESIZE_NWSE;case "resize_we":return $c.RESIZE_WE;case "wait":return $c.WAIT;case "waitarrow":return $c.WAIT_ARROW;default:return $c.DEFAULT}}},Zn=function(){};r["openfl.ui.Multitouch"]=Zn;Zn.__name__="openfl.ui.Multitouch";
Zn.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};Zn.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var ra=function(a){a==null&&(a=!1);this.debugEnabled=!1;this.debugEnabled=a;ra.initialized||ra.init()};r["openfl.utils.AGALMiniAssembler"]=ra;ra.__name__="openfl.utils.AGALMiniAssembler";ra.init=function(){ra.initialized=!0;var a=ra.OPMAP,b=new bd("mov",2,0,0);a.h.mov=b;a=ra.OPMAP;
b=new bd("add",3,1,0);a.h.add=b;a=ra.OPMAP;b=new bd("sub",3,2,0);a.h.sub=b;a=ra.OPMAP;b=new bd("mul",3,3,0);a.h.mul=b;a=ra.OPMAP;b=new bd("div",3,4,0);a.h.div=b;a=ra.OPMAP;b=new bd("rcp",2,5,0);a.h.rcp=b;a=ra.OPMAP;b=new bd("min",3,6,0);a.h.min=b;a=ra.OPMAP;b=new bd("max",3,7,0);a.h.max=b;a=ra.OPMAP;b=new bd("frc",2,8,0);a.h.frc=b;a=ra.OPMAP;b=new bd("sqt",2,9,0);a.h.sqt=b;a=ra.OPMAP;b=new bd("rsq",2,10,0);a.h.rsq=b;a=ra.OPMAP;b=new bd("pow",3,11,0);a.h.pow=b;a=ra.OPMAP;b=new bd("log",2,12,0);a.h.log=
b;a=ra.OPMAP;b=new bd("exp",2,13,0);a.h.exp=b;a=ra.OPMAP;b=new bd("nrm",2,14,0);a.h.nrm=b;a=ra.OPMAP;b=new bd("sin",2,15,0);a.h.sin=b;a=ra.OPMAP;b=new bd("cos",2,16,0);a.h.cos=b;a=ra.OPMAP;b=new bd("crs",3,17,0);a.h.crs=b;a=ra.OPMAP;b=new bd("dp3",3,18,0);a.h.dp3=b;a=ra.OPMAP;b=new bd("dp4",3,19,0);a.h.dp4=b;a=ra.OPMAP;b=new bd("abs",2,20,0);a.h.abs=b;a=ra.OPMAP;b=new bd("neg",2,21,0);a.h.neg=b;a=ra.OPMAP;b=new bd("sat",2,22,0);a.h.sat=b;a=ra.OPMAP;b=new bd("m33",3,23,16);a.h.m33=b;a=ra.OPMAP;b=new bd("m44",
3,24,16);a.h.m44=b;a=ra.OPMAP;b=new bd("m34",3,25,16);a.h.m34=b;a=ra.OPMAP;b=new bd("ddx",2,26,288);a.h.ddx=b;a=ra.OPMAP;b=new bd("ddy",2,27,288);a.h.ddy=b;a=ra.OPMAP;b=new bd("ife",2,28,897);a.h.ife=b;a=ra.OPMAP;b=new bd("ine",2,29,897);a.h.ine=b;a=ra.OPMAP;b=new bd("ifg",2,30,897);a.h.ifg=b;a=ra.OPMAP;b=new bd("ifl",2,31,897);a.h.ifl=b;a=ra.OPMAP;b=new bd("els",0,32,1921);a.h.els=b;a=ra.OPMAP;b=new bd("eif",0,33,1409);a.h.eif=b;a=ra.OPMAP;b=new bd("kil",1,39,160);a.h.kil=b;a=ra.OPMAP;b=new bd("tex",
3,40,40);a.h.tex=b;a=ra.OPMAP;b=new bd("sge",3,41,0);a.h.sge=b;a=ra.OPMAP;b=new bd("slt",3,42,0);a.h.slt=b;a=ra.OPMAP;b=new bd("sgn",2,43,0);a.h.sgn=b;a=ra.OPMAP;b=new bd("seq",3,44,0);a.h.seq=b;a=ra.OPMAP;b=new bd("sne",3,45,0);a.h.sne=b;a=ra.SAMPLEMAP;b=new me("rgba",8,0);a.h.rgba=b;a=ra.SAMPLEMAP;b=new me("compressed",8,1);a.h.compressed=b;a=ra.SAMPLEMAP;b=new me("compressedalpha",8,2);a.h.compressedalpha=b;a=ra.SAMPLEMAP;b=new me("dxt1",8,1);a.h.dxt1=b;a=ra.SAMPLEMAP;b=new me("dxt5",8,2);a.h.dxt5=
b;a=ra.SAMPLEMAP;b=new me("video",8,3);a.h.video=b;a=ra.SAMPLEMAP;b=new me("2d",12,0);a.h["2d"]=b;a=ra.SAMPLEMAP;b=new me("3d",12,2);a.h["3d"]=b;a=ra.SAMPLEMAP;b=new me("cube",12,1);a.h.cube=b;a=ra.SAMPLEMAP;b=new me("mipnearest",24,1);a.h.mipnearest=b;a=ra.SAMPLEMAP;b=new me("miplinear",24,2);a.h.miplinear=b;a=ra.SAMPLEMAP;b=new me("mipnone",24,0);a.h.mipnone=b;a=ra.SAMPLEMAP;b=new me("nomip",24,0);a.h.nomip=b;a=ra.SAMPLEMAP;b=new me("nearest",28,0);a.h.nearest=b;a=ra.SAMPLEMAP;b=new me("linear",
28,1);a.h.linear=b;a=ra.SAMPLEMAP;b=new me("anisotropic2x",28,2);a.h.anisotropic2x=b;a=ra.SAMPLEMAP;b=new me("anisotropic4x",28,3);a.h.anisotropic4x=b;a=ra.SAMPLEMAP;b=new me("anisotropic8x",28,4);a.h.anisotropic8x=b;a=ra.SAMPLEMAP;b=new me("anisotropic16x",28,5);a.h.anisotropic16x=b;a=ra.SAMPLEMAP;b=new me("centroid",16,1);a.h.centroid=b;a=ra.SAMPLEMAP;b=new me("single",16,2);a.h.single=b;a=ra.SAMPLEMAP;b=new me("ignoresampler",16,4);a.h.ignoresampler=b;a=ra.SAMPLEMAP;b=new me("repeat",20,1);a.h.repeat=
b;a=ra.SAMPLEMAP;b=new me("wrap",20,1);a.h.wrap=b;a=ra.SAMPLEMAP;b=new me("clamp",20,0);a.h.clamp=b;a=ra.SAMPLEMAP;b=new me("clamp_u_repeat_v",20,2);a.h.clamp_u_repeat_v=b;a=ra.SAMPLEMAP;b=new me("repeat_u_clamp_v",20,3);a.h.repeat_u_clamp_v=b};ra.prototype={agalcode:null,error:null,verbose:null,debugEnabled:null,assemble2:function(a,b,c,d){c=this.assemble("vertex",c,b);b=this.assemble("fragment",d,b);a=a.createProgram();a.upload(c,b);return a},assemble:function(a,b,c,d){d==null&&(d=!1);c==null&&
(c=1);var f=Oa.getTimer();this.agalcode=new Pc(0);this.error="";var g=!1;a=="fragment"?g=!0:a!="vertex"&&(this.error='ERROR: mode needs to be "fragment" or "vertex" but is "'+a+'".');this.agalcode.__endian=1;this.agalcode.writeByte(160);this.agalcode.writeUnsignedInt(c);this.agalcode.writeByte(161);this.agalcode.writeByte(g?1:0);this.initregmap(c,d);a=Z.replace(b,"\r","\n").split("\n");b=0;d=a.length;for(var h=new sb("<.*>","g"),l=new sb("([\\w\\.\\-\\+]+)","gi"),k=new sb("^\\w{3}","ig"),q=new sb("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?",
"gi"),w=new sb("\\[.*\\]","ig"),v=new sb("^\\b[A-Za-z]{1,3}","ig"),z=new sb("\\d+",""),n=new sb("(\\.[xyzw]{1,4})",""),E=new sb("[A-Za-z]{1,3}","ig"),H=new sb("(\\.[xyzw]{1,1})",""),J=new sb("\\+\\d{1,3}","ig"),Q=0;Q<d&&this.error=="";){var T=Z.trim(a[Q]),fa=T.indexOf("//");fa!=-1&&(T=X.substr(T,0,fa));var da=h.match(T)?h.matchedPos().pos:-1;fa=null;da!=-1&&(fa=this.match(X.substr(T,da,null),l),T=X.substr(T,0,da));var pa=null;k.match(T)&&(da=k.matched(0),pa=ra.OPMAP.h[da]);if(pa==null)T.length>=3&&
Mb.warn("warning: bad line "+Q+": "+a[Q],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Mb.info(pa,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),pa==null)T.length>=3&&Mb.warn("warning: bad line "+Q+": "+a[Q],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});else{T=X.substr(T,T.indexOf(pa.name)+pa.name.length,null);if((pa.flags&256)!=0&&c<2){this.error="error: opcode requires version 2.";break}if((pa.flags&64)!=0&&g){this.error="error: opcode is only allowed in vertex programs.";break}if((pa.flags&32)!=0&&!g){this.error="error: opcode is only allowed in fragment programs.";break}this.verbose&&Mb.info("emit opcode="+L.string(pa),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});this.agalcode.writeUnsignedInt(pa.emitCode);++b;if(b>4096){this.error="error: too many opcodes. maximum is 4096.";break}var xa=this.match(T,q);if(xa.length!=pa.numRegister){this.error="error: wrong number of operands. found "+xa.length+" but expected "+pa.numRegister+".";break}var Ua=!1,Sa=160;T=0;for(da=xa.length;T<da;){var Ka=T++,hb=!1,Ra=this.match(xa[Ka],w);Ra.length>0&&(xa[Ka]=Z.replace(xa[Ka],Ra[0],"0"),this.verbose&&Mb.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),hb=!0);var Jb=this.match(xa[Ka],v);if(Jb.length==0){this.error="error: could not parse operand "+Ka+" ("+xa[Ka]+").";Ua=!0;break}var vb=ra.REGMAP.h[Jb[0]];this.debugEnabled&&Mb.info(vb,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(vb==null){this.error="error: could not find register name for operand "+Ka+" ("+xa[Ka]+").";Ua=!0;break}if(g){if((vb.flags&
32)==0){this.error="error: register operand "+Ka+" ("+xa[Ka]+") only allowed in vertex programs.";Ua=!0;break}if(hb){this.error="error: register operand "+Ka+" ("+xa[Ka]+") relative adressing not allowed in fragment programs.";Ua=!0;break}}else if((vb.flags&64)==0){this.error="error: register operand "+Ka+" ("+xa[Ka]+") only allowed in fragment programs.";Ua=!0;break}xa[Ka]=X.substr(xa[Ka],xa[Ka].indexOf(vb.name)+vb.name.length,null);var Cb=hb?this.match(Ra[0],z):this.match(xa[Ka],z);Jb=0;Cb.length>
0&&(Jb=L.parseInt(Cb[0]));if(ta.gt(Jb,vb.range)){T=vb.range+1;this.error="error: register operand "+Ka+" ("+xa[Ka]+") index exceeds limit of "+(T==null?"null":L.string(ta.toFloat(T)))+".";Ua=!0;break}var pc=this.match(xa[Ka],n),qd=Ka==0&&(pa.flags&128)==0,Gb=Ka==2&&(pa.flags&8)!=0,nd=0,le=0,Pf=0;if(qd&&hb){this.error="error: relative can not be destination";Ua=!0;break}if(pc.length>0){for(var mf=Cb=0,Ig=pc[0].length,Af=1;Af<Ig;)mf=X.cca(pc[0],Af)-120,ta.gt(mf,2)&&(mf=3),Cb=qd?Cb|1<<mf:Cb|mf<<(Af-
1<<1),++Af;if(!qd)for(;Af<=4;)Cb|=mf<<(Af-1<<1),++Af}else Cb=qd?15:228;if(hb){pc=this.match(Ra[0],E);nd=ra.REGMAP.h[pc[0]];if(nd==null){this.error="error: bad index register";Ua=!0;break}nd=nd.emitCode;mf=this.match(Ra[0],H);if(mf.length==0){this.error="error: bad index register select";Ua=!0;break}le=X.cca(mf[0],1)-120;ta.gt(le,2)&&(le=3);Ra=this.match(Ra[0],J);Ra.length>0&&(Pf=L.parseInt(Ra[0]));if(Pf<0||Pf>255){this.error="error: index offset "+Pf+" out of bounds. [0..255]";Ua=!0;break}this.verbose&&
Mb.info("RELATIVE: type="+nd+"=="+pc[0]+" sel="+(le==null?"null":L.string(ta.toFloat(le)))+"=="+mf[0]+" idx="+(Jb==null?"null":L.string(ta.toFloat(Jb)))+" offset="+Pf,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Mb.info("  emit argcode="+L.string(vb)+"["+(Jb==null?"null":L.string(ta.toFloat(Jb)))+"]["+Cb+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});if(qd)this.agalcode.writeShort(Jb),this.agalcode.writeByte(Cb),this.agalcode.writeByte(vb.emitCode),Sa-=32;else{if(Gb){this.verbose&&Mb.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});Ka=5;Ra=hb=0;for(vb=fa==null?0:fa.length;Ra<vb;)Cb=Ra++,this.verbose&&Mb.info("    opt: "+fa[Cb],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"}),qd=ra.SAMPLEMAP.h[fa[Cb]],qd==null?(hb=parseFloat(fa[Cb]),this.verbose&&Mb.info("    bias: "+hb,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):(qd.flag!=16&&(Ka&=~(15<<qd.flag)),Ka|=qd.mask<<qd.flag);this.agalcode.writeShort(Jb);this.agalcode.writeByte(hb*8|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(Ka);this.verbose&&Mb.info("    bits: "+(Ka-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else Ka==0&&(this.agalcode.writeUnsignedInt(0),Sa-=32),this.agalcode.writeShort(Jb),this.agalcode.writeByte(Pf),this.agalcode.writeByte(Cb),this.agalcode.writeByte(vb.emitCode),this.agalcode.writeByte(nd),this.agalcode.writeShort(hb?le|32768:0);Sa-=64}}for(T=0;T<Sa;)this.agalcode.writeByte(0),T+=8;if(Ua)break}++Q}this.error!=""&&(this.error+="\n  at line "+Q+" "+a[Q],cc.set_length(this.agalcode,0),Mb.info(this.error,
{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";g=cc.get_length(this.agalcode);T=0;for(da=g;T<da;)g=T++,g%16==0&&(c+="\n"),g%4==0&&(c+=" "),g=Z.hex(this.agalcode.b[g],2),g.length<2&&(g="0"+g),c+=g;Mb.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Mb.info("AGALMiniAssembler.assemble time: "+
(Oa.getTimer()-f)/1E3+"s",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});return this.agalcode},initregmap:function(a,b){var c=ra.REGMAP,d=new wi("va","vertex attribute",0,b?1024:a==1||a==2?7:15,66);c.h.va=d;c=ra.REGMAP;d=new wi("vc","vertex constant",1,b?1024:a==1?127:249,66);c.h.vc=d;c=ra.REGMAP;d=new wi("vt","vertex temporary",2,b?1024:a==1?7:25,67);c.h.vt=d;c=ra.REGMAP;d=new wi("vo","vertex output",3,b?1024:0,65);
c.h.vo=d;c=ra.REGMAP;d=new wi("vi","varying",4,b?1024:a==1?7:9,99);c.h.vi=d;c=ra.REGMAP;d=new wi("fc","fragment constant",1,b?1024:a==1?27:a==2?63:199,34);c.h.fc=d;c=ra.REGMAP;d=new wi("ft","fragment temporary",2,b?1024:a==1?7:25,35);c.h.ft=d;c=ra.REGMAP;d=new wi("fs","texture sampler",5,b?1024:7,34);c.h.fs=d;c=ra.REGMAP;d=new wi("fo","fragment output",3,b?1024:a==1?0:3,33);c.h.fo=d;c=ra.REGMAP;d=new wi("fd","fragment depth output",6,b?1024:a==1?-1:0,33);c.h.fd=d;c=ra.REGMAP;d=new wi("iid","instance id",
7,b?1024:0,66);c.h.iid=d;d=ra.REGMAP.h.vo;ra.REGMAP.h.op=d;d=ra.REGMAP.h.vi;ra.REGMAP.h.i=d;d=ra.REGMAP.h.vi;ra.REGMAP.h.v=d;d=ra.REGMAP.h.fo;ra.REGMAP.h.oc=d;d=ra.REGMAP.h.fd;ra.REGMAP.h.od=d;d=ra.REGMAP.h.vi;ra.REGMAP.h.fi=d},match:function(a,b){for(var c=[],d=0;b.matchSub(a,d);)d=b.matched(0),c.push(d),d=b.matchedPos().pos+d.length;return c},__class__:ra};var bd=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};r["openfl.utils._AGALMiniAssembler.OpCode"]=bd;bd.__name__=
"openfl.utils._AGALMiniAssembler.OpCode";bd.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__:bd};var wi=function(a,b,c,d,f){this.name=a;this.longName=b;this.emitCode=c;this.range=d;this.flags=f};r["openfl.utils._AGALMiniAssembler.Register"]=wi;wi.__name__="openfl.utils._AGALMiniAssembler.Register";wi.prototype={emitCode:null,name:null,
longName:null,flags:null,range:null,toString:function(){return'[Register name="'+this.name+'", longName="'+this.longName+'", emitCode='+(this.emitCode==null?"null":L.string(ta.toFloat(this.emitCode)))+", range="+(this.range==null?"null":L.string(ta.toFloat(this.range)))+", flags="+(this.flags==null?"null":L.string(ta.toFloat(this.flags)))+"]"},__class__:wi};var me=function(a,b,c){this.name=a;this.flag=b;this.mask=c};r["openfl.utils._AGALMiniAssembler.Sampler"]=me;me.__name__="openfl.utils._AGALMiniAssembler.Sampler";
me.prototype={flag:null,mask:null,name:null,toString:function(){return'[Sampler name="'+this.name+'", flag="'+(this.flag==null?"null":L.string(ta.toFloat(this.flag)))+'", mask='+(this.mask==null?"null":L.string(ta.toFloat(this.mask)))+"]"},__class__:me};var kt=function(){};r["openfl.utils.IAssetCache"]=kt;kt.__name__="openfl.utils.IAssetCache";kt.__isInterface__=!0;kt.prototype={get_enabled:null,set_enabled:null,clear:null,getBitmapData:null,getFont:null,getSound:null,hasBitmapData:null,hasFont:null,
hasSound:null,removeBitmapData:null,removeFont:null,removeSound:null,setBitmapData:null,setFont:null,setSound:null,__class__:kt,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var lt=function(){this.__enabled=!0;this.bitmapData=new aa;this.font=new aa;this.sound=new aa};r["openfl.utils.AssetCache"]=lt;lt.__name__="openfl.utils.AssetCache";lt.__interfaces__=[kt];lt.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(a==null)this.bitmapData=new aa,
this.font=new aa,this.sound=new aa;else{var b=this.bitmapData.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];Z.startsWith(f,a)&&this.removeBitmapData(f)}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],Z.startsWith(f,a)&&this.removeFont(f);b=this.sound.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],Z.startsWith(f,a)&&this.removeSound(f)}},getBitmapData:function(a){return this.bitmapData.h[a]},getFont:function(a){return this.font.h[a]},getSound:function(a){return this.sound.h[a]},
hasBitmapData:function(a){return Object.prototype.hasOwnProperty.call(this.bitmapData.h,a)},hasFont:function(a){return Object.prototype.hasOwnProperty.call(this.font.h,a)},hasSound:function(a){return Object.prototype.hasOwnProperty.call(this.sound.h,a)},removeBitmapData:function(a){var b=bb.cache.image;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.bitmapData;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeFont:function(a){var b=bb.cache.font;Object.prototype.hasOwnProperty.call(b.h,
a)&&delete b.h[a];b=this.font;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeSound:function(a){var b=bb.cache.audio;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.sound;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},setBitmapData:function(a,b){this.bitmapData.h[a]=b},setFont:function(a,b){this.font.h[a]=b},setSound:function(a,b){this.sound.h[a]=b},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=
a},__class__:lt,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var kf=function(){dd.call(this)};r["openfl.utils.AssetLibrary"]=kf;kf.__name__="openfl.utils.AssetLibrary";kf.fromBundle=function(a){a=dd.fromBundle(a);if(a!=null){if(a instanceof kf)return a;var b=new kf;b.__proxy=a;return b}return null};kf.fromBytes=function(a,b){return kf.fromManifest(se.fromBytes(cc.toLimeBytes(a),b))};kf.fromFile=function(a,b){return kf.fromManifest(se.fromFile(a,b))};kf.fromManifest=function(a){a=
dd.fromManifest(a);if(a!=null){if(a instanceof kf)return a;var b=new kf;b.__proxy=a;return b}return null};kf.loadFromBytes=function(a,b){return se.loadFromBytes(cc.toLimeBytes(a),b).then(function(c){return kf.loadFromManifest(c)})};kf.loadFromFile=function(a,b){return se.loadFromFile(a,b).then(function(c){return kf.loadFromManifest(c)})};kf.loadFromManifest=function(a){a=kf.fromManifest(a);return a!=null?a.load().then(function(b){return zc.withValue(b)}):zc.withError("Could not load asset manifest")};
kf.__super__=dd;kf.prototype=I(dd.prototype,{__proxy:null,bind:function(a,b){return!1},exists:function(a,b){return this.__proxy!=null?this.__proxy.exists(a,b):dd.prototype.exists.call(this,a,b)},getAsset:function(a,b){return this.__proxy!=null?this.__proxy.getAsset(a,b):dd.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.getAudioBuffer(a):dd.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return this.__proxy!=null?this.__proxy.getBytes(a):
dd.prototype.getBytes.call(this,a)},getFont:function(a){return this.__proxy!=null?this.__proxy.getFont(a):dd.prototype.getFont.call(this,a)},getImage:function(a){return this.__proxy!=null?this.__proxy.getImage(a):dd.prototype.getImage.call(this,a)},getMovieClip:function(a){return null},getPath:function(a){return this.__proxy!=null?this.__proxy.getPath(a):dd.prototype.getPath.call(this,a)},getText:function(a){return this.__proxy!=null?this.__proxy.getText(a):dd.prototype.getText.call(this,a)},isLocal:function(a,
b){return this.__proxy!=null?this.__proxy.isLocal(a,b):dd.prototype.isLocal.call(this,a,b)},list:function(a){return this.__proxy!=null?this.__proxy.list(a):dd.prototype.list.call(this,a)},loadAsset:function(a,b){return this.__proxy!=null?this.__proxy.loadAsset(a,b):dd.prototype.loadAsset.call(this,a,b)},load:function(){return this.__proxy!=null?this.__proxy.load():dd.prototype.load.call(this)},loadAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.loadAudioBuffer(a):dd.prototype.loadAudioBuffer.call(this,
a)},loadBytes:function(a){return this.__proxy!=null?this.__proxy.loadBytes(a):dd.prototype.loadBytes.call(this,a)},loadFont:function(a){return this.__proxy!=null?this.__proxy.loadFont(a):dd.prototype.loadFont.call(this,a)},loadImage:function(a){return this.__proxy!=null?this.__proxy.loadImage(a):dd.prototype.loadImage.call(this,a)},loadMovieClip:function(a){return zc.withValue(this.getMovieClip(a))},loadText:function(a){return this.__proxy!=null?this.__proxy.loadText(a):dd.prototype.loadText.call(this,
a)},unload:function(){this.__proxy!=null?this.__proxy.unload():dd.prototype.unload.call(this)},__class__:kf});var ub=function(){};r["openfl.utils.Assets"]=ub;ub.__name__="openfl.utils.Assets";ub.addEventListener=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);bb.onChange.has(ub.LimeAssets_onChange)||bb.onChange.add(ub.LimeAssets_onChange);ub.dispatcher.addEventListener(a,b,c,d,f)};ub.dispatchEvent=function(a){return ub.dispatcher.dispatchEvent(a)};ub.exists=function(a,b){return bb.exists(a,
b)};ub.getBitmapData=function(a,b){b==null&&(b=!0);if(b&&ub.cache.get_enabled()&&ub.cache.hasBitmapData(a)){var c=ub.cache.getBitmapData(a);if(ub.isValidBitmapData(c))return c}c=bb.getImage(a,!1);return c!=null?(c=uc.fromImage(c),c.__asset=!0,b&&ub.cache.get_enabled()&&ub.cache.setBitmapData(a,c),c):null};ub.getBytes=function(a){return cc.fromLimeBytes(bb.getBytes(a))};ub.getFont=function(a,b){b==null&&(b=!0);if(b&&ub.cache.get_enabled()&&ub.cache.hasFont(a))return ub.cache.getFont(a);var c=bb.getFont(a,
!1);if(c!=null){var d=new $d;d.__fromLimeFont(c);b&&ub.cache.get_enabled()&&ub.cache.setFont(a,d);return d}return new $d};ub.getLibrary=function(a){return bb.getLibrary(a)};ub.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=X.substr(a,a.indexOf(":")+1,null),d=ub.getLibrary(b);if(d!=null){if(d instanceof kf&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,"MOVIE_CLIP"))return d.getMovieClip(c);Mb.error('MovieClip asset "'+a+'" exists, but only asynchronously',{fileName:"openfl/utils/Assets.hx",
lineNumber:261,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null}Mb.error('There is no MovieClip asset with an ID of "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:267,className:"openfl.utils.Assets",methodName:"getMovieClip"})}else Mb.error('There is no asset library named "'+b+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:271,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null};ub.getMusic=function(a,b){b==null&&(b=!0);return ub.getSound(a,b)};
ub.getPath=function(a){return bb.getPath(a)};ub.getSound=function(a,b){b==null&&(b=!0);if(b&&ub.cache.get_enabled()&&ub.cache.hasSound(a)){var c=ub.cache.getSound(a);if(ub.isValidSound(c))return c}c=bb.getAudioBuffer(a,!1);return c!=null?(c=C.fromAudioBuffer(c),b&&ub.cache.get_enabled()&&ub.cache.setSound(a,c),c):null};ub.getText=function(a){return bb.getText(a)};ub.hasEventListener=function(a){return ub.dispatcher.hasEventListener(a)};ub.hasLibrary=function(a){return bb.hasLibrary(a)};ub.initBinding=
function(a,b){if(Object.prototype.hasOwnProperty.call(ub.libraryBindings.h,a)){var c=ub.libraryBindings.h[a];b==null?za.__constructor=function(d){d.__bind(c,a)}:(za.__constructor=null,b.__bind(c,a))}else Mb.warn('No asset is registered as "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:434,className:"openfl.utils.Assets",methodName:"initBinding"})};ub.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&ub.cache.get_enabled()&&((b=="IMAGE"||b==null)&&ub.cache.hasBitmapData(a)||(b=="FONT"||b==null)&&
ub.cache.hasFont(a)||(b=="SOUND"||b=="MUSIC"||b==null)&&ub.cache.hasSound(a)))return!0;c=a.substring(0,a.indexOf(":"));a=X.substr(a,a.indexOf(":")+1,null);c=ub.getLibrary(c);return c!=null?c.isLocal(a,b):!1};ub.isValidBitmapData=function(a){return a!=null&&a.image!=null};ub.isValidSound=function(a){return!0};ub.list=function(a){return bb.list(a)};ub.loadBitmapData=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new yf;if(b&&ub.cache.get_enabled()&&ub.cache.hasBitmapData(a)){var d=ub.cache.getBitmapData(a);
if(ub.isValidBitmapData(d))return c.complete(d),c.future}bb.loadImage(a,!1).onComplete(function(f){f!=null?(f=uc.fromImage(f),f.__asset=!0,b&&ub.cache.get_enabled()&&ub.cache.setBitmapData(a,f),c.complete(f)):c.error('[Assets] Could not load Image "'+a+'"')}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};ub.loadBytes=function(a){var b=new yf;a=bb.loadBytes(a);a.onComplete(function(c){b.complete(cc.fromLimeBytes(c))});a.onProgress(function(c,d){b.progress(c,d)});a.onError(function(c){b.error(c)});
return b.future};ub.loadFont=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new yf;if(b&&ub.cache.get_enabled()&&ub.cache.hasFont(a))return c.complete(ub.cache.getFont(a)),c.future;bb.loadFont(a).onComplete(function(d){var f=new $d;f.__fromLimeFont(d);b&&ub.cache.get_enabled()&&ub.cache.setFont(a,f);c.complete(f)}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};ub.loadLibrary=function(a){return bb.loadLibrary(a).then(function(b){var c=null;b!=null&&(b instanceof kf?c=b:(c=
bb.libraries,Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a],c=new kf,c.__proxy=b,bb.registerLibrary(a,c)));return zc.withValue(c)})};ub.loadMusic=function(a,b){b==null&&(b=!0);b==null&&(b=!0);return new zc(function(){return ub.getMusic(a,b)})};ub.loadMovieClip=function(a){var b=new yf,c=a.substring(0,a.indexOf(":")),d=X.substr(a,a.indexOf(":")+1,null),f=ub.getLibrary(c);if(f!=null){if(f instanceof kf&&f.exists(d,"MOVIE_CLIP"))return b.completeWith(f.loadMovieClip(d)),b.future;b.error('[Assets] There is no MovieClip asset with an ID of "'+
a+'"')}else b.error('[Assets] There is no asset library named "'+c+'"');return b.future};ub.loadSound=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new yf;bb.loadAudioBuffer(a,b).onComplete(function(d){d!=null?(d=C.fromAudioBuffer(d),b&&ub.cache.get_enabled()&&ub.cache.setSound(a,d),c.complete(d)):c.error('[Assets] Could not load Sound "'+a+'"')}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};ub.loadText=function(a){return bb.loadText(a)};ub.registerBinding=function(a,b){ub.libraryBindings.h[a]=
b};ub.registerLibrary=function(a,b){bb.registerLibrary(a,b)};ub.removeEventListener=function(a,b,c){c==null&&(c=!1);ub.dispatcher.removeEventListener(a,b,c)};ub.resolveClass=function(a){return r[a]};ub.resolveEnum=function(a){return O[a]};ub.unloadLibrary=function(a){bb.unloadLibrary(a)};ub.unregisterBinding=function(a,b){Object.prototype.hasOwnProperty.call(ub.libraryBindings.h,a)&&ub.libraryBindings.h[a]==b&&(b=ub.libraryBindings,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a])};ub.LimeAssets_onChange=
function(){ub.dispatchEvent(new ka("change"))};var cc={__properties__:{set_position:"set_position",get_position:"get_position",set_length:"set_length",get_length:"get_length",get_bytesAvailable:"get_bytesAvailable",set_defaultObjectEncoding:"set_defaultObjectEncoding",get_defaultObjectEncoding:"get_defaultObjectEncoding",set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"},_new:function(a){a==null&&(a=0);return new Pc(a)},clear:function(a){a.clear()},compress:function(a,b){a.compress(b)},
deflate:function(a){a.deflate()},fromArrayBuffer:function(a){return a==null?null:Pc.fromBytes(Ia.ofData(a))},fromBytes:function(a){return a==null?null:a instanceof Pc?a:Pc.fromBytes(a)},fromBytesData:function(a){return a==null?null:Pc.fromBytes(Ia.ofData(a))},fromFile:function(a){return cc.fromLimeBytes(hg.fromFile(a))},fromLimeBytes:function(a){return cc.fromBytes(a)},get:function(a,b){return a.b[b]},inflate:function(a){a.inflate()},loadFromBytes:function(a){return hg.loadFromBytes(a).then(function(b){b=
cc.fromLimeBytes(b);return zc.withValue(b)})},loadFromFile:function(a){return hg.loadFromFile(a).then(function(b){b=cc.fromLimeBytes(b);return zc.withValue(b)})},readBoolean:function(a){return a.readBoolean()},readByte:function(a){return a.readByte()},readBytes:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);a.readBytes(b,c,d)},readDouble:function(a){return a.readDouble()},readFloat:function(a){return a.readFloat()},readInt:function(a){return a.readInt()},readInt64:function(a){return a.readInt64()},
readMultiByte:function(a,b,c){return a.readMultiByte(b,c)},readObject:function(a){return a.readObject()},readShort:function(a){return a.readShort()},readUTF:function(a){return a.readUTF()},readUTFBytes:function(a,b){return a.readUTFBytes(b)},readUnsignedByte:function(a){return a.readUnsignedByte()},readUnsignedInt:function(a){return a.readUnsignedInt()},readUnsignedShort:function(a){return a.readUnsignedShort()},set:function(a,b,c){a.__resize(b+1);return a.b[b]=c},toArrayBuffer:function(a){return a.b.bufferValue},
toBytePointer:function(a){sx.set(cc.__bytePointer,a,null,null,a.position);return cc.__bytePointer},toBytes:function(a){return a},toBytesData:function(a){return a.b.bufferValue},toLimeBytes:function(a){return a},toString:function(a){return a.toString()},uncompress:function(a,b){a.uncompress(b)},writeBoolean:function(a,b){a.writeBoolean(b)},writeByte:function(a,b){a.writeByte(b)},writeBytes:function(a,b,c,d){d==null&&(d=0);c==null&&(c=0);a.writeBytes(b,c,d)},writeDouble:function(a,b){a.writeDouble(b)},
writeFloat:function(a,b){a.writeFloat(b)},writeInt:function(a,b){a.writeInt(b)},writeInt64:function(a,b){a.writeInt64(b)},writeMultiByte:function(a,b,c){a.writeMultiByte(b,c)},writeObject:function(a,b){a.writeObject(b)},writeShort:function(a,b){a.writeShort(b)},writeUTF:function(a,b){a.writeUTF(b)},writeUTFBytes:function(a,b){a.writeUTFBytes(b)},writeUnsignedInt:function(a,b){a.writeUnsignedInt(b)},get_bytesAvailable:function(a){return a.length-a.position},get_defaultEndian:function(){Pc.__defaultEndian==
null&&(Hb.get_endianness()==bk.LITTLE_ENDIAN?Pc.__defaultEndian=1:Pc.__defaultEndian=0);return Pc.__defaultEndian},set_defaultEndian:function(a){return Pc.__defaultEndian=a},get_defaultObjectEncoding:function(){return Pc.defaultObjectEncoding},set_defaultObjectEncoding:function(a){return Pc.defaultObjectEncoding=a},get_endian:function(a){return a.__endian},set_endian:function(a,b){return a.__endian=b},get_length:function(a){return a==null?0:a.length},set_length:function(a,b){b>=0&&(a.__resize(b),
b<a.position&&(a.position=b));return a.length=b},get_objectEncoding:function(a){return a.objectEncoding},set_objectEncoding:function(a,b){return a.objectEncoding=b},get_position:function(a){return a.position},set_position:function(a,b){return a.position=b}},mt=function(){};r["openfl.utils.IDataOutput"]=mt;mt.__name__="openfl.utils.IDataOutput";mt.__isInterface__=!0;mt.prototype={get_endian:null,set_endian:null,objectEncoding:null,writeBoolean:null,writeByte:null,writeBytes:null,writeDouble:null,writeFloat:null,
writeInt:null,writeMultiByte:null,writeObject:null,writeShort:null,writeUnsignedInt:null,writeUTF:null,writeUTFBytes:null,__class__:mt,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var $p=function(){};r["openfl.utils.IDataInput"]=$p;$p.__name__="openfl.utils.IDataInput";$p.__isInterface__=!0;$p.prototype={get_bytesAvailable:null,get_endian:null,set_endian:null,objectEncoding:null,readBoolean:null,readByte:null,readBytes:null,readDouble:null,readFloat:null,readInt:null,readMultiByte:null,
readObject:null,readShort:null,readUnsignedByte:null,readUnsignedInt:null,readUnsignedShort:null,readUTF:null,readUTFBytes:null,__class__:$p,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var Pc=function(a){a==null&&(a=0);var b=new Ia(new ArrayBuffer(a));Ia.call(this,b.b.buffer);this.__allocated=a;Pc.__defaultEndian==null&&(Hb.get_endianness()==bk.LITTLE_ENDIAN?Pc.__defaultEndian=1:Pc.__defaultEndian=0);this.__endian=Pc.__defaultEndian;this.objectEncoding=
Pc.defaultObjectEncoding;this.position=0};r["openfl.utils.ByteArrayData"]=Pc;Pc.__name__="openfl.utils.ByteArrayData";Pc.__interfaces__=[mt,$p];Pc.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};Pc.fromBytes=function(a){var b=new Pc;b.__fromBytes(a);return b};Pc.get_defaultEndian=function(){Pc.__defaultEndian==null&&(Hb.get_endianness()==bk.LITTLE_ENDIAN?Pc.__defaultEndian=1:Pc.__defaultEndian=0);return Pc.__defaultEndian};Pc.set_defaultEndian=function(a){return Pc.__defaultEndian=
a};Pc.__super__=Ia;Pc.prototype=I(Ia.prototype,{objectEncoding:null,position:null,__endian:null,__allocated:null,__amf3Reader:null,clear:function(){this.position=this.length=0},compress:function(a){a==null&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new Ia(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=hg.compress(this,ek.DEFLATE);break;case 1:a=hg.compress(this,ek.LZMA);
break;default:a=hg.compress(this,ek.ZLIB)}a!=null&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.position=this.length=this.__allocated)},deflate:function(){this.compress(0)},inflate:function(){this.uncompress(0)},readBoolean:function(){if(this.position<this.length)return this.b[this.position++]!=0;throw new sk;},readByte:function(){var a=this.readUnsignedByte();return(a&128)!=0?a-256:a},readBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);c==0&&(c=this.length-this.position);if(this.position+
c>this.length)throw new sk;a.length<b+c&&a.__resize(b+c);a.blit(b,this,this.position,c);this.position+=c},readDouble:function(){if(this.__endian==1){if(this.position+8>this.length)throw new sk;this.position+=8;return this.getDouble(this.position-8)}var a=this.readInt(),b=this.readInt();return af.i64ToDouble(b,a)},readFloat:function(){if(this.__endian==1){if(this.position+4>this.length)throw new sk;this.position+=4;return this.getFloat(this.position-4)}return af.i32ToFloat(this.readInt())},readInt:function(){var a=
this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return this.__endian==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readInt64:function(){if(this.position+8>this.length)throw new sk;if(this.__endian==1){var a=this.readUnsignedInt();var b=this.readUnsignedInt()}else b=this.readUnsignedInt(),a=this.readUnsignedInt();return new zb(b,a)},readMultiByte:function(a,b){return this.readUTFBytes(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=
new un(this,this.position),b=new nt(a);b=Wh.unwrapValue(b.read());this.position=a.pos;return b;case 3:return a=new un(this,this.position),b=new ot(a,this.__amf3Reader),b=xc.decode(b.read()),this.position=a.pos,b;case 10:return b=this.readUTF(),Gg.run(b);case 11:return b=this.readLargeUTF(),Gg.run(b);case 12:return b=this.readUTF(),(new Ym(b)).doParse();case 13:return b=this.readLargeUTF(),(new Ym(b)).doParse();default:return null}},readShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();
a=this.__endian==1?b<<8|a:a<<8|b;return(a&32768)!=0?a-65536:a},readUnsignedByte:function(){if(this.position<this.length)return this.b[this.position++];throw new sk;},readUnsignedInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),d=this.readUnsignedByte();return this.__endian==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();return this.__endian==1?(b<<8)+a:a<<8|b},readUTF:function(){var a=
this.readUnsignedShort();return this.readUTFBytes(a)},readLargeUTF:function(){var a=this.readUnsignedInt();return this.readUTFBytes(a)},readUTFBytes:function(a){if(this.position+a>this.length)throw new sk;this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){a==null&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new Ia(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=
hg.decompress(this,ek.DEFLATE);break;case 1:a=hg.decompress(this,ek.LZMA);break;default:a=hg.decompress(this,ek.ZLIB)}a!=null&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.length=this.__allocated);this.position=0},writeBoolean:function(a){this.writeByte(a?1:0)},writeByte:function(a){this.__resize(this.position+1);this.b[this.position++]=a&255},writeBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);cc.get_length(a)!=0&&(c==0&&(c=cc.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,
a,b,c),this.position+=c)},writeDouble:function(a){a=af.doubleToI64(a);this.__endian==1?(this.writeInt(a.low),this.writeInt(a.high)):(this.writeInt(a.high),this.writeInt(a.low))},writeFloat:function(a){this.__endian==1?(this.__resize(this.position+4),this.setFloat(this.position,a),this.position+=4):(a=af.floatToI32(a),this.writeInt(a))},writeInt:function(a){this.__resize(this.position+4);this.__endian==1?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a>>16&
255,this.b[this.position++]=a>>24&255):(this.b[this.position++]=a>>24&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeInt64:function(a){this.__endian==1?(this.writeUnsignedInt(a.low),this.writeUnsignedInt(a.high)):(this.writeUnsignedInt(a.high),this.writeUnsignedInt(a.low))},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeObject:function(a){switch(this.objectEncoding){case 0:a=Wh.encode(a);var b=new mp,c=new Sv(b);c.write(a);this.writeBytes(cc.fromBytes(b.getBytes()));
break;case 3:b=new mp;c=new Tv(b);a instanceof Pc?c.write(Lc.AByteArray(a)):(a=xc.encode(a),c.write(a));this.writeBytes(cc.fromBytes(b.getBytes()));break;case 10:a=qg.run(a);this.writeUTF(a);break;case 11:a=qg.run(a);this.writeLargeUTF(a);break;case 12:a=ng.print(a,null,null);this.writeUTF(a);break;case 13:a=ng.print(a,null,null),this.writeLargeUTF(a)}},writeShort:function(a){this.__resize(this.position+2);this.__endian==1?(this.b[this.position++]=a,this.b[this.position++]=a>>8):(this.b[this.position++]=
a>>8,this.b[this.position++]=a)},writeUnsignedInt:function(a){this.writeInt(a)},writeUTF:function(a){a=Ia.ofString(a);if(a.length>65535)throw new oe("Length is out of range");this.writeShort(a.length);this.writeBytes(cc.fromBytes(a))},writeLargeUTF:function(a){a=Ia.ofString(a);this.writeUnsignedInt(a.length);this.writeBytes(cc.fromBytes(a))},writeUTFBytes:function(a){a=Ia.ofString(a);this.writeBytes(cc.fromBytes(a))},__fromBytes:function(a){this.b=a.b;this.__allocated=a.length;this.data=a.data;this.length=
a.length},__resize:function(a){if(a>this.__allocated){var b=new Ia(new ArrayBuffer((a+1)*3>>1));if(this.__allocated>0){var c=this.length;this.length=this.__allocated;b.blit(0,this,0,this.__allocated);this.length=c}this.b=b.b;this.__allocated=b.length;this.data=b.data}this.length<a&&(this.length=a)},__setData:function(a){this.b=a.b;this.__allocated=a.length;this.data=a.data},get_bytesAvailable:function(){return this.length-this.position},get_endian:function(){return this.__endian},set_endian:function(a){return this.__endian=
a},get___length:function(){return this.length},set___length:function(a){return this.length=a},__class__:Pc,__properties__:{set___length:"set___length",get___length:"get___length",set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var Gn=function(){this.types=new aa;this.values=new aa};r["openfl.utils._Dictionary.ClassMap"]=Gn;Gn.__name__="openfl.utils._Dictionary.ClassMap";Gn.__interfaces__=[ha];Gn.prototype={types:null,values:null,clear:function(){this.types.h=
Object.create(null);this.values.h=Object.create(null)},copy:function(){for(var a=new Gn,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return Object.prototype.hasOwnProperty.call(this.types.h,a.__name__)},get:function(a){return this.values.h[a.__name__]},keyValueIterator:function(){return new el(this)},keys:function(){return new jp(this.types.h)},iterator:function(){return new jp(this.values.h)},remove:function(a){a=a.__name__;var b=this.types;Object.prototype.hasOwnProperty.call(b.h,
a)?(delete b.h[a],b=!0):b=!1;if(b)return!0;b=this.values;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},set:function(a,b){var c=a.__name__;this.types.h[c]=a;this.values.h[c]=b},toString:function(){return aa.stringify(this.values.h)},__class__:Gn};var En=function(){this.floatKeys=[];this.values=[]};r["openfl.utils._Dictionary.FloatMap"]=En;En.__name__="openfl.utils._Dictionary.FloatMap";En.__interfaces__=[ha];En.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=
[];this.values=[]},copy:function(){for(var a=new En,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return this.indexOf(a)>-1},get:function(a){a=this.indexOf(a);return a>-1?this.values[a]:null},keyValueIterator:function(){return new el(this)},keys:function(){return new zg(this.floatKeys.slice())},iterator:function(){return new zg(this.values.slice())},remove:function(a){a=this.indexOf(a);return a>-1?(this.floatKeys.splice(a,1),this.values.splice(a,1),!0):
!1},set:function(a,b){this.insertSorted(a,b)},indexOf:function(a){var b=this.floatKeys.length,c=0,d=b-1;if(b==0)return-1;for(;c<d;){b=Math.floor((c+d)/2);if(this.floatKeys[b]==a)return b;this.floatKeys[b]>a?d=b-1:c=b+1}return this.floatKeys[c]==a?c:-1},insertSorted:function(a,b){var c=this.floatKeys.length,d=0,f=c-1;if(c==0)this.floatKeys.push(a),this.values.push(b);else{for(;d<f;){c=Math.floor((d+f)/2);if(this.floatKeys[c]==a){this.values[c]=b;return}this.floatKeys[c]>a?f=c-1:d=c+1}this.floatKeys[d]>
a?(this.floatKeys.splice(d,0,a),this.values.splice(d,0,b)):this.floatKeys[d]<a?(this.floatKeys.splice(d+1,0,a),this.values.splice(d+1,0,b)):this.values[d]=b}},toString:function(){return this.values.toString()},__class__:En};var Fn=function(){this.map=new Na};r["openfl.utils._Dictionary.UtilsObjectMap"]=Fn;Fn.__name__="openfl.utils._Dictionary.UtilsObjectMap";Fn.__interfaces__=[ha];Fn.prototype={map:null,clear:function(){this.map.h={__keys__:{}}},copy:function(){for(var a=new Fn,b=this.keys();b.hasNext();){var c=
b.next();a.set(c,this.get(c))}return a},exists:function(a){return this.map.h.__keys__[a.__id__]!=null},get:function(a){return this.map.h[a.__id__]},keyValueIterator:function(){return new el(this)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},remove:function(a){return this.map.remove(a)},set:function(a,b){this.map.set(a,b)},toString:function(){return this.map.toString()},__class__:Fn};var Tw={fromLimeEndian:function(a){switch(a._hx_index){case 0:return 1;
case 1:return 0}},fromString:function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;default:return null}},toLimeEndian:function(a){switch(a){case 0:return bk.BIG_ENDIAN;case 1:return bk.LITTLE_ENDIAN;default:return null}},toString:function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";default:return null}}},ef={_new:function(){return{}},hasOwnProperty:function(a,b){return a!=null?Object.prototype.hasOwnProperty.call(a,b):!1},isPrototypeOf:function(a,b){if(a!=
null)for(a=u.getClass(a);a!=null;){if(a==b)return!0;a=a.__super__}return!1},iterator:function(a){if(a instanceof Array)return new zg(a);var b=A.fields(a);b==null&&(b=[]);if(a instanceof lb)for(var c=0,d=a.get_numChildren();c<d;){var f=c++;f=a.getChildAt(f).get_name();f!=null&&b.indexOf(f)==-1&&b.push(f)}return new zg(b)},propertyIsEnumerable:function(a,b){return a!=null&&Object.prototype.hasOwnProperty.call(a,b)?u.__implements(A.field(a,b),aq):!1},toLocaleString:function(a){return a==null?null:L.string(a)},
toString:function(a){return a==null?null:L.string(a)},valueOf:function(a){return a},__fieldRead:function(a,b){return ef.__get(a,b)},__fieldWrite:function(a,b,c){a!=null&&A.setProperty(a,b,c);return c},__get:function(a,b){if(a==null||b==null)return null;if(Object.prototype.hasOwnProperty.call(a,b))return A.field(a,b);if(a instanceof lb){var c=a.getChildByName(b);if(c!=null)return c}b=A.getProperty(a,b);A.isFunction(b)&&(b=Function.prototype.bind.call(b,a));return b},__set:function(a,b,c){a!=null&&
A.setProperty(a,b,c);return c},__getArray:function(a,b){return a==null?null:u.__cast(a,Array)[b]},__setArray:function(a,b,c){return a==null?c:u.__cast(a,Array)[b]=c},toFunction:function(a){return a},toFloat:function(a){return typeof a=="number"?a:NaN},toInt:function(a){return a},toBool:function(a){return typeof a=="boolean"?a:typeof a=="number"?a!=0:a!=null},__negate:function(a){return-a},__preIncrement:function(a){return++a},__postIncrement:function(a){return a++},__preDecrement:function(a){return--a},
__postDecrement:function(a){return a--},__add:function(a,b){if(typeof a=="string"||typeof b=="string"){if(a==null)a="null";else{var c=a;a=c==null?null:L.string(c)}b==null?b="null":(c=b,b=c==null?null:L.string(c));return a+b}return a+b},__addString:function(a,b){return(a==null?"null":a==null?null:L.string(a))+b},__addInt:function(a,b){return a+b},__addFloat:function(a,b){return a+b},__sub:function(a,b){return a-b},__subInt:function(a,b){return a-b},__intSub:function(a,b){return a-b},__subFloat:function(a,
b){return a-b},__floatSub:function(a,b){return a-b},__mul:function(a,b){return a*b},__mulInt:function(a,b){return a*b},__mulFloat:function(a,b){return a*b},__div:function(a,b){return a/b},__divInt:function(a,b){return a/b},__intDiv:function(a,b){return a/b},__divFloat:function(a,b){return a/b},__floatDiv:function(a,b){return a/b},__mod:function(a,b){return a%b},__modInt:function(a,b){return a%b},__intMod:function(a,b){return a%b},__modFloat:function(a,b){return a%b},__floatMod:function(a,b){return a%
b},__eq:function(a,b){return a==b},__eqDynamic:function(a,b){return a==b},__neq:function(a,b){return a!=b},__neqDynamic:function(a,b){return a!=b},__lt:function(a,b){return a<b},__ltInt:function(a,b){return a<b},__intLt:function(a,b){return a<b},__ltFloat:function(a,b){return a<b},__floatLt:function(a,b){return a<b},__lte:function(a,b){return a<=b},__lteInt:function(a,b){return ef.__lte(a,b)},__intLte:function(a,b){return ef.__lte(a,b)},__lteFloat:function(a,b){return ef.__lte(a,b)},__floatLte:function(a,
b){return ef.__lte(a,b)},__gt:function(a,b){return a>b},__gtInt:function(a,b){return ef.__gt(a,b)},__intGt:function(a,b){return a>b},__gtFloat:function(a,b){return ef.__gt(a,b)},__floatGt:function(a,b){return a>b},__gte:function(a,b){return a>=b},__gteInt:function(a,b){return ef.__gte(a,b)},__intGte:function(a,b){return a>=b},__gteFloat:function(a,b){return ef.__gte(a,b)},__floatGte:function(a,b){return a>=b},__complement:function(a){return~a},__and:function(a,b){return a&b},__andInt:function(a,b){return a&
b},__or:function(a,b){return a|b},__orInt:function(a,b){return a|b},__xor:function(a,b){return a^b},__xorInt:function(a,b){return a^b},__shr:function(a,b){return a>>b},__shrInt:function(a,b){return a>>b},__intShr:function(a,b){return a>>b},__ushr:function(a,b){return a>>>b},__ushrInt:function(a,b){return a>>>b},__intUshr:function(a,b){return a>>>b},__shl:function(a,b){return a<<b},__shlInt:function(a,b){return a<<b},__intShl:function(a,b){return a<<b}},pt=function(){};r["haxe.lang.Iterator"]=pt;pt.__name__=
"haxe.lang.Iterator";pt.__isInterface__=!0;pt.prototype={hasNext:null,next:null,__class__:pt};var aq=function(){};r["haxe.lang.Iterable"]=aq;aq.__name__="haxe.lang.Iterable";aq.__isInterface__=!0;aq.prototype={iterator:null,__class__:aq};var fd=function(){};r["openfl.utils._internal.Lib"]=fd;fd.__name__="openfl.utils._internal.Lib";fd.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(fd.__sentWarnings.h,b)||(fd.__sentWarnings.h[b]=!0,Mb.warn(a.methodName+
" is not implemented",a))};var ym=function(){this.rollOutStack=[]};r["openfl.utils._internal.TouchData"]=ym;ym.__name__="openfl.utils._internal.TouchData";ym.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touchOverTarget=this.touchDownTarget=this.touch=null;this.rollOutStack.splice(0,this.rollOutStack.length)},__class__:ym};var nt=function(a){this.i=a;a.set_bigEndian(!0)};r["openfl.utils._internal.format.amf.AMFReader"]=nt;nt.__name__="openfl.utils._internal.format.amf.AMFReader";
nt.prototype={i:null,readObject:function(){for(var a=new aa;;){var b=this.i.readByte(),c=this.i.readByte();b=this.i.readString(b<<8|c);c=this.i.readByte();if(c==9)break;c=this.readWithCode(c);a.h[b]=c}return a},readArray:function(a){for(var b=[],c=0;c<a;)c++,b.push(this.read());return b},readInt:function(){return this.i.readInt32()},readWithCode:function(a){var b=this.i;switch(a){case 0:return of.ANumber(b.readDouble());case 1:switch(b.readByte()){case 0:b=!1;break;case 1:b=!0;break;default:throw la.thrown("Invalid AMF");
}return of.ABool(b);case 2:return of.AString(b.readString(b.readUInt16()));case 5:return of.ANull;case 6:return of.AUndefined;case 7:throw la.thrown("Not supported : Reference");case 3:case 8:return b=a==8?this.i.readInt32():null,of.AObject(this.readObject(),b);case 10:return of.AArray(this.readArray(this.i.readInt32()));case 11:return a=b.readDouble(),b=b.readUInt16(),of.ADate(new Date(a+b*60*1E3));case 12:return of.AString(b.readString(this.i.readInt32()));default:throw la.thrown("Unknown AMF "+
a);}},read:function(){return this.readWithCode(this.i.readByte())},__class__:nt};var Wh=function(){};r["openfl.utils._internal.format.amf.AMFTools"]=Wh;Wh.__name__="openfl.utils._internal.format.amf.AMFTools";Wh.encode=function(a){var b=Aa.typeof(a);switch(b._hx_index){case 0:return of.ANull;case 1:return of.ANumber(a);case 2:return of.ANumber(a);case 3:return of.ABool(a);case 4:b=new aa;for(var c=0,d=A.fields(a);c<d.length;){var f=d[c];++c;var g=Wh.encode(A.field(a,f));b.h[f]=g}return of.AObject(b);
case 6:b=b.c;switch(b){case Array:f=[];for(b=0;b<a.length;)g=a[b],++b,f.push(Wh.encode(g));return of.AArray(f);case String:return of.AString(a);case aa:b=new aa;c=Object.keys(a.h);d=c.length;for(var h=0;h<d;)f=c[h++],g=Wh.encode(a.h[f]),b.h[f]=g;return of.AObject(b);default:throw la.thrown("Can't encode instance of "+b.__name__);}break;default:throw la.thrown("Can't encode "+L.string(a));}};Wh.number=function(a){return a==null?null:a._hx_index==0?a.f:null};Wh.string=function(a){return a==null?null:
a._hx_index==2?a.s:null};Wh.object=function(a){return a==null?null:a._hx_index==3?a.fields:null};Wh.abool=function(a){return a==null?null:a._hx_index==1?a.b:null};Wh.array=function(a){return a==null?null:a._hx_index==7?a.values:null};Wh.unwrapValue=function(a){switch(a._hx_index){case 0:return a=a.f;case 1:return a.b;case 2:return a.s;case 3:a=a.fields;var b={};for(var c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=c[f++];b[g]=Wh.unwrapValue(a.h[g])}return b;case 4:return a.d;case 5:return null;case 6:return null;
case 7:c=a.values;a=Wh.unwrapValue;d=Array(c.length);b=0;for(f=c.length;b<f;)g=b++,d[g]=a(c[g]);return d}};var of=O["openfl.utils._internal.format.amf.AMFValue"]={__ename__:"openfl.utils._internal.format.amf.AMFValue",__constructs__:null,ANumber:(G=function(a){return{_hx_index:0,f:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},G._hx_name="ANumber",G.__params__=["f"],G),ABool:(G=function(a){return{_hx_index:1,b:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},
G._hx_name="ABool",G.__params__=["b"],G),AString:(G=function(a){return{_hx_index:2,s:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},G._hx_name="AString",G.__params__=["s"],G),AObject:(G=function(a,b){return{_hx_index:3,fields:a,size:b,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},G._hx_name="AObject",G.__params__=["fields","size"],G),ADate:(G=function(a){return{_hx_index:4,d:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},G._hx_name=
"ADate",G.__params__=["d"],G),AUndefined:{_hx_name:"AUndefined",_hx_index:5,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D},ANull:{_hx_name:"ANull",_hx_index:6,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D},AArray:(G=function(a){return{_hx_index:7,values:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:D}},G._hx_name="AArray",G.__params__=["values"],G)};of.__constructs__=[of.ANumber,of.ABool,of.AString,of.AObject,of.ADate,of.AUndefined,of.ANull,
of.AArray];var Sv=function(a){this.o=a;a.set_bigEndian(!0)};r["openfl.utils._internal.format.amf.AMFWriter"]=Sv;Sv.__name__="openfl.utils._internal.format.amf.AMFWriter";Sv.prototype={o:null,write:function(a){var b=this.o;switch(a._hx_index){case 0:var c=a.f;b.writeByte(0);b.writeDouble(c);break;case 1:c=a.b;b.writeByte(1);b.writeByte(c?1:0);break;case 2:c=a.s;c.length<=65535?(b.writeByte(2),b.writeUInt16(c.length)):(b.writeByte(12),b.writeInt32(c.length));b.writeString(c);break;case 3:c=a.fields;
a=a.size;a==null?b.writeByte(3):(b.writeByte(8),b.writeInt32(a));for(var d=Object.keys(c.h),f=d.length,g=0;g<f;)a=d[g++],b.writeUInt16(a.length),b.writeString(a),this.write(c.h[a]);b.writeByte(0);b.writeByte(0);b.writeByte(9);break;case 4:c=a.d;b.writeByte(11);b.writeDouble(c.getTime());b.writeUInt16(0);break;case 5:b.writeByte(6);break;case 6:b.writeByte(5);break;case 7:for(c=a.values,b.writeByte(10),b.writeInt32(c.length),b=0;b<c.length;)a=c[b],++b,this.write(a)}},__class__:Sv};var qt=function(a,
b){this.a=a;this.extra=b};r["openfl.utils._internal.format.amf3.AMF3Array"]=qt;qt.__name__="openfl.utils._internal.format.amf3.AMF3Array";qt.prototype={a:null,extra:null,__class__:qt};var $n=O["openfl.utils._internal.format.amf3.AMF3ObjectHeader"]={__ename__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",__constructs__:null,HReference:(G=function(a){return{_hx_index:0,value:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:D}},G._hx_name="HReference",G.__params__=["value"],
G),HTraits:(G=function(a){return{_hx_index:1,traits:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:D}},G._hx_name="HTraits",G.__params__=["traits"],G),HExternal:(G=function(a){return{_hx_index:2,className:a,__enum__:"openfl.utils._internal.format.amf3.AMF3ObjectHeader",toString:D}},G._hx_name="HExternal",G.__params__=["className"],G)};$n.__constructs__=[$n.HReference,$n.HTraits,$n.HExternal];var ot=function(a,b){b==null?(this.complexObjectsTable=[],this.objectTraitsTable=
[],this.stringTable=[]):(this.complexObjectsTable=b.complexObjectsTable,this.objectTraitsTable=b.objectTraitsTable,this.stringTable=b.stringTable);this.i=a;a.set_bigEndian(!0)};r["openfl.utils._internal.format.amf3.AMF3Reader"]=ot;ot.__name__="openfl.utils._internal.format.amf3.AMF3Reader";ot.prototype={complexObjectsTable:null,objectTraitsTable:null,stringTable:null,i:null,readObject:function(a){a==null&&(a=this.readObjectHeader());var b=null;switch(a._hx_index){case 0:var c=a.value;return c;case 1:var d=
a.traits;a=new aa;b=Lc.AObject(a,null,d.className!=null?d.className:null);for(var f=0,g=d.sealedMemberNames.length;f<g;){c=f++;var h=d.sealedMemberNames[c];c=this.read();a.h[h]=c}if(d.isDynamic)for(;;){d=xc.decode(this.readString());if(d=="")break;c=this.read();a.h[d]=c}break;case 2:b=xc.object(Lc.AObject(null,null,a.className)),b!=null&&u.__implements(b,qn)?(b.readExternal(new rt(this)),b=Lc.AExternal(b)):b=Lc.ANull}this.complexObjectsTable.push(b);return b},readObjectHeader:function(a){var b=this.readInt();
if((b&1)==0)return $n.HReference(this.complexObjectsTable[b>>1]);if((b&3)==1)return $n.HTraits(this.objectTraitsTable[b>>2]);if((b&7)==3){var c=[],d=b>>4;a={isExternalizable:!1,isDynamic:(b>>3&1)==1,className:a!=null?a:xc.decode(this.readString()),sealedMemberNames:c};for(b=0;b<d;)b++,c.push(xc.decode(this.readString()));this.objectTraitsTable.push(a);return $n.HTraits(a)}if((b&7)==7)return $n.HExternal(a!=null?a:xc.decode(this.readString()));throw la.thrown("Invalid object traits");},readMap:function(){var a=
this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=new Ye,c=Lc.AMap(b);this.complexObjectsTable.push(c);this.i.readByte();for(var d=0;d<a;)d++,b.set(this.read(),this.read());return c},readArray:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=[],c=new aa,d=Lc.AArray(b,c);this.complexObjectsTable.push(d);for(var f=xc.decode(this.readString());f.length!=0;){var g=this.read();c.h[f]=g;f=xc.decode(this.readString())}for(c=0;c<a;)c++,
b.push(this.read());return d},readIntVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=this.i.readByte()!=0,c=gb.toIntVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readInt32())}a=Lc.AIntVector(c);this.complexObjectsTable.push(a);return a},readFloatVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;var b=this.i.readByte()!=0,c=gb.toFloatVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,
this.i.readDouble())}a=Lc.AFloatVector(c);this.complexObjectsTable.push(a);return a},readObjectVector:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];var b=a>>1;a=this.i.readByte()!=0;var c=xc.decode(this.readString()),d=gb.toNullVector(null,b);d.fixed=a;var f=Lc.AObjectVector(d,c);this.complexObjectsTable.push(f);a=null;for(var g=0;g<b;){var h=g++,l=this.i.readByte();switch(l){case 1:d.set(h,null);break;case 10:a==null&&(a=this.readObjectHeader(c));d.set(h,this.readObject(a));
break;default:Me.trace("Unhandled object vector code: 0x"+Z.hex(l),{fileName:"openfl/utils/_internal/format/amf3/AMF3Reader.hx",lineNumber:317,className:"openfl.utils._internal.format.amf3.AMF3Reader",methodName:"readObjectVector"})}}return f},readByteArray:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a>>=1;for(var b=new Ia(new ArrayBuffer(a)),c=0;c<a;){var d=c++,f=this.i.readByte();b.b[d]=f}b=cc.fromBytes(b);b.__endian=0;b.__amf3Reader=this;b=Lc.AByteArray(b);
this.complexObjectsTable.push(b);return b},readInt:function(a,b){b==null&&(b=0);a==null&&(a=!1);var c=this.i.readByte()&255;if(c<128)return c>>b;var d=(c&127)<<7;c=this.i.readByte()&255;if(c<128)return(d|c)>>b;d=(d|c&127)<<7;c=this.i.readByte()&255;if(c<128)return(d|c)>>b;d=(d|c&127)<<8;c=this.i.readByte()&255;d|=c;a&&(d&268435456)!=0&&(d|=-536870912);return d>>b},readString:function(){var a=this.readInt();return(a&1)==0?this.stringTable[a>>1]:this.readStringNoHeader(a>>1)},readStringNoHeader:function(a){if(a==
0)return Lc.AString("");a=Lc.AString(this.i.readString(a,ip.UTF8));this.stringTable.push(a);return a},readDate:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a=new Date(this.i.readDouble());a=Lc.ADate(a);this.complexObjectsTable.push(a);return a},readXml:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a=cb.parse(xc.decode(this.readStringNoHeader(a>>1)));a=Lc.AXml(a);this.complexObjectsTable.push(a);return a},readWithCode:function(a){var b=
this.i;switch(a){case 0:return Lc.AUndefined;case 1:return Lc.ANull;case 2:return Lc.ABool(!1);case 3:return Lc.ABool(!0);case 4:return Lc.AInt(this.readInt(!0));case 5:return Lc.ANumber(b.readDouble());case 6:return this.readString();case 7:throw la.thrown("XMLDocument unsupported");case 8:return this.readDate();case 9:return this.readArray();case 10:return this.readObject();case 11:return this.readXml();case 12:return this.readByteArray();case 13:case 14:return this.readIntVector();case 15:return this.readFloatVector();
case 16:return this.readObjectVector();case 17:return this.readMap();default:throw la.thrown("Unknown AMF "+a);}},read:function(){var a=this.i.readByte();return this.readWithCode(a)},__class__:ot};var rt=function(a){this.i=a.i;this.r=a;this.objectEncoding=3};r["openfl.utils._internal.format.amf3.AMF3ReaderInput"]=rt;rt.__name__="openfl.utils._internal.format.amf3.AMF3ReaderInput";rt.__interfaces__=[$p];rt.prototype={objectEncoding:null,i:null,r:null,readBoolean:function(){return this.i.readByte()!=
0},readByte:function(){return this.i.readByte()},readBytes:function(a,b,c){c==null&&(c=0);b==null&&(b=0);this.i.readBytes(cc.toBytes(a),b,c)},readDouble:function(){return this.i.readDouble()},readFloat:function(){return this.i.readFloat()},readInt:function(){return this.i.readInt32()},readMultiByte:function(a,b){return this.i.readString(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=new nt(this.i);return a=Wh.unwrapValue(a.read());case 3:return a=new ot(this.i,this.r),a=xc.decode(a.read());
default:return null}},readShort:function(){return this.i.readInt16()},readUnsignedByte:function(){return this.i.readByte()},readUnsignedInt:function(){var a=this.i.readByte(),b=this.i.readByte(),c=this.i.readByte(),d=this.i.readByte();return this.get_endian()==1?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.i.readByte(),b=this.i.readByte();return this.get_endian()==1?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readUTFBytes:function(a){return this.i.readString(a)},
get_bytesAvailable:function(){return-1},get_endian:function(){return this.i.bigEndian?0:1},set_endian:function(a){return a},__class__:rt,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var xc=function(){};r["openfl.utils._internal.format.amf3.AMF3Tools"]=xc;xc.__name__="openfl.utils._internal.format.amf3.AMF3Tools";xc.encode=function(a){var b=Aa.typeof(a);switch(b._hx_index){case 0:return Lc.ANull;case 1:return Lc.AInt(a);case 2:return Lc.ANumber(a);
case 3:return Lc.ABool(a);case 4:for(var c=new aa,d=0,f=A.fields(a);d<f.length;){var g=f[d];++d;b=xc.encode(A.field(a,g));c.h[g]=b}return Lc.AObject(c,null,null);case 5:return Lc.ANull;case 6:switch(b.c){case Array:g=[];for(b=0;b<a.length;)c=a[b],++b,g.push(xc.encode(c));return Lc.AArray(g);case Date:return Lc.ADate(a);case String:return Lc.AString(a);case cb:return Lc.AXml(a);case we:case Na:case aa:c=new Ye;f=Object.keys(a.h);d=f.length;for(b=0;b<d;)g=f[b++],c.set(xc.encode(g),xc.encode(a.h[g]));
return Lc.AMap(c);case Ia:return Lc.AByteArray(cc.fromBytes(a));case Pc:return Lc.AByteArray(a);case qt:g=[];f=new aa;b=0;for(d=a.a;b<d.length;)c=d[b],++b,g.push(xc.encode(c));d=c=a.extra.h;b=Object.keys(c);for(var h=b.length,l=0;l<h;){var k=d[b[l++]];c=xc.encode(a.extra.h[k]);f.h[k]=c}return Lc.AArray(g,f);default:return u.__implements(a,qn)?Lc.AExternal(a):Lc.ANull}break;default:throw la.thrown("Can't encode "+L.string(a));}};xc.decode=function(a){if(a==null)return null;switch(a._hx_index){case 0:return xc.undefined(a);
case 1:return xc.anull(a);case 2:return xc.bool(a);case 3:return xc.int(a);case 4:return xc.number(a);case 5:return xc.string(a);case 6:return xc.date(a);case 7:return xc.object(a);case 8:return xc.external(a);case 9:return xc.array(a);case 10:return xc.intVector(a);case 11:return xc.floatVector(a);case 12:return xc.objectVector(a);case 13:return xc.xml(a);case 14:return xc.byteArray(a);case 15:return xc.map(a)}};xc.undefined=function(a){return null};xc.anull=function(a){return null};xc.bool=function(a){return a==
null?null:a._hx_index==2?a.b:null};xc.int=function(a){return a==null?null:a._hx_index==3?a.i:null};xc.number=function(a){return a==null?null:a._hx_index==4?a.f:null};xc.string=function(a){return a==null?null:a._hx_index==5?a.s:null};xc.date=function(a){return a==null?null:a._hx_index==6?a.d:null};xc.array=function(a){if(a!=null&&a._hx_index==9){a=a.values;for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(xc.decode(d))}return b}return null};xc.intVector=function(a){return a==null?null:a._hx_index==
10?a.v:null};xc.floatVector=function(a){return a==null?null:a._hx_index==11?a.v:null};xc.objectVector=function(a){if(a!=null&&a._hx_index==12){a=a.v;for(var b=gb.toObjectVector(null,a.get_length(),a.fixed),c=0,d=a.get_length();c<d;){var f=c++;b.set(f,xc.decode(a.get(f)))}return b}return null};xc.object=function(a){if(a!=null&&a._hx_index==7){var b=a.fields,c=a.className;a=null;if(c!=null&&c!=""){var d=Oa.getClassByAlias(c);d==null&&(d=r[c]);d!=null&&(a=Aa.createInstance(d,[]))}else a={};if(a!=null&&
b!=null){c=Object.keys(b.h);d=c.length;for(var f=0;f<d;){var g=c[f++];A.setProperty(a,g,xc.decode(b.h[g]))}}return a}return null};xc.external=function(a){return a==null?null:a._hx_index==8?a.o:null};xc.xml=function(a){return a==null?null:a._hx_index==13?a.x:null};xc.byteArray=function(a){return a==null?null:a._hx_index==14?a.ba:null};xc.map=function(a){if(a!=null&&a._hx_index==15){a=a.m;for(var b=a.keys();b.hasNext();){b=b.next();if(typeof b=="number"&&(b|0)===b){b=new we;for(var c=a.keys();c.hasNext();){var d=
c.next(),f=xc.decode(d);d=xc.decode(a.get(d));b.h[f]=d}}else if(typeof b=="string")for(b=new aa,c=a.keys();c.hasNext();)d=c.next(),f=xc.decode(d),d=xc.decode(a.get(d)),b.h[f]=d;else for(b=new Na,c=a.keys();c.hasNext();)f=c.next(),b.set(xc.decode(f),xc.decode(a.get(f)));break}return new Na}return null};var Lc=O["openfl.utils._internal.format.amf3.AMF3Value"]={__ename__:"openfl.utils._internal.format.amf3.AMF3Value",__constructs__:null,AUndefined:{_hx_name:"AUndefined",_hx_index:0,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:D},ANull:{_hx_name:"ANull",_hx_index:1,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D},ABool:(G=function(a){return{_hx_index:2,b:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="ABool",G.__params__=["b"],G),AInt:(G=function(a){return{_hx_index:3,i:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AInt",G.__params__=["i"],G),ANumber:(G=function(a){return{_hx_index:4,f:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:D}},G._hx_name="ANumber",G.__params__=["f"],G),AString:(G=function(a){return{_hx_index:5,s:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AString",G.__params__=["s"],G),ADate:(G=function(a){return{_hx_index:6,d:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="ADate",G.__params__=["d"],G),AObject:(G=function(a,b,c){return{_hx_index:7,fields:a,size:b,className:c,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},
G._hx_name="AObject",G.__params__=["fields","size","className"],G),AExternal:(G=function(a){return{_hx_index:8,o:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AExternal",G.__params__=["o"],G),AArray:(G=function(a,b){return{_hx_index:9,values:a,extra:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AArray",G.__params__=["values","extra"],G),AIntVector:(G=function(a){return{_hx_index:10,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:D}},G._hx_name="AIntVector",G.__params__=["v"],G),AFloatVector:(G=function(a){return{_hx_index:11,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AFloatVector",G.__params__=["v"],G),AObjectVector:(G=function(a,b){return{_hx_index:12,v:a,type:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AObjectVector",G.__params__=["v","type"],G),AXml:(G=function(a){return{_hx_index:13,x:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:D}},G._hx_name="AXml",G.__params__=["x"],G),AByteArray:(G=function(a){return{_hx_index:14,ba:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AByteArray",G.__params__=["ba"],G),AMap:(G=function(a){return{_hx_index:15,m:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:D}},G._hx_name="AMap",G.__params__=["m"],G)};Lc.__constructs__=[Lc.AUndefined,Lc.ANull,Lc.ABool,Lc.AInt,Lc.ANumber,Lc.AString,Lc.ADate,Lc.AObject,Lc.AExternal,Lc.AArray,Lc.AIntVector,
Lc.AFloatVector,Lc.AObjectVector,Lc.AXml,Lc.AByteArray,Lc.AMap];var Tv=function(a){this.o=a;a.set_bigEndian(!0)};r["openfl.utils._internal.format.amf3.AMF3Writer"]=Tv;Tv.__name__="openfl.utils._internal.format.amf3.AMF3Writer";Tv.prototype={o:null,writeInt:function(a){a>268435455||a<-268435456?(this.o.writeByte(5),this.o.writeDouble(a)):(this.o.writeByte(4),this.writeUInt(a))},writeUInt:function(a,b){b==null&&(b=!1);b&&(a=a<<1|1);(a>>>31&1)==1&&(a&=536870911);b=22;var c=!1,d=a>>>b-1;ta.gt(d,0)&&(d>>>=
1,this.o.writeByte(d|128),a-=d<<b,++b,c=!0);b-=8;d=a>>>b;if(c||ta.gt(d,0))this.o.writeByte(d|128),a-=d<<b,c=!0;b-=7;d=a>>>b;if(c||ta.gt(d,0))this.o.writeByte(d|128),a-=d<<b;this.o.writeByte(a)},writeString:function(a){a=Ia.ofString(a,ip.UTF8);this.writeUInt(a.length,!0);this.o.writeBytes(a,0,a.length)},writeIntVector:function(a){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeInt32(a.get(d))}},writeFloatVector:function(a){this.writeUInt(a.get_length(),
!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeDouble(a.get(d))}},writeObjectVector:function(a,b){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);this.o.writeString(b);b=0;for(var c=a.get_length();b<c;){var d=b++;this.write(a.get(d))}},writeObject:function(a,b,c){b==null?this.o.writeByte(11):this.writeUInt(b<<4|3);this.o.writeByte(1);if(b==null){c=a.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];this.writeString(g);this.write(a.h[g])}this.o.writeByte(1)}else{b=
[];c=a.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=c[f++],b.push(g),this.writeString(g);c=0;for(d=b.length;c<d;)f=c++,this.write(a.h[b[f]])}},writeExternal:function(a){this.writeUInt(7);var b=u.getClass(a),c=null;Oa.__registeredClasses.exists(b)&&(c=Oa.__registeredClasses.get(b));c==null&&(c=b.__name__);this.writeString(c);b=new Pc(0);b.__endian=0;a.writeExternal(b);this.o.writeBytes(cc.toBytes(b),0,cc.get_length(b))},write:function(a){var b=this.o;switch(a._hx_index){case 0:b.writeByte(0);break;
case 1:b.writeByte(1);break;case 2:var c=a.b;b.writeByte(c?3:2);break;case 3:this.writeInt(a.i);break;case 4:c=a.f;b.writeByte(5);b.writeDouble(c);break;case 5:c=a.s;b.writeByte(6);this.writeString(c);break;case 6:c=a.d;b.writeByte(8);b.writeByte(1);b.writeDouble(c.getTime());break;case 7:var d=a.fields;c=a.size;a=a.className;b.writeByte(10);this.writeObject(d,c,a);break;case 8:c=a.o;b.writeByte(10);this.writeExternal(c);break;case 9:c=a.values;a=a.extra;b.writeByte(9);this.writeUInt(c.length,!0);
if(a!=null){d=a.h;d=Object.keys(d);for(var f=d.length,g=0;g<f;){var h=d[g++];b.writeString(h);this.write(a.h[h])}}b.writeByte(1);for(a=0;a<c.length;)b=c[a],++a,this.write(b);break;case 10:c=a.v;b.writeByte(13);this.writeIntVector(c);break;case 11:c=a.v;b.writeByte(15);this.writeFloatVector(c);break;case 12:c=a.v;b.writeByte(16);this.writeObjectVector(c);break;case 13:c=a.x;b.writeByte(11);this.writeString(Rm.print(c));break;case 14:c=a.ba;b.writeByte(12);this.writeUInt(cc.get_length(c),!0);b.write(cc.toBytes(c));
break;case 15:for(c=a.m,b.writeByte(17),this.writeUInt(V.count(c),!0),b.writeByte(0),b=c.keys();b.hasNext();)a=b.next(),this.write(a),this.write(c.get(a))}},__class__:Tv};var fq=function(){this._useF8=!0;this._varType="string";this._intPos=3;xe.call(this,"original.debug","Debug");this._txFormat=new qf("_sans",10,16777215,null,null,null,null,null,3);this._btFormat=new qf("_sans",9,0,!0,null,null,null,null,0);this._inFormat=new qf("_sans",10,16777215,null,null,null,null,null,3);this._infoArea=new za;
this._infoArea.get_graphics().beginFill(0,.5);this._infoArea.get_graphics().drawRect(0,0,350,110);this._infoArea.get_graphics().endFill();this._infoArea.set_x(this._infoArea.set_y(10));this._infoText=this.createTxInterface(!0,"",5,5,this._infoArea.get_width()-10,this._infoArea.get_height()-19);this._infoArea.addChild(this._infoText);var a=(this._infoArea.get_width()-40)/7;this._hideBt=this.createBtInterface("hide",m(this,this.onInterfaceHide));this._hideBt.set_x(5);this._hideBt.set_y(this._infoText.get_height()-
2);this._hideBt.set_width(a);this._infoArea.addChild(this._hideBt);this._cycleBt=this.createBtInterface("cycle",m(this,this.onInterfaceCycle));this._cycleBt.set_x(this._hideBt.get_x()+a+5);this._cycleBt.set_y(this._hideBt.get_y());this._cycleBt.set_width(a);this._infoArea.addChild(this._cycleBt);this._movieIBt=this.createBtInterface("movie",m(this,this.onInterfaceMovie));this._movieIBt.set_x(this._cycleBt.get_x()+a+5);this._movieIBt.set_y(this._hideBt.get_y());this._movieIBt.set_width(a);this._infoArea.addChild(this._movieIBt);
this._sceneIBt=this.createBtInterface("scene",m(this,this.onInterfaceScene));this._sceneIBt.set_x(this._movieIBt.get_x()+a+5);this._sceneIBt.set_y(this._hideBt.get_y());this._sceneIBt.set_width(a);this._infoArea.addChild(this._sceneIBt);this._varIBt=this.createBtInterface("vars",m(this,this.onInterfaceVar));this._varIBt.set_x(this._sceneIBt.get_x()+a+5);this._varIBt.set_y(this._hideBt.get_y());this._varIBt.set_width(a);this._infoArea.addChild(this._varIBt);this._actionIBt=this.createBtInterface("action",
m(this,this.onInterfaceAction));this._actionIBt.set_x(this._varIBt.get_x()+a+5);this._actionIBt.set_y(this._hideBt.get_y());this._actionIBt.set_width(a);this._infoArea.addChild(this._actionIBt);this._statsIBt=this.createBtInterface("stats",m(this,this.onInterfaceStats));this._statsIBt.set_x(this._actionIBt.get_x()+a+5);this._statsIBt.set_y(this._hideBt.get_y());this._statsIBt.set_width(a);this._infoArea.addChild(this._statsIBt);this._interfaceMovie=new za;this._interfaceMovie.get_graphics().beginFill(0,
.5);this._interfaceMovie.get_graphics().drawRect(0,0,this._infoArea.get_width(),75);this._interfaceMovie.get_graphics().endFill();this._interfaceMovie.set_x(0);this._interfaceMovie.set_y(this._infoArea.get_height()+2);this._movieTxt=this.createTxInterface(!0,"<b>New movie load:</b> enter the movie ID",5,5,this._interfaceMovie.get_width()-10,24);this._interfaceMovie.addChild(this._movieTxt);this._movieInput=this.createInputInterface(this._interfaceMovie.get_width()-10);this._movieInput.set_x(5);this._movieInput.set_y(this._movieTxt.get_y()+
this._movieTxt.get_height());this._interfaceMovie.addChild(this._movieInput);this._movieBt=this.createBtInterface("load movie",m(this,this.onLoadMovie));this._movieBt.set_x(5);this._movieBt.set_y(this._movieInput.get_y()+this._movieInput.get_height()+5);this._movieBt.set_width(this._movieInput.get_width());this._interfaceMovie.addChild(this._movieBt);this._interfaceScene=new za;this._interfaceScene.get_graphics().beginFill(0,.5);this._interfaceScene.get_graphics().drawRect(0,0,this._infoArea.get_width(),
75);this._interfaceScene.get_graphics().endFill();this._interfaceScene.set_x(0);this._interfaceScene.set_y(this._infoArea.get_height()+2);this._sceneTxt=this.createTxInterface(!0,"<b>New scene load:</b> enter the scene ID",5,5,this._interfaceScene.get_width()-10,24);this._interfaceScene.addChild(this._sceneTxt);this._sceneInput=this.createInputInterface(this._interfaceScene.get_width()-10);this._sceneInput.set_x(5);this._sceneInput.set_y(this._sceneTxt.get_y()+this._sceneTxt.get_height());this._interfaceScene.addChild(this._sceneInput);
this._sceneBt=this.createBtInterface("load scene",m(this,this.onLoadScene));this._sceneBt.set_x(5);this._sceneBt.set_y(this._sceneInput.get_y()+this._sceneInput.get_height()+5);this._sceneBt.set_width(this._sceneInput.get_width());this._interfaceScene.addChild(this._sceneBt);this._interfaceVar=new za;this._interfaceVar.get_graphics().beginFill(0,.5);this._interfaceVar.get_graphics().drawRect(0,0,this._infoArea.get_width(),200);this._interfaceVar.get_graphics().endFill();this._interfaceVar.set_x(0);
this._interfaceVar.set_y(this._infoArea.get_height()+2);this._varTxt=this.createTxInterface(!1,"<b>String variables</b>",5,5,this._interfaceVar.get_width()-10,24);this._varTxt.set_defaultTextFormat(this._txFormat);this._interfaceVar.addChild(this._varTxt);this._varList=this.createTxInterface(!0,"",5,this._varTxt.get_y()+this._varTxt.get_height(),this._varTxt.get_width(),100);this._varList.set_selectable(!0);this._varList.set_type(1);this._varList.set_border(!0);this._varList.set_borderColor(16777215);
this._varList.addEventListener("click",m(this,this.onInputClick));this._interfaceVar.addChild(this._varList);this._setvarTxt=this.createTxInterface(!1,"<b>Set string value (set to empty field to remove it)</b>",5,this._varList.get_y()+this._varList.get_height()+5,this._interfaceVar.get_width()-10,18);this._interfaceVar.addChild(this._setvarTxt);this._setVarName=this.createInputInterface(this._interfaceVar.get_width()/3);this._setVarName.set_x(5);this._setVarName.set_y(this._setvarTxt.get_y()+this._setvarTxt.get_height()+
5);this._interfaceVar.addChild(this._setVarName);this._setVarEqual=this.createTxInterface(!1,"=",this._setVarName.get_x()+this._setVarName.get_width()+5,this._setVarName.get_y(),20,15);this._interfaceVar.addChild(this._setVarEqual);this._setVarValue=this.createInputInterface(this._interfaceVar.get_width()/3);this._setVarValue.set_x(this._setVarEqual.get_x()+this._setVarEqual.get_width()+2);this._setVarValue.set_y(this._setVarName.get_y());this._interfaceVar.addChild(this._setVarValue);this._setVarButton=
this.createBtInterface("set",m(this,this.onSetVar));this._setVarButton.set_x(this._interfaceVar.get_width()-this._setVarButton.get_width()-5);this._setVarButton.set_y(this._setVarName.get_y());this._interfaceVar.addChild(this._setVarButton);this._traceVarButton=this.createBtInterface("trace",m(this,this.onTraceVar));this._traceVarButton.set_x(this._interfaceVar.get_width()-this._traceVarButton.get_width()-5);this._traceVarButton.set_y(this._setVarButton.get_y()+this._setVarButton.get_height()+5);
this._interfaceVar.addChild(this._traceVarButton);this._refreshVarButton=this.createBtInterface("refresh",m(this,this.onRefreshVar));this._refreshVarButton.set_x(this._traceVarButton.get_x()-this._refreshVarButton.get_width()-5);this._refreshVarButton.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._refreshVarButton);this._setVarString=this.createBtInterface("string",m(this,this.onSetString));this._setVarString.set_x(5);this._setVarString.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarString);
this._setVarFloat=this.createBtInterface("float",m(this,this.onSetFloat));this._setVarFloat.set_x(this._setVarString.get_x()+this._setVarString.get_width()+5);this._setVarFloat.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarFloat);this._setVarInt=this.createBtInterface("int",m(this,this.onSetInt));this._setVarInt.set_x(this._setVarFloat.get_x()+this._setVarFloat.get_width()+5);this._setVarInt.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarInt);
this._setVarBool=this.createBtInterface("bool",m(this,this.onSetBool));this._setVarBool.set_x(this._setVarInt.get_x()+this._setVarInt.get_width()+5);this._setVarBool.set_y(this._traceVarButton.get_y());this._interfaceVar.addChild(this._setVarBool);this._intarfaceAction=new za;this._intarfaceAction.get_graphics().beginFill(0,.5);this._intarfaceAction.get_graphics().drawRect(0,0,this._infoArea.get_width(),200);this._intarfaceAction.get_graphics().endFill();this._intarfaceAction.set_x(0);this._intarfaceAction.set_y(this._infoArea.get_height()+
2);this._actionTxt=this.createTxInterface(!0,"<b>Write/paste the action JSON below</b>",5,5,this._intarfaceAction.get_width()-10,24);this._intarfaceAction.addChild(this._actionTxt);this._actionArea=this.createInputInterface(this._intarfaceAction.get_width()-10);this._actionArea.set_x(5);this._actionArea.set_y(this._actionTxt.get_y()+this._actionTxt.get_height());this._actionArea.set_height(140);this._intarfaceAction.addChild(this._actionArea);this._actionRun=this.createBtInterface("run",m(this,this.onRunAction));
this._actionRun.set_x(5);this._actionRun.set_y(this._actionArea.get_y()+this._actionArea.get_height()+5);this._actionRun.set_width(this._actionArea.get_width());this._intarfaceAction.addChild(this._actionRun);this._fpsHolder=new za;this._fpsHolder.get_graphics().beginFill(0,.5);this._fpsHolder.get_graphics().drawRect(0,0,65,30);this._fpsHolder.get_graphics().endFill()};r["plugins.DebugPlugin"]=fq;fq.__name__="plugins.DebugPlugin";fq.__super__=xe;fq.prototype=I(xe.prototype,{_overlay:null,_infoArea:null,
_infoText:null,_txFormat:null,_btFormat:null,_inFormat:null,_hideBt:null,_cycleBt:null,_sceneIBt:null,_movieIBt:null,_varIBt:null,_actionIBt:null,_statsIBt:null,_intPos:null,_sceneBt:null,_interfaceScene:null,_sceneInput:null,_sceneTxt:null,_movieBt:null,_interfaceMovie:null,_movieInput:null,_movieTxt:null,_interfaceVar:null,_varTxt:null,_varList:null,_setvarTxt:null,_varType:null,_setVarName:null,_setVarEqual:null,_setVarValue:null,_setVarButton:null,_refreshVarButton:null,_traceVarButton:null,_setVarString:null,
_setVarFloat:null,_setVarInt:null,_setVarBool:null,_intarfaceAction:null,_actionTxt:null,_actionArea:null,_actionRun:null,_fps:null,_fpsHolder:null,_useF8:null,initialize:function(a){xe.prototype.initialize.call(this,a);this._overlay=this.getOverlay("original.debug");this.setAction("trace",m(this,this.acTrace));this.setAction("trace.strings",m(this,this.acTraceStrings));this.setAction("trace.floats",m(this,this.acTraceFloats));this.setAction("trace.ints",m(this,this.acTraceInts));this.setAction("trace.bools",
m(this,this.acTraceBools));this.setAction("trace.vars",m(this,this.acTraceVars));this.setAction("debuginfo.show",m(this,this.acInfoShow));this.setAction("debuginfo.hide",m(this,this.acInfoHide));this.info.addEventListener("movieload",m(this,this.onMovieLoad));this.info.addEventListener("sceneload",m(this,this.onSceneLoad));this.info.addEventListener("keyframeload",m(this,this.onKeyframeLoad));this.info.addEventListener("displayresize",m(this,this.onDisplayResize));this.addActionGroupDescription({n:"Original Debug",
d:"Actions from the original debug plugin.",a:[{n:"Trace",a:"trace",c:!1,d:"Outputs text to the system console.",p:[{n:"Text to output",t:"string",d:"The text to output.",o:!1}]}]});this.addGlobalVarGroupDescription({n:"Original Debug Variables",v:[{d:"Is the debug area shown?",t:"bool",c:"?_DEBUGDISPLAY"}]})},checkKeyboard:function(a){return this._useF8&&a==119?(this._infoArea.parent==null?(this._overlay.addChild(this._infoArea),this.overlayTop("original.debug")):this._overlay.removeChild(this._infoArea),
!0):!1},parseBool:function(a){return a=="?_DEBUGDISPLAY"?{found:!0,value:this._infoArea.parent!=null}:{found:!1,value:!1}},kill:function(){this.info.removeEventListener("movieload",m(this,this.onMovieLoad));this.info.removeEventListener("sceneload",m(this,this.onSceneLoad));this.info.removeEventListener("keyframeload",m(this,this.onKeyframeLoad));this.info.removeEventListener("displayresize",m(this,this.onDisplayResize));this.acInfoHide([]);this._infoArea.get_graphics().clear();this._infoArea.removeChildren();
this._infoText=this._infoArea=null;this.killBtInterface(this._hideBt,m(this,this.onInterfaceHide));this.killBtInterface(this._cycleBt,m(this,this.onInterfaceCycle));this.killBtInterface(this._sceneIBt,m(this,this.onInterfaceScene));this.killBtInterface(this._movieIBt,m(this,this.onInterfaceMovie));this.killBtInterface(this._varIBt,m(this,this.onInterfaceVar));this.killBtInterface(this._actionIBt,m(this,this.onInterfaceAction));this.killBtInterface(this._statsIBt,m(this,this.onInterfaceStats));this._hideBt=
this._cycleBt=this._sceneIBt=this._movieIBt=this._varIBt=this._actionIBt=this._statsIBt=null;this._interfaceMovie.get_graphics().clear();this._interfaceMovie.removeChildren();this._movieTxt=this._interfaceMovie=null;this._movieInput.removeEventListener("click",m(this,this.onInputClick));this._movieInput=null;this.killBtInterface(this._movieBt,m(this,this.onLoadMovie));this._movieBt=null;this._interfaceScene.get_graphics().clear();this._interfaceScene.removeChildren();this._sceneTxt=this._interfaceScene=
null;this._sceneInput.removeEventListener("click",m(this,this.onInputClick));this._sceneInput=null;this.killBtInterface(this._sceneBt,m(this,this.onLoadScene));this._sceneBt=null;this._interfaceVar.get_graphics().clear();this._interfaceVar.removeChildren();this._varTxt=this._interfaceVar=null;this._varList.removeEventListener("click",m(this,this.onInputClick));this._setvarTxt=this._varList=null;this._setVarName.removeEventListener("click",m(this,this.onInputClick));this._setVarName=null;this._setVarValue.removeEventListener("click",
m(this,this.onInputClick));this._setVarEqual=this._setVarValue=null;this.killBtInterface(this._setVarButton,m(this,this.onSetVar));this._setVarButton=null;this.killBtInterface(this._traceVarButton,m(this,this.onTraceVar));this._traceVarButton=null;this.killBtInterface(this._refreshVarButton,m(this,this.onRefreshVar));this._refreshVarButton=null;this.killBtInterface(this._setVarString,m(this,this.onSetString));this._setVarString=null;this.killBtInterface(this._setVarFloat,m(this,this.onSetFloat));
this._setVarFloat=null;this.killBtInterface(this._setVarInt,m(this,this.onSetInt));this._setVarInt=null;this.killBtInterface(this._setVarBool,m(this,this.onSetBool));this._setVarBool=null;this._intarfaceAction.get_graphics().clear();this._intarfaceAction.removeChildren();this._actionTxt=this._intarfaceAction=null;this._actionArea.removeEventListener("click",m(this,this.onInputClick));this._actionArea=null;this.killBtInterface(this._actionRun,m(this,this.onRunAction));this._txFormat=this._btFormat=
this._inFormat=this._actionRun=null;this._fpsHolder.removeChildren();this._fpsHolder.get_graphics().clear();this._fps=this._fpsHolder=null;this.removeOverlay("original.debug");this._overlay=null;xe.prototype.kill.call(this)},getConfig:function(a){a==null&&(a=!0);a&&(this._useF8=!0);return{usef8:this._useF8}},setConfig:function(a){Object.prototype.hasOwnProperty.call(a,"usef8")&&(this._useF8=!0)},acTrace:function(a){for(var b=0;b<a.length;){var c=a[b];++b;Me.trace(this._access.parser.parseString(c),
{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:642,className:"plugins.DebugPlugin",methodName:"acTrace"})}return!0},acTraceStrings:function(a){Me.trace(ng.print({string:this._access.varString},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:652,className:"plugins.DebugPlugin",methodName:"acTraceStrings"});return!0},acTraceFloats:function(a){Me.trace(ng.print({float:this._access.varFloat},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:664,className:"plugins.DebugPlugin",
methodName:"acTraceFloats"});return!0},acTraceInts:function(a){Me.trace(ng.print({int:this._access.varInt},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:676,className:"plugins.DebugPlugin",methodName:"acTraceInts"});return!0},acTraceBools:function(a){Me.trace(ng.print({bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:688,className:"plugins.DebugPlugin",methodName:"acTraceBools"});return!0},acTraceVars:function(a){Me.trace(ng.print({string:this._access.varString,
float:this._access.varFloat,int:this._access.varInt,bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:700,className:"plugins.DebugPlugin",methodName:"acTraceVars"});return!0},acInfoShow:function(a){this._overlay.addChild(this._infoArea);return!0},acInfoHide:function(a){this._infoArea.parent!=null&&this._overlay.removeChild(this._infoArea);return!0},setInfoText:function(){this._infoText.set_htmlText("<b>Movie:</b> "+this.info.movieName+" ("+this.info.movieId+
")<br><b>Scene:</b> "+this.info.sceneName+" ("+this.info.sceneId+")<br><b>Keyframe:</b> "+(this.info.keyframeCurrent+1)+"/"+this.info.keyframeTotal+"<br><b>Asset multiply:</b> "+this.info.displayMultiply+"<br><b>Orientation:</b> "+this.info.orientation+"<br><b>Screen area:</b> ");if(this.info.orientation=="vertical"){var a=this._infoText;a.set_htmlText(a.get_htmlText()+(this.info.displaySmaller+"x"+this.info.displayBigger))}else a=this._infoText,a.set_htmlText(a.get_htmlText()+(this.info.displayBigger+
"x"+this.info.displaySmaller))},setVarText:function(){this._varList.set_htmlText("");switch(this._varType){case "bool":var a=this._access.varBool.h;a=Object.keys(a);for(var b=a.length,c=0;c<b;){var d=a[c++],f=this._varList;f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+L.string(this._access.varBool.h[d])+"<br>"))}break;case "float":a=this._access.varFloat.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varFloat.h[d]+
"<br>"));break;case "int":a=this._access.varInt.h;a=Object.keys(a);b=a.length;for(c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varInt.h[d]+"<br>"));break;default:for(a=this._access.varString.h,a=Object.keys(a),b=a.length,c=0;c<b;)d=a[c++],f=this._varList,f.set_htmlText(f.get_htmlText()+("<b>"+d+"</b> => "+this._access.varString.h[d]+"<br>"))}},createTxInterface:function(a,b,c,d,f,g){var h=new Jc;h.set_defaultTextFormat(this._txFormat);h.set_multiline(a);
h.set_selectable(!1);h.set_htmlText(b);h.set_x(c);h.set_y(d);h.set_width(f);h.set_height(g);return h},createBtInterface:function(a,b){var c=new Jc;c.set_defaultTextFormat(this._btFormat);c.set_background(!0);c.set_backgroundColor(16777215);c.set_border(!0);c.set_borderColor(16777215);c.set_width(50);c.set_height(15);c.set_text(a);c.set_selectable(!1);c.addEventListener("click",b);return c},createInputInterface:function(a){var b=new Jc;b.set_type(1);b.set_defaultTextFormat(this._inFormat);b.set_background(!0);
b.set_backgroundColor(0);b.set_border(!0);b.set_borderColor(0);b.set_width(a);b.set_height(15);b.set_text("");b.addEventListener("click",m(this,this.onInputClick));return b},onInputClick:function(a){this._infoArea.stage.set_focus(a.target)},killBtInterface:function(a,b){b!=null&&a.removeEventListener("click",b);a.set_text(null);a.set_htmlText(null);a.set_defaultTextFormat(null)},onMovieLoad:function(a){this.setInfoText();this.placeInterface()},onSceneLoad:function(a){this.setInfoText()},onKeyframeLoad:function(a){this.setInfoText()},
onDisplayResize:function(a){this.setInfoText();this.placeInterface()},onInterfaceHide:function(a){this.acInfoHide([])},onInterfaceCycle:function(a){this._intPos++;this._intPos>3&&(this._intPos=0);this.placeInterface();Me.trace(Kj.totalDrawCalls(),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:880,className:"plugins.DebugPlugin",methodName:"onInterfaceCycle"})},onInterfaceMovie:function(a){this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._interfaceVar.parent!=
null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent!=null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceMovie.parent==null?this._infoArea.addChild(this._interfaceMovie):this._infoArea.removeChild(this._interfaceMovie);this.placeInterface()},onInterfaceScene:function(a){this._interfaceMovie.parent!=null&&this._infoArea.removeChild(this._interfaceMovie);this._interfaceVar.parent!=null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent!=
null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceScene.parent==null?this._infoArea.addChild(this._interfaceScene):this._infoArea.removeChild(this._interfaceScene);this.placeInterface()},onInterfaceVar:function(a){this._interfaceMovie.parent!=null&&this._infoArea.removeChild(this._interfaceMovie);this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._intarfaceAction.parent!=null&&this._infoArea.removeChild(this._intarfaceAction);this._interfaceVar.parent==
null?(this.setVarText(),this._infoArea.addChild(this._interfaceVar)):this._infoArea.removeChild(this._interfaceVar);this.placeInterface()},onInterfaceAction:function(a){this._interfaceMovie.parent!=null&&this._infoArea.removeChild(this._interfaceMovie);this._interfaceScene.parent!=null&&this._infoArea.removeChild(this._interfaceScene);this._interfaceVar.parent!=null&&this._infoArea.removeChild(this._interfaceVar);this._intarfaceAction.parent==null?this._infoArea.addChild(this._intarfaceAction):this._infoArea.removeChild(this._intarfaceAction);
this.placeInterface()},onInterfaceStats:function(a){Me.trace("build with -D gl_stats to check out draw calls as well",{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:949,className:"plugins.DebugPlugin",methodName:"onInterfaceStats"});this._fps==null?(this._fps=new ws(5,5,16777215),this._fpsHolder.addChild(this._fps),this._overlay.addChild(this._fpsHolder),this.placeInterface()):(this._overlay.removeChild(this._fpsHolder),this._fpsHolder.removeChild(this._fps),this._fps=null)},onLoadMovie:function(a){this._movieInput.get_text()!=
""&&this._access.parser.run(ng.print({ac:"movie.load",param:[this._movieInput.get_text()]},null,null))},onLoadScene:function(a){this._sceneInput.get_text()!=""&&this._access.parser.run(ng.print({ac:"scene.load",param:[this._sceneInput.get_text()]},null,null))},onSetVar:function(a){if(this._setVarName.get_text()!="")switch(this._varType){case "bool":if(this._setVarValue.get_text()==""){a=this._access.varBool;var b=this._access.parser.parseString(this._setVarName.get_text());Object.prototype.hasOwnProperty.call(a.h,
b)&&(a=this._access.varBool,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])}else{a=this._access.varBool;b=this._access.parser.parseString(this._setVarName.get_text());var c=this._access.parser.parseBool(this._setVarValue.get_text());a.h[b]=c}break;case "float":this._setVarValue.get_text()==""?(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&
(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varFloat,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseFloat(this._setVarValue.get_text()),a.h[b]=c);break;case "int":this._setVarValue.get_text()==""?(a=this._access.varInt,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varInt,
b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varInt,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseInt(this._setVarValue.get_text()),a.h[b]=c);break;default:this._setVarValue.get_text()==""?(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),Object.prototype.hasOwnProperty.call(a.h,b)&&(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),
Object.prototype.hasOwnProperty.call(a.h,b)&&delete a.h[b])):(a=this._access.varString,b=this._access.parser.parseString(this._setVarName.get_text()),c=this._access.parser.parseString(this._setVarValue.get_text()),a.h[b]=c)}this.setVarText()},onTraceVar:function(a){Me.trace(ng.print({string:this._access.varString,float:this._access.varFloat,int:this._access.varInt,bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:1034,className:"plugins.DebugPlugin",methodName:"onTraceVar"})},
onRefreshVar:function(a){this.setVarText()},onSetString:function(a){this._varType="string";this._varTxt.set_htmlText("<b>String variables</b>");this._setvarTxt.set_htmlText("<b>Set string value (set to empty field to remove it)</b>");this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onSetFloat:function(a){this._varType="float";this._varTxt.set_htmlText("<b>Float variables</b>");this._setvarTxt.set_htmlText("<b>Set float value (set to empty field to remove it)</b>");this._setVarName.set_text("");
this._setVarValue.set_text("");this.setVarText()},onSetInt:function(a){this._varType="int";this._varTxt.set_htmlText("<b>Int variables</b>");this._setvarTxt.set_htmlText("<b>Set int value (set to empty field to remove it)</b>");this._setVarName.set_text("");this._setVarValue.set_text("");this.setVarText()},onSetBool:function(a){this._varType="bool";this._varTxt.set_htmlText("<b>Bool variables</b>");this._setvarTxt.set_htmlText("<b>Set bool value (set to empty field to remove it)</b>");this._setVarName.set_text("");
this._setVarValue.set_text("");this.setVarText()},onRunAction:function(a){this._actionArea.get_text()!=""&&this._access.parser.run(this._actionArea.get_text())},placeInterface:function(){switch(this._intPos){case 0:this._infoArea.set_x(10);this._infoArea.set_y(10);this.info.orientation=="vertical"?(this._fpsHolder.set_x(10),this._fpsHolder.set_y(this.info.displayBigger-30-10)):(this._fpsHolder.set_x(10),this._fpsHolder.set_y(this.info.displaySmaller-30-10));break;case 1:this.info.orientation=="vertical"?
this._infoArea.set_x(this.info.displaySmaller-this._infoArea.get_width()-10):this._infoArea.set_x(this.info.displayBigger-this._infoArea.get_width()-10);this._infoArea.set_y(10);this._fpsHolder.set_x(10);this._fpsHolder.set_y(10);break;case 2:this.info.orientation=="vertical"?(this._infoArea.set_x(this.info.displaySmaller-this._infoArea.get_width()-10),this._infoArea.set_y(this.info.displayBigger-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displaySmaller-65-10)):(this._infoArea.set_x(this.info.displayBigger-
this._infoArea.get_width()-10),this._infoArea.set_y(this.info.displaySmaller-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displayBigger-65-10));this._fpsHolder.set_y(10);break;case 3:this.info.orientation=="vertical"?(this._infoArea.set_x(10),this._infoArea.set_y(this.info.displayBigger-this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displaySmaller-65-10),this._fpsHolder.set_y(this.info.displayBigger-30-10)):(this._infoArea.set_x(10),this._infoArea.set_y(this.info.displaySmaller-
this._infoArea.get_height()-10),this._fpsHolder.set_x(this.info.displayBigger-65-10),this._fpsHolder.set_y(this.info.displaySmaller-30-10))}},__class__:fq});var hq=function(){this._firstsent=!1;xe.call(this,"google-analytics","Google Analytics","GoogleAnalytics",!0,!1)};r["plugins.GoogleAnalyticsPlugin"]=hq;hq.__name__="plugins.GoogleAnalyticsPlugin";hq.__super__=xe;hq.prototype=I(xe.prototype,{_confWindow:null,_firstsent:null,initialize:function(a){xe.prototype.initialize.call(this,a);this.addMenu("Analytics",
m(this,this.onAnalytics));this._confWindow=new oo("Google Analytics",500,150);this._confWindow.addForm("config",this._confWindow.ui.forge("config",[{tp:"Label",id:"measurement",tx:"Measurement ID",vr:""},{tp:"TInput",id:"measurement",tx:"",vr:""},{tp:"Button",id:"measurement",tx:"Update configuration",ac:m(this,this.onUpdate)}]));this._confWindow.startInterface();this.info.addEventListener("movieload",m(this,this.onMovieLoad));this.info.addEventListener("sceneload",m(this,this.onSceneLoad));this.setAction("analytics.event",
m(this,this.acEvent))},kill:function(){xe.prototype.kill.call(this);this.info.removeEventListener("movieload",m(this,this.onMovieLoad));this.info.removeEventListener("sceneload",m(this,this.onSceneLoad));this._confWindow.kill();this._confWindow=null},acEvent:function(a){if(a.length>=2){var b=!1;try{window.gtag("event",this._access.parser.parseString(a[0]),{movie_name:p.mdata.title,scene_name:p.movie.scene.title,movie_id:p.movie.get_mvId(),scene_id:p.movie.get_scId(),about:this._access.parser.parseString(a[1])}),
b=!0}catch(c){b=!1}return b}return!1},onAnalytics:function(a){t.ws.get_level()==0?(Object.prototype.hasOwnProperty.call(this.config.h,"measurementid")&&this._confWindow.ui.inputs.h.measurement.set_text(this.config.h.measurementid),this.showWindow(this._confWindow)):t.showPopup("Google Analytics","This configuration is only available to system administrators.",320,180,"OK","warn")},onUpdate:function(a){a=this.config;var b=this._confWindow.ui.inputs.h.measurement.get_text();a.h.measurementid=b;this.updateConfig(m(this,
this.onUpdateFinish))},onUpdateFinish:function(a,b){a?b.map.h.e!=0?t.showPopup("Google Analytics","Error while saving the plugin configuration.",320,180,"OK"):(t.showMsg("The Google Analytics configuration was updated."),this.hideWindow(this._confWindow)):t.showPopup("Google Analytics","Error while saving the plugin configuration.",320,180,"OK")},onMovieLoad:function(a){if(p.mode=="player"&&Object.prototype.hasOwnProperty.call(this.config.h,"measurementid")){this._firstsent=!0;try{window.gtag("set",
"campaign",{id:p.movie.get_mvId(),name:p.mdata.title,source:p.base}),window.gtag("event","movie.load",{movie_id:p.movie.get_mvId(),movie_name:p.mdata.title})}catch(b){}}},onSceneLoad:function(a){if(!this._firstsent)this.onMovieLoad(null);if(p.mode=="player"&&Object.prototype.hasOwnProperty.call(this.config.h,"measurementid"))try{window.gtag("event","scene.load",{scene_id:p.movie.get_scId(),scene_name:p.movie.scene.title,movie_id:p.movie.get_mvId(),movie_name:p.mdata.title})}catch(b){}},__class__:hq});
var ee=function(){xe.call(this,"overlay","Overlay","Overlay",!0,!0)};r["plugins.OverlayPlugin"]=ee;ee.__name__="plugins.OverlayPlugin";ee.overlay_return=La.overlay_return=function(){if(ee.overlayInfo!=null){var a=p.ws,b=new aa;b.h.key=ee.overlayInfo.key;a.send("Overlay/LoadKey",b,ee.onkeyLoaded)}};ee.onkeyLoaded=function(a,b){if(a)if(b.map.h.e==0)if(b.map.h.key!=""){if(b.map.h.ret!="")if(a=mb.jsonParse(b.map.h.ret),a==0)ee.overlayInfo.onerror!=null&&ee.overlayInfo.parser.run(ee.overlayInfo.onerror,
!0);else{b=0;for(var c=A.fields(a);b<c.length;){var d=c[b];++b;var f=A.field(a,d);if(Object.prototype.hasOwnProperty.call(f,"t")&&Object.prototype.hasOwnProperty.call(f,"v"))switch(A.field(f,"t")){case "B":ee.overlayInfo.parser.setBool(d,A.field(f,"v"));break;case "F":ee.overlayInfo.parser.setFloat(d,A.field(f,"v"));break;case "I":ee.overlayInfo.parser.setInt(d,A.field(f,"v"));break;case "S":ee.overlayInfo.parser.setString(d,A.field(f,"v"))}}}ee.overlayInfo.onsuccess!=null&&ee.overlayInfo.parser.run(ee.overlayInfo.onsuccess,
!0)}else ee.overlayInfo.onerror!=null&&ee.overlayInfo.parser.run(ee.overlayInfo.onerror,!0);else ee.overlayInfo.onerror!=null&&ee.overlayInfo.parser.run(ee.overlayInfo.onerror,!0);else ee.overlayInfo.onerror!=null&&ee.overlayInfo.parser.run(ee.overlayInfo.onerror,!0);ee.overlayInfo=null};ee.__super__=xe;ee.prototype=I(xe.prototype,{_confWindow:null,initialize:function(a){xe.prototype.initialize.call(this,a);this.addMenu("Overlay",m(this,this.onOverlay));this._confWindow=new oo("Overlay",500,150);
this._confWindow.addForm("config",this._confWindow.ui.forge("config",[{tp:"Label",id:"overlay",tx:"Secret KEY for server communication",vr:""},{tp:"TInput",id:"overlay",tx:"",vr:""},{tp:"Button",id:"overlay",tx:"Update configuration",ac:m(this,this.onUpdate)}]));this._confWindow.startInterface();this.setAction("overlay.show",m(this,this.getKey))},kill:function(){xe.prototype.kill.call(this);this._confWindow.kill();this._confWindow=null},getKey:function(a,b){if(a.length>=2){ee.overlayInfo=null;var c=
"0";a.length>=3&&this._access.parser.parseBool(a[2])&&(c="1");var d=new aa;if(a.length>=4)for(var f=3,g=a.length;f<g;){var h=f++,l=this._access.parser.parseString(a[h]);d.h["v"+(h-2)]=l}g=p.ws;f=new aa;h=this._access.parser.parseString(a[0]);f.h.url=h;h=this._access.parser.parseString(a[1]);f.h.title=h;f.h.addget=c;h=mb.jsonStringify(d);f.h.data=h;g.send("Overlay/GetKey",f,m(this,this.onKeyReturn),b);return!0}return!1},onKeyReturn:function(a,b){var c=b.extra;if(a)if(b.map.h.e==0)if(b.map.h.key!=""){ee.overlayInfo=
{key:b.map.h.key,onerror:c.onerror,onsuccess:c.onsuccess,parser:this._access.parser};a=L.string(b.map.h.url)+"?key="+L.string(b.map.h.key);if(b.map.h.addget=="1"){c=mb.jsonAsMap(b.map.h.data);for(var d=Object.keys(c.h),f=d.length,g=0;g<f;){var h=d[g++];a+="&"+h+"="+encodeURIComponent(c.h[h])}}try{window.overlay_place(a,b.map.h.title)}catch(l){}}else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,
!0)},onOverlay:function(a){t.ws.get_level()==0?(Object.prototype.hasOwnProperty.call(this.config.h,"overlay")&&this._confWindow.ui.inputs.h.overlay.set_text(this.config.h.overlay),this.showWindow(this._confWindow)):t.showPopup("Overlay","This configuration is only available to system administrators.",320,180,"OK","warn")},onUpdate:function(a){a=this.config;var b=this._confWindow.ui.inputs.h.overlay.get_text();a.h.overlay=b;this.updateConfig(m(this,this.onUpdateFinish))},onUpdateFinish:function(a,
b){a?b.map.h.e!=0?t.showPopup("Overlay","Error while saving the plugin configuration.",320,180,"OK"):(t.showMsg("The overlay configuration was updated."),this.hideWindow(this._confWindow)):t.showPopup("Overlay","Error while saving the plugin configuration.",320,180,"OK")},__class__:ee});var iq=function(){xe.call(this,"server-call","Server Call","ServerCall",!1,!0)};r["plugins.ServerCallPlugin"]=iq;iq.__name__="plugins.ServerCallPlugin";iq.__super__=xe;iq.prototype=I(xe.prototype,{initialize:function(a){xe.prototype.initialize.call(this,
a);this.setAction("call.url",m(this,this.acUrl));this.setAction("call.process",m(this,this.acProcess));this.setAction("call.sdprocess",m(this,this.acSdProcess))},kill:function(){xe.prototype.kill.call(this)},acUrl:function(a,b){if(a.length>0){var c="";a.length>1&&(c=this._access.parser.parseString(a[1]));var d=p.ws,f=new aa;a=this._access.parser.parseString(a[0]);f.h.url=a;f.h["var"]=c;d.send("ServerCall/Url",f,m(this,this.onCallReturn),b);return!0}return!1},onCallReturn:function(a,b){var c=b.extra;
a?b.map.h.e==0?(b.map.h["var"]!=""&&this._access.parser.setString(b.map.h["var"],b.map.h.resp),c.onsuccess!=null&&this._access.parser.run(c.onsuccess,!0)):c.onerror!=null&&this._access.parser.run(c.onerror,!0):c.onerror!=null&&this._access.parser.run(c.onerror,!0)},acProcess:function(a,b){if(a.length>0){var c=[];if(a.length>1)for(var d=1,f=a.length;d<f;){var g=d++;c.push(this._access.parser.parseString(a[g]))}f=p.ws;d=new aa;a=this._access.parser.parseString(a[0]);d.h.url=a;a=mb.jsonStringify(c);
d.h.data=a;a=p.movie.get_mvId();d.h.movieid=a;a=p.movie.get_scId();d.h.sceneid=a;d.h.movietitle=p.mdata.title;d.h.scenetitle=p.movie.scene.title;a=p.ws.get_user();d.h.visitor=a;f.send("ServerCall/Process",d,m(this,this.onProcessReturn),b);return!0}return!1},acSdProcess:function(a,b){if(a.length>0){var c=[];if(a.length>1)for(var d=1,f=a.length;d<f;){var g=d++;c.push(this._access.parser.parseString(a[g]))}a=this._access.parser.parseString(a[0]);d=new aa;c=mb.jsonStringify(c);d.h.data=c;c=p.movie.get_mvId();
d.h.movieid=c;c=p.movie.get_scId();d.h.sceneid=c;d.h.movietitle=p.mdata.title;d.h.scenetitle=p.movie.scene.title;c=p.ws.get_user();d.h.visitor=c;new kd(!0,a,"POST",d,3,m(this,this.onSdProcessReturn),null,null,null,null,b);return!0}return!1},onProcessReturn:function(a,b){var c=b.extra;if(a)if(b.map.h.e==0){if(b.map.h.resp!="")if(a=mb.jsonParse(b.map.h.resp),a==0)c.onerror!=null&&this._access.parser.run(c.onerror,!0);else{b=0;for(var d=A.fields(a);b<d.length;){var f=d[b];++b;var g=A.field(a,f);if(Object.prototype.hasOwnProperty.call(g,
"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(A.field(g,"t")){case "B":this._access.parser.setBool(f,A.field(g,"v"));break;case "F":this._access.parser.setFloat(f,A.field(g,"v"));break;case "I":this._access.parser.setInt(f,A.field(g,"v"));break;case "S":this._access.parser.setString(f,A.field(g,"v"))}}c.onsuccess!=null&&this._access.parser.run(c.onsuccess,!0)}}else c.onerror!=null&&this._access.parser.run(c.onerror,!0);else c.onerror!=null&&this._access.parser.run(c.onerror,!0)},onSdProcessReturn:function(a,
b){var c=b.extra;if(a){a=0;for(var d=A.fields(b.json);a<d.length;){var f=d[a];++a;var g=A.field(b.json,f);if(Object.prototype.hasOwnProperty.call(g,"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(A.field(g,"t")){case "B":this._access.parser.setBool(f,A.field(g,"v"));break;case "F":this._access.parser.setFloat(f,A.field(g,"v"));break;case "I":this._access.parser.setInt(f,A.field(g,"v"));break;case "S":this._access.parser.setString(f,A.field(g,"v"))}}c.onsuccess!=null&&this._access.parser.run(c.onsuccess,
!0)}else c.onerror!=null&&this._access.parser.run(c.onerror,!0)},__class__:iq});var gq=function(){xe.call(this,"original.share","Share")};r["plugins.SharePlugin"]=gq;gq.__name__="plugins.SharePlugin";gq.__super__=xe;gq.prototype=I(xe.prototype,{_overlay:null,initialize:function(a){xe.prototype.initialize.call(this,a);this._overlay=this.getOverlay("original.share");this.setAction("share.facebook",m(this,this.acFacebook));this.setAction("share.linkedin",m(this,this.acLinkedin));this.setAction("share.pinterest",
m(this,this.acPinterest));this.setAction("share.reddit",m(this,this.acReddit));this.setAction("share.x",m(this,this.acX))},kill:function(){this.removeOverlay("original.share");this._overlay=null;xe.prototype.kill.call(this)},acFacebook:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():
p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(a)));a.method="GET";Oa.getURL(a);return!0},acLinkedin:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.linkedin.com/shareArticle?mini=true&url="+
encodeURIComponent(a)));a.method="GET";Oa.getURL(a);return!0},acPinterest:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(a)));a.method="GET";Oa.getURL(a);return!0},acReddit:function(a,
b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.reddit.com/submit?url="+encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://www.reddit.com/submit?url="+encodeURIComponent(a)));a.method="GET";Oa.getURL(a);return!0},acX:function(a,b){a.length>0&&this._access.parser.parseBool(a[0])?(a=p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://twitter.com/intent/tweet?url="+
encodeURIComponent(a))):(a=p.share=="scene"?p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId():p.base+"app/?mv="+p.movie.get_mvId(),a=new Ve("https://twitter.com/intent/tweet?url="+encodeURIComponent(a)));a.method="GET";Oa.getURL(a);return!0},__class__:gq});sa.$haxeUID|=0;typeof performance!="undefined"&&typeof performance.now=="function"&&(X.now=performance.now.bind(performance));r.Math=Math;String.fromCodePoint==null&&(String.fromCodePoint=function(a){return a<65536?String.fromCharCode(a):
String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&1023)+56320)});Object.defineProperty(String.prototype,"__class__",{value:r.String=String,enumerable:!1,writable:!0});String.__name__="String";r.Array=Array;Array.__name__="Array";Date.prototype.__class__=r.Date=Date;Date.__name__="Date";var Ft={},nx={},Zw=Number,Yw=Boolean,Gt={},$w={};u.__toStr={}.toString;ArrayBuffer.prototype.slice==null&&(ArrayBuffer.prototype.slice=Zv.sliceImpl);typeof window=="undefined"&&(sa.onmessage=function(a){a=a.data;
try{sa.onmessage=(G=Pb.__current,m(G,G.dispatchMessage)),Uu.toFunction(a)()}catch(b){Rb.lastError=b,Pb.__current.destroy()}});U.__alpha16=new Uint32Array(256);for(var ao=0;ao<256;){var bq=ao++;U.__alpha16[bq]=Math.ceil(bq*257.00392156862745)}U.__clamp=new Uint8Array(511);for(ao=0;ao<255;)bq=ao++,U.__clamp[bq]=bq;for(ao=255;ao<511;)bq=ao++,U.__clamp[bq]=255;dk.available=!1;dk.enabled=!1;Mb.level=3;typeof console=="undefined"&&(console={});console.log==null&&(console.log=function(){});Gf.__registerDefaultLoaders();
B.hitTestCanvas=Lk.get_supported()?window.document.createElement("canvas"):null;B.hitTestContext=Lk.get_supported()?B.hitTestCanvas.getContext("2d"):null;Zn.maxTouchPoints=2;Zn.supportedGestures=null;Zn.supportsGestureEvents=!1;Zn.inputMode=2;gb.__meta__={statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};ea.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};
ea.__broadcastEvents=new aa;ea.__instanceCount=0;ea.__tempStack=new Tb(function(){return gb.toObjectVector(null)},function(a){a.set_length(0)});Fb.scene="";Fb.iniVars=new aa;Fb.moviePath="";Fb.assetsPath="";Fb.ws="";oc.DAY_SHORT_NAMES="Sun Mon Tue Wed Thu Fri Sat".split(" ");oc.DAY_NAMES="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");oc.MONTH_SHORT_NAMES="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");oc.MONTH_NAMES="January February March April May June July August September October November December".split(" ");
cb.Element=0;cb.PCData=1;cb.CData=2;cb.Comment=3;cb.DocType=4;cb.ProcessingInstruction=5;cb.Document=6;Gd.ORIENTATION_LANDSCAPE="landscape";Gd.ORIENTATION_PORTRAIT="portrait";Gd.MODE_PLAYER="player";Gd.MODE_EDITOR="editor";Gd.MODE_EDPLAYERWAIT="editorplayerwait";Gd.MODE_EDPLAYER="editorplayer";kd.MODEBINARY=0;kd.MODETEXT=1;kd.MODEJSON=3;kd.MODEMAP=4;kd.MODEBINTXT=5;kd.MODEBINMAP=6;t.AREASIZE_MAX=3840;t.AREASIZE_MIN=100;t.singleUser=!1;t.userLevel=-1;t.validEmail=!1;t.host="";t.fonts=[];t.mvOwner=
!1;t.mvCollaborator=!1;t.plugins=new aa;t.temp=new aa;t.displayType="landscape";t.sceneToLoad="";t.kfToLoad=-1;t.copy=new $f;t.testActions="";t.testDelay=0;Qa.__pool=new Tb(function(){return new Qa},function(a){a.setTo(0,0)});S.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};S.__identity=new S;S.__pool=new Tb(function(){return new S},function(a){a.identity()});
S.__matrix3=N._new();ca.__pool=new Tb(function(){return new ca},function(a){a.__identity()});ba.__supportedStyles="color display font-family font-size font-style font-weight kerning leading letter-spacing margin-left margin-right text-align text-decoration text-indent".split(" ");p.session="";p.ready=!1;p.mode="player";p.render="webgl";p.share="scene";p.fps="free";p.shaders="none deuteranotopia protonatopia tritanotopia contrast grayscale".split(" ");p.currentShader=0;p.focusMode=!1;p.nocache=!0;
p.server=!1;p.base="";p.font="";p.loadingMovie="";p.multiply=1;p.orientation="horizontal";p.path="";p.secretKey="";p.plugins=new aa;p.style=new ba;p.contraptions=new eb;p.narrative=new Rj;p.mvActions=new aa;p.contentPosition=new Qa;p.contentWidth=0;p.contentHeight=0;p.usingTarget=0;p.cursorVisible=!0;p.canTrigger=!0;p.history=[];ka.ACTIVATE="activate";ka.ADDED="added";ka.ADDED_TO_STAGE="addedToStage";ka.CANCEL="cancel";ka.CHANGE="change";ka.CLEAR="clear";ka.CLOSING="closing";ka.CLOSE="close";ka.COMPLETE=
"complete";ka.CONNECT="connect";ka.CONTEXT3D_CREATE="context3DCreate";ka.COPY="copy";ka.CUT="cut";ka.DEACTIVATE="deactivate";ka.ENTER_FRAME="enterFrame";ka.EXIT_FRAME="exitFrame";ka.EXITING="exiting";ka.FRAME_CONSTRUCTED="frameConstructed";ka.FRAME_LABEL="frameLabel";ka.FULLSCREEN="fullScreen";ka.ID3="id3";ka.INIT="init";ka.MOUSE_LEAVE="mouseLeave";ka.OPEN="open";ka.PASTE="paste";ka.REMOVED="removed";ka.REMOVED_FROM_STAGE="removedFromStage";ka.RENDER="render";ka.RESIZE="resize";ka.SCROLL="scroll";
ka.SELECT="select";ka.SELECT_ALL="selectAll";ka.SOUND_COMPLETE="soundComplete";ka.TAB_CHILDREN_CHANGE="tabChildrenChange";ka.TAB_ENABLED_CHANGE="tabEnabledChange";ka.TAB_INDEX_CHANGE="tabIndexChange";ka.TEXTURE_READY="textureReady";ka.UNLOAD="unload";Ag.MOVIE_LOADED="movie_loaded";Ag.SCENE_LOADED="scene_loaded";Ag.EVENT="event";gl.VORIENTATION="vertical";gl.HORIENTATION="horizontal";gl.SORIENTATION="square";sj.MOVIELOAD="movieload";sj.SCENELOAD="sceneload";sj.KEYFRAMELOAD="keyframeload";sj.DISPLAYRESIZE=
"displayresize";wa.__meta__={fields:{layoutData:{style:null},disabledAlpha:{style:null},focusRectSkin:{style:null},focusPaddingTop:{style:null},focusPaddingRight:{style:null},focusPaddingBottom:{style:null},focusPaddingLeft:{style:null}}};di.__meta__={fields:{setSkinForState:{style:null}}};Qb.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};Qb.VARIANT_PRIMARY="primary";Qb.VARIANT_DANGER="danger";Jf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=
x.CUSTOM("decrementButtonFactory");Jf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=x.CUSTOM("incrementButtonFactory");Jf.defaultDecrementButtonFactory=Ec.withClass(Qb);Jf.defaultIncrementButtonFactory=Ec.withClass(Qb);Sg.CHILD_VARIANT_DECREMENT_BUTTON="hScrollBar_decrementButton";Sg.CHILD_VARIANT_INCREMENT_BUTTON="hScrollBar_incrementButton";Rg.CHILD_VARIANT_DECREMENT_BUTTON="vScrollBar_decrementButton";Rg.CHILD_VARIANT_INCREMENT_BUTTON="vScrollBar_incrementButton";ob.INVALIDATION_FLAG_SCROLLER_FACTORY=
x.CUSTOM("scrollerFactory");ob.INVALIDATION_FLAG_SCROLL_BAR_FACTORY=x.CUSTOM("scrollBarFactory");ob.defaultScrollBarXFactory=Ec.withClass(Sg);ob.defaultScrollBarYFactory=Ec.withClass(Rg);Ze.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};Hh.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};Sc.graphics=new aa;Sc.texts=new aa;hl.MODEWARN="warn";hl.MODECONFIRM="confirm";Pe.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};Pe.POINTER_ID_MOUSE=-1E3;Pe.defaultDividerFactory=Ec.withFunction(function(){var a=
new za;a.get_graphics().beginFill(16711935,0);a.get_graphics().drawRect(0,0,6,6);a.get_graphics().endFill();return a});Jd.__meta__={obj:{defaultXmlProperty:["content"]}};Jd.INVALIDATION_FLAG_ORIGIN=x.CUSTOM("origin");Qe.__meta__={obj:{defaultXmlProperty:["text"]}};Qe.VARIANT_DANGER="danger";Wc.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},setTextFormatForState:{style:null}}};Wc.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=x.CUSTOM("errorCalloutFactory");Wc.VARIANT_SEARCH=
"search";Wc.CHILD_VARIANT_ERROR_CALLOUT="textInput_errorCallout";Wc.defaultErrorCalloutFactory=Ec.withClass(Qe);bc.__meta__={obj:{defaultXmlProperty:["text"]}};bc.VARIANT_HEADING="heading";bc.VARIANT_DETAIL="detail";bc.VARIANT_DANGER="danger";Fc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Fc.VARIANT_BORDERLESS="borderless";Fc.VARIANT_BORDER="border";Fc.VARIANT_POP_UP="popUp";Fc.CHILD_VARIANT_ITEM_RENDERER="listView_itemRenderer";Fc.DEFAULT_DRAG_FORMAT_ITEMS="items";Fc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=
x.CUSTOM("itemRendererFactory");Fc.RESET_ITEM_STATE=new vo;Qd.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Qd.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Qd.INVALIDATION_FLAG_LIST_VIEW_FACTORY=x.CUSTOM("listViewFactory");Qd.CHILD_VARIANT_BUTTON="popUpListView_button";Qd.CHILD_VARIANT_LIST_VIEW="popUpListView_listView";Qd.defaultButtonFactory=Ec.withClass(Qb);Qd.defaultListViewFactory=Ec.withClass(Fc);Ie.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ie.INVALIDATION_FLAG_BUTTON_FACTORY=
x.CUSTOM("buttonFactory");Ie.CHILD_VARIANT_BUTTON="buttonBar_button";Ie.RESET_BUTTON_STATE=new yo;td.INVALIDATION_FLAG_BUTTON_BAR_FACTORY=x.CUSTOM("buttonBarFactory");td.INVALIDATION_FLAG_HEADER_FACTORY=x.CUSTOM("headerFactory");td.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY=x.CUSTOM("messageLabelFactory");td.CHILD_VARIANT_HEADER="alert_header";td.CHILD_VARIANT_MESSAGE_LABEL="alert_messageLabel";td.CHILD_VARIANT_BUTTON_BAR="alert_buttonBar";td.defaultButtonBarFactory=Ec.withClass(Ie);td.defaultHeaderFactory=
Ec.withClass(pj);td.defaultMessageLabelFactory=Ec.withClass(bc);sc.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};sc.VARIANT_TOOL_BAR="toolBar";li.__meta__={fields:{setSkinForState:{style:null}}};Yc.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};qh.__meta__={obj:{defaultXmlProperty:["content"]}};qh.INVALIDATION_FLAG_HEADER_FACTORY=x.CUSTOM("headerFactory");qh.CHILD_VARIANT_HEADER="collapsible_header";qh.defaultHeaderFactory=
Ec.withClass(Yc);Cd.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Cd.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Cd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=x.CUSTOM("textInputFactory");Cd.INVALIDATION_FLAG_LIST_VIEW_FACTORY=x.CUSTOM("listViewFactory");Cd.CHILD_VARIANT_BUTTON="comboBox_button";Cd.CHILD_VARIANT_TEXT_INPUT="comboBox_textInput";Cd.CHILD_VARIANT_LIST_VIEW="comboBox_listView";Cd.defaultButtonFactory=Ec.withClass(Qb);Cd.defaultTextInputFactory=Ec.withClass(Wc);Cd.defaultListViewFactory=
Ec.withClass(Fc);Bb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY=x.CUSTOM("monthTitleViewFactory");Bb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY=x.CUSTOM("decrementMonthButtonFactory");Bb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY=x.CUSTOM("incrementMonthButtonFactory");Bb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY=x.CUSTOM("decrementYearButtonFactory");Bb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY=x.CUSTOM("incrementYearButtonFactory");Bb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY=
x.CUSTOM("dateRendererFactory");Bb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY=x.CUSTOM("weekdayLabelFactory");Bb.RESET_ITEM_STATE=new Rq;Bb.CHILD_VARIANT_DATE_RENDERER="datePicker_dateRenderer";Bb.CHILD_VARIANT_MUTED_DATE_RENDERER="datePicker_mutedDateRenderer";Bb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON="datePicker_decrementMonthButton";Bb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON="datePicker_incrementMonthButton";Bb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON="datePicker_decrementYearButton";Bb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON=
"datePicker_incrementYearButton";Bb.CHILD_VARIANT_MONTH_TITLE_VIEW="datePicker_monthTitleView";Bb.CHILD_VARIANT_WEEKDAY_LABEL="datePicker_weekdayLabel";Bb.defaultDecrementMonthButtonFactory=Ec.withClass(Qb);Bb.defaultIncrementMonthButtonFactory=Ec.withClass(Qb);Bb.defaultDecrementYearButtonFactory=Ec.withClass(Qb);Bb.defaultIncrementYearButtonFactory=Ec.withClass(Qb);Bb.defaultMonthTitleViewFactory=Ec.withClass(bc);Bb.defaultWeekdayLabelFactory=Ec.withClass(bc);Fi.__meta__={obj:{defaultXmlProperty:["content"]}};
Fi.MAX_CLICK_DISTANCE_FOR_CLOSE=6;Gi.__meta__={obj:{defaultXmlProperty:["content"]}};nc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};nc.VARIANT_BORDERLESS="borderless";nc.VARIANT_BORDER="border";nc.CHILD_VARIANT_CELL_RENDERER="gridView_cellRenderer";nc.CHILD_VARIANT_HEADER_RENDERER="gridView_headerRenderer";nc.CHILD_VARIANT_HEADER_DIVIDER="gridView_headerDivider";nc.CHILD_VARIANT_COLUMN_DIVIDER="gridView_columnDivider";nc.DEFAULT_DRAG_FORMAT_ITEMS="items";nc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=
x.CUSTOM("rowRendererFactory");nc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");nc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=x.CUSTOM("headerDividerFactory");nc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=x.CUSTOM("columnDividerFactory");nc.RESET_HEADER_STATE=new Tq;nc.RESET_ROW_STATE=new Uq;nc.POINTER_ID_MOUSE=-1E3;Qc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Qc.CHILD_VARIANT_HEADER_RENDERER="groupListView_headerRenderer";Qc.CHILD_VARIANT_ITEM_RENDERER="groupListView_itemRenderer";
Qc.VARIANT_BORDERLESS="borderless";Qc.VARIANT_BORDER="border";Qc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=x.CUSTOM("itemRendererFactory");Qc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");Qc.RESET_ITEM_STATE=new Fo;id.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=x.CUSTOM("decrementButtonFactory");id.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=x.CUSTOM("incrementButtonFactory");id.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=x.CUSTOM("textInputFactory");id.CHILD_VARIANT_DECREMENT_BUTTON=
"numericStepper_decrementButton";id.CHILD_VARIANT_INCREMENT_BUTTON="numericStepper_incrementButton";id.CHILD_VARIANT_TEXT_INPUT="numericStepper_textInput";id.defaultDecrementButtonFactory=Ec.withClass(Qb);id.defaultIncrementButtonFactory=Ec.withClass(Qb);id.defaultTextInputFactory=Ec.withClass(Wc);Wg.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY=x.CUSTOM("toggleButtonFactory");Wg.CHILD_VARIANT_TOGGLE_BUTTON="pageIndicator_toggleButton";Kd.INVALIDATION_FLAG_BUTTON_FACTORY=x.CUSTOM("buttonFactory");Kd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=
x.CUSTOM("textInputFactory");Kd.INVALIDATION_FLAG_DATE_PICKER_FACTORY=x.CUSTOM("datePickerFactory");Kd.CHILD_VARIANT_BUTTON="popUpDatePicker_button";Kd.CHILD_VARIANT_TEXT_INPUT="popUpDatePicker_textInput";Kd.CHILD_VARIANT_DATE_PICKER="popUpDatePicker_datePicker";Kd.defaultButtonFactory=Ec.withClass(Qb);Kd.defaultTextInputFactory=Ec.withClass(Wc);Kd.defaultDatePickerFactory=Ec.withClass(Bb);Yi.defaultRadioGroup=new Io;ye.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};ye.INVALIDATION_FLAG_TAB_FACTORY=
x.CUSTOM("tabFactory");ye.CHILD_VARIANT_TAB="tabBar_tab";ye.RESET_TAB_STATE=new Jo;df.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},setTextFormatForState:{style:null}}};df.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=x.CUSTOM("errorCalloutFactory");df.CHILD_VARIANT_ERROR_CALLOUT="textArea_errorCallout";df.defaultErrorCalloutFactory=Ec.withClass(Qe);vc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};vc.VARIANT_BORDERLESS="borderless";vc.VARIANT_BORDER="border";vc.CHILD_VARIANT_CELL_RENDERER=
"treeGridView_cellRenderer";vc.CHILD_VARIANT_HEADER_RENDERER="treeGridView_headerRenderer";vc.CHILD_VARIANT_HEADER_DIVIDER="treeGridView_headerDivider";vc.CHILD_VARIANT_COLUMN_DIVIDER="treeGridView_columnDivider";vc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=x.CUSTOM("rowRendererFactory");vc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=x.CUSTOM("headerRendererFactory");vc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=x.CUSTOM("headerDividerFactory");vc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=x.CUSTOM("columnDividerFactory");
vc.RESET_HEADER_STATE=new Xq;vc.RESET_ROW_STATE=new Yq;vc.POINTER_ID_MOUSE=-1E3;Vd.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Vd.VARIANT_BORDERLESS="borderless";Vd.VARIANT_BORDER="border";Vd.CHILD_VARIANT_ITEM_RENDERER="treeView_itemRenderer";Vd.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=x.CUSTOM("itemRendererFactory");Vd.RESET_ITEM_STATE=new Mo;Rf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=x.CUSTOM("cellRendererFactory");Rf.RESET_CELL_STATE=new Oo;Mc.__meta__={fields:{setSecondaryTextFormatForState:{style:null}}};
uf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY=x.CUSTOM("disclosureButtonFactory");uf.defaultDisclosureButtonFactory=Ec.withClass(Yc);uf.VARIANT_FILE_SYSTEM="fileSystem";uf.CHILD_VARIANT_DISCLOSURE_BUTTON="hierarchicalItemRenderer_disclosureButton";ql.__meta__={fields:{setSkinForState:{style:null}}};Mf.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=x.CUSTOM("cellRendererFactory");Mf.RESET_CELL_STATE=new gm;og.internalIDCounter=0;sh.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};sh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY=
x.CUSTOM("pageIndicatorFactory");sh.CHILD_VARIANT_PAGE_INDICATOR="pageNavigator_pageIndicator";sh.defaultPageIndicatorFactory=Ec.withClass(Wg);eg.internalIDCounter=0;Tg.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Tg.INVALIDATION_FLAG_TAB_BAR_FACTORY=x.CUSTOM("tabBarFactory");Tg.CHILD_VARIANT_TAB_BAR="tabNavigator_tabBar";Tg.defaultTabBarFactory=Ec.withClass(ye);sl.WRAP_OBJECT_HIGH_TAB_INDEX=2147483647;Ik.CHILD_VARIANT_TOOL_TIP="toolTip";sd.stageToManager=new Na;sd._focusManagerFactory=sd.defaultFocusManagerFactory;
Ub.stageToManager=new Na;Ud._toolTipManagerFactory=Ud.defaultToolTipManagerFactory;Ud.stageToManager=new Na;Uj.STAGE_TO_VALIDATION_QUEUE=new Na;mg.__meta__={obj:{defaultXmlProperty:["array"]}};Va._dropTargetLocalX=0;Va._dropTargetLocalY=0;Va._dragAvatarOffsetX=0;Va.dragAvatarOffsetX=1;Va.dragAvatarOffsetY=1;Va.dropAccepted=!1;Va._oldDragAvatarMouseEnabled=!1;Va._oldDragAvatarMouseChildren=!1;xj.ITEM_TRIGGER="itemTrigger";xj._pool=new Tb(function(){return new xj(null,null)},function(a){a.target=null;
a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Ei.ITEM_TRIGGER="itemTrigger";Ei._pool=new Tb(function(){return new Ei(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Nf.DRAG_START="dragStart";Nf.DRAG_COMPLETE="dragComplete";Nf.DRAG_ENTER="dragEnter";Nf.DRAG_MOVE="dragMove";Nf.DRAG_EXIT="dragExit";Nf.DRAG_DROP="dragDrop";Nf._pool=new Tb(function(){return new Nf(null,
null,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});W.INITIALIZE="initialize";W.CREATION_COMPLETE="creationComplete";W.LAYOUT_DATA_CHANGE="layoutDataChange";W.STATE_CHANGE="stateChange";W.OPENING="opening";W.CLOSING="closing";W.ENABLE="enable";W.DISABLE="disable";W._pool=new Tb(function(){return new W(null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});wd.ADD_ITEM=
"addItem";wd.REMOVE_ITEM="removeItem";wd.REPLACE_ITEM="replaceItem";wd.UPDATE_ITEM="updateItem";wd.UPDATE_ALL="updateAll";wd.RESET="reset";wd.REMOVE_ALL="removeAll";wd.FILTER_CHANGE="filterChange";wd.SORT_CHANGE="sortChange";wd._pool=new Tb(function(){return new wd(null,-1,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.addedItem=null;a.removedItem=null});yj.SUBMIT="submit";yj._pool=new Tb(function(){return new yj(null)},function(a){a.target=
null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});tf.CELL_TRIGGER="cellTrigger";tf.HEADER_TRIGGER="headerTrigger";tf._cellPool=new Tb(function(){return new tf(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});tf._headerPool=new Tb(function(){return new tf(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=
null});ni.ITEM_TRIGGER="itemTrigger";ni._pool=new Tb(function(){return new ni(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Eg.ADD_ITEM="addItem";Eg.REMOVE_ITEM="removeItem";Eg.REPLACE_ITEM="replaceItem";Eg.UPDATE_ITEM="updateItem";Eg.UPDATE_ALL="updateAll";Eg.RESET="reset";Eg.REMOVE_ALL="removeAll";Eg.FILTER_CHANGE="filterChange";Eg.SORT_CHANGE="sortChange";Eg._pool=new Tb(function(){return new Eg(null,null,
!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.addedItem=null;a.removedItem=null;a.location=null});Kh.ITEM_TRIGGER="itemTrigger";Kh._pool=new Tb(function(){return new Kh(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Bd.SCROLL_START="scrollStart";Bd.SCROLL_COMPLETE="scrollComplete";Bd.SCROLL="scroll";Bd._pool=new Tb(function(){return new Bd(null,
!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});nh.STYLES_CHANGE="stylesChange";nh._pool=new Tb(function(){return new nh(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.affectsTarget=null});zj.ITEM_TRIGGER="itemTrigger";zj._pool=new Tb(function(){return new zj(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=
!1;a.__isCanceledNow=!1;a.state=null});Lh.TRANSITION_START="transitionStart";Lh.TRANSITION_COMPLETE="transitionComplete";Lh.TRANSITION_CANCEL="transitionCancel";Lh._pool=new Tb(function(){return new Lh(null,null,null,null,null)},function(a){a.previousViewID=null;a.previousView=null;a.nextViewID=null;a.nextView=null;a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Je.CELL_TRIGGER="cellTrigger";Je.HEADER_TRIGGER="headerTrigger";Je.BRANCH_OPEN="branchOpen";
Je.BRANCH_CLOSE="branchClose";Je._cellPool=new Tb(function(){return new Je(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Je._headerPool=new Tb(function(){return new Je(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Dg.ITEM_TRIGGER="itemTrigger";Dg.BRANCH_OPEN="branchOpen";Dg.BRANCH_CLOSE="branchClose";Dg._pool=new Tb(function(){return new Dg(null,
null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});$e.TRIGGER="trigger";$e._pool=new Tb(function(){return new $e(null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.relatedObject=null});Ed.actuators=[];Ed.actuatorsLength=0;Ed.addedEvent=!1;Zi.VIEW_REQUIRED_ERROR="Cannot transition if both old view and new view are null.";Fk.MONTH_NUMBER_OF_DAYS=[31,28,31,
30,31,30,31,31,30,31,30,31];Fk.FEBRUARY_NUMBER_OF_DAYS_LEAP_YEAR=29;jc.MEDIA_QUERY_DESKTOP="screen and (hover: hover) and (pointer: fine)";jc.MEDIA_QUERY_MOBILE="screen and (hover: none) and (pointer: coarse)";fg.MINIMUM_VELOCITY=.02;fg.POINTER_ID_MOUSE=-1E3;Ad.stageToObject=new Na;Ci.MINIMUM_VELOCITY=.02;Ci.POINTER_ID_MOUSE=-1E3;bx._mul=Math.imul!=null?Math.imul:function(a,b){return a*(b&65535)+(a*(b>>>16)<<16|0)|0};qg.USE_CACHE=!1;qg.USE_ENUM_INDEX=!1;qg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
Gg.DEFAULT_RESOLVER=new jr;Gg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";ic.BLOCK_SIZE=16;Xh.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";Xh.BYTES=Ia.ofString(Xh.CHARS);vh.BLOCK_SIZE=16;Sb.AES_BLOCK_SIZE=16;Sb.NONCE_SIZE=12;Sb.E=new zb(-520093696,0);af.i64tmp=new zb(0,0);af.helper=new DataView(new ArrayBuffer(8));fl.escapes=function(a){a=new aa;a.h.lt="<";a.h.gt=">";a.h.amp="&";a.h.quot='"';a.h.apos="'";return a}(this);Hg.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];Hg.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];Hg.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];Hg.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];Hg.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];Ob.OPTION_REVOKE_URL=1;Ob.activeRequests=
0;Ob.requestLimit=17;Ob.requestQueue=new Xa;qm.PROTOTYPE_FIELD="__prototype__";qm.SKIP_FIELD="__skipPrototype__";qm.RESTORE_FIELD="__restoreFlag__";Pb.__current=new Pb(sa.location.href);Pb.__isWorker=typeof window=="undefined";Pb.__messages=new Xa;Pb.__resolveMethods=new Xa;Pb.__workerCount=0;qc.dummyCharacter="\u007f";qc.windowID=0;aj.DICTIONARY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");aj.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=aj.DICTIONARY;b<c.length;){var d=
c[b];++b;for(var f=0,g=aj.DICTIONARY;f<g.length;){var h=g[f];++f;a.push(d+h)}}return a}(this);Ph.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,
157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,
69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1];Ph.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,
17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9];y.DEPTH_BUFFER_BIT=256;y.STENCIL_BUFFER_BIT=1024;y.COLOR_BUFFER_BIT=16384;y.POINTS=0;y.LINES=1;y.LINE_LOOP=2;y.LINE_STRIP=3;y.TRIANGLES=4;y.TRIANGLE_STRIP=
5;y.TRIANGLE_FAN=6;y.ZERO=0;y.ONE=1;y.SRC_COLOR=768;y.ONE_MINUS_SRC_COLOR=769;y.SRC_ALPHA=770;y.ONE_MINUS_SRC_ALPHA=771;y.DST_ALPHA=772;y.ONE_MINUS_DST_ALPHA=773;y.DST_COLOR=774;y.ONE_MINUS_DST_COLOR=775;y.SRC_ALPHA_SATURATE=776;y.FUNC_ADD=32774;y.BLEND_EQUATION=32777;y.BLEND_EQUATION_RGB=32777;y.BLEND_EQUATION_ALPHA=34877;y.FUNC_SUBTRACT=32778;y.FUNC_REVERSE_SUBTRACT=32779;y.BLEND_DST_RGB=32968;y.BLEND_SRC_RGB=32969;y.BLEND_DST_ALPHA=32970;y.BLEND_SRC_ALPHA=32971;y.CONSTANT_COLOR=32769;y.ONE_MINUS_CONSTANT_COLOR=
32770;y.CONSTANT_ALPHA=32771;y.ONE_MINUS_CONSTANT_ALPHA=32772;y.BLEND_COLOR=32773;y.ARRAY_BUFFER=34962;y.ELEMENT_ARRAY_BUFFER=34963;y.ARRAY_BUFFER_BINDING=34964;y.ELEMENT_ARRAY_BUFFER_BINDING=34965;y.STREAM_DRAW=35040;y.STATIC_DRAW=35044;y.DYNAMIC_DRAW=35048;y.BUFFER_SIZE=34660;y.BUFFER_USAGE=34661;y.CURRENT_VERTEX_ATTRIB=34342;y.FRONT=1028;y.BACK=1029;y.FRONT_AND_BACK=1032;y.CULL_FACE=2884;y.BLEND=3042;y.DITHER=3024;y.STENCIL_TEST=2960;y.DEPTH_TEST=2929;y.SCISSOR_TEST=3089;y.POLYGON_OFFSET_FILL=
32823;y.SAMPLE_ALPHA_TO_COVERAGE=32926;y.SAMPLE_COVERAGE=32928;y.NO_ERROR=0;y.INVALID_ENUM=1280;y.INVALID_VALUE=1281;y.INVALID_OPERATION=1282;y.OUT_OF_MEMORY=1285;y.CW=2304;y.CCW=2305;y.LINE_WIDTH=2849;y.ALIASED_POINT_SIZE_RANGE=33901;y.ALIASED_LINE_WIDTH_RANGE=33902;y.CULL_FACE_MODE=2885;y.FRONT_FACE=2886;y.DEPTH_RANGE=2928;y.DEPTH_WRITEMASK=2930;y.DEPTH_CLEAR_VALUE=2931;y.DEPTH_FUNC=2932;y.STENCIL_CLEAR_VALUE=2961;y.STENCIL_FUNC=2962;y.STENCIL_FAIL=2964;y.STENCIL_PASS_DEPTH_FAIL=2965;y.STENCIL_PASS_DEPTH_PASS=
2966;y.STENCIL_REF=2967;y.STENCIL_VALUE_MASK=2963;y.STENCIL_WRITEMASK=2968;y.STENCIL_BACK_FUNC=34816;y.STENCIL_BACK_FAIL=34817;y.STENCIL_BACK_PASS_DEPTH_FAIL=34818;y.STENCIL_BACK_PASS_DEPTH_PASS=34819;y.STENCIL_BACK_REF=36003;y.STENCIL_BACK_VALUE_MASK=36004;y.STENCIL_BACK_WRITEMASK=36005;y.VIEWPORT=2978;y.SCISSOR_BOX=3088;y.COLOR_CLEAR_VALUE=3106;y.COLOR_WRITEMASK=3107;y.UNPACK_ALIGNMENT=3317;y.PACK_ALIGNMENT=3333;y.MAX_TEXTURE_SIZE=3379;y.MAX_VIEWPORT_DIMS=3386;y.SUBPIXEL_BITS=3408;y.RED_BITS=3410;
y.GREEN_BITS=3411;y.BLUE_BITS=3412;y.ALPHA_BITS=3413;y.DEPTH_BITS=3414;y.STENCIL_BITS=3415;y.POLYGON_OFFSET_UNITS=10752;y.POLYGON_OFFSET_FACTOR=32824;y.TEXTURE_BINDING_2D=32873;y.SAMPLE_BUFFERS=32936;y.SAMPLES=32937;y.SAMPLE_COVERAGE_VALUE=32938;y.SAMPLE_COVERAGE_INVERT=32939;y.NUM_COMPRESSED_TEXTURE_FORMATS=34466;y.COMPRESSED_TEXTURE_FORMATS=34467;y.DONT_CARE=4352;y.FASTEST=4353;y.NICEST=4354;y.GENERATE_MIPMAP_HINT=33170;y.BYTE=5120;y.UNSIGNED_BYTE=5121;y.SHORT=5122;y.UNSIGNED_SHORT=5123;y.INT=5124;
y.UNSIGNED_INT=5125;y.FLOAT=5126;y.DEPTH_COMPONENT=6402;y.ALPHA=6406;y.RGB=6407;y.RGBA=6408;y.LUMINANCE=6409;y.LUMINANCE_ALPHA=6410;y.UNSIGNED_SHORT_4_4_4_4=32819;y.UNSIGNED_SHORT_5_5_5_1=32820;y.UNSIGNED_SHORT_5_6_5=33635;y.FRAGMENT_SHADER=35632;y.VERTEX_SHADER=35633;y.MAX_VERTEX_ATTRIBS=34921;y.MAX_VERTEX_UNIFORM_VECTORS=36347;y.MAX_VARYING_VECTORS=36348;y.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;y.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660;y.MAX_TEXTURE_IMAGE_UNITS=34930;y.MAX_FRAGMENT_UNIFORM_VECTORS=
36349;y.SHADER_TYPE=35663;y.DELETE_STATUS=35712;y.LINK_STATUS=35714;y.VALIDATE_STATUS=35715;y.ATTACHED_SHADERS=35717;y.ACTIVE_UNIFORMS=35718;y.ACTIVE_ATTRIBUTES=35721;y.SHADING_LANGUAGE_VERSION=35724;y.CURRENT_PROGRAM=35725;y.NEVER=512;y.LESS=513;y.EQUAL=514;y.LEQUAL=515;y.GREATER=516;y.NOTEQUAL=517;y.GEQUAL=518;y.ALWAYS=519;y.KEEP=7680;y.REPLACE=7681;y.INCR=7682;y.DECR=7683;y.INVERT=5386;y.INCR_WRAP=34055;y.DECR_WRAP=34056;y.VENDOR=7936;y.RENDERER=7937;y.VERSION=7938;y.EXTENSIONS=7939;y.NEAREST=
9728;y.LINEAR=9729;y.NEAREST_MIPMAP_NEAREST=9984;y.LINEAR_MIPMAP_NEAREST=9985;y.NEAREST_MIPMAP_LINEAR=9986;y.LINEAR_MIPMAP_LINEAR=9987;y.TEXTURE_MAG_FILTER=10240;y.TEXTURE_MIN_FILTER=10241;y.TEXTURE_WRAP_S=10242;y.TEXTURE_WRAP_T=10243;y.TEXTURE_2D=3553;y.TEXTURE=5890;y.TEXTURE_CUBE_MAP=34067;y.TEXTURE_BINDING_CUBE_MAP=34068;y.TEXTURE_CUBE_MAP_POSITIVE_X=34069;y.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;y.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;y.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072;y.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;
y.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;y.MAX_CUBE_MAP_TEXTURE_SIZE=34076;y.TEXTURE0=33984;y.TEXTURE1=33985;y.TEXTURE2=33986;y.TEXTURE3=33987;y.TEXTURE4=33988;y.TEXTURE5=33989;y.TEXTURE6=33990;y.TEXTURE7=33991;y.TEXTURE8=33992;y.TEXTURE9=33993;y.TEXTURE10=33994;y.TEXTURE11=33995;y.TEXTURE12=33996;y.TEXTURE13=33997;y.TEXTURE14=33998;y.TEXTURE15=33999;y.TEXTURE16=34E3;y.TEXTURE17=34001;y.TEXTURE18=34002;y.TEXTURE19=34003;y.TEXTURE20=34004;y.TEXTURE21=34005;y.TEXTURE22=34006;y.TEXTURE23=34007;y.TEXTURE24=
34008;y.TEXTURE25=34009;y.TEXTURE26=34010;y.TEXTURE27=34011;y.TEXTURE28=34012;y.TEXTURE29=34013;y.TEXTURE30=34014;y.TEXTURE31=34015;y.ACTIVE_TEXTURE=34016;y.REPEAT=10497;y.CLAMP_TO_EDGE=33071;y.MIRRORED_REPEAT=33648;y.FLOAT_VEC2=35664;y.FLOAT_VEC3=35665;y.FLOAT_VEC4=35666;y.INT_VEC2=35667;y.INT_VEC3=35668;y.INT_VEC4=35669;y.BOOL=35670;y.BOOL_VEC2=35671;y.BOOL_VEC3=35672;y.BOOL_VEC4=35673;y.FLOAT_MAT2=35674;y.FLOAT_MAT3=35675;y.FLOAT_MAT4=35676;y.SAMPLER_2D=35678;y.SAMPLER_CUBE=35680;y.VERTEX_ATTRIB_ARRAY_ENABLED=
34338;y.VERTEX_ATTRIB_ARRAY_SIZE=34339;y.VERTEX_ATTRIB_ARRAY_STRIDE=34340;y.VERTEX_ATTRIB_ARRAY_TYPE=34341;y.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922;y.VERTEX_ATTRIB_ARRAY_POINTER=34373;y.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975;y.IMPLEMENTATION_COLOR_READ_TYPE=35738;y.IMPLEMENTATION_COLOR_READ_FORMAT=35739;y.VERTEX_PROGRAM_POINT_SIZE=34370;y.POINT_SPRITE=34913;y.COMPILE_STATUS=35713;y.LOW_FLOAT=36336;y.MEDIUM_FLOAT=36337;y.HIGH_FLOAT=36338;y.LOW_INT=36339;y.MEDIUM_INT=36340;y.HIGH_INT=36341;y.FRAMEBUFFER=
36160;y.RENDERBUFFER=36161;y.RGBA4=32854;y.RGB5_A1=32855;y.RGB565=36194;y.DEPTH_COMPONENT16=33189;y.STENCIL_INDEX=6401;y.STENCIL_INDEX8=36168;y.DEPTH_STENCIL=34041;y.RENDERBUFFER_WIDTH=36162;y.RENDERBUFFER_HEIGHT=36163;y.RENDERBUFFER_INTERNAL_FORMAT=36164;y.RENDERBUFFER_RED_SIZE=36176;y.RENDERBUFFER_GREEN_SIZE=36177;y.RENDERBUFFER_BLUE_SIZE=36178;y.RENDERBUFFER_ALPHA_SIZE=36179;y.RENDERBUFFER_DEPTH_SIZE=36180;y.RENDERBUFFER_STENCIL_SIZE=36181;y.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;y.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=
36049;y.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;y.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;y.COLOR_ATTACHMENT0=36064;y.DEPTH_ATTACHMENT=36096;y.STENCIL_ATTACHMENT=36128;y.DEPTH_STENCIL_ATTACHMENT=33306;y.NONE=0;y.FRAMEBUFFER_COMPLETE=36053;y.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;y.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;y.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;y.FRAMEBUFFER_UNSUPPORTED=36061;y.FRAMEBUFFER_BINDING=36006;y.RENDERBUFFER_BINDING=36007;y.MAX_RENDERBUFFER_SIZE=34024;
y.INVALID_FRAMEBUFFER_OPERATION=1286;y.UNPACK_FLIP_Y_WEBGL=37440;y.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;y.CONTEXT_LOST_WEBGL=37442;y.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;y.BROWSER_DEFAULT_WEBGL=37444;y.READ_BUFFER=3074;y.UNPACK_ROW_LENGTH=3314;y.UNPACK_SKIP_ROWS=3315;y.UNPACK_SKIP_PIXELS=3316;y.PACK_ROW_LENGTH=3330;y.PACK_SKIP_ROWS=3331;y.PACK_SKIP_PIXELS=3332;y.TEXTURE_BINDING_3D=32874;y.UNPACK_SKIP_IMAGES=32877;y.UNPACK_IMAGE_HEIGHT=32878;y.MAX_3D_TEXTURE_SIZE=32883;y.MAX_ELEMENTS_VERTICES=
33E3;y.MAX_ELEMENTS_INDICES=33001;y.MAX_TEXTURE_LOD_BIAS=34045;y.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657;y.MAX_VERTEX_UNIFORM_COMPONENTS=35658;y.MAX_ARRAY_TEXTURE_LAYERS=35071;y.MIN_PROGRAM_TEXEL_OFFSET=35076;y.MAX_PROGRAM_TEXEL_OFFSET=35077;y.MAX_VARYING_COMPONENTS=35659;y.FRAGMENT_SHADER_DERIVATIVE_HINT=35723;y.RASTERIZER_DISCARD=35977;y.VERTEX_ARRAY_BINDING=34229;y.MAX_VERTEX_OUTPUT_COMPONENTS=37154;y.MAX_FRAGMENT_INPUT_COMPONENTS=37157;y.MAX_SERVER_WAIT_TIMEOUT=37137;y.MAX_ELEMENT_INDEX=36203;y.RED=
6403;y.RGB8=32849;y.RGBA8=32856;y.RGB10_A2=32857;y.TEXTURE_3D=32879;y.TEXTURE_WRAP_R=32882;y.TEXTURE_MIN_LOD=33082;y.TEXTURE_MAX_LOD=33083;y.TEXTURE_BASE_LEVEL=33084;y.TEXTURE_MAX_LEVEL=33085;y.TEXTURE_COMPARE_MODE=34892;y.TEXTURE_COMPARE_FUNC=34893;y.SRGB=35904;y.SRGB8=35905;y.SRGB8_ALPHA8=35907;y.COMPARE_REF_TO_TEXTURE=34894;y.RGBA32F=34836;y.RGB32F=34837;y.RGBA16F=34842;y.RGB16F=34843;y.TEXTURE_2D_ARRAY=35866;y.TEXTURE_BINDING_2D_ARRAY=35869;y.R11F_G11F_B10F=35898;y.RGB9_E5=35901;y.RGBA32UI=36208;
y.RGB32UI=36209;y.RGBA16UI=36214;y.RGB16UI=36215;y.RGBA8UI=36220;y.RGB8UI=36221;y.RGBA32I=36226;y.RGB32I=36227;y.RGBA16I=36232;y.RGB16I=36233;y.RGBA8I=36238;y.RGB8I=36239;y.RED_INTEGER=36244;y.RGB_INTEGER=36248;y.RGBA_INTEGER=36249;y.R8=33321;y.RG8=33323;y.R16F=33325;y.R32F=33326;y.RG16F=33327;y.RG32F=33328;y.R8I=33329;y.R8UI=33330;y.R16I=33331;y.R16UI=33332;y.R32I=33333;y.R32UI=33334;y.RG8I=33335;y.RG8UI=33336;y.RG16I=33337;y.RG16UI=33338;y.RG32I=33339;y.RG32UI=33340;y.R8_SNORM=36756;y.RG8_SNORM=
36757;y.RGB8_SNORM=36758;y.RGBA8_SNORM=36759;y.RGB10_A2UI=36975;y.TEXTURE_IMMUTABLE_FORMAT=37167;y.TEXTURE_IMMUTABLE_LEVELS=33503;y.UNSIGNED_INT_2_10_10_10_REV=33640;y.UNSIGNED_INT_10F_11F_11F_REV=35899;y.UNSIGNED_INT_5_9_9_9_REV=35902;y.FLOAT_32_UNSIGNED_INT_24_8_REV=36269;y.UNSIGNED_INT_24_8=34042;y.HALF_FLOAT=5131;y.RG=33319;y.RG_INTEGER=33320;y.INT_2_10_10_10_REV=36255;y.CURRENT_QUERY=34917;y.QUERY_RESULT=34918;y.QUERY_RESULT_AVAILABLE=34919;y.ANY_SAMPLES_PASSED=35887;y.ANY_SAMPLES_PASSED_CONSERVATIVE=
36202;y.MAX_DRAW_BUFFERS=34852;y.DRAW_BUFFER0=34853;y.DRAW_BUFFER1=34854;y.DRAW_BUFFER2=34855;y.DRAW_BUFFER3=34856;y.DRAW_BUFFER4=34857;y.DRAW_BUFFER5=34858;y.DRAW_BUFFER6=34859;y.DRAW_BUFFER7=34860;y.DRAW_BUFFER8=34861;y.DRAW_BUFFER9=34862;y.DRAW_BUFFER10=34863;y.DRAW_BUFFER11=34864;y.DRAW_BUFFER12=34865;y.DRAW_BUFFER13=34866;y.DRAW_BUFFER14=34867;y.DRAW_BUFFER15=34868;y.MAX_COLOR_ATTACHMENTS=36063;y.COLOR_ATTACHMENT1=36065;y.COLOR_ATTACHMENT2=36066;y.COLOR_ATTACHMENT3=36067;y.COLOR_ATTACHMENT4=
36068;y.COLOR_ATTACHMENT5=36069;y.COLOR_ATTACHMENT6=36070;y.COLOR_ATTACHMENT7=36071;y.COLOR_ATTACHMENT8=36072;y.COLOR_ATTACHMENT9=36073;y.COLOR_ATTACHMENT10=36074;y.COLOR_ATTACHMENT11=36075;y.COLOR_ATTACHMENT12=36076;y.COLOR_ATTACHMENT13=36077;y.COLOR_ATTACHMENT14=36078;y.COLOR_ATTACHMENT15=36079;y.SAMPLER_3D=35679;y.SAMPLER_2D_SHADOW=35682;y.SAMPLER_2D_ARRAY=36289;y.SAMPLER_2D_ARRAY_SHADOW=36292;y.SAMPLER_CUBE_SHADOW=36293;y.INT_SAMPLER_2D=36298;y.INT_SAMPLER_3D=36299;y.INT_SAMPLER_CUBE=36300;y.INT_SAMPLER_2D_ARRAY=
36303;y.UNSIGNED_INT_SAMPLER_2D=36306;y.UNSIGNED_INT_SAMPLER_3D=36307;y.UNSIGNED_INT_SAMPLER_CUBE=36308;y.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311;y.MAX_SAMPLES=36183;y.SAMPLER_BINDING=35097;y.PIXEL_PACK_BUFFER=35051;y.PIXEL_UNPACK_BUFFER=35052;y.PIXEL_PACK_BUFFER_BINDING=35053;y.PIXEL_UNPACK_BUFFER_BINDING=35055;y.COPY_READ_BUFFER=36662;y.COPY_WRITE_BUFFER=36663;y.COPY_READ_BUFFER_BINDING=36662;y.COPY_WRITE_BUFFER_BINDING=36663;y.FLOAT_MAT2x3=35685;y.FLOAT_MAT2x4=35686;y.FLOAT_MAT3x2=35687;y.FLOAT_MAT3x4=
35688;y.FLOAT_MAT4x2=35689;y.FLOAT_MAT4x3=35690;y.UNSIGNED_INT_VEC2=36294;y.UNSIGNED_INT_VEC3=36295;y.UNSIGNED_INT_VEC4=36296;y.UNSIGNED_NORMALIZED=35863;y.SIGNED_NORMALIZED=36764;y.VERTEX_ATTRIB_ARRAY_INTEGER=35069;y.VERTEX_ATTRIB_ARRAY_DIVISOR=35070;y.TRANSFORM_FEEDBACK_BUFFER_MODE=35967;y.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968;y.TRANSFORM_FEEDBACK_VARYINGS=35971;y.TRANSFORM_FEEDBACK_BUFFER_START=35972;y.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973;y.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976;
y.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978;y.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979;y.INTERLEAVED_ATTRIBS=35980;y.SEPARATE_ATTRIBS=35981;y.TRANSFORM_FEEDBACK_BUFFER=35982;y.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983;y.TRANSFORM_FEEDBACK=36386;y.TRANSFORM_FEEDBACK_PAUSED=36387;y.TRANSFORM_FEEDBACK_ACTIVE=36388;y.TRANSFORM_FEEDBACK_BINDING=36389;y.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296;y.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297;y.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298;y.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=
33299;y.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300;y.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301;y.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302;y.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303;y.FRAMEBUFFER_DEFAULT=33304;y.DEPTH24_STENCIL8=35056;y.DRAW_FRAMEBUFFER_BINDING=36006;y.READ_FRAMEBUFFER=36008;y.DRAW_FRAMEBUFFER=36009;y.READ_FRAMEBUFFER_BINDING=36010;y.RENDERBUFFER_SAMPLES=36011;y.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052;y.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182;y.UNIFORM_BUFFER=35345;y.UNIFORM_BUFFER_BINDING=
35368;y.UNIFORM_BUFFER_START=35369;y.UNIFORM_BUFFER_SIZE=35370;y.MAX_VERTEX_UNIFORM_BLOCKS=35371;y.MAX_FRAGMENT_UNIFORM_BLOCKS=35373;y.MAX_COMBINED_UNIFORM_BLOCKS=35374;y.MAX_UNIFORM_BUFFER_BINDINGS=35375;y.MAX_UNIFORM_BLOCK_SIZE=35376;y.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377;y.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379;y.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380;y.ACTIVE_UNIFORM_BLOCKS=35382;y.UNIFORM_TYPE=35383;y.UNIFORM_SIZE=35384;y.UNIFORM_BLOCK_INDEX=35386;y.UNIFORM_OFFSET=35387;y.UNIFORM_ARRAY_STRIDE=
35388;y.UNIFORM_MATRIX_STRIDE=35389;y.UNIFORM_IS_ROW_MAJOR=35390;y.UNIFORM_BLOCK_BINDING=35391;y.UNIFORM_BLOCK_DATA_SIZE=35392;y.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394;y.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395;y.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396;y.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398;y.OBJECT_TYPE=37138;y.SYNC_CONDITION=37139;y.SYNC_STATUS=37140;y.SYNC_FLAGS=37141;y.SYNC_FENCE=37142;y.SYNC_GPU_COMMANDS_COMPLETE=37143;y.UNSIGNALED=37144;y.SIGNALED=37145;y.ALREADY_SIGNALED=
37146;y.TIMEOUT_EXPIRED=37147;y.CONDITION_SATISFIED=37148;y.WAIT_FAILED=37149;y.SYNC_FLUSH_COMMANDS_BIT=1;y.COLOR=6144;y.DEPTH=6145;y.STENCIL=6146;y.MIN=32775;y.MAX=32776;y.DEPTH_COMPONENT24=33190;y.STREAM_READ=35041;y.STREAM_COPY=35042;y.STATIC_READ=35045;y.STATIC_COPY=35046;y.DYNAMIC_READ=35049;y.DYNAMIC_COPY=35050;y.DEPTH_COMPONENT32F=36012;y.DEPTH32F_STENCIL8=36013;y.INVALID_INDEX=-1;y.TIMEOUT_IGNORED=-1;y.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447;gf.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,
1,0];ib.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];R.NONE=0;R.FALSE=0;R.TRUE=1;R.SOURCE_RELATIVE=514;R.CONE_INNER_ANGLE=4097;R.CONE_OUTER_ANGLE=4098;R.PITCH=4099;R.POSITION=4100;R.DIRECTION=4101;R.VELOCITY=4102;R.LOOPING=4103;R.BUFFER=4105;R.GAIN=4106;R.MIN_GAIN=4109;R.MAX_GAIN=4110;R.ORIENTATION=4111;R.SOURCE_STATE=4112;R.INITIAL=4113;R.PLAYING=4114;R.PAUSED=4115;R.STOPPED=4116;R.BUFFERS_QUEUED=4117;R.BUFFERS_PROCESSED=4118;R.REFERENCE_DISTANCE=4128;R.ROLLOFF_FACTOR=4129;R.CONE_OUTER_GAIN=4130;
R.MAX_DISTANCE=4131;R.SEC_OFFSET=4132;R.SAMPLE_OFFSET=4133;R.BYTE_OFFSET=4134;R.SOURCE_TYPE=4135;R.STATIC=4136;R.STREAMING=4137;R.UNDETERMINED=4144;R.FORMAT_MONO8=4352;R.FORMAT_MONO16=4353;R.FORMAT_STEREO8=4354;R.FORMAT_STEREO16=4355;R.FREQUENCY=8193;R.BITS=8194;R.CHANNELS=8195;R.SIZE=8196;R.NO_ERROR=0;R.INVALID_NAME=40961;R.INVALID_ENUM=40962;R.INVALID_VALUE=40963;R.INVALID_OPERATION=40964;R.OUT_OF_MEMORY=40965;R.VENDOR=45057;R.VERSION=45058;R.RENDERER=45059;R.EXTENSIONS=45060;R.DOPPLER_FACTOR=49152;
R.SPEED_OF_SOUND=49155;R.DOPPLER_VELOCITY=49153;R.DISTANCE_MODEL=53248;R.INVERSE_DISTANCE=53249;R.INVERSE_DISTANCE_CLAMPED=53250;R.LINEAR_DISTANCE=53251;R.LINEAR_DISTANCE_CLAMPED=53252;R.EXPONENT_DISTANCE=53253;R.EXPONENT_DISTANCE_CLAMPED=53254;R.METERS_PER_UNIT=131076;R.DIRECT_FILTER=131077;R.AUXILIARY_SEND_FILTER=131078;R.AIR_ABSORPTION_FACTOR=131079;R.ROOM_ROLLOFF_FACTOR=131080;R.CONE_OUTER_GAINHF=131081;R.DIRECT_FILTER_GAINHF_AUTO=131082;R.AUXILIARY_SEND_FILTER_GAIN_AUTO=131083;R.AUXILIARY_SEND_FILTER_GAINHF_AUTO=
131084;R.REVERB_DENSITY=1;R.REVERB_DIFFUSION=2;R.REVERB_GAIN=3;R.REVERB_GAINHF=4;R.REVERB_DECAY_TIME=5;R.REVERB_DECAY_HFRATIO=6;R.REVERB_REFLECTIONS_GAIN=7;R.REVERB_REFLECTIONS_DELAY=8;R.REVERB_LATE_REVERB_GAIN=9;R.REVERB_LATE_REVERB_DELAY=10;R.REVERB_AIR_ABSORPTION_GAINHF=11;R.REVERB_ROOM_ROLLOFF_FACTOR=12;R.REVERB_DECAY_HFLIMIT=13;R.EAXREVERB_DENSITY=1;R.EAXREVERB_DIFFUSION=2;R.EAXREVERB_GAIN=3;R.EAXREVERB_GAINHF=4;R.EAXREVERB_GAINLF=5;R.EAXREVERB_DECAY_TIME=6;R.EAXREVERB_DECAY_HFRATIO=7;R.EAXREVERB_DECAY_LFRATIO=
8;R.EAXREVERB_REFLECTIONS_GAIN=9;R.EAXREVERB_REFLECTIONS_DELAY=10;R.EAXREVERB_REFLECTIONS_PAN=11;R.EAXREVERB_LATE_REVERB_GAIN=12;R.EAXREVERB_LATE_REVERB_DELAY=13;R.EAXREVERB_LATE_REVERB_PAN=14;R.EAXREVERB_ECHO_TIME=15;R.EAXREVERB_ECHO_DEPTH=16;R.EAXREVERB_MODULATION_TIME=17;R.EAXREVERB_MODULATION_DEPTH=18;R.EAXREVERB_AIR_ABSORPTION_GAINHF=19;R.EAXREVERB_HFREFERENCE=20;R.EAXREVERB_LFREFERENCE=21;R.EAXREVERB_ROOM_ROLLOFF_FACTOR=22;R.EAXREVERB_DECAY_HFLIMIT=23;R.CHORUS_WAVEFORM=1;R.CHORUS_PHASE=2;R.CHORUS_RATE=
3;R.CHORUS_DEPTH=4;R.CHORUS_FEEDBACK=5;R.CHORUS_DELAY=6;R.DISTORTION_EDGE=1;R.DISTORTION_GAIN=2;R.DISTORTION_LOWPASS_CUTOFF=3;R.DISTORTION_EQCENTER=4;R.DISTORTION_EQBANDWIDTH=5;R.ECHO_DELAY=1;R.ECHO_LRDELAY=2;R.ECHO_DAMPING=3;R.ECHO_FEEDBACK=4;R.ECHO_SPREAD=5;R.FLANGER_WAVEFORM=1;R.FLANGER_PHASE=2;R.FLANGER_RATE=3;R.FLANGER_DEPTH=4;R.FLANGER_FEEDBACK=5;R.FLANGER_DELAY=6;R.FREQUENCY_SHIFTER_FREQUENCY=1;R.FREQUENCY_SHIFTER_LEFT_DIRECTION=2;R.FREQUENCY_SHIFTER_RIGHT_DIRECTION=3;R.VOCAL_MORPHER_PHONEMEA=
1;R.VOCAL_MORPHER_PHONEMEA_COARSE_TUNING=2;R.VOCAL_MORPHER_PHONEMEB=3;R.VOCAL_MORPHER_PHONEMEB_COARSE_TUNING=4;R.VOCAL_MORPHER_WAVEFORM=5;R.VOCAL_MORPHER_RATE=6;R.PITCH_SHIFTER_COARSE_TUNE=1;R.PITCH_SHIFTER_FINE_TUNE=2;R.RING_MODULATOR_FREQUENCY=1;R.RING_MODULATOR_HIGHPASS_CUTOFF=2;R.RING_MODULATOR_WAVEFORM=3;R.AUTOWAH_ATTACK_TIME=1;R.AUTOWAH_RELEASE_TIME=2;R.AUTOWAH_RESONANCE=3;R.AUTOWAH_PEAK_GAIN=4;R.COMPRESSOR_ONOFF=1;R.EQUALIZER_LOW_GAIN=1;R.EQUALIZER_LOW_CUTOFF=2;R.EQUALIZER_MID1_GAIN=3;R.EQUALIZER_MID1_CENTER=
4;R.EQUALIZER_MID1_WIDTH=5;R.EQUALIZER_MID2_GAIN=6;R.EQUALIZER_MID2_CENTER=7;R.EQUALIZER_MID2_WIDTH=8;R.EQUALIZER_HIGH_GAIN=9;R.EQUALIZER_HIGH_CUTOFF=10;R.EFFECT_FIRST_PARAMETER=0;R.EFFECT_LAST_PARAMETER=32768;R.EFFECT_TYPE=32769;R.EFFECT_NULL=0;R.EFFECT_EAXREVERB=32768;R.EFFECT_REVERB=1;R.EFFECT_CHORUS=2;R.EFFECT_DISTORTION=3;R.EFFECT_ECHO=4;R.EFFECT_FLANGER=5;R.EFFECT_FREQUENCY_SHIFTER=6;R.EFFECT_VOCAL_MORPHER=7;R.EFFECT_PITCH_SHIFTER=8;R.EFFECT_RING_MODULATOR=9;R.FFECT_AUTOWAH=10;R.EFFECT_AUTOWAH=
10;R.EFFECT_COMPRESSOR=11;R.EFFECT_EQUALIZER=12;R.EFFECTSLOT_EFFECT=1;R.EFFECTSLOT_GAIN=2;R.EFFECTSLOT_AUXILIARY_SEND_AUTO=3;R.LOWPASS_GAIN=1;R.LOWPASS_GAINHF=2;R.HIGHPASS_GAIN=1;R.HIGHPASS_GAINLF=2;R.BANDPASS_GAIN=1;R.BANDPASS_GAINLF=2;R.BANDPASS_GAINHF=3;R.FILTER_FIRST_PARAMETER=0;R.FILTER_LAST_PARAMETER=32768;R.FILTER_TYPE=32769;R.FILTER_NULL=0;R.FILTER_LOWPASS=1;R.FILTER_HIGHPASS=2;R.FILTER_BANDPASS=3;Kc.FALSE=0;Kc.TRUE=1;Kc.FREQUENCY=4103;Kc.REFRESH=4104;Kc.SYNC=4105;Kc.MONO_SOURCES=4112;Kc.STEREO_SOURCES=
4113;Kc.NO_ERROR=0;Kc.INVALID_DEVICE=40961;Kc.INVALID_CONTEXT=40962;Kc.INVALID_ENUM=40963;Kc.INVALID_VALUE=40964;Kc.OUT_OF_MEMORY=40965;Kc.ATTRIBUTES_SIZE=4098;Kc.ALL_ATTRIBUTES=4099;Kc.DEFAULT_DEVICE_SPECIFIER=4100;Kc.DEVICE_SPECIFIER=4101;Kc.EXTENSIONS=4102;Kc.ENUMERATE_ALL_EXT=1;Kc.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Kc.ALL_DEVICES_SPECIFIER=4115;zf.onUpdate=new Se;zf.__updated=!1;ig.alreadyCreated=new aa;ig.initialized=!1;Ni.sensorByID=new we;Ni.sensors=[];Hb.__directories=new we;Ke.workLoad=.5;
Ke.__totalWorkPriority=0;Cn.nextID=0;cf.devices=new we;cf.onConnect=new gv;Ce.devices=new we;Ce.onConnect=new hv;tc.NONE=0;tc.LEFT_SHIFT=1;tc.RIGHT_SHIFT=2;tc.LEFT_CTRL=64;tc.RIGHT_CTRL=128;tc.LEFT_ALT=256;tc.RIGHT_ALT=512;tc.LEFT_META=1024;tc.RIGHT_META=2048;tc.NUM_LOCK=4096;tc.CAPS_LOCK=8192;tc.MODE=16384;tc.CTRL=192;tc.SHIFT=3;tc.ALT=768;tc.META=3072;De.onCancel=new An;De.onEnd=new An;De.onMove=new An;De.onStart=new An;bb.cache=new rv;bb.onChange=new Se;bb.bundlePaths=new aa;bb.libraries=new aa;
bb.libraryPaths=new aa;Mk.BYTES_PER_ELEMENT=4;Mb.throwErrors=!0;Sj.easeIn=new Qr;Sj.easeInOut=new Rr;Sj.easeOut=new Sr;ua.defaultActuator=Ed;ua.defaultEase=Sj.easeOut;ua.targetLibraries=new Na;wk.easeIn=new vp;wk.easeInOut=new Xr;wk.easeOut=new wp;xk.easeIn=new Yr;xk.easeInOut=new Zr;xk.easeOut=new $r;Ti.easeIn=new xp(.1,.4);Ti.easeInOut=new yp(.1,.4);Ti.easeOut=new zp(.1,.4);Ai.easeIn=new bs;Ai.easeInOut=new cs;Ai.easeOut=new ds;lh.easeIn=new es;lh.easeInOut=new fs;lh.easeOut=new gs;yk.easeIn=new hs;
yk.easeInOut=new is;yk.easeOut=new js;zk.easeIn=new ks;zk.easeInOut=new ls;zk.easeOut=new ms;Oa.__lastTimerID=0;Oa.__sentWarnings=new aa;Oa.__timers=new we;Oa.__registeredClassAliases=new aa;Oa.__registeredClasses=ix.toUtilsObjectMap(null);Pk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Oi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ri.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Pi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};xi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},
_:{SuppressWarnings:["checkstyle:Dynamic"]}}};bo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ea.__pool=new Tb(function(){return new Ea},function(a){a.setTo(0,0,0,0)});uc.__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"]},
compare:{SuppressWarnings:["checkstyle:Dynamic"]},getSurface:{SuppressWarnings:["checkstyle:Dynamic"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};uc.VERTEX_BUFFER_STRIDE=14;uc.__tempVector=new Ff;uc.__fillRectRectangle=new Ea;xh.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};os.__meta__={fields:{cairo:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix3:{SuppressWarnings:["checkstyle:Dynamic"]},applyMatrix:{SuppressWarnings:["checkstyle:Dynamic"]},
__setBlendModeCairo:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qk.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};qw.NONE=0;qw.ROUND=1;qw.SQUARE=2;ss.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},
_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Bp.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},applyStyle:{SuppressWarnings:["checkstyle:Dynamic"]},clearStyle:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Jc.__missingFontWarning=new aa;Dh.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};In.SIN45=.7071067811865476;In.TAN22=.41421356237309503;tw.BEVEL=0;tw.MITER=1;tw.ROUND=2;Gf.__meta__={fields:{__dispatchError:{SuppressWarnings:["checkstyle:Dynamic"]},
Loader_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ej.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ej.__rootURL=Lk.get_supported()?window.document.URL:"";rc.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]},
getMatrix:{SuppressWarnings:["checkstyle:Dynamic"]}}};rc.__alphaValue=[1];rc.__colorMultipliersValue=[0,0,0,0];rc.__colorOffsetsValue=[0,0,0,0];rc.__defaultColorMultipliersValue=[1,1,1,1];rc.__emptyColorValue=[0,0,0,0];rc.__emptyAlphaValue=[1];rc.__hasColorTransformValue=[!1];rc.__scissorRectangle=new Ea;rc.__textureSizeValue=[0,0];cq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ks.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Bq.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Xm.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};cd.__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"]}}};Bl.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ls.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ap.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Nn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ms.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ns.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Os.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ps.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Qs.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};zm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Hn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};zl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ch.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};ch.empty=new ch;B.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};B.SIN45=.7071067811865476;B.TAN22=.41421356237309503;B.fillCommands=new ch;B.strokeCommands=new ch;Fw.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ia.__meta__=
{obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ej.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};tm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kl.MAX_INDEX_BUFFER_LENGTH=65535;Kl.MAX_QUADS_PER_INDEX_BUFFER=10922;Kl.MAX_QUAD_INDEX_BUFFER_LENGTH=
65532;Sk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ba.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ba.blankBitmapData=new uc(1,1,!1,0);Ba.tempColorTransform=new ca(1,1,1,1,0,0,0,0);Ba.tempVerticesVector=gb.toFloatVector(null);Ba.tempIndicesVector=gb.toIntVector(null);Ba.tempUvtVector=gb.toFloatVector(null);um.opaqueBitmapData=new uc(1,1,!1,0);mj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Tk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Fa.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ii.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ii.__textureSizeValue=[0,0];Md.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ah.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Li.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bh.__regexColor=new sb("color=(\"#([^\"]+)\"|'#([^']+)')","i");bh.__regexFace=
new sb("face=(\"([^\"]+)\"|'([^']+)')","i");bh.__regexFont=new sb("<font ([^>]+)>","gi");bh.__regexCloseFont=new sb("</font>","gi");bh.__regexSize=new sb("size=(\"([^\"]+)\"|'([^']+)')","i");gk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Rk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ll.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Jm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Jm.alphaColorTransform=new ca;Jm.bitmap=new cg;Jm.destPoint=new Qa;Jm.sourceRect=new Ea;sm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};sm.P=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,
68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,
210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,
92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,
84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];Km.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xs.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};Qp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kj.drawCallsCounters=function(a){a=new we;var b=
new Qp;a.h[0]=b;b=new Qp;a.h[1]=b;return a}(this);Uc.supportsVideoTexture=!0;Uc.__glDepthStencil=-1;Uc.__glMaxTextureMaxAnisotropy=-1;Uc.__glMaxViewportDims=-1;Uc.__glMemoryCurrentAvailable=-1;Uc.__glMemoryTotalAvailable=-1;Uc.__glTextureMaxAnisotropy=-1;Kw.DYNAMIC_DRAW=0;Kw.STATIC_DRAW=1;Lw.FRAGMENT=0;Lw.VERTEX=1;Tp.BGR_PACKED=0;Tp.BGRA=1;Tp.BGRA_PACKED=2;Tp.COMPRESSED=3;Tp.COMPRESSED_ALPHA=4;Tp.RGBA_HALF_FLOAT=5;Zs.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Up.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Og.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Og.limitedProfile=!0;Un.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};$s.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Mm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Rp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};gd.__meta__=
{fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Lm.__lowMemoryMode=!1;Ld.DEFAULT_TO_STRING="Error";cl.ACTIVITY="activity";sg.LINK="link";sg.TEXT_INPUT="textInput";jg.ERROR="error";Wp.ASYNC_ERROR="asyncError";Nm.DATA="data";Nm.UPLOAD_COMPLETE_DATA="uploadCompleteData";co.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ql.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ql.supportsWeakReference=
Object.prototype.hasOwnProperty.call(sa,"WeakRef");hj.FOCUS_IN="focusIn";hj.FOCUS_OUT="focusOut";hj.KEY_FOCUS_CHANGE="keyFocusChange";hj.MOUSE_FOCUS_CHANGE="mouseFocusChange";nj.FULL_SCREEN="fullScreen";nj.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";tk.DEVICE_ADDED="deviceAdded";tk.DEVICE_REMOVED="deviceRemoved";tk.DEVICE_UNUSABLE="deviceUnusable";Ml.HTTP_RESPONSE_STATUS="httpResponseStatus";Ml.HTTP_STATUS="httpStatus";Eh.IO_ERROR="ioError";wm.KEY_DOWN="keyDown";wm.KEY_UP="keyUp";
Bc.CLICK="click";Bc.DOUBLE_CLICK="doubleClick";Bc.MIDDLE_CLICK="middleClick";Bc.MIDDLE_MOUSE_DOWN="middleMouseDown";Bc.MIDDLE_MOUSE_UP="middleMouseUp";Bc.MOUSE_DOWN="mouseDown";Bc.MOUSE_MOVE="mouseMove";Bc.MOUSE_OUT="mouseOut";Bc.MOUSE_OVER="mouseOver";Bc.MOUSE_UP="mouseUp";Bc.MOUSE_WHEEL="mouseWheel";Bc.RELEASE_OUTSIDE="releaseOutside";Bc.RIGHT_CLICK="rightClick";Bc.RIGHT_MOUSE_DOWN="rightMouseDown";Bc.RIGHT_MOUSE_UP="rightMouseUp";Bc.ROLL_OUT="rollOut";Bc.ROLL_OVER="rollOver";Om.NET_STATUS="netStatus";
kh.PROGRESS="progress";kh.SOCKET_DATA="socketData";Mj.CLEAR_DOM="clearDOM";Mj.RENDER_CAIRO="renderCairo";Mj.RENDER_CANVAS="renderCanvas";Mj.RENDER_DOM="renderDOM";Mj.RENDER_OPENGL="renderOpenGL";Wn.SAMPLE_DATA="sampleData";dm.SECURITY_ERROR="securityError";xm.ORIENTATION_CHANGE="orientationChange";xm.ORIENTATION_CHANGING="orientationChanging";Ef.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ef.TOUCH_BEGIN="touchBegin";Ef.TOUCH_END="touchEnd";Ef.TOUCH_MOVE="touchMove";
Ef.TOUCH_OUT="touchOut";Ef.TOUCH_OVER="touchOver";Ef.TOUCH_ROLL_OUT="touchRollOut";Ef.TOUCH_ROLL_OVER="touchRollOver";Ef.TOUCH_TAP="touchTap";dl.UNCAUGHT_ERROR="uncaughtError";Xn.available=!0;Xn.marshallExceptions=!1;Ui.__blurShader=new at;il.__hideShader=new bt;Zd.__invertAlphaShader=new ht;Zd.__blurAlphaShader=new ct;Zd.__combineShader=new et;Zd.__innerCombineShader=new gt;Zd.__combineKnockoutShader=new dt;Zd.__innerCombineKnockoutShader=new ft;pf.__meta__={fields:{blendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
lf.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Pm.DEFAULT="i-default";Pm.RTL_LANGUAGES="ae ar arc bcc bqi ckb dv fa glk he ku mzn nqo pnb ps sd ug ur yi".split(" ");ci.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};fe.MAX_ACTIVE_CHANNELS=32;fe.__soundChannels=[];fe.__soundTransform=new ci;fo.VERTEX_BUFFER_STRIDE=
5;Vm.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Vm.CONNECT_SUCCESS="NetConnection.Connect.Success";go.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ge.defaultObjectEncoding=10;Nl.followRedirects=!0;Nl.idleTimeout=0;Nl.manageCookies=!0;
Rl.__meta__={statics:{__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Kn.currentDomain=new Kn(null);ud.avHardwareDisable=!0;ud.hasAccessibility=!1;ud.hasAudio=!0;ud.hasAudioEncoder=!1;ud.hasEmbeddedVideo=!1;ud.hasIME=!1;ud.hasMP3=!1;ud.hasPrinting=!0;ud.hasScreenBroadcast=!1;ud.hasScreenPlayback=!1;ud.hasStreamingAudio=!1;ud.hasStreamingVideo=!1;ud.hasTLS=!0;ud.hasVideoEncoder=!0;ud.isDebugger=!1;ud.isEmbeddedInAcrobat=!1;ud.localFileReadDisable=
!0;ud.maxLevelIDC=0;ud.playerType="PlugIn";ud.screenColor="color";ud.serverString="";ud.supports32BitProcesses=!1;ud.supports64BitProcesses=!1;ud.touchscreenType=0;ud.__standardDensities=[120,160,240,320,480,640,800,960];Yp.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};Yp.currentDomain=new Yp;$d.__fontByName=new aa;$d.__registeredFonts=[];qf.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};vk.CENTER=0;vk.END=1;vk.JUSTIFY=2;vk.LEFT=3;vk.RIGHT=4;
vk.START=5;Zp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Rv.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};Zb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zb.__regexAlign=new sb("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexBreakTag=new sb("<br\\s*/?>","gi");Zb.__regexBlockIndent=new sb("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexClass=new sb("class\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");
Zb.__regexColor=new sb("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");Zb.__regexEntityApos=new sb("&apos;","g");Zb.__regexEntityNbsp=new sb("&nbsp;","g");Zb.__regexCharEntity=new sb("&#(?:([0-9]+)|(x[0-9a-fA-F]+));","g");Zb.__regexFace=new sb("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexHTMLTag=new sb("<.*?>","g");Zb.__regexHref=new sb("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexIndent=new sb(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexLeading=new sb("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");Zb.__regexLeftMargin=new sb("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexRightMargin=new sb("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexSize=new sb("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Zb.__regexTabStops=new sb("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Yn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Oc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Oc.GUTTER=2;Oc.UTF8_TAB=9;Oc.UTF8_ENDLINE=10;Oc.UTF8_SPACE=32;Oc.UTF8_HYPHEN=45;Df.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{glyphs:{SuppressWarnings:["checkstyle:Dynamic"]},__handle:{SuppressWarnings:["checkstyle:Dynamic"]},__hbBuffer:{SuppressWarnings:["checkstyle:Dynamic"]},__hbFont:{SuppressWarnings:["checkstyle:Dynamic"]},get_glyphs:{SuppressWarnings:["checkstyle:Dynamic"]}}};Df.FT_LOAD_DEFAULT=0;Df.FT_LOAD_NO_SCALE=1;Df.FT_LOAD_NO_HINTING=2;Df.FT_LOAD_RENDER=4;
Df.FT_LOAD_NO_BITMAP=8;Df.FT_LOAD_VERTICAL_LAYOUT=16;Df.FT_LOAD_FORCE_AUTOHINT=32;Df.FT_LOAD_CROP_BITMAP=64;Df.FT_LOAD_PEDANTIC=128;Df.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;Df.FT_LOAD_NO_RECURSE=512;Df.FT_LOAD_IGNORE_TRANSFORM=1024;Df.FT_LOAD_MONOCHROME=2048;Df.FT_LOAD_LINEAR_DESIGN=4096;Df.FT_LOAD_NO_AUTOHINT=8192;Df.FT_LOAD_COLOR=16384;Df.FT_LOAD_COMPUTE_METRICS=32768;Df.FT_LOAD_BITMAP_METRICS_ONLY=65536;Df.FT_LOAD_TARGET_NORMAL=0;Df.FT_LOAD_TARGET_LIGHT=0;it.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Nc.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};Nc.isSupported=!0;Nc.numDevices=0;Nc.__deviceList=[];Nc.__instances=[];Nc.__devices=new Na;jt.MAX_BUFFER_SIZE=32E3;pb.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};pb.NUMBER_0=48;pb.NUMBER_1=49;pb.NUMBER_2=50;pb.NUMBER_3=51;pb.NUMBER_4=52;pb.NUMBER_5=53;pb.NUMBER_6=54;pb.NUMBER_7=55;pb.NUMBER_8=56;pb.NUMBER_9=57;pb.A=65;pb.B=66;
pb.C=67;pb.D=68;pb.E=69;pb.F=70;pb.G=71;pb.H=72;pb.I=73;pb.J=74;pb.K=75;pb.L=76;pb.M=77;pb.N=78;pb.O=79;pb.P=80;pb.Q=81;pb.R=82;pb.S=83;pb.T=84;pb.U=85;pb.V=86;pb.W=87;pb.X=88;pb.Y=89;pb.Z=90;pb.NUMPAD_0=96;pb.NUMPAD_1=97;pb.NUMPAD_2=98;pb.NUMPAD_3=99;pb.NUMPAD_4=100;pb.NUMPAD_5=101;pb.NUMPAD_6=102;pb.NUMPAD_7=103;pb.NUMPAD_8=104;pb.NUMPAD_9=105;pb.NUMPAD_MULTIPLY=106;pb.NUMPAD_ADD=107;pb.NUMPAD_ENTER=108;pb.NUMPAD_SUBTRACT=109;pb.NUMPAD_DECIMAL=110;pb.NUMPAD_DIVIDE=111;pb.F1=112;pb.F2=113;pb.F3=
114;pb.F4=115;pb.F5=116;pb.F6=117;pb.F7=118;pb.F8=119;pb.F9=120;pb.F10=121;pb.F11=122;pb.F12=123;pb.F13=124;pb.F14=125;pb.F15=126;pb.BACKSPACE=8;pb.TAB=9;pb.ALTERNATE=18;pb.ENTER=13;pb.COMMAND=15;pb.SHIFT=16;pb.CONTROL=17;pb.BREAK=19;pb.CAPS_LOCK=20;pb.NUMPAD=21;pb.ESCAPE=27;pb.SPACE=32;pb.PAGE_UP=33;pb.PAGE_DOWN=34;pb.END=35;pb.HOME=36;pb.LEFT=37;pb.RIGHT=39;pb.UP=38;pb.DOWN=40;pb.INSERT=45;pb.DELETE=46;pb.NUMLOCK=144;pb.SEMICOLON=186;pb.EQUAL=187;pb.COMMA=188;pb.MINUS=189;pb.PERIOD=190;pb.SLASH=
191;pb.BACKQUOTE=192;pb.LEFTBRACKET=219;pb.BACKSLASH=220;pb.RIGHTBRACKET=221;pb.QUOTE=222;Id.supportsCursor=!0;Id.supportsNativeCursor=!0;Id.__cursor="auto";Vg.ARROW="arrow";Vg.AUTO="auto";Vg.BUTTON="button";Vg.HAND="hand";Vg.IBEAM="ibeam";Vg.__CROSSHAIR="crosshair";Vg.__CUSTOM="custom";Vg.__MOVE="move";Vg.__RESIZE_NESW="resize_nesw";Vg.__RESIZE_NS="resize_ns";Vg.__RESIZE_NWSE="resize_nwse";Vg.__RESIZE_WE="resize_we";Vg.__WAIT="wait";Vg.__WAIT_ARROW="waitarrow";ra.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName",
"checkstyle:FieldDocComment"]]}};ra.OPMAP=new aa;ra.REGMAP=new aa;ra.SAMPLEMAP=new aa;ra.MAX_NESTING=4;ra.MAX_OPCODES=4096;ra.FRAGMENT="fragment";ra.VERTEX="vertex";ra.SAMPLER_TYPE_SHIFT=8;ra.SAMPLER_DIM_SHIFT=12;ra.SAMPLER_SPECIAL_SHIFT=16;ra.SAMPLER_REPEAT_SHIFT=20;ra.SAMPLER_MIPMAP_SHIFT=24;ra.SAMPLER_FILTER_SHIFT=28;ra.REG_WRITE=1;ra.REG_READ=2;ra.REG_FRAG=32;ra.REG_VERT=64;ra.OP_SCALAR=1;ra.OP_SPECIAL_TEX=8;ra.OP_SPECIAL_MATRIX=16;ra.OP_FRAG_ONLY=32;ra.OP_VERT_ONLY=64;ra.OP_NO_DEST=128;ra.OP_VERSION2=
256;ra.OP_INCNEST=512;ra.OP_DECNEST=1024;ra.MOV="mov";ra.ADD="add";ra.SUB="sub";ra.MUL="mul";ra.DIV="div";ra.RCP="rcp";ra.MIN="min";ra.MAX="max";ra.FRC="frc";ra.SQT="sqt";ra.RSQ="rsq";ra.POW="pow";ra.LOG="log";ra.EXP="exp";ra.NRM="nrm";ra.SIN="sin";ra.COS="cos";ra.CRS="crs";ra.DP3="dp3";ra.DP4="dp4";ra.ABS="abs";ra.NEG="neg";ra.SAT="sat";ra.M33="m33";ra.M44="m44";ra.M34="m34";ra.DDX="ddx";ra.DDY="ddy";ra.IFE="ife";ra.INE="ine";ra.IFG="ifg";ra.IFL="ifl";ra.IEG="ieg";ra.IEL="iel";ra.ELS="els";ra.EIF=
"eif";ra.TED="ted";ra.KIL="kil";ra.TEX="tex";ra.SGE="sge";ra.SLT="slt";ra.SGN="sgn";ra.SEQ="seq";ra.SNE="sne";ra.VA="va";ra.VC="vc";ra.VT="vt";ra.VO="vo";ra.VI="vi";ra.FC="fc";ra.FT="ft";ra.FS="fs";ra.FO="fo";ra.FD="fd";ra.IID="iid";ra.D2="2d";ra.D3="3d";ra.CUBE="cube";ra.MIPNEAREST="mipnearest";ra.MIPLINEAR="miplinear";ra.MIPNONE="mipnone";ra.NOMIP="nomip";ra.NEAREST="nearest";ra.LINEAR="linear";ra.ANISOTROPIC2X="anisotropic2x";ra.ANISOTROPIC4X="anisotropic4x";ra.ANISOTROPIC8X="anisotropic8x";ra.ANISOTROPIC16X=
"anisotropic16x";ra.CENTROID="centroid";ra.SINGLE="single";ra.IGNORESAMPLER="ignoresampler";ra.REPEAT="repeat";ra.WRAP="wrap";ra.CLAMP="clamp";ra.REPEAT_U_CLAMP_V="repeat_u_clamp_v";ra.CLAMP_U_REPEAT_V="clamp_u_repeat_v";ra.RGBA="rgba";ra.COMPRESSED="compressed";ra.COMPRESSEDALPHA="compressedalpha";ra.DXT1="dxt1";ra.DXT5="dxt5";ra.VIDEO="video";ra.initialized=!1;bd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};wi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
me.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ub.cache=new lt;ub.dispatcher=new na;ub.libraryBindings=new aa;cc.__bytePointer=new dj(null,0);Pc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Pc.defaultObjectEncoding=10;Gn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};En.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Fn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Tw.BIG_ENDIAN=0;Tw.LITTLE_ENDIAN=1;ef.__meta__=
{statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]},__getArray:{SuppressWarnings:["checkstyle:FieldDocComment"]},__setArray:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};pt.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};aq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};fd.__sentWarnings=new aa;ym.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};ym.__pool=new Tb(function(){return new ym},function(a){a.reset()});qt.__meta__={fields:{extra:{optional:null}}};Yb.main()})(typeof Ma!="undefined"?Ma:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof Ja!="undefined"?
Ja:typeof self!="undefined"?self:this)};typeof self!=="undefined"&&self.constructor.name.includes("Worker")?Za({},Y):(Eb.lime=Eb.lime||{},Eb.lime.$scripts=Eb.lime.$scripts||{},Eb.lime.$scripts.TilBuci=Za,Eb.lime.embed=function(Ma){var Ja={},La=Eb.lime.$scripts[Ma];if(!La)throw Error('Cannot find project name "'+Ma+'"');La(Ja,Y);for(var sa in Ja)Eb[sa]=Eb[sa]||Ja[sa];(La=Ja.lime||window.lime)&&La.embed&&this!==La.embed&&La.embed.apply(La,arguments);return Ja});typeof define==="function"&&define.amd&&
(define([],function(){return Eb.lime}),define.__amd=define.amd,define.amd=null)};$lime_init(typeof exports!=="undefined"?exports:typeof define==="function"&&define.amd?{}:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this,typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:this);
typeof self!=="undefined"&&self.constructor.name.includes("Worker")||(!function(){var Eb=function(){this.init()};Eb.prototype={init:function(){var r=this||Y;return r._counter=1E3,r._html5AudioPool=[],r.html5PoolSize=10,r._codecs={},r._howls=[],r._muted=!1,r._volume=1,r._canPlayEvent="canplaythrough",r._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,r.masterGain=null,r.noAudio=!1,r.usingWebAudio=!0,r.autoSuspend=!0,r.ctx=null,r.autoUnlock=!0,r._setup(),r},volume:function(r){var D=
this||Y;if(r=parseFloat(r),D.ctx||m(),void 0!==r&&r>=0&&r<=1){if(D._volume=r,D._muted)return D;D.usingWebAudio&&D.masterGain.gain.setValueAtTime(r,Y.ctx.currentTime);for(var O=0;O<D._howls.length;O++)if(!D._howls[O]._webAudio)for(var G=D._howls[O]._getSoundIds(),ma=0;ma<G.length;ma++){var qa=D._howls[O]._soundById(G[ma]);qa&&qa._node&&(qa._node.volume=qa._volume*r)}return D}return D._volume},mute:function(r){var D=this||Y;D.ctx||m();D._muted=r;D.usingWebAudio&&D.masterGain.gain.setValueAtTime(r?0:
D._volume,Y.ctx.currentTime);for(var O=0;O<D._howls.length;O++)if(!D._howls[O]._webAudio)for(var G=D._howls[O]._getSoundIds(),ma=0;ma<G.length;ma++){var qa=D._howls[O]._soundById(G[ma]);qa&&qa._node&&(qa._node.muted=!!r||qa._muted)}return D},stop:function(){for(var r=this||Y,D=0;D<r._howls.length;D++)r._howls[D].stop();return r},unload:function(){for(var r=this||Y,D=r._howls.length-1;D>=0;D--)r._howls[D].unload();return r.usingWebAudio&&r.ctx&&void 0!==r.ctx.close&&(r.ctx.close(),r.ctx=null,m()),
r},codecs:function(r){return(this||Y)._codecs[r.replace(/^x-/,"")]},_setup:function(){var r=this||Y;if(r.state=r.ctx?r.ctx.state||"suspended":"suspended",r._autoSuspend(),!r.usingWebAudio)if("undefined"!=typeof Audio)try{var D=new Audio;void 0===D.oncanplaythrough&&(r._canPlayEvent="canplay")}catch(O){r.noAudio=!0}else r.noAudio=!0;try{D=new Audio,D.muted&&(r.noAudio=!0)}catch(O){}return r.noAudio||r._setupCodecs(),r},_setupCodecs:function(){var r=this||Y,D=null;try{D="undefined"!=typeof Audio?new Audio:
null}catch(ya){return r}if(!D||"function"!=typeof D.canPlayType)return r;var O=D.canPlayType("audio/mpeg;").replace(/^no$/,""),G=r._navigator?r._navigator.userAgent:"",ma=G.match(/OPR\/(\d+)/g);ma=ma&&parseInt(ma[0].split("/")[1],10)<33;var qa=-1!==G.indexOf("Safari")&&-1===G.indexOf("Chrome");G=G.match(/Version\/(.*?) /);G=qa&&G&&parseInt(G[1],10)<15;return r._codecs={mp3:!(ma||!O&&!D.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!O,opus:!!D.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,
""),ogg:!!D.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!D.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(D.canPlayType('audio/wav; codecs="1"')||D.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!D.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!D.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(D.canPlayType("audio/x-m4a;")||D.canPlayType("audio/m4a;")||D.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(D.canPlayType("audio/x-m4b;")||D.canPlayType("audio/m4b;")||
D.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(D.canPlayType("audio/x-mp4;")||D.canPlayType("audio/mp4;")||D.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(G||!D.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(G||!D.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!D.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(D.canPlayType("audio/x-flac;")||D.canPlayType("audio/flac;")).replace(/^no$/,"")},r},_unlockAudio:function(){var r=
this||Y;if(!r._audioUnlocked&&r.ctx){r._audioUnlocked=!1;r.autoUnlock=!1;r._mobileUnloaded||44100===r.ctx.sampleRate||(r._mobileUnloaded=!0,r.unload());r._scratchBuffer=r.ctx.createBuffer(1,1,22050);var D=function(O){for(;r._html5AudioPool.length<r.html5PoolSize;)try{var G=new Audio;G._unlocked=!0;r._releaseHtml5Audio(G)}catch(Ha){r.noAudio=!0;break}for(O=0;O<r._howls.length;O++)if(!r._howls[O]._webAudio){G=r._howls[O]._getSoundIds();for(var ma=0;ma<G.length;ma++){var qa=r._howls[O]._soundById(G[ma]);
qa&&qa._node&&!qa._node._unlocked&&(qa._node._unlocked=!0,qa._node.load())}}r._autoResume();var ya=r.ctx.createBufferSource();ya.buffer=r._scratchBuffer;ya.connect(r.ctx.destination);void 0===ya.start?ya.noteOn(0):ya.start(0);"function"==typeof r.ctx.resume&&r.ctx.resume();ya.onended=function(){ya.disconnect(0);r._audioUnlocked=!0;document.removeEventListener("touchstart",D,!0);document.removeEventListener("touchend",D,!0);document.removeEventListener("click",D,!0);document.removeEventListener("keydown",
D,!0);for(var Ha=0;Ha<r._howls.length;Ha++)r._howls[Ha]._emit("unlock")}};return document.addEventListener("touchstart",D,!0),document.addEventListener("touchend",D,!0),document.addEventListener("click",D,!0),document.addEventListener("keydown",D,!0),r}},_obtainHtml5Audio:function(){var r=this||Y;if(r._html5AudioPool.length)return r._html5AudioPool.pop();r=(new Audio).play();return r&&"undefined"!=typeof Promise&&(r instanceof Promise||"function"==typeof r.then)&&r.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),
new Audio},_releaseHtml5Audio:function(r){var D=this||Y;return r._unlocked&&D._html5AudioPool.push(r),D},_autoSuspend:function(){var r=this;if(r.autoSuspend&&r.ctx&&void 0!==r.ctx.suspend&&Y.usingWebAudio){for(var D=0;D<r._howls.length;D++)if(r._howls[D]._webAudio)for(var O=0;O<r._howls[D]._sounds.length;O++)if(!r._howls[D]._sounds[O]._paused)return r;return r._suspendTimer&&clearTimeout(r._suspendTimer),r._suspendTimer=setTimeout(function(){if(r.autoSuspend){r._suspendTimer=null;r.state="suspending";
var G=function(){r.state="suspended";r._resumeAfterSuspend&&(delete r._resumeAfterSuspend,r._autoResume())};r.ctx.suspend().then(G,G)}},3E4),r}},_autoResume:function(){var r=this;if(r.ctx&&void 0!==r.ctx.resume&&Y.usingWebAudio)return"running"===r.state&&"interrupted"!==r.ctx.state&&r._suspendTimer?(clearTimeout(r._suspendTimer),r._suspendTimer=null):"suspended"===r.state||"running"===r.state&&"interrupted"===r.ctx.state?(r.ctx.resume().then(function(){r.state="running";for(var D=0;D<r._howls.length;D++)r._howls[D]._emit("resume")}),
r._suspendTimer&&(clearTimeout(r._suspendTimer),r._suspendTimer=null)):"suspending"===r.state&&(r._resumeAfterSuspend=!0),r}};var Y=new Eb,Za=function(r){if(!r.src||0===r.src.length)return void console.error("An array of source files must be passed with any new Howl.");this.init(r)};Za.prototype={init:function(r){var D=this;return Y.ctx||m(),D._autoplay=r.autoplay||!1,D._format="string"!=typeof r.format?r.format:[r.format],D._html5=r.html5||!1,D._muted=r.mute||!1,D._loop=r.loop||!1,D._pool=r.pool||
5,D._preload="boolean"!=typeof r.preload&&"metadata"!==r.preload||r.preload,D._rate=r.rate||1,D._sprite=r.sprite||{},D._src="string"!=typeof r.src?r.src:[r.src],D._volume=void 0!==r.volume?r.volume:1,D._xhr={method:r.xhr&&r.xhr.method?r.xhr.method:"GET",headers:r.xhr&&r.xhr.headers?r.xhr.headers:null,withCredentials:!(!r.xhr||!r.xhr.withCredentials)&&r.xhr.withCredentials},D._duration=0,D._state="unloaded",D._sounds=[],D._endTimers={},D._queue=[],D._playLock=!1,D._onend=r.onend?[{fn:r.onend}]:[],
D._onfade=r.onfade?[{fn:r.onfade}]:[],D._onload=r.onload?[{fn:r.onload}]:[],D._onloaderror=r.onloaderror?[{fn:r.onloaderror}]:[],D._onplayerror=r.onplayerror?[{fn:r.onplayerror}]:[],D._onpause=r.onpause?[{fn:r.onpause}]:[],D._onplay=r.onplay?[{fn:r.onplay}]:[],D._onstop=r.onstop?[{fn:r.onstop}]:[],D._onmute=r.onmute?[{fn:r.onmute}]:[],D._onvolume=r.onvolume?[{fn:r.onvolume}]:[],D._onrate=r.onrate?[{fn:r.onrate}]:[],D._onseek=r.onseek?[{fn:r.onseek}]:[],D._onunlock=r.onunlock?[{fn:r.onunlock}]:[],
D._onresume=[],D._webAudio=Y.usingWebAudio&&!D._html5,void 0!==Y.ctx&&Y.ctx&&Y.autoUnlock&&Y._unlockAudio(),Y._howls.push(D),D._autoplay&&D._queue.push({event:"play",action:function(){D.play()}}),D._preload&&"none"!==D._preload&&D.load(),D},load:function(){var r=null;if(Y.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var D=0;D<this._src.length;D++){var O;if(this._format&&this._format[D])var G=this._format[D];else{if("string"!=
typeof(O=this._src[D])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(G=/^data:audio\/([^;,]+);/i.exec(O))||(G=/\.([^.]+)$/.exec(O.split("?",1)[0]));G&&=G[1].toLowerCase()}if(G||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),G&&Y.codecs(G)){r=this._src[D];break}}return r?(this._src=r,this._state="loading","https:"===window.location.protocol&&"http:"===r.slice(0,5)&&(this._html5=!0,this._webAudio=
!1),new Ma(this),this._webAudio&&La(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(r,D){var O=this,G=null;if("number"==typeof r)G=r,r=null;else{if("string"==typeof r&&"loaded"===O._state&&!O._sprite[r])return null;if(void 0===r&&(r="__default",!O._playLock)){for(var ma=0,qa=0;qa<O._sounds.length;qa++)O._sounds[qa]._paused&&!O._sounds[qa]._ended&&(ma++,G=O._sounds[qa]._id);1===ma?r=null:G=null}}var ya=G?O._soundById(G):O._inactiveSound();
if(!ya)return null;if(G&&!r&&(r=ya._sprite||"__default"),"loaded"!==O._state){ya._sprite=r;ya._ended=!1;var Ha=ya._id;return O._queue.push({event:"play",action:function(){O.play(Ha)}}),Ha}if(G&&!ya._paused)return D||O._loadQueue("play"),ya._id;O._webAudio&&Y._autoResume();var Yb=Math.max(0,ya._seek>0?ya._seek:O._sprite[r][0]/1E3),qb=Math.max(0,(O._sprite[r][0]+O._sprite[r][1])/1E3-Yb),na=1E3*qb/Math.abs(ya._rate),$b=O._sprite[r][0]/1E3,gb=(O._sprite[r][0]+O._sprite[r][1])/1E3;ya._sprite=r;ya._ended=
!1;var Tb=function(){ya._paused=!1;ya._seek=Yb;ya._start=$b;ya._stop=gb;ya._loop=!(!ya._loop&&!O._sprite[r][2])};if(Yb>=gb)return void O._ended(ya);var ha=ya._node;if(O._webAudio)G=function(){O._playLock=!1;Tb();O._refreshBuffer(ya);ha.gain.setValueAtTime(ya._muted||O._muted?0:ya._volume,Y.ctx.currentTime);ya._playStart=Y.ctx.currentTime;void 0===ha.bufferSource.start?ya._loop?ha.bufferSource.noteGrainOn(0,Yb,86400):ha.bufferSource.noteGrainOn(0,Yb,qb):ya._loop?ha.bufferSource.start(0,Yb,86400):ha.bufferSource.start(0,
Yb,qb);na!==1/0&&(O._endTimers[ya._id]=setTimeout(O._ended.bind(O,ya),na));D||setTimeout(function(){O._emit("play",ya._id);O._loadQueue()},0)},"running"===Y.state&&"interrupted"!==Y.ctx.state?G():(O._playLock=!0,O.once("resume",G),O._clearTimer(ya._id));else{var Na=function(){ha.currentTime=Yb;ha.muted=ya._muted||O._muted||Y._muted||ha.muted;ha.volume=ya._volume*Y.volume();ha.playbackRate=ya._rate;try{var ea=ha.play();if(ea&&"undefined"!=typeof Promise&&(ea instanceof Promise||"function"==typeof ea.then)?
(O._playLock=!0,Tb(),ea.then(function(){O._playLock=!1;ha._unlocked=!0;D?O._loadQueue():O._emit("play",ya._id)}).catch(function(){O._playLock=!1;O._emit("playerror",ya._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.");ya._ended=!0;ya._paused=!0})):D||(O._playLock=!1,Tb(),O._emit("play",ya._id)),ha.playbackRate=ya._rate,ha.paused)return void O._emit("playerror",ya._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"!==r||ya._loop?O._endTimers[ya._id]=setTimeout(O._ended.bind(O,ya),na):(O._endTimers[ya._id]=function(){O._ended(ya);ha.removeEventListener("ended",O._endTimers[ya._id],!1)},ha.addEventListener("ended",O._endTimers[ya._id],!1))}catch(Da){O._emit("playerror",ya._id,Da)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===ha.src&&(ha.src=O._src,ha.load());G=window&&window.ejecta||!ha.readyState&&Y._navigator.isCocoonJS;if(ha.readyState>=3||G)Na();else{O._playLock=
!0;O._state="loading";var Xa=function(){O._state="loaded";Na();ha.removeEventListener(Y._canPlayEvent,Xa,!1)};ha.addEventListener(Y._canPlayEvent,Xa,!1);O._clearTimer(ya._id)}}return ya._id},pause:function(r){var D=this;if("loaded"!==D._state||D._playLock)return D._queue.push({event:"pause",action:function(){D.pause(r)}}),D;for(var O=D._getSoundIds(r),G=0;G<O.length;G++){D._clearTimer(O[G]);var ma=D._soundById(O[G]);if(ma&&!ma._paused&&(ma._seek=D.seek(O[G]),ma._rateSeek=0,ma._paused=!0,D._stopFade(O[G]),
ma._node))if(D._webAudio){if(!ma._node.bufferSource)continue;void 0===ma._node.bufferSource.stop?ma._node.bufferSource.noteOff(0):ma._node.bufferSource.stop(0);D._cleanBuffer(ma._node)}else isNaN(ma._node.duration)&&ma._node.duration!==1/0||ma._node.pause();arguments[1]||D._emit("pause",ma?ma._id:null)}return D},stop:function(r,D){var O=this;if("loaded"!==O._state||O._playLock)return O._queue.push({event:"stop",action:function(){O.stop(r)}}),O;for(var G=O._getSoundIds(r),ma=0;ma<G.length;ma++){O._clearTimer(G[ma]);
var qa=O._soundById(G[ma]);qa&&(qa._seek=qa._start||0,qa._rateSeek=0,qa._paused=!0,qa._ended=!0,O._stopFade(G[ma]),qa._node&&(O._webAudio?qa._node.bufferSource&&(void 0===qa._node.bufferSource.stop?qa._node.bufferSource.noteOff(0):qa._node.bufferSource.stop(0),O._cleanBuffer(qa._node)):isNaN(qa._node.duration)&&qa._node.duration!==1/0||(qa._node.currentTime=qa._start||0,qa._node.pause(),qa._node.duration===1/0&&O._clearSound(qa._node))),D||O._emit("stop",qa._id))}return O},mute:function(r,D){var O=
this;if("loaded"!==O._state||O._playLock)return O._queue.push({event:"mute",action:function(){O.mute(r,D)}}),O;if(void 0===D){if("boolean"!=typeof r)return O._muted;O._muted=r}for(var G=O._getSoundIds(D),ma=0;ma<G.length;ma++){var qa=O._soundById(G[ma]);qa&&(qa._muted=r,qa._interval&&O._stopFade(qa._id),O._webAudio&&qa._node?qa._node.gain.setValueAtTime(r?0:qa._volume,Y.ctx.currentTime):qa._node&&(qa._node.muted=!!Y._muted||r),O._emit("mute",qa._id))}return O},volume:function(){var r,D,O=this,G=arguments;
if(0===G.length)return O._volume;1===G.length||2===G.length&&void 0===G[1]?O._getSoundIds().indexOf(G[0])>=0?D=parseInt(G[0],10):r=parseFloat(G[0]):G.length>=2&&(r=parseFloat(G[0]),D=parseInt(G[1],10));var ma;if(!(void 0!==r&&r>=0&&r<=1))return ma=D?O._soundById(D):O._sounds[0],ma?ma._volume:0;if("loaded"!==O._state||O._playLock)return O._queue.push({event:"volume",action:function(){O.volume.apply(O,G)}}),O;void 0===D&&(O._volume=r);D=O._getSoundIds(D);for(var qa=0;qa<D.length;qa++)(ma=O._soundById(D[qa]))&&
(ma._volume=r,G[2]||O._stopFade(D[qa]),O._webAudio&&ma._node&&!ma._muted?ma._node.gain.setValueAtTime(r,Y.ctx.currentTime):ma._node&&!ma._muted&&(ma._node.volume=r*Y.volume()),O._emit("volume",ma._id));return O},fade:function(r,D,O,G){var ma=this;if("loaded"!==ma._state||ma._playLock)return ma._queue.push({event:"fade",action:function(){ma.fade(r,D,O,G)}}),ma;r=Math.min(Math.max(0,parseFloat(r)),1);D=Math.min(Math.max(0,parseFloat(D)),1);O=parseFloat(O);ma.volume(r,G);for(var qa=ma._getSoundIds(G),
ya=0;ya<qa.length;ya++){var Ha=ma._soundById(qa[ya]);if(Ha){if(G||ma._stopFade(qa[ya]),ma._webAudio&&!Ha._muted){var Yb=Y.ctx.currentTime,qb=Yb+O/1E3;Ha._volume=r;Ha._node.gain.setValueAtTime(r,Yb);Ha._node.gain.linearRampToValueAtTime(D,qb)}ma._startFadeInterval(Ha,r,D,O,qa[ya],void 0===G)}}return ma},_startFadeInterval:function(r,D,O,G,ma,qa){var ya=this,Ha=D,Yb=O-D;ma=Math.abs(Yb/.01);ma=Math.max(4,ma>0?G/ma:G);var qb=Date.now();r._fadeTo=O;r._interval=setInterval(function(){var na=(Date.now()-
qb)/G;qb=Date.now();Ha+=Yb*na;Ha=Math.round(100*Ha)/100;Ha=Yb<0?Math.max(O,Ha):Math.min(O,Ha);ya._webAudio?r._volume=Ha:ya.volume(Ha,r._id,!0);qa&&(ya._volume=Ha);(O<D&&Ha<=O||O>D&&Ha>=O)&&(clearInterval(r._interval),r._interval=null,r._fadeTo=null,ya.volume(O,r._id),ya._emit("fade",r._id))},ma)},_stopFade:function(r){var D=this._soundById(r);return D&&D._interval&&(this._webAudio&&D._node.gain.cancelScheduledValues(Y.ctx.currentTime),clearInterval(D._interval),D._interval=null,this.volume(D._fadeTo,
r),D._fadeTo=null,this._emit("fade",r)),this},loop:function(){var r,D,O,G=arguments;if(0===G.length)return this._loop;if(1===G.length){if("boolean"!=typeof G[0])return!!(O=this._soundById(parseInt(G[0],10)))&&O._loop;this._loop=r=G[0]}else 2===G.length&&(r=G[0],D=parseInt(G[1],10));D=this._getSoundIds(D);for(G=0;G<D.length;G++)(O=this._soundById(D[G]))&&(O._loop=r,this._webAudio&&O._node&&O._node.bufferSource&&(O._node.bufferSource.loop=r,r&&(O._node.bufferSource.loopStart=O._start||0,O._node.bufferSource.loopEnd=
O._stop,this.playing(D[G])&&(this.pause(D[G],!0),this.play(D[G],!0)))));return this},rate:function(){var r,D,O=this,G=arguments;0===G.length?D=O._sounds[0]._id:1===G.length?O._getSoundIds().indexOf(G[0])>=0?D=parseInt(G[0],10):r=parseFloat(G[0]):2===G.length&&(r=parseFloat(G[0]),D=parseInt(G[1],10));var ma;if("number"!=typeof r)return ma=O._soundById(D),ma?ma._rate:O._rate;if("loaded"!==O._state||O._playLock)return O._queue.push({event:"rate",action:function(){O.rate.apply(O,G)}}),O;void 0===D&&(O._rate=
r);D=O._getSoundIds(D);for(var qa=0;qa<D.length;qa++)if(ma=O._soundById(D[qa])){O.playing(D[qa])&&(ma._rateSeek=O.seek(D[qa]),ma._playStart=O._webAudio?Y.ctx.currentTime:ma._playStart);ma._rate=r;O._webAudio&&ma._node&&ma._node.bufferSource?ma._node.bufferSource.playbackRate.setValueAtTime(r,Y.ctx.currentTime):ma._node&&(ma._node.playbackRate=r);var ya=O.seek(D[qa]);ya=1E3*((O._sprite[ma._sprite][0]+O._sprite[ma._sprite][1])/1E3-ya)/Math.abs(ma._rate);!O._endTimers[D[qa]]&&ma._paused||(O._clearTimer(D[qa]),
O._endTimers[D[qa]]=setTimeout(O._ended.bind(O,ma),ya));O._emit("rate",ma._id)}return O},seek:function(){var r,D,O=this,G=arguments;0===G.length?O._sounds.length&&(D=O._sounds[0]._id):1===G.length?O._getSoundIds().indexOf(G[0])>=0?D=parseInt(G[0],10):O._sounds.length&&(D=O._sounds[0]._id,r=parseFloat(G[0])):2===G.length&&(r=parseFloat(G[0]),D=parseInt(G[1],10));if(void 0===D)return 0;if("number"==typeof r&&("loaded"!==O._state||O._playLock))return O._queue.push({event:"seek",action:function(){O.seek.apply(O,
G)}}),O;var ma=O._soundById(D);if(ma){if(!("number"==typeof r&&r>=0))return O._webAudio?(r=O.playing(D)?Y.ctx.currentTime-ma._playStart:0,ma._seek+((ma._rateSeek?ma._rateSeek-ma._seek:0)+r*Math.abs(ma._rate))):ma._node.currentTime;var qa=O.playing(D);qa&&O.pause(D,!0);ma._seek=r;ma._ended=!1;O._clearTimer(D);O._webAudio||!ma._node||isNaN(ma._node.duration)||(ma._node.currentTime=r);var ya=function(){qa&&O.play(D,!0);O._emit("seek",D)};if(qa&&!O._webAudio){var Ha=function(){O._playLock?setTimeout(Ha,
0):ya()};setTimeout(Ha,0)}else ya()}return O},playing:function(r){if("number"==typeof r)return r=this._soundById(r),!!r&&!r._paused;for(r=0;r<this._sounds.length;r++)if(!this._sounds[r]._paused)return!0;return!1},duration:function(r){var D=this._duration;r=this._soundById(r);return r&&(D=this._sprite[r._sprite][1]/1E3),D},state:function(){return this._state},unload:function(){for(var r=this._sounds,D=0;D<r.length;D++)r[D]._paused||this.stop(r[D]._id),this._webAudio||(this._clearSound(r[D]._node),
r[D]._node.removeEventListener("error",r[D]._errorFn,!1),r[D]._node.removeEventListener(Y._canPlayEvent,r[D]._loadFn,!1),r[D]._node.removeEventListener("ended",r[D]._endFn,!1),Y._releaseHtml5Audio(r[D]._node)),delete r[D]._node,this._clearTimer(r[D]._id);D=Y._howls.indexOf(this);D>=0&&Y._howls.splice(D,1);r=!0;for(D=0;D<Y._howls.length;D++)if(Y._howls[D]._src===this._src||this._src.indexOf(Y._howls[D]._src)>=0){r=!1;break}return Ja&&r&&delete Ja[this._src],Y.noAudio=!1,this._state="unloaded",this._sounds=
[],null},on:function(r,D,O,G){r=this["_on"+r];return"function"==typeof D&&r.push(G?{id:O,fn:D,once:G}:{id:O,fn:D}),this},off:function(r,D,O){var G=this["_on"+r];if("number"==typeof D&&(O=D,D=null),D||O)for(r=0;r<G.length;r++){var ma=O===G[r].id;if(D===G[r].fn&&ma||!D&&ma){G.splice(r,1);break}}else if(r)this["_on"+r]=[];else for(D=Object.keys(this),r=0;r<D.length;r++)0===D[r].indexOf("_on")&&Array.isArray(this[D[r]])&&(this[D[r]]=[]);return this},once:function(r,D,O){return this.on(r,D,O,1),this},
_emit:function(r,D,O){for(var G=this["_on"+r],ma=G.length-1;ma>=0;ma--)G[ma].id&&G[ma].id!==D&&"load"!==r||(setTimeout(function(qa){qa.call(this,D,O)}.bind(this,G[ma].fn),0),G[ma].once&&this.off(r,G[ma].fn,G[ma].id));return this._loadQueue(r),this},_loadQueue:function(r){if(this._queue.length>0){var D=this._queue[0];D.event===r&&(this._queue.shift(),this._loadQueue());r||D.action()}return this},_ended:function(r){var D=r._sprite;if(!this._webAudio&&r._node&&!r._node.paused&&!r._node.ended&&r._node.currentTime<
r._stop)return setTimeout(this._ended.bind(this,r),100),this;D=!(!r._loop&&!this._sprite[D][2]);if(this._emit("end",r._id),!this._webAudio&&D&&this.stop(r._id,!0).play(r._id),this._webAudio&&D){this._emit("play",r._id);r._seek=r._start||0;r._rateSeek=0;r._playStart=Y.ctx.currentTime;var O=1E3*(r._stop-r._start)/Math.abs(r._rate);this._endTimers[r._id]=setTimeout(this._ended.bind(this,r),O)}return this._webAudio&&!D&&(r._paused=!0,r._ended=!0,r._seek=r._start||0,r._rateSeek=0,this._clearTimer(r._id),
this._cleanBuffer(r._node),Y._autoSuspend()),this._webAudio||D||this.stop(r._id,!0),this},_clearTimer:function(r){if(this._endTimers[r]){if("function"!=typeof this._endTimers[r])clearTimeout(this._endTimers[r]);else{var D=this._soundById(r);D&&D._node&&D._node.removeEventListener("ended",this._endTimers[r],!1)}delete this._endTimers[r]}return this},_soundById:function(r){for(var D=0;D<this._sounds.length;D++)if(r===this._sounds[D]._id)return this._sounds[D];return null},_inactiveSound:function(){this._drain();
for(var r=0;r<this._sounds.length;r++)if(this._sounds[r]._ended)return this._sounds[r].reset();return new Ma(this)},_drain:function(){var r=this._pool,D=0,O;if(!(this._sounds.length<r)){for(O=0;O<this._sounds.length;O++)this._sounds[O]._ended&&D++;for(O=this._sounds.length-1;O>=0&&!(D<=r);O--)this._sounds[O]._ended&&(this._webAudio&&this._sounds[O]._node&&this._sounds[O]._node.disconnect(0),this._sounds.splice(O,1),D--)}},_getSoundIds:function(r){if(void 0===r){r=[];for(var D=0;D<this._sounds.length;D++)r.push(this._sounds[D]._id);
return r}return[r]},_refreshBuffer:function(r){return r._node.bufferSource=Y.ctx.createBufferSource(),r._node.bufferSource.buffer=Ja[this._src],r._panner?r._node.bufferSource.connect(r._panner):r._node.bufferSource.connect(r._node),r._node.bufferSource.loop=r._loop,r._loop&&(r._node.bufferSource.loopStart=r._start||0,r._node.bufferSource.loopEnd=r._stop||0),r._node.bufferSource.playbackRate.setValueAtTime(r._rate,Y.ctx.currentTime),this},_cleanBuffer:function(r){var D=Y._navigator&&Y._navigator.vendor.indexOf("Apple")>=
0;if(!r.bufferSource)return this;if(Y._scratchBuffer&&r.bufferSource&&(r.bufferSource.onended=null,r.bufferSource.disconnect(0),D))try{r.bufferSource.buffer=Y._scratchBuffer}catch(O){}return r.bufferSource=null,this},_clearSound:function(r){/MSIE |Trident\//.test(Y._navigator&&Y._navigator.userAgent)||(r.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var Ma=function(r){this._parent=r;this.init()};Ma.prototype={init:function(){var r=this._parent;return this._muted=
r._muted,this._loop=r._loop,this._volume=r._volume,this._rate=r._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++Y._counter,r._sounds.push(this),this.create(),this},create:function(){var r=this._parent,D=Y._muted||this._muted||this._parent._muted?0:this._volume;return r._webAudio?(this._node=void 0===Y.ctx.createGain?Y.ctx.createGainNode():Y.ctx.createGain(),this._node.gain.setValueAtTime(D,Y.ctx.currentTime),this._node.paused=!0,this._node.connect(Y.masterGain)):
Y.noAudio||(this._node=Y._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(Y._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=r._src,this._node.preload=!0===r._preload?"auto":r._preload,this._node.volume=D*Y.volume(),this._node.load()),this},reset:function(){var r=this._parent;
return this._muted=r._muted,this._loop=r._loop,this._volume=r._volume,this._rate=r._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++Y._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0);this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var r=this._parent;r._duration=Math.ceil(10*this._node.duration)/10;0===Object.keys(r._sprite).length&&(r._sprite=
{__default:[0,1E3*r._duration]});"loaded"!==r._state&&(r._state="loaded",r._emit("load"),r._loadQueue());this._node.removeEventListener(Y._canPlayEvent,this._loadFn,!1)},_endListener:function(){var r=this._parent;r._duration===1/0&&(r._duration=Math.ceil(10*this._node.duration)/10,r._sprite.__default[1]===1/0&&(r._sprite.__default[1]=1E3*r._duration),r._ended(this));this._node.removeEventListener("ended",this._endFn,!1)}};var Ja={},La=function(r){var D=r._src;if(Ja[D])return r._duration=Ja[D].duration,
void Ga(r);if(/^data:[^;]+;base64,/.test(D)){for(var O=atob(D.split(",")[1]),G=new Uint8Array(O.length),ma=0;ma<O.length;++ma)G[ma]=O.charCodeAt(ma);I(G.buffer,r)}else{var qa=new XMLHttpRequest;qa.open(r._xhr.method,D,!0);qa.withCredentials=r._xhr.withCredentials;qa.responseType="arraybuffer";r._xhr.headers&&Object.keys(r._xhr.headers).forEach(function(ya){qa.setRequestHeader(ya,r._xhr.headers[ya])});qa.onload=function(){var ya=(qa.status+"")[0];if("0"!==ya&&"2"!==ya&&"3"!==ya)return void r._emit("loaderror",
null,"Failed loading audio file with status: "+qa.status+".");I(qa.response,r)};qa.onerror=function(){r._webAudio&&(r._html5=!0,r._webAudio=!1,r._sounds=[],delete Ja[D],r.load())};sa(qa)}},sa=function(r){try{r.send()}catch(D){r.onerror()}},I=function(r,D){var O=function(){D._emit("loaderror",null,"Decoding audio data failed.")},G=function(ma){ma&&D._sounds.length>0?(Ja[D._src]=ma,Ga(D,ma)):O()};"undefined"!=typeof Promise&&1===Y.ctx.decodeAudioData.length?Y.ctx.decodeAudioData(r).then(G).catch(O):
Y.ctx.decodeAudioData(r,G,O)},Ga=function(r,D){D&&!r._duration&&(r._duration=D.duration);0===Object.keys(r._sprite).length&&(r._sprite={__default:[0,1E3*r._duration]});"loaded"!==r._state&&(r._state="loaded",r._emit("load"),r._loadQueue())},m=function(){if(Y.usingWebAudio){try{"undefined"!=typeof AudioContext?Y.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?Y.ctx=new webkitAudioContext:Y.usingWebAudio=!1}catch(O){Y.usingWebAudio=!1}Y.ctx||(Y.usingWebAudio=!1);var r=/iP(hone|od|ad)/.test(Y._navigator&&
Y._navigator.platform),D=Y._navigator&&Y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);D=D?parseInt(D[1],10):null;r&&D&&D<9&&(r=/safari/.test(Y._navigator&&Y._navigator.userAgent.toLowerCase()),Y._navigator&&!r&&(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:Y._volume,Y.ctx.currentTime),Y.masterGain.connect(Y.ctx.destination));Y._setup()}};"function"==typeof define&&define.amd&&
define([],function(){return{Howler:Y,Howl:Za}});"undefined"!=typeof exports&&(exports.Howler=Y,exports.Howl=Za);"undefined"!=typeof global?(global.HowlerGlobal=Eb,global.Howler=Y,global.Howl=Za,global.Sound=Ma):"undefined"!=typeof window&&(window.HowlerGlobal=Eb,window.Howler=Y,window.Howl=Za,window.Sound=Ma)}(),!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(Y){if(!this.ctx||!this.ctx.listener)return this;for(var Za=
this._howls.length-1;Za>=0;Za--)this._howls[Za].stereo(Y);return this};HowlerGlobal.prototype.pos=function(Y,Za,Ma){return this.ctx&&this.ctx.listener?(Za="number"!=typeof Za?this._pos[1]:Za,Ma="number"!=typeof Ma?this._pos[2]:Ma,"number"!=typeof Y?this._pos:(this._pos=[Y,Za,Ma],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],
Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this};HowlerGlobal.prototype.orientation=function(Y,Za,Ma,Ja,La,sa){if(!this.ctx||!this.ctx.listener)return this;var I=this._orientation;return Za="number"!=typeof Za?I[1]:Za,Ma="number"!=typeof Ma?I[2]:Ma,Ja="number"!=typeof Ja?I[3]:Ja,La="number"!=typeof La?I[4]:La,sa="number"!=typeof sa?I[5]:sa,"number"!=typeof Y?I:(this._orientation=[Y,Za,Ma,Ja,La,sa],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(Y,
Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(Za,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(Ma,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(Ja,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(La,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(sa,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(Y,Za,Ma,Ja,La,sa),this)};Howl.prototype.init=function(Y){return function(Za){return this._orientation=
Za.orientation||[1,0,0],this._stereo=Za.stereo||null,this._pos=Za.pos||null,this._pannerAttr={coneInnerAngle:void 0!==Za.coneInnerAngle?Za.coneInnerAngle:360,coneOuterAngle:void 0!==Za.coneOuterAngle?Za.coneOuterAngle:360,coneOuterGain:void 0!==Za.coneOuterGain?Za.coneOuterGain:0,distanceModel:void 0!==Za.distanceModel?Za.distanceModel:"inverse",maxDistance:void 0!==Za.maxDistance?Za.maxDistance:1E4,panningModel:void 0!==Za.panningModel?Za.panningModel:"HRTF",refDistance:void 0!==Za.refDistance?Za.refDistance:
1,rolloffFactor:void 0!==Za.rolloffFactor?Za.rolloffFactor:1},this._onstereo=Za.onstereo?[{fn:Za.onstereo}]:[],this._onpos=Za.onpos?[{fn:Za.onpos}]:[],this._onorientation=Za.onorientation?[{fn:Za.onorientation}]:[],Y.call(this,Za)}}(Howl.prototype.init);Howl.prototype.stereo=function(Y,Za){var Ma=this;if(!Ma._webAudio)return Ma;if("loaded"!==Ma._state)return Ma._queue.push({event:"stereo",action:function(){Ma.stereo(Y,Za)}}),Ma;var Ja=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===
Za){if("number"!=typeof Y)return Ma._stereo;Ma._stereo=Y;Ma._pos=[Y,0,0]}for(var La=Ma._getSoundIds(Za),sa=0;sa<La.length;sa++){var I=Ma._soundById(La[sa]);if(I){if("number"!=typeof Y)return I._stereo;I._stereo=Y;I._pos=[Y,0,0];I._node&&(I._pannerAttr.panningModel="equalpower",I._panner&&I._panner.pan||Eb(I,Ja),"spatial"===Ja?void 0!==I._panner.positionX?(I._panner.positionX.setValueAtTime(Y,Howler.ctx.currentTime),I._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),I._panner.positionZ.setValueAtTime(0,
Howler.ctx.currentTime)):I._panner.setPosition(Y,0,0):I._panner.pan.setValueAtTime(Y,Howler.ctx.currentTime));Ma._emit("stereo",I._id)}}return Ma};Howl.prototype.pos=function(Y,Za,Ma,Ja){var La=this;if(!La._webAudio)return La;if("loaded"!==La._state)return La._queue.push({event:"pos",action:function(){La.pos(Y,Za,Ma,Ja)}}),La;if(Za="number"!=typeof Za?0:Za,Ma="number"!=typeof Ma?-.5:Ma,void 0===Ja){if("number"!=typeof Y)return La._pos;La._pos=[Y,Za,Ma]}for(var sa=La._getSoundIds(Ja),I=0;I<sa.length;I++){var Ga=
La._soundById(sa[I]);if(Ga){if("number"!=typeof Y)return Ga._pos;Ga._pos=[Y,Za,Ma];Ga._node&&(Ga._panner&&!Ga._panner.pan||Eb(Ga,"spatial"),void 0!==Ga._panner.positionX?(Ga._panner.positionX.setValueAtTime(Y,Howler.ctx.currentTime),Ga._panner.positionY.setValueAtTime(Za,Howler.ctx.currentTime),Ga._panner.positionZ.setValueAtTime(Ma,Howler.ctx.currentTime)):Ga._panner.setPosition(Y,Za,Ma));La._emit("pos",Ga._id)}}return La};Howl.prototype.orientation=function(Y,Za,Ma,Ja){var La=this;if(!La._webAudio)return La;
if("loaded"!==La._state)return La._queue.push({event:"orientation",action:function(){La.orientation(Y,Za,Ma,Ja)}}),La;if(Za="number"!=typeof Za?La._orientation[1]:Za,Ma="number"!=typeof Ma?La._orientation[2]:Ma,void 0===Ja){if("number"!=typeof Y)return La._orientation;La._orientation=[Y,Za,Ma]}for(var sa=La._getSoundIds(Ja),I=0;I<sa.length;I++){var Ga=La._soundById(sa[I]);if(Ga){if("number"!=typeof Y)return Ga._orientation;Ga._orientation=[Y,Za,Ma];Ga._node&&(Ga._panner||(Ga._pos||(Ga._pos=La._pos||
[0,0,-.5]),Eb(Ga,"spatial")),void 0!==Ga._panner.orientationX?(Ga._panner.orientationX.setValueAtTime(Y,Howler.ctx.currentTime),Ga._panner.orientationY.setValueAtTime(Za,Howler.ctx.currentTime),Ga._panner.orientationZ.setValueAtTime(Ma,Howler.ctx.currentTime)):Ga._panner.setOrientation(Y,Za,Ma));La._emit("orientation",Ga._id)}}return La};Howl.prototype.pannerAttr=function(){var Y,Za,Ma=arguments;if(!this._webAudio)return this;if(0===Ma.length)return this._pannerAttr;if(1===Ma.length){if("object"!=
typeof Ma[0])return Za=this._soundById(parseInt(Ma[0],10)),Za?Za._pannerAttr:this._pannerAttr;var Ja=Ma[0];void 0===Y&&(Ja.pannerAttr||(Ja.pannerAttr={coneInnerAngle:Ja.coneInnerAngle,coneOuterAngle:Ja.coneOuterAngle,coneOuterGain:Ja.coneOuterGain,distanceModel:Ja.distanceModel,maxDistance:Ja.maxDistance,refDistance:Ja.refDistance,rolloffFactor:Ja.rolloffFactor,panningModel:Ja.panningModel}),this._pannerAttr={coneInnerAngle:void 0!==Ja.pannerAttr.coneInnerAngle?Ja.pannerAttr.coneInnerAngle:this._coneInnerAngle,
coneOuterAngle:void 0!==Ja.pannerAttr.coneOuterAngle?Ja.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==Ja.pannerAttr.coneOuterGain?Ja.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==Ja.pannerAttr.distanceModel?Ja.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==Ja.pannerAttr.maxDistance?Ja.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==Ja.pannerAttr.refDistance?Ja.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==
Ja.pannerAttr.rolloffFactor?Ja.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==Ja.pannerAttr.panningModel?Ja.pannerAttr.panningModel:this._panningModel})}else 2===Ma.length&&(Ja=Ma[0],Y=parseInt(Ma[1],10));Y=this._getSoundIds(Y);for(Ma=0;Ma<Y.length;Ma++)if(Za=this._soundById(Y[Ma])){var La=Za._pannerAttr;La={coneInnerAngle:void 0!==Ja.coneInnerAngle?Ja.coneInnerAngle:La.coneInnerAngle,coneOuterAngle:void 0!==Ja.coneOuterAngle?Ja.coneOuterAngle:La.coneOuterAngle,coneOuterGain:void 0!==
Ja.coneOuterGain?Ja.coneOuterGain:La.coneOuterGain,distanceModel:void 0!==Ja.distanceModel?Ja.distanceModel:La.distanceModel,maxDistance:void 0!==Ja.maxDistance?Ja.maxDistance:La.maxDistance,refDistance:void 0!==Ja.refDistance?Ja.refDistance:La.refDistance,rolloffFactor:void 0!==Ja.rolloffFactor?Ja.rolloffFactor:La.rolloffFactor,panningModel:void 0!==Ja.panningModel?Ja.panningModel:La.panningModel};var sa=Za._panner;sa||(Za._pos||(Za._pos=this._pos||[0,0,-.5]),Eb(Za,"spatial"),sa=Za._panner);sa.coneInnerAngle=
La.coneInnerAngle;sa.coneOuterAngle=La.coneOuterAngle;sa.coneOuterGain=La.coneOuterGain;sa.distanceModel=La.distanceModel;sa.maxDistance=La.maxDistance;sa.refDistance=La.refDistance;sa.rolloffFactor=La.rolloffFactor;sa.panningModel=La.panningModel}return this};Sound.prototype.init=function(Y){return function(){var Za=this._parent;this._orientation=Za._orientation;this._stereo=Za._stereo;this._pos=Za._pos;this._pannerAttr=Za._pannerAttr;Y.call(this);this._stereo?Za.stereo(this._stereo):this._pos&&
Za.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(Y){return function(){var Za=this._parent;return this._orientation=Za._orientation,this._stereo=Za._stereo,this._pos=Za._pos,this._pannerAttr=Za._pannerAttr,this._stereo?Za.stereo(this._stereo):this._pos?Za.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,Za._refreshBuffer(this)),Y.call(this)}}(Sound.prototype.reset);var Eb=
function(Y,Za){"spatial"===(Za||"spatial")?(Y._panner=Howler.ctx.createPanner(),Y._panner.coneInnerAngle=Y._pannerAttr.coneInnerAngle,Y._panner.coneOuterAngle=Y._pannerAttr.coneOuterAngle,Y._panner.coneOuterGain=Y._pannerAttr.coneOuterGain,Y._panner.distanceModel=Y._pannerAttr.distanceModel,Y._panner.maxDistance=Y._pannerAttr.maxDistance,Y._panner.refDistance=Y._pannerAttr.refDistance,Y._panner.rolloffFactor=Y._pannerAttr.rolloffFactor,Y._panner.panningModel=Y._pannerAttr.panningModel,void 0!==Y._panner.positionX?
(Y._panner.positionX.setValueAtTime(Y._pos[0],Howler.ctx.currentTime),Y._panner.positionY.setValueAtTime(Y._pos[1],Howler.ctx.currentTime),Y._panner.positionZ.setValueAtTime(Y._pos[2],Howler.ctx.currentTime)):Y._panner.setPosition(Y._pos[0],Y._pos[1],Y._pos[2]),void 0!==Y._panner.orientationX?(Y._panner.orientationX.setValueAtTime(Y._orientation[0],Howler.ctx.currentTime),Y._panner.orientationY.setValueAtTime(Y._orientation[1],Howler.ctx.currentTime),Y._panner.orientationZ.setValueAtTime(Y._orientation[2],
Howler.ctx.currentTime)):Y._panner.setOrientation(Y._orientation[0],Y._orientation[1],Y._orientation[2])):(Y._panner=Howler.ctx.createStereoPanner(),Y._panner.pan.setValueAtTime(Y._stereo,Howler.ctx.currentTime));Y._panner.connect(Y._node);Y._paused||Y._parent.pause(Y._id,!0).play(Y._id,!0)}}());
!function(Eb){"object"==typeof exports&&"undefined"!=typeof module?module.exports=Eb():"function"==typeof define&&define.amd?define([],Eb):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=Eb()}(function(){return function Ja(Y,Za,Ma){function La(Ga,m){if(!Za[Ga]){if(!Y[Ga]){var r="function"==typeof require&&require;if(!m&&r)return r(Ga,!0);if(sa)return sa(Ga,!0);m=Error("Cannot find module '"+Ga+"'");throw m.code="MODULE_NOT_FOUND",m;}m=
Za[Ga]={exports:{}};Y[Ga][0].call(m.exports,function(D){var O=Y[Ga][1][D];return La(O?O:D)},m,m.exports,Ja,Y,Za,Ma)}return Za[Ga].exports}for(var sa="function"==typeof require&&require,I=0;I<Ma.length;I++)La(Ma[I]);return La}({1:[function(Y,Za,Ma){function Ja(ya){if(!(this instanceof Ja))return new Ja(ya);ya=this.options=I.assign({level:G,method:qa,chunkSize:16384,windowBits:15,memLevel:8,strategy:ma,to:""},ya||{});ya.raw&&ya.windowBits>0?ya.windowBits=-ya.windowBits:ya.gzip&&ya.windowBits>0&&ya.windowBits<
16&&(ya.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new r;this.strm.avail_out=0;var Ha=sa.deflateInit2(this.strm,ya.level,ya.method,ya.windowBits,ya.memLevel,ya.strategy);if(Ha!==O)throw Error(m[Ha]);if(ya.header&&sa.deflateSetHeader(this.strm,ya.header),ya.dictionary){var Yb;if(Yb="string"==typeof ya.dictionary?Ga.string2buf(ya.dictionary):"[object ArrayBuffer]"===D.call(ya.dictionary)?new Uint8Array(ya.dictionary):ya.dictionary,Ha=sa.deflateSetDictionary(this.strm,
Yb),Ha!==O)throw Error(m[Ha]);this._dict_set=!0}}function La(ya,Ha){Ha=new Ja(Ha);if(Ha.push(ya,!0),Ha.err)throw Ha.msg;return Ha.result}var sa=Y("./zlib/deflate"),I=Y("./utils/common"),Ga=Y("./utils/strings"),m=Y("./zlib/messages"),r=Y("./zlib/zstream"),D=Object.prototype.toString,O=0,G=-1,ma=0,qa=8;Ja.prototype.push=function(ya,Ha){var Yb,qb=this.strm,na=this.options.chunkSize;if(this.ended)return!1;Ha=Ha===~~Ha?Ha:Ha===!0?4:0;"string"==typeof ya?qb.input=Ga.string2buf(ya):"[object ArrayBuffer]"===
D.call(ya)?qb.input=new Uint8Array(ya):qb.input=ya;qb.next_in=0;qb.avail_in=qb.input.length;do{if(0===qb.avail_out&&(qb.output=new I.Buf8(na),qb.next_out=0,qb.avail_out=na),Yb=sa.deflate(qb,Ha),Yb!==1&&Yb!==O)return this.onEnd(Yb),this.ended=!0,!1;0!==qb.avail_out&&(0!==qb.avail_in||Ha!==4&&Ha!==2)||("string"===this.options.to?this.onData(Ga.buf2binstring(I.shrinkBuf(qb.output,qb.next_out))):this.onData(I.shrinkBuf(qb.output,qb.next_out)))}while((qb.avail_in>0||0===qb.avail_out)&&Yb!==1);return Ha===
4?(Yb=sa.deflateEnd(this.strm),this.onEnd(Yb),this.ended=!0,Yb===O):Ha!==2||(this.onEnd(O),qb.avail_out=0,!0)};Ja.prototype.onData=function(ya){this.chunks.push(ya)};Ja.prototype.onEnd=function(ya){ya===O&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=I.flattenChunks(this.chunks));this.chunks=[];this.err=ya;this.msg=this.strm.msg};Ma.Deflate=Ja;Ma.deflate=La;Ma.deflateRaw=function(ya,Ha){return Ha=Ha||{},Ha.raw=!0,La(ya,Ha)};Ma.gzip=function(ya,Ha){return Ha=Ha||{},Ha.gzip=
!0,La(ya,Ha)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(Y,Za,Ma){function Ja(ma){if(!(this instanceof Ja))return new Ja(ma);var qa=this.options=I.assign({chunkSize:16384,windowBits:0,to:""},ma||{});qa.raw&&qa.windowBits>=0&&qa.windowBits<16&&(qa.windowBits=-qa.windowBits,0===qa.windowBits&&(qa.windowBits=-15));!(qa.windowBits>=0&&qa.windowBits<16)||ma&&ma.windowBits||(qa.windowBits+=32);qa.windowBits>15&&qa.windowBits<48&&0===
(15&qa.windowBits)&&(qa.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new D;this.strm.avail_out=0;ma=sa.inflateInit2(this.strm,qa.windowBits);if(ma!==m.Z_OK)throw Error(r[ma]);this.header=new O;sa.inflateGetHeader(this.strm,this.header)}function La(ma,qa){qa=new Ja(qa);if(qa.push(ma,!0),qa.err)throw qa.msg;return qa.result}var sa=Y("./zlib/inflate"),I=Y("./utils/common"),Ga=Y("./utils/strings"),m=Y("./zlib/constants"),r=Y("./zlib/messages"),D=Y("./zlib/zstream"),O=
Y("./zlib/gzheader"),G=Object.prototype.toString;Ja.prototype.push=function(ma,qa){var ya,Ha,Yb,qb,na,$b=this.strm,gb=this.options.chunkSize,Tb=this.options.dictionary,ha=!1;if(this.ended)return!1;qa=qa===~~qa?qa:qa===!0?m.Z_FINISH:m.Z_NO_FLUSH;"string"==typeof ma?$b.input=Ga.binstring2buf(ma):"[object ArrayBuffer]"===G.call(ma)?$b.input=new Uint8Array(ma):$b.input=ma;$b.next_in=0;$b.avail_in=$b.input.length;do{if(0===$b.avail_out&&($b.output=new I.Buf8(gb),$b.next_out=0,$b.avail_out=gb),ya=sa.inflate($b,
m.Z_NO_FLUSH),ya===m.Z_NEED_DICT&&Tb&&(na="string"==typeof Tb?Ga.string2buf(Tb):"[object ArrayBuffer]"===G.call(Tb)?new Uint8Array(Tb):Tb,ya=sa.inflateSetDictionary(this.strm,na)),ya===m.Z_BUF_ERROR&&ha===!0&&(ya=m.Z_OK,ha=!1),ya!==m.Z_STREAM_END&&ya!==m.Z_OK)return this.onEnd(ya),this.ended=!0,!1;$b.next_out&&(0!==$b.avail_out&&ya!==m.Z_STREAM_END&&(0!==$b.avail_in||qa!==m.Z_FINISH&&qa!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(Ha=Ga.utf8border($b.output,$b.next_out),Yb=$b.next_out-Ha,qb=Ga.buf2string($b.output,
Ha),$b.next_out=Yb,$b.avail_out=gb-Yb,Yb&&I.arraySet($b.output,$b.output,Ha,Yb,0),this.onData(qb)):this.onData(I.shrinkBuf($b.output,$b.next_out))));0===$b.avail_in&&0===$b.avail_out&&(ha=!0)}while(($b.avail_in>0||0===$b.avail_out)&&ya!==m.Z_STREAM_END);return ya===m.Z_STREAM_END&&(qa=m.Z_FINISH),qa===m.Z_FINISH?(ya=sa.inflateEnd(this.strm),this.onEnd(ya),this.ended=!0,ya===m.Z_OK):qa!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),$b.avail_out=0,!0)};Ja.prototype.onData=function(ma){this.chunks.push(ma)};
Ja.prototype.onEnd=function(ma){ma===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=I.flattenChunks(this.chunks));this.chunks=[];this.err=ma;this.msg=this.strm.msg};Ma.Inflate=Ja;Ma.inflate=La;Ma.inflateRaw=function(ma,qa){return qa=qa||{},qa.raw=!0,La(ma,qa)};Ma.ungzip=La},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(Y,Za,Ma){Y="undefined"!=typeof Uint8Array&&
"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;Ma.assign=function(sa){for(var I=Array.prototype.slice.call(arguments,1);I.length;){var Ga=I.shift();if(Ga){if("object"!=typeof Ga)throw new TypeError(Ga+"must be non-object");for(var m in Ga)Ga.hasOwnProperty(m)&&(sa[m]=Ga[m])}}return sa};Ma.shrinkBuf=function(sa,I){return sa.length===I?sa:sa.subarray?sa.subarray(0,I):(sa.length=I,sa)};var Ja={arraySet:function(sa,I,Ga,m,r){if(I.subarray&&sa.subarray)return void sa.set(I.subarray(Ga,
Ga+m),r);for(var D=0;D<m;D++)sa[r+D]=I[Ga+D]},flattenChunks:function(sa){var I,Ga;var m=Ga=0;for(I=sa.length;m<I;m++)Ga+=sa[m].length;var r=new Uint8Array(Ga);m=Ga=0;for(I=sa.length;m<I;m++){var D=sa[m];r.set(D,Ga);Ga+=D.length}return r}},La={arraySet:function(sa,I,Ga,m,r){for(var D=0;D<m;D++)sa[r+D]=I[Ga+D]},flattenChunks:function(sa){return[].concat.apply([],sa)}};Ma.setTyped=function(sa){sa?(Ma.Buf8=Uint8Array,Ma.Buf16=Uint16Array,Ma.Buf32=Int32Array,Ma.assign(Ma,Ja)):(Ma.Buf8=Array,Ma.Buf16=Array,
Ma.Buf32=Array,Ma.assign(Ma,La))};Ma.setTyped(Y)},{}],4:[function(Y,Za,Ma){function Ja(m,r){if(r<65537&&(m.subarray&&I||!m.subarray&&sa))return String.fromCharCode.apply(null,La.shrinkBuf(m,r));for(var D="",O=0;O<r;O++)D+=String.fromCharCode(m[O]);return D}var La=Y("./common"),sa=!0,I=!0;try{String.fromCharCode.apply(null,[0])}catch(m){sa=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){I=!1}var Ga=new La.Buf8(256);for(Y=0;Y<256;Y++)Ga[Y]=Y>=252?6:Y>=248?5:Y>=240?4:Y>=224?3:Y>=192?
2:1;Ga[254]=Ga[254]=1;Ma.string2buf=function(m){var r,D,O,G=m.length,ma=0;for(D=0;D<G;D++){var qa=m.charCodeAt(D);55296===(64512&qa)&&D+1<G&&(r=m.charCodeAt(D+1),56320===(64512&r)&&(qa=65536+(qa-55296<<10)+(r-56320),D++));ma+=qa<128?1:qa<2048?2:qa<65536?3:4}var ya=new La.Buf8(ma);for(D=O=0;O<ma;D++)qa=m.charCodeAt(D),55296===(64512&qa)&&D+1<G&&(r=m.charCodeAt(D+1),56320===(64512&r)&&(qa=65536+(qa-55296<<10)+(r-56320),D++)),qa<128?ya[O++]=qa:qa<2048?(ya[O++]=192|qa>>>6,ya[O++]=128|63&qa):qa<65536?
(ya[O++]=224|qa>>>12,ya[O++]=128|qa>>>6&63,ya[O++]=128|63&qa):(ya[O++]=240|qa>>>18,ya[O++]=128|qa>>>12&63,ya[O++]=128|qa>>>6&63,ya[O++]=128|63&qa);return ya};Ma.buf2binstring=function(m){return Ja(m,m.length)};Ma.binstring2buf=function(m){for(var r=new La.Buf8(m.length),D=0,O=r.length;D<O;D++)r[D]=m.charCodeAt(D);return r};Ma.buf2string=function(m,r){var D,O,G,ma=r||m.length,qa=Array(2*ma);for(r=D=0;r<ma;)if(O=m[r++],O<128)qa[D++]=O;else if(G=Ga[O],G>4)qa[D++]=65533,r+=G-1;else{for(O&=2===G?31:3===
G?15:7;G>1&&r<ma;)O=O<<6|63&m[r++],G--;G>1?qa[D++]=65533:O<65536?qa[D++]=O:(O-=65536,qa[D++]=55296|O>>10&1023,qa[D++]=56320|1023&O)}return Ja(qa,D)};Ma.utf8border=function(m,r){var D;r=r||m.length;r>m.length&&(r=m.length);for(D=r-1;D>=0&&128===(192&m[D]);)D--;return D<0?r:0===D?r:D+Ga[m[D]]>r?D:r}},{"./common":3}],5:[function(Y,Za,Ma){Za.exports=function(Ja,La,sa,I){var Ga=65535&Ja|0;Ja=Ja>>>16&65535|0;for(var m;0!==sa;){m=sa>2E3?2E3:sa;sa-=m;do Ga=Ga+La[I++]|0,Ja=Ja+Ga|0;while(--m);Ga%=65521;Ja%=
65521}return Ga|Ja<<16|0}},{}],6:[function(Y,Za,Ma){Za.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(Y,Za,Ma){var Ja=function(){for(var La,
sa=[],I=0;I<256;I++){La=I;for(var Ga=0;Ga<8;Ga++)La=1&La?3988292384^La>>>1:La>>>1;sa[I]=La}return sa}();Za.exports=function(La,sa,I,Ga){I=Ga+I;for(La^=-1;Ga<I;Ga++)La=La>>>8^Ja[255&(La^sa[Ga])];return La^-1}},{}],8:[function(Y,Za,Ma){function Ja(K,ab){return K.msg=Tb[ab],ab}function La(K){for(var ab=K.length;--ab>=0;)K[ab]=0}function sa(K){var ab=K.state,P=ab.pending;P>K.avail_out&&(P=K.avail_out);0!==P&&(qb.arraySet(K.output,ab.pending_buf,ab.pending_out,P,K.next_out),K.next_out+=P,ab.pending_out+=
P,K.total_out+=P,K.avail_out-=P,ab.pending-=P,0===ab.pending&&(ab.pending_out=0))}function I(K,ab){na._tr_flush_block(K,K.block_start>=0?K.block_start:-1,K.strstart-K.block_start,ab);K.block_start=K.strstart;sa(K.strm)}function Ga(K,ab){K.pending_buf[K.pending++]=ab}function m(K,ab){K.pending_buf[K.pending++]=ab>>>8&255;K.pending_buf[K.pending++]=255&ab}function r(K,ab){var P,M,Ca=K.max_chain_length,Ta=K.strstart,eb=K.prev_length,Ya=K.nice_match,Dc=K.strstart>K.w_size-Z?K.strstart-(K.w_size-Z):0,
Db=K.window,yc=K.w_mask,Ac=K.prev,Pg=K.strstart+ec,$h=Db[Ta+eb-1],jh=Db[Ta+eb];K.prev_length>=K.good_match&&(Ca>>=2);Ya>K.lookahead&&(Ya=K.lookahead);do if(P=ab,Db[P+eb]===jh&&Db[P+eb-1]===$h&&Db[P]===Db[Ta]&&Db[++P]===Db[Ta+1]){Ta+=2;for(P++;Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Db[++Ta]===Db[++P]&&Ta<Pg;);if(M=ec-(Pg-Ta),Ta=Pg-ec,M>eb){if(K.match_start=ab,eb=M,M>=Ya)break;$h=Db[Ta+eb-1];jh=Db[Ta+
eb]}}while((ab=Ac[ab&yc])>Dc&&0!==--Ca);return eb<=K.lookahead?eb:K.lookahead}function D(K){var ab,P,M=K.w_size;do{if(P=K.window_size-K.lookahead-K.strstart,K.strstart>=M+(M-Z)){qb.arraySet(K.window,K.window,M,M,0);K.match_start-=M;K.strstart-=M;K.block_start-=M;var Ca=ab=K.hash_size;do{var Ta=K.head[--Ca];K.head[Ca]=Ta>=M?Ta-M:0}while(--ab);Ca=ab=M;do Ta=K.prev[--Ca],K.prev[Ca]=Ta>=M?Ta-M:0;while(--ab);P+=M}if(0===K.strm.avail_in)break;Ca=K.strm;Ta=K.window;var eb=K.strstart+K.lookahead,Ya=Ca.avail_in;
if(ab=(Ya>P&&(Ya=P),0===Ya?0:(Ca.avail_in-=Ya,qb.arraySet(Ta,Ca.input,Ca.next_in,Ya,eb),1===Ca.state.wrap?Ca.adler=$b(Ca.adler,Ta,Ya,eb):2===Ca.state.wrap&&(Ca.adler=gb(Ca.adler,Ta,Ya,eb)),Ca.next_in+=Ya,Ca.total_in+=Ya,Ya)),K.lookahead+=ab,K.lookahead+K.insert>=L)for(P=K.strstart-K.insert,K.ins_h=K.window[P],K.ins_h=(K.ins_h<<K.hash_shift^K.window[P+1])&K.hash_mask;K.insert&&(K.ins_h=(K.ins_h<<K.hash_shift^K.window[P+L-1])&K.hash_mask,K.prev[P&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=P,P++,K.insert--,
!(K.lookahead+K.insert<L)););}while(K.lookahead<Z&&0!==K.strm.avail_in)}function O(K,ab){for(var P,M;;){if(K.lookahead<Z){if(D(K),K.lookahead<Z&&ab===ha)return ta;if(0===K.lookahead)break}if(P=0,K.lookahead>=L&&(K.ins_h=(K.ins_h<<K.hash_shift^K.window[K.strstart+L-1])&K.hash_mask,P=K.prev[K.strstart&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=K.strstart),0!==P&&K.strstart-P<=K.w_size-Z&&(K.match_length=r(K,P)),K.match_length>=L)if(M=na._tr_tally(K,K.strstart-K.match_start,K.match_length-L),K.lookahead-=
K.match_length,K.match_length<=K.max_lazy_match&&K.lookahead>=L){K.match_length--;do K.strstart++,K.ins_h=(K.ins_h<<K.hash_shift^K.window[K.strstart+L-1])&K.hash_mask,P=K.prev[K.strstart&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=K.strstart;while(0!==--K.match_length);K.strstart++}else K.strstart+=K.match_length,K.match_length=0,K.ins_h=K.window[K.strstart],K.ins_h=(K.ins_h<<K.hash_shift^K.window[K.strstart+1])&K.hash_mask;else M=na._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++;if(M&&
(I(K,!1),0===K.strm.avail_out))return ta}return K.insert=K.strstart<L-1?K.strstart:L-1,ab===Na?(I(K,!0),0===K.strm.avail_out?cb:Gd):K.last_lit&&(I(K,!1),0===K.strm.avail_out)?ta:hd}function G(K,ab){for(var P,M,Ca;;){if(K.lookahead<Z){if(D(K),K.lookahead<Z&&ab===ha)return ta;if(0===K.lookahead)break}if(P=0,K.lookahead>=L&&(K.ins_h=(K.ins_h<<K.hash_shift^K.window[K.strstart+L-1])&K.hash_mask,P=K.prev[K.strstart&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=K.strstart),K.prev_length=K.match_length,K.prev_match=
K.match_start,K.match_length=L-1,0!==P&&K.prev_length<K.max_lazy_match&&K.strstart-P<=K.w_size-Z&&(K.match_length=r(K,P),K.match_length<=5&&(K.strategy===lb||K.match_length===L&&K.strstart-K.match_start>4096)&&(K.match_length=L-1)),K.prev_length>=L&&K.match_length<=K.prev_length){Ca=K.strstart+K.lookahead-L;M=na._tr_tally(K,K.strstart-1-K.prev_match,K.prev_length-L);K.lookahead-=K.prev_length-1;K.prev_length-=2;do++K.strstart<=Ca&&(K.ins_h=(K.ins_h<<K.hash_shift^K.window[K.strstart+L-1])&K.hash_mask,
P=K.prev[K.strstart&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=K.strstart);while(0!==--K.prev_length);if(K.match_available=0,K.match_length=L-1,K.strstart++,M&&(I(K,!1),0===K.strm.avail_out))return ta}else if(K.match_available){if(M=na._tr_tally(K,0,K.window[K.strstart-1]),M&&I(K,!1),K.strstart++,K.lookahead--,0===K.strm.avail_out)return ta}else K.match_available=1,K.strstart++,K.lookahead--}return K.match_available&&(na._tr_tally(K,0,K.window[K.strstart-1]),K.match_available=0),K.insert=K.strstart<
L-1?K.strstart:L-1,ab===Na?(I(K,!0),0===K.strm.avail_out?cb:Gd):K.last_lit&&(I(K,!1),0===K.strm.avail_out)?ta:hd}function ma(K,ab,P,M,Ca){this.good_length=K;this.max_lazy=ab;this.nice_length=P;this.max_chain=M;this.func=Ca}function qa(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=je;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=
this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new qb.Buf16(2*vd);this.dyn_dtree=new qb.Buf16(2*(2*X+1));this.bl_tree=new qb.Buf16(2*(2*V+1));La(this.dyn_ltree);La(this.dyn_dtree);La(this.bl_tree);this.bl_desc=
this.d_desc=this.l_desc=null;this.bl_count=new qb.Buf16(A+1);this.heap=new qb.Buf16(2*sb+1);La(this.heap);this.heap_max=this.heap_len=0;this.depth=new qb.Buf16(2*sb+1);La(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function ya(K){var ab;return K&&K.state?(K.total_in=K.total_out=0,K.data_type=Fb,ab=K.state,ab.pending=0,ab.pending_out=0,ab.wrap<0&&(ab.wrap=-ab.wrap),ab.status=ab.wrap?nb:Aa,K.adler=
2===ab.wrap?0:1,ab.last_flush=ha,na._tr_init(ab),Xa):Ja(K,ea)}function Ha(K){var ab=ya(K);ab===Xa&&(K=K.state,K.window_size=2*K.w_size,La(K.head),K.max_lazy_match=Xc[K.level].max_lazy,K.good_match=Xc[K.level].good_length,K.nice_match=Xc[K.level].nice_length,K.max_chain_length=Xc[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=L-1,K.match_available=0,K.ins_h=0);return ab}function Yb(K,ab,P,M,Ca,Ta){if(!K)return ea;var eb=1;if(ab===Da&&(ab=6),M<
0?(eb=0,M=-M):M>15&&(eb=2,M-=16),Ca<1||Ca>oc||P!==je||M<8||M>15||ab<0||ab>9||Ta<0||Ta>za)return Ja(K,ea);8===M&&(M=9);var Ya=new qa;return K.state=Ya,Ya.strm=K,Ya.wrap=eb,Ya.gzhead=null,Ya.w_bits=M,Ya.w_size=1<<Ya.w_bits,Ya.w_mask=Ya.w_size-1,Ya.hash_bits=Ca+7,Ya.hash_size=1<<Ya.hash_bits,Ya.hash_mask=Ya.hash_size-1,Ya.hash_shift=~~((Ya.hash_bits+L-1)/L),Ya.window=new qb.Buf8(2*Ya.w_size),Ya.head=new qb.Buf16(Ya.hash_size),Ya.prev=new qb.Buf16(Ya.w_size),Ya.lit_bufsize=1<<Ca+6,Ya.pending_buf_size=
4*Ya.lit_bufsize,Ya.pending_buf=new qb.Buf8(Ya.pending_buf_size),Ya.d_buf=1*Ya.lit_bufsize,Ya.l_buf=3*Ya.lit_bufsize,Ya.level=ab,Ya.strategy=Ta,Ya.method=P,Ha(K)}var qb=Y("../utils/common"),na=Y("./trees"),$b=Y("./adler32"),gb=Y("./crc32"),Tb=Y("./messages"),ha=0,Na=4,Xa=0,ea=-2,Da=-1,lb=1,za=4,Fb=2,je=8,oc=9,sb=286,X=30,V=19,vd=2*sb+1,A=15,L=3,ec=258,Z=ec+L+1,nb=42,Aa=113,ta=1,hd=2,cb=3,Gd=4;var Xc=[new ma(0,0,0,0,function(K,ab){var P=65535;for(P>K.pending_buf_size-5&&(P=K.pending_buf_size-5);;){if(K.lookahead<=
1){if(D(K),0===K.lookahead&&ab===ha)return ta;if(0===K.lookahead)break}K.strstart+=K.lookahead;K.lookahead=0;var M=K.block_start+P;if((0===K.strstart||K.strstart>=M)&&(K.lookahead=K.strstart-M,K.strstart=M,I(K,!1),0===K.strm.avail_out)||K.strstart-K.block_start>=K.w_size-Z&&(I(K,!1),0===K.strm.avail_out))return ta}return K.insert=0,ab===Na?(I(K,!0),0===K.strm.avail_out?cb:Gd):(K.strstart>K.block_start&&I(K,!1),ta)}),new ma(4,4,8,4,O),new ma(4,5,16,8,O),new ma(4,6,32,32,O),new ma(4,4,16,16,G),new ma(8,
16,32,32,G),new ma(8,16,128,128,G),new ma(8,32,128,256,G),new ma(32,128,258,1024,G),new ma(32,258,258,4096,G)];Ma.deflateInit=function(K,ab){return Yb(K,ab,je,15,8,0)};Ma.deflateInit2=Yb;Ma.deflateReset=Ha;Ma.deflateResetKeep=ya;Ma.deflateSetHeader=function(K,ab){return K&&K.state?2!==K.state.wrap?ea:(K.state.gzhead=ab,Xa):ea};Ma.deflate=function(K,ab){var P,M;if(!K||!K.state||ab>5||ab<0)return K?Ja(K,ea):ea;if(M=K.state,!K.output||!K.input&&0!==K.avail_in||M.status===666&&ab!==Na)return Ja(K,0===
K.avail_out?-5:ea);if(M.strm=K,P=M.last_flush,M.last_flush=ab,M.status===nb)if(2===M.wrap)K.adler=0,Ga(M,31),Ga(M,139),Ga(M,8),M.gzhead?(Ga(M,(M.gzhead.text?1:0)+(M.gzhead.hcrc?2:0)+(M.gzhead.extra?4:0)+(M.gzhead.name?8:0)+(M.gzhead.comment?16:0)),Ga(M,255&M.gzhead.time),Ga(M,M.gzhead.time>>8&255),Ga(M,M.gzhead.time>>16&255),Ga(M,M.gzhead.time>>24&255),Ga(M,9===M.level?2:M.strategy>=2||M.level<2?4:0),Ga(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(Ga(M,255&M.gzhead.extra.length),Ga(M,
M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(K.adler=gb(K.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(Ga(M,0),Ga(M,0),Ga(M,0),Ga(M,0),Ga(M,0),Ga(M,9===M.level?2:M.strategy>=2||M.level<2?4:0),Ga(M,3),M.status=Aa);else{var Ca=je+(M.w_bits-8<<4)<<8;Ca|=(M.strategy>=2||M.level<2?0:M.level<6?1:6===M.level?2:3)<<6;0!==M.strstart&&(Ca|=32);M.status=Aa;m(M,Ca+(31-Ca%31));0!==M.strstart&&(m(M,K.adler>>>16),m(M,65535&K.adler));K.adler=1}if(M.status===69)if(M.gzhead.extra){for(Ca=M.pending;M.gzindex<
(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>Ca&&(K.adler=gb(K.adler,M.pending_buf,M.pending-Ca,Ca)),sa(K),Ca=M.pending,M.pending!==M.pending_buf_size));)Ga(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>Ca&&(K.adler=gb(K.adler,M.pending_buf,M.pending-Ca,Ca));M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){Ca=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&
M.pending>Ca&&(K.adler=gb(K.adler,M.pending_buf,M.pending-Ca,Ca)),sa(K),Ca=M.pending,M.pending===M.pending_buf_size)){var Ta=1;break}Ta=M.gzindex<M.gzhead.name.length?255&M.gzhead.name.charCodeAt(M.gzindex++):0;Ga(M,Ta)}while(0!==Ta);M.gzhead.hcrc&&M.pending>Ca&&(K.adler=gb(K.adler,M.pending_buf,M.pending-Ca,Ca));0===Ta&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){Ca=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>Ca&&(K.adler=gb(K.adler,
M.pending_buf,M.pending-Ca,Ca)),sa(K),Ca=M.pending,M.pending===M.pending_buf_size)){Ta=1;break}Ta=M.gzindex<M.gzhead.comment.length?255&M.gzhead.comment.charCodeAt(M.gzindex++):0;Ga(M,Ta)}while(0!==Ta);M.gzhead.hcrc&&M.pending>Ca&&(K.adler=gb(K.adler,M.pending_buf,M.pending-Ca,Ca));0===Ta&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&sa(K),M.pending+2<=M.pending_buf_size&&(Ga(M,255&K.adler),Ga(M,K.adler>>8&255),K.adler=0,M.status=Aa)):M.status=
Aa),0!==M.pending){if(sa(K),0===K.avail_out)return M.last_flush=-1,Xa}else if(0===K.avail_in&&(ab<<1)-(ab>4?9:0)<=(P<<1)-(P>4?9:0)&&ab!==Na)return Ja(K,-5);if(M.status===666&&0!==K.avail_in)return Ja(K,-5);if(0!==K.avail_in||0!==M.lookahead||ab!==ha&&M.status!==666){if(M.strategy===2)a:{for(var eb;;){if(0===M.lookahead&&(D(M),0===M.lookahead)){if(ab===ha){var Ya=ta;break a}break}if(M.match_length=0,eb=na._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,eb&&(I(M,!1),0===M.strm.avail_out)){Ya=
ta;break a}}Ya=(M.insert=0,ab===Na?(I(M,!0),0===M.strm.avail_out?cb:Gd):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ta:hd)}else if(M.strategy===3)a:{var Dc,Db;for(eb=M.window;;){if(M.lookahead<=ec){if(D(M),M.lookahead<=ec&&ab===ha){Ya=ta;break a}if(0===M.lookahead)break}if(M.match_length=0,M.lookahead>=L&&M.strstart>0&&(Db=M.strstart-1,Dc=eb[Db],Dc===eb[++Db]&&Dc===eb[++Db]&&Dc===eb[++Db])){for(P=M.strstart+ec;Dc===eb[++Db]&&Dc===eb[++Db]&&Dc===eb[++Db]&&Dc===eb[++Db]&&Dc===eb[++Db]&&Dc===eb[++Db]&&
Dc===eb[++Db]&&Dc===eb[++Db]&&Db<P;);M.match_length=ec-(P-Db);M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=L?(Ya=na._tr_tally(M,1,M.match_length-L),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(Ya=na._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),Ya&&(I(M,!1),0===M.strm.avail_out)){Ya=ta;break a}}Ya=(M.insert=0,ab===Na?(I(M,!0),0===M.strm.avail_out?cb:Gd):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ta:hd)}else Ya=Xc[M.level].func(M,
ab);if(Ya!==cb&&Ya!==Gd||(M.status=666),Ya===ta||Ya===cb)return 0===K.avail_out&&(M.last_flush=-1),Xa;if(Ya===hd&&(ab===1?na._tr_align(M):ab!==5&&(na._tr_stored_block(M,0,0,!1),ab===3&&(La(M.head),0===M.lookahead&&(M.strstart=0,M.block_start=0,M.insert=0))),sa(K),0===K.avail_out))return M.last_flush=-1,Xa}return ab!==Na?Xa:M.wrap<=0?1:(2===M.wrap?(Ga(M,255&K.adler),Ga(M,K.adler>>8&255),Ga(M,K.adler>>16&255),Ga(M,K.adler>>24&255),Ga(M,255&K.total_in),Ga(M,K.total_in>>8&255),Ga(M,K.total_in>>16&255),
Ga(M,K.total_in>>24&255)):(m(M,K.adler>>>16),m(M,65535&K.adler)),sa(K),M.wrap>0&&(M.wrap=-M.wrap),0!==M.pending?Xa:1)};Ma.deflateEnd=function(K){var ab;return K&&K.state?(ab=K.state.status,ab!==nb&&ab!==69&&ab!==73&&ab!==91&&ab!==103&&ab!==Aa&&ab!==666?Ja(K,ea):(K.state=null,ab===Aa?Ja(K,-3):Xa)):ea};Ma.deflateSetDictionary=function(K,ab){var P,M,Ca;var Ta=ab.length;if(!K||!K.state||(P=K.state,M=P.wrap,2===M||1===M&&P.status!==nb||P.lookahead))return ea;1===M&&(K.adler=$b(K.adler,ab,Ta,0));P.wrap=
0;Ta>=P.w_size&&(0===M&&(La(P.head),P.strstart=0,P.block_start=0,P.insert=0),Ca=new qb.Buf8(P.w_size),qb.arraySet(Ca,ab,Ta-P.w_size,P.w_size,0),ab=Ca,Ta=P.w_size);Ca=K.avail_in;var eb=K.next_in;var Ya=K.input;K.avail_in=Ta;K.next_in=0;K.input=ab;for(D(P);P.lookahead>=L;){ab=P.strstart;Ta=P.lookahead-(L-1);do P.ins_h=(P.ins_h<<P.hash_shift^P.window[ab+L-1])&P.hash_mask,P.prev[ab&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=ab,ab++;while(--Ta);P.strstart=ab;P.lookahead=L-1;D(P)}return P.strstart+=P.lookahead,
P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=L-1,P.match_available=0,K.next_in=eb,K.input=Ya,K.avail_in=Ca,P.wrap=M,Xa};Ma.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(Y,Za,Ma){Za.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(Y,Za,Ma){Za.exports=
function(Ja,La){var sa,I,Ga;var m=Ja.state;var r=Ja.next_in;var D=Ja.input;var O=r+(Ja.avail_in-5);var G=Ja.next_out;var ma=Ja.output;La=G-(La-Ja.avail_out);var qa=G+(Ja.avail_out-257);var ya=m.dmax;var Ha=m.wsize;var Yb=m.whave;var qb=m.wnext;var na=m.window;var $b=m.hold;var gb=m.bits;var Tb=m.lencode;var ha=m.distcode;var Na=(1<<m.lenbits)-1;var Xa=(1<<m.distbits)-1;a:do{gb<15&&($b+=D[r++]<<gb,gb+=8,$b+=D[r++]<<gb,gb+=8);var ea=Tb[$b&Na];b:for(;;){if(sa=ea>>>24,$b>>>=sa,gb-=sa,sa=ea>>>16&255,0===
sa)ma[G++]=65535&ea;else{if(!(16&sa)){if(0===(64&sa)){ea=Tb[(65535&ea)+($b&(1<<sa)-1)];continue b}if(32&sa){m.mode=12;break a}Ja.msg="invalid literal/length code";m.mode=30;break a}var Da=65535&ea;(sa&=15)&&(gb<sa&&($b+=D[r++]<<gb,gb+=8),Da+=$b&(1<<sa)-1,$b>>>=sa,gb-=sa);gb<15&&($b+=D[r++]<<gb,gb+=8,$b+=D[r++]<<gb,gb+=8);ea=ha[$b&Xa];c:for(;;){if(sa=ea>>>24,$b>>>=sa,gb-=sa,sa=ea>>>16&255,!(16&sa)){if(0===(64&sa)){ea=ha[(65535&ea)+($b&(1<<sa)-1)];continue c}Ja.msg="invalid distance code";m.mode=30;
break a}if(I=65535&ea,sa&=15,gb<sa&&($b+=D[r++]<<gb,gb+=8,gb<sa&&($b+=D[r++]<<gb,gb+=8)),I+=$b&(1<<sa)-1,I>ya){Ja.msg="invalid distance too far back";m.mode=30;break a}if($b>>>=sa,gb-=sa,sa=G-La,I>sa){if(sa=I-sa,sa>Yb&&m.sane){Ja.msg="invalid distance too far back";m.mode=30;break a}if(ea=0,Ga=na,0===qb){if(ea+=Ha-sa,sa<Da){Da-=sa;do ma[G++]=na[ea++];while(--sa);ea=G-I;Ga=ma}}else if(qb<sa){if(ea+=Ha+qb-sa,sa-=qb,sa<Da){Da-=sa;do ma[G++]=na[ea++];while(--sa);if(ea=0,qb<Da){sa=qb;Da-=sa;do ma[G++]=
na[ea++];while(--sa);ea=G-I;Ga=ma}}}else if(ea+=qb-sa,sa<Da){Da-=sa;do ma[G++]=na[ea++];while(--sa);ea=G-I;Ga=ma}for(;Da>2;)ma[G++]=Ga[ea++],ma[G++]=Ga[ea++],ma[G++]=Ga[ea++],Da-=3;Da&&(ma[G++]=Ga[ea++],Da>1&&(ma[G++]=Ga[ea++]))}else{ea=G-I;do ma[G++]=ma[ea++],ma[G++]=ma[ea++],ma[G++]=ma[ea++],Da-=3;while(Da>2);Da&&(ma[G++]=ma[ea++],Da>1&&(ma[G++]=ma[ea++]))}break}}break}}while(r<O&&G<qa);Da=gb>>3;r-=Da;gb-=Da<<3;Ja.next_in=r;Ja.next_out=G;Ja.avail_in=r<O?5+(O-r):5-(r-O);Ja.avail_out=G<qa?257+(qa-
G):257-(G-qa);m.hold=$b&(1<<gb)-1;m.bits=gb}},{}],11:[function(Y,Za,Ma){function Ja(ha){return(ha>>>24&255)+(ha>>>8&65280)+((65280&ha)<<8)+((255&ha)<<24)}function La(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=
0;this.next=null;this.lens=new G.Buf16(320);this.work=new G.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function sa(ha){var Na;return ha&&ha.state?(Na=ha.state,ha.total_in=ha.total_out=Na.total=0,ha.msg="",Na.wrap&&(ha.adler=1&Na.wrap),Na.mode=na,Na.last=0,Na.havedict=0,Na.dmax=32768,Na.head=null,Na.hold=0,Na.bits=0,Na.lencode=Na.lendyn=new G.Buf32($b),Na.distcode=Na.distdyn=new G.Buf32(gb),Na.sane=1,Na.back=-1,Yb):qb}function I(ha){var Na;return ha&&ha.state?(Na=ha.state,
Na.wsize=0,Na.whave=0,Na.wnext=0,sa(ha)):qb}function Ga(ha,Na){var Xa,ea;return ha&&ha.state?(ea=ha.state,Na<0?(Xa=0,Na=-Na):(Xa=(Na>>4)+1,Na<48&&(Na&=15)),Na&&(Na<8||Na>15)?qb:(null!==ea.window&&ea.wbits!==Na&&(ea.window=null),ea.wrap=Xa,ea.wbits=Na,I(ha))):qb}function m(ha,Na){var Xa,ea;return ha?(ea=new La,ha.state=ea,ea.window=null,Xa=Ga(ha,Na),Xa!==Yb&&(ha.state=null),Xa):qb}function r(ha,Na,Xa,ea){var Da;ha=ha.state;return null===ha.window&&(ha.wsize=1<<ha.wbits,ha.wnext=0,ha.whave=0,ha.window=
new G.Buf8(ha.wsize)),ea>=ha.wsize?(G.arraySet(ha.window,Na,Xa-ha.wsize,ha.wsize,0),ha.wnext=0,ha.whave=ha.wsize):(Da=ha.wsize-ha.wnext,Da>ea&&(Da=ea),G.arraySet(ha.window,Na,Xa-ea,Da,ha.wnext),ea-=Da,ea?(G.arraySet(ha.window,Na,Xa-ea,ea,0),ha.wnext=ea,ha.whave=ha.wsize):(ha.wnext+=Da,ha.wnext===ha.wsize&&(ha.wnext=0),ha.whave<ha.wsize&&(ha.whave+=Da))),0}var D,O,G=Y("../utils/common"),ma=Y("./adler32"),qa=Y("./crc32"),ya=Y("./inffast"),Ha=Y("./inftrees"),Yb=0,qb=-2,na=1,$b=852,gb=592,Tb=!0;Ma.inflateReset=
I;Ma.inflateReset2=Ga;Ma.inflateResetKeep=sa;Ma.inflateInit=function(ha){return m(ha,15)};Ma.inflateInit2=m;Ma.inflate=function(ha,Na){var Xa,ea,Da,lb,za,Fb,je,oc=0,sb=new G.Buf8(4),X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ha||!ha.state||!ha.output||!ha.input&&0!==ha.avail_in)return qb;var V=ha.state;V.mode===12&&(V.mode=13);var vd=ha.next_out;var A=ha.output;var L=ha.avail_out;var ec=ha.next_in;var Z=ha.input;var nb=ha.avail_in;var Aa=V.hold;var ta=V.bits;var hd=nb;var cb=L;var Gd=
Yb;a:for(;;)switch(V.mode){case na:if(0===V.wrap){V.mode=13;break}for(;ta<16;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(2&V.wrap&&35615===Aa){V.check=0;sb[0]=255&Aa;sb[1]=Aa>>>8&255;V.check=qa(V.check,sb,2,0);ta=Aa=0;V.mode=2;break}if(V.flags=0,V.head&&(V.head.done=!1),!(1&V.wrap)||(((255&Aa)<<8)+(Aa>>8))%31){ha.msg="incorrect header check";V.mode=30;break}if((15&Aa)!==8){ha.msg="unknown compression method";V.mode=30;break}if(Aa>>>=4,ta-=4,Fb=(15&Aa)+8,0===V.wbits)V.wbits=Fb;else if(Fb>V.wbits){ha.msg=
"invalid window size";V.mode=30;break}V.dmax=1<<Fb;ha.adler=V.check=1;V.mode=512&Aa?10:12;ta=Aa=0;break;case 2:for(;ta<16;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(V.flags=Aa,(255&V.flags)!==8){ha.msg="unknown compression method";V.mode=30;break}if(57344&V.flags){ha.msg="unknown header flags set";V.mode=30;break}V.head&&(V.head.text=Aa>>8&1);512&V.flags&&(sb[0]=255&Aa,sb[1]=Aa>>>8&255,V.check=qa(V.check,sb,2,0));ta=Aa=0;V.mode=3;case 3:for(;ta<32;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=
8}V.head&&(V.head.time=Aa);512&V.flags&&(sb[0]=255&Aa,sb[1]=Aa>>>8&255,sb[2]=Aa>>>16&255,sb[3]=Aa>>>24&255,V.check=qa(V.check,sb,4,0));ta=Aa=0;V.mode=4;case 4:for(;ta<16;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}V.head&&(V.head.xflags=255&Aa,V.head.os=Aa>>8);512&V.flags&&(sb[0]=255&Aa,sb[1]=Aa>>>8&255,V.check=qa(V.check,sb,2,0));ta=Aa=0;V.mode=5;case 5:if(1024&V.flags){for(;ta<16;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}V.length=Aa;V.head&&(V.head.extra_len=Aa);512&V.flags&&(sb[0]=255&
Aa,sb[1]=Aa>>>8&255,V.check=qa(V.check,sb,2,0));ta=Aa=0}else V.head&&(V.head.extra=null);V.mode=6;case 6:if(1024&V.flags&&(Xa=V.length,Xa>nb&&(Xa=nb),Xa&&(V.head&&(Fb=V.head.extra_len-V.length,V.head.extra||(V.head.extra=Array(V.head.extra_len)),G.arraySet(V.head.extra,Z,ec,Xa,Fb)),512&V.flags&&(V.check=qa(V.check,Z,Xa,ec)),nb-=Xa,ec+=Xa,V.length-=Xa),V.length))break a;V.length=0;V.mode=7;case 7:if(2048&V.flags){if(0===nb)break a;Xa=0;do Fb=Z[ec+Xa++],V.head&&Fb&&V.length<65536&&(V.head.name+=String.fromCharCode(Fb));
while(Fb&&Xa<nb);if(512&V.flags&&(V.check=qa(V.check,Z,Xa,ec)),nb-=Xa,ec+=Xa,Fb)break a}else V.head&&(V.head.name=null);V.length=0;V.mode=8;case 8:if(4096&V.flags){if(0===nb)break a;Xa=0;do Fb=Z[ec+Xa++],V.head&&Fb&&V.length<65536&&(V.head.comment+=String.fromCharCode(Fb));while(Fb&&Xa<nb);if(512&V.flags&&(V.check=qa(V.check,Z,Xa,ec)),nb-=Xa,ec+=Xa,Fb)break a}else V.head&&(V.head.comment=null);V.mode=9;case 9:if(512&V.flags){for(;ta<16;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(Aa!==(65535&
V.check)){ha.msg="header crc mismatch";V.mode=30;break}ta=Aa=0}V.head&&(V.head.hcrc=V.flags>>9&1,V.head.done=!0);ha.adler=V.check=0;V.mode=12;break;case 10:for(;ta<32;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}ha.adler=V.check=Ja(Aa);ta=Aa=0;V.mode=11;case 11:if(0===V.havedict)return ha.next_out=vd,ha.avail_out=L,ha.next_in=ec,ha.avail_in=nb,V.hold=Aa,V.bits=ta,2;ha.adler=V.check=1;V.mode=12;case 12:if(Na===5||Na===6)break a;case 13:if(V.last){Aa>>>=7&ta;ta-=7&ta;V.mode=27;break}for(;ta<3;){if(0===
nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}switch(V.last=1&Aa,Aa>>>=1,--ta,3&Aa){case 0:V.mode=14;break;case 1:var Xc=V;if(Tb){D=new G.Buf32(512);O=new G.Buf32(32);for(Da=0;Da<144;)Xc.lens[Da++]=8;for(;Da<256;)Xc.lens[Da++]=9;for(;Da<280;)Xc.lens[Da++]=7;for(;Da<288;)Xc.lens[Da++]=8;Ha(1,Xc.lens,0,288,D,0,Xc.work,{bits:9});for(Da=0;Da<32;)Xc.lens[Da++]=5;Ha(2,Xc.lens,0,32,O,0,Xc.work,{bits:5});Tb=!1}Xc.lencode=D;Xc.lenbits=9;Xc.distcode=O;Xc.distbits=5;if(V.mode=20,Na===6){Aa>>>=2;ta-=2;break a}break;
case 2:V.mode=17;break;case 3:ha.msg="invalid block type",V.mode=30}Aa>>>=2;ta-=2;break;case 14:Aa>>>=7&ta;for(ta-=7&ta;ta<32;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if((65535&Aa)!==(Aa>>>16^65535)){ha.msg="invalid stored block lengths";V.mode=30;break}if(V.length=65535&Aa,Aa=0,ta=0,V.mode=15,Na===6)break a;case 15:V.mode=16;case 16:if(Xa=V.length){if(Xa>nb&&(Xa=nb),Xa>L&&(Xa=L),0===Xa)break a;G.arraySet(A,Z,ec,Xa,vd);nb-=Xa;ec+=Xa;L-=Xa;vd+=Xa;V.length-=Xa;break}V.mode=12;break;case 17:for(;ta<
14;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(V.nlen=(31&Aa)+257,Aa>>>=5,ta-=5,V.ndist=(31&Aa)+1,Aa>>>=5,ta-=5,V.ncode=(15&Aa)+4,Aa>>>=4,ta-=4,V.nlen>286||V.ndist>30){ha.msg="too many length or distance symbols";V.mode=30;break}V.have=0;V.mode=18;case 18:for(;V.have<V.ncode;){for(;ta<3;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}V.lens[X[V.have++]]=7&Aa;Aa>>>=3;ta-=3}for(;V.have<19;)V.lens[X[V.have++]]=0;if(V.lencode=V.lendyn,V.lenbits=7,je={bits:V.lenbits},Gd=Ha(0,V.lens,0,19,V.lencode,
0,V.work,je),V.lenbits=je.bits,Gd){ha.msg="invalid code lengths set";V.mode=30;break}V.have=0;V.mode=19;case 19:for(;V.have<V.nlen+V.ndist;){for(;oc=V.lencode[Aa&(1<<V.lenbits)-1],lb=oc>>>24,Xc=65535&oc,!(lb<=ta);){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(Xc<16)Aa>>>=lb,ta-=lb,V.lens[V.have++]=Xc;else{if(16===Xc){for(Da=lb+2;ta<Da;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(Aa>>>=lb,ta-=lb,0===V.have){ha.msg="invalid bit length repeat";V.mode=30;break}Fb=V.lens[V.have-1];Xa=3+(3&Aa);
Aa>>>=2;ta-=2}else if(17===Xc){for(Da=lb+3;ta<Da;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}Aa>>>=lb;ta-=lb;Fb=0;Xa=3+(7&Aa);Aa>>>=3;ta-=3}else{for(Da=lb+7;ta<Da;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}Aa>>>=lb;ta-=lb;Fb=0;Xa=11+(127&Aa);Aa>>>=7;ta-=7}if(V.have+Xa>V.nlen+V.ndist){ha.msg="invalid bit length repeat";V.mode=30;break}for(;Xa--;)V.lens[V.have++]=Fb}}if(V.mode===30)break;if(0===V.lens[256]){ha.msg="invalid code -- missing end-of-block";V.mode=30;break}if(V.lenbits=9,je={bits:V.lenbits},
Gd=Ha(1,V.lens,0,V.nlen,V.lencode,0,V.work,je),V.lenbits=je.bits,Gd){ha.msg="invalid literal/lengths set";V.mode=30;break}if(V.distbits=6,V.distcode=V.distdyn,je={bits:V.distbits},Gd=Ha(2,V.lens,V.nlen,V.ndist,V.distcode,0,V.work,je),V.distbits=je.bits,Gd){ha.msg="invalid distances set";V.mode=30;break}if(V.mode=20,Na===6)break a;case 20:V.mode=21;case 21:if(nb>=6&&L>=258){ha.next_out=vd;ha.avail_out=L;ha.next_in=ec;ha.avail_in=nb;V.hold=Aa;V.bits=ta;ya(ha,cb);vd=ha.next_out;A=ha.output;L=ha.avail_out;
ec=ha.next_in;Z=ha.input;nb=ha.avail_in;Aa=V.hold;ta=V.bits;V.mode===12&&(V.back=-1);break}for(V.back=0;oc=V.lencode[Aa&(1<<V.lenbits)-1],lb=oc>>>24,Da=oc>>>16&255,Xc=65535&oc,!(lb<=ta);){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(Da&&0===(240&Da)){var K=lb;var ab=Da;for(za=Xc;oc=V.lencode[za+((Aa&(1<<K+ab)-1)>>K)],lb=oc>>>24,Da=oc>>>16&255,Xc=65535&oc,!(K+lb<=ta);){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}Aa>>>=K;ta-=K;V.back+=K}if(Aa>>>=lb,ta-=lb,V.back+=lb,V.length=Xc,0===Da){V.mode=26;
break}if(32&Da){V.back=-1;V.mode=12;break}if(64&Da){ha.msg="invalid literal/length code";V.mode=30;break}V.extra=15&Da;V.mode=22;case 22:if(V.extra){for(Da=V.extra;ta<Da;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}V.length+=Aa&(1<<V.extra)-1;Aa>>>=V.extra;ta-=V.extra;V.back+=V.extra}V.was=V.length;V.mode=23;case 23:for(;oc=V.distcode[Aa&(1<<V.distbits)-1],lb=oc>>>24,Da=oc>>>16&255,Xc=65535&oc,!(lb<=ta);){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(0===(240&Da)){K=lb;ab=Da;for(za=Xc;oc=V.distcode[za+
((Aa&(1<<K+ab)-1)>>K)],lb=oc>>>24,Da=oc>>>16&255,Xc=65535&oc,!(K+lb<=ta);){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}Aa>>>=K;ta-=K;V.back+=K}if(Aa>>>=lb,ta-=lb,V.back+=lb,64&Da){ha.msg="invalid distance code";V.mode=30;break}V.offset=Xc;V.extra=15&Da;V.mode=24;case 24:if(V.extra){for(Da=V.extra;ta<Da;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}V.offset+=Aa&(1<<V.extra)-1;Aa>>>=V.extra;ta-=V.extra;V.back+=V.extra}if(V.offset>V.dmax){ha.msg="invalid distance too far back";V.mode=30;break}V.mode=
25;case 25:if(0===L)break a;if(Xa=cb-L,V.offset>Xa){if(Xa=V.offset-Xa,Xa>V.whave&&V.sane){ha.msg="invalid distance too far back";V.mode=30;break}Xa>V.wnext?(Xa-=V.wnext,ea=V.wsize-Xa):ea=V.wnext-Xa;Xa>V.length&&(Xa=V.length);Da=V.window}else Da=A,ea=vd-V.offset,Xa=V.length;Xa>L&&(Xa=L);L-=Xa;V.length-=Xa;do A[vd++]=Da[ea++];while(--Xa);0===V.length&&(V.mode=21);break;case 26:if(0===L)break a;A[vd++]=V.length;L--;V.mode=21;break;case 27:if(V.wrap){for(;ta<32;){if(0===nb)break a;nb--;Aa|=Z[ec++]<<ta;
ta+=8}if(cb-=L,ha.total_out+=cb,V.total+=cb,cb&&(ha.adler=V.check=V.flags?qa(V.check,A,cb,vd-cb):ma(V.check,A,cb,vd-cb)),cb=L,(V.flags?Aa:Ja(Aa))!==V.check){ha.msg="incorrect data check";V.mode=30;break}ta=Aa=0}V.mode=28;case 28:if(V.wrap&&V.flags){for(;ta<32;){if(0===nb)break a;nb--;Aa+=Z[ec++]<<ta;ta+=8}if(Aa!==(4294967295&V.total)){ha.msg="incorrect length check";V.mode=30;break}ta=Aa=0}V.mode=29;case 29:Gd=1;break a;case 30:Gd=-3;break a;case 31:return-4;default:return qb}return ha.next_out=vd,
ha.avail_out=L,ha.next_in=ec,ha.avail_in=nb,V.hold=Aa,V.bits=ta,(V.wsize||cb!==ha.avail_out&&V.mode<30&&(V.mode<27||Na!==4))&&r(ha,ha.output,ha.next_out,cb-ha.avail_out)?(V.mode=31,-4):(hd-=ha.avail_in,cb-=ha.avail_out,ha.total_in+=hd,ha.total_out+=cb,V.total+=cb,V.wrap&&cb&&(ha.adler=V.check=V.flags?qa(V.check,A,cb,ha.next_out-cb):ma(V.check,A,cb,ha.next_out-cb)),ha.data_type=V.bits+(V.last?64:0)+(V.mode===12?128:0)+(V.mode===20||V.mode===15?256:0),(0===hd&&0===cb||Na===4)&&Gd===Yb&&(Gd=-5),Gd)};
Ma.inflateEnd=function(ha){if(!ha||!ha.state)return qb;var Na=ha.state;return Na.window&&(Na.window=null),ha.state=null,Yb};Ma.inflateGetHeader=function(ha,Na){var Xa;return ha&&ha.state?(Xa=ha.state,0===(2&Xa.wrap)?qb:(Xa.head=Na,Na.done=!1,Yb)):qb};Ma.inflateSetDictionary=function(ha,Na){var Xa,ea,Da=Na.length;return ha&&ha.state?(Xa=ha.state,0!==Xa.wrap&&Xa.mode!==11?qb:Xa.mode===11&&(ea=1,ea=ma(ea,Na,Da,0),ea!==Xa.check)?-3:r(ha,Na,Da,Da)?(Xa.mode=31,-4):(Xa.havedict=1,Yb)):qb};Ma.inflateInfo=
"pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(Y,Za,Ma){var Ja=Y("../utils/common"),La=[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],sa=[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],I=[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],Ga=[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];Za.exports=function(m,r,D,O,G,ma,qa,ya){var Ha,Yb,qb,na,$b,gb,Tb=ya.bits,ha,Na,Xa,ea,Da,lb=0,za,Fb=null,je=0,oc=new Ja.Buf16(16);var sb=new Ja.Buf16(16);var X=null,V=0;for(ha=0;ha<=15;ha++)oc[ha]=0;for(Na=0;Na<O;Na++)oc[r[D+Na]]++;var vd=Tb;for(Xa=15;Xa>=1&&0===oc[Xa];Xa--);if(vd>Xa&&(vd=Xa),0===Xa)return G[ma++]=20971520,G[ma++]=20971520,ya.bits=1,0;for(Tb=1;Tb<Xa&&0===oc[Tb];Tb++);vd<Tb&&(vd=Tb);for(ha=Ha=1;ha<=15;ha++)if(Ha<<=
1,Ha-=oc[ha],Ha<0)return-1;if(Ha>0&&(m===0||1!==Xa))return-1;sb[1]=0;for(ha=1;ha<15;ha++)sb[ha+1]=sb[ha]+oc[ha];for(Na=0;Na<O;Na++)0!==r[D+Na]&&(qa[sb[r[D+Na]]++]=Na);if(m===0?(Fb=X=qa,na=19):m===1?(Fb=La,je-=257,X=sa,V-=257,na=256):(Fb=I,X=Ga,na=-1),za=0,Na=0,ha=Tb,sb=ma,ea=vd,Da=0,qb=-1,lb=1<<vd,O=lb-1,m===1&&lb>852||m===2&&lb>592)return 1;for(var A=0;;){A++;var L=ha-Da;qa[Na]<na?($b=0,gb=qa[Na]):qa[Na]>na?($b=X[V+qa[Na]],gb=Fb[je+qa[Na]]):($b=96,gb=0);Ha=1<<ha-Da;Tb=Yb=1<<ea;do Yb-=Ha,G[sb+(za>>
Da)+Yb]=L<<24|$b<<16|gb|0;while(0!==Yb);for(Ha=1<<ha-1;za&Ha;)Ha>>=1;if(0!==Ha?(za&=Ha-1,za+=Ha):za=0,Na++,0===--oc[ha]){if(ha===Xa)break;ha=r[D+qa[Na]]}if(ha>vd&&(za&O)!==qb){0===Da&&(Da=vd);sb+=Tb;ea=ha-Da;for(Ha=1<<ea;ea+Da<Xa&&(Ha-=oc[ea+Da],!(Ha<=0));)ea++,Ha<<=1;if(lb+=1<<ea,m===1&&lb>852||m===2&&lb>592)return 1;qb=za&O;G[qb]=vd<<24|ea<<16|sb-ma|0}}return 0!==za&&(G[sb+za]=ha-Da<<24|4194304),ya.bits=vd,0}},{"../utils/common":3}],13:[function(Y,Za,Ma){Za.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(Y,Za,Ma){function Ja(P){for(var M=P.length;--M>=0;)P[M]=0}function La(P,M,Ca,Ta,eb){this.static_tree=P;this.extra_bits=M;this.extra_base=Ca;this.elems=Ta;this.max_length=eb;this.has_stree=P&&P.length}function sa(P,M){this.dyn_tree=P;this.max_code=0;this.stat_desc=M}function I(P,M){P.pending_buf[P.pending++]=255&M;P.pending_buf[P.pending++]=M>>>
8&255}function Ga(P,M,Ca){P.bi_valid>je-Ca?(P.bi_buf|=M<<P.bi_valid&65535,I(P,P.bi_buf),P.bi_buf=M>>je-P.bi_valid,P.bi_valid+=Ca-je):(P.bi_buf|=M<<P.bi_valid&65535,P.bi_valid+=Ca)}function m(P,M,Ca){Ga(P,Ca[2*M],Ca[2*M+1])}function r(P,M){var Ca=0;do Ca|=1&P,P>>>=1,Ca<<=1;while(--M>0);return Ca>>>1}function D(P,M,Ca){var Ta,eb=Array(Fb+1),Ya=0;for(Ta=1;Ta<=Fb;Ta++)eb[Ta]=Ya=Ya+Ca[Ta-1]<<1;for(Ca=0;Ca<=M;Ca++)Ta=P[2*Ca+1],0!==Ta&&(P[2*Ca]=r(eb[Ta]++,Ta))}function O(P){var M;for(M=0;M<ea;M++)P.dyn_ltree[2*
M]=0;for(M=0;M<Da;M++)P.dyn_dtree[2*M]=0;for(M=0;M<lb;M++)P.bl_tree[2*M]=0;P.dyn_ltree[2*oc]=1;P.opt_len=P.static_len=0;P.last_lit=P.matches=0}function G(P){P.bi_valid>8?I(P,P.bi_buf):P.bi_valid>0&&(P.pending_buf[P.pending++]=P.bi_buf);P.bi_buf=0;P.bi_valid=0}function ma(P,M,Ca,Ta){var eb=2*M,Ya=2*Ca;return P[eb]<P[Ya]||P[eb]===P[Ya]&&Ta[M]<=Ta[Ca]}function qa(P,M,Ca){for(var Ta=P.heap[Ca],eb=Ca<<1;eb<=P.heap_len&&(eb<P.heap_len&&ma(M,P.heap[eb+1],P.heap[eb],P.depth)&&eb++,!ma(M,Ta,P.heap[eb],P.depth));)P.heap[Ca]=
P.heap[eb],Ca=eb,eb<<=1;P.heap[Ca]=Ta}function ya(P,M,Ca){var Ta,eb,Ya=0;if(0!==P.last_lit){do{var Dc=P.pending_buf[P.d_buf+2*Ya]<<8|P.pending_buf[P.d_buf+2*Ya+1];var Db=P.pending_buf[P.l_buf+Ya];Ya++;0===Dc?m(P,Db,M):(Ta=ta[Db],m(P,Ta+Xa+1,M),eb=vd[Ta],0!==eb&&(Db-=hd[Ta],Ga(P,Db,eb)),Dc--,Ta=Dc<256?Aa[Dc]:Aa[256+(Dc>>>7)],m(P,Ta,Ca),eb=A[Ta],0!==eb&&(Dc-=cb[Ta],Ga(P,Dc,eb)))}while(Ya<P.last_lit)}m(P,oc,M)}function Ha(P,M){var Ca,Ta=M.dyn_tree;var eb=M.stat_desc.static_tree;var Ya=M.stat_desc.has_stree,
Dc=M.stat_desc.elems,Db=-1;P.heap_len=0;P.heap_max=za;for(Ca=0;Ca<Dc;Ca++)0!==Ta[2*Ca]?(P.heap[++P.heap_len]=Db=Ca,P.depth[Ca]=0):Ta[2*Ca+1]=0;for(;P.heap_len<2;){var yc=P.heap[++P.heap_len]=Db<2?++Db:0;Ta[2*yc]=1;P.depth[yc]=0;P.opt_len--;Ya&&(P.static_len-=eb[2*yc+1])}M.max_code=Db;for(Ca=P.heap_len>>1;Ca>=1;Ca--)qa(P,Ta,Ca);yc=Dc;do Ca=P.heap[1],P.heap[1]=P.heap[P.heap_len--],qa(P,Ta,1),eb=P.heap[1],P.heap[--P.heap_max]=Ca,P.heap[--P.heap_max]=eb,Ta[2*yc]=Ta[2*Ca]+Ta[2*eb],P.depth[yc]=(P.depth[Ca]>=
P.depth[eb]?P.depth[Ca]:P.depth[eb])+1,Ta[2*Ca+1]=Ta[2*eb+1]=yc,P.heap[1]=yc++,qa(P,Ta,1);while(P.heap_len>=2);P.heap[--P.heap_max]=P.heap[1];var Ac,Pg;Ca=M.dyn_tree;yc=M.max_code;Dc=M.stat_desc.static_tree;var $h=M.stat_desc.has_stree,jh=M.stat_desc.extra_bits,oj=M.stat_desc.extra_base,ai=M.stat_desc.max_length,bi=0;for(Ya=0;Ya<=Fb;Ya++)P.bl_count[Ya]=0;Ca[2*P.heap[P.heap_max]+1]=0;for(M=P.heap_max+1;M<za;M++)eb=P.heap[M],Ya=Ca[2*Ca[2*eb+1]+1]+1,Ya>ai&&(Ya=ai,bi++),Ca[2*eb+1]=Ya,eb>yc||(P.bl_count[Ya]++,
Ac=0,eb>=oj&&(Ac=jh[eb-oj]),Pg=Ca[2*eb],P.opt_len+=Pg*(Ya+Ac),$h&&(P.static_len+=Pg*(Dc[2*eb+1]+Ac)));if(0!==bi){do{for(Ya=ai-1;0===P.bl_count[Ya];)Ya--;P.bl_count[Ya]--;P.bl_count[Ya+1]+=2;P.bl_count[ai]--;bi-=2}while(bi>0);for(Ya=ai;0!==Ya;Ya--)for(eb=P.bl_count[Ya];0!==eb;)Ac=P.heap[--M],Ac>yc||(Ca[2*Ac+1]!==Ya&&(P.opt_len+=(Ya-Ca[2*Ac+1])*Ca[2*Ac],Ca[2*Ac+1]=Ya),eb--)}D(Ta,Db,P.bl_count)}function Yb(P,M,Ca){var Ta,eb=-1,Ya=M[1],Dc=0,Db=7,yc=4;0===Ya&&(Db=138,yc=3);M[2*(Ca+1)+1]=65535;for(Ta=0;Ta<=
Ca;Ta++){var Ac=Ya;Ya=M[2*(Ta+1)+1];++Dc<Db&&Ac===Ya||(Dc<yc?P.bl_tree[2*Ac]+=Dc:0!==Ac?(Ac!==eb&&P.bl_tree[2*Ac]++,P.bl_tree[2*sb]++):Dc<=10?P.bl_tree[2*X]++:P.bl_tree[2*V]++,Dc=0,eb=Ac,0===Ya?(Db=138,yc=3):Ac===Ya?(Db=6,yc=3):(Db=7,yc=4))}}function qb(P,M,Ca){var Ta,eb,Ya=-1,Dc=M[1],Db=0,yc=7,Ac=4;0===Dc&&(yc=138,Ac=3);for(Ta=0;Ta<=Ca;Ta++)if(eb=Dc,Dc=M[2*(Ta+1)+1],!(++Db<yc&&eb===Dc)){if(Db<Ac){do m(P,eb,P.bl_tree);while(0!==--Db)}else 0!==eb?(eb!==Ya&&(m(P,eb,P.bl_tree),Db--),m(P,sb,P.bl_tree),
Ga(P,Db-3,2)):Db<=10?(m(P,X,P.bl_tree),Ga(P,Db-3,3)):(m(P,V,P.bl_tree),Ga(P,Db-11,7));Db=0;Ya=eb;0===Dc?(yc=138,Ac=3):eb===Dc?(yc=6,Ac=3):(yc=7,Ac=4)}}function na(P){var M,Ca=4093624447;for(M=0;M<=31;M++,Ca>>>=1)if(1&Ca&&0!==P.dyn_ltree[2*M])return Tb;if(0!==P.dyn_ltree[18]||0!==P.dyn_ltree[20]||0!==P.dyn_ltree[26])return ha;for(M=32;M<Xa;M++)if(0!==P.dyn_ltree[2*M])return ha;return Tb}function $b(P,M,Ca,Ta){Ga(P,(Na<<1)+(Ta?1:0),3);G(P);I(P,Ca);I(P,~Ca);gb.arraySet(P.pending_buf,P.window,M,Ca,P.pending);
P.pending+=Ca}var gb=Y("../utils/common"),Tb=0,ha=1,Na=0,Xa=256,ea=Xa+1+29,Da=30,lb=19,za=2*ea+1,Fb=15,je=16,oc=256,sb=16,X=17,V=18,vd=[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],A=[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],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ec=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=Array(2*(ea+2));Ja(Z);var nb=Array(2*Da);Ja(nb);var Aa=Array(512);Ja(Aa);var ta=Array(256);Ja(ta);var hd=Array(29);Ja(hd);var cb=Array(Da);
Ja(cb);var Gd,Xc,K,ab=!1;Ma._tr_init=function(P){if(!ab){var M,Ca,Ta,eb=Array(Fb+1);for(Ta=Ca=0;Ta<28;Ta++)for(hd[Ta]=Ca,M=0;M<1<<vd[Ta];M++)ta[Ca++]=Ta;ta[Ca-1]=Ta;for(Ta=Ca=0;Ta<16;Ta++)for(cb[Ta]=Ca,M=0;M<1<<A[Ta];M++)Aa[Ca++]=Ta;for(Ca>>=7;Ta<Da;Ta++)for(cb[Ta]=Ca<<7,M=0;M<1<<A[Ta]-7;M++)Aa[256+Ca++]=Ta;for(M=0;M<=Fb;M++)eb[M]=0;for(M=0;M<=143;)Z[2*M+1]=8,M++,eb[8]++;for(;M<=255;)Z[2*M+1]=9,M++,eb[9]++;for(;M<=279;)Z[2*M+1]=7,M++,eb[7]++;for(;M<=287;)Z[2*M+1]=8,M++,eb[8]++;D(Z,ea+1,eb);for(M=
0;M<Da;M++)nb[2*M+1]=5,nb[2*M]=r(M,5);Gd=new La(Z,vd,Xa+1,ea,Fb);Xc=new La(nb,A,0,Da,Fb);K=new La([],L,0,lb,7);ab=!0}P.l_desc=new sa(P.dyn_ltree,Gd);P.d_desc=new sa(P.dyn_dtree,Xc);P.bl_desc=new sa(P.bl_tree,K);P.bi_buf=0;P.bi_valid=0;O(P)};Ma._tr_stored_block=$b;Ma._tr_flush_block=function(P,M,Ca,Ta){var eb=0;if(P.level>0){P.strm.data_type===2&&(P.strm.data_type=na(P));Ha(P,P.l_desc);Ha(P,P.d_desc);Yb(P,P.dyn_ltree,P.l_desc.max_code);Yb(P,P.dyn_dtree,P.d_desc.max_code);Ha(P,P.bl_desc);for(eb=lb-
1;eb>=3&&0===P.bl_tree[2*ec[eb]+1];eb--);eb=(P.opt_len+=3*(eb+1)+5+5+4,eb);var Ya=P.opt_len+3+7>>>3;var Dc=P.static_len+3+7>>>3;Dc<=Ya&&(Ya=Dc)}else Ya=Dc=Ca+5;if(Ca+4<=Ya&&M!==-1)$b(P,M,Ca,Ta);else if(P.strategy===4||Dc===Ya)Ga(P,2+(Ta?1:0),3),ya(P,Z,nb);else{Ga(P,4+(Ta?1:0),3);M=P.l_desc.max_code+1;Ca=P.d_desc.max_code+1;eb+=1;Ga(P,M-257,5);Ga(P,Ca-1,5);Ga(P,eb-4,4);for(Ya=0;Ya<eb;Ya++)Ga(P,P.bl_tree[2*ec[Ya]+1],3);qb(P,P.dyn_ltree,M-1);qb(P,P.dyn_dtree,Ca-1);ya(P,P.dyn_ltree,P.dyn_dtree)}O(P);
Ta&&G(P)};Ma._tr_tally=function(P,M,Ca){return P.pending_buf[P.d_buf+2*P.last_lit]=M>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&M,P.pending_buf[P.l_buf+P.last_lit]=255&Ca,P.last_lit++,0===M?P.dyn_ltree[2*Ca]++:(P.matches++,M--,P.dyn_ltree[2*(ta[Ca]+Xa+1)]++,P.dyn_dtree[2*(M<256?Aa[M]:Aa[256+(M>>>7)])]++),P.last_lit===P.lit_bufsize-1};Ma._tr_align=function(P){Ga(P,2,3);m(P,oc,Z);16===P.bi_valid?(I(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):P.bi_valid>=8&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=
8,P.bi_valid-=8)}},{"../utils/common":3}],15:[function(Y,Za,Ma){Za.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(Y,Za,Ma){Ma=Y("./lib/utils/common").assign;var Ja=Y("./lib/deflate"),La=Y("./lib/inflate");Y=Y("./lib/zlib/constants");var sa={};Ma(sa,Ja,La,Y);Za.exports=sa},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,
"./lib/zlib/constants":6}]},{},[])("/")});
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var e=function(){function Eb(C){var F=[];return F[C-1]=void 0,F}function Y(C,F){return Ja(C[0]+F[0],C[1]+F[1])}function Za(C,F){var N=~~Math.max(Math.min(C[1]/$f,2147483647),-2147483648)&~~Math.max(Math.min(F[1]/$f,2147483647),-2147483648);C=sa(C)&sa(F);var S,ca;return S=N*$f,ca=C,0>C&&(ca+=$f),[ca,S]}function Ma(C,F){var N,S;return C[0]==F[0]&&C[1]==F[1]?0:(N=0>C[1],S=0>F[1],N&&!S?-1:!N&&S?1:Ja(C[0]-F[0],C[1]-F[1])[1]<0?-1:
1)}function Ja(C,F){F%=1.8446744073709552E19;C%=1.8446744073709552E19;var N=F%$f;var S=Math.floor(C/$f)*$f;F=F-N+S;for(C=C-S+N;0>C;)C+=$f,F-=$f;for(;C>4294967295;)C-=$f,F+=$f;for(F%=1.8446744073709552E19;F>0x7fffffff00000000;)F-=1.8446744073709552E19;for(;-0x7fffffffffffffff>F;)F+=1.8446744073709552E19;return[C,F]}function La(C){return C>=0?[C,0]:[C+$f,-$f]}function sa(C){return C[0]>=2147483648?~~Math.max(Math.min(C[0]-$f,2147483647),-2147483648):~~Math.max(Math.min(C[0],2147483647),-2147483648)}
function I(C){return 30>=C?1<<C:I(30)*I(C-30)}function Ga(C,F){var N,S,ca,ba;if(F&=63,C[0]==Um[0]&&C[1]==Um[1])return F?ag:C;if(0>C[1])throw Error("Neg");return ba=I(F),S=C[1]*ba%1.8446744073709552E19,ca=C[0]*ba,N=ca-ca%$f,S+=N,ca-=N,S>=0x7fffffffffffffff&&(S-=1.8446744073709552E19),[ca,S]}function m(C,F){var N;return F&=63,N=I(F),Ja(Math.floor(C[0]/N),C[1]/N)}function r(C,F){return C.Mc=F,C.Lc=0,C.Yb=F.length,C}function D(C){return C.Lc>=C.Yb?-1:255&C.Mc[C.Lc++]}function O(C){return C.Mc=Eb(32),
C.Yb=0,C}function G(C){var F=C.Mc;return F.length=C.Yb,F}function ma(C,F,N,S,ca){for(var ba=0;ca>ba;++ba)N[S+ba]=C[F+ba]}function qa(C,F,N){C.Nb=O({});var S=r({},F),ca=C.Nb,ba=La(F.length);if(Ma(ba,kd)<0)throw Error("invalid length "+ba);C.Tb=ba;F={};var p;F.v=Eb(4);F.a=[];F.d={};F.C=Eb(192);F.bb=Eb(12);F.hb=Eb(12);F.Ub=Eb(12);F.vc=Eb(12);F._=Eb(192);F.K=[];F.Sb=Eb(114);F.S=Ta({},4);F.$=Gd({});F.i=Gd({});F.A={};F.m=[];F.P=[];F.lb=[];F.nc=Eb(16);F.x=Eb(4);F.Q=Eb(4);F.Xb=[ag];F.uc=[ag];F.Kc=[0];F.fc=
Eb(5);F.yc=Eb(128);F.vb=0;F.X=1;F.D=0;F.Hb=-1;for(p=F.mb=0;4096>p;++p)F.a[p]={};for(p=0;4>p;++p)F.K[p]=Ta({},6);p=1<<N.s;F.ab=p;for(var Wa=0;p>1<<Wa;++Wa);F.$b=2*Wa;F.n=N.f;p=F.X;F.X=N.m;F.b&&p!=F.X&&(F.wb=-1,F.b=null);F.eb=0;F.fb=3;F.Y=2;F.y=3;F.Gc=void 0===e.disableEndMark;F.fc[0]=9*(5*F.Y+F.eb)+F.fb<<24>>24;for(N=0;4>N;++N)F.fc[1+N]=F.ab>>8*N<<24>>24;ma(F.fc,0,ca.Mc,ca.Yb,5);ca.Yb+=5;for(N=0;64>N;N+=8)p=ca,Wa=255&sa(m(ba,N)),p.Mc[p.Yb++]=Wa<<24>>24;F.W=0;F.oc=S;F.pc=0;F.b||(S={},ba=4,F.X||(ba=
2),S.qb=ba>2,S.qb?(S.w=0,S.xb=4,S.R=66560):(S.w=2,S.xb=3,S.R=0),F.b=S);S=F.A;ba=F.eb;N=F.fb;if(null==S.V||S.u!=N||S.I!=ba)for(S.I=ba,S.qc=(1<<ba)-1,S.u=N,N=1<<S.u+S.I,S.V=Eb(N),ba=0;N>ba;++ba){p=S.V;Wa=ba;var Pa={};Pa=(Pa.tb=Eb(768),Pa);p[Wa]=Pa}if(F.ab!=F.wb||F.Hb!=F.n)S=F.b,ba=F.ab,N=F.n,1073741567>ba&&(S.Fc=16+(N>>1),Wa=ba+4096,p=N+274,S.Bc=Wa,S._b=p,Wa=Wa+p+(~~((ba+4096+N+274)/2)+256),(null==S.c||S.Kb!=Wa)&&(S.c=null,S.Kb=Wa,S.c=Eb(S.Kb)),S.H=S.Kb-p,S.ob=N,N=ba+1,S.p!=N&&(S.L=Eb(2*(S.p=N))),N=
65536,S.qb&&(N=ba-1,N|=N>>1,N|=N>>2,N|=N>>4,N|=N>>8,N>>=1,N|=65535,N>16777216&&(N>>=1),S.Ec=N,++N,N+=S.R),N!=S.rc&&(S.ub=Eb(S.rc=N))),F.wb=F.ab,F.Hb=F.n;F.d.Ab=ca;F.l=0;for(ca=F.J=0;4>ca;++ca)F.v[ca]=0;ca=F.d;ca.mc=ag;ca.xc=ag;ca.E=-1;ca.Jb=1;ca.Oc=0;yc(F.C);yc(F._);yc(F.bb);yc(F.hb);yc(F.Ub);yc(F.vc);yc(F.Sb);ca=F.A;ba=1<<ca.u+ca.I;for(S=0;ba>S;++S)yc(ca.V[S].tb);for(ca=0;4>ca;++ca)yc(F.K[ca].G);ta(F.$,1<<F.Y);ta(F.i,1<<F.Y);yc(F.S.G);F.N=0;F.jb=0;F.q=0;F.s=0;V(F);X(F);F.$.rb=F.n+1-2;Xc(F.$,1<<F.Y);
F.i.rb=F.n+1-2;Xc(F.i,1<<F.Y);F.g=ag;ca={};F=(ca.cb=F,ca.Z=null,ca.zc=1,ca);C.yb=F;return C}function ya(C,F){C.Nb=O({});var N=r({},F),S=C.Nb,ca,ba,p,Wa="",Pa=[];for(ca=0;5>ca;++ca){if(ba=D(N),-1==ba)throw Error("truncated input");Pa[ca]=ba<<24>>24}F={B:{},e:{}};F.Gb=Eb(192);F.Zb=Eb(12);F.Cb=Eb(12);F.Db=Eb(12);F.Eb=Eb(12);F.pb=Eb(192);F.kb=Eb(4);F.kc=Eb(114);F.Fb=M({},4);F.Rb=je({});F.sb=je({});F.gb={};for(ca=0;4>ca;++ca)F.kb[ca]=M({},6);var xb;if(5>Pa.length)ca=0;else{ca=255&Pa[0];var yb=ca%9;ca=
~~(ca/9);var mc=ca%5;var tb=~~(ca/5);for(xb=ca=0;4>xb;++xb)ca+=(255&Pa[1+xb])<<8*xb;if(!(Pa=ca>99999999)){if(yb>8||mc>4||tb>4)tb=0;else{Pa=F.gb;if(null==Pa.V||Pa.u!=yb||Pa.I!=mc)for(Pa.I=mc,Pa.qc=(1<<mc)-1,Pa.u=yb,mc=1<<Pa.u+Pa.I,Pa.V=Eb(mc),yb=0;mc>yb;++yb){xb=Pa.V;var Tc=yb;var Zc={};Zc=(Zc.Ib=Eb(768),Zc);xb[Tc]=Zc}tb=1<<tb;tb=(za(F.Rb,tb),za(F.sb,tb),F.Dc=tb-1,1)}Pa=!tb}Pa?ca=0:0>ca?ca=0:(F.Ob!=ca&&(F.Ob=ca,F.nb=Math.max(F.Ob,1),ca=F.B,tb=Math.max(F.nb,4096),null!=ca.Lb&&ca.M==tb||(ca.Lb=Eb(tb)),
ca.M=tb,ca.o=0,ca.h=0),ca=1)}if(!ca)throw Error("corrupted input");for(ca=0;64>ca;ca+=8){if(ba=D(N),-1==ba)throw Error("truncated input");ba=ba.toString(16);1==ba.length&&(ba="0"+ba);Wa=ba+""+Wa}/^0+$|^f+$/i.test(Wa)?C.Tb=kd:(p=parseInt(Wa,16),C.Tb=p>4294967295?kd:La(p));ba=C.Tb;F.e.Ab=N;N=F.B;Na(N);N.cc=null;F.B.cc=S;F.B.h=0;F.B.o=0;yc(F.Gb);yc(F.pb);yc(F.Zb);yc(F.Cb);yc(F.Db);yc(F.Eb);yc(F.kc);S=F.gb;p=1<<S.u+S.I;for(N=0;p>N;++N)yc(S.V[N].Ib);for(S=0;4>S;++S)yc(F.kb[S].G);oc(F.Rb);oc(F.sb);yc(F.Fb.G);
S=F.e;S.Bb=0;S.E=-1;for(N=0;5>N;++N)S.Bb=S.Bb<<8|D(S.Ab);F.U=0;F.ib=0;F.Jc=0;F.Ic=0;F.Qc=0;F.Nc=ba;F.g=ag;F.jc=0;S={};F=(S.Z=F,S.cb=null,S.zc=1,S);C.yb=F;return C}function Ha(C,F){return C.c[C.f+C.o+F]}function Yb(C,F,N,S){C.T&&C.o+F+S>C.h&&(S=C.h-(C.o+F));++N;var ca=C.f+C.o+F;for(F=0;S>F&&C.c[ca+F]==C.c[ca+F-N];++F);return F}function qb(C){return C.h-C.o}function na(C){var F,N,S;if(!C.T)for(;S=-C.f+C.Kb-C.h,S;){var ca=C.cc,ba=C.c,p=C.f+C.h,Wa=S;if(F=ca.Lc>=ca.Yb?-1:(Wa=Math.min(Wa,ca.Yb-ca.Lc),ma(ca.Mc,
ca.Lc,ba,p,Wa),ca.Lc+=Wa,Wa),-1==F)return C.zb=C.h,N=C.f+C.zb,N>C.H&&(C.zb=C.H-C.f),void(C.T=1);C.h+=F;C.h>=C.o+C._b&&(C.zb=C.h-C._b)}}function $b(C,F){C.f+=F;C.zb-=F;C.o-=F;C.h-=F}function gb(C){var F;++C.k>=C.p&&(C.k=0);++C.o;if(C.o>C.zb){var N=C.f+C.o;if(N>C.H){var S=C.f+C.o-C.Bc;S>0&&--S;var ca=C.f+C.h-S;for(N=0;ca>N;++N)C.c[N]=C.c[S+N];C.f-=S}na(C)}1073741823==C.o&&(F=C.o-C.p,Tb(C.L,2*C.p,F),Tb(C.ub,C.rc,F),$b(C,F))}function Tb(C,F,N){var S;for(S=0;F>S;++S){var ca=C[S]||0;N>=ca?ca=0:ca-=N;C[S]=
ca}}function ha(C,F){var N,S,ca,ba,p,Wa,Pa,xb,yb,mc;do{if(C.h>=C.o+C.ob)var tb=C.ob;else if(tb=C.h-C.o,C.xb>tb){gb(C);continue}var Tc=C.o>C.p?C.o-C.p:0;var Zc=C.f+C.o;C.qb?(mc=Qa[255&C.c[Zc]]^255&C.c[Zc+1],ba=1023&mc,C.ub[ba]=C.o,mc^=(255&C.c[Zc+2])<<8,p=65535&mc,C.ub[1024+p]=C.o,Wa=(mc^Qa[255&C.c[Zc+3]]<<5)&C.Ec):Wa=255&C.c[Zc]^(255&C.c[Zc+1])<<8;var od=C.ub[C.R+Wa];C.ub[C.R+Wa]=C.o;var pe=(C.k<<1)+1;var Rd=C.k<<1;var ke=xb=C.w;for(N=C.Fc;;){if(Tc>=od||0==N--){C.L[pe]=C.L[Rd]=0;break}if(ca=C.o-od,
S=(C.k>=ca?C.k-ca:C.k-ca+C.p)<<1,yb=C.f+od,Pa=xb>ke?ke:xb,C.c[yb+Pa]==C.c[Zc+Pa]){for(;++Pa!=tb&&C.c[yb+Pa]==C.c[Zc+Pa];);if(Pa==tb){C.L[Rd]=C.L[S];C.L[pe]=C.L[S+1];break}}(255&C.c[Zc+Pa])>(255&C.c[yb+Pa])?(C.L[Rd]=od,Rd=S+1,od=C.L[Rd],xb=Pa):(C.L[pe]=od,pe=S,od=C.L[pe],ke=Pa)}gb(C)}while(0!=--F)}function Na(C){var F=C.o-C.h;if(F){var N=C.cc;ma(C.Lb,C.h,N.Mc,N.Yb,F);N.Yb+=F;C.o>=C.M&&(C.o=0);C.h=C.o}}function Xa(C,F){F=C.o-F-1;return 0>F&&(F+=C.M),C.Lb[F]}function ea(C){return C-=2,4>C?C:3}function Da(C){return 4>
C?0:10>C?C-3:C-6}function lb(C){if(!C.zc)throw Error("bad state");if(C.cb){a:{var F=C.cb,N=C.cb.Xb,S=C.cb.uc,ca=C.cb.Kc,ba,p;N[0]=ag;S[0]=ag;ca[0]=1;if(F.oc){F.b.cc=F.oc;var Wa=F.b;Wa.f=0;Wa.o=0;Wa.h=0;Wa.T=0;na(Wa);Wa.k=0;$b(Wa,-1);F.W=1;F.oc=null}if(!F.pc){F.pc=1;var Pa=Wa=F.g;if(Pa[0]==ag[0]&&Pa[1]==ag[1]){if(!qb(F.b)){vd(F,sa(F.g));break a}Z(F);var xb=sa(F.g)&F.y;Ac(F.d,F.C,(F.l<<4)+xb,0);F.l=Da(F.l);Pa=Ha(F.b,-F.s);ab(K(F.A,sa(F.g),F.J),F.d,Pa);F.J=Pa;--F.s;F.g=Y(F.g,t)}if(qb(F.b))for(;;){if(ba=
A(F,sa(F.g)),p=F.mb,xb=sa(F.g)&F.y,Pa=(F.l<<4)+xb,1==ba&&-1==p){Ac(F.d,F.C,Pa,0);Pa=Ha(F.b,-F.s);var yb=K(F.A,sa(F.g),F.J);if(7>F.l)ab(yb,F.d,Pa);else{var mc=Ha(F.b,-F.v[0]-1-F.s);var tb=void 0;var Tc;var Zc=F.d;var od=mc,pe=Pa,Rd=1,ke=1;for(Tc=7;Tc>=0;--Tc){var rf=pe>>Tc&1;mc=ke;Rd&&(tb=od>>Tc&1,mc+=1+tb<<8,Rd=tb==rf);Ac(Zc,yb.tb,mc,rf);ke=ke<<1|rf}}F.J=Pa;F.l=Da(F.l)}else{if(Ac(F.d,F.C,Pa,1),4>p){if(Ac(F.d,F.bb,F.l,1),p?(Ac(F.d,F.hb,F.l,1),1==p?Ac(F.d,F.Ub,F.l,0):(Ac(F.d,F.Ub,F.l,1),Ac(F.d,F.vc,
F.l,p-2))):(Ac(F.d,F.hb,F.l,0),1==ba?Ac(F.d,F._,Pa,0):Ac(F.d,F._,Pa,1)),1==ba?F.l=7>F.l?9:11:(cb(F.i,F.d,ba-2,xb),F.l=7>F.l?8:11),Pa=F.v[p],0!=p){for(tb=p;tb>=1;--tb)F.v[tb]=F.v[tb-1];F.v[0]=Pa}}else{Ac(F.d,F.bb,F.l,0);F.l=7>F.l?7:10;cb(F.$,F.d,ba-2,xb);p-=4;tb=Aa(p);Pa=ea(ba);eb(F.K[Pa],F.d,tb);if(tb>=4)if(Zc=(tb>>1)-1,yb=(2|1&tb)<<Zc,mc=p-yb,14>tb)for(Pa=F.Sb,tb=yb-tb-1,yb=F.d,rf=mc,od=1,mc=0;Zc>mc;++mc)Tc=1&rf,Ac(yb,Pa,tb+od,Tc),od=od<<1|Tc,rf>>=1;else Pg(F.d,mc>>4,Zc-4),Dc(F.S,F.d,15&mc),++F.Qb;
Pa=p;for(tb=3;tb>=1;--tb)F.v[tb]=F.v[tb-1];F.v[0]=Pa;++F.Mb}F.J=Ha(F.b,ba-1-F.s)}if(F.s-=ba,F.g=Y(F.g,La(ba)),!F.s){F.Mb>=128&&V(F);F.Qb>=16&&X(F);N[0]=F.g;Pa=F.d;Pa=Y(Y(La(Pa.Jb),Pa.mc),[4,0]);if(S[0]=Pa,!qb(F.b)){vd(F,sa(F.g));break a}Pa=F.g;Pa=Ja(Pa[0]-Wa[0],Pa[1]-Wa[1]);if(Ma(Pa,[4096,0])>=0){F.pc=0;ca[0]=0;break a}}}else vd(F,sa(F.g))}}C.Pb=C.cb.Xb[0];C.cb.Kc[0]&&(ba=C.cb,nb(ba),ba.d.Ab=null,C.zc=0)}else{a:{ba=C.Z;if(tb=sa(ba.g)&ba.Dc,Db(ba.e,ba.Gb,(ba.U<<4)+tb)){if(Db(ba.e,ba.Zb,ba.U))F=0,Db(ba.e,
ba.Cb,ba.U)?(Db(ba.e,ba.Db,ba.U)?(Db(ba.e,ba.Eb,ba.U)?(Pa=ba.Qc,ba.Qc=ba.Ic):Pa=ba.Ic,ba.Ic=ba.Jc):Pa=ba.Jc,ba.Jc=ba.ib,ba.ib=Pa):Db(ba.e,ba.pb,(ba.U<<4)+tb)||(ba.U=7>ba.U?9:11,F=1),F||(F=Fb(ba.sb,ba.e,tb)+2,ba.U=7>ba.U?8:11);else if(ba.Qc=ba.Ic,ba.Ic=ba.Jc,ba.Jc=ba.ib,F=2+Fb(ba.Rb,ba.e,tb),ba.U=7>ba.U?7:10,Wa=Ca(ba.kb[ea(F)],ba.e),Wa>=4)if(N=(Wa>>1)-1,ba.ib=(2|1&Wa)<<N,14>Wa){p=ba.ib;xb=ba.kc;S=ba.ib-Wa-1;ca=ba.e;tb=1;for(Pa=yb=0;N>Pa;++Pa)Wa=Db(ca,xb,S+tb),tb<<=1,tb+=Wa,yb|=Wa<<Pa;ba.ib=p+yb}else{p=
ba.ib;xb=ba.e;S=0;for(N-=4;0!=N;--N)xb.E>>>=1,ca=xb.Bb-xb.E>>>31,xb.Bb-=xb.E&ca-1,S=S<<1|1-ca,-16777216&xb.E||(xb.Bb=xb.Bb<<8|D(xb.Ab),xb.E<<=8);ba.ib=p+(S<<4);p=ba.ib;xb=ba.Fb;N=ba.e;Wa=1;for(ca=Pa=0;xb.F>ca;++ca)S=Db(N,xb.G,Wa),Wa<<=1,Wa+=S,Pa|=S<<ca;if(ba.ib=p+Pa,0>ba.ib){ba=-1==ba.ib?1:-1;break a}}else ba.ib=Wa;if(Ma(La(ba.ib),ba.g)>=0||ba.ib>=ba.nb){ba=-1;break a}p=ba.B;xb=F;N=p.o-ba.ib-1;for(0>N&&(N+=p.M);0!=xb;--xb)N>=p.M&&(N=0),p.Lb[p.o++]=p.Lb[N++],p.o>=p.M&&Na(p);ba.g=Y(ba.g,La(F));ba.jc=
Xa(ba.B,0)}else{p=ba.gb;xb=sa(ba.g);p=p.V[((xb&p.qc)<<p.u)+((255&ba.jc)>>>8-p.u)];if(7>ba.U){xb=ba.e;F=1;do F=F<<1|Db(xb,p.Ib,F);while(256>F);p=F<<24>>24}else{xb=ba.e;F=Xa(ba.B,ba.ib);N=1;do if(ca=F>>7&1,F<<=1,S=Db(xb,p.Ib,(1+ca<<8)+N),N=N<<1|S,ca!=S){for(;256>N;)N=N<<1|Db(xb,p.Ib,N);break}while(256>N);p=N<<24>>24}ba.jc=p;p=ba.B;xb=ba.jc;p.Lb[p.o++]=xb;p.o>=p.M&&Na(p);ba.U=Da(ba.U);ba.g=Y(ba.g,t)}ba=0}if(-1==ba)throw Error("corrupted input");C.Pb=kd;C.Pc=C.Z.g;if(ba||Ma(C.Z.Nc,ag)>=0&&Ma(C.Z.g,C.Z.Nc)>=
0)Na(C.Z.B),ba=C.Z.B,Na(ba),ba.cc=null,C.Z.e.Ab=null,C.zc=0}return C.zc}function za(C,F){for(;F>C.O;++C.O)C.ec[C.O]=M({},3),C.hc[C.O]=M({},3)}function Fb(C,F,N){return Db(F,C.wc,0)?8+(Db(F,C.wc,1)?8+Ca(C.tc,F):Ca(C.hc[N],F)):Ca(C.ec[N],F)}function je(C){return C.wc=Eb(2),C.ec=Eb(16),C.hc=Eb(16),C.tc=M({},8),C.O=0,C}function oc(C){yc(C.wc);for(var F=0;C.O>F;++F)yc(C.ec[F].G),yc(C.hc[F].G);yc(C.tc.G)}function sb(C,F){C.jb=F;var N=C.a[F].r;var S=C.a[F].j;do{if(C.a[F].t){var ca=C.a[N];ca.j=-1;ca.t=0;
C.a[N].r=N-1;C.a[F].Ac&&(C.a[N-1].t=0,C.a[N-1].r=C.a[F].r2,C.a[N-1].j=C.a[F].j2)}var ba=N;ca=S;S=C.a[ba].j;N=C.a[ba].r;C.a[ba].j=ca;C.a[ba].r=F;F=ba}while(F>0);return C.mb=C.a[0].j,C.q=C.a[0].r}function X(C){for(var F=0;16>F;++F){var N=C.nc,S=F,ca,ba=C.S,p=F,Wa=1,Pa=0;for(ca=ba.F;0!=ca;--ca){var xb=1&p;p>>>=1;Pa+=jh(ba.G[Wa],xb);Wa=Wa<<1|xb}N[S]=Pa}C.Qb=0}function V(C){var F;for(F=4;128>F;++F){var N=Aa(F);var S=(N>>1)-1;var ca=(2|1&N)<<S;var ba=C.yc;var p=F;var Wa=C.Sb;N=ca-N-1;ca=F-ca;for(var Pa=
1,xb=0;0!=S;--S){var yb=1&ca;ca>>>=1;xb+=lc[(2047&(Wa[N+Pa]-yb^-yb))>>>2];Pa=Pa<<1|yb}ba[p]=xb}for(ba=0;4>ba;++ba){F=C.K[ba];p=ba<<6;for(N=0;C.$b>N;++N)C.P[p+N]=Ya(F,N);for(N=14;C.$b>N;++N)C.P[p+N]+=(N>>1)-1-4<<6;Wa=128*ba;for(F=0;4>F;++F)C.lb[Wa+F]=C.P[p+F];for(;128>F;++F)C.lb[Wa+F]=C.P[p+Aa(F)]+C.yc[F]}C.Mb=0}function vd(C,F){nb(C);F&=C.y;C.Gc&&(Ac(C.d,C.C,(C.l<<4)+F,1),Ac(C.d,C.bb,C.l,0),C.l=7>C.l?7:10,cb(C.$,C.d,0,F),F=ea(2),eb(C.K[F],C.d,63),Pg(C.d,67108863,26),Dc(C.S,C.d,15));for(F=0;5>F;++F)$h(C.d)}
function A(C,F){var N,S,ca,ba,p,Wa,Pa,xb,yb,mc,tb,Tc,Zc,od,pe,Rd,ke,rf,Xe,Bi,qj,Sd,rj,Ul,Vc,Vl,Oj,Wl;if(C.jb!=C.q)return mc=C.a[C.q].r-C.q,C.mb=C.a[C.q].j,C.q=C.a[C.q].r,mc;if(C.q=C.jb=0,C.N?(yb=C.vb,C.N=0):yb=Z(C),mc=C.D,ke=qb(C.b)+1,2>ke)return C.mb=-1,1;ke>273&&(ke=273);for(Wa=Pa=0;4>Wa;++Wa)C.x[Wa]=C.v[Wa],C.Q[Wa]=Yb(C.b,-1,C.x[Wa],273),C.Q[Wa]>C.Q[Pa]&&(Pa=Wa);if(C.Q[Pa]>=C.n)return C.mb=Pa,mc=C.Q[Pa],F=mc-1,F>0&&(ha(C.b,F),C.s+=F),mc;if(yb>=C.n)return C.mb=C.m[mc-1]+4,F=yb-1,F>0&&(ha(C.b,F),
C.s+=F),yb;if(p=Ha(C.b,-1),od=Ha(C.b,-C.v[0]-1-1),2>yb&&p!=od&&2>C.Q[Pa])return C.mb=-1,1;C.a[0].Hc=C.l;var Qf=F&C.y;C.a[1].z=lc[C.C[(C.l<<4)+Qf]>>>2]+P(K(C.A,F,C.J),C.l>=7,od,p);var Zh=C.a[1];Zh.j=-1;Zh.t=0;Zh=lc[2048-C.C[(C.l<<4)+Qf]>>>2];var ka=Zh+lc[2048-C.bb[C.l]>>>2];if(od==p){var Ag=C.l;Ag=ka+(lc[C.hb[Ag]>>>2]+lc[C._[(Ag<<4)+Qf]>>>2]);C.a[1].z>Ag&&(C.a[1].z=Ag,Wa=C.a[1],Wa.j=0,Wa.t=0)}if(xb=yb>=C.Q[Pa]?yb:C.Q[Pa],2>xb)return C.mb=C.a[1].j,1;C.a[1].r=0;C.a[0].bc=C.x[0];C.a[0].ac=C.x[1];C.a[0].dc=
C.x[2];C.a[0].lc=C.x[3];Pa=xb;do C.a[Pa--].z=268435455;while(Pa>=2);for(Wa=0;4>Wa;++Wa)if(Zc=C.Q[Wa],!(2>Zc)){var ih=ka+ec(C,Wa,C.l,Qf);do{var ae=ih+C.i.Cc[272*Qf+(Zc-2)];var hc=C.a[Zc];hc.z>ae&&(hc.z=ae,hc.r=0,hc.j=Wa,hc.t=0)}while(--Zc>=2)}if(Zc=Zh+lc[C.bb[C.l]>>>2],Pa=C.Q[0]>=2?C.Q[0]+1:2,yb>=Pa){for(yb=0;Pa>C.m[yb];)yb+=2;for(;N=C.m[yb+1],ae=Zc+L(C,N,Pa,Qf),hc=C.a[Pa],hc.z>ae&&(hc.z=ae,hc.r=0,hc.j=N+4,hc.t=0),Pa!=C.m[yb]||(yb+=2,yb!=mc);++Pa);}for(N=0;;){if(++N,N==xb)return sb(C,N);if(pe=Z(C),
mc=C.D,pe>=C.n)return C.vb=pe,C.N=1,sb(C,N);if(++F,qj=C.a[N].r,C.a[N].t?(--qj,C.a[N].Ac?(Sd=C.a[C.a[N].r2].Hc,Sd=4>C.a[N].j2?7>Sd?8:11:7>Sd?7:10):Sd=C.a[qj].Hc,Sd=Da(Sd)):Sd=C.a[qj].Hc,qj==N-1?Sd=C.a[N].j?Da(Sd):7>Sd?9:11:(C.a[N].t&&C.a[N].Ac?(qj=C.a[N].r2,Bi=C.a[N].j2,Sd=7>Sd?8:11):(Bi=C.a[N].j,Sd=4>Bi?7>Sd?8:11:7>Sd?7:10),Xe=C.a[qj],4>Bi?Bi?1==Bi?(C.x[0]=Xe.ac,C.x[1]=Xe.bc,C.x[2]=Xe.dc,C.x[3]=Xe.lc):2==Bi?(C.x[0]=Xe.dc,C.x[1]=Xe.bc,C.x[2]=Xe.ac,C.x[3]=Xe.lc):(C.x[0]=Xe.lc,C.x[1]=Xe.bc,C.x[2]=Xe.ac,
C.x[3]=Xe.dc):(C.x[0]=Xe.bc,C.x[1]=Xe.ac,C.x[2]=Xe.dc,C.x[3]=Xe.lc):(C.x[0]=Bi-4,C.x[1]=Xe.bc,C.x[2]=Xe.ac,C.x[3]=Xe.dc)),C.a[N].Hc=Sd,C.a[N].bc=C.x[0],C.a[N].ac=C.x[1],C.a[N].dc=C.x[2],C.a[N].lc=C.x[3],ba=C.a[N].z,p=Ha(C.b,-1),od=Ha(C.b,-C.x[0]-1-1),Qf=F&C.y,S=ba+lc[C.C[(Sd<<4)+Qf]>>>2]+P(K(C.A,F,Ha(C.b,-2)),Sd>=7,od,p),Rd=C.a[N+1],yb=0,Rd.z>S&&(Rd.z=S,Rd.r=N,Rd.j=-1,Rd.t=0,yb=1),Zh=ba+lc[2048-C.C[(Sd<<4)+Qf]>>>2],ka=Zh+lc[2048-C.bb[Sd]>>>2],od!=p||N>Rd.r&&!Rd.j||(Ag=ka+(lc[C.hb[Sd]>>>2]+lc[C._[(Sd<<
4)+Qf]>>>2]),Rd.z>=Ag&&(Rd.z=Ag,Rd.r=N,Rd.j=0,Rd.t=0,yb=1)),rf=qb(C.b)+1,rf=rf>4095-N?4095-N:rf,ke=rf,!(2>ke)){if(ke>C.n&&(ke=C.n),!yb&&od!=p&&(rj=Math.min(rf-1,C.n),Tc=Yb(C.b,0,C.x[0],rj),Tc>=2)){Wa=Da(Sd);hc=F+1&C.y;ae=S+lc[2048-C.C[(Wa<<4)+hc]>>>2]+lc[2048-C.bb[Wa]>>>2];for(ih=N+1+Tc;ih>xb;)C.a[++xb].z=268435455;ae+=(Ul=C.i.Cc[272*hc+(Tc-2)],Ul+ec(C,0,Wa,hc));hc=C.a[ih];hc.z>ae&&(hc.z=ae,hc.r=N+1,hc.j=0,hc.t=1,hc.Ac=0)}Pa=2;for(yb=0;4>yb;++yb)if(tb=Yb(C.b,-1,C.x[yb],ke),!(2>tb)){Zc=tb;do{for(;N+
tb>xb;)C.a[++xb].z=268435455;ae=ka+(Vc=C.i.Cc[272*Qf+(tb-2)],Vc+ec(C,yb,Sd,Qf));hc=C.a[N+tb];hc.z>ae&&(hc.z=ae,hc.r=N,hc.j=yb,hc.t=0)}while(--tb>=2);if(tb=Zc,yb||(Pa=tb+1),rf>tb&&(rj=Math.min(rf-1-tb,C.n),Tc=Yb(C.b,tb,C.x[yb],rj),Tc>=2)){Wa=7>Sd?8:11;hc=F+tb&C.y;ae=ka+(Vl=C.i.Cc[272*Qf+(tb-2)],Vl+ec(C,yb,Sd,Qf))+lc[C.C[(Wa<<4)+hc]>>>2]+P(K(C.A,F+tb,Ha(C.b,tb-1-1)),1,Ha(C.b,tb-1-(C.x[yb]+1)),Ha(C.b,tb-1));Wa=Da(Wa);hc=F+tb+1&C.y;ae+=lc[2048-C.C[(Wa<<4)+hc]>>>2];ae+=lc[2048-C.bb[Wa]>>>2];for(ih=tb+
1+Tc;N+ih>xb;)C.a[++xb].z=268435455;ae+=(Oj=C.i.Cc[272*hc+(Tc-2)],Oj+ec(C,0,Wa,hc));hc=C.a[N+ih];hc.z>ae&&(hc.z=ae,hc.r=N+tb+1,hc.j=0,hc.t=1,hc.Ac=1,hc.r2=N,hc.j2=yb)}}if(pe>ke){pe=ke;for(mc=0;pe>C.m[mc];mc+=2);C.m[mc]=pe;mc+=2}if(pe>=Pa){for(Zc=Zh+lc[C.bb[Sd]>>>2];N+pe>xb;)C.a[++xb].z=268435455;for(yb=0;Pa>C.m[yb];)yb+=2;for(tb=Pa;;++tb)if(ca=C.m[yb+1],ae=Zc+L(C,ca,tb,Qf),hc=C.a[N+tb],hc.z>ae&&(hc.z=ae,hc.r=N,hc.j=ca+4,hc.t=0),tb==C.m[yb]){if(rf>tb&&(rj=Math.min(rf-1-tb,C.n),Tc=Yb(C.b,tb,ca,rj),
Tc>=2)){Wa=7>Sd?7:10;hc=F+tb&C.y;ae=ae+lc[C.C[(Wa<<4)+hc]>>>2]+P(K(C.A,F+tb,Ha(C.b,tb-1-1)),1,Ha(C.b,tb-(ca+1)-1),Ha(C.b,tb-1));Wa=Da(Wa);hc=F+tb+1&C.y;ae+=lc[2048-C.C[(Wa<<4)+hc]>>>2];ae+=lc[2048-C.bb[Wa]>>>2];for(ih=tb+1+Tc;N+ih>xb;)C.a[++xb].z=268435455;ae+=(Wl=C.i.Cc[272*hc+(Tc-2)],Wl+ec(C,0,Wa,hc));hc=C.a[N+ih];hc.z>ae&&(hc.z=ae,hc.r=N+tb+1,hc.j=0,hc.t=1,hc.Ac=1,hc.r2=N,hc.j2=ca+4)}if(yb+=2,yb==mc)break}}}}}function L(C,F,N,S){var ca,ba=ea(N);return ca=128>F?C.lb[128*ba+F]:C.P[(ba<<6)+(131072>
F?Rj[F>>6]+12:134217728>F?Rj[F>>16]+32:Rj[F>>26]+52)]+C.nc[15&F],ca+C.$.Cc[272*S+(N-2)]}function ec(C,F,N,S){var ca;return F?(ca=lc[2048-C.hb[N]>>>2],1==F?ca+=lc[C.Ub[N]>>>2]:(ca+=lc[2048-C.Ub[N]>>>2],ca+=jh(C.vc[N],F-2))):(ca=lc[C.hb[N]>>>2],ca+=lc[2048-C._[(N<<4)+S]>>>2]),ca}function Z(C){var F=0;a:{var N=C.b;var S=C.m,ca,ba,p,Wa,Pa,xb,yb,mc;if(N.h>=N.o+N.ob)var tb=N.ob;else if(tb=N.h-N.o,N.xb>tb){N=(gb(N),0);break a}var Tc=0;var Zc=N.o>N.p?N.o-N.p:0;var od=N.f+N.o;var pe=1;var Rd=Pa=0;N.qb?(ba=
Qa[255&N.c[od]]^255&N.c[od+1],Pa=1023&ba,ba^=(255&N.c[od+2])<<8,Rd=65535&ba,xb=(ba^Qa[255&N.c[od+3]]<<5)&N.Ec):xb=255&N.c[od]^(255&N.c[od+1])<<8;ba=N.ub[N.R+xb]||0;N.qb&&(ca=N.ub[Pa]||0,p=N.ub[1024+Rd]||0,N.ub[Pa]=N.o,N.ub[1024+Rd]=N.o,ca>Zc&&N.c[N.f+ca]==N.c[od]&&(S[Tc++]=pe=2,S[Tc++]=N.o-ca-1),p>Zc&&N.c[N.f+p]==N.c[od]&&(p==ca&&(Tc-=2),S[Tc++]=pe=3,S[Tc++]=N.o-p-1,ca=p),0!=Tc&&ca==ba&&(Tc-=2,pe=1));N.ub[N.R+xb]=N.o;xb=(N.k<<1)+1;var ke=N.k<<1;Pa=Rd=N.w;0!=N.w&&ba>Zc&&N.c[N.f+ba+N.w]!=N.c[od+N.w]&&
(S[Tc++]=pe=N.w,S[Tc++]=N.o-ba-1);for(ca=N.Fc;;){if(Zc>=ba||0==ca--){N.L[xb]=N.L[ke]=0;break}if(Wa=N.o-ba,p=(N.k>=Wa?N.k-Wa:N.k-Wa+N.p)<<1,mc=N.f+ba,yb=Rd>Pa?Pa:Rd,N.c[mc+yb]==N.c[od+yb]){for(;++yb!=tb&&N.c[mc+yb]==N.c[od+yb];);if(yb>pe&&(S[Tc++]=pe=yb,S[Tc++]=Wa-1,yb==tb)){N.L[ke]=N.L[p];N.L[xb]=N.L[p+1];break}}(255&N.c[od+yb])>(255&N.c[mc+yb])?(N.L[ke]=ba,ke=p+1,ba=N.L[ke],Rd=yb):(N.L[xb]=ba,xb=p,ba=N.L[xb],Pa=yb)}N=(gb(N),Tc)}return C.D=N,C.D>0&&(F=C.m[C.D-2],F==C.n&&(F+=Yb(C.b,F-1,C.m[C.D-1],
273-F))),++C.s,F}function nb(C){C.b&&C.W&&(C.b.cc=null,C.W=0)}function Aa(C){return 2048>C?Rj[C]:2097152>C?Rj[C>>10]+20:Rj[C>>20]+40}function ta(C,F){yc(C.db);for(var N=0;F>N;++N)yc(C.Vb[N].G),yc(C.Wb[N].G);yc(C.ic.G)}function hd(C,F,N,S,ca){var ba;var p=lc[C.db[0]>>>2];var Wa=lc[2048-C.db[0]>>>2];var Pa=Wa+lc[C.db[1]>>>2];Wa+=lc[2048-C.db[1]>>>2];for(ba=0;8>ba;++ba){if(ba>=N)return;S[ca+ba]=p+Ya(C.Vb[F],ba)}for(;16>ba;++ba){if(ba>=N)return;S[ca+ba]=Pa+Ya(C.Wb[F],ba-8)}for(;N>ba;++ba)S[ca+ba]=Wa+
Ya(C.ic,ba-8-8)}function cb(C,F,N,S){8>N?(Ac(F,C.db,0,0),eb(C.Vb[S],F,N)):(N-=8,Ac(F,C.db,0,1),8>N?(Ac(F,C.db,1,0),eb(C.Wb[S],F,N)):(Ac(F,C.db,1,1),eb(C.ic,F,N-8)));0==--C.sc[S]&&(hd(C,S,C.rb,C.Cc,272*S),C.sc[S]=C.rb)}function Gd(C){C.db=Eb(2);C.Vb=Eb(16);C.Wb=Eb(16);C.ic=Ta({},8);for(var F=0;16>F;++F)C.Vb[F]=Ta({},3),C.Wb[F]=Ta({},3);return C.Cc=[],C.sc=[],C}function Xc(C,F){for(var N=0;F>N;++N)hd(C,N,C.rb,C.Cc,272*N),C.sc[N]=C.rb}function K(C,F,N){return C.V[((F&C.qc)<<C.u)+((255&N)>>>8-C.u)]}function ab(C,
F,N){var S,ca=1;for(S=7;S>=0;--S){var ba=N>>S&1;Ac(F,C.tb,ca,ba);ca=ca<<1|ba}}function P(C,F,N,S){var ca,ba,p=1,Wa=7,Pa=0;if(F)for(;Wa>=0;--Wa)if(ba=N>>Wa&1,ca=S>>Wa&1,Pa+=jh(C.tb[(1+ba<<8)+p],ca),p=p<<1|ca,ba!=ca){--Wa;break}for(;Wa>=0;--Wa)ca=S>>Wa&1,Pa+=jh(C.tb[p],ca),p=p<<1|ca;return Pa}function M(C,F){return C.F=F,C.G=Eb(1<<F),C}function Ca(C,F){var N,S=1;for(N=C.F;0!=N;--N)S=(S<<1)+Db(F,C.G,S);return S-(1<<C.F)}function Ta(C,F){return C.F=F,C.G=Eb(1<<F),C}function eb(C,F,N){var S,ca=1;for(S=
C.F;0!=S;){--S;var ba=N>>>S&1;Ac(F,C.G,ca,ba);ca=ca<<1|ba}}function Ya(C,F){var N,S=1,ca=0;for(N=C.F;0!=N;){--N;var ba=F>>>N&1;ca+=jh(C.G[S],ba);S=(S<<1)+ba}return ca}function Dc(C,F,N){var S,ca=1;for(S=0;C.F>S;++S){var ba=1&N;Ac(F,C.G,ca,ba);ca=ca<<1|ba;N>>=1}}function Db(C,F,N){var S,ca=F[N];return S=(C.E>>>11)*ca,(-2147483648^S)>(-2147483648^C.Bb)?(C.E=S,F[N]=ca+(2048-ca>>>5)<<16>>16,-16777216&C.E||(C.Bb=C.Bb<<8|D(C.Ab),C.E<<=8),0):(C.E-=S,C.Bb-=S,F[N]=ca-(ca>>>5)<<16>>16,-16777216&C.E||(C.Bb=
C.Bb<<8|D(C.Ab),C.E<<=8),1)}function yc(C){for(var F=C.length-1;F>=0;--F)C[F]=1024}function Ac(C,F,N,S){var ca=F[N];var ba=(C.E>>>11)*ca;S?(C.xc=Y(C.xc,Za(La(ba),[4294967295,0])),C.E-=ba,F[N]=ca-(ca>>>5)<<16>>16):(C.E=ba,F[N]=ca+(2048-ca>>>5)<<16>>16);-16777216&C.E||(C.E<<=8,$h(C))}function Pg(C,F,N){for(--N;N>=0;--N)C.E>>>=1,1==(F>>>N&1)&&(C.xc=Y(C.xc,La(C.E))),-16777216&C.E||(C.E<<=8,$h(C))}function $h(C){var F=C.xc;var N=32;var S;var ca=(N&=63,S=m(F,N),0>F[1]&&(S=Y(S,Ga([2,0],63-N))),S);ca=sa(ca);
if(0!=ca||Ma(C.xc,[4278190080,0])<0){C.mc=Y(C.mc,La(C.Jb));N=C.Oc;do F=C.Ab,N+=ca,F.Mc[F.Yb++]=N<<24>>24,N=255;while(0!=--C.Jb);C.Oc=sa(C.xc)>>>24}++C.Jb;C.xc=Ga(Za(C.xc,[16777215,0]),8)}function jh(C,F){return lc[(2047&(C-F^-F))>>>2]}function oj(C){for(var F,N,S,ca=0,ba=0,p=C.length,Wa=[],Pa=[];p>ca;++ca,++ba){if(F=255&C[ca],128&F)if(192==(224&F)){if(ca+1>=p||(N=255&C[++ca],128!=(192&N)))return C;Pa[ba]=(31&F)<<6|63&N}else{if(224!=(240&F)||ca+2>=p||(N=255&C[++ca],128!=(192&N))||(S=255&C[++ca],128!=
(192&S)))return C;Pa[ba]=(15&F)<<12|(63&N)<<6|63&S}else{if(!F)return C;Pa[ba]=F}16383==ba&&(Wa.push(String.fromCharCode.apply(String,Pa)),ba=-1)}return ba>0&&(Pa.length=ba,Wa.push(String.fromCharCode.apply(String,Pa))),Wa.join("")}function ai(C){var F,N,S=[],ca=0,ba=C.length;if("object"==typeof C)return C;for(N=F=0;ba>N;++N)S[F++]=C.charCodeAt(N);for(N=0;ba>N;++N)C=S[N],C>=1&&127>=C?++ca:ca+=!C||C>=128&&2047>=C?2:3;F=[];for(N=ca=0;ba>N;++N)C=S[N],C>=1&&127>=C?F[ca++]=C<<24>>24:!C||C>=128&&2047>=C?
(F[ca++]=(192|C>>6&31)<<24>>24,F[ca++]=(128|63&C)<<24>>24):(F[ca++]=(224|C>>12&15)<<24>>24,F[ca++]=(128|C>>6&63)<<24>>24,F[ca++]=(128|63&C)<<24>>24);return F}function bi(C){return C[1]+C[0]}var Nj="function"==typeof setImmediate?setImmediate:setTimeout,$f=4294967296,kd=[4294967295,-$f],Um=[0,-0x7fffffffffffffff],ag=[0,0],t=[1,0],Qa=function(){var C,F,N=[];for(C=0;256>C;++C){var S=C;for(F=0;8>F;++F)0!=(1&S)?S=S>>>1^-306674912:S>>>=1;N[C]=S}return N}(),Rj=function(){var C,F,N=2,S=[0,1];for(F=2;22>F;++F){var ca=
1<<(F>>1)-1;for(C=0;ca>C;++C,++N)S[N]=F<<24>>24}return S}(),lc=function(){var C,F,N=[];for(F=8;F>=0;--F){var S=1<<9-F-1;for(C=1<<9-F;C>S;++S)N[S]=(F<<6)+(C-S<<6>>>9-F-1)}return N}(),Pj=function(){var C=[{s:16,f:64,m:0},{s:20,f:64,m:0},{s:19,f:64,m:1},{s:20,f:64,m:1},{s:21,f:128,m:1},{s:22,f:128,m:1},{s:23,f:128,m:1},{s:24,f:255,m:1},{s:25,f:255,m:1}];return function(F){return C[F-1]||C[6]}}();return"undefined"==typeof onmessage||"undefined"!=typeof window&&void 0!==window.document||!function(){onmessage=
function(C){C&&C.gc&&(C.gc.action==2?e.decompress(C.gc.gc,C.gc.cbn):C.gc.action==1&&e.compress(C.gc.gc,C.gc.Rc,C.gc.cbn))}}(),{compress:function(C,F,N,S){function ca(){try{for(var xb,yb=(new Date).getTime();lb(Wa.c.yb);)if(ba=bi(Wa.c.yb.Pb)/bi(Wa.c.Tb),(new Date).getTime()-yb>200)return S(ba),Nj(ca,0),0;S(1);xb=G(Wa.c.Nb);Nj(N.bind(null,xb),0)}catch(mc){N(null,mc)}}var ba,p,Wa={},Pa=void 0===N&&void 0===S;if("function"!=typeof N&&(p=N,N=S=0),S=S||function(xb){void 0!==p&&postMessage({action:3,cbn:p,
result:xb})},N=N||function(xb,yb){return void 0!==p?postMessage({action:1,cbn:p,result:xb,error:yb}):void 0},Pa){for(Wa.c=qa({},ai(C),Pj(F));lb(Wa.c.yb););return G(Wa.c.Nb)}try{Wa.c=qa({},ai(C),Pj(F)),S(0)}catch(xb){return N(null,xb)}Nj(ca,0)},decompress:function(C,F,N){function S(){try{for(var yb,mc=0,tb=(new Date).getTime();lb(p.d.yb);)if(++mc%1E3==0&&(new Date).getTime()-tb>200)return xb&&(ca=bi(p.d.yb.Z.g)/Pa,N(ca)),Nj(S,0),0;N(1);yb=oj(G(p.d.Nb));Nj(F.bind(null,yb),0)}catch(Tc){F(null,Tc)}}var ca,
ba,p={},Wa=void 0===F&&void 0===N;if("function"!=typeof F&&(ba=F,F=N=0),N=N||function(yb){void 0!==ba&&postMessage({action:3,cbn:ba,result:xb?yb:-1})},F=F||function(yb,mc){return void 0!==ba?postMessage({action:2,cbn:ba,result:yb,error:mc}):void 0},Wa){for(p.d=ya({},C);lb(p.d.yb););return oj(G(p.d.Nb))}try{p.d=ya({},C);var Pa=bi(p.d.Tb);var xb=Pa>-1;N(0)}catch(yb){return F(null,yb)}Nj(S,0)}}}();this.LZMA=this.LZMA_WORKER=e}
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var saveAs=saveAs||function(Eb){if(!(typeof Eb==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent))){var Y=Eb.document.createElementNS("http://www.w3.org/1999/xhtml","a"),Za="download"in Y,Ma=/constructor/i.test(Eb.HTMLElement)||Eb.safari,Ja=/CriOS\/[\d]+/.test(navigator.userAgent),La=function(r){(Eb.setImmediate||Eb.setTimeout)(function(){throw r;},0)},sa=function(r){setTimeout(function(){typeof r===
"string"?(Eb.URL||Eb.webkitURL||Eb).revokeObjectURL(r):r.remove()},4E4)},I=function(r){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob([String.fromCharCode(65279),r],{type:r.type}):r},Ga=function(r,D,O){O||(r=I(r));var G=this,ma=r.type==="application/octet-stream",qa=function(){var Ha=["writestart","progress","write","writeend"];Ha=[].concat(Ha);for(var Yb=Ha.length;Yb--;){var qb=G["on"+Ha[Yb]];if(typeof qb==="function")try{qb.call(G,G)}catch(na){La(na)}}};
G.readyState=G.INIT;if(Za){var ya=(Eb.URL||Eb.webkitURL||Eb).createObjectURL(r);setTimeout(function(){Y.href=ya;Y.download=D;var Ha=new MouseEvent("click");Y.dispatchEvent(Ha);qa();sa(ya);G.readyState=G.DONE})}else(function(){if((Ja||ma&&Ma)&&Eb.FileReader){var Ha=new FileReader;Ha.onloadend=function(){var Yb=Ja?Ha.result:Ha.result.replace(/^data:[^;]*;/,"data:attachment/file;");Eb.open(Yb,"_blank")||(Eb.location.href=Yb);G.readyState=G.DONE;qa()};Ha.readAsDataURL(r);G.readyState=G.INIT}else ya||=
(Eb.URL||Eb.webkitURL||Eb).createObjectURL(r),ma?Eb.location.href=ya:Eb.open(ya,"_blank")||(Eb.location.href=ya),G.readyState=G.DONE,qa(),sa(ya)})()},m=Ga.prototype;if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob)return function(r,D,O){D=D||r.name||"download";O||(r=I(r));return navigator.msSaveOrOpenBlob(r,D)};m.abort=function(){};m.readyState=m.INIT=0;m.WRITING=1;m.DONE=2;m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null;return function(r,D,O){return new Ga(r,
D||r.name||"download",O)}}}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);typeof module!=="undefined"&&module.exports?module.exports.saveAs=saveAs:typeof define!=="undefined"&&define!==null&&define.amd!==null&&define("FileSaver.js",function(){return saveAs})}typeof self!=="undefined"&&self.constructor.name.includes("Worker");
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){window.BlobBuilder=window.MozBlobBuilder||window.WebKitBlobBuilder||window.BlobBuilder;var TBU_filedata,TBU_piecesize=524288,TBU_originalsize,TBU_start,TBU_end,TBU_part,TBU_total,TBU_chunk,TBU_xhr,TBU_info_a,TBU_info_r,TBU_info_u,TBU_info_s,TBU_info_url,TBU_uploading=!1,TBU_input=document.createElement("input");TBU_input.setAttribute("type","file");TBU_input.setAttribute("name","TBU_input");TBU_input.setAttribute("onChange",
"TBU_fileSelected();")}if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var embed_display=!1,embed_area=null,embed_frame=null,tilbuci_resize=[];tilbuci_resize.push(function(){embed_display&&embed_area!=null&&embed_frame!=null&&(embed_frame.style.width=embed_area.clientWidth+"px",embed_frame.style.height=embed_area.clientHeight+"px")});window.onresize=function(Eb){for(Eb=0;Eb<tilbuci_resize.length;Eb++)tilbuci_resize[Eb]()}}
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var overlay_display=!1,overlay_area=null,overlay_frame=null,overlay_title=null;tilbuci_resize.push(function(){overlay_display&&overlay_area!=null&&overlay_frame!=null&&(overlay_frame.style.width=overlay_area.clientWidth-120+"px",overlay_frame.style.height=overlay_area.clientHeight-100+"px")})}typeof define==="function"&&define.__amd&&(define.amd=define.__amd,delete define.__amd);
